DegreeFinallyScoreList.cshtml 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "DegreeFinallyScoreList";
  5. Guid? degreeApplyID = new Guid(Request["degreeApplyID"]);
  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. $("#dgDegreeFinallyScoreList").cmsXDataTable("load", $.getDataGridParams("dgDegreeFinallyScoreList"));
  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.ExecutablePlanStatus == notSubmited) {
  23. return "color: red;";
  24. }
  25. else if (rowData.TotalScore <= 0) {
  26. return "color: red;";
  27. } else {
  28. return "";
  29. }
  30. }
  31. //Excel导出
  32. function DegreeFinallyScoreListExcel() {
  33. $("#formQuery").submit();
  34. }
  35. </script>
  36. }
  37. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  38. <form id="formQuery" method="post" action="@Url.Content("~/DegreeApply/DegreeFinallyScoreListExcel?degreeApplyID=" + degreeApplyID)">
  39. @Html.PositionCondition("DegreeFinallyScoreSelect")
  40. <div class="search_keyword">
  41. <div class="search_input">
  42. <ul>
  43. <li class="sn" style="padding-left: 5px;">学年学期:</li>
  44. <li class="sv">
  45. @Html.DropdownList(new DropdownListOptions
  46. {
  47. ID = "SchoolyearDropdown",
  48. Name = "SchoolyearDropdown",
  49. BindType = DropdownListBindType.SelectAll,
  50. ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid"),
  51. OnSelect = "reload"
  52. }, new Dictionary<string, string> { { "data-condition", "dgDegreeFinallyScoreList" } })
  53. </li>
  54. <li class="sn" style="padding-left: 5px;">课程类型:</li>
  55. <li class="sv">
  56. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_CourseType, DropdownListBindType.SelectAll,
  57. new ComboGridOptions
  58. {
  59. ID = "DictionaryCourseType",
  60. Name = "DictionaryCourseType",
  61. OnSelect = "reload"
  62. }, new Dictionary<string, string> { { "data-condition", "dgDegreeFinallyScoreList" } })
  63. </li>
  64. <li class="sn" style="padding-left: 5px;">考试性质:</li>
  65. <li class="sv">
  66. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_ExamsCategory, DropdownListBindType.SelectAll,
  67. new ComboGridOptions
  68. {
  69. ID = "DictionaryExamsCategory",
  70. Name = "DictionaryExamsCategory",
  71. OnSelect = "reload"
  72. }, new Dictionary<string, string> { { "data-condition", "dgDegreeFinallyScoreList" } })
  73. </li>
  74. </ul>
  75. <ul>
  76. <li class="sn" style="padding-left: 5px;">开课学期:</li>
  77. <li class="sv">
  78. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Startterm, DropdownListBindType.SelectAll,
  79. new ComboGridOptions
  80. {
  81. ID = "DictionaryStartterm",
  82. Name = "DictionaryStartterm",
  83. OnSelect = "reload"
  84. }, new Dictionary<string, string> { { "data-condition", "dgDegreeFinallyScoreList" } })
  85. </li>
  86. <li class="sn" style="padding-left: 5px;color:red;">学位课程:</li>
  87. <li class="sv">
  88. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions()
  89. {
  90. BindType = DropdownListBindType.SelectAll,
  91. ID = "DictionaryIsMainCourse",
  92. Name = "DictionaryIsMainCourse",
  93. SelectedValue = (int)EMIS.ViewModel.CF_GeneralPurpose.IsYes,
  94. OnSelect = "reload"
  95. }, new Dictionary<string, string> { { "data-condition", "dgDegreeFinallyScoreList" } })
  96. </li>
  97. <li class="sn" style="padding-left: 5px;color:red;">处理方式:</li>
  98. <li class="sv">
  99. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_HandleMode, new DropdownListOptions()
  100. {
  101. BindType = DropdownListBindType.SelectAll,
  102. ID = "DictionaryHandleMode",
  103. Name = "DictionaryHandleMode",
  104. //SelectedValue = (int)EMIS.ViewModel.CF_HandleMode.RequiredCourse,
  105. OnSelect = "reload"
  106. }, new Dictionary<string, string> { { "data-condition", "dgDegreeFinallyScoreList" } })
  107. </li>
  108. <li class="sn" style="padding-left: 5px;color:red;">计划状态:</li>
  109. <li class="sv">
  110. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.EM_ExecuteStatus, new DropdownListOptions()
  111. {
  112. ID = "DictionaryExecutablePlanStatus",
  113. Name = "DictionaryExecutablePlanStatus",
  114. BindType = DropdownListBindType.SelectAll,
  115. //SelectedValue = (int)EMIS.ViewModel.EM_ExecuteStatus.Submited,
  116. OnSelect = "reload"
  117. }, new Dictionary<string, string> { { "data-condition", "dgDegreeFinallyScoreList" } })
  118. </li>
  119. </ul>
  120. </div>
  121. </div>
  122. <div class="p_title">
  123. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  124. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("ScoreDetail")</div>
  125. </div>
  126. </form>
  127. <div class="search_list">
  128. @Html.DataGrid(new DataGridOptions
  129. {
  130. Columns = new List<DataGridColumn>()
  131. {
  132. new CheckBoxFieldColumn{ HeaderText="", FieldName="ExecutablePlanID" },
  133. new BoundFieldColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Align=AlignStyle.Center, Width=0.08 },
  134. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.1 },
  135. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  136. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.06 },
  137. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.1, OverflowLength=12 },
  138. new BoundFieldColumn { FieldName="CourseTypeName", HeaderText="课程类型", OrderFieldName="CourseTypeID", Align=AlignStyle.Center, Width=0.05 },
  139. new BoundFieldColumn { FieldName="Credit", HeaderText="课程学分", Align=AlignStyle.Center, Width=0.04 },
  140. new BoundFieldColumn { FieldName="IsMainCourseName", HeaderText="学位课程", OrderFieldName="IsMainCourse", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  141. new BoundFieldColumn { FieldName="StarttermName", HeaderText="开课学期", OrderFieldName="StarttermID", Align=AlignStyle. Center, Width=0.04 },
  142. new BoundFieldColumn { FieldName="ExecutablePlanStatusName", HeaderText="计划状态", OrderFieldName="ExecutablePlanStatus", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  143. new BoundFieldColumn { FieldName="Totalhours", HeaderText="总学时", Align=AlignStyle.Center, Width=0.03 },
  144. new BoundFieldColumn { FieldName="HandleModeName", HeaderText="处理方式", OrderFieldName="HandleModeID", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  145. new BoundFieldColumn { FieldName="ExamsCategoryName", HeaderText="考试性质", OrderFieldName="ExamsCategoryID", Align=AlignStyle.Center, Width=0.04 },
  146. new BoundFieldColumn { FieldName="ExamsStateName", HeaderText="考试状态", OrderFieldName="ExamsStateID", Align=AlignStyle. Center, Width=0.04 },
  147. new BoundFieldColumn { FieldName="TotalScore", HeaderText="总成绩", Align=AlignStyle.Center, Width=0.03 },
  148. new BoundFieldColumn { FieldName="ScoreCredit", HeaderText="学分", Align=AlignStyle.Center, Width=0.02 },
  149. new BoundFieldColumn { FieldName="GradePoint", HeaderText="绩点", Align=AlignStyle.Center, Width=0.02 }
  150. },
  151. CustomerRowStyleFun = "SetRedGrid",
  152. IsPostBack = true,
  153. IsCheckOnSelect = true,
  154. DataSourceUrl = Url.Content("~/DegreeApply/DegreeFinallyScoreList?degreeApplyID=" + degreeApplyID),
  155. ID = "dgDegreeFinallyScoreList",
  156. IsPagination = true,
  157. IsShowRowNumbers = true,
  158. IsSingleSelect = false
  159. })
  160. </div>
  161. </div>