123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- @model EMIS.ViewModel.CerificateView
- @using EMIS.Web.Controls;
- @using EMIS.Entities;
- @using Bowin.Web.Controls.Mvc;
- @{
- ViewBag.Title = "Edit";
- ComboGridOptions cgopExamType = new ComboGridOptions
- {
- TextField = "Code",
- ValueField = "SchoolYearID",
- GridOptions = new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new BoundFieldColumn { FieldName="Code", HeaderText="学年学期", Align=AlignStyle.Center ,Width=0.2},
- new BoundFieldColumn { FieldName="Years", HeaderText="学年", Align=AlignStyle.Center ,Width=0.2},
- new BoundFieldColumn { FieldName="SchoolcodeName", HeaderText="学期", Align=AlignStyle.Center ,Width=0.2},
- },
- PageSize = 5,
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/SchoolYear/List"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- }
- };
- }
- @section scripts{
- <script type="text/javascript">
- function changeType() {
- var DistributeTypeID = $("#DistributeTypeID").combobox("getValue");
- toggleView(DistributeTypeID);
- }
- function toggleView(DistributeTypeID) {
- $('.t2,.t3').hide();
- $('.t'+DistributeTypeID).show();
- }
- function EditSave() {
- var DistributeTypeID = $("#DistributeTypeID").combobox("getValue");
- var EntrustDistributer = $("#EntrustDistributer").val();
- var ContactNo = $("#ContactNo").val();
- var ContactIDNo = $("#ContactIDNo").val();
- var ContactPerson = $("#ContactPerson").val();
- var MailContactNo = $("#MailContactNo").val();
- var Address = $("#Address").val();
- var mobile_check = /^[1][0-9]{10}$/;
- debugger;
- if (DistributeTypeID == 2)
- {
- if (EntrustDistributer == null || EntrustDistributer == "")
- {
- $.messager.alert("系统信息", "受委托人的姓名不能为空。");
- return;
- }
- if (ContactNo == null || ContactNo == "") {
- $.messager.alert("系统信息", "联系电话不能为空。");
- return;
- }
- else if (!mobile_check.test(ContactNo))
- {
- $.messager.alert("系统信息", "联系电话必须是11位数字。");
- return;
- }
- if (ContactIDNo == null || ContactIDNo == "") {
- $.messager.alert("系统信息", "证件号码不能为空。");
- return;
- }
- }
- if (DistributeTypeID == 3) {
- if (ContactPerson == null || ContactPerson == "") {
- $.messager.alert("系统信息", "联系人不能为空。");
- return;
- }
- if (MailContactNo == null || MailContactNo == "") {
- $.messager.alert("系统信息", "联系电话不能为空。");
- return;
- }
- else if (!mobile_check.test(MailContactNo)) {
- $.messager.alert("系统信息", "联系电话必须是11位数字。");
- return;
- }
- if (Address == null || Address == "") {
- $.messager.alert("系统信息", "邮寄地址不能为空。");
- return;
- }
- }
- $(document.forms[0]).submit();
- }
- $(function () {
- toggleView(@(Model.DistributeTypeID));
- })
- </script>
- }
- <div class="easyui-panel" data-options="border:false,fit:true,width:200" style="position: relative;">
- @using (Ajax.BeginForm(new AjaxOptions
- {
- OnSuccess = "EMISFunction.FormSuccess",
- OnBegin = "EMISFunction.FormSubmit",
- OnComplete = "EMISFunction.FormComplete"
- }))
- {
- <div class="p_title">
- <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
- </div>
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
- @if (Request.QueryString["Type"] != "1")//控制列表进入、屏蔽按钮权限
- {
- @Html.ContextMenuBar("StuEdit")
- }
- </div>
- </div>
- <div class="search_list">
- @Html.HiddenFor(x => x.CertisfierDistributeID)
- <table cellpadding="0" cellspacing="0" id="Campustable">
- <tr>
- <td style="width: 150px">
- @Html.LabelFor(x => x.DistributeTypeID):
- </td>
- <td>
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.ER_CertisfierDistributeType, x => x.DistributeTypeID, new DropdownListOptions { OnSelect = "changeType" }, new Dictionary<string, string> { })
- </td>
- </tr>
-
- <tr class="t2">
- <td style="width: 150px">
- <label>受委托人的姓名:</label>
- </td>
- <td>
- @Html.TextBoxFor(x => x.EntrustDistributer, new TextBoxOptions { }, new Dictionary<string, string> { { "style", "float:left" } })
- <div style="color:red;"> *</div>
- </td>
- </tr>
- <tr class="t2">
- <td>
- <label>联系电话:</label>
- </td>
- <td>
- @Html.TextBoxFor(x => x.ContactNo, new TextBoxOptions { }, new Dictionary<string, string> { { "style", "float:left" } })
- <div style="color:red;"> *</div>
- </td>
- </tr>
- <tr class="t2">
- <td style="width: 150px">
- <label>证件号码:</label>
- </td>
- <td>
- @Html.TextBoxFor(x => x.ContactIDNo, new TextBoxOptions { }, new Dictionary<string, string> { { "style", "width:90%;float:left" } })
- <div style="color:red;"> *</div>
- </td>
- </tr>
- <tr class="t3">
- <td style="width: 150px">
- <label> 联系人:</label>
- </td>
- <td>
- @Html.TextBoxFor(x => x.ContactPerson, new TextBoxOptions() { }, new Dictionary<string, string> { { "style", "width:90%;float:left" } })
- <div style="color:red;"> *</div>
- </td>
- </tr>
- <tr class="t3">
- <td>
- <label>联系电话:</label>
- </td>
- <td>
- @Html.TextBoxFor(x => x.MailContactNo, new TextBoxOptions { }, new Dictionary<string, string> { { "style", "float:left" } })
- <div style="color:red;"> *</div>
- </td>
- </tr>
- <tr class="t3">
- <td style="width: 150px">
- <label> 邮寄地址:</label>
- </td>
- <td>
- @Html.TextBoxFor(x => x.Address, new TextBoxOptions { }, new Dictionary<string, string> { { "style", "width:90%;float:left" } })
- <div style="color:red;"> *</div>
- </td>
- </tr>
- </table>
- </div>
- }
- </div>
|