TG.WXCRM.V4/WEB/Views/Level2/Leve2Order/L2CreateActiveOrder.cshtml

183 lines
6.4 KiB
Plaintext

@using WX.CRM.WebHelper;
@using WX.CRM.WEB.Handler
@model WX.CRM.WEB.ViewModel.Level2.AddOrderModel
@{
ViewBag.Title = "L2CreateActiveOrder";
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
}
@Styles.Render("~/Content/data_grid_list.css")
<script src="@Url.Content("~/Scripts/op/ProductSelect.js")" type="text/javascript"></script>
@section scripts{
<script type="text/javascript">
$(function () {
$("#parentId").attr("data-val-noinput-input", "@(Request.QueryString["id"] == null ? "[-1]" :"[" +Request.QueryString["id"]+"]")");
})
</script>
}
<script type="text/javascript">
$(function () {
$("#product").ProductSelect({
url: "/Level2/L2Product/GetZXL2Product",
Product_obj: "#ProductCode",
GetModule: function (ModuleData) {
var _text = "";
$("#tbList").empty();
$.each(ModuleData, function (i, n) {
_text += "<tr><td></td><td>" + n.MODULEID + "</td>" + "<td>" + n.MODULENAME + "</td></tr>"
});
$("#tbList").append(_text);
}
});
$("#btnSave").click(function () {
if ($("#CreateForm").valid()) {
$.r_ajax({
url: "/Level2/Leve2Order/L2CreateActiveOrder",
type: "Post",
data: $("#CreateForm").serialize(),
dataType: "json",
loading: true,
success: function (data) {
if (data.type) {
window.parent.frameReturnByMes(data.message);
window.parent.frameReturnByReload(true);
window.parent.frameReturnByClose()
}
else {
window.parent.frameReturnByMes(data.message);
}
}
});
}
return false;
});
$("#userName").change(function () {
var username = $("#userName").val();
$.getJSON("/Level2/Leve2Order/GetIP?userName=" + username,
function (data) {
if (data.message != "0.0.0.0") {
$("#IP").val(data.message);
}
});
});
});
</script>
<div class="mvctool bgb">
@Html.ToolButtonPlain("btnSave", "icon-save", "创建订单", false, "")
</div>
@using (Html.BeginForm("L2CreateActiveOrder", "Leve2Order", null, FormMethod.Post, new { Id = "CreateForm" }))
{
<div class="formContent">
@Html.ValidationSummary(true)
<table class="fromEditTable setTextWidth300">
<tbody>
<tr>
<td style="width:100px;">
@Html.LabelFor(m => m.userName)
</td>
<td style="width:310px">
@Html.TextBoxFor(m => m.userName)
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.userName)
</td>
</tr>
<tr>
<td style="width:100px;">
@Html.LabelFor(m => m.mobile)
</td>
<td style="width:310px">
@Html.TextBoxFor(m => m.mobile)
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.mobile)
</td>
</tr>
<tr>
<td style="width:100px;">
@Html.LabelFor(m => m.fullName)
</td>
<td style="width:310px">
@Html.TextBoxFor(m => m.fullName)
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.fullName)
</td>
</tr>
<tr>
<td style="width:100px;">
@Html.LabelFor(m => m.cradNo)
</td>
<td style="width:310px">
@Html.TextBoxFor(m => m.cradNo)
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.cradNo)
</td>
</tr>
<tr id="product">
<td style="width:100px;">
产品类型:
</td>
<td style="width:310px">
<select id="BigPuc"></select>
<select id="ProductCode" name="ProductCode"></select>
</td>
</tr>
<tr>
<td style="width:100px;">
@Html.LabelFor(m => m.IP)
</td>
<td style="width:310px">
@Html.TextBoxFor(m => m.IP)
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.IP)
</td>
</tr>
<tr>
<td style="width:100px;">
@Html.LabelFor(m => m.mark)
</td>
<td style="width:310px">
@Html.TextAreaFor(m => m.mark)
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.mark)
</td>
</tr>
</tbody>
</table>
</div>
<div class="bas_datagrid">
<div class='grid_table'>
<table width='100%' id='tablist' state='false' cellspacing='0' cellpadding='0' class='bas_datagrid_table' columns='MODULEID,MODULEname'>
<thead>
<tr class='grid_table_head'>
<th style='width:25px;'>&nbsp;</th>
<th class='tablegrid_sort' width="50%">模块Id <span class='tablegrid-sort-icon'>&nbsp;</span></th>
<th class='tablegrid_sort' width="50%">模块名称 <span class='tablegrid-sort-icon'>&nbsp;</span></th>
</tr>
</thead>
<tbody id="tbList"></tbody>
</table>
<div style='width:100%;height:40px;'></div>
</div>
</div>
}