ComplianceServer/oldcode/WEB/Views/WeiXin/UserIMEI/Add.cshtml

71 lines
2.1 KiB
Plaintext

@model WX.CRM.Model.Entity.WX_USERIMEI
@using WX.CRM.WebHelper;
@{
ViewBag.Title = "新增手机IMEI";
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
}
<div class="mvctool bgb">
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
</div>
@using (Html.BeginForm("Add", "UserIMEI", null, FormMethod.Post, new { Id = "CreateForm" }))
{
@Html.ValidationSummary(true)
<table class="fromEditTable ">
<tr>
<td style="width:120px;">
手机IMEI
</td>
<td style="width:310px">
@Html.TextBoxFor(m => m.IMEI)
</td>
<td width="120px">
@Html.ValidationMessageFor(m =>m.IMEI)
</td>
</tr>
<tr>
<td style="width:120px;">
员工工号:
</td>
<td style="width:310px">
@Html.TextBoxFor(m => m.EID)
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.EID)
</td>
</tr>
</table>
}
<script type="text/javascript">
$(function () {
$("#btnSave").click(function () {
if ($("#CreateForm").valid()) {
$.r_ajax({
url: "/WeiXin/UserIMEI/Add",
type: "Post",
data: $("#CreateForm").serialize(),
dataType: "json",
loading: true,
success: function (data) {
if (data.type == 1) {
window.parent.frameReturnByMes(data.message);
window.parent.frameReturnByReload(true);
window.parent.frameReturnByClose();
}
else {
$.messager.alert("警告", data.message, "error");
}
}
});
}
return false;
});
});
</script>