TG.WXCRM.V4/WEB/Views/Res/SharedCustomer/Create.cshtml

70 lines
2.4 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@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">
工&nbsp;&nbsp;&nbsp;&nbsp;号:@Html.TextBox("eid", string.Empty, new { style = "width:150px;" })
</td>
<td width="120px"></td>
</tr>
</tbody>
</table>
}
</div>