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

143 lines
4.9 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. 
  2. @{
  3. ViewBag.Title = "SeachInventory";
  4. Layout = "~/Views/Shared/_Index.cshtml";
  5. }
  6. <link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
  7. <link href="~/Content/js/dialog/dialog.css" rel="stylesheet" />
  8. <script src="~/Content/js/datepicker/WdatePicker.js"></script>
  9. <script src="~/Content/js/select2/select2.min.js"></script>
  10. <script>
  11. var Code = $.request("Code");
  12. var InvName = decodeURI($.request("InvName"));
  13. var WHCode = $.request("WHCode");
  14. var ExtensionID = $.request("ExtensionID");
  15. var InvCode = $.request("InvCode");
  16. var Qty = $.request("Qty");
  17. $(function () {
  18. debugger;
  19. if (!!Code) {
  20. $("#txtInvCode").val(InvCode);
  21. $("#txtInvName").val(InvName);
  22. //$("#txtBatchCode").val(ExtensionID);
  23. $("#txtWHCode").val(WHCode);
  24. }
  25. Init();
  26. });
  27. function Init() {
  28. document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> ';//重置grid
  29. //var LotNo = $("#txt_LotNo").val();
  30. $("#gridList").dataGrid({
  31. url: "/WMS/ICSDisassemblyDoc/GetLotNoByKit?InvCode=" + InvCode + "&WHCode=" + WHCode + "&ExtensionID=" + ExtensionID + "&" + Math.random(),
  32. height: $(window).height() - 20,
  33. width: $(window).width() - 300,
  34. colModel: [
  35. { label: '主键', name: 'ID', hidden: true, key: true },
  36. { label: '仓库', name: 'WarehouseCode', width: 100, align: 'left' },
  37. { label: '库位', name: 'LocationCode', width: 100, align: 'left' },
  38. { label: '条码', name: 'LotNo', width: 100, align: 'left' },
  39. { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  40. { label: '物料描述', name: 'InvName', width: 100, align: 'left' },
  41. { label: '辅助描述', name: 'InvDesc', width: 100, align: 'left' },
  42. { label: '规格型号', name: 'InvStd', width: 100, align: 'left' },
  43. { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  44. { label: '总数量', name: 'Quantity', width: 100, align: 'left' },
  45. { label: '辅计量数量', name: 'Amount', width: 100, align: 'left' },
  46. ],
  47. pager: "#gridPager",
  48. sortorder: "desc",
  49. sortname: 'LotNO',
  50. viewrecords: true,
  51. multiselect: true,
  52. gridComplete: function () {
  53. }
  54. })
  55. };
  56. function submitForm() {
  57. debugger;
  58. var rows = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  59. if (rows.length <= 0) {
  60. $.modalAlertNew("WMS00077");
  61. return;
  62. }
  63. var count = 0;
  64. var Parameter = [];
  65. for (var i = 0; i < rows.length; i++) {
  66. var rowData = $("#gridList").jqGrid('getRowData', rows[i]);
  67. var obj = {
  68. WHCode: rowData.WarehouseCode,//仓库
  69. LocationCode: rowData.LocationCode,//库位
  70. LotNo: rowData.LotNo,//条码
  71. InvCode: rowData.InvCode,//料品
  72. Quantity: rowData.Quantity,//数量
  73. }
  74. count += Number(rowData.Quantity);
  75. Parameter.push(obj);
  76. }
  77. if (count != Qty) {
  78. $.modalAlertNew("WMS00078");
  79. return;
  80. }
  81. $.modalConfirm("确定保存吗?", function (r) {
  82. if (r) {
  83. $.submitForm({
  84. url: "/WMS/ICSDisassemblyDoc/CreateLogByKit?Code=" + Code + "&" + Math.random(),
  85. param: { Parameter: JSON.stringify(Parameter)},
  86. success: function () {
  87. $.currentWindow().$("#gridList").trigger("reloadGrid");
  88. }
  89. })
  90. }
  91. });
  92. };
  93. function Close() {
  94. $.modalClose();
  95. }
  96. </script>
  97. <div style="margin-right: 20px;">
  98. <table class="form">
  99. <thead>套件信息</thead>
  100. <tr>
  101. <th class="formTitle">套装料品编码:</th>
  102. <td class="formValue">
  103. <input id="txtInvCode" type="text" disabled="disabled" class="form-control" autocomplete="off" />
  104. </td>
  105. <th class="formTitle">套装物料描述:</th>
  106. <td class="formValue">
  107. <input id="txtInvName" type="text" disabled="disabled" class="form-control" autocomplete="off" />
  108. </td>
  109. @*<th class="formTitle">批号:</th>
  110. <td class="formValue">
  111. <input id="txtBatchCode" type="text" disabled="disabled" class="form-control" autocomplete="off" />
  112. </td>*@
  113. <th class="formTitle">仓库:</th>
  114. <td class="formValue">
  115. <input id="txtWHCode" type="text" disabled="disabled" class="form-control" autocomplete="off" />
  116. </td>
  117. </tr>
  118. </table>
  119. </div>
  120. <div class="gridPanel" id="gridPanel">
  121. <table id="gridList"></table>
  122. @*<div id="gridPager"></div>*@
  123. </div>