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

78 lines
2.3 KiB
Plaintext

@using WX.CRM.WebHelper;
@{
ViewBag.Title = "CreateUnAgentOrder";
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 = '@ViewBag.Username';
if (username) {
$.r_ajax({
url: "/Soft/SoftOrder/CreateOrder",
type: "Post",
data: { UserName: username, ProductList: $product.val(), ResId: '' },
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.DropDownList("ProductList", ViewBag.ProductList as IEnumerable<SelectListItem>)
</td>
</tr>
</tbody>
</table>
<br />
<div id="module"></div>
</div>