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.

141 lines
5.2 KiB

  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?v=20120420" 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 _Clos = new Array();
  12. var WorkPoint = $.request("workpoint");
  13. var InvCode = $.request("InvCode");
  14. $(function () {
  15. SetCols();
  16. Init();
  17. })
  18. function SetCols() {
  19. $.ajax({
  20. url: "/Print/SelectColumnName?" + Math.random(),
  21. dataType: "json",
  22. async: false,
  23. success: function (data) {
  24. var cols = new Array();
  25. var collast = { label: 'ID', name: 'ID', width: 100, align: 'left' };
  26. cols.push(collast);
  27. var collast = { label: '物料编码', name: 'InvCode', width: 100, align: 'left' };
  28. cols.push(collast);
  29. var collast = { label: '物料名称', name: 'InvName', width: 100, align: 'left' };
  30. cols.push(collast);
  31. var collast = { label: '规格', name: 'InvStd', width: 100, align: 'left' };
  32. cols.push(collast);
  33. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  34. cols.push(collast);
  35. var collast = { label: '品类', name: 'ClassName', width: 100, align: 'left' };
  36. cols.push(collast);
  37. if (data != null && data.length > 0) {
  38. DateList = data;
  39. for (var i = 0; i < data.length; i++) {
  40. var ColName = data[i].ColName;
  41. var ColCode = data[i].ColCode;
  42. var obj = new Array();
  43. obj = {
  44. label: ColName,
  45. name: ColCode,
  46. width: 80,
  47. align: "left"
  48. }
  49. cols.push(obj);
  50. }
  51. }
  52. _Clos = cols;
  53. }
  54. });
  55. }
  56. function Init() {
  57. document.getElementById("gridPanel").innerHTML = ' <span><strong>详细信息</strong></span> <table id="gridList"></table> ';//重置grid
  58. var invcode = $("#txt_Invcode").val();
  59. $("#gridList").dataGrid({
  60. url: "/WMS/ProductionIssue/GetICSMOPickLog" + "?invcode=" + InvCode + "&workpoint=" + WorkPoint + "&" + Math.random(),
  61. height: $(window).height() - 20,
  62. width: $(window).width() - 300,
  63. colModel: _Clos,
  64. // colModel: [
  65. // { label: 'ID', name: 'ID', width: 100, align: 'left' },
  66. // { label: '仓库', name: 'WHCode', width: 100, align: 'left' },
  67. // { label: '工单号', name: 'MOCode', width: 100, align: 'left' },
  68. // { label: '行号', name: 'Sequence', width: 100, align: 'left' },
  69. // { label: '子件行', name: 'ZJHH', width: 100, align: 'left' },
  70. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  71. // { label: '数量', name: 'Quantity', hidden: true },
  72. // { label: '辅计量数量', name: 'Amount', hidden: true },
  73. //],
  74. pager: "#gridPager",
  75. sortorder: "desc",
  76. sortname: 'InvCode',
  77. viewrecords: true,
  78. multiselect: true,
  79. gridComplete: function () {
  80. }
  81. })
  82. }
  83. function submitForm() {
  84. var rows = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  85. if (rows.length != 1) {
  86. $.modalAlertNew("WMS00079");
  87. return;
  88. }
  89. var rowdata = $("#gridList").jqGrid("getRowData", rows[0]);
  90. var obj = {
  91. ID: rowdata.ID,
  92. InvCode: rowdata.InvCode,
  93. Sequence: rowdata.Sequence,
  94. ZJHH: rowdata.ZJHH,
  95. BatchCode: rowdata.BatchCode,
  96. Quantity: rowdata.Quantity,
  97. Amount: rowdata.Amount,
  98. }
  99. return obj;
  100. }
  101. function Close() {
  102. $.modalClose();
  103. }
  104. function reloadData() {
  105. }
  106. </script>
  107. <div class="topPanel" style="height:50px">
  108. @*<div class="search">
  109. <table>
  110. <tr>
  111. <td>
  112. <label>物料编码:</label>
  113. </td>
  114. <td>
  115. <div class="input-group">
  116. <input id="txt_Invcode" type="text" class="form-control" placeholder="物料编码" style="width: 120px;">
  117. </div>
  118. </td>
  119. <td>
  120. <a id="Search" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="Init()"><i class="fa fa-pencil-square-o"></i>查询</a>
  121. </td>
  122. </tr>
  123. <tr></tr>
  124. </table>
  125. </div>*@
  126. </div>
  127. <div class="gridPanel" id="gridPanel">
  128. <table id="gridList"></table>
  129. <div id="gridPager"></div>
  130. </div>