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.FinallyScoreID);
  18. });
  19. return d;
  20. }
  21. //确定
  22. function Student_Confirm() {
  23. var d = validChoose();
  24. if (d.length < 1) {
  25. $.messager.alert("系统提示", "请选择要添加的名单。");
  26. return;
  27. }
  28. $("#finallyScoreIDs").val(d.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.Hidden("finallyScoreIDs")
  98. @Html.HiddenFor(x => x.RetakePlanID)
  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="FinallyScoreID"},
  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="SchoolyearCode", HeaderText="学年学期", Align=AlignStyle.Center, Width=0.08 },
  192. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.06 },
  193. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.1 },
  194. new BoundFieldColumn { FieldName="CourseTypeDesc", HeaderText="课程类型", Align=AlignStyle.Center, Width=0.05 },
  195. new BoundFieldColumn { FieldName="CourseCredit", HeaderText="课程学分", Align=AlignStyle.Center, Width=0.04 },
  196. //new BoundFieldColumn { FieldName="ExamsCategoryDesc", HeaderText="考试性质", Align=AlignStyle.Center, Width=0.04 },
  197. //new BoundFieldColumn { FieldName="ExamsStateDesc", HeaderText="考试状态", Align=AlignStyle.Center, Width=0.04 },
  198. //new BoundFieldColumn { FieldName="SchoolyearNumDesc", HeaderText="开课学年", Align=AlignStyle.Center, Width=0.04 },
  199. new BoundFieldColumn { FieldName="StarttermDesc", HeaderText="开课学期", Align=AlignStyle.Center, Width=0.04 },
  200. new BoundFieldColumn { FieldName="TotalScore", HeaderText="总成绩", Align=AlignStyle.Center, Width=0.03 },
  201. //new BoundFieldColumn { FieldName="DepartmentName", HeaderText="开课教研室", Align=AlignStyle.Center, Width=0.08 },
  202. //new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.1 },
  203. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, Width=0.04 }
  204. },
  205. PageSize = 20,
  206. IsAutoLoad = true,
  207. IsCheckOnSelect = true,
  208. DataSourceUrl = Url.Content("~/RetakePlanTask/BaseStudentViewList?RetakePlanID=" + ViewBag.RetakePlanID),
  209. ID = "dgStudentList",
  210. IsPagination = true,
  211. IsShowRowNumbers = true,
  212. IsSingleSelect = false,
  213. IsAutoHeight = false,
  214. })
  215. </div>
  216. </div>