TG.WXCRM.V4/WEB/Views/Soft/SoftOrder/UnAgentApply.cshtml

86 lines
2.5 KiB
Plaintext

@using WX.CRM.WebHelper;
@{
ViewBag.Title = "UnAgentApply";
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
}
<script type="text/javascript">
$(function () {
var $product = $("#ProductList");
var producntid = $product.val();
BindModule(producntid);
$product.bind("change", function () {
producntid = $(this).val();
BindModule(producntid);
});
$("#btnSave").click(function () {
var username = $("#username").val();
if (username) {
$.r_ajax({
url: "/Soft/SoftOrder/UnAgentUserApply",
type: "Post",
data: { UserName: username, ProductList: $product.val() },
dataType: "json",
loading: true,
success: function (data) {
if (data.type === 0) {
window.parent.frameReturnByMes(data.message);
}
else {
window.parent.frameReturnByMes("申请成功!");
window.parent.currenttabclose();
}
}
});
}
else {
window.parent.frameReturnByMes("用户名不能为空!");
}
});
});
function BindModule(productId) {
$.r_ajax({
url: "/Soft/Module/ActiveModule",
type: "Post",
data: { productId: productId },
dataType: "html",
loading: true,
success: function (data) {
$("#module").html(data);
}
});
}
</script>
<div class="mvctool bgb">
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
</div>
<div style=" height:90%;width:100%; overflow-y:auto">
<br />
<table>
<tbody>
<tr>
<td>
用户名&nbsp;&nbsp;
</td>
<td>
@Html.TextBox("username")
</td>
</tr>
<tr><td colspan="2">&nbsp;&nbsp;</td></tr>
<tr>
<td>
活动名称&nbsp;&nbsp;
</td>
<td>
@Html.DropDownList("ProductList", ViewBag.ProductList as IEnumerable<SelectListItem>)
</td>
</tr>
</tbody>
</table>
<br />
<div id="module"></div>
</div>