StudentChargeList.cshtml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "StudentChargeList";
  5. Guid? graduationApplyID = new Guid(Request["graduationApplyID"]);
  6. //收费项目
  7. ComboGridOptions cgopChargeProject = new ComboGridOptions
  8. {
  9. TextField = "ChrageProjectName",
  10. ValueField = "ChargeProjectID",
  11. ID = "ChargeProjectComboGrid",
  12. Name = "ChargeProjectComboGrid",
  13. OnSelect = "reload",
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. new BoundFieldColumn { FieldName="ChrageProjectName", HeaderText="收费项目", Align=AlignStyle.Center }
  19. },
  20. IsCheckOnSelect = true,
  21. DataSourceUrl = Url.Content("~/ChargeProject/List"),
  22. IsPagination = true,
  23. IsShowRowNumbers = true,
  24. IsSingleSelect = false
  25. }
  26. };
  27. }
  28. @section scripts{
  29. <script type="text/javascript">
  30. var nonSelect = "@DropdownList.SELECT_ALL";
  31. //欠费
  32. var isArrear = "@((int)EMIS.ViewModel.CF_GeneralPurpose.IsYes)";
  33. //刷新
  34. function reload() {
  35. $("#dgStudentChargeList").cmsXDataTable("load", $.getDataGridParams("dgStudentChargeList"));
  36. }
  37. //设置列颜色为红色
  38. function SetRedColumn(index, row, value) {
  39. return " <span style=\"color: red;\">" + value + "</span>";
  40. }
  41. //设置相应的行颜色为红色
  42. function SetRedGrid(rowIndex, rowData) {
  43. if (rowData.IsArrear == isArrear) {
  44. return "color: red;";
  45. } else {
  46. return "";
  47. }
  48. }
  49. //Excel导出
  50. function StudentChargeListExcel() {
  51. $("#formQuery").submit();
  52. }
  53. </script>
  54. }
  55. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  56. <form id="formQuery" method="post" action="@Url.Content("~/GraduationApply/StudentChargeListExcel?graduationApplyID=" + graduationApplyID)">
  57. @Html.PositionCondition("StudentChargeGraduationApply")
  58. <div class="search_keyword">
  59. <div class="search_input">
  60. <ul>
  61. <li class="sn" style="padding-left: 5px;">缴费学年:</li>
  62. <li class="sv">
  63. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_Grade, new DropdownListOptions
  64. {
  65. ID = "DictionaryChargeYear",
  66. Name = "DictionaryChargeYear",
  67. BindType = DropdownListBindType.SelectAll,
  68. OnSelect = "reload"
  69. }, new Dictionary<string, string> { { "data-condition", "dgStudentChargeList" } })
  70. </li>
  71. <li class="sn" style="padding-left: 5px;">收费项目:</li>
  72. <li class="sv">
  73. @Html.ComboGrid(cgopChargeProject, new Dictionary<string, string> { { "data-condition", "dgStudentChargeList" } })
  74. </li>
  75. <li class="sn" style="padding-left: 5px;">缴费标记:</li>
  76. <li class="sv">
  77. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.EC_ChargeTag, new DropdownListOptions
  78. {
  79. ID = "DictionaryChargeTag",
  80. Name = "DictionaryChargeTag",
  81. BindType = DropdownListBindType.SelectAll,
  82. OnSelect = "reload"
  83. }, new Dictionary<string, string> { { "data-condition", "dgStudentChargeList" } })
  84. </li>
  85. <li class="sn" style="padding-left: 5px; color: red; width: 85px;">欠费状态:</li>
  86. <li class="sv">
  87. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions
  88. {
  89. ID = "DictionaryIsArrear",
  90. Name = "DictionaryIsArrear",
  91. BindType = DropdownListBindType.SelectAll,
  92. //SelectedValue = (int)EMIS.ViewModel.CF_GeneralPurpose.IsYes,
  93. OnSelect = "reload"
  94. }, new Dictionary<string, string> { { "data-condition", "dgStudentChargeList" } })
  95. </li>
  96. </ul>
  97. </div>
  98. </div>
  99. <div class="p_title">
  100. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  101. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("SCDetail")</div>
  102. </div>
  103. </form>
  104. <div class="search_list">
  105. @Html.DataGrid(new DataGridOptions
  106. {
  107. Columns = new List<DataGridColumn>()
  108. {
  109. new CheckBoxFieldColumn{ HeaderText="", FieldName="StudentChargeID" },
  110. new BoundFieldColumn { FieldName="StudentNo", HeaderText="学号", Align=AlignStyle.Center, Width=0.1 },
  111. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  112. new BoundFieldColumn { FieldName="ClassName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.1 },
  113. //new BoundFieldColumn { FieldName="GradeMajoyStr", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1 },
  114. new BoundFieldColumn { FieldName="ChargeYear", HeaderText="缴费学年", OrderFieldName="ChargeYear", Align=AlignStyle.Center, Width=0.04 },
  115. new BoundFieldColumn { FieldName="ChargeProjectStr", HeaderText="收费项目", Align=AlignStyle.Center, Width=0.04 },
  116. new BoundFieldColumn { FieldName="Amount", HeaderText="应收金额", Align=AlignStyle.Center, Width=0.04 },
  117. new BoundFieldColumn { FieldName="ChargeAmount", HeaderText="调整金额", Align=AlignStyle.Center, Width=0.04 },
  118. new BoundFieldColumn { FieldName="ActualAmount", HeaderText="实收金额", Align=AlignStyle.Center, Width=0.04 },
  119. new BoundFieldColumn { FieldName="ChargeTagName", HeaderText="缴费标记", Align=AlignStyle.Center, Width=0.04 },
  120. new BoundFieldColumn { FieldName="PaidAmount", HeaderText="已缴金额", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  121. new BoundFieldColumn { FieldName="IsArrearName", HeaderText="欠费状态", OrderFieldName="IsArrear", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" }
  122. //new BoundFieldColumn { FieldName="IsDreamProject", HeaderText="是否圆梦计划", OrderFieldName="IsDream", Align=AlignStyle.Center, Width=0.06 },
  123. //new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", OrderFieldName="InSchoolStatusID", Align=AlignStyle.Center, Width=0.05 },
  124. //new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width =0.03 }
  125. },
  126. CustomerRowStyleFun = "SetRedGrid",
  127. IsPostBack = true,
  128. IsCheckOnSelect = true,
  129. DataSourceUrl = Url.Content("~/GraduationApply/StudentChargeList?graduationApplyID=" + graduationApplyID),
  130. ID = "dgStudentChargeList",
  131. IsPagination = true,
  132. IsShowRowNumbers = true,
  133. IsSingleSelect = false
  134. })
  135. </div>
  136. </div>