Files
zszq-trs/YLErpWeb/Views/clientduty/clientdutyEdit.cshtml
T
2024-05-09 14:06:26 +08:00

82 lines
3.1 KiB
Plaintext

@model ClientDuty
@{
ViewBag.Title = "机构客户职责联系人信息 | 编辑";
Layout = "~/Views/Shared/_InfoLayout.cshtml";
bool IsProduct = ViewBag.IsProduct;
}
@section CSS{
<style>
.formlabel {
width: 120px !important;
}
</style>
}
@section JS{
<script type="text/javascript">
$(function () {
SetAceDropDown(false);
main.setTradeDatePicker("", "#DeadLine", null, null, false);
});
function checkSubmitData() {
var pass = $('#clientdutyEditForm').valid();
var ContactTypeId = $("#ContactTypeId").val();
if (ContactTypeId.length == 0) {
main.message("请选择职责类型!");
return false;
}
return pass;
}
function saveclientduty() {
if (!checkSubmitData()) {
return false;
}
var data = $("#clientdutyEditForm").serialize();
main.post("/clientduty/clientdutyEditJson", data).done(function (res) {
layer.closeMe();
});
}
function checkSubmitMobil() {
if ($("#PhoneNumber").val() == "") {
$("#PhoneNumber").focus();
return false;
}
if (!$("#PhoneNumber").val().match(/^(((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9]))+\d{8})$/)) {
main.message("手机号码格式不正确!");
$("#PhoneNumber").focus();
return false;
}
return true;
}
$("#ContactName").prev().addClass("productNumber");
$("#Fax").prev().addClass("productNumber");
</script>
}
@using (Html.BeginForm("clientdutyEdit", "clientduty", FormMethod.Post, new { id = "clientdutyEditForm", autocomplete = "off" }))
{
<div class="form-layout">
<input type="hidden" value="@Model.id" name="id" id="id" />
@Html.HiddenFor(model => model.EncryptId)
@Html.HiddenFor(model => model.ClientId)
@Html.MyTextFor(model => model.ContactName, true)
@Html.MyAceDropdownFor(model => model.ContactTypeId, ClientModelHelper.GetAllcontactype(IsProduct), appendBlank: false)
@Html.MyDropdownFor1(model => model.IdCardType, YLErp.Web.Controllers.clientdutyController.GetAllIdCardType(), appendBlank: false)
@Html.MyTextFor(model => model.IdCardNo, false)
@Html.MyTextFor(model => model.Email)
@Html.MyDropdownFor1(model => model.IsReceiveEmail, new List<SelectListItem>() { new SelectListItem() { Selected = true, Text = "否", Value = "0" }, new SelectListItem() { Text = "是", Value = "1" } }, appendBlank: false)
@Html.MyTextFor(model => model.PhoneNumber, new { @placeholder = "多个号码以逗号隔开" })
@Html.MyTextFor(model => model.Fax)
@Html.MyTextFor(model => model.Address)
@Html.MyDateFor(model => model.DeadLine)
</div>
<div class="clearfix"></div>
<div class="form-buttons">
@MyControls.Btn("保存", "saveclientduty()")
@MyControls.Btn("关闭", "layer.closeMe()")
</div>
}