Edit.cshtml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. @model EMIS.ViewModel.EvaluationManage.EvaluationTable.EvaluationNormView
  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. @section scripts{
  9. <script src="~/Scripts/Business/EvaluationManage/EvaluationTable/EvaluationNormEdit.js" type="text/javascript"></script>
  10. <script type="text/javascript">
  11. var nonSelect = "@DropdownList.SELECT_ALL";
  12. var checkBoxNormTypeID = "@((int)EMIS.ViewModel.EM_EvaluationNormType.CheckBox)";
  13. //加载
  14. $(document).ready(function () {
  15. var normTypeID = '@ViewBag.NormTypeID'
  16. if (normTypeID == checkBoxNormTypeID) {
  17. $("#divDetail").show();
  18. } else {
  19. $("#divDetail").hide();
  20. }
  21. });
  22. </script>
  23. }
  24. <div class="separatorline" data-options="border:false,fit:true" style="position: relative;">
  25. @using (Ajax.BeginForm(new AjaxOptions
  26. {
  27. OnSuccess = "EMISFunction.FormSuccess",
  28. OnBegin = "EMISFunction.FormSubmit",
  29. OnComplete = "EMISFunction.FormComplete"
  30. }))
  31. {
  32. <div class="p_title">
  33. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  34. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  35. @if (Request["type"] != "detail")
  36. {
  37. @Html.ContextMenuBar("Edit")
  38. }
  39. </div>
  40. </div>
  41. <div class="gobal-from">
  42. @Html.HiddenFor(x => x.EvaluationNormID)
  43. <table cellpadding="0" cellspacing="1" id="evaluationnormtable">
  44. <tr>
  45. <th style="color:red;">
  46. @Html.LabelFor(x => x.Name):
  47. </th>
  48. <td colspan="3">
  49. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary<string, string> { { "style", "width:84%;" } })
  50. </td>
  51. </tr>
  52. <tr>
  53. <th style="color:red;">
  54. @Html.LabelFor(x => x.NormTypeID):
  55. </th>
  56. <td>
  57. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_EvaluationNormType, (x => x.NormTypeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { OnSelect="queryNormType", IsEnabled = isEnable })
  58. </td>
  59. <th style="color:red;">
  60. @Html.LabelFor(x => x.SatisfyWeight):
  61. </th>
  62. <td>
  63. @Html.TextBoxFor(x => x.SatisfyWeight, new TextBoxOptions() { IsEnabled = isEnable })
  64. </td>
  65. </tr>
  66. <tr>
  67. <th>
  68. @Html.LabelFor(x => x.Remark):
  69. </th>
  70. <td colspan="3">
  71. @if (!isEnable)
  72. {
  73. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  74. {
  75. { "style", "width: 90%;min-height: 60px" },
  76. { "disabled", "true" }
  77. })
  78. }
  79. else
  80. {
  81. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 60px" } })
  82. }
  83. </td>
  84. </tr>
  85. </table>
  86. </div>
  87. <div id="divDetail">
  88. <div class="p_title">
  89. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">评分标准明细列表</div>
  90. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  91. @if (Request["type"] != "detail")
  92. {
  93. @Html.ContextMenuBar("DetailList")
  94. }
  95. </div>
  96. </div>
  97. <div class="search_list">
  98. @if (!isEnable)
  99. {
  100. @Html.DataGrid(new DataGridOptions
  101. {
  102. Columns = new List<DataGridColumn>()
  103. {
  104. //new CheckBoxFieldColumn{ HeaderText="", FieldName="EvaluationNormDetailID" },
  105. new LinkButtonColumn { FieldName="OrderNo", HeaderText="次序", Align=AlignStyle.Center, Handle="edit", Width=0.03 },
  106. new BoundFieldColumn { FieldName="Name", HeaderText="名称", Align=AlignStyle.Center, Width=0.06, CustomFormatFun="SetRedColumn" },
  107. new BoundFieldColumn { FieldName="Weight", HeaderText="权重(100%)", Align=AlignStyle.Center, Width=0.06, CustomFormatFun="SetRedColumn" },
  108. new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.05 }
  109. },
  110. PageSize = 5,
  111. IsCheckOnSelect = true,
  112. IsPostBack = true,
  113. DataSourceUrl = Url.Content("~/EvaluationNorm/EvaluationNormDetailViewList?evaluationNormID=" + Model.EvaluationNormID),
  114. ID = "dgEvaluationNormDetailList",
  115. IsPagination = true,
  116. IsShowRowNumbers = true,
  117. IsSingleSelect = false,
  118. MaxHeight = 125
  119. })
  120. }
  121. else
  122. {
  123. @Html.DataGrid(new DataGridOptions
  124. {
  125. Columns = new List<DataGridColumn>()
  126. {
  127. new CheckBoxFieldColumn{ HeaderText="", FieldName="EvaluationNormDetailID" },
  128. new LinkButtonColumn { FieldName="OrderNo", HeaderText="次序", Align=AlignStyle.Center, Handle="edit", Width=0.03 },
  129. new BoundFieldColumn { FieldName="Name", HeaderText="名称", Align=AlignStyle.Center, Width=0.06, CustomFormatFun="SetRedColumn" },
  130. new BoundFieldColumn { FieldName="Weight", HeaderText="权重(100%)", Align=AlignStyle.Center, Width=0.06, CustomFormatFun="SetRedColumn" },
  131. new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.05 }
  132. },
  133. PageSize = 5,
  134. IsCheckOnSelect = true,
  135. IsPostBack = true,
  136. DataSourceUrl = Url.Content("~/EvaluationNorm/EvaluationNormDetailViewList?evaluationNormID=" + Model.EvaluationNormID),
  137. ID = "dgEvaluationNormDetailList",
  138. IsPagination = true,
  139. IsShowRowNumbers = true,
  140. IsSingleSelect = false,
  141. MaxHeight = 125
  142. })
  143. }
  144. </div>
  145. </div>
  146. }
  147. </div>