Edit.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. @model EMIS.ViewModel.DifferentDynamic.DifferentDynamicView
  2. @*@model EMIS.ViewModel.Students.StudentRecordView*@
  3. @using EMIS.Web.Controls;
  4. @using Bowin.Web.Controls.Mvc;
  5. @{
  6. Layout = "~/Views/Shared/_Layout.cshtml";
  7. ViewBag.Title = "异动申请编辑";
  8. var isView = (bool)ViewBag.IsView;
  9. var textAreaHtmlAttributes = new Dictionary<string, object> { { "style", "width:500px;" } };
  10. if (isView)
  11. {
  12. textAreaHtmlAttributes.Add("disabled", "disabled");
  13. }
  14. @*var cgopLoginID = new ComboGridOptions
  15. {
  16. TextField = "LoginID",
  17. ValueField = "UserID",
  18. IsEnabled = !isView,
  19. OnSelect = "SelectCallback",
  20. GridOptions = new DataGridOptions
  21. {
  22. Columns = new List<DataGridColumn>()
  23. {
  24. new LinkButtonColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center },
  25. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center },
  26. new BoundFieldColumn { FieldName="ClassMajorName", HeaderText="班级名称", Align=AlignStyle.Center },
  27. new BoundFieldColumn { FieldName="Years", HeaderText="年级", Align=AlignStyle.Center },
  28. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center },
  29. },
  30. IsCheckOnSelect = true,
  31. DataSourceUrl = Url.Action("AbleDifferentDynamicApplyStudentList"),
  32. IsPagination = true,
  33. IsShowRowNumbers = true,
  34. IsSingleSelect = false
  35. }
  36. };*@
  37. }
  38. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  39. @using (Ajax.BeginForm(new AjaxOptions
  40. {
  41. OnSuccess = "EMISFunction.FormSuccess",
  42. OnBegin = "EMISFunction.FormSubmit",
  43. OnComplete = "EMISFunction.FormComplete"
  44. }))
  45. {
  46. <div class="p_title">
  47. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  48. 异动申请信息</div>
  49. <div id="buttons" style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  50. </div>
  51. <div class="search_list">
  52. @Html.HiddenFor(m => m.EntityID)
  53. @Html.HiddenFor(m=>m.UserID)
  54. @Html.HiddenFor(m => m.StudentStatus)
  55. @Html.HiddenFor(m => m.ClassmajorID)
  56. @Html.HiddenFor(m => m.StandardID)
  57. @Html.HiddenFor(m => m.InSchoolStatusID)
  58. @Html.HiddenFor(m => m.ApplyTypeID)
  59. <table cellpadding="0" cellspacing="1">
  60. <tr>
  61. <th>@Html.LabelFor(m => m.SchoolyearID):
  62. </th>
  63. <td>
  64. @Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { ItemSourceUrl = "~/SchoolYear/DropDown", TextField = "Text", ValueField = "Value", IsEnabled = false })
  65. </td>
  66. <th>@Html.LabelFor(m => m.DifferentDynamicType):
  67. </th>
  68. <td>
  69. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ChangeType, m => m.DifferentDynamicType, new DropdownListOptions { IsEnabled = !isView })
  70. </td>
  71. </tr>
  72. <tr>
  73. @*<th>@Html.LabelFor(m => m.UserID):
  74. </th>
  75. <td>
  76. @Html.ComboGridFor(x => x.UserID, cgopLoginID)
  77. </td>*@
  78. <th>@Html.LabelFor(m => m.ReturnSchoolyearID):
  79. </th>
  80. <td>
  81. @Html.DropdownListFor(x => x.ReturnSchoolyearID, new DropdownListOptions { ItemSourceUrl = "~/SchoolYear/DropDown", TextField = "Text", ValueField = "Value", IsEnabled = !isView })
  82. </td>
  83. </tr>
  84. <tr>
  85. <th>@Html.LabelFor(m => m.InSchoolStatusID):
  86. </th>
  87. <td>
  88. @Html.TextBoxFor(m => m.InSchoolStatusName, new Dictionary<string, object> { { "disabled", "disabled" } })
  89. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.InSchoolStatusID), new DropdownListOptions { IsEnabled = false })*@
  90. </td>
  91. <th>@Html.LabelFor(m => m.StandardID):
  92. </th>
  93. <td>
  94. @Html.TextBoxFor(m => m.StandardName, new Dictionary<string, object> { { "disabled", "disabled" } })
  95. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Standard, m => m.StandardID, new DropdownListOptions { IsEnabled = false })*@
  96. </td>
  97. </tr>
  98. <tr>
  99. <th>@Html.LabelFor(m => m.StudentStatus):
  100. </th>
  101. <td>
  102. @Html.TextBoxFor(m => m.StudentStatusName, new Dictionary<string, object> { { "disabled", "disabled" } })
  103. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_StudentStatus, (x => x.StudentStatus), new DropdownListOptions { IsEnabled = false })*@
  104. </td>
  105. <th>@Html.LabelFor(m => m.ClassmajorID):
  106. </th>
  107. <td>
  108. @Html.TextBoxFor(m => m.ClassmajorName, new Dictionary<string, object> { { "disabled", "disabled" } })
  109. @*@Html.DropdownListFor(x => x.ClassmajorID, new DropdownListOptions { ItemSourceUrl = Url.Content("~/Classmajor/BindDropdownList"), TextField = "Text", ValueField = "Value", IsEnabled = false })*@
  110. </td>
  111. </tr>
  112. <tr id="tr01">
  113. <th>@Html.LabelFor(m => m.AfterInSchoolStatusID):
  114. </th>
  115. <td>
  116. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.AfterInSchoolStatusID), new DropdownListOptions { IsEnabled = !isView })
  117. </td>
  118. <th>@Html.LabelFor(m => m.AfterStudentStatus):
  119. </th>
  120. <td>
  121. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_StudentStatus, (x => x.AfterStudentStatus), new DropdownListOptions { IsEnabled = !isView })
  122. </td>
  123. </tr>
  124. <tr id="tr02">
  125. <th>@Html.LabelFor(m => m.AfterStandardID):
  126. </th>
  127. <td>
  128. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Standard, m => m.AfterStandardID, new DropdownListOptions { IsEnabled = !isView })
  129. </td>
  130. @if (Model.EntityApprovalStatus.HasValue && Model.EntityApprovalStatus != ViewBag.StartStatusID)
  131. {
  132. <th>@Html.LabelFor(m => m.AfterClassmajorID):
  133. </th>
  134. <td>
  135. @Html.DropdownListFor(x => x.AfterClassmajorID, new DropdownListOptions { ItemSourceUrl = Url.Content("~/Classmajor/BindDropdownList"), TextField = "Text", ValueField = "Value", IsEnabled = !isView })
  136. </td>
  137. }
  138. </tr>
  139. <tr>
  140. <th>@Html.LabelFor(m => m.BeginTime):
  141. </th>
  142. <td>
  143. @Html.TextBoxFor(x => x.BeginTime, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = !isView })
  144. </td>
  145. <th>@Html.LabelFor(m => m.EndTime):
  146. </th>
  147. <td>
  148. @Html.TextBoxFor(x => x.EndTime, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = !isView })
  149. </td>
  150. </tr>
  151. <tr>
  152. <th>@Html.LabelFor(m => m.Reason):
  153. </th>
  154. <td colspan="3">
  155. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_ChangeReason, x => x.Reason, DropdownListBindType.PleaseSelect,
  156. new ComboGridOptions
  157. {
  158. OnSelect = "",
  159. GridOptions = new DataGridOptions
  160. {
  161. OnLoadSuccessFun = ""
  162. }
  163. })
  164. @Html.HiddenFor(m => m.Reason)
  165. </td>
  166. </tr>
  167. <tr>
  168. <th>@Html.LabelFor(m => m.ApplyRemark):
  169. </th>
  170. <td colspan="3">
  171. @Html.TextAreaFor(m => m.ApplyRemark, textAreaHtmlAttributes)
  172. </td>
  173. </tr>
  174. <tr>
  175. <th>@Html.LabelFor(m => m.Source):
  176. </th>
  177. <td colspan="3">
  178. @Html.TextAreaFor(m => m.Source, textAreaHtmlAttributes)
  179. </td>
  180. </tr>
  181. <tr>
  182. <th>@Html.LabelFor(m => m.Direction):
  183. </th>
  184. <td colspan="3">
  185. @Html.TextAreaFor(m => m.Direction, textAreaHtmlAttributes)
  186. </td>
  187. </tr>
  188. <tr>
  189. <th>@Html.LabelFor(m => m.Remark):
  190. </th>
  191. <td colspan="3">
  192. @Html.TextAreaFor(m => m.Remark, textAreaHtmlAttributes)
  193. </td>
  194. </tr>
  195. </table>
  196. </div>
  197. }
  198. <div class="search_list">
  199. <table cellpadding="0" cellspacing="0" id="specialtytable">
  200. </table>
  201. </div>
  202. </div>
  203. @section scripts{
  204. <script type="text/javascript">
  205. var $differentDynamicType=$('#DifferentDynamicType');
  206. $(function(){
  207. var isView=@isView.ToString().ToLower();
  208. if (isView) {
  209. $('#buttons').hide();
  210. }
  211. $differentDynamicType.combobox({
  212. 'onSelect':function(){
  213. differentDynamicTypeOnSelect(false);
  214. }
  215. });
  216. differentDynamicTypeOnSelect(true);
  217. });
  218. function DifferentDynamicApply_Save() {
  219. $(document.forms[0]).submit();
  220. }
  221. function differentDynamicTypeOnSelect(isFirstLoad){
  222. var isView=@isView.ToString().ToLower();
  223. if(isView) return;
  224. var peo = $differentDynamicType.combobox('getValue');
  225. var $tr02=$('#tr02'),$tr01=$('#tr01');
  226. $tr01.hide();
  227. $tr02.hide();
  228. peo=parseInt(peo);
  229. switch (peo) {
  230. case 0:
  231. if (!isFirstLoad) {
  232. $('#AfterStandardID').combobox('setValue','-1');
  233. }
  234. $tr02.show();
  235. break;
  236. default:
  237. }
  238. }
  239. </script>
  240. }