纽威
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.

114 lines
3.6 KiB

3 years 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>
  14. debugger;
  15. var ID = $.request("ID");
  16. var InvCode = $.request("InvCode");
  17. var LocationCode = $.request("LocationCode");
  18. var Enable = $.request("Enable");
  19. $(function () {
  20. if (ID!="") {
  21. $("#InvCode").val(InvCode);
  22. $("#LocationCode").val(LocationCode);
  23. if (Enable == 'true') {
  24. $("#StatusYes").prop("checked", true);
  25. } else {
  26. $("#StatusNo").prop("checked", true);
  27. }
  28. }
  29. });
  30. function submitForm() {
  31. var InvCode = $("#InvCode").val();
  32. var LocationCode = $("#LocationCode").val();
  33. var Enable = $('input[name="State"]:checked').val();
  34. if (InvCode == "" || InvCode == undefined) {
  35. $.modalAlert("请先输入料品编码!");
  36. return;
  37. }
  38. if (LocationCode == "" || LocationCode == undefined) {
  39. $.modalAlert("请先输入库位编码!");
  40. return;
  41. }
  42. if (Enable == "" || Enable == undefined) {
  43. $.modalAlert("请选择是否启用!");
  44. return;
  45. }
  46. var objArr = {
  47. ID:ID,
  48. InvCode: InvCode,
  49. LocationCode: LocationCode,
  50. Enable: Enable
  51. }
  52. debugger;
  53. $.submitForm({
  54. url: "/WMS/BasicSettings/UpdateICSInventoryLocation" + "?" + Math.random(),
  55. param: { keyValue: JSON.stringify(objArr) },
  56. success: function () {
  57. $.currentWindow().$("#gridList").trigger("reloadGrid");
  58. }
  59. })
  60. }
  61. </script>
  62. <form id="form1">
  63. <div style="padding-top: 20px; margin-right: 20px;">
  64. <table class="form">
  65. <tr>
  66. <th class="formTitle">料品编码:</th>
  67. <td class="formValue">
  68. <input id="InvCode" name="InvCode" type="text" class="form-control required" style="width: 300px;" maxlength="10" placeholder="料品编码" />
  69. </td>
  70. </tr>
  71. <tr>
  72. <th class="formTitle">库位编码:</th>
  73. <td class="formValue">
  74. <input id="LocationCode" name="LocationCode" type="text" class="form-control required" style="width: 300px;" maxlength="10" placeholder="库位编码" />
  75. </td>
  76. </tr>
  77. <tr>
  78. <td>
  79. <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;是否启用:</label>
  80. </td>
  81. <td>
  82. <div class="input-group" id="changechaeckbox">
  83. <input type="radio" name="State" value="1" id="StatusYes" style="width:30px" /><label for="cb-NoQuotedPrice">是</label>
  84. <input type="radio" name="State" value="0" id="StatusNo" style="width:30px" /><label for="cb-QuotedPrice">否</label>
  85. </div>
  86. </td>
  87. <td>&nbsp;&nbsp;&nbsp;</td>
  88. <td>
  89. <span class="input-group-btn">
  90. <button id="btn_search" type="button" class="btn btn-primary"><i class="fa fa-search"></i></button>
  91. </span>
  92. </td>
  93. <td style="padding-left: 10px;"></td>
  94. </tr>
  95. </table>
  96. </div>
  97. </form>