Edit.cshtml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. @model EMIS.ViewModel.EvaluationManage.EvaluationTable.EvaluationProjectView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var isEnable = Request["type"] == "detail" ? false : true;
  7. //参评类型
  8. ComboGridOptions cgopEvaluationParticipateType = new ComboGridOptions
  9. {
  10. TextField = "ParticipateTypeName",
  11. ValueField = "EvaluationParticipateTypeID",
  12. OnSelect = "queryEvaluationParticipateType",
  13. IsEnabled = isEnable,
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. new BoundFieldColumn { FieldName="ParticipateTypeName", HeaderText="参评类型", Align=AlignStyle.Center, Width=0.1, OrderFieldName="ParticipateTypeID" },
  19. new BoundFieldColumn { FieldName="IsStudentName", HeaderText="学生用", Align=AlignStyle.Center, Width=0.08, OrderFieldName="IsStudent", CustomFormatFun="SetRedColumn"}
  20. },
  21. PageSize = 5,
  22. IsCheckOnSelect = true,
  23. DataSourceUrl = Url.Content("~/EvaluationParticipateType/List"),
  24. IsPagination = true,
  25. IsShowRowNumbers = true,
  26. IsSingleSelect = false
  27. }
  28. };
  29. //评价表名
  30. ComboGridOptions cgopEvaluationTable = new ComboGridOptions
  31. {
  32. TextField = "Name",
  33. ValueField = "EvaluationTableID",
  34. OnSelect = "queryEvaluationTable",
  35. IsEnabled = isEnable,
  36. GridOptions = new DataGridOptions
  37. {
  38. Columns = new List<DataGridColumn>()
  39. {
  40. new BoundFieldColumn { FieldName="Code", HeaderText="编号", Align=AlignStyle.Center, Width=0.1 },
  41. new BoundFieldColumn { FieldName="Name", HeaderText="评价表名", Align=AlignStyle.Center, Width=0.25 },
  42. //new BoundFieldColumn { FieldName="ParticipateTypeName", HeaderText="参评类型", Align=AlignStyle.Center, Width=0.12, OrderFieldName="ParticipateTypeID" },
  43. //new BoundFieldColumn { FieldName="IsStudentName", HeaderText="学生用", Align=AlignStyle.Center, Width=0.1, OrderFieldName="IsStudent", CustomFormatFun="SetRedColumn" },
  44. new BoundFieldColumn { FieldName="EvaluationTypeName", HeaderText="评价类型", Align=AlignStyle.Center, Width=0.1 },
  45. new BoundFieldColumn { FieldName="IsEnabledName", HeaderText="是否启用", Align=AlignStyle.Center, Width=0.1, OrderFieldName="IsEnabled", CustomFormatFun="SetRedColumn" }
  46. },
  47. PageSize = 5,
  48. IsCheckOnSelect = true,
  49. DataSourceUrl = Url.Content("~/EvaluationTable/GetEvaluationTableEnabledAndUseList?evaluationTableID=" + Model.EvaluationTableID),
  50. IsPagination = true,
  51. IsShowRowNumbers = true,
  52. IsSingleSelect = false
  53. }
  54. };
  55. //评价指标
  56. ComboGridOptions cgopEvaluationTarget = new ComboGridOptions
  57. {
  58. TextField = "Name",
  59. ValueField = "EvaluationTargetID",
  60. OnSelect = "queryEvaluationTarget",
  61. IsEnabled = isEnable,
  62. GridOptions = new DataGridOptions
  63. {
  64. Columns = new List<DataGridColumn>()
  65. {
  66. new BoundFieldColumn { FieldName="Code", HeaderText="指标编号", Align=AlignStyle.Center, Width=0.08 },
  67. new BoundFieldColumn { FieldName="Name", HeaderText="指标名称", Align=AlignStyle.Center, Width=0.2 },
  68. new BoundFieldColumn { FieldName="EvaluationTableName", HeaderText="评价表名", Align=AlignStyle.Center, Width=0.12 },
  69. new BoundFieldColumn { FieldName="EvaluationTypeName", HeaderText="评价类型", Align=AlignStyle.Center, Width=0.08 },
  70. new BoundFieldColumn { FieldName="EvaluationNormName", HeaderText="评分标准", Align=AlignStyle.Center, Width=0.08 }
  71. },
  72. PageSize = 5,
  73. IsCheckOnSelect = true,
  74. DataSourceUrl = Url.Content("~/EvaluationTarget/List"),
  75. IsPagination = true,
  76. IsShowRowNumbers = true,
  77. IsSingleSelect = false
  78. }
  79. };
  80. }
  81. @section scripts{
  82. <script src="~/Scripts/Business/EvaluationManage/EvaluationTable/EvaluationProjectEdit.js" type="text/javascript"></script>
  83. <script type="text/javascript">
  84. var nonSelect = "@DropdownList.SELECT_ALL";
  85. </script>
  86. }
  87. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  88. @using (Ajax.BeginForm(new AjaxOptions
  89. {
  90. OnSuccess = "EMISFunction.FormSuccess",
  91. OnBegin = "EMISFunction.FormSubmit",
  92. OnComplete = "EMISFunction.FormComplete"
  93. }))
  94. {
  95. <div class="p_title">
  96. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  97. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  98. @if (Request["type"] != "detail")
  99. {
  100. @Html.ContextMenuBar("Edit")
  101. }
  102. </div>
  103. </div>
  104. <div class="search_list">
  105. @Html.HiddenFor(x => x.EvaluationProjectID)
  106. <table cellpadding="0" cellspacing="0" id="evaluationtabletable">
  107. <tr>
  108. <td>
  109. @Html.LabelFor(x => x.OrderNo):
  110. </td>
  111. <td>
  112. @Html.TextBoxFor(x => x.OrderNo, new TextBoxOptions() { IsEnabled = isEnable })
  113. </td>
  114. <td style="color:red;">
  115. @Html.LabelFor(x => x.Code):
  116. </td>
  117. <td>
  118. @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEnable })
  119. </td>
  120. </tr>
  121. <tr>
  122. <td style="color:red;">
  123. @Html.LabelFor(x => x.Name):
  124. </td>
  125. <td colspan="3">
  126. @if (!isEnable)
  127. {
  128. @Html.TextAreaFor(x => x.Name, new Dictionary<string, object>
  129. {
  130. { "style", "width: 90%;min-height: 60px" },
  131. { "disabled", "true" }
  132. })
  133. }
  134. else
  135. {
  136. @Html.TextAreaFor(x => x.Name, new Dictionary<string, object> { { "style", "width: 90%;min-height: 60px" } })
  137. }
  138. </td>
  139. </tr>
  140. <tr>
  141. </tr>
  142. <tr>
  143. <td>
  144. @Html.LabelFor(x => x.ParticipateTypeName):
  145. </td>
  146. <td>
  147. @Html.ComboGridFor(x => x.EvaluationParticipateTypeID, cgopEvaluationParticipateType)
  148. </td>
  149. <td>
  150. @Html.LabelFor(x => x.EvaluationTableName):
  151. </td>
  152. <td>
  153. @Html.ComboGridFor(x => x.EvaluationTableID, cgopEvaluationTable)
  154. </td>
  155. </tr>
  156. <tr>
  157. <td style="color:red;">
  158. @Html.LabelFor(x => x.EvaluationTargetName):
  159. </td>
  160. <td>
  161. @Html.ComboGridFor(x => x.EvaluationTargetID, cgopEvaluationTarget)
  162. </td>
  163. <td style="color:red;">
  164. @Html.LabelFor(x => x.Weight):
  165. </td>
  166. <td>
  167. @Html.TextBoxFor(x => x.Weight, new TextBoxOptions() { IsEnabled = isEnable })
  168. </td>
  169. </tr>
  170. <tr>
  171. <td>
  172. @Html.LabelFor(x => x.Remark):
  173. </td>
  174. <td colspan="3">
  175. @if (!isEnable)
  176. {
  177. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  178. {
  179. { "style", "width: 90%;min-height: 35px" },
  180. { "disabled", "true" }
  181. })
  182. }
  183. else
  184. {
  185. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 35px" } })
  186. }
  187. </td>
  188. </tr>
  189. </table>
  190. </div>
  191. }
  192. </div>