You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
4.9 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. 
  2. @{
  3. ViewBag.Title = "Index";
  4. Layout = "~/Views/Shared/_Form.cshtml";
  5. }
  6. <style>
  7. #ISO {
  8. width: 10px;
  9. }
  10. </style>
  11. <link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
  12. <script src="~/Content/js/select2/select2.min.js"></script>
  13. <script src="~/Content/js/datepicker/WdatePicker.js"></script>
  14. <script>
  15. var ID = $.request("ID");
  16. var Team = $.request("Team");
  17. var Date = $.request("Date");
  18. var Metrics = $.request("Metrics");
  19. var Picking = decodeURI($.request("Picking"));
  20. $(function () {
  21. debugger;
  22. if (ID != "") {
  23. $("#Team").val(Team);
  24. //$("#Team").val([Team]).trigger("change");
  25. // $("#Team").find("option:contains('L4A')").attr("selected", true);
  26. $("#Date").val(Date);
  27. $("#Team").attr("disabled", "disabled");
  28. $("#Date").attr("disabled", "disabled");
  29. $("#Metrics").val(Metrics);
  30. $("#Picking").val(Picking);
  31. }
  32. });
  33. function submitForm() {
  34. var Team = $("#Team").val();
  35. var Date = $("#Date").val();
  36. var Metrics = $("#Metrics").val();
  37. var Picking = $("#Picking").val();
  38. if (Team == "" || Team == undefined) {
  39. $.modalAlert("请维护班组信息!");
  40. return;
  41. }
  42. if (Date == "" || Date == undefined) {
  43. $.modalAlert("请维护日期信息!!");
  44. return;
  45. }
  46. //if (Metrics == "" || Metrics == undefined) {
  47. // $.modalAlert("请维护产量指标信息!");
  48. // return;
  49. //}
  50. //if (Picking == "" || Picking == undefined) {
  51. // $.modalAlert("请维护研发领料信息!");
  52. // return;
  53. //}
  54. var objArr = {
  55. ID:ID,
  56. Team: Team,
  57. Date: Date,
  58. Metrics: Metrics,
  59. Picking: Picking,
  60. }
  61. debugger;
  62. if (ID!="") {
  63. $.submitForm({
  64. url: "/OMAY/OMAYKPI/UpdateKPIMaintain" + "?" + Math.random(),
  65. param: { keyValue: JSON.stringify(objArr) },
  66. success: function () {
  67. $.currentWindow().$("#gridList").trigger("reloadGrid");
  68. }
  69. })
  70. } else {
  71. $.submitForm({
  72. url: "/OMAY/OMAYKPI/CreateKPIMaintain" + "?" + Math.random(),
  73. param: { keyValue: JSON.stringify(objArr) },
  74. success: function () {
  75. $.currentWindow().$("#gridList").trigger("reloadGrid");
  76. }
  77. })
  78. }
  79. }
  80. </script>
  81. <form id="form1">
  82. <div style="padding-top: 20px; margin-right: 20px;">
  83. <table class="form">
  84. <tr>
  85. <th class="formTitle">班组:</th>
  86. <td class="formValue">
  87. <select id="Team" name="F_Target" class="form-control select2 " style="width: 281px; height: 18px; ">
  88. <option value="" selected="selected"></option>
  89. <option value="L1A">L1A</option>
  90. <option value="L1B">L1B</option>
  91. <option value="L2A">L2A</option>
  92. <option value="L2B">L2B</option>
  93. <option value="L3A">L3A</option>
  94. <option value="L3B">L3B</option>
  95. <option value="L4A">L4A</option>
  96. <option value="L4B">L4B</option>
  97. <option value="L5A">L5A</option>
  98. <option value="L5B">L5B</option>
  99. <option value="L6A">L6A</option>
  100. <option value="L6B">L6B</option>
  101. <option value="L7A">L7A</option>
  102. <option value="L7B">L7B</option>
  103. </select>
  104. </td>
  105. </tr>
  106. <tr>
  107. <th class="formTitle">日期:</th>
  108. <td class="formValue">
  109. <input id="Date" name="Date" type="text" class="form-control required" style="width:300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM' })" placeholder="日期" />
  110. </td>
  111. </tr>
  112. <tr>
  113. <th class="formTitle">产量指标:</th>
  114. <td class="formValue">
  115. <input id="Metrics" name="Metrics" type="text" class="form-control required" style="width: 300px;" maxlength="20" placeholder="请输入班组产量指标,单位:T" />
  116. </td>
  117. </tr>
  118. <tr>
  119. <th class="formTitle">研发领料:</th>
  120. <td class="formValue">
  121. <input id="Picking" name="Picking" type="text" class="form-control required" style="width: 300px;" maxlength="20" placeholder="请输入班组研发领料数量,单位:T" />
  122. </td>
  123. </tr>
  124. </table>
  125. </div>
  126. </form>