Approve.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. @model EMIS.ViewModel.StudentManage.StudentProfile.StudentEncourageView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Approve";
  6. var isEnable = (Request["studentEncourageID"] ?? "") == "";
  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/StudentEncourageApprove.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.StudentEncourageID)
  79. <table cellpadding="0" cellspacing="0" id="studentEncouragetable">
  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.EncourageName):
  133. </td>
  134. <td>
  135. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_EncourageName, (x => x.EncourageNameID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  136. </td>
  137. <td>
  138. @Html.LabelFor(x => x.EncourageTypeName):
  139. </td>
  140. <td>
  141. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_EncourageType, (x => x.EncourageTypeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  142. </td>
  143. </tr>
  144. <tr>
  145. <td>
  146. @Html.LabelFor(x => x.EncourageLevelName):
  147. </td>
  148. <td>
  149. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_EncourageLevel, (x => x.EncourageLevelID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  150. </td>
  151. <td>
  152. @Html.LabelFor(x => x.DocNo):
  153. </td>
  154. <td>
  155. @Html.TextBoxFor(x => x.DocNo, new TextBoxOptions() { IsEnabled = isEnable })
  156. </td>
  157. </tr>
  158. <tr>
  159. <td>
  160. @Html.LabelFor(x => x.Unit):
  161. </td>
  162. <td colspan="3">
  163. @if (!isEnable)
  164. {
  165. @Html.TextBoxFor(x => x.Unit, new Dictionary<string, object>
  166. {
  167. { "style", "width: 90%;min-height: 20px" },
  168. { "disabled", "true" }
  169. })
  170. }
  171. else
  172. {
  173. @Html.TextBoxFor(x => x.Unit, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  174. }
  175. </td>
  176. </tr>
  177. <tr>
  178. <td>
  179. @Html.LabelFor(x => x.EncourageDate):
  180. </td>
  181. <td>
  182. @Html.TextBoxFor(x => x.EncourageDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable })
  183. </td>
  184. <td>
  185. @Html.LabelFor(x => x.Amount):
  186. </td>
  187. <td>
  188. @Html.TextBoxFor(x => x.Amount, new TextBoxOptions() { IsEnabled = isEnable })
  189. </td>
  190. </tr>
  191. <tr>
  192. <td>
  193. @Html.LabelFor(x => x.Reason):
  194. </td>
  195. <td colspan="3">
  196. @if (!isEnable)
  197. {
  198. @Html.TextAreaFor(x => x.Reason, new Dictionary<string, object>
  199. {
  200. { "style", "width: 90%;min-height: 45px" },
  201. { "disabled", "true" }
  202. })
  203. }
  204. else
  205. {
  206. @Html.TextAreaFor(x => x.Reason, new Dictionary<string, object> { { "style", "width: 90%;min-height: 45px" } })
  207. }
  208. </td>
  209. </tr>
  210. <tr>
  211. <td style="color: red;">
  212. @Html.LabelFor(x => x.Action):
  213. </td>
  214. <td colspan="3">
  215. @Html.DropdownList(new DropdownListOptions
  216. {
  217. BindType = DropdownListBindType.None,
  218. ID = "ddlAction",
  219. Name = "ddlAction",
  220. ItemList = listAction,
  221. SelectedValue = defaultActionValue
  222. })
  223. </td>
  224. </tr>
  225. <tr>
  226. <td>
  227. @Html.LabelFor(x => x.Comment):
  228. </td>
  229. <td colspan="3">
  230. @Html.TextAreaFor(x => x.Comment, new Dictionary<string, object>
  231. {
  232. { "style", "width: 90%;min-height: 50px" }
  233. })
  234. </td>
  235. </tr>
  236. </table>
  237. </div>
  238. }
  239. </div>