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

3 years ago
  1. 
  2. @{
  3. ViewBag.Title = "Index";
  4. Layout = "~/Views/Shared/_Form.cshtml";
  5. }
  6. <script>
  7. var LotNO = $.request("LotNO");
  8. var Quantity = $.request("Quantity");
  9. var InvName = decodeURI($.request("InvName"));
  10. debugger;
  11. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  12. $(function () {
  13. $("#minPackQty").keyup(function () {
  14. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  15. }).bind("paste", function () { //CTR+V事件处理
  16. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  17. }).css("ime-mode", "disabled"); //CSS设置输入法不可用
  18. $("#thisCreateQty").keyup(function () {
  19. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  20. }).bind("paste", function () { //CTR+V事件处理
  21. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  22. }).css("ime-mode", "disabled"); //CSS设置输入法不可用
  23. $("#cretePageCount").keyup(function () {
  24. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  25. }).bind("paste", function () { //CTR+V事件处理
  26. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  27. }).css("ime-mode", "disabled"); //CSS设置输入法不可用
  28. var VenCode = "";
  29. var WorkPoint = "";
  30. if (!!LotNO) {
  31. $.ajax({
  32. url: "/WMS/Deciliter/GetNewLotNo?LotNO=" + LotNO,
  33. //data: { keyValue: keyValue },
  34. dataType: "json",
  35. async: false,
  36. success: function (data) {
  37. debugger;
  38. $("#txtLotNO").val(LotNO);
  39. $("#txtQuantity").val(Quantity);
  40. $("#txtInvName").val(InvName);
  41. $("#txtNewLotNo").val(data.rows);
  42. if (!!LotNO) {
  43. $("#txtLotNO").attr("disabled", "disabled");
  44. $("#txtQuantity").attr("disabled", "disabled");
  45. $("#txtInvName").attr("disabled", "disabled");
  46. $("#txtNewLotNo").attr("disabled", "disabled");
  47. }
  48. }
  49. });
  50. }
  51. });
  52. function submitForm() {
  53. debugger;
  54. if (!$('#form1').formValid()) {
  55. return false;
  56. }
  57. var RoleEnCode = '@NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode'
  58. var WorkPoint = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  59. var date = new Date();
  60. var Details = [];
  61. var obj = {
  62. CurrentLotNo: $("#txtNewLotNo").val(),
  63. CurrentQuantity: $("#txtCount").val(),
  64. };
  65. Details.push(obj);
  66. var Header = {
  67. LotNo: $("#txtLotNO").val(),
  68. User: RoleEnCode,
  69. MTIME: date,
  70. WorkPoint: WorkPoint,
  71. Detail: Details,
  72. }
  73. var Parameter = [];
  74. Parameter.push(Header);
  75. $.submitForm({
  76. url: "/WMS/Deciliter/Split?" + Math.random(),
  77. param: { Parameter: JSON.stringify(Parameter) },
  78. success: function () {
  79. $.currentWindow().$("#gridList").trigger("reloadGrid");
  80. }
  81. })
  82. }
  83. </script>
  84. <form id="form1">
  85. <div style="padding-top: 20px; margin-right: 20px;">
  86. <table class="form">
  87. <tr>
  88. <th class="formTitle">料品条码</th>
  89. <td class="formValue">
  90. <input id="txtLotNO" name="txtLotNO" type="text" class="form-control " />
  91. </td>
  92. </tr>
  93. <tr>
  94. <th class="formTitle">料品在库数量</th>
  95. <td class="formValue">
  96. <input id="txtQuantity" name="Quantity" type="text" class="form-control " />
  97. </td>
  98. </tr>
  99. <tr>
  100. <th class="formTitle">料品名称</th>
  101. <td class="formValue">
  102. <input id="txtInvName" name="txtInvName" type="text" class="form-control " />
  103. </td>
  104. </tr>
  105. <tr>
  106. <th class="formTitle">新条码</th>
  107. <td class="formValue">
  108. <input id="txtNewLotNo" name="txtNewLotNo" type="text" class="form-control " />
  109. </td>
  110. </tr>
  111. <tr>
  112. <th class="formTitle"><span style="color: red;">*</span>分批数量</th>
  113. <td class="formValue">
  114. <input id="txtCount" name="txtCount" type="text" class="form-control required" placeholder="请输入分批数量" />
  115. </td>
  116. </tr>
  117. </table>
  118. </div>
  119. </form>