RebutSubmit.cshtml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. @model EMIS.ViewModel.ScoreManage.ScoreEditView
  2. @using Bowin.Web.Controls.Mvc;
  3. @using EMIS.Entities;
  4. @using EMIS.Web.Controls;
  5. @using EMIS.Web.Controls.Score;
  6. @{
  7. ViewBag.Title = "成绩录入信息";
  8. }
  9. @section scripts{
  10. <script type="text/javascript">
  11. function LoginIDColor(index, row, value) {
  12. if (row.IsDifferentDynamic == true) {
  13. return " <span style=\"color:red;\">" + value + "</span>";
  14. }
  15. else {
  16. return value
  17. }
  18. }
  19. function UserNameColor(index, row, value) {
  20. if (row.IsDifferentDynamic == true) {
  21. return " <span style=\"color:red;\">" + value + "</span>";
  22. }
  23. else {
  24. return value
  25. }
  26. }
  27. function ExamsCategoryNameColor(index, row, value) {
  28. if (row.IsDifferentDynamic == true) {
  29. return " <span style=\"color:red;\">" + value + "</span>";
  30. }
  31. else {
  32. return value
  33. }
  34. }
  35. function TotalScoreColor(index, row, value) {
  36. if (row.IsDifferentDynamic == true) {
  37. return " <span style=\"color:red;\">" + value + "</span>";
  38. }
  39. else {
  40. return value
  41. }
  42. }
  43. function CreditColor(index, row, value) {
  44. if (row.IsDifferentDynamic == true) {
  45. return " <span style=\"color:red;\">" + value + "</span>";
  46. }
  47. else {
  48. return value
  49. }
  50. }
  51. function GradePointColor(index, row, value) {
  52. if (row.IsDifferentDynamic == true) {
  53. return " <span style=\"color:red;\">" + value + "</span>";
  54. }
  55. else {
  56. return value
  57. }
  58. }
  59. $.parser.onComplete = function () {
  60. var tableContainer = $("#dgScoreDetailList").find(".xDataTable").parent();
  61. var maxHeight = parseInt(tableContainer.css("maxHeight").replace("px", ""));
  62. tableContainer.css("maxHeight", maxHeight - $("#Comment").parent().outerHeight() - 20 + "px");
  63. };
  64. //获取选中的数据
  65. function validChoose() {
  66. var d = [];
  67. $.each($("#dgScoreDetailList").cmsXDataTable("getSelections"), function (index) {
  68. d.push(this.UserID);
  69. });
  70. return d;
  71. }
  72. function Score_Save() {
  73. mnu = $.SystemGeneral.getUrlParam("MNU");
  74. var d = validChoose();
  75. if (d.length == 0) {
  76. $.messager.alert("系统提示", "请选择您要重新录入成绩的学生名单。");
  77. return;
  78. }
  79. // $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ScoreAudit/Rebut', { UserID: d.join(","), finalExaminationID: "@ViewBag.FinalExaminationID" }, function (data) {
  80. // if (data.IsSuccess) {
  81. // $("#UserID").val(d);
  82. // $(document.forms[0]).submit();
  83. // } else {
  84. // $.messager.alert("系统提示", data.Message);
  85. // }
  86. // });
  87. $("#UserID").val(d);
  88. $(document.forms[0]).submit();
  89. }
  90. </script>
  91. }
  92. @using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  93. {
  94. <div class="p_title">
  95. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  96. 成绩录入信息</div>
  97. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Rebut")</div>
  98. </div>
  99. <div class="search_list">
  100. @Html.HiddenFor(x => x.FinalExaminationID)
  101. @Html.HiddenFor(x => x.UserID)
  102. <table cellpadding="0" cellspacing="0" id="buildingstable">
  103. <tr>
  104. <td>@Html.LabelFor(x => x.SchoolyearID):
  105. </td>
  106. <td>@Html.TextBoxFor(x => x.SchoolyearCode, new TextBoxOptions { IsEnabled = false })
  107. </td>
  108. <td>@Html.LabelFor(x => x.CourseName):
  109. </td>
  110. <td>@Html.TextBoxFor(x => x.CourseName, new TextBoxOptions { IsEnabled = false })
  111. </td>
  112. </tr>
  113. <tr>
  114. <td colspan="4" style="text-align: left; font-weight: bold; font-size: 14px; height: 25px;">
  115. <label>
  116. 成绩公式设置</label>
  117. </td>
  118. </tr>
  119. <tr>
  120. <td colspan="4">
  121. <table cellpadding="0" cellspacing="1" style="width: 100%;">
  122. <tr>
  123. <td style="width: 23%; text-align:center; font-weight:bold; height:20px;"><label>考试性质</label></td>
  124. <td style="width: 29%; text-align:center; font-weight:bold; height:20px;"><label>总成绩公式</label></td>
  125. <td style="width: 29%; text-align:center; font-weight:bold; height:20px;"><label>学分公式</label></td>
  126. <td style="width: 29%; text-align:center; font-weight:bold; height:20px;"><label>绩点公式</label></td>
  127. </tr>
  128. <tr>
  129. <td style=" text-align:center;">@Model.ExamsCategoryName</td>
  130. <td style="text-align:left;">@Html.ScoreFormularListFor(x => x.ScoreFormulaID, x => x.IsTotalFormula, new DropdownListOptions { Width = 230 })</td>
  131. <td style="text-align:left;">@Html.CreditFormularListFor(x => x.CreditFormulaID, x => x.IsCreditFormula, new DropdownListOptions { Width = 230 })</td>
  132. <td style="text-align:left;">@Html.GradePointFormularListFor(x => x.GradePointFormulaID, x => x.IsGradePointFormula, new DropdownListOptions { Width = 230 })</td>
  133. </tr>
  134. </table>
  135. </td>
  136. </tr>
  137. <tr>
  138. <td colspan="4">
  139. @Html.ScoreEditGrid("dgScoreDetailList", false, true, Model.FinalExaminationID.Value)
  140. </td>
  141. </tr>
  142. <tr>
  143. <td>
  144. <label>
  145. 总评语:</label>
  146. </td>
  147. <td colspan="3">@Html.TextAreaFor(x => x.Comment, new Dictionary<string, object> { { "style", "width:90%; height:12px;" } })
  148. </td>
  149. </tr>
  150. </table>
  151. </div>
  152. }