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

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