85 lines
2.7 KiB
Plaintext
85 lines
2.7 KiB
Plaintext
@model WX.CRM.Model.Entity.RES_CUSTOMER_BEST
|
|
@using System.Web.UI.WebControls
|
|
@using WX.CRM.WEB.Areas.Res.Controllers
|
|
@using WX.CRM.WebHelper;
|
|
@using WX.CRM.Model
|
|
@{
|
|
ViewBag.Title = "编辑";
|
|
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
|
|
}
|
|
<style>
|
|
|
|
</style>
|
|
<div class="mvctool bgb">
|
|
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
|
|
</div>
|
|
<div class="formContent">
|
|
@using (Html.BeginForm("Edit", "Customer", null, FormMethod.Post, new { Id = "CreateForm" }))
|
|
{
|
|
@Html.ValidationSummary(true)
|
|
<table class="fromEditTable setTextWidth300">
|
|
<tbody>
|
|
<tr>
|
|
<td>客户Id</td>
|
|
@if (!Model.CREATEID.HasValue)
|
|
{
|
|
<td style="width:310px">@Html.TextBoxFor(c => c.RESID)</td>
|
|
<td style="width:310px;display:none">@Html.TextBoxFor(c => c.CREATEID)</td>
|
|
|
|
}
|
|
else
|
|
{
|
|
<td style="width:310px" readonly="readonly">@Html.TextBoxFor(c => c.RESID, new Dictionary<string, object> {
|
|
{ "lay-verify", "required" },
|
|
{ "lay-reqtext", "客户不可为空!" },
|
|
{ "autocomplete","off" },
|
|
{ "readonly","readonly" },
|
|
})</td>
|
|
<td style="width:310px;display:none">@Html.TextBoxFor(c => c.CREATEID)</td>
|
|
|
|
}
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>备注</td>
|
|
<td style="width:310px">@Html.TextAreaFor(m => m.REMARK, new { style = "height:30px" })</td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
}
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
|
|
$("#btnSave").click(function () {
|
|
|
|
if ($("#CreateForm").valid()) {
|
|
|
|
$.r_ajax({
|
|
url: "/Res/Customer/BestEdit",
|
|
type: "POST",
|
|
data: $("#CreateForm").serialize(),
|
|
dataType: "json",
|
|
loading: true,
|
|
success: function (data) {
|
|
debugger
|
|
if (data.type == 1) {
|
|
$.messager.alert('提示', data.message, 'info', function () { window.parent.location.reload(); });
|
|
} else {
|
|
window.parent.frameReturnByMes(data.message);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
return false;
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|