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

134 lines
4.9 KiB

3 years ago
  1. 
  2. @{
  3. ViewBag.Title = "Index";
  4. Layout = "~/Views/Shared/_Form.cshtml";
  5. }
  6. <script>
  7. var ID = $.request("ID");
  8. debugger;
  9. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  10. $(function () {
  11. $("#minPackQty").keyup(function () {
  12. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  13. }).bind("paste", function () { //CTR+V事件处理
  14. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  15. }).css("ime-mode", "disabled"); //CSS设置输入法不可用
  16. $("#thisCreateQty").keyup(function () {
  17. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  18. }).bind("paste", function () { //CTR+V事件处理
  19. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  20. }).css("ime-mode", "disabled"); //CSS设置输入法不可用
  21. $("#cretePageCount").keyup(function () {
  22. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  23. }).bind("paste", function () { //CTR+V事件处理
  24. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  25. }).css("ime-mode", "disabled"); //CSS设置输入法不可用
  26. var VenCode = "";
  27. var WorkPoint = "";
  28. debugger;
  29. //initControl();
  30. if (!!ID) {
  31. $.ajax({
  32. url: "/WMS/BasicSettings/GetICSInventoryLotInfo?ID=" + ID ,
  33. //data: { keyValue: keyValue },
  34. dataType: "json",
  35. async: false,
  36. success: function (data) {
  37. debugger;
  38. $("#LotNo").val(data.rows[0].LotNo);
  39. $("#InvCode").val(data.rows[0].InvCode);
  40. $("#INVNAME").val(data.rows[0].InvName);
  41. $("#ProductDate").val(data.rows[0].ProductDate);
  42. $("#ExpirationDate").val(data.rows[0].ExpirationDate);
  43. $("#Quantity").val(data.rows[0].Quantity);
  44. $("#LotNo").attr("disabled", "disabled");
  45. $("#InvCode").attr("disabled", "disabled");
  46. $("#INVNAME").attr("disabled", "disabled");
  47. $("#ProductDate").attr("disabled", "disabled");
  48. $("#Quantity").attr("disabled", "disabled");
  49. }
  50. });
  51. }
  52. });
  53. function submitForm() {
  54. debugger;
  55. if (!$('#form1').formValid()) {
  56. return false;
  57. }
  58. var ExpirationDate = $("#ExpirationDate").val();//条码失效日期
  59. $.submitForm({
  60. url: "/WMS/BasicSettings/UpdateExpirationDate?ID=" + ID + "&ExpirationDate=" + ExpirationDate,
  61. param: {
  62. keyValue: JSON.stringify(obj)
  63. },
  64. success: function () {
  65. $.currentWindow().$("#gridList").trigger("reloadGrid");
  66. }
  67. })
  68. }
  69. </script>
  70. <form id="form1">
  71. <div style="padding-top: 20px; margin-right: 20px;">
  72. <table class="form">
  73. <tr>
  74. <th class="formTitle">条码</th>
  75. <td class="formValue">
  76. <input id="LotNo" name="LotNo" type="text" class="form-control " />
  77. </td>
  78. </tr>
  79. <tr>
  80. <th class="formTitle">料品编码</th>
  81. <td class="formValue">
  82. <input id="InvCode" name="InvCode" type="text" class="form-control " />
  83. </td>
  84. </tr>
  85. <tr>
  86. <th class="formTitle">料品名称</th>
  87. <td class="formValue">
  88. <input id="INVNAME" name="INVNAME" type="text" class="form-control " />
  89. </td>
  90. </tr>
  91. <tr>
  92. <th class="formTitle">数量</th>
  93. <td class="formValue">
  94. <input id="Quantity" name="Quantity" type="text" class="form-control " />
  95. <input id="YAmount" name="YAmount" type="text" style="display:none" />
  96. </td>
  97. </tr>
  98. <tr>
  99. <th class="formTitle">生产日期</th>
  100. <td class="formValue">
  101. <input type="text" name="ProductDate" id="ProductDate" class="form-control " onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="生产日期" />
  102. </td>
  103. </tr>
  104. <tr>
  105. <th class="formTitle"><span style="color: red;">*</span>失效日期</th>
  106. <td class="formValue">
  107. <input type="text" name="ExpirationDate" id="ExpirationDate" class="form-control required" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="失效日期" />
  108. </td>
  109. </tr>
  110. </table>
  111. </div>
  112. </form>