Edit.cshtml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. @model EMIS.ViewModel.EvaluationManage.EvaluationTable.EvaluationTargetView
  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 cgopEvaluationNorm = new ComboGridOptions
  57. {
  58. TextField = "Name",
  59. ValueField = "EvaluationNormID",
  60. IsEnabled = isEnable,
  61. GridOptions = new DataGridOptions
  62. {
  63. Columns = new List<DataGridColumn>()
  64. {
  65. new BoundFieldColumn { FieldName="Name", HeaderText="评分标准", Align=AlignStyle.Center, Width=0.1 },
  66. new BoundFieldColumn { FieldName="NormTypeName", HeaderText="评分类型", Align=AlignStyle.Center, Width=0.08, OrderFieldName="NormTypeID", CustomFormatFun="SetRedColumn" },
  67. new BoundFieldColumn { FieldName="NormDetailListName", HeaderText="标准明细", Align=AlignStyle.Center, Width=0.12, OrderFieldName="", CustomFormatFun="SetRedColumn" }
  68. },
  69. PageSize = 5,
  70. IsCheckOnSelect = true,
  71. DataSourceUrl = Url.Content("~/EvaluationNorm/List"),
  72. IsPagination = true,
  73. IsShowRowNumbers = true,
  74. IsSingleSelect = false
  75. }
  76. };
  77. }
  78. @section scripts{
  79. <script src="~/Scripts/Business/EvaluationManage/EvaluationTable/EvaluationTargetEdit.js" type="text/javascript"></script>
  80. <script type="text/javascript">
  81. var nonSelect = "@DropdownList.SELECT_ALL";
  82. </script>
  83. }
  84. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  85. @using (Ajax.BeginForm(new AjaxOptions
  86. {
  87. OnSuccess = "EMISFunction.FormSuccess",
  88. OnBegin = "EMISFunction.FormSubmit",
  89. OnComplete = "EMISFunction.FormComplete"
  90. }))
  91. {
  92. <div class="p_title">
  93. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  94. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  95. @if (Request["type"] != "detail")
  96. {
  97. @Html.ContextMenuBar("Edit")
  98. }
  99. </div>
  100. </div>
  101. <div class="search_list">
  102. @Html.HiddenFor(x => x.EvaluationTargetID)
  103. <table cellpadding="0" cellspacing="0" id="evaluationtabletable">
  104. <tr>
  105. <td>
  106. @Html.LabelFor(x => x.OrderNo):
  107. </td>
  108. <td>
  109. @Html.TextBoxFor(x => x.OrderNo, new TextBoxOptions() { IsEnabled = isEnable })
  110. </td>
  111. <td style="color:red;">
  112. @Html.LabelFor(x => x.Code):
  113. </td>
  114. <td>
  115. @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEnable })
  116. </td>
  117. </tr>
  118. <tr>
  119. <td style="color:red;">
  120. @Html.LabelFor(x => x.Name):
  121. </td>
  122. <td colspan="3">
  123. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary<string, string> { { "style", "width:90%;" } })
  124. </td>
  125. </tr>
  126. <tr>
  127. <td>
  128. @Html.LabelFor(x => x.ParticipateTypeName):
  129. </td>
  130. <td>
  131. @Html.ComboGridFor(x => x.EvaluationParticipateTypeID, cgopEvaluationParticipateType)
  132. </td>
  133. <td>
  134. @Html.LabelFor(x => x.EvaluationTableName):
  135. </td>
  136. <td>
  137. @Html.ComboGridFor(x => x.EvaluationTableID, cgopEvaluationTable)
  138. </td>
  139. </tr>
  140. <tr>
  141. <td>
  142. @Html.LabelFor(x => x.EvaluationNormName):
  143. </td>
  144. <td>
  145. @Html.ComboGridFor(x => x.EvaluationNormID, cgopEvaluationNorm)
  146. </td>
  147. <td style="color:red;">
  148. @Html.LabelFor(x => x.Weight):
  149. </td>
  150. <td>
  151. @Html.TextBoxFor(x => x.Weight, new TextBoxOptions() { IsEnabled = isEnable })
  152. </td>
  153. </tr>
  154. <tr>
  155. <td>
  156. @Html.LabelFor(x => x.Remark):
  157. </td>
  158. <td colspan="3">
  159. @if (!isEnable)
  160. {
  161. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  162. {
  163. { "style", "width: 90%;min-height: 60px" },
  164. { "disabled", "true" }
  165. })
  166. }
  167. else
  168. {
  169. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 60px" } })
  170. }
  171. </td>
  172. </tr>
  173. </table>
  174. </div>
  175. }
  176. </div>