ComplianceServer/oldcode/WEB/Views/Soft/SoftOrder/CreateActiveOrder.cshtml

83 lines
2.6 KiB
Plaintext

@using WX.CRM.WebHelper;
@{
ViewBag.Title = "CreateActiveOrder";
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/CreateOrder",
type: "Post",
data: { UserName: username, ProductList: $product.val(), ResId: '@ViewBag.CustomerId' },
dataType: "json",
loading: true,
success: function (data) {
if (data.type === 0) {
$.messageBox5s('提示', data.message);
}
else {
window.parent.currenttabclose();
}
}
});
}
else {
$.messageBox5s('提示', "用户名不能为空!");
}
});
});
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">
@Html.Action("CustomerInfo", "CustomerUC", new { CustomerId = ViewBag.CustomerId })
<br />
<table>
<tbody>
<tr>
<td>
选择需要开通的用户名&nbsp;&nbsp;
</td>
<td>
@Html.DropDownList("UserName", ViewBag.UserNameItems as IEnumerable<SelectListItem>)
</td>
<td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;活动名称&nbsp;&nbsp;
</td>
<td>
@Html.DropDownList("ProductList", ViewBag.ProductList as IEnumerable<SelectListItem>)
</td>
</tr>
</tbody>
</table>
<br />
<div id="module"></div>
</div>