PlanRangeList.cshtml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "PlanRangeList";
  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 cgopGrademajor = new ComboGridOptions
  31. {
  32. TextField = "Name",
  33. ValueField = "GrademajorID",
  34. Name = "GrademajorDropdown",
  35. ID = "GrademajorDropdown",
  36. OnSelect = "reload",
  37. GridOptions = new DataGridOptions
  38. {
  39. Columns = new List<DataGridColumn>()
  40. {
  41. //new LinkButtonColumn { FieldName="Code", HeaderText="年级专业代码", Align=AlignStyle.Center, Width=0.1 },
  42. new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.3 }
  43. },
  44. PageSize = 5,
  45. IsCheckOnSelect = true,
  46. DataSourceUrl = Url.Content("~/Grademajor/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. $("#dgAdultSpecialtyPlanRangeList").cmsXDataTable("load", $.getDataGridParams("dgAdultSpecialtyPlanRangeList"));
  59. }
  60. //设置列颜色为红色
  61. function SetRedColumn(index, row, value) {
  62. return " <span style=\"color: red;\">" + value + "</span>";
  63. }
  64. //Excel导出
  65. function SpecialtyPlanRange_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. $("#GrademajorDropdown").combogridX("reload", eval(jsonString));
  74. }
  75. else {
  76. $("#GrademajorDropdown").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/PlanRangeListExcel?specialtyPlanID=" + specialtyPlanID)">
  84. @Html.PositionCondition("AdultSpecialtyPlanRange")
  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", "dgAdultSpecialtyPlanRangeList" } })
  91. </li>
  92. <li class="sn" style="padding-left: 5px;">年级专业:</li>
  93. <li class="sv">
  94. @Html.ComboGrid(cgopGrademajor, new Dictionary<string, string> { { "data-condition", "dgAdultSpecialtyPlanRangeList" } })
  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", "dgAdultSpecialtyPlanRangeList" } })
  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("PlanRange")</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="GrademajorID" },
  121. new BoundFieldColumn { FieldName="Code", HeaderText="年级专业编号", Align=AlignStyle.Center, Width=0.1 },
  122. new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1 },
  123. new BoundFieldColumn { FieldName="SchoolyearID", HeaderText="年级", Align=AlignStyle.Center, Width=0.03 },
  124. new BoundFieldColumn { FieldName="SchoolcodeName", HeaderText="入学学期", Align=AlignStyle.Center, OrderFieldName="SchoolcodeID", Width=0.04 },
  125. new BoundFieldColumn { FieldName="GraduatingSemesterCode", HeaderText="毕业学期", Align=AlignStyle.Center, Width=0.08 },
  126. new BoundFieldColumn { FieldName="Professional", HeaderText="专业方向", Align=AlignStyle.Center, Width=0.04, OverflowLength=5 },
  127. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.04, OverflowLength=5, CustomFormatFun="SetRedColumn" },
  128. new BoundFieldColumn { FieldName="ClassmajorCount", HeaderText="班级数", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  129. new BoundFieldColumn { FieldName="StudentCount", HeaderText="人数", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" }
  130. },
  131. IsPostBack = true,
  132. IsCheckOnSelect = true,
  133. DataSourceUrl = Url.Content("~/AdultSpecialtyPlan/PlanRangeList?specialtyPlanID=" + specialtyPlanID),
  134. ID = "dgAdultSpecialtyPlanRangeList",
  135. IsPagination = true,
  136. IsShowRowNumbers = true,
  137. IsSingleSelect = false
  138. })
  139. </div>
  140. </div>