StudentSelect.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. @model EMIS.ViewModel.RetakeManage.RetakePlanTaskView
  2. @using Bowin.Web.Controls.Mvc;
  3. @using EMIS.Web.Controls;
  4. @{
  5. ViewBag.Title = "StudentSelect";
  6. }
  7. @section scripts{
  8. <script type="text/javascript">
  9. var nonSelect = "";
  10. function reload() {
  11. $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
  12. }
  13. //获取选中的数据
  14. function validChoose() {
  15. var d = [];
  16. $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
  17. d.push(this.UserID);
  18. });
  19. return d;
  20. }
  21. //确定报名
  22. function Student_Confirm() {
  23. var listData = validChoose();
  24. if (listData.length < 1) {
  25. $.messager.alert("系统提示", "请选择要报名的名单。");
  26. return;
  27. }
  28. $("#UserIDs").val(listData.join(","));
  29. $("#RetakePlanID").val('@ViewBag.RetakePlanID');
  30. $.messager.confirm("系统提示", "您确定要对选择的名单进行报名?", function (r) {
  31. if (r) {
  32. $(document.forms[0]).submit();
  33. }
  34. });
  35. }
  36. //确定报名成功后不关闭弹出页面
  37. function formSuccessReloadNoClose(data) {
  38. if (data.IsSuccess == true) {
  39. reload();
  40. }
  41. $.messager.alert("系统提示", data.Message);
  42. }
  43. function queryStandard() {
  44. if ($.data($("#ddlYear")[0], "combobox")) {
  45. var parameterString = "";
  46. var collegeID = $("#cbgCollege").combogridX("getValue");
  47. var year = $("#ddlYear").combobox("getValue");
  48. if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@@|";
  49. if (year != nonSelect) parameterString += "DictionaryGrade|*|" + year + "|@@|";
  50. if (parameterString != "") {
  51. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  52. $("#cbgStandard").combogridX("reload", eval(jsonString));
  53. } else {
  54. $("#cbgStandard").combogridX("reload");
  55. }
  56. }
  57. }
  58. function queryClassmajor() {
  59. var parameterString = "";
  60. var collegeID = $("#cbgCollege").combogridX("getValue");
  61. var year = $("#ddlYear").combobox("getValue");
  62. var standard = $("#cbgStandard").combogridX("getValue");
  63. if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@@|";
  64. if (year != nonSelect) parameterString += "DictionaryGrade|*|" + year + "|@@|";
  65. if (standard != nonSelect && standard != "") parameterString += "DictionaryStandard|*|" + standard + "|@@|";
  66. if (parameterString != "") {
  67. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  68. $("#cbgClassmajor").combogridX("reload", eval(jsonString));
  69. } else {
  70. $("#cbgClassmajor").combogridX("reload");
  71. }
  72. reload();
  73. }
  74. </script>
  75. }
  76. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  77. <div class="p_title">
  78. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  79. 重修报名名单列表</div>*@
  80. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  81. <div class="current_navbar toolbar">
  82. <div class="func_info">
  83. <a class="easyui-linkbutton" href="javascript:Student_Confirm()" data-options="iconCls:'icon-ok',plain:'true'"
  84. onfocus="this.blur()">确定</a>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. @using (Ajax.BeginForm(new AjaxOptions
  90. {
  91. //报名成功不关闭窗口(并且刷新列表信息)
  92. OnSuccess = "formSuccessReloadNoClose",
  93. OnBegin = "EMISFunction.FormSubmit",
  94. OnComplete = "EMISFunction.FormComplete"
  95. }))
  96. {
  97. @Html.HiddenFor(x => x.RetakePlanID)
  98. @Html.HiddenFor(x => x.UserIDs)
  99. }
  100. @Html.PositionCondition("StudentSelect", null)
  101. <div class="search_keyword">
  102. <div class="search_input">
  103. <ul>
  104. <li class="sn" style="padding-left: 5px;">年级:</li>
  105. <li class="sv">
  106. @Html.SchoolYearDropDownList(new DropdownListOptions
  107. {
  108. ID = "ddlYear",
  109. Name = "ddlYear",
  110. BindType = DropdownListBindType.SelectAll,
  111. OnSelect = "queryStandard"
  112. },
  113. new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
  114. </li>
  115. <li class="sn" style="padding-left: 5px;">专业名称:</li>
  116. <li class="sv">
  117. @Html.ComboGrid(new ComboGridOptions
  118. {
  119. ID = "cbgStandard",
  120. Name = "cbgStandard",
  121. TextField = "StandardName",
  122. ValueField = "StandardID",
  123. OnSelect = "queryClassmajor",
  124. GridOptions = new DataGridOptions
  125. {
  126. Columns = new List<DataGridColumn>()
  127. {
  128. new BoundFieldColumn { FieldName="StandardCode", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
  129. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 }
  130. },
  131. //IsAutoLoad = false,
  132. IsCheckOnSelect = true,
  133. DataSourceUrl = Url.Content("~/Grademajor/StandardBindComboGridOptions"),
  134. IsPagination = true,
  135. IsShowRowNumbers = true,
  136. IsSingleSelect = false,
  137. }
  138. }, new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
  139. </li>
  140. </ul>
  141. <ul>
  142. <li class="sn" style="padding-left: 5px;">班级名称:</li>
  143. <li class="sv">
  144. @Html.ComboGrid(new ComboGridOptions
  145. {
  146. TextField = "Name",
  147. ValueField = "ClassmajorID",
  148. Name = "cbgClassmajor",
  149. ID = "cbgClassmajor",
  150. OnSelect = "reload",
  151. GridOptions = new DataGridOptions
  152. {
  153. Columns = new List<DataGridColumn>()
  154. {
  155. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.25 }
  156. },
  157. //IsAutoLoad = false,
  158. IsCheckOnSelect = true,
  159. DataSourceUrl = Url.Content("~/Classmajor/List"),
  160. IsPagination = true,
  161. IsShowRowNumbers = true,
  162. IsSingleSelect = false
  163. }
  164. }, new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
  165. </li>
  166. <li class="sn" style="padding-left: 5px; color: red;">在校状态:</li>
  167. <li class="sv">
  168. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_INOrOutSchoolStatus, new DropdownListOptions
  169. {
  170. ID = "DictionaryInschoolStatus",
  171. Name = "DictionaryInschoolStatus",
  172. BindType = DropdownListBindType.SelectAll,
  173. SelectedValue = (int)EMIS.ViewModel.CF_INOrOutSchoolStatus.Yes,
  174. OnSelect = "reload"
  175. },
  176. new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
  177. </li>
  178. </ul>
  179. </div>
  180. </div>
  181. <div class="search_list">
  182. @Html.DataGrid(new DataGridOptions
  183. {
  184. Columns = new List<DataGridColumn>()
  185. {
  186. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID"},
  187. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.1 },
  188. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  189. //new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.1 },
  190. //new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.12 },
  191. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.06 },
  192. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.1 },
  193. new BoundFieldColumn { FieldName="CourseTypeDesc", HeaderText="课程类型", Align=AlignStyle.Center, Width=0.05 },
  194. new BoundFieldColumn { FieldName="CourseCredit", HeaderText="课程学分", Align=AlignStyle.Center, Width=0.04 },
  195. //new BoundFieldColumn { FieldName="SchoolyearNumDesc", HeaderText="开课学年", Align=AlignStyle.Center, Width=0.04 },
  196. new BoundFieldColumn { FieldName="StarttermDesc", HeaderText="开课学期", Align=AlignStyle.Center, Width=0.04 },
  197. //new BoundFieldColumn { FieldName="DepartmentName", HeaderText="开课教研室", Align=AlignStyle.Center, Width=0.08 },
  198. //new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.1 },
  199. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, Width=0.04 },
  200. new BoundFieldColumn { FieldName="RecordStatusName", HeaderText="状态", Align=AlignStyle.Center, Width=0.04 },
  201. new BoundFieldColumn { FieldName="ApplyStatusName", HeaderText="报名状态", Align=AlignStyle.Center, Width=0.04 }
  202. },
  203. PageSize = 20,
  204. IsAutoLoad = true,
  205. IsCheckOnSelect = true,
  206. DataSourceUrl = Url.Content("~/RetakePlanResultTask/BaseStudentViewList?RetakePlanID=" + ViewBag.RetakePlanID),
  207. ID = "dgStudentList",
  208. IsPagination = true,
  209. IsShowRowNumbers = true,
  210. IsSingleSelect = false,
  211. IsAutoHeight = false,
  212. })
  213. </div>
  214. </div>