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

3369 lines
172 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
2 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
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
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
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
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
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
2 years ago
3 years ago
2 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
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
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. ViewBag.Title = "Index";
  3. Layout = "~/Views/Shared/_Index.cshtml";
  4. }
  5. <script>
  6. debugger;
  7. var _Clos = new Array();
  8. var Type = $.request("Type");
  9. var ColModelMain = [];
  10. var ColModelSub = [];
  11. $(function () {
  12. SetCols();
  13. if (Type == '1' || Type == '2' || Type == '3' || Type == '4' || Type == '5' || Type == '6' || Type == '9') {
  14. $(".HideItems").css('display', 'none');
  15. }
  16. if (Type != '9') {
  17. $(".Workorder").css('display', 'none');
  18. }
  19. if (Type == '1') {
  20. gridList();
  21. }
  22. if (Type == '2') {
  23. gridList2();
  24. }
  25. if (Type == '3') {
  26. gridList3();
  27. }
  28. if (Type == '4') {
  29. gridList4();
  30. }
  31. if (Type == '5') {
  32. gridList5();
  33. }
  34. if (Type == '6') {
  35. gridList6();
  36. }
  37. //审核到货单生成条码
  38. if (Type == '7') {
  39. gridList7();
  40. }
  41. //审核委外到货单生成条码
  42. if (Type == '8') {
  43. gridList8();
  44. }
  45. //开立成品入库单生成条码
  46. if (Type == '9') {
  47. $(".HideItems9").css('display', 'none');
  48. gridList9();
  49. }
  50. //审核拒收单生成条码
  51. if (Type == '10') {
  52. gridList10();
  53. }
  54. //审核委外拒收单生成条码
  55. if (Type == '11') {
  56. gridList11();
  57. }
  58. //领料申请退料生成条码
  59. if (Type == '12') {
  60. gridList12();
  61. }
  62. //材料出库退料生成条码
  63. if (Type == '13') {
  64. gridList13();
  65. }
  66. //委外领料申请退料生成条码
  67. if (Type == '14') {
  68. gridList14();
  69. }
  70. //委外材料出库退料生成条码
  71. if (Type == '15') {
  72. gridList15();
  73. }
  74. if (Type == '16') {
  75. gridList16();
  76. }
  77. })
  78. //显示的列内容
  79. function SetCols() {
  80. $.ajax({
  81. url: "/Print/SelectColumnName?" + Math.random(),
  82. dataType: "json",
  83. async: false,
  84. success: function (data) {
  85. var cols = new Array();
  86. if (Type == '1') {
  87. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  88. cols.push(collast);
  89. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  90. cols.push(collast);
  91. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  92. cols.push(collast);
  93. var collast = { label: '工单子件', name: 'SourceDetailID', hidden: true, };
  94. cols.push(collast);
  95. var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
  96. cols.push(collast);
  97. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  98. cols.push(collast);
  99. var collast = { label: '料品编码', name: 'InvName', width: 60, align: 'left', };
  100. cols.push(collast);
  101. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  102. cols.push(collast);
  103. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  104. cols.push(collast);
  105. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  106. cols.push(collast);
  107. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  108. cols.push(collast);
  109. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  110. cols.push(collast);
  111. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  112. //cols.push(collast);
  113. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  114. cols.push(collast);
  115. }
  116. if (Type == '2') {
  117. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  118. cols.push(collast);
  119. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  120. cols.push(collast);
  121. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  122. cols.push(collast);
  123. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  124. cols.push(collast);
  125. var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
  126. cols.push(collast);
  127. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  128. cols.push(collast);
  129. var collast = { label: '物料描述', name: 'InvName', width: 60, align: 'left', };
  130. cols.push(collast);
  131. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  132. cols.push(collast);
  133. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  134. cols.push(collast);
  135. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  136. cols.push(collast);
  137. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  138. cols.push(collast);
  139. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  140. cols.push(collast);
  141. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  142. //cols.push(collast);
  143. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  144. cols.push(collast);
  145. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  146. //cols.push(collast);
  147. }
  148. if (Type == '3') {
  149. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  150. cols.push(collast);
  151. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  152. cols.push(collast);
  153. var collast = { label: '工单行号', name: 'Sequence', width: 50, align: 'left' };
  154. cols.push(collast);
  155. var collast = { label: 'ERP工单行ID', name: 'MODetailID', hidden: true };
  156. cols.push(collast);
  157. var collast = { label: '已入库数量', name: 'RCVQuantity', hidden: true, };
  158. cols.push(collast);
  159. var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
  160. cols.push(collast);
  161. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  162. cols.push(collast);
  163. var collast = { label: '物料描述', name: 'InvName', width: 60, align: 'left', };
  164. cols.push(collast);
  165. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  166. cols.push(collast);
  167. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  168. cols.push(collast);
  169. var collast = {
  170. label: "状态", name: "MOStatus", width: 60, align: "left",
  171. formatter: function (cellvalue) {
  172. if (cellvalue == "1") {
  173. return "初始";
  174. } else if (cellvalue == "2") {
  175. return "下发";
  176. }
  177. else if (cellvalue == "3") {
  178. return "关单";
  179. }
  180. else { return ""; }
  181. }
  182. };
  183. cols.push(collast);
  184. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  185. cols.push(collast);
  186. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  187. cols.push(collast);
  188. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  189. //cols.push(collast);
  190. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  191. cols.push(collast);
  192. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  193. //cols.push(collast);
  194. }
  195. if (Type == '4') {
  196. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  197. cols.push(collast);
  198. var collast = { label: '单据号', name: 'SDNCode', width: 120, align: 'left' };
  199. cols.push(collast);
  200. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  201. cols.push(collast);
  202. var collast = { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' };
  203. cols.push(collast);
  204. var collast = { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' };
  205. cols.push(collast);
  206. var collast = { label: '区域', name: 'Area', width: 50, align: 'left' };
  207. cols.push(collast);
  208. var collast = { label: '仓库', name: 'WHCode', width: 50, align: 'left' };
  209. cols.push(collast);
  210. var collast = { label: '客户代码', name: 'CusCode', width: 120, align: 'left' };
  211. cols.push(collast);
  212. var collast = { label: '客户名称', name: 'CusName', width: 50, align: 'left' };
  213. cols.push(collast);
  214. var collast = { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' };
  215. cols.push(collast);
  216. var collast = { label: '已发数量', name: 'SDNQuantity', width: 50, align: 'left' };
  217. cols.push(collast);
  218. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  219. cols.push(collast);
  220. var collast = { label: '物料描述', name: 'InvDescribe', width: 60, align: 'left', };
  221. cols.push(collast);
  222. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  223. cols.push(collast);
  224. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  225. cols.push(collast);
  226. var collast = {
  227. label: "状态", name: "Status", width: 60, align: "left",
  228. formatter: function (cellvalue) {
  229. if (cellvalue == "1") {
  230. return "开立";
  231. } else if (cellvalue == "2") {
  232. return "审核";
  233. }
  234. else if (cellvalue == "3") {
  235. return "关闭";
  236. }
  237. else { return ""; }
  238. }
  239. };
  240. cols.push(collast);
  241. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  242. cols.push(collast);
  243. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  244. cols.push(collast);
  245. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  246. //cols.push(collast);
  247. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  248. cols.push(collast);
  249. var collast = { label: '站点', name: 'WorkPoint', width: 120, align: 'left' };
  250. cols.push(collast);
  251. var collast = { label: '装运点', name: 'Points', width: 120, align: 'left' };
  252. cols.push(collast);
  253. var collast = { label: '交货类型', name: 'DeliveryType', width: 150, align: 'left' };
  254. cols.push(collast);
  255. var collast = { label: '交货描述', name: 'DeliveryDescribe', width: 150, align: 'left' };
  256. cols.push(collast);
  257. var collast = { label: '辅助描述', name: 'OtherDescribe', width: 120, align: 'left' };
  258. cols.push(collast);
  259. var collast = { label: '销售单位', name: 'SalesUnit', width: 120, align: 'left' };
  260. cols.push(collast);
  261. var collast = { label: '序列号参数', name: 'IsSerialNumber', width: 150, align: 'left' };
  262. cols.push(collast);
  263. var collast = { label: '特殊库存标识', name: 'StockIndicator', width: 150, align: 'left' };
  264. cols.push(collast);
  265. }
  266. if (Type == '5') {
  267. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  268. cols.push(collast);
  269. var collast = { label: '单据号', name: 'InCode', width: 120, align: 'left' };
  270. cols.push(collast);
  271. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  272. cols.push(collast);
  273. var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
  274. cols.push(collast);
  275. var collast = { label: '仓库', name: 'WHCode', width: 50, align: 'left' };
  276. cols.push(collast);
  277. var collast = { label: '料品编码', name: 'InvCode', width: 50, align: 'left' };
  278. cols.push(collast);
  279. var collast = { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' };
  280. cols.push(collast);
  281. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left', hidden: true };
  282. cols.push(collast);
  283. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  284. cols.push(collast);
  285. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  286. cols.push(collast);
  287. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  288. cols.push(collast);
  289. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  290. cols.push(collast);
  291. var collast = { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', };
  292. cols.push(collast);
  293. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  294. cols.push(collast);
  295. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  296. cols.push(collast);
  297. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  298. //cols.push(collast);
  299. var collast = { label: '站点', name: 'WorkPoint', width: 100, align: 'left' };
  300. cols.push(collast);
  301. var collast = { label: '单据类型', name: 'OrderType', width: 120, align: 'left' };
  302. cols.push(collast);
  303. var collast = { label: '类型描述', name: 'TypeDescribe', width: 120, align: 'left' };
  304. cols.push(collast);
  305. var collast = { label: '成本中心', name: 'CostCenter', width: 150, align: 'left' };
  306. cols.push(collast);
  307. var collast = { label: '备注', name: 'Remarks', width: 150, align: 'left' };
  308. cols.push(collast);
  309. var collast = { label: '人员号', name: 'PersonNumber', width: 120, align: 'left' };
  310. cols.push(collast);
  311. var collast = { label: '物料描述', name: 'InvDescribe', width: 120, align: 'left' };
  312. cols.push(collast);
  313. var collast = { label: '基本计量单位', name: 'Unit', width: 150, align: 'left', hidden: true };
  314. cols.push(collast);
  315. var collast = { label: '特殊库存标识', name: 'StockIndicator', width: 50, align: 'left' };
  316. cols.push(collast);
  317. }
  318. if (Type == '6') {
  319. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  320. cols.push(collast);
  321. var collast = { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' };
  322. cols.push(collast);
  323. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  324. cols.push(collast);
  325. var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' };
  326. cols.push(collast);
  327. var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
  328. cols.push(collast);
  329. var collast = { label: '料品编码', name: 'InvCode', width: 50, align: 'left' };
  330. cols.push(collast);
  331. var collast = { label: '物料描述', name: 'InvName', width: 120, align: 'left' };
  332. cols.push(collast);
  333. var collast = { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' };
  334. cols.push(collast);
  335. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left', hidden: true };
  336. cols.push(collast);
  337. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  338. cols.push(collast);
  339. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  340. cols.push(collast);
  341. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  342. cols.push(collast);
  343. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  344. cols.push(collast);
  345. var collast = { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', };
  346. cols.push(collast);
  347. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  348. cols.push(collast);
  349. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  350. cols.push(collast);
  351. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  352. //cols.push(collast);
  353. }
  354. //审核到货单生成条码
  355. if (Type == '7') {
  356. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  357. cols.push(collast);
  358. var collast = { label: '单据号', name: 'DNCode', width: 120, align: 'left' };
  359. cols.push(collast);
  360. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  361. cols.push(collast);
  362. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  363. cols.push(collast);
  364. var collast = { label: '物料描述', name: 'InvoDescribe', width: 120, align: 'left' };
  365. cols.push(collast);
  366. var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
  367. cols.push(collast);
  368. var collast = { label: '仓库', name: 'WHCode', width: 50, align: 'left' };
  369. cols.push(collast);
  370. //var collast = { label: '采购订单号', name: 'POCode', width: 50, align: 'left' };
  371. //cols.push(collast);
  372. //var collast = { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' };
  373. //cols.push(collast);
  374. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  375. cols.push(collast);
  376. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  377. cols.push(collast);
  378. //新增字段
  379. var collast = { label: '采购凭证号', name: 'DNID', width: 120, align: 'left' };
  380. cols.push(collast);
  381. var collast = { label: '采购凭证的项目', name: 'DNDetailID', width: 120, align: 'left' };
  382. cols.push(collast);
  383. var collast = { label: '站点', name: 'WorkPoint', width: 50, align: 'left' };
  384. cols.push(collast);
  385. var collast = { label: '检验类型', name: 'InspectionType', width: 50, align: 'left' };
  386. cols.push(collast);
  387. var collast = { label: '不合格单号', name: 'NonconformingForm', width: 120, align: 'left' };
  388. cols.push(collast);
  389. var collast = { label: '图号', name: 'DrawingNo', width: 120, align: 'left' };
  390. cols.push(collast);
  391. var collast = { label: '图标', name: 'Version1', width: 50, align: 'left' };
  392. cols.push(collast);
  393. var collast = { label: '修改时间', name: 'ModificationDate', width: 50, align: 'left' };
  394. cols.push(collast);
  395. //var collast = { label: '物料描述', name: 'InvoDescribe', width: 120, align: 'left' };
  396. //cols.push(collast);
  397. var collast = { label: '特殊库存标识', name: 'StockIndicator', width: 50, align: 'left', hidden: true };
  398. cols.push(collast);
  399. //var collast = { label: '单位', name: 'Unity', width: 50, align: 'left' };
  400. //cols.push(collast);
  401. var collast = { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' };
  402. cols.push(collast);
  403. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left', hidden: true };
  404. cols.push(collast);
  405. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  406. cols.push(collast);
  407. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  408. cols.push(collast);
  409. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  410. //cols.push(collast);
  411. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  412. cols.push(collast);
  413. //var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  414. //cols.push(collast);
  415. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  416. cols.push(collast);
  417. //var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  418. //cols.push(collast);
  419. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  420. cols.push(collast);
  421. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  422. cols.push(collast);
  423. var collast = { label: '区域类型', name: 'AreaType', width: 10, align: 'left', hidden: true };
  424. cols.push(collast);
  425. }
  426. //审核委外到货单生成条码
  427. if (Type == '8') {
  428. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  429. cols.push(collast);
  430. var collast = { label: '单据号', name: 'ODNCode', width: 120, align: 'left' };
  431. cols.push(collast);
  432. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  433. cols.push(collast);
  434. var collast = { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' };
  435. cols.push(collast);
  436. var collast = { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' };
  437. cols.push(collast);
  438. var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
  439. cols.push(collast);
  440. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  441. cols.push(collast);
  442. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  443. cols.push(collast);
  444. var collast = { label: '料品编码', name: 'InvCode', width: 50, align: 'left' };
  445. cols.push(collast);
  446. var collast = { label: '物料描述', name: 'InvName', width: 120, align: 'left' };
  447. cols.push(collast);
  448. var collast = { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' };
  449. cols.push(collast);
  450. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left', hidden: true };
  451. cols.push(collast);
  452. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  453. cols.push(collast);
  454. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  455. cols.push(collast);
  456. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  457. //cols.push(collast);
  458. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  459. cols.push(collast);
  460. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  461. cols.push(collast);
  462. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  463. cols.push(collast);
  464. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  465. cols.push(collast);
  466. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  467. cols.push(collast);
  468. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  469. cols.push(collast);
  470. }
  471. //开立成品入库单生成条码
  472. if (Type == '9') {
  473. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  474. cols.push(collast);
  475. var collast = { label: '单据号', name: 'RCVCode', width: 120, align: 'left' };
  476. cols.push(collast);
  477. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  478. cols.push(collast);
  479. var collast = { label: '仓库号', name: 'WHCode', width: 100, align: 'left' };
  480. cols.push(collast);
  481. var collast = { label: '生产订单', name: 'OrderNumber', width: 100, align: 'left' };
  482. cols.push(collast);
  483. var collast = { label: '存储区域', name: 'Area', width: 50, align: 'left' };
  484. cols.push(collast);
  485. var collast = { label: '料品编码', name: 'InvCode', width: 150, align: 'left' };
  486. cols.push(collast);
  487. var collast = { label: '物料描述', name: 'InvName', width: 120, align: 'left' };
  488. cols.push(collast);
  489. var collast = { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' };
  490. cols.push(collast);
  491. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left', hidden: true };
  492. cols.push(collast);
  493. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  494. cols.push(collast);
  495. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  496. cols.push(collast);
  497. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  498. //cols.push(collast);
  499. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  500. cols.push(collast);
  501. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  502. cols.push(collast);
  503. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  504. cols.push(collast);
  505. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  506. cols.push(collast);
  507. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  508. cols.push(collast);
  509. var collast = { label: '站点', name: 'WorkPoint', width: 120, align: 'left' };
  510. cols.push(collast);
  511. var collast = { label: '单据类型', name: 'EATTRIBUTE', width: 50, align: 'left' };
  512. cols.push(collast);
  513. var collast = { label: '物料描述', name: 'InvDescribe', width: 150, align: 'left', hidden: true };
  514. cols.push(collast);
  515. var collast = { label: '物料号(父项生产订单主物料)', name: 'OrderNumber', width: 200, align: 'left' };
  516. cols.push(collast);
  517. var collast = { label: '物料描述(父项生产订单主物料)', name: 'OrderInvDescribe', width: 200, align: 'left' };
  518. cols.push(collast);
  519. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  520. //cols.push(collast);
  521. var collast = { label: '出入库', name: 'BillType', width: 100, align: 'left' };
  522. cols.push(collast);
  523. var collast = { label: '备注', name: 'Remarks', width: 150, align: 'left' };
  524. cols.push(collast);
  525. var collast = { label: '基本计量单位', name: 'Unit', width: 120, align: 'left', };
  526. cols.push(collast);
  527. var collast = { label: '特殊库存标识', name: 'StockIndicator', width: 120, align: 'left', };
  528. cols.push(collast);
  529. var collast = { label: '备注项', name: 'RemarksTerm', width: 100, align: 'left' };
  530. cols.push(collast);
  531. var collast = { label: '区域类型', name: 'AreaType', width: 10, align: 'left', hidden: true };
  532. cols.push(collast);
  533. }
  534. //审核拒收单生成条码
  535. if (Type == '10') {
  536. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  537. cols.push(collast);
  538. var collast = { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' };
  539. cols.push(collast);
  540. var collast = { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' };
  541. cols.push(collast);
  542. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  543. cols.push(collast);
  544. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  545. cols.push(collast);
  546. var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
  547. cols.push(collast);
  548. var collast = { label: '料品编码', name: 'InvCode', width: 50, align: 'left' };
  549. cols.push(collast);
  550. var collast = { label: '物料描述', name: 'InvName', width: 120, align: 'left' };
  551. cols.push(collast);
  552. var collast = { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' };
  553. cols.push(collast);
  554. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left', hidden: true };
  555. cols.push(collast);
  556. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  557. cols.push(collast);
  558. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  559. cols.push(collast);
  560. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  561. cols.push(collast);
  562. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  563. cols.push(collast);
  564. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  565. cols.push(collast);
  566. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  567. cols.push(collast);
  568. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  569. cols.push(collast);
  570. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  571. cols.push(collast);
  572. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  573. cols.push(collast);
  574. }
  575. //审核委外拒收单生成条码
  576. if (Type == '11') {
  577. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  578. cols.push(collast);
  579. var collast = { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' };
  580. cols.push(collast);
  581. var collast = { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' };
  582. cols.push(collast);
  583. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  584. cols.push(collast);
  585. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  586. cols.push(collast);
  587. var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
  588. cols.push(collast);
  589. var collast = { label: '料品编码', name: 'InvCode', width: 50, align: 'left' };
  590. cols.push(collast);
  591. var collast = { label: '物料描述', name: 'InvName', width: 120, align: 'left' };
  592. cols.push(collast);
  593. var collast = { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' };
  594. cols.push(collast);
  595. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left', hidden: true };
  596. cols.push(collast);
  597. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  598. cols.push(collast);
  599. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  600. cols.push(collast);
  601. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  602. cols.push(collast);
  603. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  604. cols.push(collast);
  605. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  606. cols.push(collast);
  607. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  608. cols.push(collast);
  609. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  610. cols.push(collast);
  611. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  612. cols.push(collast);
  613. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  614. cols.push(collast);
  615. }
  616. //领料申请退料生成条码
  617. if (Type == '12') {
  618. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  619. cols.push(collast);
  620. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  621. cols.push(collast);
  622. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  623. cols.push(collast);
  624. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  625. cols.push(collast);
  626. var collast = { label: '区域', name: 'Area', width: 50, align: 'left' };
  627. cols.push(collast);
  628. var collast = { label: '仓库', name: 'WHCode', width: 50, align: 'left' };
  629. cols.push(collast);
  630. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  631. cols.push(collast);
  632. var collast = { label: '料品编码', name: 'InvName', width: 60, align: 'left', };
  633. cols.push(collast);
  634. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  635. cols.push(collast);
  636. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  637. cols.push(collast);
  638. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  639. cols.push(collast);
  640. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  641. cols.push(collast);
  642. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  643. cols.push(collast);
  644. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  645. //cols.push(collast);
  646. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  647. cols.push(collast);
  648. var collast = { label: '创建日期', name: 'CreateDateTime', width: 120, align: 'left', };
  649. cols.push(collast);
  650. var collast = { label: '区域类型', name: 'AreaType', width: 10, align: 'left', hidden: true };
  651. cols.push(collast);
  652. }
  653. //材料出库退料生成条码
  654. if (Type == '13') {
  655. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  656. cols.push(collast);
  657. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  658. cols.push(collast);
  659. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  660. cols.push(collast);
  661. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  662. cols.push(collast);
  663. var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
  664. cols.push(collast);
  665. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  666. cols.push(collast);
  667. var collast = { label: '料品编码', name: 'InvName', width: 60, align: 'left', };
  668. cols.push(collast);
  669. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  670. cols.push(collast);
  671. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  672. cols.push(collast);
  673. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  674. cols.push(collast);
  675. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  676. cols.push(collast);
  677. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  678. cols.push(collast);
  679. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  680. //cols.push(collast);
  681. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  682. cols.push(collast);
  683. }
  684. //委外领料申请退料生成条码
  685. if (Type == '14') {
  686. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  687. cols.push(collast);
  688. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  689. cols.push(collast);
  690. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  691. cols.push(collast);
  692. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  693. cols.push(collast);
  694. var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
  695. cols.push(collast);
  696. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  697. cols.push(collast);
  698. var collast = { label: '物料描述', name: 'InvName', width: 60, align: 'left', };
  699. cols.push(collast);
  700. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  701. cols.push(collast);
  702. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  703. cols.push(collast);
  704. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  705. cols.push(collast);
  706. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  707. cols.push(collast);
  708. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  709. cols.push(collast);
  710. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  711. //cols.push(collast);
  712. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  713. cols.push(collast);
  714. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  715. //cols.push(collast);
  716. }
  717. //委外材料出库退料生成条码
  718. if (Type == '15') {
  719. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  720. cols.push(collast);
  721. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  722. cols.push(collast);
  723. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  724. cols.push(collast);
  725. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  726. cols.push(collast);
  727. var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
  728. cols.push(collast);
  729. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  730. cols.push(collast);
  731. var collast = { label: '物料描述', name: 'InvName', width: 60, align: 'left', };
  732. cols.push(collast);
  733. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  734. cols.push(collast);
  735. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  736. cols.push(collast);
  737. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  738. cols.push(collast);
  739. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  740. cols.push(collast);
  741. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  742. cols.push(collast);
  743. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  744. cols.push(collast);
  745. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  746. cols.push(collast);
  747. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  748. cols.push(collast);
  749. }
  750. //返工工单生成条码
  751. if (Type == '16') {
  752. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  753. cols.push(collast);
  754. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  755. cols.push(collast);
  756. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  757. cols.push(collast);
  758. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  759. cols.push(collast);
  760. var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
  761. cols.push(collast);
  762. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  763. cols.push(collast);
  764. var collast = { label: '物料描述', name: 'InvName', width: 60, align: 'left', };
  765. cols.push(collast);
  766. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  767. cols.push(collast);
  768. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  769. cols.push(collast);
  770. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  771. cols.push(collast);
  772. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  773. cols.push(collast);
  774. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  775. cols.push(collast);
  776. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  777. //cols.push(collast);
  778. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  779. cols.push(collast);
  780. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  781. //cols.push(collast);
  782. }
  783. var cols1 = new Array();
  784. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  785. cols1.push(collast1);
  786. var collast1 = { label: "来源单据号", name: "TransCode", width: 200, align: 'left' };
  787. cols1.push(collast1);
  788. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' };
  789. cols1.push(collast1);
  790. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  791. cols1.push(collast1);
  792. var collast1 = { label: '条码数量', name: 'Quantity', width: 200, align: 'left' };
  793. cols1.push(collast1);
  794. var collast1 = { label: '操作人', name: 'MUSERName', width: 200, align: 'left' };
  795. cols1.push(collast1);
  796. var collast1 = { label: '操作时间', name: 'MTIME', width: 200, align: 'left' };
  797. cols1.push(collast1);
  798. if (data != null && data.length > 0) {
  799. DateList = data;
  800. for (var i = 0; i < data.length; i++) {
  801. var ColName = data[i].ColName;
  802. var ColCode = data[i].ColCode;
  803. var obj = new Array();
  804. obj = {
  805. label: ColName,
  806. name: ColCode,
  807. width: 80,
  808. align: "left"
  809. }
  810. cols.push(obj);
  811. cols1.push(obj);
  812. }
  813. }
  814. _Clos = cols;
  815. _Clos1 = cols1;
  816. }
  817. });
  818. }
  819. //生产退料
  820. function gridList() {
  821. var $gridList = $("#gridList");
  822. var queryJson = {
  823. POCode: $("#txt_POCode").val(),
  824. InvCode: $("#txt_InvCode").val(),
  825. InvName: $("#txt_InvName").val(),
  826. BatchCode: $("#txt_BatchCode").val(),
  827. Container: $("#txt_Container :checked").val(),
  828. }
  829. $gridList.dataGrid({
  830. url: "/WMS/WMSCreateItemLot/GetGridJson" + "?" + Math.random(),
  831. postData: { queryJson: JSON.stringify(queryJson) },
  832. height: $(window).height() - 200,
  833. width: $(window).width() - 300,
  834. colModel: _Clos,
  835. //colModel: [
  836. // { label: "主键", name: "ID", hidden: true, key: true },
  837. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  838. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  839. // { label: '工单子件', name: 'SourceDetailID', hidden: true, },
  840. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  841. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  842. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  843. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  844. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  845. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  846. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  847. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  848. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  849. //],
  850. //colModel: ColModelMain,
  851. width: "100%",
  852. autowidth: true,
  853. //shrinkToFit: true,
  854. gridComplete: function () {
  855. },
  856. pager: "#gridPager",
  857. sortname: 'ApplyNegCode',
  858. sortorder: "desc",
  859. viewrecords: true,
  860. multiselect: true,
  861. beforeSelectRow: function (rowid, e) {
  862. $("#gridList").jqGrid('resetSelection');
  863. return (true);
  864. },
  865. subGrid: true, // (1)开启子表格支持
  866. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  867. $("#gridList").jqGrid("setSelection", rowid, false);
  868. bindSubGrid(subgrid_id, rowid)
  869. }
  870. });
  871. $("#warehouse a.btn-default").click(function () {
  872. $("#warehouse a.btn-default").removeClass("active");
  873. $(this).addClass("active");
  874. $('#btn_search').trigger("click");
  875. });
  876. $("#btn_search").click(function () {
  877. var warehouse = $("#warehouse a.active").attr('data-value');
  878. var queryJson = {
  879. POCode: $("#txt_POCode").val(),
  880. InvCode: $("#txt_InvCode").val(),
  881. InvName: $("#txt_InvName").val(),
  882. BatchCode: $("#txt_BatchCode").val(),
  883. Container: $("#txt_Container :checked").val(),
  884. }
  885. $gridList.jqGrid('setGridParam', {
  886. page: 1,
  887. postData: { queryJson: JSON.stringify(queryJson) },
  888. }).trigger('reloadGrid');
  889. });
  890. }
  891. function bindSubGrid(subgrid_id, rowid) {
  892. $("#gridList").jqGrid("setSelection", rowid, false);
  893. var subgrid_table_id;
  894. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  895. var subgrid_pager_id;
  896. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  897. // (5)动态添加子报表的table和pager
  898. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  899. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  900. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  901. // (6)创建jqGrid对象
  902. $("#" + subgrid_table_id).dataGrid({
  903. cellEdit: true,
  904. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  905. //colModel: [
  906. // { label: "主键", name: "ID", hidden: true, key: true },
  907. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  908. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  909. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  910. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  911. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  912. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  913. //],
  914. colModel: _Clos1,
  915. //colModel: ColModelSub,
  916. shrinkToFit: true,//宽度自适应
  917. multiselect: true,
  918. prmNames: { search: "search" },
  919. viewrecords: true,
  920. height: "100%",
  921. rowNum: 20,
  922. pager: subgrid_pager_id,
  923. });
  924. }
  925. //委外退料
  926. function gridList2() {
  927. var $gridList = $("#gridList");
  928. var queryJson = {
  929. POCode: $("#txt_POCode").val(),
  930. InvCode: $("#txt_InvCode").val(),
  931. InvName: $("#txt_InvName").val(),
  932. BatchCode: $("#txt_BatchCode").val(),
  933. }
  934. $gridList.dataGrid({
  935. url: "/WMS/WMSCreateItemLot/GetGridJsonWeiWai" + "?" + Math.random(),
  936. postData: { queryJson: JSON.stringify(queryJson) },
  937. height: $(window).height() - 200,
  938. width: $(window).width() - 300,
  939. colModel: _Clos,
  940. //colModel: [
  941. // { label: "主键", name: "ID", hidden: true, key: true },
  942. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  943. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  944. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  945. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  946. // { label: '物料描述', name: 'InvName', width: 60, align: 'left', },
  947. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  948. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  949. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  950. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  951. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  952. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  953. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  954. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  955. //],
  956. //colModel: ColModelMain,
  957. width: "100%",
  958. autowidth: true,
  959. //shrinkToFit: true,
  960. gridComplete: function () {
  961. },
  962. pager: "#gridPager",
  963. sortname: 'OApplyNegCode',
  964. sortorder: "desc",
  965. viewrecords: true,
  966. multiselect: true,
  967. beforeSelectRow: function (rowid, e) {
  968. $("#gridList").jqGrid('resetSelection');
  969. return (true);
  970. },
  971. subGrid: true, // (1)开启子表格支持
  972. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  973. $("#gridList").jqGrid("setSelection", rowid, false);
  974. bindSubGrid2(subgrid_id, rowid)
  975. }
  976. });
  977. $("#warehouse a.btn-default").click(function () {
  978. $("#warehouse a.btn-default").removeClass("active");
  979. $(this).addClass("active");
  980. $('#btn_search').trigger("click");
  981. });
  982. $("#btn_search").click(function () {
  983. var warehouse = $("#warehouse a.active").attr('data-value');
  984. var queryJson = {
  985. POCode: $("#txt_POCode").val(),
  986. InvCode: $("#txt_InvCode").val(),
  987. InvName: $("#txt_InvName").val(),
  988. BatchCode: $("#txt_BatchCode").val(),
  989. }
  990. $gridList.jqGrid('setGridParam', {
  991. page: 1,
  992. postData: { queryJson: JSON.stringify(queryJson) },
  993. }).trigger('reloadGrid');
  994. });
  995. }
  996. function bindSubGrid2(subgrid_id, rowid) {
  997. $("#gridList").jqGrid("setSelection", rowid, false);
  998. var subgrid_table_id;
  999. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  1000. var subgrid_pager_id;
  1001. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  1002. // (5)动态添加子报表的table和pager
  1003. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  1004. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  1005. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  1006. // (6)创建jqGrid对象
  1007. $("#" + subgrid_table_id).dataGrid({
  1008. cellEdit: true,
  1009. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  1010. //colModel: [
  1011. // { label: "主键", name: "ID", hidden: true, key: true },
  1012. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  1013. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  1014. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  1015. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  1016. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  1017. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  1018. //],
  1019. colModel: _Clos1,
  1020. //colModel: ColModelSub,
  1021. shrinkToFit: true,//宽度自适应
  1022. multiselect: true,
  1023. prmNames: { search: "search" },
  1024. viewrecords: true,
  1025. height: "100%",
  1026. rowNum: 20,
  1027. pager: subgrid_pager_id,
  1028. });
  1029. }
  1030. //成品
  1031. function gridList3() {
  1032. var $gridList = $("#gridList");
  1033. var queryJson = {
  1034. POCode: $("#txt_POCode").val(),
  1035. InvCode: $("#txt_InvCode").val(),
  1036. InvName: $("#txt_InvName").val(),
  1037. BatchCode: $("#txt_BatchCode").val(),
  1038. Area: $("#txt_Area").val(),
  1039. Container: $("#txt_Container :checked").val(),
  1040. }
  1041. $gridList.dataGrid({
  1042. url: "/WMS/WMSCreateItemLot/GetGridJsonChengPing" + "?" + Math.random(),
  1043. postData: { queryJson: JSON.stringify(queryJson) },
  1044. height: $(window).height() - 200,
  1045. width: $(window).width() - 300,
  1046. colModel: _Clos,
  1047. //colModel: [
  1048. // { label: "主键", name: "ID", hidden: true, key: true },
  1049. // { label: '工单号', name: 'MOCode', width: 120, align: 'left' },
  1050. // { label: '工单行号', name: 'Sequence', width: 50, align: 'left' },
  1051. // { label: '已入库数量', name: 'RCVQuantity', hidden: true, },
  1052. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  1053. // { label: '物料描述', name: 'InvName', width: 60, align: 'left', },
  1054. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  1055. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  1056. // {
  1057. // label: "状态", name: "MOStatus", width: 60, align: "left",
  1058. // formatter: function (cellvalue) {
  1059. // if (cellvalue == "1") {
  1060. // return "初始";
  1061. // } else if (cellvalue == "2") {
  1062. // return "下发";
  1063. // }
  1064. // else if (cellvalue == "3") {
  1065. // return "关单";
  1066. // }
  1067. // else { return ""; }
  1068. // }
  1069. // },
  1070. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  1071. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  1072. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1073. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  1074. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1075. //],
  1076. //colModel: ColModelMain,
  1077. width: "100%",
  1078. autowidth: true,
  1079. //shrinkToFit: true,
  1080. gridComplete: function () {
  1081. },
  1082. pager: "#gridPager",
  1083. sortname: 'MOCode',
  1084. sortorder: "desc",
  1085. viewrecords: true,
  1086. multiselect: true,
  1087. beforeSelectRow: function (rowid, e) {
  1088. $("#gridList").jqGrid('resetSelection');
  1089. return (true);
  1090. },
  1091. subGrid: true, // (1)开启子表格支持
  1092. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  1093. $("#gridList").jqGrid("setSelection", rowid, false);
  1094. bindSubGrid3(subgrid_id, rowid)
  1095. }
  1096. });
  1097. $("#warehouse a.btn-default").click(function () {
  1098. $("#warehouse a.btn-default").removeClass("active");
  1099. $(this).addClass("active");
  1100. $('#btn_search').trigger("click");
  1101. });
  1102. $("#btn_search").click(function () {
  1103. var warehouse = $("#warehouse a.active").attr('data-value');
  1104. var queryJson = {
  1105. POCode: $("#txt_POCode").val(),
  1106. InvCode: $("#txt_InvCode").val(),
  1107. InvName: $("#txt_InvName").val(),
  1108. BatchCode: $("#txt_BatchCode").val(),
  1109. Area: $("#txt_Area").val(),
  1110. Container: $("#txt_Container :checked").val(),
  1111. }
  1112. $gridList.jqGrid('setGridParam', {
  1113. page: 1,
  1114. postData: { queryJson: JSON.stringify(queryJson) },
  1115. }).trigger('reloadGrid');
  1116. });
  1117. }
  1118. function bindSubGrid3(subgrid_id, rowid) {
  1119. $("#gridList").jqGrid("setSelection", rowid, false);
  1120. var subgrid_table_id;
  1121. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  1122. var subgrid_pager_id;
  1123. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  1124. // (5)动态添加子报表的table和pager
  1125. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  1126. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  1127. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  1128. // (6)创建jqGrid对象
  1129. $("#" + subgrid_table_id).dataGrid({
  1130. cellEdit: true,
  1131. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  1132. //colModel: [
  1133. // { label: "主键", name: "ID", hidden: true, key: true },
  1134. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  1135. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  1136. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  1137. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  1138. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  1139. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  1140. //],
  1141. colModel: _Clos1,
  1142. //colModel: ColModelSub,
  1143. shrinkToFit: true,//宽度自适应
  1144. multiselect: true,
  1145. prmNames: { search: "search" },
  1146. viewrecords: true,
  1147. height: "100%",
  1148. rowNum: 20,
  1149. pager: subgrid_pager_id,
  1150. });
  1151. }
  1152. //销售退货
  1153. function gridList4() {
  1154. var $gridList = $("#gridList");
  1155. var queryJson = {
  1156. POCode: $("#txt_POCode").val(),
  1157. InvCode: $("#txt_InvCode").val(),
  1158. InvName: $("#txt_InvName").val(),
  1159. BatchCode: $("#txt_BatchCode").val(),
  1160. Area: $("#txt_Area").val(),
  1161. Location: $("#txt_Location").val(),
  1162. Container: $("#txt_Container :checked").val(),
  1163. }
  1164. $gridList.dataGrid({
  1165. url: "/WMS/WMSCreateItemLot/GetGridJsonXiaoShou" + "?" + Math.random(),
  1166. postData: { queryJson: JSON.stringify(queryJson) },
  1167. height: $(window).height() - 200,
  1168. width: $(window).width() - 300,
  1169. colModel: _Clos,
  1170. //colModel: [
  1171. // { label: "主键", name: "ID", hidden: true, key: true },
  1172. // { label: '单据号', name: 'SDNCode', width: 120, align: 'left' },
  1173. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  1174. // { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' },
  1175. // { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' },
  1176. // { label: '客户代码', name: 'CusCode', width: 120, align: 'left' },
  1177. // { label: '客户名称', name: 'CusName', width: 50, align: 'left' },
  1178. // { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' },
  1179. // { label: '已发数量', name: 'SDNQuantity', width: 50, align: 'left' },
  1180. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  1181. // { label: '物料描述', name: 'InvName', width: 60, align: 'left', },
  1182. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  1183. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  1184. // {
  1185. // label: "状态", name: "Status", width: 60, align: "left",
  1186. // formatter: function (cellvalue) {
  1187. // if (cellvalue == "1") {
  1188. // return "开立";
  1189. // } else if (cellvalue == "2") {
  1190. // return "审核";
  1191. // }
  1192. // else if (cellvalue == "3") {
  1193. // return "关闭";
  1194. // }
  1195. // else { return ""; }
  1196. // }
  1197. // },
  1198. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  1199. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  1200. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1201. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  1202. //],
  1203. //colModel: ColModelMain,
  1204. width: "100%",
  1205. autowidth: true,
  1206. //shrinkToFit: true,
  1207. gridComplete: function () {
  1208. },
  1209. pager: "#gridPager",
  1210. sortname: 'SDNCode',
  1211. sortorder: "desc",
  1212. viewrecords: true,
  1213. multiselect: true,
  1214. beforeSelectRow: function (rowid, e) {
  1215. $("#gridList").jqGrid('resetSelection');
  1216. return (true);
  1217. },
  1218. subGrid: true, // (1)开启子表格支持
  1219. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  1220. $("#gridList").jqGrid("setSelection", rowid, false);
  1221. bindSubGrid4(subgrid_id, rowid)
  1222. }
  1223. });
  1224. $("#warehouse a.btn-default").click(function () {
  1225. $("#warehouse a.btn-default").removeClass("active");
  1226. $(this).addClass("active");
  1227. $('#btn_search').trigger("click");
  1228. });
  1229. $("#btn_search").click(function () {
  1230. var warehouse = $("#warehouse a.active").attr('data-value');
  1231. var queryJson = {
  1232. POCode: $("#txt_POCode").val(),
  1233. InvCode: $("#txt_InvCode").val(),
  1234. InvName: $("#txt_InvName").val(),
  1235. BatchCode: $("#txt_BatchCode").val(),
  1236. Area: $("#txt_Area").val(),
  1237. Location: $("#txt_Location").val(),
  1238. Container: $("#txt_Container :checked").val(),
  1239. }
  1240. $gridList.jqGrid('setGridParam', {
  1241. page: 1,
  1242. postData: { queryJson: JSON.stringify(queryJson) },
  1243. }).trigger('reloadGrid');
  1244. });
  1245. }
  1246. function bindSubGrid4(subgrid_id, rowid) {
  1247. $("#gridList").jqGrid("setSelection", rowid, false);
  1248. var subgrid_table_id;
  1249. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  1250. var subgrid_pager_id;
  1251. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  1252. // (5)动态添加子报表的table和pager
  1253. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  1254. var SDNCode = $("#gridList").jqGrid('getRowData', rowid).SDNCode;
  1255. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  1256. // (6)创建jqGrid对象
  1257. $("#" + subgrid_table_id).dataGrid({
  1258. cellEdit: true,
  1259. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SDNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  1260. //colModel: [
  1261. // { label: "主键", name: "ID", hidden: true, key: true },
  1262. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  1263. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  1264. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  1265. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  1266. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  1267. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  1268. //],
  1269. colModel: _Clos1,
  1270. //colModel: ColModelSub,
  1271. shrinkToFit: true,//宽度自适应
  1272. multiselect: true,
  1273. prmNames: { search: "search" },
  1274. viewrecords: true,
  1275. height: "100%",
  1276. rowNum: 20,
  1277. pager: subgrid_pager_id,
  1278. });
  1279. }
  1280. //其它入库生成条码
  1281. function gridList5() {
  1282. var $gridList = $("#gridList");
  1283. var queryJson = {
  1284. POCode: $("#txt_POCode").val(),
  1285. InvCode: $("#txt_InvCode").val(),
  1286. InvName: $("#txt_InvName").val(),
  1287. BatchCode: $("#txt_BatchCode").val(),
  1288. Area: $("#txt_Area").val(),
  1289. Location: $("#txt_Location").val(),
  1290. Container: $("#txt_Container :checked").val(),
  1291. }
  1292. $gridList.dataGrid({
  1293. url: "/WMS/WMSCreateItemLot/GetGridJsonQiTa" + "?" + Math.random(),
  1294. postData: { queryJson: JSON.stringify(queryJson) },
  1295. height: $(window).height() - 200,
  1296. width: $(window).width() - 300,
  1297. colModel: _Clos,
  1298. //colModel: [
  1299. // { label: "主键", name: "ID", hidden: true, key: true },
  1300. // { label: '单据号', name: 'InCode', width: 120, align: 'left' },
  1301. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  1302. // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' },
  1303. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  1304. // { label: '物料描述', name: 'InvName', width: 120, align: 'left' },
  1305. // { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' },
  1306. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  1307. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  1308. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  1309. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  1310. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  1311. // { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', },
  1312. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  1313. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  1314. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1315. //],
  1316. //colModel: ColModelMain,
  1317. width: "100%",
  1318. autowidth: true,
  1319. //shrinkToFit: true,
  1320. gridComplete: function () {
  1321. },
  1322. pager: "#gridPager",
  1323. sortname: 'InCode',
  1324. sortorder: "desc",
  1325. viewrecords: true,
  1326. multiselect: true,
  1327. beforeSelectRow: function (rowid, e) {
  1328. $("#gridList").jqGrid('resetSelection');
  1329. return (true);
  1330. },
  1331. subGrid: true, // (1)开启子表格支持
  1332. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  1333. $("#gridList").jqGrid("setSelection", rowid, false);
  1334. bindSubGrid5(subgrid_id, rowid)
  1335. }
  1336. });
  1337. $("#warehouse a.btn-default").click(function () {
  1338. $("#warehouse a.btn-default").removeClass("active");
  1339. $(this).addClass("active");
  1340. $('#btn_search').trigger("click");
  1341. });
  1342. $("#btn_search").click(function () {
  1343. var warehouse = $("#warehouse a.active").attr('data-value');
  1344. var queryJson = {
  1345. POCode: $("#txt_POCode").val(),
  1346. InvCode: $("#txt_InvCode").val(),
  1347. InvName: $("#txt_InvName").val(),
  1348. BatchCode: $("#txt_BatchCode").val(),
  1349. Area: $("#txt_Area").val(),
  1350. Location: $("#txt_Location").val(),
  1351. Container: $("#txt_Container :checked").val(),
  1352. }
  1353. $gridList.jqGrid('setGridParam', {
  1354. page: 1,
  1355. postData: { queryJson: JSON.stringify(queryJson) },
  1356. }).trigger('reloadGrid');
  1357. });
  1358. }
  1359. function bindSubGrid5(subgrid_id, rowid) {
  1360. $("#gridList").jqGrid("setSelection", rowid, false);
  1361. var subgrid_table_id;
  1362. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  1363. var subgrid_pager_id;
  1364. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  1365. // (5)动态添加子报表的table和pager
  1366. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  1367. var InCode = $("#gridList").jqGrid('getRowData', rowid).InCode;
  1368. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  1369. // (6)创建jqGrid对象
  1370. $("#" + subgrid_table_id).dataGrid({
  1371. cellEdit: true,
  1372. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + InCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  1373. //colModel: [
  1374. // { label: "主键", name: "ID", hidden: true, key: true },
  1375. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  1376. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  1377. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  1378. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  1379. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  1380. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  1381. //],
  1382. colModel: _Clos1,
  1383. //colModel: ColModelSub,
  1384. shrinkToFit: true,//宽度自适应
  1385. multiselect: true,
  1386. prmNames: { search: "search" },
  1387. viewrecords: true,
  1388. height: "100%",
  1389. rowNum: 20,
  1390. pager: subgrid_pager_id,
  1391. });
  1392. }
  1393. //归还单生成条码
  1394. function gridList6() {
  1395. var $gridList = $("#gridList");
  1396. var queryJson = {
  1397. POCode: $("#txt_POCode").val(),
  1398. InvCode: $("#txt_InvCode").val(),
  1399. InvName: $("#txt_InvName").val(),
  1400. BatchCode: $("#txt_BatchCode").val(),
  1401. Area: $("#txt_Area").val(),
  1402. }
  1403. $gridList.dataGrid({
  1404. url: "/WMS/WMSCreateItemLot/GetGridJsonGuiHuan" + "?" + Math.random(),
  1405. postData: { queryJson: JSON.stringify(queryJson) },
  1406. height: $(window).height() - 200,
  1407. width: $(window).width() - 300,
  1408. colModel: _Clos,
  1409. //colModel: [
  1410. // { label: "主键", name: "ID", hidden: true, key: true },
  1411. // { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' },
  1412. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  1413. // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' },
  1414. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  1415. // { label: '物料描述', name: 'InvName', width: 120, align: 'left' },
  1416. // { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' },
  1417. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  1418. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  1419. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  1420. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  1421. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  1422. // { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', },
  1423. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  1424. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  1425. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1426. //],
  1427. //colModel: ColModelMain,
  1428. width: "100%",
  1429. autowidth: true,
  1430. //shrinkToFit: true,
  1431. gridComplete: function () {
  1432. },
  1433. pager: "#gridPager",
  1434. sortname: 'ReturnCode',
  1435. sortorder: "desc",
  1436. viewrecords: true,
  1437. multiselect: true,
  1438. beforeSelectRow: function (rowid, e) {
  1439. $("#gridList").jqGrid('resetSelection');
  1440. return (true);
  1441. },
  1442. subGrid: true, // (1)开启子表格支持
  1443. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  1444. $("#gridList").jqGrid("setSelection", rowid, false);
  1445. bindSubGrid6(subgrid_id, rowid)
  1446. }
  1447. });
  1448. $("#warehouse a.btn-default").click(function () {
  1449. $("#warehouse a.btn-default").removeClass("active");
  1450. $(this).addClass("active");
  1451. $('#btn_search').trigger("click");
  1452. });
  1453. $("#btn_search").click(function () {
  1454. var warehouse = $("#warehouse a.active").attr('data-value');
  1455. var queryJson = {
  1456. POCode: $("#txt_POCode").val(),
  1457. InvCode: $("#txt_InvCode").val(),
  1458. InvName: $("#txt_InvName").val(),
  1459. BatchCode: $("#txt_BatchCode").val(),
  1460. Area: $("#txt_Area").val(),
  1461. }
  1462. $gridList.jqGrid('setGridParam', {
  1463. page: 1,
  1464. postData: { queryJson: JSON.stringify(queryJson) },
  1465. }).trigger('reloadGrid');
  1466. });
  1467. }
  1468. function bindSubGrid6(subgrid_id, rowid) {
  1469. $("#gridList").jqGrid("setSelection", rowid, false);
  1470. var subgrid_table_id;
  1471. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  1472. var subgrid_pager_id;
  1473. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  1474. // (5)动态添加子报表的table和pager
  1475. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  1476. var ReturnCode = $("#gridList").jqGrid('getRowData', rowid).ReturnCode;
  1477. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  1478. // (6)创建jqGrid对象
  1479. $("#" + subgrid_table_id).dataGrid({
  1480. cellEdit: true,
  1481. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ReturnCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  1482. //colModel: [
  1483. // { label: "主键", name: "ID", hidden: true, key: true },
  1484. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  1485. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  1486. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  1487. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  1488. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  1489. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  1490. //],
  1491. colModel: _Clos1,
  1492. //colModel: ColModelSub,
  1493. shrinkToFit: true,//宽度自适应
  1494. multiselect: true,
  1495. prmNames: { search: "search" },
  1496. viewrecords: true,
  1497. height: "100%",
  1498. rowNum: 20,
  1499. pager: subgrid_pager_id,
  1500. });
  1501. }
  1502. //*审核到货单生成条码
  1503. function gridList7() {
  1504. debugger;
  1505. var $gridList = $("#gridList");
  1506. var queryJson = {
  1507. POCode: $("#txt_POCode").val(),
  1508. VenCode: $("#txt_VenCode").val(),
  1509. VenName: $("#txt_VenName").val(),
  1510. Area: $("#txt_Area").val(),
  1511. Location: $("#txt_Location").val(),
  1512. InvCode: $("#txt_InvCode").val(),
  1513. InvName: $("#txt_InvName").val(),
  1514. BatchCode: $("#txt_BatchCode").val(),
  1515. Container: $("#txt_Container :checked").val(),
  1516. }
  1517. $gridList.dataGrid({
  1518. url: "/WMS/WMSCreateItemLot/GetGridJsonSHDH" + "?" + Math.random(),
  1519. postData: { queryJson: JSON.stringify(queryJson) },
  1520. height: $(window).height() - 200,
  1521. width: $(window).width() - 300,
  1522. colModel: _Clos,
  1523. //colModel: [
  1524. // { label: "主键", name: "ID", hidden: true, key: true },
  1525. // { label: '单据号', name: 'DNCode', width: 120, align: 'left' },
  1526. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  1527. // { label: '采购订单号', name: 'POCode', width: 50, align: 'left' },
  1528. // { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' },
  1529. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  1530. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  1531. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  1532. // { label: '物料描述', name: 'InvName', width: 120, align: 'left' },
  1533. // { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' },
  1534. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  1535. // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' },
  1536. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  1537. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1538. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  1539. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  1540. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  1541. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  1542. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  1543. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  1544. //],
  1545. //colModel: ColModelMain,
  1546. width: "100%",
  1547. autowidth: true,
  1548. //shrinkToFit: true,
  1549. gridComplete: function () {
  1550. },
  1551. pager: "#gridPager",
  1552. sortname: 'DNCode',
  1553. sortorder: "desc",
  1554. viewrecords: true,
  1555. multiselect: true,
  1556. beforeSelectRow: function (rowid, e) {
  1557. },
  1558. subGrid: true, // (1)开启子表格支持
  1559. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  1560. $("#gridList").jqGrid("setSelection", rowid, false);
  1561. bindSubGrid7(subgrid_id, rowid)
  1562. }
  1563. });
  1564. $("#warehouse a.btn-default").click(function () {
  1565. $("#warehouse a.btn-default").removeClass("active");
  1566. $(this).addClass("active");
  1567. $('#btn_search').trigger("click");
  1568. });
  1569. $("#btn_search").click(function () {
  1570. var warehouse = $("#warehouse a.active").attr('data-value');
  1571. var queryJson = {
  1572. POCode: $("#txt_POCode").val(),
  1573. VenCode: $("#txt_VenCode").val(),
  1574. VenName: $("#txt_VenName").val(),
  1575. Area: $("#txt_Area").val(),
  1576. Location: $("#txt_Location").val(),
  1577. InvCode: $("#txt_InvCode").val(),
  1578. InvName: $("#txt_InvName").val(),
  1579. BatchCode: $("#txt_BatchCode").val(),
  1580. Container: $("#txt_Container :checked").val(),
  1581. }
  1582. $gridList.jqGrid('setGridParam', {
  1583. postData: { queryJson: JSON.stringify(queryJson) },
  1584. page: 1,
  1585. }).trigger('reloadGrid');
  1586. });
  1587. }
  1588. function bindSubGrid7(subgrid_id, rowid) {
  1589. $("#gridList").jqGrid("setSelection", rowid, false);
  1590. var subgrid_table_id;
  1591. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  1592. var subgrid_pager_id;
  1593. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  1594. // (5)动态添加子报表的table和pager
  1595. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  1596. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  1597. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  1598. // (6)创建jqGrid对象
  1599. $("#" + subgrid_table_id).dataGrid({
  1600. cellEdit: true,
  1601. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  1602. //colModel: [
  1603. // { label: "主键", name: "ID", hidden: true, key: true },
  1604. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  1605. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  1606. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  1607. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  1608. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  1609. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  1610. //],
  1611. colModel: _Clos1,
  1612. //colModel: ColModelSub,
  1613. shrinkToFit: true,//宽度自适应
  1614. multiselect: true,
  1615. prmNames: { search: "search" },
  1616. viewrecords: true,
  1617. height: "100%",
  1618. rowNum: 20,
  1619. pager: subgrid_pager_id,
  1620. });
  1621. }
  1622. //审核委外到货单生成条码
  1623. function gridList8() {
  1624. var $gridList = $("#gridList");
  1625. var queryJson = {
  1626. POCode: $("#txt_POCode").val(),
  1627. VenCode: $("#txt_VenCode").val(),
  1628. VenName: $("#txt_VenName").val(),
  1629. InvCode: $("#txt_InvCode").val(),
  1630. InvName: $("#txt_InvName").val(),
  1631. BatchCode: $("#txt_BatchCode").val(),
  1632. Area: $("#txt_Area").val(),
  1633. Container: $("#txt_Container :checked").val(),
  1634. }
  1635. $gridList.dataGrid({
  1636. url: "/WMS/WMSCreateItemLot/GetGridJsonWWSHDH" + "?" + Math.random(),
  1637. postData: { queryJson: JSON.stringify(queryJson) },
  1638. height: $(window).height() - 200,
  1639. width: $(window).width() - 300,
  1640. colModel: _Clos,
  1641. //colModel: [
  1642. // { label: "主键", name: "ID", hidden: true, key: true },
  1643. // { label: '单据号', name: 'ODNCode', width: 120, align: 'left' },
  1644. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  1645. // { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' },
  1646. // { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' },
  1647. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  1648. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  1649. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  1650. // { label: '物料描述', name: 'InvName', width: 120, align: 'left' },
  1651. // { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' },
  1652. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  1653. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  1654. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  1655. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1656. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  1657. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  1658. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  1659. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  1660. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  1661. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  1662. //],
  1663. //colModel: ColModelMain,
  1664. width: "100%",
  1665. autowidth: true,
  1666. //shrinkToFit: true,
  1667. gridComplete: function () {
  1668. },
  1669. pager: "#gridPager",
  1670. sortname: 'ODNCode',
  1671. sortorder: "desc",
  1672. viewrecords: true,
  1673. multiselect: true,
  1674. beforeSelectRow: function (rowid, e) {
  1675. $("#gridList").jqGrid('resetSelection');
  1676. return (true);
  1677. },
  1678. subGrid: true, // (1)开启子表格支持
  1679. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  1680. $("#gridList").jqGrid("setSelection", rowid, false);
  1681. bindSubGrid8(subgrid_id, rowid)
  1682. }
  1683. });
  1684. $("#warehouse a.btn-default").click(function () {
  1685. $("#warehouse a.btn-default").removeClass("active");
  1686. $(this).addClass("active");
  1687. $('#btn_search').trigger("click");
  1688. });
  1689. $("#btn_search").click(function () {
  1690. var warehouse = $("#warehouse a.active").attr('data-value');
  1691. var queryJson = {
  1692. POCode: $("#txt_POCode").val(),
  1693. VenCode: $("#txt_VenCode").val(),
  1694. VenName: $("#txt_VenName").val(),
  1695. InvCode: $("#txt_InvCode").val(),
  1696. InvName: $("#txt_InvName").val(),
  1697. BatchCode: $("#txt_BatchCode").val(),
  1698. Area: $("#txt_Area").val(),
  1699. Container: $("#txt_Container :checked").val(),
  1700. }
  1701. $gridList.jqGrid('setGridParam', {
  1702. page: 1,
  1703. postData: { queryJson: JSON.stringify(queryJson) },
  1704. }).trigger('reloadGrid');
  1705. });
  1706. }
  1707. function bindSubGrid8(subgrid_id, rowid) {
  1708. $("#gridList").jqGrid("setSelection", rowid, false);
  1709. var subgrid_table_id;
  1710. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  1711. var subgrid_pager_id;
  1712. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  1713. // (5)动态添加子报表的table和pager
  1714. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  1715. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).ODNCode;
  1716. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  1717. // (6)创建jqGrid对象
  1718. $("#" + subgrid_table_id).dataGrid({
  1719. cellEdit: true,
  1720. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  1721. //colModel: [
  1722. // { label: "主键", name: "ID", hidden: true, key: true },
  1723. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  1724. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  1725. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  1726. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  1727. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  1728. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  1729. //],
  1730. colModel: _Clos1,
  1731. //colModel: ColModelSub,
  1732. shrinkToFit: true,//宽度自适应
  1733. multiselect: true,
  1734. prmNames: { search: "search" },
  1735. viewrecords: true,
  1736. height: "100%",
  1737. rowNum: 20,
  1738. pager: subgrid_pager_id,
  1739. });
  1740. }
  1741. //开立得成品入库单 生成条码
  1742. function gridList9() {
  1743. var $gridList = $("#gridList");
  1744. var queryJson = {
  1745. POCode: $("#txt_POCode").val(),
  1746. OrderNumber: $("#txt_OrderNumber").val(),
  1747. Area: $("#txt_Area").val(),
  1748. InvCode: $("#txt_InvCode").val(),
  1749. InvName: $("#txt_InvName").val(),
  1750. BatchCode: $("#txt_BatchCode").val(),
  1751. Container: $("#txt_Container :checked").val(),
  1752. }
  1753. $gridList.dataGrid({
  1754. url: "/WMS/WMSCreateItemLot/GetGridJsonKLCPRK" + "?" + Math.random(),
  1755. postData: { queryJson: JSON.stringify(queryJson) },
  1756. height: $(window).height() - 200,
  1757. width: $(window).width() - 300,
  1758. colModel: _Clos,
  1759. //colModel: [
  1760. // { label: "主键", name: "ID", hidden: true, key: true },
  1761. // { label: '单据号', name: 'RCVCode', width: 120, align: 'left' },
  1762. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  1763. // { label: '仓库号', name: 'WHCode', width: 120, align: 'left' },
  1764. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  1765. // { label: '物料描述', name: 'InvName', width: 120, align: 'left' },
  1766. // { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' },
  1767. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  1768. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  1769. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  1770. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1771. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  1772. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  1773. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  1774. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  1775. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  1776. //],
  1777. //colModel: ColModelMain,
  1778. width: "100%",
  1779. autowidth: true,
  1780. //shrinkToFit: true,
  1781. gridComplete: function () {
  1782. },
  1783. pager: "#gridPager",
  1784. sortname: 'RCVCode',
  1785. sortorder: "desc",
  1786. viewrecords: true,
  1787. multiselect: true,
  1788. beforeSelectRow: function (rowid, e) {
  1789. },
  1790. subGrid: true, // (1)开启子表格支持
  1791. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  1792. $("#gridList").jqGrid("setSelection", rowid, false);
  1793. bindSubGrid9(subgrid_id, rowid)
  1794. }
  1795. });
  1796. $("#warehouse a.btn-default").click(function () {
  1797. $("#warehouse a.btn-default").removeClass("active");
  1798. $(this).addClass("active");
  1799. $('#btn_search').trigger("click");
  1800. });
  1801. $("#btn_search").click(function () {
  1802. var warehouse = $("#warehouse a.active").attr('data-value');
  1803. var queryJson = {
  1804. POCode: $("#txt_POCode").val(),
  1805. OrderNumber: $("#txt_OrderNumber").val(),
  1806. Area: $("#txt_Area").val(),
  1807. InvCode: $("#txt_InvCode").val(),
  1808. InvName: $("#txt_InvName").val(),
  1809. BatchCode: $("#txt_BatchCode").val(),
  1810. Container: $("#txt_Container :checked").val(),
  1811. }
  1812. $gridList.jqGrid('setGridParam', {
  1813. page: 1,
  1814. postData: { queryJson: JSON.stringify(queryJson) },
  1815. }).trigger('reloadGrid');
  1816. });
  1817. }
  1818. function bindSubGrid9(subgrid_id, rowid) {
  1819. $("#gridList").jqGrid("setSelection", rowid, false);
  1820. var subgrid_table_id;
  1821. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  1822. var subgrid_pager_id;
  1823. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  1824. // (5)动态添加子报表的table和pager
  1825. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  1826. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  1827. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  1828. // (6)创建jqGrid对象
  1829. $("#" + subgrid_table_id).dataGrid({
  1830. cellEdit: true,
  1831. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  1832. //colModel: [
  1833. // { label: "主键", name: "ID", hidden: true, key: true },
  1834. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  1835. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  1836. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  1837. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  1838. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  1839. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  1840. //],
  1841. colModel: _Clos1,
  1842. //colModel: ColModelSub,
  1843. shrinkToFit: true,//宽度自适应
  1844. multiselect: true,
  1845. prmNames: { search: "search" },
  1846. viewrecords: true,
  1847. height: "100%",
  1848. rowNum: 20,
  1849. pager: subgrid_pager_id,
  1850. });
  1851. }
  1852. //采购拒收单
  1853. function gridList10() {
  1854. var $gridList = $("#gridList");
  1855. var queryJson = {
  1856. POCode: $("#txt_POCode").val(),
  1857. VenCode: $("#txt_VenCode").val(),
  1858. VenName: $("#txt_VenName").val(),
  1859. InvCode: $("#txt_InvCode").val(),
  1860. InvName: $("#txt_InvName").val(),
  1861. BatchCode: $("#txt_BatchCode").val(),
  1862. Area: $("#txt_Area").val(),
  1863. }
  1864. $gridList.dataGrid({
  1865. url: "/WMS/WMSCreateItemLot/GetGridJsonJSD" + "?" + Math.random(),
  1866. postData: { queryJson: JSON.stringify(queryJson) },
  1867. height: $(window).height() - 200,
  1868. width: $(window).width() - 300,
  1869. colModel: _Clos,
  1870. //colModel: [
  1871. // { label: "主键", name: "ID", hidden: true, key: true },
  1872. // { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' },
  1873. // { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' },
  1874. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  1875. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  1876. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  1877. // { label: '物料描述', name: 'InvName', width: 120, align: 'left' },
  1878. // { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' },
  1879. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  1880. // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' },
  1881. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  1882. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1883. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  1884. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  1885. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  1886. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  1887. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  1888. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  1889. //],
  1890. //colModel: ColModelMain,
  1891. width: "100%",
  1892. autowidth: true,
  1893. //shrinkToFit: true,
  1894. gridComplete: function () {
  1895. },
  1896. pager: "#gridPager",
  1897. sortname: 'DNCode',
  1898. sortorder: "desc",
  1899. viewrecords: true,
  1900. multiselect: true,
  1901. beforeSelectRow: function (rowid, e) {
  1902. $("#gridList").jqGrid('resetSelection');
  1903. return (true);
  1904. },
  1905. subGrid: true, // (1)开启子表格支持
  1906. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  1907. $("#gridList").jqGrid("setSelection", rowid, false);
  1908. bindSubGrid10(subgrid_id, rowid)
  1909. }
  1910. });
  1911. $("#warehouse a.btn-default").click(function () {
  1912. $("#warehouse a.btn-default").removeClass("active");
  1913. $(this).addClass("active");
  1914. $('#btn_search').trigger("click");
  1915. });
  1916. $("#btn_search").click(function () {
  1917. var warehouse = $("#warehouse a.active").attr('data-value');
  1918. var queryJson = {
  1919. POCode: $("#txt_POCode").val(),
  1920. VenCode: $("#txt_VenCode").val(),
  1921. VenName: $("#txt_VenName").val(),
  1922. InvCode: $("#txt_InvCode").val(),
  1923. InvName: $("#txt_InvName").val(),
  1924. BatchCode: $("#txt_BatchCode").val(),
  1925. Area: $("#txt_Area").val(),
  1926. }
  1927. $gridList.jqGrid('setGridParam', {
  1928. page: 1,
  1929. postData: { queryJson: JSON.stringify(queryJson) },
  1930. }).trigger('reloadGrid');
  1931. });
  1932. }
  1933. function bindSubGrid10(subgrid_id, rowid) {
  1934. $("#gridList").jqGrid("setSelection", rowid, false);
  1935. var subgrid_table_id;
  1936. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  1937. var subgrid_pager_id;
  1938. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  1939. // (5)动态添加子报表的table和pager
  1940. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  1941. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  1942. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  1943. // (6)创建jqGrid对象
  1944. $("#" + subgrid_table_id).dataGrid({
  1945. cellEdit: true,
  1946. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  1947. //colModel: [
  1948. // { label: "主键", name: "ID", hidden: true, key: true },
  1949. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  1950. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  1951. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  1952. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  1953. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  1954. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  1955. //],
  1956. colModel: _Clos1,
  1957. //colModel: ColModelSub,
  1958. shrinkToFit: true,//宽度自适应
  1959. multiselect: true,
  1960. prmNames: { search: "search" },
  1961. viewrecords: true,
  1962. height: "100%",
  1963. rowNum: 20,
  1964. pager: subgrid_pager_id,
  1965. });
  1966. }
  1967. //委外拒收单生成条码
  1968. function gridList11() {
  1969. var $gridList = $("#gridList");
  1970. var queryJson = {
  1971. POCode: $("#txt_POCode").val(),
  1972. VenCode: $("#txt_VenCode").val(),
  1973. VenName: $("#txt_VenName").val(),
  1974. InvCode: $("#txt_InvCode").val(),
  1975. InvName: $("#txt_InvName").val(),
  1976. BatchCode: $("#txt_BatchCode").val(),
  1977. Area: $("#txt_Area").val(),
  1978. }
  1979. $gridList.dataGrid({
  1980. url: "/WMS/WMSCreateItemLot/GetGridJsonWWJSD" + "?" + Math.random(),
  1981. postData: { queryJson: JSON.stringify(queryJson) },
  1982. height: $(window).height() - 200,
  1983. width: $(window).width() - 300,
  1984. colModel: _Clos,
  1985. //colModel: [
  1986. // { label: "主键", name: "ID", hidden: true, key: true },
  1987. // { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' },
  1988. // { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' },
  1989. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  1990. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  1991. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  1992. // { label: '物料描述', name: 'InvName', width: 120, align: 'left' },
  1993. // { label: '辅助描述', name: 'InvDesc', width: 50, align: 'left' },
  1994. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  1995. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  1996. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  1997. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1998. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  1999. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2000. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  2001. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  2002. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2003. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2004. //],
  2005. //colModel: ColModelMain,
  2006. width: "100%",
  2007. autowidth: true,
  2008. //shrinkToFit: true,
  2009. gridComplete: function () {
  2010. },
  2011. pager: "#gridPager",
  2012. sortname: 'OOCode',
  2013. sortorder: "desc",
  2014. viewrecords: true,
  2015. multiselect: true,
  2016. beforeSelectRow: function (rowid, e) {
  2017. $("#gridList").jqGrid('resetSelection');
  2018. return (true);
  2019. },
  2020. subGrid: true, // (1)开启子表格支持
  2021. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2022. $("#gridList").jqGrid("setSelection", rowid, false);
  2023. bindSubGrid11(subgrid_id, rowid)
  2024. }
  2025. });
  2026. $("#warehouse a.btn-default").click(function () {
  2027. $("#warehouse a.btn-default").removeClass("active");
  2028. $(this).addClass("active");
  2029. $('#btn_search').trigger("click");
  2030. });
  2031. $("#btn_search").click(function () {
  2032. var warehouse = $("#warehouse a.active").attr('data-value');
  2033. var queryJson = {
  2034. POCode: $("#txt_POCode").val(),
  2035. VenCode: $("#txt_VenCode").val(),
  2036. VenName: $("#txt_VenName").val(),
  2037. InvCode: $("#txt_InvCode").val(),
  2038. InvName: $("#txt_InvName").val(),
  2039. BatchCode: $("#txt_BatchCode").val(),
  2040. Area: $("#txt_Area").val(),
  2041. }
  2042. $gridList.jqGrid('setGridParam', {
  2043. page: 1,
  2044. postData: { queryJson: JSON.stringify(queryJson) },
  2045. }).trigger('reloadGrid');
  2046. });
  2047. }
  2048. function bindSubGrid11(subgrid_id, rowid) {
  2049. $("#gridList").jqGrid("setSelection", rowid, false);
  2050. var subgrid_table_id;
  2051. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2052. var subgrid_pager_id;
  2053. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2054. // (5)动态添加子报表的table和pager
  2055. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2056. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).OOCode;
  2057. var Sequence = $("#gridList").jqGrid('getRowData', rowid).OOSequence;
  2058. // (6)创建jqGrid对象
  2059. $("#" + subgrid_table_id).dataGrid({
  2060. cellEdit: true,
  2061. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2062. //colModel: [
  2063. // { label: "主键", name: "ID", hidden: true, key: true },
  2064. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2065. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2066. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2067. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2068. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2069. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2070. //],
  2071. colModel: _Clos1,
  2072. //colModel: ColModelSub,
  2073. shrinkToFit: true,//宽度自适应
  2074. multiselect: true,
  2075. prmNames: { search: "search" },
  2076. viewrecords: true,
  2077. height: "100%",
  2078. rowNum: 20,
  2079. pager: subgrid_pager_id,
  2080. });
  2081. }
  2082. //领料申请退料生成条码
  2083. function gridList12() {
  2084. var $gridList = $("#gridList");
  2085. var queryJson = {
  2086. POCode: $("#txt_POCode").val(),
  2087. InvCode: $("#txt_InvCode").val(),
  2088. InvName: $("#txt_InvName").val(),
  2089. BatchCode: $("#txt_BatchCode").val(),
  2090. Area: $("#txt_Area").val(),
  2091. Location: $("#txt_Location").val(),
  2092. Container: $("#txt_Container :checked").val(),
  2093. }
  2094. $gridList.dataGrid({
  2095. url: "/WMS/WMSCreateItemLot/GetGridJsonLLSQTL" + "?" + Math.random(),
  2096. postData: { queryJson: JSON.stringify(queryJson) },
  2097. height: $(window).height() - 200,
  2098. width: $(window).width() - 300,
  2099. colModel: _Clos,
  2100. //colModel: [
  2101. // { label: "主键", name: "ID", hidden: true, key: true },
  2102. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  2103. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2104. // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, },
  2105. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2106. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  2107. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2108. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2109. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2110. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2111. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2112. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2113. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2114. //],
  2115. //colModel: ColModelMain,
  2116. width: "100%",
  2117. autowidth: true,
  2118. //shrinkToFit: true,
  2119. gridComplete: function () {
  2120. },
  2121. pager: "#gridPager",
  2122. sortname: 'ApplyNegCode',
  2123. sortorder: "desc",
  2124. viewrecords: true,
  2125. multiselect: true,
  2126. beforeSelectRow: function (rowid, e) {
  2127. },
  2128. subGrid: true, // (1)开启子表格支持
  2129. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2130. $("#gridList").jqGrid("setSelection", rowid, false);
  2131. bindSubGrid12(subgrid_id, rowid)
  2132. }
  2133. });
  2134. $("#warehouse a.btn-default").click(function () {
  2135. $("#warehouse a.btn-default").removeClass("active");
  2136. $(this).addClass("active");
  2137. $('#btn_search').trigger("click");
  2138. });
  2139. $("#btn_search").click(function () {
  2140. var warehouse = $("#warehouse a.active").attr('data-value');
  2141. var queryJson = {
  2142. POCode: $("#txt_POCode").val(),
  2143. InvCode: $("#txt_InvCode").val(),
  2144. InvName: $("#txt_InvName").val(),
  2145. BatchCode: $("#txt_BatchCode").val(),
  2146. Area: $("#txt_Area").val(),
  2147. Location: $("#txt_Location").val(),
  2148. Container: $("#txt_Container :checked").val(),
  2149. }
  2150. $gridList.jqGrid('setGridParam', {
  2151. page: 1,
  2152. postData: { queryJson: JSON.stringify(queryJson) },
  2153. }).trigger('reloadGrid');
  2154. });
  2155. }
  2156. function bindSubGrid12(subgrid_id, rowid) {
  2157. $("#gridList").jqGrid("setSelection", rowid, false);
  2158. var subgrid_table_id;
  2159. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2160. var subgrid_pager_id;
  2161. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2162. // (5)动态添加子报表的table和pager
  2163. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2164. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  2165. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2166. // (6)创建jqGrid对象
  2167. $("#" + subgrid_table_id).dataGrid({
  2168. cellEdit: true,
  2169. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2170. //colModel: [
  2171. // { label: "主键", name: "ID", hidden: true, key: true },
  2172. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2173. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2174. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2175. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2176. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2177. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2178. //],
  2179. colModel: _Clos1,
  2180. //colModel: ColModelSub,
  2181. shrinkToFit: true,//宽度自适应
  2182. multiselect: true,
  2183. prmNames: { search: "search" },
  2184. viewrecords: true,
  2185. height: "100%",
  2186. rowNum: 20,
  2187. pager: subgrid_pager_id,
  2188. });
  2189. }
  2190. //材料出库退料
  2191. function gridList13() {
  2192. var $gridList = $("#gridList");
  2193. var queryJson = {
  2194. POCode: $("#txt_POCode").val(),
  2195. InvCode: $("#txt_InvCode").val(),
  2196. InvName: $("#txt_InvName").val(),
  2197. BatchCode: $("#txt_BatchCode").val(),
  2198. Area: $("#txt_Area").val(),
  2199. Container: $("#txt_Container :checked").val(),
  2200. }
  2201. $gridList.dataGrid({
  2202. url: "/WMS/WMSCreateItemLot/GetGridJsonCLCK" + "?" + Math.random(),
  2203. postData: { queryJson: JSON.stringify(queryJson) },
  2204. height: $(window).height() - 200,
  2205. width: $(window).width() - 300,
  2206. colModel: _Clos,
  2207. //colModel: [
  2208. // { label: "主键", name: "ID", hidden: true, key: true },
  2209. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  2210. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2211. // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, },
  2212. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2213. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  2214. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2215. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2216. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2217. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2218. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2219. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2220. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2221. //],
  2222. //colModel: ColModelMain,
  2223. width: "100%",
  2224. autowidth: true,
  2225. //shrinkToFit: true,
  2226. gridComplete: function () {
  2227. },
  2228. pager: "#gridPager",
  2229. sortname: 'ApplyNegCode',
  2230. sortorder: "desc",
  2231. viewrecords: true,
  2232. multiselect: true,
  2233. beforeSelectRow: function (rowid, e) {
  2234. $("#gridList").jqGrid('resetSelection');
  2235. return (true);
  2236. },
  2237. subGrid: true, // (1)开启子表格支持
  2238. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2239. $("#gridList").jqGrid("setSelection", rowid, false);
  2240. bindSubGrid13(subgrid_id, rowid)
  2241. }
  2242. });
  2243. $("#warehouse a.btn-default").click(function () {
  2244. $("#warehouse a.btn-default").removeClass("active");
  2245. $(this).addClass("active");
  2246. $('#btn_search').trigger("click");
  2247. });
  2248. $("#btn_search").click(function () {
  2249. var warehouse = $("#warehouse a.active").attr('data-value');
  2250. var queryJson = {
  2251. POCode: $("#txt_POCode").val(),
  2252. InvCode: $("#txt_InvCode").val(),
  2253. InvName: $("#txt_InvName").val(),
  2254. BatchCode: $("#txt_BatchCode").val(),
  2255. Area: $("#txt_Area").val(),
  2256. Container: $("#txt_Container :checked").val(),
  2257. }
  2258. $gridList.jqGrid('setGridParam', {
  2259. page: 1,
  2260. postData: { queryJson: JSON.stringify(queryJson) },
  2261. }).trigger('reloadGrid');
  2262. });
  2263. }
  2264. function bindSubGrid13(subgrid_id, rowid) {
  2265. $("#gridList").jqGrid("setSelection", rowid, false);
  2266. var subgrid_table_id;
  2267. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2268. var subgrid_pager_id;
  2269. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2270. // (5)动态添加子报表的table和pager
  2271. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2272. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  2273. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2274. // (6)创建jqGrid对象
  2275. $("#" + subgrid_table_id).dataGrid({
  2276. cellEdit: true,
  2277. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2278. //colModel: [
  2279. // { label: "主键", name: "ID", hidden: true, key: true },
  2280. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2281. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2282. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2283. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2284. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2285. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2286. //],
  2287. colModel: _Clos1,
  2288. //colModel: ColModelSub,
  2289. shrinkToFit: true,//宽度自适应
  2290. multiselect: true,
  2291. prmNames: { search: "search" },
  2292. viewrecords: true,
  2293. height: "100%",
  2294. rowNum: 20,
  2295. pager: subgrid_pager_id,
  2296. });
  2297. }
  2298. //委外领料申请退料
  2299. function gridList14() {
  2300. var $gridList = $("#gridList");
  2301. var queryJson = {
  2302. POCode: $("#txt_POCode").val(),
  2303. InvCode: $("#txt_InvCode").val(),
  2304. InvName: $("#txt_InvName").val(),
  2305. BatchCode: $("#txt_BatchCode").val(),
  2306. Area: $("#txt_Area").val(),
  2307. }
  2308. $gridList.dataGrid({
  2309. url: "/WMS/WMSCreateItemLot/GetGridJsonWWLLTL" + "?" + Math.random(),
  2310. postData: { queryJson: JSON.stringify(queryJson) },
  2311. height: $(window).height() - 200,
  2312. width: $(window).width() - 300,
  2313. colModel: _Clos,
  2314. //colModel: [
  2315. // { label: "主键", name: "ID", hidden: true, key: true },
  2316. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  2317. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2318. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  2319. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2320. // { label: '物料描述', name: 'InvName', width: 60, align: 'left', },
  2321. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2322. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2323. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2324. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2325. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2326. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2327. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2328. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2329. //],
  2330. //colModel: ColModelMain,
  2331. width: "100%",
  2332. autowidth: true,
  2333. //shrinkToFit: true,
  2334. gridComplete: function () {
  2335. },
  2336. pager: "#gridPager",
  2337. sortname: 'OApplyNegCode',
  2338. sortorder: "desc",
  2339. viewrecords: true,
  2340. multiselect: true,
  2341. beforeSelectRow: function (rowid, e) {
  2342. $("#gridList").jqGrid('resetSelection');
  2343. return (true);
  2344. },
  2345. subGrid: true, // (1)开启子表格支持
  2346. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2347. $("#gridList").jqGrid("setSelection", rowid, false);
  2348. bindSubGrid14(subgrid_id, rowid)
  2349. }
  2350. });
  2351. $("#warehouse a.btn-default").click(function () {
  2352. $("#warehouse a.btn-default").removeClass("active");
  2353. $(this).addClass("active");
  2354. $('#btn_search').trigger("click");
  2355. });
  2356. $("#btn_search").click(function () {
  2357. var warehouse = $("#warehouse a.active").attr('data-value');
  2358. var queryJson = {
  2359. POCode: $("#txt_POCode").val(),
  2360. InvCode: $("#txt_InvCode").val(),
  2361. InvName: $("#txt_InvName").val(),
  2362. BatchCode: $("#txt_BatchCode").val(),
  2363. Area: $("#txt_Area").val(),
  2364. }
  2365. $gridList.jqGrid('setGridParam', {
  2366. page: 1,
  2367. postData: { queryJson: JSON.stringify(queryJson) },
  2368. }).trigger('reloadGrid');
  2369. });
  2370. }
  2371. function bindSubGrid14(subgrid_id, rowid) {
  2372. $("#gridList").jqGrid("setSelection", rowid, false);
  2373. var subgrid_table_id;
  2374. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2375. var subgrid_pager_id;
  2376. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2377. // (5)动态添加子报表的table和pager
  2378. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2379. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  2380. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2381. // (6)创建jqGrid对象
  2382. $("#" + subgrid_table_id).dataGrid({
  2383. cellEdit: true,
  2384. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2385. //colModel: [
  2386. // { label: "主键", name: "ID", hidden: true, key: true },
  2387. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2388. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2389. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2390. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2391. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2392. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2393. //],
  2394. colModel: _Clos1,
  2395. //colModel: ColModelSub,
  2396. shrinkToFit: true,//宽度自适应
  2397. multiselect: true,
  2398. prmNames: { search: "search" },
  2399. viewrecords: true,
  2400. height: "100%",
  2401. rowNum: 20,
  2402. pager: subgrid_pager_id,
  2403. });
  2404. }
  2405. function gridList15() {
  2406. var $gridList = $("#gridList");
  2407. var queryJson = {
  2408. POCode: $("#txt_POCode").val(),
  2409. InvCode: $("#txt_InvCode").val(),
  2410. InvName: $("#txt_InvName").val(),
  2411. BatchCode: $("#txt_BatchCode").val(),
  2412. Area: $("#txt_Area").val(),
  2413. Container: $("#txt_Container :checked").val(),
  2414. }
  2415. $gridList.dataGrid({
  2416. url: "/WMS/WMSCreateItemLot/GetGridJsonWWCLCK" + "?" + Math.random(),
  2417. postData: { queryJson: JSON.stringify(queryJson) },
  2418. height: $(window).height() - 200,
  2419. width: $(window).width() - 300,
  2420. colModel: _Clos,
  2421. //colModel: [
  2422. // { label: "主键", name: "ID", hidden: true, key: true },
  2423. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  2424. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2425. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  2426. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2427. // { label: '物料描述', name: 'InvName', width: 60, align: 'left', },
  2428. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2429. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2430. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2431. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2432. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2433. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2434. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2435. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2436. //],
  2437. //colModel: ColModelMain,
  2438. width: "100%",
  2439. autowidth: true,
  2440. //shrinkToFit: true,
  2441. gridComplete: function () {
  2442. },
  2443. pager: "#gridPager",
  2444. sortname: 'OApplyNegCode',
  2445. sortorder: "desc",
  2446. viewrecords: true,
  2447. multiselect: true,
  2448. beforeSelectRow: function (rowid, e) {
  2449. $("#gridList").jqGrid('resetSelection');
  2450. return (true);
  2451. },
  2452. subGrid: true, // (1)开启子表格支持
  2453. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2454. $("#gridList").jqGrid("setSelection", rowid, false);
  2455. bindSubGrid15(subgrid_id, rowid)
  2456. }
  2457. });
  2458. $("#warehouse a.btn-default").click(function () {
  2459. $("#warehouse a.btn-default").removeClass("active");
  2460. $(this).addClass("active");
  2461. $('#btn_search').trigger("click");
  2462. });
  2463. $("#btn_search").click(function () {
  2464. var warehouse = $("#warehouse a.active").attr('data-value');
  2465. var queryJson = {
  2466. POCode: $("#txt_POCode").val(),
  2467. InvCode: $("#txt_InvCode").val(),
  2468. InvName: $("#txt_InvName").val(),
  2469. BatchCode: $("#txt_BatchCode").val(),
  2470. Area: $("#txt_Area").val(),
  2471. Container: $("#txt_Container :checked").val(),
  2472. }
  2473. $gridList.jqGrid('setGridParam', {
  2474. page: 1,
  2475. postData: { queryJson: JSON.stringify(queryJson) },
  2476. }).trigger('reloadGrid');
  2477. });
  2478. }
  2479. function bindSubGrid15(subgrid_id, rowid) {
  2480. $("#gridList").jqGrid("setSelection", rowid, false);
  2481. var subgrid_table_id;
  2482. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2483. var subgrid_pager_id;
  2484. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2485. // (5)动态添加子报表的table和pager
  2486. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2487. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  2488. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2489. // (6)创建jqGrid对象
  2490. $("#" + subgrid_table_id).dataGrid({
  2491. cellEdit: true,
  2492. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2493. //colModel: [
  2494. // { label: "主键", name: "ID", hidden: true, key: true },
  2495. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2496. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2497. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2498. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2499. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2500. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2501. //],
  2502. colModel: _Clos1,
  2503. //colModel: ColModelSub,
  2504. shrinkToFit: true,//宽度自适应
  2505. //multiselect: true,
  2506. prmNames: { search: "search" },
  2507. viewrecords: true,
  2508. height: "100%",
  2509. rowNum: 20,
  2510. pager: subgrid_pager_id,
  2511. });
  2512. }
  2513. function gridList16() {
  2514. var $gridList = $("#gridList");
  2515. var queryJson = {
  2516. POCode: $("#txt_POCode").val(),
  2517. InvCode: $("#txt_InvCode").val(),
  2518. InvName: $("#txt_InvName").val(),
  2519. BatchCode: $("#txt_BatchCode").val(),
  2520. Area: $("#txt_Area").val(),
  2521. Container: $("#txt_Container :checked").val(),
  2522. }
  2523. $gridList.dataGrid({
  2524. url: "/WMS/WMSCreateItemLot/GetGridJsonFGGD" + "?" + Math.random(),
  2525. postData: { queryJson: JSON.stringify(queryJson) },
  2526. height: $(window).height() - 200,
  2527. width: $(window).width() - 300,
  2528. colModel: _Clos,
  2529. //colModel: [
  2530. // { label: "主键", name: "ID", hidden: true, key: true },
  2531. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  2532. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2533. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  2534. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2535. // { label: '物料描述', name: 'InvName', width: 60, align: 'left', },
  2536. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2537. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2538. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2539. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2540. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2541. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2542. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2543. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2544. //],
  2545. //colModel: ColModelMain,
  2546. width: "100%",
  2547. autowidth: true,
  2548. //shrinkToFit: true,
  2549. gridComplete: function () {
  2550. },
  2551. pager: "#gridPager",
  2552. sortname: 'MOCode',
  2553. sortorder: "desc",
  2554. viewrecords: true,
  2555. multiselect: true,
  2556. beforeSelectRow: function (rowid, e) {
  2557. $("#gridList").jqGrid('resetSelection');
  2558. return (true);
  2559. },
  2560. subGrid: true, // (1)开启子表格支持
  2561. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2562. $("#gridList").jqGrid("setSelection", rowid, false);
  2563. bindSubGrid16(subgrid_id, rowid)
  2564. }
  2565. });
  2566. $("#warehouse a.btn-default").click(function () {
  2567. $("#warehouse a.btn-default").removeClass("active");
  2568. $(this).addClass("active");
  2569. $('#btn_search').trigger("click");
  2570. });
  2571. $("#btn_search").click(function () {
  2572. var warehouse = $("#warehouse a.active").attr('data-value');
  2573. var queryJson = {
  2574. POCode: $("#txt_POCode").val(),
  2575. InvCode: $("#txt_InvCode").val(),
  2576. InvName: $("#txt_InvName").val(),
  2577. BatchCode: $("#txt_BatchCode").val(),
  2578. Area: $("#txt_Area").val(),
  2579. Container: $("#txt_Container :checked").val(),
  2580. }
  2581. $gridList.jqGrid('setGridParam', {
  2582. page: 1,
  2583. postData: { queryJson: JSON.stringify(queryJson) },
  2584. }).trigger('reloadGrid');
  2585. });
  2586. }
  2587. function bindSubGrid16(subgrid_id, rowid) {
  2588. $("#gridList").jqGrid("setSelection", rowid, false);
  2589. var subgrid_table_id;
  2590. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2591. var subgrid_pager_id;
  2592. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2593. // (5)动态添加子报表的table和pager
  2594. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2595. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  2596. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2597. // (6)创建jqGrid对象
  2598. $("#" + subgrid_table_id).dataGrid({
  2599. cellEdit: true,
  2600. url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2601. //colModel: [
  2602. // { label: "主键", name: "ID", hidden: true, key: true },
  2603. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2604. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2605. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2606. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2607. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2608. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2609. //],
  2610. colModel: _Clos1,
  2611. //colModel: ColModelSub,
  2612. shrinkToFit: true,//宽度自适应
  2613. //multiselect: true,
  2614. prmNames: { search: "search" },
  2615. viewrecords: true,
  2616. height: "100%",
  2617. rowNum: 20,
  2618. pager: subgrid_pager_id,
  2619. });
  2620. }
  2621. function btnDelete() {
  2622. var objArr = '';
  2623. var obj = $("#gridList").jqGrid("getRowData");
  2624. for (var i = 0; i < obj.length; i++) {
  2625. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  2626. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  2627. if (rowData != "undefined" && rowData != null) {
  2628. for (var j = 0; j < rowData.length; j++) {
  2629. objArr += "'" + rowData[j] + "',";
  2630. }
  2631. }
  2632. }
  2633. if (objArr == "") {
  2634. $.modalAlertNew("WMS00099");
  2635. return;
  2636. }
  2637. $.deleteForm({
  2638. url: "/WMS/WMSCreateItemLot/DeleteItemLot",
  2639. param: { keyValue: JSON.stringify(objArr) },
  2640. success: function () {
  2641. $.currentWindow().$("#gridList").trigger("reloadGrid");
  2642. }
  2643. })
  2644. }
  2645. function btnCreate() {
  2646. debugger;
  2647. var PoStatus;
  2648. var jsonData = '';
  2649. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  2650. if (ids.length != 1) {
  2651. $.modalAlertNew("WMS00111");
  2652. return;
  2653. }
  2654. var POCode = "";
  2655. var PORow = "";
  2656. if (Type == '1') {
  2657. for (var i in ids) {
  2658. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  2659. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2660. }
  2661. $.modalOpen({
  2662. id: "FormAddItemLot",
  2663. title: "生产退料条码生成",
  2664. url: "/WMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + 1 + "&" + Math.random(),
  2665. width: "550px",
  2666. height: "1000px",
  2667. callBack: function (iframeId) {
  2668. top.frames[iframeId].submitForm();
  2669. }
  2670. });
  2671. } else if (Type == '2') {
  2672. for (var i in ids) {
  2673. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  2674. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2675. }
  2676. $.modalOpen({
  2677. id: "FormAddItemLot",
  2678. title: "委外退料条码生成",
  2679. url: "/WMS/WMSCreateItemLot/From?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + 2 + "&" + Math.random(),
  2680. width: "550px",
  2681. height: "1000px",
  2682. callBack: function (iframeId) {
  2683. top.frames[iframeId].submitForm();
  2684. }
  2685. });
  2686. } else if (Type == '3') {
  2687. for (var i in ids) {
  2688. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  2689. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  2690. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2691. }
  2692. $.modalOpen({
  2693. id: "FormAddItemLot",
  2694. title: "成品条码产生",
  2695. url: "/WMS/WMSCreateItemLot/From?MOCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&" + Math.random(),
  2696. width: "550px",
  2697. height: "1000px",
  2698. callBack: function (iframeId) {
  2699. top.frames[iframeId].submitForm();
  2700. }
  2701. });
  2702. } else if (Type == '4') {
  2703. for (var i in ids) {
  2704. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  2705. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2706. }
  2707. $.modalOpen({
  2708. id: "FormAddItemLot",
  2709. title: "销售退货条码产生",
  2710. url: "/WMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&Type=" + 4 + "&" + Math.random(),
  2711. width: "550px",
  2712. height: "1000px",
  2713. callBack: function (iframeId) {
  2714. top.frames[iframeId].submitForm();
  2715. }
  2716. });
  2717. } else if (Type == '5') {
  2718. for (var i in ids) {
  2719. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  2720. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2721. }
  2722. $.modalOpen({
  2723. id: "FormAddItemLot",
  2724. title: "其他入库条码产生",
  2725. url: "/WMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&Type=" + 5 + "&" + Math.random(),
  2726. width: "550px",
  2727. height: "1000px",
  2728. callBack: function (iframeId) {
  2729. top.frames[iframeId].submitForm();
  2730. }
  2731. });
  2732. } else if (Type == '6') {
  2733. for (var i in ids) {
  2734. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  2735. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2736. }
  2737. $.modalOpen({
  2738. id: "FormAddItemLot",
  2739. title: "归还单条码产生",
  2740. url: "/WMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&Type=" + 6 + "&" + Math.random(),
  2741. width: "550px",
  2742. height: "1000px",
  2743. callBack: function (iframeId) {
  2744. top.frames[iframeId].submitForm();
  2745. }
  2746. });
  2747. } else if (Type == '7') {
  2748. for (var i in ids) {
  2749. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  2750. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2751. var AreaType = $("#gridList").jqGrid('getRowData', ids[i]).AreaType;
  2752. if (AreaType == "货柜") {
  2753. $.modalAlertNew("WMS00112");
  2754. return;
  2755. }
  2756. }
  2757. $.modalOpen({
  2758. id: "FormAddItemLot",
  2759. title: "审核到货单生成条码",
  2760. url: "/WMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + 7 + "&" + Math.random(),
  2761. width: "550px",
  2762. height: "1000px",
  2763. callBack: function (iframeId) {
  2764. top.frames[iframeId].submitForm();
  2765. }
  2766. });
  2767. } else if (Type == '8') {
  2768. for (var i in ids) {
  2769. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  2770. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2771. }
  2772. $.modalOpen({
  2773. id: "FormAddItemLot",
  2774. title: "审核委外到货单生成条码",
  2775. url: "/WMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + 8 + "&" + Math.random(),
  2776. width: "550px",
  2777. height: "1000px",
  2778. callBack: function (iframeId) {
  2779. top.frames[iframeId].submitForm();
  2780. }
  2781. });
  2782. } else if (Type == '9') {
  2783. for (var i in ids) {
  2784. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  2785. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2786. var AreaType = $("#gridList").jqGrid('getRowData', ids[i]).AreaType;
  2787. if (AreaType == "货柜") {
  2788. $.modalAlertNew("WMS00112");
  2789. return;
  2790. }
  2791. }
  2792. $.modalOpen({
  2793. id: "FormAddItemLot",
  2794. title: "开立成品入库单生成条码",
  2795. url: "/WMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + 9 + "&" + Math.random(),
  2796. width: "550px",
  2797. height: "1000px",
  2798. callBack: function (iframeId) {
  2799. top.frames[iframeId].submitForm();
  2800. }
  2801. });
  2802. } else if (Type == '10') {
  2803. for (var i in ids) {
  2804. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  2805. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2806. }
  2807. $.modalOpen({
  2808. id: "FormAddItemLot",
  2809. title: "审核拒收单生成条码",
  2810. url: "/WMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + 10 + "&" + Math.random(),
  2811. width: "550px",
  2812. height: "1000px",
  2813. callBack: function (iframeId) {
  2814. top.frames[iframeId].submitForm();
  2815. }
  2816. });
  2817. } else if (Type == '11') {
  2818. for (var i in ids) {
  2819. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  2820. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  2821. }
  2822. $.modalOpen({
  2823. id: "FormAddItemLot",
  2824. title: "审核委外拒收单生成条码",
  2825. url: "/WMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + 11 + "&" + Math.random(),
  2826. width: "550px",
  2827. height: "1000px",
  2828. callBack: function (iframeId) {
  2829. top.frames[iframeId].submitForm();
  2830. }
  2831. });
  2832. } else if (Type == '12') {
  2833. for (var i in ids) {
  2834. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  2835. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2836. var AreaType = $("#gridList").jqGrid('getRowData', ids[i]).AreaType;
  2837. if (AreaType == "货柜") {
  2838. $.modalAlertNew("WMS00112");
  2839. return;
  2840. }
  2841. }
  2842. $.modalOpen({
  2843. id: "FormAddItemLot",
  2844. title: "审核领料申请退料生成条码",
  2845. url: "/WMS/WMSCreateItemLot/From?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&Type=" + 12 + "&" + Math.random(),
  2846. width: "550px",
  2847. height: "1000px",
  2848. callBack: function (iframeId) {
  2849. top.frames[iframeId].submitForm();
  2850. }
  2851. });
  2852. } else if (Type == '13') {
  2853. for (var i in ids) {
  2854. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  2855. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2856. }
  2857. $.modalOpen({
  2858. id: "FormAddItemLot",
  2859. title: "材料出库退料生成条码",
  2860. url: "/WMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&Type=" + 13 + "&" + Math.random(),
  2861. width: "550px",
  2862. height: "1000px",
  2863. callBack: function (iframeId) {
  2864. top.frames[iframeId].submitForm();
  2865. }
  2866. });
  2867. } else if (Type == '14') {
  2868. for (var i in ids) {
  2869. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  2870. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2871. }
  2872. $.modalOpen({
  2873. id: "FormAddItemLot",
  2874. title: "委外领料退料条码生成",
  2875. url: "/WMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&Type=" + 14 + "&" + Math.random(),
  2876. width: "550px",
  2877. height: "1000px",
  2878. callBack: function (iframeId) {
  2879. top.frames[iframeId].submitForm();
  2880. }
  2881. });
  2882. }
  2883. else if (Type == '15') {
  2884. for (var i in ids) {
  2885. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  2886. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2887. }
  2888. $.modalOpen({
  2889. id: "FormAddItemLot",
  2890. title: "委外材料出库退料生成条码",
  2891. url: "/WMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&Type=" + 15 + "&" + Math.random(),
  2892. width: "550px",
  2893. height: "1000px",
  2894. callBack: function (iframeId) {
  2895. top.frames[iframeId].submitForm();
  2896. }
  2897. });
  2898. }
  2899. else if (Type == '16') {
  2900. for (var i in ids) {
  2901. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  2902. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  2903. }
  2904. $.modalOpen({
  2905. id: "FormAddItemLot",
  2906. title: "返工工单生成条码",
  2907. url: "/WMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&Type=" + 16 + "&" + Math.random(),
  2908. width: "550px",
  2909. height: "1000px",
  2910. callBack: function (iframeId) {
  2911. top.frames[iframeId].submitForm();
  2912. }
  2913. });
  2914. }
  2915. }
  2916. function fullscreen() {
  2917. var docElm = document.documentElement;
  2918. if (docElm.requestFullscreen) {
  2919. docElm.requestFullscreen();
  2920. } else if (docElm.mozRequestFullScreen) {
  2921. docElm.mozRequestFullScreen();
  2922. } else if (docElm.webkitRequestFullScreen) {
  2923. docElm.webkitRequestFullScreen();
  2924. } else if (docElm.msRequestFullscreen) {
  2925. docElm.msRequestFullscreen();
  2926. }
  2927. $(window).bind('resize', function () {
  2928. $("#gridList").setGridWidth($(window).width());
  2929. }).trigger('resize');
  2930. $(window).bind('resize', function () {
  2931. $("#gridList").setGridHeight($(window).height());
  2932. }).trigger('resize');
  2933. }
  2934. function btnPrint() {
  2935. debugger;
  2936. var mold = '';
  2937. if (Type == '1') { mold = '00001'; }//生产退料生成条码
  2938. if (Type == '2') { mold = '00002'; }//委外退料生成条码
  2939. if (Type == '3') { mold = '00003'; }//工单成品生成条码
  2940. if (Type == '4') { mold = '00004'; }//销售退货生成条码
  2941. if (Type == '5') { mold = '00005'; }//其他入库生成条码
  2942. if (Type == '6') { mold = '00006'; }//归还单生成条码
  2943. if (Type == '7') { mold = '00007'; }//普通到货单生成条码
  2944. if (Type == '8') { mold = '00008'; }//委外到货单生成条码
  2945. if (Type == '9') { mold = '00009'; }//成品入库单生成条码
  2946. if (Type == '10') { mold = '00010'; }//拒收单生成条码
  2947. if (Type == '11') { mold = '00011'; }//委外拒收单生成条码
  2948. if (Type == '12') { mold = '00012'; }//领料申请退料
  2949. if (Type == '13') { mold = '00013'; }//材料出库退料
  2950. if (Type == '14') { mold = '00014'; }//委外领料申请退料
  2951. if (Type == '15') { mold = '00015'; }//委外材料出库退料
  2952. if (Type == '16') { mold = '00016'; }//返工工单
  2953. var objArr = '';
  2954. var arr = [];
  2955. var obj = $("#gridList").jqGrid("getRowData");
  2956. for (var i = 0; i < obj.length; i++) {
  2957. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  2958. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  2959. if (rowData != "undefined" && rowData != null) {
  2960. for (var j = 0; j < rowData.length; j++) {
  2961. objArr += "'" + rowData[j] + "',";
  2962. }
  2963. objArr = objArr.slice(0, objArr.length - 1);
  2964. objArr = "" + objArr + "|";
  2965. arr.push(objArr);
  2966. }
  2967. }
  2968. if (objArr == "") {
  2969. $.modalAlertNew("WMS00101");
  2970. return;
  2971. }
  2972. $.modalOpen({
  2973. id: "PrintLot",
  2974. title: "打印",
  2975. url: "/WMS/Print/PrintView?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  2976. width: "550px",
  2977. height: "1000px",
  2978. callBack: function (iframeId) {
  2979. top.frames[iframeId].submitForm();
  2980. }
  2981. });
  2982. }
  2983. function btnCallHG() {
  2984. var DocNOList = "";
  2985. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  2986. if (ids.length == 0) {
  2987. $.modalAlertNew("WMS00110");
  2988. return;
  2989. }
  2990. if (Type == '7') {
  2991. for (var i in ids) {
  2992. DocNOList += $("#gridList").jqGrid('getRowData', ids[i]).DNCode + ',';
  2993. var AreaType = $("#gridList").jqGrid('getRowData', ids[i]).AreaType;
  2994. if (AreaType == "平库") {
  2995. $.modalAlertNew("WMS00113");
  2996. return;
  2997. }
  2998. }
  2999. }
  3000. else if (Type == '9') {
  3001. for (var i in ids) {
  3002. DocNOList += $("#gridList").jqGrid('getRowData', ids[i]).RCVCode + ',';
  3003. var AreaType = $("#gridList").jqGrid('getRowData', ids[i]).AreaType;
  3004. if (AreaType == "平库") {
  3005. $.modalAlertNew("WMS00113");
  3006. return;
  3007. }
  3008. }
  3009. }
  3010. else if (Type == '12') {
  3011. for (var i in ids) {
  3012. DocNOList += $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode + ',';
  3013. var AreaType = $("#gridList").jqGrid('getRowData', ids[i]).AreaType;
  3014. if (AreaType == "平库") {
  3015. $.modalAlertNew("WMS00113");
  3016. return;
  3017. }
  3018. }
  3019. }
  3020. if (DocNOList != "") {
  3021. $.modalConfirm("确定上传货柜吗?", function (r) {
  3022. if (r) {
  3023. $.submitForm({
  3024. url: "/WMS/WMSCreateItemLot/DocUpLoadToHG?DocNoList=" + DocNOList + "&Type=" + Type,
  3025. async: false,
  3026. success: function () {
  3027. $.currentWindow().$("#gridList").trigger("reloadGrid");
  3028. }
  3029. })
  3030. }
  3031. });
  3032. }
  3033. }
  3034. </script>
  3035. <iframe id="ifrm" src="" width="0" height="0"></iframe>
  3036. <script>
  3037. //function btnPrint() {
  3038. // var objArr = '';
  3039. // var obj = $("#gridList").jqGrid("getRowData");
  3040. // for (var i = 0; i < obj.length; i++) {
  3041. // var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  3042. // var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  3043. // if (rowData != "undefined" && rowData != null) {
  3044. // for (var j = 0; j < rowData.length; j++) {
  3045. // objArr += "'" + /rowData[j] + "',";
  3046. // }
  3047. // }
  3048. // }
  3049. // if (objArr == "") {
  3050. // $.modalAlert("请选择子表数据打印!");
  3051. // return;
  3052. // }
  3053. // var strPrintData;
  3054. // var bIsInstallPrintControl;
  3055. // var strPrintControlCookie;
  3056. // $.ajax({
  3057. // url: "/WMS/WMSCreateItemLot/PrintItemLot?Type=" + Type,
  3058. // type: "post",
  3059. // data: { keyValue: JSON.stringify(objArr) },
  3060. // dataType: "json",
  3061. // async: false,
  3062. // success: function (data) {
  3063. // strPrintData = data.strPrintData_1;
  3064. // bIsInstallPrintControl = data.bIsInstallPrintControl_1;
  3065. // strPrintControlCookie = data.strPrintControlCookie_1;
  3066. // }
  3067. // });
  3068. // if (strPrintData != '') {
  3069. // var test = "ChuLinPrint:" + strPrintData;
  3070. // $("#ifrm")[0].src = "ChuLinPrint:" + strPrintData;
  3071. // }
  3072. // if (bIsInstallPrintControl == 'False') {
  3073. // if (confirm("检测到打印控件未安装,您是否下载安装?")) {
  3074. // $("#downPrintControl").click();
  3075. // }
  3076. // }
  3077. // if (bIsInstallPrintControl == 'True') {
  3078. // var strPrintControlCookie = strPrintControlCookie;
  3079. // if (strPrintControlCookie != '') { //延时3秒后再次检测打印控件是否安装
  3080. // setTimeout("checkPrintControlInstall()", 8000);
  3081. // function checkPrintControlInstall() {
  3082. // $.ajax({
  3083. // url: "/WMS/WMSCreateItemLot/IsCheckInstall?checkInstall=" + strPrintControlCookie,
  3084. // dataType: "json",
  3085. // async: false,
  3086. // success: function (strResult) {
  3087. // if (strResult.indexOf("PrintControlInstall") == -1) {
  3088. // if (confirm("检测到打印控件未安装,您是否下载安装?")) {
  3089. // $("#downPrintControl").click();
  3090. // }
  3091. // }
  3092. // }
  3093. // });
  3094. // }
  3095. // }
  3096. // }
  3097. // $("#btn_search").click();
  3098. //}
  3099. </script>
  3100. <div class="topPanel" style="height:150px;">
  3101. <div class="toolbar">
  3102. <div class="btn-group">
  3103. <a id="NF-CallHG" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnCallHG()"><i class="fa fa-pencil-square-o"></i>上传货柜</a>
  3104. <a id="NF-Create" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnCreate()"><i class="fa fa-pencil-square-o"></i>生成条码</a>
  3105. <a id="NF-BatchCreate" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnBatchCreate()"><i class="fa fa-pencil-square-o"></i>批量生成条码</a>
  3106. <a id="NF-Delete" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnDelete()"><i class="fa fa-pencil-square-o"></i>删除条码</a>
  3107. <a id="NF-Print" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnPrint()"><i class="fa fa-pencil-square-o"></i>打印</a>
  3108. <a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
  3109. </div>
  3110. <div class="btn-group" style="display:block;padding-left:2px;">
  3111. <a class="btn btn-primary" id="downPrintControl" href="~/PrintActivex.exe" style="display:none">点击下载打印组件</a>
  3112. </div>
  3113. <script>$('.toolbar').authorizeButton()</script>
  3114. </div>
  3115. <div class="search">
  3116. <table>
  3117. <tr>
  3118. <td style="text-align:right;"><label class="lglabel" for="txt_POCode">&nbsp;&nbsp;&nbsp;&nbsp;单据号</label>:</td>
  3119. <td>
  3120. <div class="input-group">
  3121. <input id="txt_POCode" type="text" class="form-control" style="width: 100px;">
  3122. </div>
  3123. </td>
  3124. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenCode">&nbsp;&nbsp;&nbsp;&nbsp;供应商代码</label>:</td>
  3125. <td class="HideItems">
  3126. <div class="input-group HideItems">
  3127. <input id="txt_VenCode" type="text" class="form-control HideItems" style="width: 100px;">
  3128. </div>
  3129. </td>
  3130. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;供应商名称</label>:</td>
  3131. <td class="HideItems">
  3132. <div class="input-group HideItems">
  3133. <input id="txt_VenName" type="text" class="form-control HideItems" style="width: 100px;">
  3134. </div>
  3135. </td>
  3136. <td style="text-align:right;"><label class="lglabel " for="txt_Area">&nbsp;&nbsp;&nbsp;&nbsp;区域</label>:</td>
  3137. <td>
  3138. <div class="input-group ">
  3139. <input id="txt_Area" type="text" class="form-control " style="width: 100px;">
  3140. </div>
  3141. </td>
  3142. <td class="Workorder" style="text-align:right;"><label class="lglabel " for="txt_OrderNumber">&nbsp;&nbsp;&nbsp;&nbsp;生产订单</label>:</td>
  3143. <td class="Workorder">
  3144. <div class="input-group ">
  3145. <input id="txt_OrderNumber" type="text" class="form-control " style="width: 100px;">
  3146. </div>
  3147. </td>
  3148. @*<td class="Workorder" style="text-align:right;"><label class="lglabel " for="txt_Area9">&nbsp;&nbsp;&nbsp;&nbsp;存储区域</label>:</td>
  3149. <td class="Workorder" >
  3150. <div class="input-group ">
  3151. <input id="txt_Area9" type="text" class="form-control " style="width: 100px;">
  3152. </div>
  3153. </td>*@
  3154. </tr>
  3155. <tr>
  3156. <td style="text-align:right;"><label class="lglabel " for="txt_Location">&nbsp;&nbsp;&nbsp;&nbsp;仓库</label>:</td>
  3157. <td>
  3158. <div class="input-group ">
  3159. <input id="txt_Location" type="text" class="form-control " style="width: 100px;">
  3160. </div>
  3161. </td>
  3162. @*<td style="text-align:right;"><label class="lglabel" for="txt_Location">&nbsp;&nbsp;&nbsp;&nbsp;库存地点</label>:</td>
  3163. <td>
  3164. <div class="input-group">
  3165. <input id="txt_Location" type="text" class="form-control" style="width: 100px;">
  3166. </div>
  3167. </td>*@
  3168. <td style="text-align:right;"><label class="lglabel" for="txt_InvCode">&nbsp;&nbsp;&nbsp;&nbsp;料品编码</label>:</td>
  3169. <td>
  3170. <div class="input-group">
  3171. <input id="txt_InvCode" type="text" class="form-control" style="width: 100px;">
  3172. </div>
  3173. </td>
  3174. <td style="text-align:right;"><label class="lglabel" for="txt_InvName">&nbsp;&nbsp;&nbsp;&nbsp;物料描述</label>:</td>
  3175. <td>
  3176. <div class="input-group">
  3177. <input id="txt_InvName" type="text" class="form-control" style="width: 100px;">
  3178. </div>
  3179. </td>
  3180. <td style="text-align:right;"><label class="lglabel" for="txt_BatchCode">&nbsp;&nbsp;&nbsp;&nbsp;批次号</label>:</td>
  3181. <td>
  3182. <div class="input-group">
  3183. <input id="txt_BatchCode" type="text" class="form-control" style="width: 100px;">
  3184. </div>
  3185. </td>
  3186. <td>
  3187. <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;是否入库:</label>
  3188. </td>
  3189. <td>
  3190. <div class="input-group" id="txt_Container">
  3191. <input type="radio" name="container" value="1" />&nbsp;是
  3192. <input type="radio" name="container" checked="checked" value="2" />&nbsp;否
  3193. </div>
  3194. </td>
  3195. <td>
  3196. <span class="input-group-btn">
  3197. <button id="btn_search" type="button" class="btn btn-primary"><i class="fa fa-search"></i></button>
  3198. </span>
  3199. </td>
  3200. </tr>
  3201. </table>
  3202. </div>
  3203. </div>
  3204. <div class="gridPanel">
  3205. <table id="gridList"></table>
  3206. <div id="gridPager"></div>
  3207. </div>