PlanStudentList.cshtml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "PlanStudentList";
  5. Guid? specialtyPlanID = new Guid(Request["specialtyPlanID"]);
  6. //院系所
  7. ComboGridOptions cgopCollege = new ComboGridOptions
  8. {
  9. TextField = "Name",
  10. ValueField = "CollegeID",
  11. ID = "CollegeDropdown",
  12. Name = "CollegeDropdown",
  13. OnSelect = "queryCollege",
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  19. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.2 }
  20. },
  21. PageSize = 5,
  22. IsCheckOnSelect = true,
  23. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  24. IsPagination = true,
  25. IsShowRowNumbers = true,
  26. IsSingleSelect = false,
  27. }
  28. };
  29. //班级信息
  30. ComboGridOptions cgopClassmajor = new ComboGridOptions
  31. {
  32. TextField = "Name",
  33. ValueField = "ClassmajorID",
  34. Name = "ClassmajorDropdown",
  35. ID = "ClassmajorDropdown",
  36. OnSelect = "reload",
  37. GridOptions = new DataGridOptions
  38. {
  39. Columns = new List<DataGridColumn>()
  40. {
  41. //new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center, Width=0.2 },
  42. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.3 }
  43. },
  44. PageSize = 5,
  45. IsCheckOnSelect = true,
  46. DataSourceUrl = Url.Content("~/Classmajor/List"),
  47. IsPagination = true,
  48. IsShowRowNumbers = true,
  49. IsSingleSelect = false
  50. }
  51. };
  52. }
  53. @section scripts{
  54. <script type="text/javascript">
  55. var nonSelect = "@DropdownList.SELECT_ALL";
  56. //刷新
  57. function reload() {
  58. $("#dgAdultSpecialtyPlanStudentList").cmsXDataTable("load", $.getDataGridParams("dgAdultSpecialtyPlanStudentList"));
  59. }
  60. //设置列颜色为红色
  61. function SetRedColumn(index, row, value) {
  62. return " <span style=\"color: red;\">" + value + "</span>";
  63. }
  64. //Excel导出
  65. function SpecialtyPlanStudent_Export() {
  66. $("#formQuery").submit();
  67. }
  68. //联动查询
  69. function queryCollege() {
  70. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  71. if (collegeID != nonSelect) {
  72. var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID + "|@@|'})";
  73. $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  74. }
  75. else {
  76. $("#ClassmajorDropdown").combogridX("reload");
  77. }
  78. reload();
  79. }
  80. </script>
  81. }
  82. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  83. <form id="formQuery" method="post" action="@Url.Content("~/AdultSpecialtyPlan/PlanStudentListExcel?specialtyPlanID=" + specialtyPlanID)">
  84. @Html.PositionCondition("AdultSpecialtyPlanStudent")
  85. <div class="search_keyword">
  86. <div class="search_input">
  87. <ul>
  88. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("College"):</li>
  89. <li class="sv">
  90. @Html.ComboGrid(cgopCollege, new Dictionary<string, string> { { "data-condition", "dgAdultSpecialtyPlanStudentList" } })
  91. </li>
  92. <li class="sn" style="padding-left: 5px;">班级名称:</li>
  93. <li class="sv">
  94. @Html.ComboGrid(cgopClassmajor, new Dictionary<string, string> { { "data-condition", "dgAdultSpecialtyPlanStudentList" } })
  95. </li>
  96. <li class="sn" style="padding-left: 5px;color:red;">在校状态:</li>
  97. <li class="sv">
  98. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_INOrOutSchoolStatus, new DropdownListOptions
  99. {
  100. ID = "DictionaryInschoolStatus",
  101. Name = "DictionaryInschoolStatus",
  102. BindType = DropdownListBindType.SelectAll,
  103. //SelectedValue = (int)EMIS.ViewModel.CF_INOrOutSchoolStatus.Yes,
  104. OnSelect = "reload"
  105. }, new Dictionary<string, string> { { "data-condition", "dgAdultSpecialtyPlanStudentList" } })
  106. </li>
  107. </ul>
  108. </div>
  109. </div>
  110. <div class="p_title">
  111. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  112. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("PlanStudent")</div>
  113. </div>
  114. </form>
  115. <div class="search_list">
  116. @Html.DataGrid(new DataGridOptions
  117. {
  118. Columns = new List<DataGridColumn>()
  119. {
  120. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID" },
  121. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.08 },
  122. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  123. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, OrderFieldName="Sex", Width=0.02 },
  124. new BoundFieldColumn { FieldName="SchoolyearID", HeaderText="年级", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" },
  125. //new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1, OverflowLength=8 },
  126. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.1 },
  127. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.04, OverflowLength=5 },
  128. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, OrderFieldName="InSchoolStatusID", Width=0.04, CustomFormatFun="SetRedColumn" },
  129. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, OrderFieldName="StudentStatus", Width=0.04 }
  130. },
  131. IsPostBack = true,
  132. IsCheckOnSelect = true,
  133. DataSourceUrl = Url.Content("~/AdultSpecialtyPlan/PlanStudentList?specialtyPlanID=" + specialtyPlanID),
  134. ID = "dgAdultSpecialtyPlanStudentList",
  135. IsPagination = true,
  136. IsShowRowNumbers = true,
  137. IsSingleSelect = false
  138. })
  139. </div>
  140. </div>