DetailEdit.cshtml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. @model EMIS.ViewModel.EvaluationManage.EvaluationTable.EvaluationNormDetailView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "DetailEdit";
  6. var isEnable = Request["type"] == "detail" ? false : true;
  7. }
  8. @section scripts{
  9. <script type="text/javascript">
  10. var nonSelect = "@DropdownList.SELECT_ALL";
  11. $(function () {
  12. var data = top.$("#@(Request["WindowID"])").data("inputData");
  13. if (data) {
  14. $("#OrderNo").val(data.OrderNo);
  15. $("#Name").val(data.Name);
  16. $("#Weight").val(data.Weight);
  17. $("#Remark").val(data.Remark);
  18. }
  19. });
  20. //选择
  21. function validChoose() {
  22. var normDetail = new Object();
  23. normDetail.RowIndex = $.SystemGeneral.getUrlParam("RowIndex");
  24. normDetail.OrderNo = $("#OrderNo").val();
  25. normDetail.Name = $("#Name").val();
  26. normDetail.Weight = $("#Weight").val();
  27. normDetail.Remark = $("#Remark").val();
  28. return normDetail;
  29. }
  30. //确定
  31. function EvaluationNormDetail_Save() {
  32. var $form = $(document.forms[0])
  33. var validateState = $form.valid();
  34. if (validateState) {
  35. top.$("#@(Request["WindowID"])").data("resultData", validChoose());
  36. top.$("#@(Request["WindowID"])").dialog("close");
  37. }
  38. }
  39. </script>
  40. }
  41. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  42. @using (Ajax.BeginForm(new AjaxOptions
  43. {
  44. OnSuccess = "EMISFunction.FormSuccess",
  45. OnBegin = "EMISFunction.FormSubmit",
  46. OnComplete = "EMISFunction.FormComplete" }))
  47. {
  48. <div class="p_title">
  49. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  50. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  51. @if (Request["type"] != "detail")
  52. {
  53. @Html.ContextMenuBar("DetailEdit")
  54. }
  55. </div>
  56. </div>
  57. <div class="search_list">
  58. @Html.HiddenFor(x => x.EvaluationNormDetailID)
  59. <table cellpadding="0" cellspacing="0" id="evaluationnormdetailtable">
  60. <tr>
  61. <td>
  62. @Html.LabelFor(x => x.OrderNo):
  63. </td>
  64. <td>
  65. @Html.TextBoxFor(x => x.OrderNo, new TextBoxOptions() { IsEnabled = isEnable })
  66. </td>
  67. <td style="color: red;">
  68. @Html.LabelFor(x => x.Name):
  69. </td>
  70. <td>
  71. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable })
  72. </td>
  73. </tr>
  74. <tr>
  75. <td style="color: red;">
  76. @Html.LabelFor(x => x.Weight):
  77. </td>
  78. <td colspan="3">
  79. @Html.TextBoxFor(x => x.Weight, new TextBoxOptions() { IsEnabled = isEnable })%
  80. </td>
  81. </tr>
  82. <tr>
  83. <td>
  84. @Html.LabelFor(x => x.Remark):
  85. </td>
  86. <td colspan="3">
  87. @if (!isEnable)
  88. {
  89. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  90. {
  91. { "style", "width: 90%;min-height: 20px" },
  92. { "disabled", "true" }
  93. })
  94. }
  95. else
  96. {
  97. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  98. }
  99. </td>
  100. </tr>
  101. </table>
  102. </div>
  103. }
  104. </div>