ExecutablePlanList.cshtml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "ExecutablePlanList";
  5. Guid? graduationApplyID = new Guid(Request["graduationApplyID"]);
  6. }
  7. @section scripts{
  8. <script type="text/javascript">
  9. var nonSelect = "@DropdownList.SELECT_ALL";
  10. //未提交
  11. var notSubmited = "@((int)EMIS.ViewModel.EM_ExecuteStatus.NotSubmited)";
  12. //刷新
  13. function reload() {
  14. $("#dgExecutablePlanList").cmsXDataTable("load", $.getDataGridParams("dgExecutablePlanList"));
  15. }
  16. //设置列颜色为红色
  17. function SetRedColumn(index, row, value) {
  18. return " <span style=\"color: red;\">" + value + "</span>";
  19. }
  20. //设置相应的行颜色为红色
  21. function SetRedGrid(rowIndex, rowData) {
  22. if (rowData.RecordStatus == notSubmited) {
  23. return "color: red;";
  24. } else {
  25. return "";
  26. }
  27. }
  28. //Excel导出
  29. function ExecutablePlanListExcel() {
  30. $("#formQuery").submit();
  31. }
  32. </script>
  33. }
  34. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  35. <form id="formQuery" method="post" action="@Url.Content("~/GraduationApply/ExecutablePlanListExcel?graduationApplyID=" + graduationApplyID)">
  36. @Html.PositionCondition("ExecutablePlanGraduationApply")
  37. <div class="search_keyword">
  38. <div class="search_input">
  39. <ul>
  40. <li class="sn" style="padding-left: 5px;">学年学期:</li>
  41. <li class="sv">
  42. @Html.DropdownList(new DropdownListOptions
  43. {
  44. ID = "SchoolyearDropdown",
  45. Name = "SchoolyearDropdown",
  46. BindType = DropdownListBindType.SelectAll,
  47. ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid"),
  48. OnSelect = "reload"
  49. }, new Dictionary<string, string> { { "data-condition", "dgExecutablePlanList" } })
  50. </li>
  51. <li class="sn" style="padding-left: 5px;">课程类型:</li>
  52. <li class="sv">
  53. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_CourseType, DropdownListBindType.SelectAll,
  54. new ComboGridOptions
  55. {
  56. ID = "DictionaryCourseType",
  57. Name = "DictionaryCourseType",
  58. OnSelect = "reload"
  59. }, new Dictionary<string, string> { { "data-condition", "dgExecutablePlanList" } })
  60. </li>
  61. <li class="sn" style="padding-left: 5px;">开课学期:</li>
  62. <li class="sv">
  63. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Startterm, DropdownListBindType.SelectAll,
  64. new ComboGridOptions
  65. {
  66. ID = "DictionaryStartterm",
  67. Name = "DictionaryStartterm",
  68. OnSelect = "reload"
  69. }, new Dictionary<string, string> { { "data-condition", "dgExecutablePlanList" } })
  70. </li>
  71. </ul>
  72. <ul>
  73. <li class="sn" style="padding-left: 5px;color:red;">学位课程:</li>
  74. <li class="sv">
  75. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions()
  76. {
  77. ID = "DictionaryIsMainCourse",
  78. Name = "DictionaryIsMainCourse",
  79. BindType = DropdownListBindType.SelectAll,
  80. //SelectedValue = (int)EMIS.ViewModel.CF_GeneralPurpose.IsYes,
  81. OnSelect = "reload"
  82. }, new Dictionary<string, string> { { "data-condition", "dgExecutablePlanList" } })
  83. </li>
  84. <li class="sn" style="padding-left: 5px;color:red;">处理方式:</li>
  85. <li class="sv">
  86. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_HandleMode, new DropdownListOptions()
  87. {
  88. BindType = DropdownListBindType.SelectAll,
  89. ID = "DictionaryHandleMode",
  90. Name = "DictionaryHandleMode",
  91. //SelectedValue = (int)EMIS.ViewModel.CF_HandleMode.RequiredCourse,
  92. OnSelect = "reload"
  93. }, new Dictionary<string, string> { { "data-condition", "dgExecutablePlanList" } })
  94. </li>
  95. <li class="sn" style="padding-left: 5px;color:red;">计划状态:</li>
  96. <li class="sv">
  97. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.EM_ExecuteStatus, new DropdownListOptions()
  98. {
  99. ID = "DictionaryExecutablePlanStatus",
  100. Name = "DictionaryExecutablePlanStatus",
  101. BindType = DropdownListBindType.SelectAll,
  102. SelectedValue = (int)EMIS.ViewModel.EM_ExecuteStatus.Submited,
  103. OnSelect = "reload"
  104. }, new Dictionary<string, string> { { "data-condition", "dgExecutablePlanList" } })
  105. </li>
  106. </ul>
  107. </div>
  108. </div>
  109. <div class="p_title">
  110. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  111. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("EPDetail")</div>
  112. </div>
  113. </form>
  114. <div class="search_list">
  115. @Html.DataGrid(new DataGridOptions
  116. {
  117. Columns = new List<DataGridColumn>()
  118. {
  119. new CheckBoxFieldColumn{ HeaderText="", FieldName="ExecutablePlanID" },
  120. new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  121. new BoundFieldColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Align=AlignStyle.Center, Width=0.08 },
  122. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.06 },
  123. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.1, OverflowLength=10 },
  124. new BoundFieldColumn { FieldName="CourseTypeName", HeaderText="课程类型", Align=AlignStyle.Center, OrderFieldName="CourseTypeID", Width=0.05 },
  125. new BoundFieldColumn { FieldName="Credit", HeaderText="课程学分", Align=AlignStyle.Center, Width=0.04 },
  126. new BoundFieldColumn { FieldName="IsMainCourseName", HeaderText="学位课程", OrderFieldName="IsMainCourse", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  127. new BoundFieldColumn { FieldName="StarttermName", HeaderText="开课学期", OrderFieldName="StarttermID", Align=AlignStyle. Center, Width=0.04 },
  128. new BoundFieldColumn { FieldName="Totalhours", HeaderText="总学时", OrderFieldName="Totalhours", Align=AlignStyle.Center, Width=0.03 },
  129. new BoundFieldColumn { FieldName="HandleModeName", HeaderText="处理方式", OrderFieldName="HandleModeID", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  130. new BoundFieldColumn { FieldName="ExecuteStatusName", HeaderText="计划状态", OrderFieldName="ExecuteStatus", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  131. new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.03, OverflowLength=3 }
  132. },
  133. CustomerRowStyleFun = "SetRedGrid",
  134. IsPostBack = true,
  135. IsCheckOnSelect = true,
  136. DataSourceUrl = Url.Content("~/GraduationApply/ExecutablePlanList?graduationApplyID=" + graduationApplyID),
  137. ID = "dgExecutablePlanList",
  138. IsPagination = true,
  139. IsShowRowNumbers = true,
  140. IsSingleSelect = false
  141. })
  142. </div>
  143. </div>