FinallyScoreList.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "FinallyScoreList";
  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. $("#dgGraduationFinallyScoreList").cmsXDataTable("load", $.getDataGridParams("dgGraduationFinallyScoreList"));
  15. }
  16. //设置列颜色为红色
  17. function SetRedColumn(index, row, value) {
  18. return " <span style=\"color: red;\">" + value + "</span>";
  19. }
  20. //设置相应的行颜色为红色
  21. function SetRedGrid(rowIndex, rowData) {
  22. var setValue = "background-color:" + rowData.CourseTypeColour + ";";
  23. if (rowData.ExecutablePlanStatus == notSubmited || rowData.ExecutablePlanStatus == null
  24. || rowData.IsExecutablePlan == false || rowData.TotalScore <= 0) {
  25. return setValue + "color: red;";
  26. }
  27. else {
  28. return setValue;
  29. }
  30. }
  31. //Excel导出
  32. function FinallyScoreListExcel() {
  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("~/GraduationApprove/FinallyScoreListExcel?graduationApplyID=" + graduationApplyID)">
  39. @Html.PositionCondition("GraduationFinallyScoreSelect")
  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", "dgGraduationFinallyScoreList" } })
  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", "dgGraduationFinallyScoreList" } })
  63. </li>
  64. <li class="sn" style="padding-left: 5px;color:red;">选修类别:</li>
  65. <li class="sv">
  66. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_CourseSelectType, DropdownListBindType.SelectAll,
  67. new ComboGridOptions
  68. {
  69. ID = "DictionaryCourseSelectType",
  70. Name = "DictionaryCourseSelectType",
  71. OnSelect = "reload"
  72. }, new Dictionary<string, string> { { "data-condition", "dgGraduationFinallyScoreList" } })
  73. </li>
  74. <li class="sn" style="padding-left: 5px;">考试性质:</li>
  75. <li class="sv">
  76. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_ExamsCategory, DropdownListBindType.SelectAll,
  77. new ComboGridOptions
  78. {
  79. ID = "DictionaryExamsCategory",
  80. Name = "DictionaryExamsCategory",
  81. OnSelect = "reload"
  82. }, new Dictionary<string, string> { { "data-condition", "dgGraduationFinallyScoreList" } })
  83. </li>
  84. </ul>
  85. <ul>
  86. <li class="sn" style="padding-left: 5px;">开课学期:</li>
  87. <li class="sv">
  88. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Startterm, DropdownListBindType.SelectAll,
  89. new ComboGridOptions
  90. {
  91. ID = "DictionaryStartterm",
  92. Name = "DictionaryStartterm",
  93. OnSelect = "reload"
  94. }, new Dictionary<string, string> { { "data-condition", "dgGraduationFinallyScoreList" } })
  95. </li>
  96. <li class="sn" style="padding-left: 5px;color:red;">学位课程:</li>
  97. <li class="sv">
  98. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions()
  99. {
  100. BindType = DropdownListBindType.SelectAll,
  101. ID = "DictionaryIsMainCourse",
  102. Name = "DictionaryIsMainCourse",
  103. //SelectedValue = (int)EMIS.ViewModel.CF_GeneralPurpose.IsYes,
  104. OnSelect = "reload"
  105. }, new Dictionary<string, string> { { "data-condition", "dgGraduationFinallyScoreList" } })
  106. </li>
  107. <li class="sn" style="padding-left: 5px;color:red;">处理方式:</li>
  108. <li class="sv">
  109. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_HandleMode, new DropdownListOptions()
  110. {
  111. BindType = DropdownListBindType.SelectAll,
  112. ID = "DictionaryHandleMode",
  113. Name = "DictionaryHandleMode",
  114. //SelectedValue = (int)EMIS.ViewModel.CF_HandleMode.RequiredCourse,
  115. OnSelect = "reload"
  116. }, new Dictionary<string, string> { { "data-condition", "dgGraduationFinallyScoreList" } })
  117. </li>
  118. <li class="sn" style="padding-left: 5px;color:red;">是否计划:</li>
  119. <li class="sv">
  120. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, DropdownListBindType.SelectAll,
  121. new ComboGridOptions
  122. {
  123. ID = "DictionaryIsExecutablePlan",
  124. Name = "DictionaryIsExecutablePlan",
  125. OnSelect = "reload"
  126. }, new Dictionary<string, string> { { "data-condition", "dgGraduationFinallyScoreList" } })
  127. </li>
  128. <li class="sn" style="padding-left: 5px;color:red;">计划状态:</li>
  129. <li class="sv">
  130. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.EM_ExecuteStatus, new DropdownListOptions()
  131. {
  132. ID = "DictionaryExecutablePlanStatus",
  133. Name = "DictionaryExecutablePlanStatus",
  134. BindType = DropdownListBindType.SelectAll,
  135. //SelectedValue = (int)EMIS.ViewModel.EM_ExecuteStatus.Submited,
  136. OnSelect = "reload"
  137. }, new Dictionary<string, string> { { "data-condition", "dgGraduationFinallyScoreList" } })
  138. </li>
  139. </ul>
  140. </div>
  141. </div>
  142. <div class="p_title">
  143. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  144. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("ScoreDetail")</div>
  145. </div>
  146. </form>
  147. <div class="search_list">
  148. @Html.DataGrid(new DataGridOptions
  149. {
  150. Columns = new List<DataGridColumn>()
  151. {
  152. new CheckBoxFieldColumn{ HeaderText="", FieldName="FinallyScoreID" },
  153. new BoundFieldColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Align=AlignStyle.Center, Width=0.08 },
  154. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.1 },
  155. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  156. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.06 },
  157. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.1, OverflowLength=12 },
  158. new BoundFieldColumn { FieldName="CourseTypeName", HeaderText="课程类型", OrderFieldName="CourseTypeID", Align=AlignStyle.Center, Width=0.05 },
  159. new BoundFieldColumn { FieldName="Credit", HeaderText="课程学分", Align=AlignStyle.Center, Width=0.04 },
  160. new BoundFieldColumn { FieldName="IsMainCourseName", HeaderText="学位课程", OrderFieldName="IsMainCourse", Align=AlignStyle.Center, Width=0.04 },
  161. new BoundFieldColumn { FieldName="StarttermName", HeaderText="开课学期", OrderFieldName="StarttermID", Align=AlignStyle. Center, Width=0.04 },
  162. new BoundFieldColumn { FieldName="CourseSelectTypeName", HeaderText="选修类别", OrderFieldName="CourseSelectTypeID", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  163. new BoundFieldColumn { FieldName="IsExecutablePlanName", HeaderText="是否计划", OrderFieldName="IsExecutablePlan", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  164. new BoundFieldColumn { FieldName="ExecutablePlanStatusName", HeaderText="计划状态", OrderFieldName="ExecutablePlanStatus", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  165. //new BoundFieldColumn { FieldName="TotalHours", HeaderText="总学时", Align=AlignStyle.Center, Width=0.03 },
  166. new BoundFieldColumn { FieldName="HandleModeName", HeaderText="处理方式", OrderFieldName="HandleModeID", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  167. new BoundFieldColumn { FieldName="ExamsCategoryName", HeaderText="考试性质", OrderFieldName="ExamsCategoryID", Align=AlignStyle.Center, Width=0.04 },
  168. //new BoundFieldColumn { FieldName="ExamsStateName", HeaderText="考试状态", OrderFieldName="ExamsStateID", Align=AlignStyle. Center, Width=0.04 },
  169. new BoundFieldColumn { FieldName="TotalScore", HeaderText="总成绩", Align=AlignStyle.Center, Width=0.03 },
  170. new BoundFieldColumn { FieldName="ScoreCredit", HeaderText="学分", Align=AlignStyle.Center, Width=0.02 }
  171. //new BoundFieldColumn { FieldName="GradePoint", HeaderText="绩点", Align=AlignStyle.Center, Width=0.02 }
  172. },
  173. CustomerRowStyleFun = "SetRedGrid",
  174. IsPostBack = true,
  175. IsCheckOnSelect = true,
  176. DataSourceUrl = Url.Content("~/GraduationApprove/FinallyScoreList?graduationApplyID=" + graduationApplyID),
  177. ID = "dgGraduationFinallyScoreList",
  178. IsPagination = true,
  179. IsShowRowNumbers = true,
  180. IsSingleSelect = false
  181. })
  182. </div>
  183. </div>