CollegeReportDetail.cshtml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "CollegeReportDetail";
  5. Guid? schoolyearID = new Guid(Request["schoolyearID"]);
  6. Guid? collegeID = new Guid(Request["collegeID"]);
  7. int? reportStatus = Convert.ToInt32(Request["reportStatus"] == null ? "-1" : Request["reportStatus"]);
  8. int? inschoolstatus = Convert.ToInt32(Request["inschoolstatus"] == null ? "-1" : Request["inschoolstatus"]);
  9. //年级
  10. ComboGridOptions cgopGrade = new ComboGridOptions
  11. {
  12. TextField = "GradeID",
  13. ValueField = "GradeID",
  14. ID = "DictionaryGrade",
  15. Name = "DictionaryGrade",
  16. OnSelect = "queryGrade",
  17. GridOptions = new DataGridOptions
  18. {
  19. Columns = new List<DataGridColumn>()
  20. {
  21. new BoundFieldColumn { FieldName="GradeID", HeaderText="年级", Align=AlignStyle.Center, Width=0.1 }
  22. },
  23. IsCheckOnSelect = true,
  24. DataSourceUrl = Url.Content("~/Grademajor/GradeBindComboGridOptions"),
  25. IsPagination = true,
  26. IsShowRowNumbers = true,
  27. IsSingleSelect = false,
  28. }
  29. };
  30. //班级信息
  31. ComboGridOptions cgopClassmajor = new ComboGridOptions
  32. {
  33. TextField = "Name",
  34. ValueField = "ClassmajorID",
  35. Name = "ClassmajorComboGrid",
  36. ID = "ClassmajorComboGrid",
  37. OnSelect = "reload",
  38. GridOptions = new DataGridOptions
  39. {
  40. Columns = new List<DataGridColumn>()
  41. {
  42. new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Width=0.12, Align=AlignStyle.Center },
  43. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Width=0.3, Align=AlignStyle.Center }
  44. },
  45. PageSize = 5,
  46. IsCheckOnSelect = true,
  47. DataSourceUrl = Url.Content("~/Classmajor/List"),
  48. IsPagination = true,
  49. IsShowRowNumbers = true,
  50. IsSingleSelect = false
  51. }
  52. };
  53. }
  54. @section scripts{
  55. <script type="text/javascript">
  56. var nonSelect = "@DropdownList.SELECT_ALL";
  57. //刷新
  58. function reload() {
  59. $("#dgStudentReportList").cmsXDataTable("load", $.getDataGridParams("dgStudentReportList"));
  60. }
  61. //设置列颜色为红色
  62. function SetRedColumn(index, row, value) {
  63. return " <span style=\"color: red;\">" + value + "</span>";
  64. }
  65. //Excel导出
  66. function StuRSColDetail_Export() {
  67. $("#formQuery").submit();
  68. }
  69. //联动查询
  70. function queryGrade(data) {
  71. queryClass();
  72. }
  73. function queryClass() {
  74. var jsonString = "";
  75. var parameterString = "";
  76. var collegeID = $("#CollegeID").val();
  77. var gradeID = $("#DictionaryGrade").combogridX("getValue");
  78. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@@|";
  79. if (gradeID != nonSelect) parameterString += "DictionaryGrade|*|" + gradeID + "|@@|";
  80. if (parameterString != "") {
  81. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  82. $("#ClassmajorComboGrid").combogridX("reload", eval(jsonString));
  83. }
  84. else {
  85. $("#ClassmajorComboGrid").combogridX("reload");
  86. }
  87. reload();
  88. }
  89. </script>
  90. }
  91. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  92. <form id="formQuery" method="post" action="@Url.Content("~/StudentReportStatistics/CollegeReportDetailExcel?schoolyearID=" + schoolyearID + "&collegeID=" + collegeID)">
  93. @Html.PositionCondition("CollegeReport")
  94. <div class="search_keyword">
  95. <div class="search_input">
  96. <ul>
  97. <li class="sn" style="padding-left: 5px;">年级:</li>
  98. <li class="sv">
  99. @*@Html.ComboGrid(cgopGrade, new Dictionary<string, string> { { "data-condition", "dgStudentReportList" } })*@
  100. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Grade, DropdownListBindType.SelectAll,
  101. new ComboGridOptions
  102. {
  103. ID = "DictionaryGrade",
  104. Name = "DictionaryGrade",
  105. OnSelect = "queryGrade"
  106. }, new Dictionary<string, string> { { "data-condition", "dgStudentReportList" } })
  107. </li>
  108. <li class="sn" style="padding-left: 5px;">班级信息:</li>
  109. <li class="sv">
  110. @Html.ComboGrid(cgopClassmajor, new Dictionary<string, string> { { "data-condition", "dgStudentReportList" } })
  111. </li>
  112. @if (reportStatus == -1)
  113. {
  114. <li class="sn" style="padding-left: 5px;color: red;">注册状态:</li>
  115. <li class="sv">
  116. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_ReportStatus, new DropdownListOptions
  117. {
  118. ID = "DictionaryReportStatus",
  119. Name = "DictionaryReportStatus",
  120. BindType = DropdownListBindType.SelectAll,
  121. SelectedValue = (int)reportStatus,
  122. OnSelect = "reload"
  123. }, new Dictionary<string, string> { { "data-condition", "dgStudentReportList" } })
  124. </li>
  125. }
  126. else
  127. {
  128. <li class="sn" style="padding-left: 5px;color: red;display: none;">注册状态:</li>
  129. <li class="sv" style="display: none;">
  130. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_ReportStatus, new DropdownListOptions
  131. {
  132. ID = "DictionaryReportStatus",
  133. Name = "DictionaryReportStatus",
  134. BindType = DropdownListBindType.SelectAll,
  135. SelectedValue = (int)reportStatus,
  136. OnSelect = "reload"
  137. }, new Dictionary<string, string> { { "data-condition", "dgStudentReportList" } })
  138. </li>
  139. }
  140. <li class="sn" style="padding-left: 5px;color: red;">在校状态:</li>
  141. <li class="sv">
  142. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_INOrOutSchoolStatus, new DropdownListOptions
  143. {
  144. ID = "DictionaryInschoolStatus",
  145. Name = "DictionaryInschoolStatus",
  146. BindType = DropdownListBindType.SelectAll,
  147. SelectedValue = (int)inschoolstatus,
  148. OnSelect = "reload"
  149. }, new Dictionary<string, string> { { "data-condition", "dgStudentReportList" } })
  150. </li>
  151. </ul>
  152. </div>
  153. </div>
  154. <div class="p_title">
  155. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  156. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Detail")</div>
  157. </div>
  158. </form>
  159. @Html.Hidden("CollegeID", collegeID)
  160. <div class="search_list">
  161. @Html.DataGrid(new DataGridOptions
  162. {
  163. Columns = new List<DataGridColumn>()
  164. {
  165. new CheckBoxFieldColumn{ HeaderText="", FieldName="StudentReportID" },
  166. new BoundFieldColumn { FieldName="StudentNo", HeaderText="学号", Align=AlignStyle.Center, Width=0.08 },
  167. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  168. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, OrderFieldName="SexID", Width=0.02 },
  169. //new BoundFieldColumn { FieldName="BirthDate", HeaderText="出生日期", Align=AlignStyle.Center, Width=0.06, Formatter = Formatter.OnlyYearMonthDay },
  170. //new BoundFieldColumn { FieldName="NationName", HeaderText="民族", Align=AlignStyle.Center, OrderFieldName="NationID", Width=0.03 },
  171. //new BoundFieldColumn { FieldName="PoliticsName", HeaderText="政治面貌", Align=AlignStyle.Center, OrderFieldName="PoliticsID", Width=0.04 },
  172. new BoundFieldColumn { FieldName="GradeID", HeaderText="年级", Align=AlignStyle.Center, OrderFieldName="GradeID", Width=0.03 },
  173. //new BoundFieldColumn { FieldName="ClassmajorNo", HeaderText="班级编号", Align=AlignStyle.Center, Width=0.08 },
  174. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.12 },
  175. //new BoundFieldColumn { FieldName="StandardCode", HeaderText="专业代码", Align=AlignStyle.Center, OrderFieldName="StandardID", Width=0.06 },
  176. //new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, OrderFieldName="StandardID", Width=0.08 },
  177. //new BoundFieldColumn { FieldName="EducationName", HeaderText=EMIS.Utility.RSL.Get("EducationID"), Align=AlignStyle.Center, OrderFieldName="EducationID", Width=0.04 },
  178. //new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Align=AlignStyle.Center, OrderFieldName="LearningformID", Width=0.06 },
  179. //new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center, Width=0.03 },
  180. //new BoundFieldColumn { FieldName="SemesterName", HeaderText="入学学期", Align=AlignStyle.Center, OrderFieldName="SemesterID", Width=0.04 },
  181. //new BoundFieldColumn { FieldName="StartSchoolyearCode", HeaderText="入学学年学期", Align=AlignStyle.Center, Width=0.06 },
  182. //new BoundFieldColumn { FieldName="GraduateSchoolyearCode", HeaderText="毕业学期", Align=AlignStyle.Center, Width=0.06 },
  183. //new BoundFieldColumn { FieldName="CampusCode", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center, Width=0.05 },
  184. //new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("Campus"), Align=AlignStyle.Center, Width=0.06, OverflowLength=8 },
  185. //new BoundFieldColumn { FieldName="CollegeNo", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.05 },
  186. //new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.08, OverflowLength=10 },
  187. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, OrderFieldName="InSchoolStatusID", Width=0.04 },
  188. //new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, OrderFieldName="StudentStatus", Width=0.04 },
  189. new BoundFieldColumn { FieldName="YearID", HeaderText="学年", Align=AlignStyle.Center, OrderFieldName="YearID", Width=0.03, CustomFormatFun="SetRedColumn" },
  190. new BoundFieldColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Align=AlignStyle.Center, Width=0.06, CustomFormatFun="SetRedColumn" },
  191. new BoundFieldColumn { FieldName="ReportStatusName", HeaderText="注册状态", Align=AlignStyle.Center, OrderFieldName="ReportStatus", Width=0.04, CustomFormatFun="SetRedColumn" },
  192. new BoundFieldColumn { FieldName="ModifyUserName", HeaderText="操作人", Align=AlignStyle.Center, Width=0.04 },
  193. new BoundFieldColumn { FieldName="ReportDate", HeaderText="注册日期", Align=AlignStyle.Center, Width=0.06, Formatter = Formatter.OnlyYearMonthDay },
  194. new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.02, OverflowLength=5 }
  195. },
  196. IsPostBack = true,
  197. IsCheckOnSelect = true,
  198. DataSourceUrl = Url.Content("~/StudentReportStatistics/CollegeReportDetail?schoolyearID=" + schoolyearID + "&collegeID=" + collegeID),
  199. ID = "dgStudentReportList",
  200. IsPagination = true,
  201. IsShowRowNumbers = true,
  202. IsSingleSelect = false
  203. })
  204. </div>
  205. </div>