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.

117 lines
3.7 KiB

  1. 
  2. @{
  3. ViewBag.Title = "Index";
  4. Layout = "~/Views/Shared/_Index.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. if (ID != "") {
  22. $("#Team").val(Team);
  23. $("#Date").val(Date);
  24. $("#Metrics").val(Metrics);
  25. $("#Picking").val(Picking);
  26. }
  27. });
  28. function submitForm() {
  29. var Team = $("#Team").val();
  30. var Date = $("#Date").val();
  31. var Metrics = $("#Metrics").val();
  32. var Picking = $("#Picking").val();
  33. if (Team == "" || Team == undefined) {
  34. $.modalAlert("请维护班组信息!");
  35. return;
  36. }
  37. if (Date == "" || Date == undefined) {
  38. $.modalAlert("请维护日期信息!!");
  39. return;
  40. }
  41. if (Metrics == "" || Metrics == undefined) {
  42. $.modalAlert("请维护产量指标信息!");
  43. return;
  44. }
  45. if (Picking == "" || Picking == undefined) {
  46. $.modalAlert("请维护研发领料信息!");
  47. return;
  48. }
  49. var objArr = {
  50. ID:ID,
  51. Team: Team,
  52. Date: Date,
  53. Metrics: Metrics,
  54. Picking: Picking,
  55. }
  56. debugger;
  57. if (ID!="") {
  58. $.submitForm({
  59. url: "/OMAY/OMAYKPI/UpdateKPIMaintain" + "?" + Math.random(),
  60. param: { keyValue: JSON.stringify(objArr) },
  61. success: function () {
  62. $.currentWindow().$("#gridList").trigger("reloadGrid");
  63. }
  64. })
  65. } else {
  66. $.submitForm({
  67. url: "/OMAY/OMAYKPI/CreateKPIMaintain" + "?" + Math.random(),
  68. param: { keyValue: JSON.stringify(objArr) },
  69. success: function () {
  70. $.currentWindow().$("#gridList").trigger("reloadGrid");
  71. }
  72. })
  73. }
  74. }
  75. </script>
  76. <form id="form1">
  77. <div style="padding-top: 20px; margin-right: 20px;">
  78. <table class="form">
  79. <tr>
  80. <th class="formTitle">班组:</th>
  81. <td class="formValue">
  82. <input id="Team" name="Team" type="text" class="form-control required" style="width: 300px;" maxlength="50" placeholder="班组" />
  83. </td>
  84. </tr>
  85. <tr>
  86. <th class="formTitle">日期:</th>
  87. <td class="formValue">
  88. <input id="Date" name="Date" type="text" class="form-control required" style="width:300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM' })" placeholder="日期" />
  89. </td>
  90. </tr>
  91. <tr>
  92. <th class="formTitle">产量指标:</th>
  93. <td class="formValue">
  94. <input id="Metrics" name="Metrics" type="text" class="form-control required" style="width: 300px;" maxlength="20" placeholder="产量指标" />
  95. </td>
  96. </tr>
  97. <tr>
  98. <th class="formTitle">研发领料:</th>
  99. <td class="formValue">
  100. <input id="Picking" name="Picking" type="text" class="form-control required" style="width: 300px;" maxlength="20" placeholder="研发领料" />
  101. </td>
  102. </tr>
  103. </table>
  104. </div>
  105. </form>