Edit.cshtml 13 KB

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