70 lines
2.4 KiB
Plaintext
70 lines
2.4 KiB
Plaintext
@using WX.CRM.WebHelper;
|
||
|
||
@{
|
||
ViewBag.Title = "Edit";
|
||
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
|
||
}
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
$("#btnSave").click(function () {
|
||
var resid = $.trim($("#resid").val());
|
||
var eid = $("#eid").val();
|
||
if (resid == "") {
|
||
$.messager.alert('警告', '客户ID不能为空!', 'error');
|
||
return false;
|
||
}
|
||
if (eid == "") {
|
||
$.messager.alert('警告', '工号不能为空!', 'error');
|
||
return false;
|
||
}
|
||
if (isNaN(eid)) {
|
||
$.messager.alert('警告', '工号必须是数字!', 'error');
|
||
return false;
|
||
}
|
||
$.r_ajax({
|
||
url: "/Res/SharedCustomer/Create",
|
||
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 {
|
||
window.parent.frameReturnByMes(data.message);
|
||
}
|
||
}
|
||
});
|
||
return false;
|
||
});
|
||
});
|
||
</script>
|
||
<div class="mvctool bgb">
|
||
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
|
||
</div>
|
||
<div class="formContent">
|
||
@using (Html.BeginForm("Create", "SharedCustomer", null, FormMethod.Post, new { Id = "CreateForm" }))
|
||
{
|
||
@Html.ValidationSummary(true)
|
||
<table class="fromEditTable setTextWidth300">
|
||
<tbody>
|
||
<tr>
|
||
<td style="width:200px">
|
||
客户ID:@Html.TextBox("resid", Request.QueryString["resid"], new { style = "width:150px;" })
|
||
</td>
|
||
<td width="120px"></td>
|
||
</tr>
|
||
<tr>
|
||
<td style="width:200px">
|
||
工 号:@Html.TextBox("eid", string.Empty, new { style = "width:150px;" })
|
||
</td>
|
||
<td width="120px"></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
}
|
||
</div>
|