Approve.cshtml 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. @model EMIS.ViewModel.StudentManage.StudentProfile.StudentPunishView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Approve";
  6. var isEnable = (Request["studentPunishID"] ?? "") == "";
  7. //学生信息
  8. ComboGridOptions cgopStudent = new ComboGridOptions
  9. {
  10. TextField = "StudentNo",
  11. ValueField = "UserID",
  12. OnSelect = "queryStudent",
  13. IsEnabled = isEnable,
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. new LinkButtonColumn { FieldName="StudentNo", HeaderText="学号", Width=0.2, Align=AlignStyle.Center },
  19. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Width=0.08, Align=AlignStyle.Center },
  20. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Width=0.06, Align=AlignStyle.Center, OrderFieldName="SexID" },
  21. //new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Width=0.1, Align=AlignStyle.Center, OrderFieldName="StandardID", OverflowLength=6 },
  22. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Width=0.06, Align=AlignStyle.Center, OverflowLength=6 },
  23. //new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Width=0.1, Align=AlignStyle.Center, OverflowLength=6 },
  24. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Width=0.1, Align=AlignStyle.Center, OrderFieldName="InSchoolStatusID", CustomFormatFun="SetRedColumn" }
  25. //new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Width=0.1, Align=AlignStyle.Center, OrderFieldName="StudentStatus", CustomFormatFun="SetRedColumn" }
  26. },
  27. PageSize = 10,
  28. IsCheckOnSelect = true,
  29. DataSourceUrl = Url.Content("~/Student/StudentBaseInSchoolList?userID=" + Model.UserID),
  30. IsPagination = true,
  31. IsShowRowNumbers = true,
  32. IsSingleSelect = false
  33. }
  34. };
  35. //班级信息
  36. ComboGridOptions cgopClassmajor = new ComboGridOptions
  37. {
  38. TextField = "Name",
  39. ValueField = "ClassmajorID",
  40. IsEnabled = false,
  41. GridOptions = new DataGridOptions
  42. {
  43. Columns = new List<DataGridColumn>()
  44. {
  45. new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Width=0.2, Align=AlignStyle.Center },
  46. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Width=0.3, Align=AlignStyle.Center }
  47. },
  48. PageSize = 5,
  49. IsCheckOnSelect = true,
  50. DataSourceUrl = Url.Content("~/Classmajor/List"),
  51. IsPagination = true,
  52. IsShowRowNumbers = true,
  53. IsSingleSelect = false
  54. }
  55. };
  56. }
  57. @{
  58. var listAction = ViewBag.ListAction as List<DropdownListItem>;
  59. var defaultAction = listAction.FirstOrDefault(x => true);
  60. var defaultActionValue = (defaultAction == null ? null : defaultAction.Value);
  61. }
  62. @section scripts{
  63. <script src="~/Scripts/Business/StudentManage/StudentProfile/StudentPunishApprove.js" type="text/javascript"></script>
  64. }
  65. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  66. @using (Ajax.BeginForm(new AjaxOptions
  67. {
  68. OnSuccess = "EMISFunction.FormSuccess",
  69. OnBegin = "EMISFunction.FormSubmit",
  70. OnComplete = "EMISFunction.FormComplete"
  71. }))
  72. {
  73. <div class="p_title">
  74. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  75. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Approve")</div>
  76. </div>
  77. <div class="search_list">
  78. @Html.HiddenFor(x => x.StudentPunishID)
  79. <table cellpadding="0" cellspacing="0" id="studentPunishtable">
  80. <tr>
  81. <td style="color: red;">
  82. @Html.LabelFor(x => x.SchoolyearCode):
  83. </td>
  84. <td>
  85. @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
  86. {
  87. TextField = "Text",
  88. ValueField = "Value",
  89. BindType = DropdownListBindType.PleaseSelect,
  90. IsEnabled = false,
  91. SelectedValue = BaseExtensions.GetCurrentSchoolYearID(),
  92. ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid")
  93. })
  94. </td>
  95. <td style="color: red;">
  96. @Html.LabelFor(x => x.StudentNo):
  97. </td>
  98. <td>
  99. @Html.ComboGridFor(x => x.UserID, cgopStudent)
  100. </td>
  101. </tr>
  102. <tr>
  103. <td>
  104. @Html.LabelFor(x => x.Name):
  105. </td>
  106. <td>
  107. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = false })
  108. </td>
  109. <td>
  110. @Html.LabelFor(x => x.SexName):
  111. </td>
  112. <td>
  113. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.SexID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  114. </td>
  115. </tr>
  116. <tr>
  117. <td>
  118. @Html.LabelFor(x => x.ClassmajorName):
  119. </td>
  120. <td>
  121. @Html.ComboGridFor(x => x.ClassmajorID, cgopClassmajor)
  122. </td>
  123. <td>
  124. @Html.LabelFor(x => x.InSchoolStatusName):
  125. </td>
  126. <td>
  127. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.InSchoolStatusID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  128. </td>
  129. </tr>
  130. <tr>
  131. <td style="color: red;">
  132. @Html.LabelFor(x => x.PunishTypeID):
  133. </td>
  134. <td>
  135. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_PunishType, (x => x.PunishTypeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  136. </td>
  137. <td>
  138. @Html.LabelFor(x => x.PunishLevelName):
  139. </td>
  140. <td>
  141. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_PunishLevel, (x => x.PunishLevelID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  142. </td>
  143. </tr>
  144. <tr>
  145. <td>
  146. @Html.LabelFor(x => x.DocNo):
  147. </td>
  148. <td>
  149. @Html.TextBoxFor(x => x.DocNo, new TextBoxOptions() { IsEnabled = isEnable })
  150. </td>
  151. <td>
  152. @Html.LabelFor(x => x.PunishDate):
  153. </td>
  154. <td>
  155. @Html.TextBoxFor(x => x.PunishDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable })
  156. </td>
  157. </tr>
  158. <tr>
  159. <td>
  160. @Html.LabelFor(x => x.Reason):
  161. </td>
  162. <td colspan="3">
  163. @if (!isEnable)
  164. {
  165. @Html.TextAreaFor(x => x.Reason, new Dictionary<string, object>
  166. {
  167. { "style", "width: 90%;min-height: 45px" },
  168. { "disabled", "true" }
  169. })
  170. }
  171. else
  172. {
  173. @Html.TextAreaFor(x => x.Reason, new Dictionary<string, object> { { "style", "width: 90%;min-height: 45px" } })
  174. }
  175. </td>
  176. </tr>
  177. <tr>
  178. <td style="color: red;">
  179. @Html.LabelFor(x => x.Action):
  180. </td>
  181. <td colspan="3">
  182. @Html.DropdownList(new DropdownListOptions
  183. {
  184. BindType = DropdownListBindType.None,
  185. ID = "ddlAction",
  186. Name = "ddlAction",
  187. ItemList = listAction,
  188. SelectedValue = defaultActionValue
  189. })
  190. </td>
  191. </tr>
  192. <tr>
  193. <td>
  194. @Html.LabelFor(x => x.Comment):
  195. </td>
  196. <td colspan="3">
  197. @Html.TextAreaFor(x => x.Comment, new Dictionary<string, object>
  198. {
  199. { "style", "width: 90%;min-height: 50px" }
  200. })
  201. </td>
  202. </tr>
  203. </table>
  204. </div>
  205. }
  206. </div>