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.

8002 lines
413 KiB

3 weeks ago
  1. @{
  2. ViewBag.Title = "Index";
  3. Layout = "~/Views/Shared/_Index.cshtml";
  4. }
  5. <script src="~/Content/js/datepicker/WdatePicker.js"></script>
  6. <script>
  7. debugger;
  8. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  9. var _Clos = new Array();
  10. var Type = $.request("Type");
  11. var mold = $.request("mold");
  12. var NeedParentMO = '0';
  13. var Name = "单据号";
  14. var ColModelMain = [];
  15. var ColModelSub = [];
  16. $(function () {
  17. $(".HideParentMOCode").css('display', 'none');
  18. if (Type == '3') {
  19. CheckParentMO();
  20. }
  21. SetCols();
  22. if (Type != '1') {
  23. $("#NF - Prints").css('display', 'none');
  24. $("#NF-btnInWareHouse").css('display', 'none');
  25. }
  26. if (Type != '13' && Type != '9') {
  27. $(".HideItems2").css('display', 'none');
  28. }
  29. if (Type != '1' && Type != '12' && Type != '22' && Type != '23' && Type != '2' && Type != '3' && Type != '24'
  30. && Type != '203') {
  31. $(".HideItemsTime").css('display', 'none');
  32. }
  33. if (Type != '22' && Type != '23' && Type != '2' && Type != '3' && Type != '24' && Type != '203') {
  34. $(".HideWH").css('display', 'none');
  35. }
  36. if (Type != '3' && Type != '7' && Type != '8') {
  37. $(".selStatus").css('display', 'none');
  38. }
  39. if (Type != '3' && Type != '4' && Type != '5' && Type != '7' && Type != '8') {
  40. $(".HideItems3").css('display', 'none');
  41. }
  42. if (Type == '17') {
  43. Name = "条码号";
  44. $("#POCodeShowLable").text(Name);
  45. } else {
  46. $("#POCodeShowLable").text(Name);
  47. }
  48. if (Type!='3') {
  49. //$("#GDLX").css('display', 'none');
  50. //$("#GDLX2").css('display', 'none');
  51. $("#NF-Rebind").css('display', 'none');
  52. }
  53. if (Type == '1' || Type == '2' || Type == '3' || Type == '4' || Type == '5' || Type == '6' || Type == '9' || Type == '17') {
  54. $(".HideItems").css('display', 'none');
  55. }
  56. if (Type == '1') {
  57. gridList();
  58. }
  59. if (Type == '2') {
  60. gridList2();
  61. }
  62. if (Type == '3') {
  63. //$(".GDLX").css('display', 'block');
  64. //Select_SelGDLX();
  65. gridList3();
  66. }
  67. if (Type == '4') {
  68. gridList4();
  69. }
  70. if (Type == '5') {
  71. gridList5();
  72. }
  73. if (Type == '6') {
  74. gridList6();
  75. }
  76. //审核到货单生成条码
  77. if (Type == '7') {
  78. gridList7();
  79. }
  80. //审核委外到货单生成条码
  81. if (Type == '8') {
  82. gridList8();
  83. }
  84. //开立成品入库单生成条码
  85. if (Type == '9') {
  86. gridList9();
  87. }
  88. //审核拒收单生成条码
  89. if (Type == '10') {
  90. gridList10();
  91. }
  92. //审核委外拒收单生成条码
  93. if (Type == '11') {
  94. gridList11();
  95. }
  96. //领料申请退料生成条码
  97. if (Type == '12') {
  98. gridList12();
  99. }
  100. //材料出库退料生成条码
  101. if (Type == '13') {
  102. gridList13();
  103. }
  104. //委外领料申请退料生成条码
  105. if (Type == '14') {
  106. gridList14();
  107. }
  108. //委外材料出库退料生成条码
  109. if (Type == '15') {
  110. gridList15();
  111. }
  112. //返工工单
  113. if (Type == '16') {
  114. gridList16();
  115. }
  116. //不合格条码入库
  117. if (Type == '17') {
  118. gridList17();
  119. }
  120. //副产品
  121. if (Type == '18') {
  122. gridList18();
  123. }
  124. //锐腾两步调入生成条码
  125. if (Type == '20') {
  126. gridList20();
  127. }
  128. //采购入库生成条码
  129. if (Type == '22') {
  130. gridList22();
  131. }
  132. //委外采购入库生成条码
  133. if (Type == '23') {
  134. gridList23();
  135. }
  136. //红字销售出库单
  137. if (Type == '24') {
  138. gridList24();
  139. }
  140. //线边仓调拨申请单生成条码(派纳)
  141. if (Type == '201') {
  142. gridList201();
  143. }
  144. //调拨申请单生成条码
  145. if (Type == '202') {
  146. gridList202();
  147. }
  148. if (Type == '203') {
  149. gridList203();
  150. }
  151. })
  152. function SetCols() {
  153. $.ajax({
  154. url: "/Print/SelectColumnName?" + Math.random(),
  155. dataType: "json",
  156. async: false,
  157. success: function (data) {
  158. var cols = new Array();
  159. var cols1 = new Array();
  160. if (Type == '1') {
  161. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  162. cols.push(collast);
  163. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  164. cols.push(collast);
  165. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  166. cols.push(collast);
  167. var collast = { label: '工单子件', name: 'SourceDetailID', hidden: true, };
  168. cols.push(collast);
  169. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  170. cols.push(collast);
  171. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  172. cols.push(collast);
  173. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  174. cols.push(collast);
  175. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  176. cols.push(collast);
  177. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  178. cols.push(collast);
  179. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  180. cols.push(collast);
  181. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  182. cols.push(collast);
  183. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  184. //cols.push(collast);
  185. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  186. cols.push(collast);
  187. var collast = { label: '工单号', name: 'MOCode', width: 60, align: 'left', };
  188. cols.push(collast);
  189. var collast = { label: '创建日期', name: 'MTIME', width: 60, align: 'left', };
  190. cols.push(collast);
  191. $.ajax({
  192. url: "/Print/SelectTableColumnName?" + Math.random(),
  193. dataType: "json",
  194. async: false,
  195. success: function (data) {
  196. if (data != null && data.length > 0) {
  197. DateList = data;
  198. for (var i = 0; i < data.length; i++) {
  199. var TableCode = data[i].TableCode;
  200. if (TableCode == "ICSMOPick") {
  201. var Code = data[i].Code;
  202. var Name = data[i].Name;
  203. var obj = new Array();
  204. obj = {
  205. label: Name,
  206. name: Code,
  207. width: 80,
  208. align: "left"
  209. }
  210. cols.push(obj);
  211. }
  212. if (TableCode == "ICSInventory") {
  213. var Code = "ICSInventory"+data[i].Code;
  214. var Name = data[i].Name;
  215. var obj = new Array();
  216. obj = {
  217. label: Name,
  218. name: Code,
  219. width: 80,
  220. align: "left"
  221. }
  222. cols.push(obj);
  223. //cols1.push(obj);
  224. }
  225. }
  226. }
  227. _Clos = cols;
  228. //_Clos1 = cols1;
  229. }
  230. });
  231. }
  232. if (Type == '2') {
  233. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  234. cols.push(collast);
  235. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  236. cols.push(collast);
  237. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  238. cols.push(collast);
  239. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  240. cols.push(collast);
  241. var collast = { label: '供应商', name: 'VenName', width: 150, align: 'left' };
  242. cols.push(collast);
  243. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  244. cols.push(collast);
  245. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  246. cols.push(collast);
  247. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  248. cols.push(collast);
  249. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  250. cols.push(collast);
  251. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  252. cols.push(collast);
  253. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  254. cols.push(collast);
  255. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  256. cols.push(collast);
  257. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  258. //cols.push(collast);
  259. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  260. cols.push(collast);
  261. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  262. //cols.push(collast);
  263. $.ajax({
  264. url: "/Print/SelectTableColumnName?" + Math.random(),
  265. dataType: "json",
  266. async: false,
  267. success: function (data) {
  268. if (data != null && data.length > 0) {
  269. DateList = data;
  270. for (var i = 0; i < data.length; i++) {
  271. var TableCode = data[i].TableCode;
  272. if (TableCode == "ICSOApplyNegDetail") {
  273. var Code = data[i].Code;
  274. var Name = data[i].Name;
  275. var obj = new Array();
  276. obj = {
  277. label: Name,
  278. name: Code,
  279. width: 80,
  280. align: "left"
  281. }
  282. cols.push(obj);
  283. }
  284. if (TableCode == "ICSInventory") {
  285. var Code = "ICSInventory" + data[i].Code;
  286. var Name = data[i].Name;
  287. var obj = new Array();
  288. obj = {
  289. label: Name,
  290. name: Code,
  291. width: 80,
  292. align: "left"
  293. }
  294. cols.push(obj);
  295. //cols1.push(obj);
  296. }
  297. }
  298. }
  299. _Clos = cols;
  300. //_Clos1 = cols1;
  301. }
  302. });
  303. }
  304. if (Type == '3') {
  305. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  306. cols.push(collast);
  307. if (NeedParentMO == '1') {
  308. var collast = { label: '大生产订单号', name: 'EATTRIBUTE5', width: 120, align: 'left' };
  309. cols.push(collast);
  310. }
  311. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  312. cols.push(collast);
  313. var collast = { label: '工单行号', name: 'Sequence', width: 50, align: 'left' };
  314. cols.push(collast);
  315. var collast = { label: 'ERP工单行ID', name: 'MODetailID', hidden: true };
  316. cols.push(collast);
  317. var collast = { label: '已入库数量', name: 'RCVQuantity', hidden: true, };
  318. cols.push(collast);
  319. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  320. cols.push(collast);
  321. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  322. cols.push(collast);
  323. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  324. cols.push(collast);
  325. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  326. cols.push(collast);
  327. var collast = { label: '仓库编码', name: 'WHCode', width: 150, align: 'left' };
  328. cols.push(collast);
  329. var collast = { label: '仓库名称', name: 'WHName', width: 150, align: 'left' };
  330. cols.push(collast);
  331. var collast = { label: '工单部门', name: 'DepName', width: 100, align: 'left' };
  332. cols.push(collast);
  333. var collast = { label: '工单创建日期', name: 'CreateDateTime', width: 60, align: 'left', };
  334. cols.push(collast);
  335. var collast = {
  336. label: "状态", name: "MOStatus", width: 60, align: "left",
  337. formatter: function (cellvalue) {
  338. if (cellvalue == "1") {
  339. return "初始";
  340. } else if (cellvalue == "2") {
  341. return "下发";
  342. }
  343. else if (cellvalue == "3") {
  344. return "关单";
  345. }
  346. else { return ""; }
  347. }
  348. };
  349. cols.push(collast);
  350. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  351. cols.push(collast);
  352. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  353. cols.push(collast);
  354. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  355. //cols.push(collast);
  356. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  357. cols.push(collast);
  358. var collast = { label: '已入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  359. cols.push(collast);
  360. var collast = { label: '可入库数量', name: 'ERPNum', width: 100, align: 'left' };
  361. cols.push(collast);
  362. var collast = { label: '工单备注', name: 'MOMemo', width: 100, align: 'left' };
  363. cols.push(collast);
  364. $.ajax({
  365. url: "/Print/SelectTableColumnName?" + Math.random(),
  366. dataType: "json",
  367. async: false,
  368. success: function (data) {
  369. if (data != null && data.length > 0) {
  370. DateList = data;
  371. for (var i = 0; i < data.length; i++) {
  372. var TableCode = data[i].TableCode;
  373. if (TableCode == "ICSMO") {
  374. var Code = data[i].Code;
  375. var Name = data[i].Name;
  376. var obj = new Array();
  377. obj = {
  378. label: Name,
  379. name: Code,
  380. width: 80,
  381. align: "left"
  382. }
  383. cols.push(obj);
  384. }
  385. if (TableCode == "ICSInventory") {
  386. var Code = "ICSInventory" + data[i].Code;
  387. var Name = data[i].Name;
  388. var obj = new Array();
  389. obj = {
  390. label: Name,
  391. name: Code,
  392. width: 80,
  393. align: "left"
  394. }
  395. cols.push(obj);
  396. //cols1.push(obj);
  397. }
  398. }
  399. }
  400. _Clos = cols;
  401. //_Clos1 = cols1;
  402. }
  403. });
  404. }
  405. if (Type == '4') {
  406. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  407. cols.push(collast);
  408. var collast = { label: '单据号', name: 'SDNCode', width: 120, align: 'left' };
  409. cols.push(collast);
  410. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  411. cols.push(collast);
  412. var collast = { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' };
  413. cols.push(collast);
  414. var collast = { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' };
  415. cols.push(collast);
  416. var collast = { label: '客户代码', name: 'CusCode', width: 120, align: 'left' };
  417. cols.push(collast);
  418. var collast = { label: '客户名称', name: 'CusName', width: 50, align: 'left' };
  419. cols.push(collast);
  420. var collast = { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' };
  421. cols.push(collast);
  422. var collast = { label: '已发数量', name: 'SDNQuantity', width: 50, align: 'left' };
  423. cols.push(collast);
  424. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  425. cols.push(collast);
  426. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  427. cols.push(collast);
  428. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  429. cols.push(collast);
  430. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  431. cols.push(collast);
  432. var collast = {
  433. label: "状态", name: "Status", width: 60, align: "left",
  434. formatter: function (cellvalue) {
  435. if (cellvalue == "1") {
  436. return "开立";
  437. } else if (cellvalue == "2") {
  438. return "审核";
  439. }
  440. else if (cellvalue == "3") {
  441. return "关闭";
  442. }
  443. else { return ""; }
  444. }
  445. };
  446. cols.push(collast);
  447. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  448. cols.push(collast);
  449. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  450. cols.push(collast);
  451. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  452. //cols.push(collast);
  453. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  454. cols.push(collast);
  455. $.ajax({
  456. url: "/Print/SelectTableColumnName?" + Math.random(),
  457. dataType: "json",
  458. async: false,
  459. success: function (data) {
  460. if (data != null && data.length > 0) {
  461. DateList = data;
  462. for (var i = 0; i < data.length; i++) {
  463. var TableCode = data[i].TableCode;
  464. if (TableCode == "ICSSDN") {
  465. var Code = data[i].Code;
  466. var Name = data[i].Name;
  467. var obj = new Array();
  468. obj = {
  469. label: Name,
  470. name: Code,
  471. width: 80,
  472. align: "left"
  473. }
  474. cols.push(obj);
  475. }
  476. if (TableCode == "ICSInventory") {
  477. var Code = "ICSInventory" + data[i].Code;
  478. var Name = data[i].Name;
  479. var obj = new Array();
  480. obj = {
  481. label: Name,
  482. name: Code,
  483. width: 80,
  484. align: "left"
  485. }
  486. cols.push(obj);
  487. //cols1.push(obj);
  488. }
  489. }
  490. }
  491. _Clos = cols;
  492. //_Clos1 = cols1;
  493. }
  494. });
  495. }
  496. if (Type == '5') {
  497. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  498. cols.push(collast);
  499. var collast = { label: '单据号', name: 'InCode', width: 120, align: 'left' };
  500. cols.push(collast);
  501. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  502. cols.push(collast);
  503. var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' };
  504. cols.push(collast);
  505. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  506. cols.push(collast);
  507. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  508. cols.push(collast);
  509. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  510. cols.push(collast);
  511. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left' };
  512. cols.push(collast);
  513. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  514. cols.push(collast);
  515. var collast = { label: '收益部门', name: 'EATTRIBUTE4', width: 50, align: 'left' };
  516. cols.push(collast);
  517. var collast = { label: '供应商', name: 'EATTRIBUTE3', width: 50, align: 'left' };
  518. cols.push(collast);
  519. var collast = { label: '项目名称', name: 'EATTRIBUTE8', width: 50, align: 'left' };
  520. cols.push(collast);
  521. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  522. cols.push(collast);
  523. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  524. cols.push(collast);
  525. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  526. cols.push(collast);
  527. var collast = { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', };
  528. cols.push(collast);
  529. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  530. cols.push(collast);
  531. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  532. cols.push(collast);
  533. var collast = { label: '料品失效天数', name: 'EffectiveDays', hidden: true };
  534. cols.push(collast);
  535. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', hidden: true };
  536. cols.push(collast);
  537. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  538. //cols.push(collast);
  539. $.ajax({
  540. url: "/Print/SelectTableColumnName?" + Math.random(),
  541. dataType: "json",
  542. async: false,
  543. success: function (data) {
  544. if (data != null && data.length > 0) {
  545. DateList = data;
  546. for (var i = 0; i < data.length; i++) {
  547. var TableCode = data[i].TableCode;
  548. if (TableCode == "ICSOtherIn") {
  549. var Code = data[i].Code;
  550. var Name = data[i].Name;
  551. var obj = new Array();
  552. obj = {
  553. label: Name,
  554. name: Code,
  555. width: 80,
  556. align: "left"
  557. }
  558. cols.push(obj);
  559. }
  560. if (TableCode == "ICSInventory") {
  561. var Code = "ICSInventory" + data[i].Code;
  562. var Name = data[i].Name;
  563. var obj = new Array();
  564. obj = {
  565. label: Name,
  566. name: Code,
  567. width: 80,
  568. align: "left"
  569. }
  570. cols.push(obj);
  571. //cols1.push(obj);
  572. }
  573. }
  574. }
  575. _Clos = cols;
  576. //_Clos1 = cols1;
  577. }
  578. });
  579. }
  580. if (Type == '6') {
  581. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  582. cols.push(collast);
  583. var collast = { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' };
  584. cols.push(collast);
  585. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  586. cols.push(collast);
  587. var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' };
  588. cols.push(collast);
  589. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  590. cols.push(collast);
  591. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  592. cols.push(collast);
  593. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  594. cols.push(collast);
  595. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  596. cols.push(collast);
  597. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  598. cols.push(collast);
  599. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  600. cols.push(collast);
  601. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  602. cols.push(collast);
  603. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  604. cols.push(collast);
  605. var collast = { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', };
  606. cols.push(collast);
  607. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  608. cols.push(collast);
  609. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  610. cols.push(collast);
  611. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  612. //cols.push(collast);
  613. $.ajax({
  614. url: "/Print/SelectTableColumnName?" + Math.random(),
  615. dataType: "json",
  616. async: false,
  617. success: function (data) {
  618. if (data != null && data.length > 0) {
  619. DateList = data;
  620. for (var i = 0; i < data.length; i++) {
  621. var TableCode = data[i].TableCode;
  622. if (TableCode == "ICSReturn") {
  623. var Code = data[i].Code;
  624. var Name = data[i].Name;
  625. var obj = new Array();
  626. obj = {
  627. label: Name,
  628. name: Code,
  629. width: 80,
  630. align: "left"
  631. }
  632. cols.push(obj);
  633. }
  634. if (TableCode == "ICSInventory") {
  635. var Code = "ICSInventory" + data[i].Code;
  636. var Name = data[i].Name;
  637. var obj = new Array();
  638. obj = {
  639. label: Name,
  640. name: Code,
  641. width: 80,
  642. align: "left"
  643. }
  644. cols.push(obj);
  645. //cols1.push(obj);
  646. }
  647. }
  648. }
  649. _Clos = cols;
  650. //_Clos1 = cols1;
  651. }
  652. });
  653. }
  654. //审核到货单生成条码
  655. if (Type == '7') {
  656. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  657. cols.push(collast);
  658. var collast = { label: '单据号', name: 'DNCode', width: 120, align: 'left' };
  659. cols.push(collast);
  660. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  661. cols.push(collast);
  662. var collast = { label: '采购订单号', name: 'POCode', width: 50, align: 'left' };
  663. cols.push(collast);
  664. var collast = { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' };
  665. cols.push(collast);
  666. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  667. cols.push(collast);
  668. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  669. cols.push(collast);
  670. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  671. cols.push(collast);
  672. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  673. cols.push(collast);
  674. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  675. cols.push(collast);
  676. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  677. cols.push(collast);
  678. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  679. cols.push(collast);
  680. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  681. cols.push(collast);
  682. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  683. cols.push(collast);
  684. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  685. //cols.push(collast);
  686. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  687. cols.push(collast);
  688. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  689. cols.push(collast);
  690. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  691. cols.push(collast);
  692. var collast = { label: '未入库数量', name: 'NRCVQuantity', width: 60, align: 'left', };
  693. cols.push(collast);
  694. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  695. cols.push(collast);
  696. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  697. cols.push(collast);
  698. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  699. cols.push(collast);
  700. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  701. cols.push(collast);
  702. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  703. cols.push(collast);
  704. $.ajax({
  705. url: "/Print/SelectTableColumnName?" + Math.random(),
  706. dataType: "json",
  707. async: false,
  708. success: function (data) {
  709. if (data != null && data.length > 0) {
  710. DateList = data;
  711. for (var i = 0; i < data.length; i++) {
  712. var TableCode = data[i].TableCode;
  713. if (TableCode == "ICSDeliveryNotice") {
  714. debugger;
  715. var Code = data[i].Code;
  716. var Name = data[i].Name;
  717. var obj = new Array();
  718. obj = {
  719. label: Name,
  720. name: Code,
  721. width: 80,
  722. align: "left"
  723. }
  724. cols.push(obj);
  725. }
  726. if (TableCode == "ICSInventory") {
  727. var Code = "ICSInventory" + data[i].Code;
  728. var Name = data[i].Name;
  729. var obj = new Array();
  730. obj = {
  731. label: Name,
  732. name: Code,
  733. width: 80,
  734. align: "left"
  735. }
  736. cols.push(obj);
  737. //cols1.push(obj);
  738. }
  739. }
  740. }
  741. _Clos = cols;
  742. //_Clos1 = cols1;
  743. }
  744. });
  745. }
  746. //审核委外到货单生成条码
  747. if (Type == '8') {
  748. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  749. cols.push(collast);
  750. var collast = { label: '单据号', name: 'ODNCode', width: 120, align: 'left' };
  751. cols.push(collast);
  752. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  753. cols.push(collast);
  754. var collast = { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' };
  755. cols.push(collast);
  756. var collast = { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' };
  757. cols.push(collast);
  758. var collast = { label: '委外订单表体ID', name: 'OODetailID', hidden: true };
  759. cols.push(collast);
  760. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  761. cols.push(collast);
  762. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  763. cols.push(collast);
  764. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  765. cols.push(collast);
  766. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  767. cols.push(collast);
  768. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  769. cols.push(collast);
  770. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  771. cols.push(collast);
  772. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  773. cols.push(collast);
  774. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  775. cols.push(collast);
  776. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  777. cols.push(collast);
  778. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  779. //cols.push(collast);
  780. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  781. cols.push(collast);
  782. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  783. cols.push(collast);
  784. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  785. cols.push(collast);
  786. var collast = { label: '未入库数量', name: 'NRCVQuantity', width: 60, align: 'left', };
  787. cols.push(collast);
  788. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  789. cols.push(collast);
  790. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  791. cols.push(collast);
  792. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  793. cols.push(collast);
  794. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  795. cols.push(collast);
  796. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  797. cols.push(collast);
  798. $.ajax({
  799. url: "/Print/SelectTableColumnName?" + Math.random(),
  800. dataType: "json",
  801. async: false,
  802. success: function (data) {
  803. if (data != null && data.length > 0) {
  804. DateList = data;
  805. for (var i = 0; i < data.length; i++) {
  806. var TableCode = data[i].TableCode;
  807. if (TableCode == "ICSODeliveryNotice") {
  808. var Code = data[i].Code;
  809. var Name = data[i].Name;
  810. var obj = new Array();
  811. obj = {
  812. label: Name,
  813. name: Code,
  814. width: 80,
  815. align: "left"
  816. }
  817. cols.push(obj);
  818. }
  819. if (TableCode == "ICSInventory") {
  820. var Code = "ICSInventory" + data[i].Code;
  821. var Name = data[i].Name;
  822. var obj = new Array();
  823. obj = {
  824. label: Name,
  825. name: Code,
  826. width: 80,
  827. align: "left"
  828. }
  829. cols.push(obj);
  830. //cols1.push(obj);
  831. }
  832. }
  833. }
  834. _Clos = cols;
  835. //_Clos1 = cols1;
  836. }
  837. });
  838. }
  839. //开立成品入库单生成条码
  840. if (Type == '9') {
  841. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  842. cols.push(collast);
  843. var collast = { label: '单据号', name: 'RCVCode', width: 120, align: 'left' };
  844. cols.push(collast);
  845. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  846. cols.push(collast);
  847. var collast = { label: '源头单据号', name: 'MOCode', width: 50, align: 'left' };
  848. cols.push(collast);
  849. var collast = { label: '仓库号', name: 'WHCode', width: 120, align: 'left' };
  850. cols.push(collast);
  851. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  852. cols.push(collast);
  853. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  854. cols.push(collast);
  855. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  856. cols.push(collast);
  857. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  858. cols.push(collast);
  859. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  860. cols.push(collast);
  861. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  862. cols.push(collast);
  863. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  864. //cols.push(collast);
  865. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  866. cols.push(collast);
  867. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  868. cols.push(collast);
  869. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  870. cols.push(collast);
  871. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  872. cols.push(collast);
  873. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  874. cols.push(collast);
  875. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  876. cols.push(collast);
  877. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  878. cols.push(collast);
  879. $.ajax({
  880. url: "/Print/SelectTableColumnName?" + Math.random(),
  881. dataType: "json",
  882. async: false,
  883. success: function (data) {
  884. if (data != null && data.length > 0) {
  885. DateList = data;
  886. for (var i = 0; i < data.length; i++) {
  887. var TableCode = data[i].TableCode;
  888. if (TableCode == "ICSMO") {
  889. var Code = data[i].Code;
  890. var Name = data[i].Name;
  891. var obj = new Array();
  892. obj = {
  893. label: Name,
  894. name: Code,
  895. width: 80,
  896. align: "left"
  897. }
  898. cols.push(obj);
  899. }
  900. if (TableCode == "ICSInventory") {
  901. var Code = "ICSInventory" + data[i].Code;
  902. var Name = data[i].Name;
  903. var obj = new Array();
  904. obj = {
  905. label: Name,
  906. name: Code,
  907. width: 80,
  908. align: "left"
  909. }
  910. cols.push(obj);
  911. //cols1.push(obj);
  912. }
  913. }
  914. }
  915. _Clos = cols;
  916. //_Clos1 = cols1;
  917. }
  918. });
  919. }
  920. //审核拒收单生成条码
  921. if (Type == '10') {
  922. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  923. cols.push(collast);
  924. var collast = { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' };
  925. cols.push(collast);
  926. var collast = { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' };
  927. cols.push(collast);
  928. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  929. cols.push(collast);
  930. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  931. cols.push(collast);
  932. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  933. cols.push(collast);
  934. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  935. cols.push(collast);
  936. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  937. cols.push(collast);
  938. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  939. cols.push(collast);
  940. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  941. cols.push(collast);
  942. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  943. cols.push(collast);
  944. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  945. cols.push(collast);
  946. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  947. cols.push(collast);
  948. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  949. cols.push(collast);
  950. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  951. cols.push(collast);
  952. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  953. cols.push(collast);
  954. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  955. cols.push(collast);
  956. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  957. cols.push(collast);
  958. $.ajax({
  959. url: "/Print/SelectTableColumnName?" + Math.random(),
  960. dataType: "json",
  961. async: false,
  962. success: function (data) {
  963. if (data != null && data.length > 0) {
  964. DateList = data;
  965. for (var i = 0; i < data.length; i++) {
  966. var TableCode = data[i].TableCode;
  967. if (TableCode == "ICSDeliveryNotice") {
  968. var Code = data[i].Code;
  969. var Name = data[i].Name;
  970. var obj = new Array();
  971. obj = {
  972. label: Name,
  973. name: Code,
  974. width: 80,
  975. align: "left"
  976. }
  977. cols.push(obj);
  978. }
  979. if (TableCode == "ICSInventory") {
  980. var Code = "ICSInventory" + data[i].Code;
  981. var Name = data[i].Name;
  982. var obj = new Array();
  983. obj = {
  984. label: Name,
  985. name: Code,
  986. width: 80,
  987. align: "left"
  988. }
  989. cols.push(obj);
  990. //cols1.push(obj);
  991. }
  992. }
  993. }
  994. _Clos = cols;
  995. //_Clos1 = cols1;
  996. }
  997. });
  998. }
  999. //审核委外拒收单生成条码
  1000. if (Type == '11') {
  1001. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1002. cols.push(collast);
  1003. var collast = { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' };
  1004. cols.push(collast);
  1005. var collast = { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' };
  1006. cols.push(collast);
  1007. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  1008. cols.push(collast);
  1009. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  1010. cols.push(collast);
  1011. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1012. cols.push(collast);
  1013. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  1014. cols.push(collast);
  1015. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  1016. cols.push(collast);
  1017. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  1018. cols.push(collast);
  1019. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  1020. cols.push(collast);
  1021. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1022. cols.push(collast);
  1023. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1024. cols.push(collast);
  1025. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  1026. cols.push(collast);
  1027. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1028. cols.push(collast);
  1029. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  1030. cols.push(collast);
  1031. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  1032. cols.push(collast);
  1033. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  1034. cols.push(collast);
  1035. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  1036. cols.push(collast);
  1037. $.ajax({
  1038. url: "/Print/SelectTableColumnName?" + Math.random(),
  1039. dataType: "json",
  1040. async: false,
  1041. success: function (data) {
  1042. if (data != null && data.length > 0) {
  1043. DateList = data;
  1044. for (var i = 0; i < data.length; i++) {
  1045. var TableCode = data[i].TableCode;
  1046. if (TableCode == "ICSODeliveryNotice") {
  1047. var Code = data[i].Code;
  1048. var Name = data[i].Name;
  1049. var obj = new Array();
  1050. obj = {
  1051. label: Name,
  1052. name: Code,
  1053. width: 80,
  1054. align: "left"
  1055. }
  1056. cols.push(obj);
  1057. }
  1058. if (TableCode == "ICSInventory") {
  1059. var Code = "ICSInventory" + data[i].Code;
  1060. var Name = data[i].Name;
  1061. var obj = new Array();
  1062. obj = {
  1063. label: Name,
  1064. name: Code,
  1065. width: 80,
  1066. align: "left"
  1067. }
  1068. cols.push(obj);
  1069. //cols1.push(obj);
  1070. }
  1071. }
  1072. }
  1073. _Clos = cols;
  1074. //_Clos1 = cols1;
  1075. }
  1076. });
  1077. }
  1078. //领料申请退料生成条码
  1079. if (Type == '12') {
  1080. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1081. cols.push(collast);
  1082. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  1083. cols.push(collast);
  1084. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1085. cols.push(collast);
  1086. var collast = { label: '来源单据号', name: 'SourceCodea', width: 120, align: 'left' };
  1087. cols.push(collast);
  1088. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  1089. cols.push(collast);
  1090. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1091. cols.push(collast);
  1092. var collast = { label: '料品编码', name: 'InvName', width: 150, align: 'left', };
  1093. cols.push(collast);
  1094. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1095. cols.push(collast);
  1096. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1097. cols.push(collast);
  1098. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1099. cols.push(collast);
  1100. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1101. cols.push(collast);
  1102. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1103. cols.push(collast);
  1104. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1105. //cols.push(collast);
  1106. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1107. cols.push(collast);
  1108. $.ajax({
  1109. url: "/Print/SelectTableColumnName?" + Math.random(),
  1110. dataType: "json",
  1111. async: false,
  1112. success: function (data) {
  1113. if (data != null && data.length > 0) {
  1114. DateList = data;
  1115. for (var i = 0; i < data.length; i++) {
  1116. var TableCode = data[i].TableCode;
  1117. if (TableCode == "ICSMOApplyNegDetail") {
  1118. var Code = data[i].Code;
  1119. var Name = data[i].Name;
  1120. var obj = new Array();
  1121. obj = {
  1122. label: Name,
  1123. name: Code,
  1124. width: 80,
  1125. align: "left"
  1126. }
  1127. cols.push(obj);
  1128. }
  1129. if (TableCode == "ICSInventory") {
  1130. var Code = "ICSInventory" + data[i].Code;
  1131. var Name = data[i].Name;
  1132. var obj = new Array();
  1133. obj = {
  1134. label: Name,
  1135. name: Code,
  1136. width: 80,
  1137. align: "left"
  1138. }
  1139. cols.push(obj);
  1140. //cols1.push(obj);
  1141. }
  1142. }
  1143. }
  1144. _Clos = cols;
  1145. //_Clos1 = cols1;
  1146. }
  1147. });
  1148. }
  1149. //材料出库退料生成条码
  1150. if (Type == '13') {
  1151. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1152. cols.push(collast);
  1153. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  1154. cols.push(collast);
  1155. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1156. cols.push(collast);
  1157. var collast = { label: '源头单据号', name: 'SCode', width: 120, align: 'left' };
  1158. cols.push(collast);
  1159. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  1160. cols.push(collast);
  1161. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1162. cols.push(collast);
  1163. var collast = { label: '料品编码', name: 'InvName', width: 150, align: 'left', };
  1164. cols.push(collast);
  1165. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1166. cols.push(collast);
  1167. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1168. cols.push(collast);
  1169. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1170. cols.push(collast);
  1171. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1172. cols.push(collast);
  1173. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1174. cols.push(collast);
  1175. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1176. //cols.push(collast);
  1177. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1178. cols.push(collast);
  1179. var collast = { label: '料品失效天数', name: 'EffectiveDays', hidden: true };
  1180. cols.push(collast);
  1181. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', hidden: true };
  1182. cols.push(collast);
  1183. }
  1184. //委外领料申请退料生成条码
  1185. if (Type == '14') {
  1186. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1187. cols.push(collast);
  1188. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  1189. cols.push(collast);
  1190. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1191. cols.push(collast);
  1192. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  1193. cols.push(collast);
  1194. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1195. cols.push(collast);
  1196. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1197. cols.push(collast);
  1198. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1199. cols.push(collast);
  1200. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1201. cols.push(collast);
  1202. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1203. cols.push(collast);
  1204. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1205. cols.push(collast);
  1206. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1207. cols.push(collast);
  1208. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1209. //cols.push(collast);
  1210. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1211. cols.push(collast);
  1212. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1213. //cols.push(collast);
  1214. $.ajax({
  1215. url: "/Print/SelectTableColumnName?" + Math.random(),
  1216. dataType: "json",
  1217. async: false,
  1218. success: function (data) {
  1219. if (data != null && data.length > 0) {
  1220. DateList = data;
  1221. for (var i = 0; i < data.length; i++) {
  1222. var TableCode = data[i].TableCode;
  1223. if (TableCode == "ICSOApplyNegDetail") {
  1224. var Code = data[i].Code;
  1225. var Name = data[i].Name;
  1226. var obj = new Array();
  1227. obj = {
  1228. label: Name,
  1229. name: Code,
  1230. width: 80,
  1231. align: "left"
  1232. }
  1233. cols.push(obj);
  1234. }
  1235. if (TableCode == "ICSInventory") {
  1236. var Code = "ICSInventory" + data[i].Code;
  1237. var Name = data[i].Name;
  1238. var obj = new Array();
  1239. obj = {
  1240. label: Name,
  1241. name: Code,
  1242. width: 80,
  1243. align: "left"
  1244. }
  1245. cols.push(obj);
  1246. //cols1.push(obj);
  1247. }
  1248. }
  1249. }
  1250. _Clos = cols;
  1251. //_Clos1 = cols1;
  1252. }
  1253. });
  1254. }
  1255. //委外材料出库退料生成条码
  1256. if (Type == '15') {
  1257. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1258. cols.push(collast);
  1259. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  1260. cols.push(collast);
  1261. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1262. cols.push(collast);
  1263. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  1264. cols.push(collast);
  1265. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1266. cols.push(collast);
  1267. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1268. cols.push(collast);
  1269. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1270. cols.push(collast);
  1271. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1272. cols.push(collast);
  1273. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1274. cols.push(collast);
  1275. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1276. cols.push(collast);
  1277. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1278. cols.push(collast);
  1279. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1280. //cols.push(collast);
  1281. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1282. cols.push(collast);
  1283. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1284. //cols.push(collast);
  1285. $.ajax({
  1286. url: "/Print/SelectTableColumnName?" + Math.random(),
  1287. dataType: "json",
  1288. async: false,
  1289. success: function (data) {
  1290. if (data != null && data.length > 0) {
  1291. DateList = data;
  1292. for (var i = 0; i < data.length; i++) {
  1293. var TableCode = data[i].TableCode;
  1294. if (TableCode == "ICSOApplyNegDetail") {
  1295. var Code = data[i].Code;
  1296. var Name = data[i].Name;
  1297. var obj = new Array();
  1298. obj = {
  1299. label: Name,
  1300. name: Code,
  1301. width: 80,
  1302. align: "left"
  1303. }
  1304. cols.push(obj);
  1305. }
  1306. if (TableCode == "ICSInventory") {
  1307. var Code = "ICSInventory" + data[i].Code;
  1308. var Name = data[i].Name;
  1309. var obj = new Array();
  1310. obj = {
  1311. label: Name,
  1312. name: Code,
  1313. width: 80,
  1314. align: "left"
  1315. }
  1316. cols.push(obj);
  1317. //cols1.push(obj);
  1318. }
  1319. }
  1320. }
  1321. _Clos = cols;
  1322. //_Clos1 = cols1;
  1323. }
  1324. });
  1325. }
  1326. //返工工单生成条码
  1327. if (Type == '16') {
  1328. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1329. cols.push(collast);
  1330. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  1331. cols.push(collast);
  1332. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  1333. cols.push(collast);
  1334. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  1335. cols.push(collast);
  1336. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1337. cols.push(collast);
  1338. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1339. cols.push(collast);
  1340. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1341. cols.push(collast);
  1342. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1343. cols.push(collast);
  1344. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  1345. cols.push(collast);
  1346. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1347. cols.push(collast);
  1348. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1349. cols.push(collast);
  1350. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1351. //cols.push(collast);
  1352. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1353. cols.push(collast);
  1354. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1355. //cols.push(collast);
  1356. $.ajax({
  1357. url: "/Print/SelectTableColumnName?" + Math.random(),
  1358. dataType: "json",
  1359. async: false,
  1360. success: function (data) {
  1361. if (data != null && data.length > 0) {
  1362. DateList = data;
  1363. for (var i = 0; i < data.length; i++) {
  1364. var TableCode = data[i].TableCode;
  1365. if (TableCode == "ICSMOPick") {
  1366. var Code = data[i].Code;
  1367. var Name = data[i].Name;
  1368. var obj = new Array();
  1369. obj = {
  1370. label: Name,
  1371. name: Code,
  1372. width: 80,
  1373. align: "left"
  1374. }
  1375. cols.push(obj);
  1376. }
  1377. if (TableCode == "ICSInventory") {
  1378. var Code = "ICSInventory" + data[i].Code;
  1379. var Name = data[i].Name;
  1380. var obj = new Array();
  1381. obj = {
  1382. label: Name,
  1383. name: Code,
  1384. width: 80,
  1385. align: "left"
  1386. }
  1387. cols.push(obj);
  1388. //cols1.push(obj);
  1389. }
  1390. }
  1391. }
  1392. _Clos = cols;
  1393. //_Clos1 = cols1;
  1394. }
  1395. });
  1396. }
  1397. //不合格条码生成条码
  1398. if (Type == '17') {
  1399. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1400. cols.push(collast);
  1401. var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' };
  1402. cols.push(collast);
  1403. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1404. cols.push(collast);
  1405. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1406. cols.push(collast);
  1407. var collast = { label: '不合格数量', name: 'Quantity', width: 100, align: 'left' };
  1408. cols.push(collast);
  1409. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1410. cols.push(collast);
  1411. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1412. cols.push(collast);
  1413. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1414. cols.push(collast);
  1415. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1416. //cols.push(collast);
  1417. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1418. cols.push(collast);
  1419. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1420. //cols.push(collast);
  1421. $.ajax({
  1422. url: "/Print/SelectTableColumnName?" + Math.random(),
  1423. dataType: "json",
  1424. async: false,
  1425. success: function (data) {
  1426. if (data != null && data.length > 0) {
  1427. DateList = data;
  1428. for (var i = 0; i < data.length; i++) {
  1429. var TableCode = data[i].TableCode;
  1430. if (TableCode == "ICSInspection") {
  1431. var Code = data[i].Code;
  1432. var Name = data[i].Name;
  1433. var obj = new Array();
  1434. obj = {
  1435. label: Name,
  1436. name: Code,
  1437. width: 80,
  1438. align: "left"
  1439. }
  1440. cols.push(obj);
  1441. }
  1442. if (TableCode == "ICSInventory") {
  1443. var Code = "ICSInventory" + data[i].Code;
  1444. var Name = data[i].Name;
  1445. var obj = new Array();
  1446. obj = {
  1447. label: Name,
  1448. name: Code,
  1449. width: 80,
  1450. align: "left"
  1451. }
  1452. cols.push(obj);
  1453. //cols1.push(obj);
  1454. }
  1455. }
  1456. }
  1457. _Clos = cols;
  1458. //_Clos1 = cols1;
  1459. }
  1460. });
  1461. }
  1462. //副产品生成条码
  1463. if (Type == '18') {
  1464. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1465. cols.push(collast);
  1466. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  1467. cols.push(collast);
  1468. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  1469. cols.push(collast);
  1470. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  1471. cols.push(collast);
  1472. var collast = { label: '料品编码(子)', name: 'ZInvCode', width: 120, align: 'left' };
  1473. cols.push(collast);
  1474. var collast = { label: '料品编码(母)', name: 'MInvCode', width: 120, align: 'left' };
  1475. cols.push(collast);
  1476. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1477. cols.push(collast);
  1478. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1479. cols.push(collast);
  1480. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1481. cols.push(collast);
  1482. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  1483. cols.push(collast);
  1484. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1485. cols.push(collast);
  1486. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1487. cols.push(collast);
  1488. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1489. //cols.push(collast);
  1490. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1491. cols.push(collast);
  1492. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1493. //cols.push(collast);
  1494. $.ajax({
  1495. url: "/Print/SelectTableColumnName?" + Math.random(),
  1496. dataType: "json",
  1497. async: false,
  1498. success: function (data) {
  1499. if (data != null && data.length > 0) {
  1500. DateList = data;
  1501. for (var i = 0; i < data.length; i++) {
  1502. var TableCode = data[i].TableCode;
  1503. if (TableCode == "ICSMOPick") {
  1504. var Code = data[i].Code;
  1505. var Name = data[i].Name;
  1506. var obj = new Array();
  1507. obj = {
  1508. label: Name,
  1509. name: Code,
  1510. width: 80,
  1511. align: "left"
  1512. }
  1513. cols.push(obj);
  1514. }
  1515. if (TableCode == "ICSInventory") {
  1516. var Code = "ICSInventory" + data[i].Code;
  1517. var Name = data[i].Name;
  1518. var obj = new Array();
  1519. obj = {
  1520. label: Name,
  1521. name: Code,
  1522. width: 80,
  1523. align: "left"
  1524. }
  1525. cols.push(obj);
  1526. //cols1.push(obj);
  1527. }
  1528. }
  1529. }
  1530. _Clos = cols;
  1531. //_Clos1 = cols1;
  1532. }
  1533. });
  1534. }
  1535. //锐腾两步调入生成条码
  1536. if (Type == '20') {
  1537. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1538. cols.push(collast);
  1539. var collast = { label: '调拨单号', name: 'TransferNO', width: 120, align: 'left' };
  1540. cols.push(collast);
  1541. var collast = { label: '调拨单行号', name: 'Sequence', width: 50, align: 'left' };
  1542. cols.push(collast);
  1543. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1544. cols.push(collast);
  1545. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1546. cols.push(collast);
  1547. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1548. cols.push(collast);
  1549. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1550. cols.push(collast);
  1551. var collast = { label: '已调入数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1552. cols.push(collast);
  1553. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1554. cols.push(collast);
  1555. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1556. cols.push(collast);
  1557. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1558. //cols.push(collast);
  1559. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1560. cols.push(collast);
  1561. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1562. //cols.push(collast);
  1563. $.ajax({
  1564. url: "/Print/SelectTableColumnName?" + Math.random(),
  1565. dataType: "json",
  1566. async: false,
  1567. success: function (data) {
  1568. if (data != null && data.length > 0) {
  1569. DateList = data;
  1570. for (var i = 0; i < data.length; i++) {
  1571. var TableCode = data[i].TableCode;
  1572. if (TableCode == "ICSMOPick") {
  1573. var Code = data[i].Code;
  1574. var Name = data[i].Name;
  1575. var obj = new Array();
  1576. obj = {
  1577. label: Name,
  1578. name: Code,
  1579. width: 80,
  1580. align: "left"
  1581. }
  1582. cols.push(obj);
  1583. }
  1584. if (TableCode == "ICSInventory") {
  1585. var Code = "ICSInventory" + data[i].Code;
  1586. var Name = data[i].Name;
  1587. var obj = new Array();
  1588. obj = {
  1589. label: Name,
  1590. name: Code,
  1591. width: 80,
  1592. align: "left"
  1593. }
  1594. cols.push(obj);
  1595. //cols1.push(obj);
  1596. }
  1597. }
  1598. }
  1599. _Clos = cols;
  1600. //_Clos1 = cols1;
  1601. }
  1602. });
  1603. }
  1604. //采购入库生成条码
  1605. if (Type == '22') {
  1606. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1607. cols.push(collast);
  1608. var collast = { label: '入库单号', name: 'RCVCode', width: 120, align: 'left' };
  1609. cols.push(collast);
  1610. var collast = { label: '入库单行号', name: 'Sequence', width: 50, align: 'left' };
  1611. cols.push(collast);
  1612. var collast = { label: '采购订单号', name: 'SourceCode', width: 50, align: 'left' };
  1613. cols.push(collast);
  1614. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1615. cols.push(collast);
  1616. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1617. cols.push(collast);
  1618. var collast = { label: '规格型号', name: 'InvStd', width: 150, align: 'left', };
  1619. cols.push(collast);
  1620. var collast = { label: '供应商', name: 'VenName', width: 150, align: 'left', };
  1621. cols.push(collast);
  1622. var collast = { label: '采购员', name: 'F_RealName', width: 150, align: 'left', };
  1623. cols.push(collast);
  1624. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1625. cols.push(collast);
  1626. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1627. cols.push(collast);
  1628. var collast = { label: '已入数量', name: 'RCVQuantity', width: 100, align: 'left' };
  1629. cols.push(collast);
  1630. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1631. //cols.push(collast);
  1632. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1633. cols.push(collast);
  1634. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1635. //cols.push(collast);
  1636. $.ajax({
  1637. url: "/Print/SelectTableColumnName?" + Math.random(),
  1638. dataType: "json",
  1639. async: false,
  1640. success: function (data) {
  1641. if (data != null && data.length > 0) {
  1642. DateList = data;
  1643. for (var i = 0; i < data.length; i++) {
  1644. var TableCode = data[i].TableCode;
  1645. if (TableCode == "ICSPurchaseReceive") {
  1646. var Code = data[i].Code;
  1647. var Name = data[i].Name;
  1648. var obj = new Array();
  1649. obj = {
  1650. label: Name,
  1651. name: Code,
  1652. width: 80,
  1653. align: "left"
  1654. }
  1655. cols.push(obj);
  1656. }
  1657. if (TableCode == "ICSInventory") {
  1658. var Code = "ICSInventory" + data[i].Code;
  1659. var Name = data[i].Name;
  1660. var obj = new Array();
  1661. obj = {
  1662. label: Name,
  1663. name: Code,
  1664. width: 80,
  1665. align: "left"
  1666. }
  1667. cols.push(obj);
  1668. //cols1.push(obj);
  1669. }
  1670. }
  1671. }
  1672. _Clos = cols;
  1673. //_Clos1 = cols1;
  1674. }
  1675. });
  1676. }
  1677. //采购入库生成条码
  1678. if (Type == '23') {
  1679. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1680. cols.push(collast);
  1681. var collast = { label: '委外入库单号', name: 'RCVCode', width: 120, align: 'left' };
  1682. cols.push(collast);
  1683. var collast = { label: '委外入库单行号', name: 'Sequence', width: 50, align: 'left' };
  1684. cols.push(collast);
  1685. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1686. cols.push(collast);
  1687. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1688. cols.push(collast);
  1689. var collast = { label: '单据创建时间', name: 'CreateDateTime', width: 150, align: 'left', };
  1690. cols.push(collast);
  1691. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1692. cols.push(collast);
  1693. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1694. cols.push(collast);
  1695. var collast = { label: '已入数量', name: 'RCVQuantity', width: 100, align: 'left' };
  1696. cols.push(collast);
  1697. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1698. cols.push(collast);
  1699. $.ajax({
  1700. url: "/Print/SelectTableColumnName?" + Math.random(),
  1701. dataType: "json",
  1702. async: false,
  1703. success: function (data) {
  1704. if (data != null && data.length > 0) {
  1705. DateList = data;
  1706. for (var i = 0; i < data.length; i++) {
  1707. var TableCode = data[i].TableCode;
  1708. if (TableCode == "ICSOutsourcingReceive") {
  1709. var Code = data[i].Code;
  1710. var Name = data[i].Name;
  1711. var obj = new Array();
  1712. obj = {
  1713. label: Name,
  1714. name: Code,
  1715. width: 80,
  1716. align: "left"
  1717. }
  1718. cols.push(obj);
  1719. }
  1720. if (TableCode == "ICSInventory") {
  1721. var Code = "ICSInventory" + data[i].Code;
  1722. var Name = data[i].Name;
  1723. var obj = new Array();
  1724. obj = {
  1725. label: Name,
  1726. name: Code,
  1727. width: 80,
  1728. align: "left"
  1729. }
  1730. cols.push(obj);
  1731. //cols1.push(obj);
  1732. }
  1733. }
  1734. }
  1735. _Clos = cols;
  1736. //_Clos1 = cols1;
  1737. }
  1738. });
  1739. }
  1740. //红字销售单出库生成条码
  1741. if (Type == '24') {
  1742. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1743. cols.push(collast);
  1744. var collast = { label: '单据号', name: 'SSDCode', width: 120, align: 'left' };
  1745. cols.push(collast);
  1746. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  1747. cols.push(collast);
  1748. var collast = { label: '客户编码', name: 'CusCode', width: 120, align: 'left' };
  1749. cols.push(collast);
  1750. var collast = { label: '客户名称', name: 'CusName', width: 120, align: 'left' };
  1751. cols.push(collast);
  1752. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1753. cols.push(collast);
  1754. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  1755. cols.push(collast);
  1756. var collast = { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' };
  1757. cols.push(collast);
  1758. var collast = { label: '退货日期', name: 'CreateDateTime', width: 150, align: 'left' };
  1759. cols.push(collast);
  1760. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  1761. cols.push(collast);
  1762. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  1763. cols.push(collast);
  1764. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  1765. cols.push(collast);
  1766. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  1767. cols.push(collast);
  1768. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1769. cols.push(collast);
  1770. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1771. //cols.push(collast);
  1772. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  1773. cols.push(collast);
  1774. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1775. cols.push(collast);
  1776. var collast = { label: '入库数量', name: 'SSDQuantity', width: 60, align: 'left', };
  1777. cols.push(collast);
  1778. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  1779. cols.push(collast);
  1780. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  1781. cols.push(collast);
  1782. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  1783. cols.push(collast);
  1784. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  1785. cols.push(collast);
  1786. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  1787. cols.push(collast);
  1788. $.ajax({
  1789. url: "/Print/SelectTableColumnName?" + Math.random(),
  1790. dataType: "json",
  1791. async: false,
  1792. success: function (data) {
  1793. if (data != null && data.length > 0) {
  1794. DateList = data;
  1795. for (var i = 0; i < data.length; i++) {
  1796. var TableCode = data[i].TableCode;
  1797. if (TableCode == "ICSSSD") {
  1798. debugger;
  1799. var Code = data[i].Code;
  1800. var Name = data[i].Name;
  1801. var obj = new Array();
  1802. obj = {
  1803. label: Name,
  1804. name: Code,
  1805. width: 80,
  1806. align: "left"
  1807. }
  1808. cols.push(obj);
  1809. }
  1810. if (TableCode == "ICSInventory") {
  1811. var Code = "ICSInventory" + data[i].Code;
  1812. var Name = data[i].Name;
  1813. var obj = new Array();
  1814. obj = {
  1815. label: Name,
  1816. name: Code,
  1817. width: 80,
  1818. align: "left"
  1819. }
  1820. cols.push(obj);
  1821. //cols1.push(obj);
  1822. }
  1823. }
  1824. }
  1825. _Clos = cols;
  1826. //_Clos1 = cols1;
  1827. }
  1828. });
  1829. }
  1830. //派纳线边仓调拨申请单生成条码
  1831. if (Type == '201') {
  1832. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1833. cols.push(collast);
  1834. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1835. cols.push(collast);
  1836. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1837. cols.push(collast);
  1838. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  1839. cols.push(collast);
  1840. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  1841. cols.push(collast);
  1842. var collast = { label: '调出仓库', name: 'FromWHName', width: 100, align: 'left', };
  1843. cols.push(collast);
  1844. var collast = { label: '调入仓库', name: 'ToWHName', width: 100, align: 'left', };
  1845. cols.push(collast);
  1846. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1847. cols.push(collast);
  1848. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1849. cols.push(collast);
  1850. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1851. cols.push(collast);
  1852. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1853. //cols.push(collast);
  1854. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1855. cols.push(collast);
  1856. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1857. //cols.push(collast);
  1858. $.ajax({
  1859. url: "/Print/SelectTableColumnName?" + Math.random(),
  1860. dataType: "json",
  1861. async: false,
  1862. success: function (data) {
  1863. if (data != null && data.length > 0) {
  1864. DateList = data;
  1865. for (var i = 0; i < data.length; i++) {
  1866. var TableCode = data[i].TableCode;
  1867. if (TableCode == "ICSTransferApplication") {
  1868. var Code = data[i].Code;
  1869. var Name = data[i].Name;
  1870. var obj = new Array();
  1871. obj = {
  1872. label: Name,
  1873. name: Code,
  1874. width: 80,
  1875. align: "left"
  1876. }
  1877. cols.push(obj);
  1878. }
  1879. if (TableCode == "ICSInventory") {
  1880. var Code = "ICSInventory" + data[i].Code;
  1881. var Name = data[i].Name;
  1882. var obj = new Array();
  1883. obj = {
  1884. label: Name,
  1885. name: Code,
  1886. width: 80,
  1887. align: "left"
  1888. }
  1889. cols.push(obj);
  1890. //cols1.push(obj);
  1891. }
  1892. }
  1893. }
  1894. _Clos = cols;
  1895. //_Clos1 = cols1;
  1896. }
  1897. });
  1898. }
  1899. //调拨申请单生成条码
  1900. if (Type == '202') {
  1901. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1902. cols.push(collast);
  1903. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1904. cols.push(collast);
  1905. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1906. cols.push(collast);
  1907. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1908. cols.push(collast);
  1909. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1910. cols.push(collast);
  1911. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1912. cols.push(collast);
  1913. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1914. cols.push(collast);
  1915. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1916. cols.push(collast);
  1917. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1918. //cols.push(collast);
  1919. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1920. cols.push(collast);
  1921. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1922. //cols.push(collast);
  1923. $.ajax({
  1924. url: "/Print/SelectTableColumnName?" + Math.random(),
  1925. dataType: "json",
  1926. async: false,
  1927. success: function (data) {
  1928. if (data != null && data.length > 0) {
  1929. DateList = data;
  1930. for (var i = 0; i < data.length; i++) {
  1931. var TableCode = data[i].TableCode;
  1932. if (TableCode == "ICSTransferApplication") {
  1933. var Code = data[i].Code;
  1934. var Name = data[i].Name;
  1935. var obj = new Array();
  1936. obj = {
  1937. label: Name,
  1938. name: Code,
  1939. width: 80,
  1940. align: "left"
  1941. }
  1942. cols.push(obj);
  1943. }
  1944. if (TableCode == "ICSInventory") {
  1945. var Code = "ICSInventory" + data[i].Code;
  1946. var Name = data[i].Name;
  1947. var obj = new Array();
  1948. obj = {
  1949. label: Name,
  1950. name: Code,
  1951. width: 80,
  1952. align: "left"
  1953. }
  1954. cols.push(obj);
  1955. //cols1.push(obj);
  1956. }
  1957. }
  1958. }
  1959. _Clos = cols;
  1960. //_Clos1 = cols1;
  1961. }
  1962. });
  1963. }
  1964. //一步调入单生成条码
  1965. if (Type == '203') {
  1966. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1967. cols.push(collast);
  1968. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1969. cols.push(collast);
  1970. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1971. cols.push(collast);
  1972. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1973. cols.push(collast);
  1974. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1975. cols.push(collast);
  1976. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1977. cols.push(collast);
  1978. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1979. cols.push(collast);
  1980. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1981. cols.push(collast);
  1982. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1983. //cols.push(collast);
  1984. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1985. cols.push(collast);
  1986. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1987. //cols.push(collast);
  1988. $.ajax({
  1989. url: "/Print/SelectTableColumnName?" + Math.random(),
  1990. dataType: "json",
  1991. async: false,
  1992. success: function (data) {
  1993. if (data != null && data.length > 0) {
  1994. DateList = data;
  1995. for (var i = 0; i < data.length; i++) {
  1996. var TableCode = data[i].TableCode;
  1997. if (TableCode == "ICSTransferApplication") {
  1998. var Code = data[i].Code;
  1999. var Name = data[i].Name;
  2000. var obj = new Array();
  2001. obj = {
  2002. label: Name,
  2003. name: Code,
  2004. width: 80,
  2005. align: "left"
  2006. }
  2007. cols.push(obj);
  2008. }
  2009. if (TableCode == "ICSInventory") {
  2010. var Code = "ICSInventory" + data[i].Code;
  2011. var Name = data[i].Name;
  2012. var obj = new Array();
  2013. obj = {
  2014. label: Name,
  2015. name: Code,
  2016. width: 80,
  2017. align: "left"
  2018. }
  2019. cols.push(obj);
  2020. //cols1.push(obj);
  2021. }
  2022. }
  2023. }
  2024. _Clos = cols;
  2025. //_Clos1 = cols1;
  2026. }
  2027. });
  2028. }
  2029. if (Type=='17') {
  2030. var cols1 = new Array();
  2031. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  2032. cols1.push(collast1);
  2033. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  2034. cols1.push(collast1);
  2035. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  2036. cols1.push(collast1);
  2037. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  2038. cols1.push(collast1);
  2039. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  2040. cols1.push(collast1);
  2041. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  2042. cols1.push(collast1);
  2043. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  2044. cols1.push(collast1);
  2045. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  2046. cols1.push(collast1);
  2047. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  2048. cols1.push(collast1);
  2049. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  2050. cols1.push(collast1);
  2051. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  2052. cols1.push(collast1);
  2053. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  2054. cols1.push(collast1);
  2055. var collast1 = { label: '是否打印', name: 'isPrint', width: 150, align: 'left' };
  2056. cols1.push(collast1);
  2057. } else {
  2058. var cols1 = new Array();
  2059. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  2060. cols1.push(collast1);
  2061. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  2062. cols1.push(collast1);
  2063. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  2064. cols1.push(collast1);
  2065. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  2066. cols1.push(collast1);
  2067. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  2068. cols1.push(collast1);
  2069. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  2070. cols1.push(collast1);
  2071. //var collast1 = { label: '炉批号', name: 'EATTRIBUTE4', width: 100, align: 'left' };
  2072. //cols1.push(collast1);
  2073. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  2074. cols1.push(collast1);
  2075. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  2076. cols1.push(collast1);
  2077. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  2078. cols1.push(collast1);
  2079. var collast1 = { label: '备注', name: 'EATTRIBUTE5', width: 100, align: 'left' };
  2080. cols1.push(collast1);
  2081. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  2082. cols1.push(collast1);
  2083. var collast1 = { label: '是否检验', name: 'isInspection', width: 100, align: 'left' };
  2084. cols1.push(collast1);
  2085. var collast1 = { label: '免检', name: 'isExemption', width: 100, align: 'left' };
  2086. cols1.push(collast1);
  2087. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  2088. cols1.push(collast1);
  2089. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  2090. cols1.push(collast1);
  2091. var collast1 = { label: '是否打印', name: 'isPrint', width: 150, align: 'left' };
  2092. cols1.push(collast1);
  2093. }
  2094. if (data != null && data.length > 0) {
  2095. DateList = data;
  2096. for (var i = 0; i < data.length; i++) {
  2097. var ColName = data[i].ColName;
  2098. var ColCode = data[i].ColCode;
  2099. var obj = new Array();
  2100. obj = {
  2101. label: ColName,
  2102. name: ColCode,
  2103. width: 80,
  2104. align: "left"
  2105. }
  2106. cols.push(obj);
  2107. cols1.push(obj);
  2108. }
  2109. }
  2110. _Clos = cols;
  2111. _Clos1 = cols1;
  2112. }
  2113. });
  2114. }
  2115. //生产退料
  2116. function gridList() {
  2117. var $gridList = $("#gridList");
  2118. var queryJson = {
  2119. POCode: $("#txt_POCode").val(),
  2120. InvCode: $("#txt_InvCode").val(),
  2121. InvName: $("#txt_InvName").val(),
  2122. BatchCode: $("#txt_BatchCode").val(),
  2123. FromTime: $("#FromTime").val(),
  2124. ToTime: $("#ToTime").val(),
  2125. POStatus: $("#selShow").val()
  2126. }
  2127. $gridList.dataGrid({
  2128. url: "/XJYWMS/WMSCreateItemLot/GetGridJson" + "?" + Math.random(),
  2129. postData: { queryJson: JSON.stringify(queryJson) },
  2130. height: $(window).height() - 200,
  2131. width: $(window).width() - 300,
  2132. colModel: _Clos,
  2133. //colModel: [
  2134. // { label: "主键", name: "ID", hidden: true, key: true },
  2135. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  2136. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2137. // { label: '工单子件', name: 'SourceDetailID', hidden: true, },
  2138. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2139. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  2140. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2141. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2142. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2143. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2144. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2145. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2146. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2147. //],
  2148. //colModel: ColModelMain,
  2149. width: "100%",
  2150. autowidth: true,
  2151. //shrinkToFit: true,
  2152. gridComplete: function () {
  2153. },
  2154. pager: "#gridPager",
  2155. sortname: " MTIME desc ,ApplyNegCode asc,REPLICATE('0',10-len(Sequence))+Sequence  ",
  2156. // sortname: 'ApplyNegCode ',
  2157. //let str = `He said, "It's a 'beautiful' day."`,
  2158. //sortorder: "asc",
  2159. viewrecords: true,
  2160. multiselect: true,
  2161. //beforeSelectRow: function (rowid, e) {
  2162. // $("#gridList").jqGrid('resetSelection');
  2163. // return (true);
  2164. //},
  2165. subGrid: true, // (1)开启子表格支持
  2166. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2167. $("#gridList").jqGrid("setSelection", rowid, false);
  2168. bindSubGrid(subgrid_id, rowid)
  2169. }
  2170. });
  2171. $("#warehouse a.btn-default").click(function () {
  2172. $("#warehouse a.btn-default").removeClass("active");
  2173. $(this).addClass("active");
  2174. $('#btn_search').trigger("click");
  2175. });
  2176. $("#btn_search").click(function () {
  2177. var warehouse = $("#warehouse a.active").attr('data-value');
  2178. var queryJson = {
  2179. POCode: $("#txt_POCode").val(),
  2180. InvCode: $("#txt_InvCode").val(),
  2181. InvName: $("#txt_InvName").val(),
  2182. BatchCode: $("#txt_BatchCode").val(),
  2183. FromTime: $("#FromTime").val(),
  2184. ToTime: $("#ToTime").val(),
  2185. POStatus: $("#selShow").val()
  2186. }
  2187. $gridList.jqGrid('setGridParam', {
  2188. postData: { queryJson: JSON.stringify(queryJson) },
  2189. }).trigger('reloadGrid');
  2190. });
  2191. }
  2192. function bindSubGrid(subgrid_id, rowid) {
  2193. $("#gridList").jqGrid("setSelection", rowid, false);
  2194. var subgrid_table_id;
  2195. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2196. var subgrid_pager_id;
  2197. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2198. // (5)动态添加子报表的table和pager
  2199. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2200. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  2201. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2202. // (6)创建jqGrid对象
  2203. $("#" + subgrid_table_id).dataGrid({
  2204. cellEdit: true,
  2205. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2206. //colModel: [
  2207. // { label: "主键", name: "ID", hidden: true, key: true },
  2208. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2209. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2210. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2211. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2212. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2213. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2214. //],
  2215. colModel: _Clos1,
  2216. //colModel: ColModelSub,
  2217. shrinkToFit: true,//宽度自适应
  2218. multiselect: true,
  2219. prmNames: { search: "search" },
  2220. viewrecords: true,
  2221. height: "100%",
  2222. rowNum: 20,
  2223. pager: subgrid_pager_id,
  2224. });
  2225. }
  2226. //委外退料
  2227. function gridList2() {
  2228. var $gridList = $("#gridList");
  2229. var queryJson = {
  2230. POCode: $("#txt_POCode").val(),
  2231. InvCode: $("#txt_InvCode").val(),
  2232. InvName: $("#txt_InvName").val(),
  2233. BatchCode: $("#txt_BatchCode").val(),
  2234. FromTime: $("#FromTime").val(),
  2235. ToTime: $("#ToTime").val(),
  2236. WHCode: $("#txt_WHCode").val(),
  2237. POStatus: $("#selShow").val()
  2238. }
  2239. $gridList.dataGrid({
  2240. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonWeiWai" + "?" + Math.random(),
  2241. postData: { queryJson: JSON.stringify(queryJson) },
  2242. height: $(window).height() - 200,
  2243. width: $(window).width() - 300,
  2244. colModel: _Clos,
  2245. //colModel: [
  2246. // { label: "主键", name: "ID", hidden: true, key: true },
  2247. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  2248. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2249. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  2250. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2251. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  2252. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2253. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2254. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2255. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2256. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2257. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2258. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2259. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2260. //],
  2261. //colModel: ColModelMain,
  2262. width: "100%",
  2263. autowidth: true,
  2264. //shrinkToFit: true,
  2265. gridComplete: function () {
  2266. },
  2267. pager: "#gridPager",
  2268. // sortname: 'OApplyNegCode,cast(Sequence as int)',
  2269. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2270. sortorder: "asc",
  2271. viewrecords: true,
  2272. multiselect: true,
  2273. //beforeSelectRow: function (rowid, e) {
  2274. // $("#gridList").jqGrid('resetSelection');
  2275. // return (true);
  2276. //},
  2277. subGrid: true, // (1)开启子表格支持
  2278. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2279. $("#gridList").jqGrid("setSelection", rowid, false);
  2280. bindSubGrid2(subgrid_id, rowid)
  2281. }
  2282. });
  2283. $("#warehouse a.btn-default").click(function () {
  2284. $("#warehouse a.btn-default").removeClass("active");
  2285. $(this).addClass("active");
  2286. $('#btn_search').trigger("click");
  2287. });
  2288. $("#btn_search").click(function () {
  2289. var warehouse = $("#warehouse a.active").attr('data-value');
  2290. var queryJson = {
  2291. POCode: $("#txt_POCode").val(),
  2292. InvCode: $("#txt_InvCode").val(),
  2293. InvName: $("#txt_InvName").val(),
  2294. BatchCode: $("#txt_BatchCode").val(),
  2295. FromTime: $("#FromTime").val(),
  2296. ToTime: $("#ToTime").val(),
  2297. WHCode: $("#txt_WHCode").val(),
  2298. POStatus: $("#selShow").val()
  2299. }
  2300. $gridList.jqGrid('setGridParam', {
  2301. postData: { queryJson: JSON.stringify(queryJson) },
  2302. }).trigger('reloadGrid');
  2303. });
  2304. }
  2305. function bindSubGrid2(subgrid_id, rowid) {
  2306. $("#gridList").jqGrid("setSelection", rowid, false);
  2307. var subgrid_table_id;
  2308. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2309. var subgrid_pager_id;
  2310. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2311. // (5)动态添加子报表的table和pager
  2312. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2313. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  2314. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2315. // (6)创建jqGrid对象
  2316. $("#" + subgrid_table_id).dataGrid({
  2317. cellEdit: true,
  2318. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2319. //colModel: [
  2320. // { label: "主键", name: "ID", hidden: true, key: true },
  2321. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2322. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2323. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2324. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2325. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2326. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2327. //],
  2328. colModel: _Clos1,
  2329. //colModel: ColModelSub,
  2330. shrinkToFit: true,//宽度自适应
  2331. multiselect: true,
  2332. prmNames: { search: "search" },
  2333. viewrecords: true,
  2334. height: "100%",
  2335. rowNum: 20,
  2336. pager: subgrid_pager_id,
  2337. });
  2338. }
  2339. //成品
  2340. function gridList3() {
  2341. var $gridList = $("#gridList");
  2342. var queryJson = {
  2343. POCode: $("#txt_POCode").val(),
  2344. InvCode: $("#txt_InvCode").val(),
  2345. InvName: $("#txt_InvName").val(),
  2346. BatchCode: $("#txt_BatchCode").val(),
  2347. FromTime: $("#FromTime").val(),
  2348. ToTime: $("#ToTime").val(),
  2349. WHCode: $("#txt_WHCode").val(),
  2350. POStatus: $("#selShow").val(),
  2351. //SelGDLX: $("#SelGDLX option:checked").val(),
  2352. WHStatus: $("#selStatus").val(),
  2353. InvStd: $("#txt_InvStd").val(),
  2354. ParentMo: $("#txt_ParentMOCode").val()
  2355. }
  2356. $gridList.dataGrid({
  2357. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonChengPing" + "?" + Math.random(),
  2358. postData: { queryJson: JSON.stringify(queryJson) },
  2359. height: $(window).height() - 200,
  2360. width: $(window).width() - 300,
  2361. colModel: _Clos,
  2362. //colModel: [
  2363. // { label: "主键", name: "ID", hidden: true, key: true },
  2364. // { label: '工单号', name: 'MOCode', width: 120, align: 'left' },
  2365. // { label: '工单行号', name: 'Sequence', width: 50, align: 'left' },
  2366. // { label: '已入库数量', name: 'RCVQuantity', hidden: true, },
  2367. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2368. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  2369. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2370. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2371. // {
  2372. // label: "状态", name: "MOStatus", width: 60, align: "left",
  2373. // formatter: function (cellvalue) {
  2374. // if (cellvalue == "1") {
  2375. // return "初始";
  2376. // } else if (cellvalue == "2") {
  2377. // return "下发";
  2378. // }
  2379. // else if (cellvalue == "3") {
  2380. // return "关单";
  2381. // }
  2382. // else { return ""; }
  2383. // }
  2384. // },
  2385. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2386. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2387. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2388. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2389. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2390. // { label: '可入库数量', name: 'ERPNum', width: 100, align: 'left' },
  2391. //],
  2392. //colModel: ColModelMain,
  2393. width: "100%",
  2394. autowidth: true,
  2395. //shrinkToFit: true,
  2396. gridComplete: function () {
  2397. },
  2398. pager: "#gridPager",
  2399. //sortname: 'MOCode,cast(Sequence as int)',
  2400. sortname: "CreateDateTime ",
  2401. sortorder: "DESC",
  2402. viewrecords: true,
  2403. multiselect: true,
  2404. //beforeSelectRow: function (rowid, e) {
  2405. // $("#gridList").jqGrid('resetSelection');
  2406. // return (true);
  2407. //},
  2408. subGrid: true, // (1)开启子表格支持
  2409. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2410. $("#gridList").jqGrid("setSelection", rowid, false);
  2411. bindSubGrid3(subgrid_id, rowid)
  2412. }
  2413. });
  2414. $("#warehouse a.btn-default").click(function () {
  2415. $("#warehouse a.btn-default").removeClass("active");
  2416. $(this).addClass("active");
  2417. $('#btn_search').trigger("click");
  2418. });
  2419. $("#btn_search").click(function () {
  2420. var warehouse = $("#warehouse a.active").attr('data-value');
  2421. var queryJson = {
  2422. POCode: $("#txt_POCode").val(),
  2423. InvCode: $("#txt_InvCode").val(),
  2424. InvName: $("#txt_InvName").val(),
  2425. BatchCode: $("#txt_BatchCode").val(),
  2426. FromTime: $("#FromTime").val(),
  2427. ToTime: $("#ToTime").val(),
  2428. WHCode: $("#txt_WHCode").val(),
  2429. POStatus: $("#selShow").val(),
  2430. //SelGDLX: $("#SelGDLX option:checked").val(),
  2431. WHStatus: $("#selStatus").val(),
  2432. InvStd: $("#txt_InvStd").val(),
  2433. ParentMo: $("#txt_ParentMOCode").val()
  2434. }
  2435. $gridList.jqGrid('setGridParam', {
  2436. postData: { queryJson: JSON.stringify(queryJson) },
  2437. }).trigger('reloadGrid');
  2438. });
  2439. }
  2440. function bindSubGrid3(subgrid_id, rowid) {
  2441. $("#gridList").jqGrid("setSelection", rowid, false);
  2442. var subgrid_table_id;
  2443. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2444. var subgrid_pager_id;
  2445. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2446. // (5)动态添加子报表的table和pager
  2447. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2448. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  2449. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2450. var isPrint = $("#selPrint").val();
  2451. // (6)创建jqGrid对象
  2452. $("#" + subgrid_table_id).dataGrid({
  2453. cellEdit: true,
  2454. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2455. //colModel: [
  2456. // { label: "主键", name: "ID", hidden: true, key: true },
  2457. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2458. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2459. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2460. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2461. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2462. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2463. //],
  2464. colModel: _Clos1,
  2465. sortname: "LotNo ",
  2466. sortorder: "desc",
  2467. //colModel: ColModelSub,
  2468. shrinkToFit: true,//宽度自适应
  2469. multiselect: true,
  2470. prmNames: { search: "search" },
  2471. viewrecords: true,
  2472. height: "100%",
  2473. rowNum: 20,
  2474. pager: subgrid_pager_id,
  2475. });
  2476. }
  2477. //销售退货
  2478. function gridList4() {
  2479. var $gridList = $("#gridList");
  2480. var queryJson = {
  2481. POCode: $("#txt_POCode").val(),
  2482. InvCode: $("#txt_InvCode").val(),
  2483. InvName: $("#txt_InvName").val(),
  2484. BatchCode: $("#txt_BatchCode").val(),
  2485. POStatus: $("#selShow").val()
  2486. }
  2487. $gridList.dataGrid({
  2488. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonXiaoShou" + "?" + Math.random(),
  2489. postData: { queryJson: JSON.stringify(queryJson) },
  2490. height: $(window).height() - 200,
  2491. width: $(window).width() - 300,
  2492. colModel: _Clos,
  2493. //colModel: [
  2494. // { label: "主键", name: "ID", hidden: true, key: true },
  2495. // { label: '单据号', name: 'SDNCode', width: 120, align: 'left' },
  2496. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2497. // { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' },
  2498. // { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' },
  2499. // { label: '客户代码', name: 'CusCode', width: 120, align: 'left' },
  2500. // { label: '客户名称', name: 'CusName', width: 50, align: 'left' },
  2501. // { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' },
  2502. // { label: '已发数量', name: 'SDNQuantity', width: 50, align: 'left' },
  2503. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2504. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  2505. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2506. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2507. // {
  2508. // label: "状态", name: "Status", width: 60, align: "left",
  2509. // formatter: function (cellvalue) {
  2510. // if (cellvalue == "1") {
  2511. // return "开立";
  2512. // } else if (cellvalue == "2") {
  2513. // return "审核";
  2514. // }
  2515. // else if (cellvalue == "3") {
  2516. // return "关闭";
  2517. // }
  2518. // else { return ""; }
  2519. // }
  2520. // },
  2521. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2522. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2523. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2524. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2525. //],
  2526. //colModel: ColModelMain,
  2527. width: "100%",
  2528. autowidth: true,
  2529. //shrinkToFit: true,
  2530. gridComplete: function () {
  2531. },
  2532. pager: "#gridPager",
  2533. // sortname: 'SDNCode,cast(Sequence as int)',
  2534. sortname: "SDNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2535. sortorder: "asc",
  2536. viewrecords: true,
  2537. multiselect: true,
  2538. //beforeSelectRow: function (rowid, e) {
  2539. // $("#gridList").jqGrid('resetSelection');
  2540. // return (true);
  2541. //},
  2542. subGrid: true, // (1)开启子表格支持
  2543. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2544. $("#gridList").jqGrid("setSelection", rowid, false);
  2545. bindSubGrid4(subgrid_id, rowid)
  2546. }
  2547. });
  2548. $("#warehouse a.btn-default").click(function () {
  2549. $("#warehouse a.btn-default").removeClass("active");
  2550. $(this).addClass("active");
  2551. $('#btn_search').trigger("click");
  2552. });
  2553. $("#btn_search").click(function () {
  2554. var warehouse = $("#warehouse a.active").attr('data-value');
  2555. var queryJson = {
  2556. POCode: $("#txt_POCode").val(),
  2557. InvCode: $("#txt_InvCode").val(),
  2558. InvName: $("#txt_InvName").val(),
  2559. BatchCode: $("#txt_BatchCode").val(),
  2560. POStatus: $("#selShow").val()
  2561. }
  2562. $gridList.jqGrid('setGridParam', {
  2563. postData: { queryJson: JSON.stringify(queryJson) },
  2564. }).trigger('reloadGrid');
  2565. });
  2566. }
  2567. function bindSubGrid4(subgrid_id, rowid) {
  2568. $("#gridList").jqGrid("setSelection", rowid, false);
  2569. var subgrid_table_id;
  2570. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2571. var subgrid_pager_id;
  2572. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2573. // (5)动态添加子报表的table和pager
  2574. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2575. var SDNCode = $("#gridList").jqGrid('getRowData', rowid).SDNCode;
  2576. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2577. var isPrint = $("#selPrint").val();
  2578. // (6)创建jqGrid对象
  2579. $("#" + subgrid_table_id).dataGrid({
  2580. cellEdit: true,
  2581. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SDNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2582. //colModel: [
  2583. // { label: "主键", name: "ID", hidden: true, key: true },
  2584. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2585. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2586. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2587. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2588. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2589. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2590. //],
  2591. colModel: _Clos1,
  2592. //colModel: ColModelSub,
  2593. shrinkToFit: true,//宽度自适应
  2594. multiselect: true,
  2595. prmNames: { search: "search" },
  2596. viewrecords: true,
  2597. height: "100%",
  2598. rowNum: 20,
  2599. pager: subgrid_pager_id,
  2600. });
  2601. }
  2602. //其它入库生成条码
  2603. function gridList5() {
  2604. var $gridList = $("#gridList");
  2605. var queryJson = {
  2606. POCode: $("#txt_POCode").val(),
  2607. InvCode: $("#txt_InvCode").val(),
  2608. InvName: $("#txt_InvName").val(),
  2609. BatchCode: $("#txt_BatchCode").val(),
  2610. FromTime: $("#FromTime").val(),
  2611. ToTime: $("#ToTime").val(),
  2612. WHCode: $("#txt_WHCode").val(),
  2613. POStatus: $("#selShow").val(),
  2614. InvStd: $("#txt_InvStd").val(),
  2615. }
  2616. $gridList.dataGrid({
  2617. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonQiTa" + "?" + Math.random(),
  2618. postData: { queryJson: JSON.stringify(queryJson) },
  2619. height: $(window).height() - 200,
  2620. width: $(window).width() - 300,
  2621. colModel: _Clos,
  2622. //colModel: [
  2623. // { label: "主键", name: "ID", hidden: true, key: true },
  2624. // { label: '单据号', name: 'InCode', width: 120, align: 'left' },
  2625. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2626. // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' },
  2627. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2628. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2629. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2630. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2631. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2632. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2633. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2634. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2635. // { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', },
  2636. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2637. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2638. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2639. //],
  2640. //colModel: ColModelMain,
  2641. width: "100%",
  2642. autowidth: true,
  2643. //shrinkToFit: true,
  2644. gridComplete: function () {
  2645. },
  2646. pager: "#gridPager",
  2647. sortname: 'InCode',
  2648. sortorder: "asc",
  2649. viewrecords: true,
  2650. multiselect: true,
  2651. //beforeSelectRow: function (rowid, e) {
  2652. // $("#gridList").jqGrid('resetSelection');
  2653. // return (true);
  2654. //},
  2655. subGrid: true, // (1)开启子表格支持
  2656. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2657. $("#gridList").jqGrid("setSelection", rowid, false);
  2658. bindSubGrid5(subgrid_id, rowid)
  2659. }
  2660. });
  2661. $("#warehouse a.btn-default").click(function () {
  2662. $("#warehouse a.btn-default").removeClass("active");
  2663. $(this).addClass("active");
  2664. $('#btn_search').trigger("click");
  2665. });
  2666. $("#btn_search").click(function () {
  2667. var warehouse = $("#warehouse a.active").attr('data-value');
  2668. var queryJson = {
  2669. POCode: $("#txt_POCode").val(),
  2670. InvCode: $("#txt_InvCode").val(),
  2671. InvName: $("#txt_InvName").val(),
  2672. BatchCode: $("#txt_BatchCode").val(),
  2673. FromTime: $("#FromTime").val(),
  2674. ToTime: $("#ToTime").val(),
  2675. WHCode: $("#txt_WHCode").val(),
  2676. POStatus: $("#selShow").val(),
  2677. InvStd: $("#txt_InvStd").val(),
  2678. }
  2679. $gridList.jqGrid('setGridParam', {
  2680. postData: { queryJson: JSON.stringify(queryJson) },
  2681. }).trigger('reloadGrid');
  2682. });
  2683. }
  2684. function bindSubGrid5(subgrid_id, rowid) {
  2685. $("#gridList").jqGrid("setSelection", rowid, false);
  2686. var subgrid_table_id;
  2687. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2688. var subgrid_pager_id;
  2689. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2690. // (5)动态添加子报表的table和pager
  2691. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2692. var InCode = $("#gridList").jqGrid('getRowData', rowid).InCode;
  2693. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2694. var isPrint = $("#selPrint").val();
  2695. // (6)创建jqGrid对象
  2696. $("#" + subgrid_table_id).dataGrid({
  2697. cellEdit: true,
  2698. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + InCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2699. //colModel: [
  2700. // { label: "主键", name: "ID", hidden: true, key: true },
  2701. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2702. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2703. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2704. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2705. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2706. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2707. //],
  2708. colModel: _Clos1,
  2709. //colModel: ColModelSub,
  2710. shrinkToFit: true,//宽度自适应
  2711. multiselect: true,
  2712. prmNames: { search: "search" },
  2713. viewrecords: true,
  2714. height: "100%",
  2715. rowNum: 20,
  2716. pager: subgrid_pager_id,
  2717. });
  2718. }
  2719. //归还单生成条码
  2720. function gridList6() {
  2721. var $gridList = $("#gridList");
  2722. var queryJson = {
  2723. POCode: $("#txt_POCode").val(),
  2724. InvCode: $("#txt_InvCode").val(),
  2725. InvName: $("#txt_InvName").val(),
  2726. BatchCode: $("#txt_BatchCode").val(),
  2727. POStatus: $("#selShow").val()
  2728. }
  2729. $gridList.dataGrid({
  2730. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonGuiHuan" + "?" + Math.random(),
  2731. postData: { queryJson: JSON.stringify(queryJson) },
  2732. height: $(window).height() - 200,
  2733. width: $(window).width() - 300,
  2734. colModel: _Clos,
  2735. //colModel: [
  2736. // { label: "主键", name: "ID", hidden: true, key: true },
  2737. // { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' },
  2738. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2739. // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' },
  2740. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2741. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2742. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2743. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2744. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2745. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2746. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2747. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2748. // { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', },
  2749. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2750. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2751. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2752. //],
  2753. //colModel: ColModelMain,
  2754. width: "100%",
  2755. autowidth: true,
  2756. //shrinkToFit: true,
  2757. gridComplete: function () {
  2758. },
  2759. pager: "#gridPager",
  2760. /// sortname: 'ReturnCode,cast(Sequence as int)',
  2761. sortname: "ReturnCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2762. sortorder: "asc",
  2763. viewrecords: true,
  2764. multiselect: true,
  2765. //beforeSelectRow: function (rowid, e) {
  2766. // $("#gridList").jqGrid('resetSelection');
  2767. // return (true);
  2768. //},
  2769. subGrid: true, // (1)开启子表格支持
  2770. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2771. $("#gridList").jqGrid("setSelection", rowid, false);
  2772. bindSubGrid6(subgrid_id, rowid)
  2773. }
  2774. });
  2775. $("#warehouse a.btn-default").click(function () {
  2776. $("#warehouse a.btn-default").removeClass("active");
  2777. $(this).addClass("active");
  2778. $('#btn_search').trigger("click");
  2779. });
  2780. $("#btn_search").click(function () {
  2781. var warehouse = $("#warehouse a.active").attr('data-value');
  2782. var queryJson = {
  2783. POCode: $("#txt_POCode").val(),
  2784. InvCode: $("#txt_InvCode").val(),
  2785. InvName: $("#txt_InvName").val(),
  2786. BatchCode: $("#txt_BatchCode").val(),
  2787. POStatus: $("#selShow").val()
  2788. }
  2789. $gridList.jqGrid('setGridParam', {
  2790. postData: { queryJson: JSON.stringify(queryJson) },
  2791. }).trigger('reloadGrid');
  2792. });
  2793. }
  2794. function bindSubGrid6(subgrid_id, rowid) {
  2795. $("#gridList").jqGrid("setSelection", rowid, false);
  2796. var subgrid_table_id;
  2797. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2798. var subgrid_pager_id;
  2799. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2800. // (5)动态添加子报表的table和pager
  2801. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2802. var ReturnCode = $("#gridList").jqGrid('getRowData', rowid).ReturnCode;
  2803. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2804. // (6)创建jqGrid对象
  2805. $("#" + subgrid_table_id).dataGrid({
  2806. cellEdit: true,
  2807. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ReturnCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2808. //colModel: [
  2809. // { label: "主键", name: "ID", hidden: true, key: true },
  2810. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2811. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2812. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2813. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2814. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2815. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2816. //],
  2817. colModel: _Clos1,
  2818. //colModel: ColModelSub,
  2819. shrinkToFit: true,//宽度自适应
  2820. multiselect: true,
  2821. prmNames: { search: "search" },
  2822. viewrecords: true,
  2823. height: "100%",
  2824. rowNum: 20,
  2825. pager: subgrid_pager_id,
  2826. });
  2827. }
  2828. //*审核到货单生成条码
  2829. function gridList7() {
  2830. var $gridList = $("#gridList");
  2831. var queryJson = {
  2832. POCode: $("#txt_POCode").val(),
  2833. VenCode: $("#txt_VenCode").val(),
  2834. VenName: $("#txt_VenName").val(),
  2835. InvCode: $("#txt_InvCode").val(),
  2836. InvName: $("#txt_InvName").val(),
  2837. BatchCode: $("#txt_BatchCode").val(),
  2838. POStatus: $("#selShow").val(),
  2839. WHStatus: $("#selStatus").val(),
  2840. InvStd: $("#txt_InvStd").val(),
  2841. }
  2842. $gridList.dataGrid({
  2843. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonSHDH" + "?" + Math.random(),
  2844. postData: { queryJson: JSON.stringify(queryJson) },
  2845. height: $(window).height() - 200,
  2846. width: $(window).width() - 300,
  2847. colModel: _Clos,
  2848. //colModel: [
  2849. // { label: "主键", name: "ID", hidden: true, key: true },
  2850. // { label: '单据号', name: 'DNCode', width: 120, align: 'left' },
  2851. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2852. // { label: '采购订单号', name: 'POCode', width: 50, align: 'left' },
  2853. // { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' },
  2854. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  2855. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  2856. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2857. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2858. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2859. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2860. // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' },
  2861. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2862. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2863. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2864. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2865. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  2866. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  2867. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2868. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2869. //],
  2870. //colModel: ColModelMain,
  2871. width: "100%",
  2872. autowidth: true,
  2873. //shrinkToFit: true,
  2874. gridComplete: function () {
  2875. },
  2876. pager: "#gridPager",
  2877. //sortname: 'DNCode,cast(Sequence as int)',
  2878. sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2879. sortorder: "asc",
  2880. viewrecords: true,
  2881. multiselect: true,
  2882. //beforeSelectRow: function (rowid, e) {
  2883. // $("#gridList").jqGrid('resetSelection');
  2884. // return (true);
  2885. //},
  2886. subGrid: true, // (1)开启子表格支持
  2887. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2888. $("#gridList").jqGrid("setSelection", rowid, false);
  2889. bindSubGrid7(subgrid_id, rowid)
  2890. }
  2891. });
  2892. $("#warehouse a.btn-default").click(function () {
  2893. $("#warehouse a.btn-default").removeClass("active");
  2894. $(this).addClass("active");
  2895. $('#btn_search').trigger("click");
  2896. });
  2897. $("#btn_search").click(function () {
  2898. var warehouse = $("#warehouse a.active").attr('data-value');
  2899. var queryJson = {
  2900. POCode: $("#txt_POCode").val(),
  2901. VenCode: $("#txt_VenCode").val(),
  2902. VenName: $("#txt_VenName").val(),
  2903. InvCode: $("#txt_InvCode").val(),
  2904. InvName: $("#txt_InvName").val(),
  2905. BatchCode: $("#txt_BatchCode").val(),
  2906. POStatus: $("#selShow").val(),
  2907. WHStatus: $("#selStatus").val(),
  2908. InvStd: $("#txt_InvStd").val(),
  2909. }
  2910. $gridList.jqGrid('setGridParam', {
  2911. postData: { queryJson: JSON.stringify(queryJson) },
  2912. }).trigger('reloadGrid');
  2913. });
  2914. }
  2915. function bindSubGrid7(subgrid_id, rowid) {
  2916. $("#gridList").jqGrid("setSelection", rowid, false);
  2917. var subgrid_table_id;
  2918. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2919. var subgrid_pager_id;
  2920. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2921. // (5)动态添加子报表的table和pager
  2922. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2923. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  2924. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2925. var isPrint = $("#selPrint").val();
  2926. // (6)创建jqGrid对象
  2927. $("#" + subgrid_table_id).dataGrid({
  2928. cellEdit: true,
  2929. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2930. //colModel: [
  2931. // { label: "主键", name: "ID", hidden: true, key: true },
  2932. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2933. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2934. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2935. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2936. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2937. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2938. //],
  2939. colModel: _Clos1,
  2940. //colModel: ColModelSub,
  2941. sortname: "LotNo ",
  2942. sortorder: "desc",
  2943. shrinkToFit: true,//宽度自适应
  2944. multiselect: true,
  2945. prmNames: { search: "search" },
  2946. viewrecords: true,
  2947. height: "100%",
  2948. rowNum: 20,
  2949. pager: subgrid_pager_id,
  2950. });
  2951. }
  2952. //审核委外到货单生成条码
  2953. function gridList8() {
  2954. var $gridList = $("#gridList");
  2955. var queryJson = {
  2956. POCode: $("#txt_POCode").val(),
  2957. VenCode: $("#txt_VenCode").val(),
  2958. VenName: $("#txt_VenName").val(),
  2959. InvCode: $("#txt_InvCode").val(),
  2960. InvName: $("#txt_InvName").val(),
  2961. BatchCode: $("#txt_BatchCode").val(),
  2962. POStatus: $("#selShow").val(),
  2963. WHStatus: $("#selStatus").val(),
  2964. InvStd: $("#txt_InvStd").val(),
  2965. }
  2966. $gridList.dataGrid({
  2967. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonWWSHDH" + "?" + Math.random(),
  2968. postData: { queryJson: JSON.stringify(queryJson) },
  2969. height: $(window).height() - 200,
  2970. width: $(window).width() - 300,
  2971. colModel: _Clos,
  2972. //colModel: [
  2973. // { label: "主键", name: "ID", hidden: true, key: true },
  2974. // { label: '单据号', name: 'ODNCode', width: 120, align: 'left' },
  2975. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2976. // { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' },
  2977. // { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' },
  2978. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  2979. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  2980. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2981. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2982. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2983. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2984. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2985. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2986. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2987. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2988. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2989. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  2990. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  2991. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2992. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2993. //],
  2994. //colModel: ColModelMain,
  2995. width: "100%",
  2996. autowidth: true,
  2997. //shrinkToFit: true,
  2998. gridComplete: function () {
  2999. },
  3000. pager: "#gridPager",
  3001. //sortname: 'ODNCode,cast(Sequence as int)',
  3002. sortname: "ODNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3003. sortorder: "asc",
  3004. viewrecords: true,
  3005. multiselect: true,
  3006. //beforeSelectRow: function (rowid, e) {
  3007. // $("#gridList").jqGrid('resetSelection');
  3008. // return (true);
  3009. //},
  3010. subGrid: true, // (1)开启子表格支持
  3011. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3012. $("#gridList").jqGrid("setSelection", rowid, false);
  3013. bindSubGrid8(subgrid_id, rowid)
  3014. }
  3015. });
  3016. $("#warehouse a.btn-default").click(function () {
  3017. $("#warehouse a.btn-default").removeClass("active");
  3018. $(this).addClass("active");
  3019. $('#btn_search').trigger("click");
  3020. });
  3021. $("#btn_search").click(function () {
  3022. var warehouse = $("#warehouse a.active").attr('data-value');
  3023. var queryJson = {
  3024. POCode: $("#txt_POCode").val(),
  3025. VenCode: $("#txt_VenCode").val(),
  3026. VenName: $("#txt_VenName").val(),
  3027. InvCode: $("#txt_InvCode").val(),
  3028. InvName: $("#txt_InvName").val(),
  3029. BatchCode: $("#txt_BatchCode").val(),
  3030. POStatus: $("#selShow").val(),
  3031. WHStatus: $("#selStatus").val(),
  3032. InvStd: $("#txt_InvStd").val(),
  3033. }
  3034. $gridList.jqGrid('setGridParam', {
  3035. postData: { queryJson: JSON.stringify(queryJson) },
  3036. }).trigger('reloadGrid');
  3037. });
  3038. }
  3039. function bindSubGrid8(subgrid_id, rowid) {
  3040. $("#gridList").jqGrid("setSelection", rowid, false);
  3041. var subgrid_table_id;
  3042. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3043. var subgrid_pager_id;
  3044. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3045. // (5)动态添加子报表的table和pager
  3046. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3047. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).ODNCode;
  3048. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3049. var isPrint = $("#selPrint").val();
  3050. // (6)创建jqGrid对象
  3051. $("#" + subgrid_table_id).dataGrid({
  3052. cellEdit: true,
  3053. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3054. //colModel: [
  3055. // { label: "主键", name: "ID", hidden: true, key: true },
  3056. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3057. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3058. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3059. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3060. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3061. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3062. //],
  3063. colModel: _Clos1,
  3064. //colModel: ColModelSub,
  3065. sortname: "LotNo ",
  3066. sortorder: "desc",
  3067. shrinkToFit: true,//宽度自适应
  3068. multiselect: true,
  3069. prmNames: { search: "search" },
  3070. viewrecords: true,
  3071. height: "100%",
  3072. rowNum: 20,
  3073. pager: subgrid_pager_id,
  3074. });
  3075. }
  3076. //开立得成品入库单 生成条码
  3077. function gridList9() {
  3078. var $gridList = $("#gridList");
  3079. var queryJson = {
  3080. POCode: $("#txt_POCode").val(),
  3081. InvCode: $("#txt_InvCode").val(),
  3082. InvName: $("#txt_InvName").val(),
  3083. BatchCode: $("#txt_BatchCode").val(),
  3084. POStatus: $("#selShow").val(),
  3085. SCode: $("#txt_SCode").val(),
  3086. }
  3087. $gridList.dataGrid({
  3088. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonKLCPRK" + "?" + Math.random(),
  3089. postData: { queryJson: JSON.stringify(queryJson) },
  3090. height: $(window).height() - 200,
  3091. width: $(window).width() - 300,
  3092. colModel: _Clos,
  3093. //colModel: [
  3094. // { label: "主键", name: "ID", hidden: true, key: true },
  3095. // { label: '单据号', name: 'RCVCode', width: 120, align: 'left' },
  3096. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  3097. // { label: '仓库号', name: 'WHCode', width: 120, align: 'left' },
  3098. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  3099. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  3100. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3101. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3102. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  3103. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3104. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3105. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3106. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3107. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3108. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3109. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3110. //],
  3111. //colModel: ColModelMain,
  3112. width: "100%",
  3113. autowidth: true,
  3114. //shrinkToFit: true,
  3115. gridComplete: function () {
  3116. },
  3117. pager: "#gridPager",
  3118. //sortname: 'RCVCode,cast(Sequence as int)',
  3119. sortname: "RCVCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3120. sortorder: "asc",
  3121. viewrecords: true,
  3122. multiselect: true,
  3123. //beforeSelectRow: function (rowid, e) {
  3124. // $("#gridList").jqGrid('resetSelection');
  3125. // return (true);
  3126. //},
  3127. subGrid: true, // (1)开启子表格支持
  3128. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3129. $("#gridList").jqGrid("setSelection", rowid, false);
  3130. bindSubGrid9(subgrid_id, rowid)
  3131. }
  3132. });
  3133. $("#warehouse a.btn-default").click(function () {
  3134. $("#warehouse a.btn-default").removeClass("active");
  3135. $(this).addClass("active");
  3136. $('#btn_search').trigger("click");
  3137. });
  3138. $("#btn_search").click(function () {
  3139. var warehouse = $("#warehouse a.active").attr('data-value');
  3140. var queryJson = {
  3141. POCode: $("#txt_POCode").val(),
  3142. InvCode: $("#txt_InvCode").val(),
  3143. InvName: $("#txt_InvName").val(),
  3144. BatchCode: $("#txt_BatchCode").val(),
  3145. POStatus: $("#selShow").val(),
  3146. SCode: $("#txt_SCode").val(),
  3147. }
  3148. $gridList.jqGrid('setGridParam', {
  3149. postData: { queryJson: JSON.stringify(queryJson) },
  3150. }).trigger('reloadGrid');
  3151. });
  3152. }
  3153. function bindSubGrid9(subgrid_id, rowid) {
  3154. $("#gridList").jqGrid("setSelection", rowid, false);
  3155. var subgrid_table_id;
  3156. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3157. var subgrid_pager_id;
  3158. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3159. // (5)动态添加子报表的table和pager
  3160. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3161. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  3162. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3163. // (6)创建jqGrid对象
  3164. $("#" + subgrid_table_id).dataGrid({
  3165. cellEdit: true,
  3166. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3167. //colModel: [
  3168. // { label: "主键", name: "ID", hidden: true, key: true },
  3169. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3170. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3171. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3172. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3173. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3174. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3175. //],
  3176. colModel: _Clos1,
  3177. //colModel: ColModelSub,
  3178. shrinkToFit: true,//宽度自适应
  3179. multiselect: true,
  3180. prmNames: { search: "search" },
  3181. viewrecords: true,
  3182. height: "100%",
  3183. rowNum: 20,
  3184. pager: subgrid_pager_id,
  3185. });
  3186. }
  3187. //采购拒收单
  3188. function gridList10() {
  3189. var $gridList = $("#gridList");
  3190. var queryJson = {
  3191. POCode: $("#txt_POCode").val(),
  3192. VenCode: $("#txt_VenCode").val(),
  3193. VenName: $("#txt_VenName").val(),
  3194. InvCode: $("#txt_InvCode").val(),
  3195. InvName: $("#txt_InvName").val(),
  3196. BatchCode: $("#txt_BatchCode").val(),
  3197. POStatus: $("#selShow").val()
  3198. }
  3199. $gridList.dataGrid({
  3200. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonJSD" + "?" + Math.random(),
  3201. postData: { queryJson: JSON.stringify(queryJson) },
  3202. height: $(window).height() - 200,
  3203. width: $(window).width() - 300,
  3204. colModel: _Clos,
  3205. //colModel: [
  3206. // { label: "主键", name: "ID", hidden: true, key: true },
  3207. // { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' },
  3208. // { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' },
  3209. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  3210. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  3211. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  3212. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  3213. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3214. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3215. // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' },
  3216. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3217. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3218. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3219. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3220. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3221. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  3222. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3223. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3224. //],
  3225. //colModel: ColModelMain,
  3226. width: "100%",
  3227. autowidth: true,
  3228. //shrinkToFit: true,
  3229. gridComplete: function () {
  3230. },
  3231. pager: "#gridPager",
  3232. //sortname: 'DNCode,cast(Sequence as int)',
  3233. sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3234. sortorder: "asc",
  3235. viewrecords: true,
  3236. multiselect: true,
  3237. //beforeSelectRow: function (rowid, e) {
  3238. // $("#gridList").jqGrid('resetSelection');
  3239. // return (true);
  3240. //},
  3241. subGrid: true, // (1)开启子表格支持
  3242. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3243. $("#gridList").jqGrid("setSelection", rowid, false);
  3244. bindSubGrid10(subgrid_id, rowid)
  3245. }
  3246. });
  3247. $("#warehouse a.btn-default").click(function () {
  3248. $("#warehouse a.btn-default").removeClass("active");
  3249. $(this).addClass("active");
  3250. $('#btn_search').trigger("click");
  3251. });
  3252. $("#btn_search").click(function () {
  3253. var warehouse = $("#warehouse a.active").attr('data-value');
  3254. var queryJson = {
  3255. POCode: $("#txt_POCode").val(),
  3256. VenCode: $("#txt_VenCode").val(),
  3257. VenName: $("#txt_VenName").val(),
  3258. InvCode: $("#txt_InvCode").val(),
  3259. InvName: $("#txt_InvName").val(),
  3260. BatchCode: $("#txt_BatchCode").val(),
  3261. POStatus: $("#selShow").val()
  3262. }
  3263. $gridList.jqGrid('setGridParam', {
  3264. postData: { queryJson: JSON.stringify(queryJson) },
  3265. }).trigger('reloadGrid');
  3266. });
  3267. }
  3268. function bindSubGrid10(subgrid_id, rowid) {
  3269. $("#gridList").jqGrid("setSelection", rowid, false);
  3270. var subgrid_table_id;
  3271. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3272. var subgrid_pager_id;
  3273. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3274. // (5)动态添加子报表的table和pager
  3275. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3276. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  3277. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3278. // (6)创建jqGrid对象
  3279. $("#" + subgrid_table_id).dataGrid({
  3280. cellEdit: true,
  3281. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3282. //colModel: [
  3283. // { label: "主键", name: "ID", hidden: true, key: true },
  3284. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3285. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3286. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3287. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3288. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3289. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3290. //],
  3291. colModel: _Clos1,
  3292. //colModel: ColModelSub,
  3293. shrinkToFit: true,//宽度自适应
  3294. multiselect: true,
  3295. prmNames: { search: "search" },
  3296. viewrecords: true,
  3297. height: "100%",
  3298. rowNum: 20,
  3299. pager: subgrid_pager_id,
  3300. });
  3301. }
  3302. //委外拒收单生成条码
  3303. function gridList11() {
  3304. var $gridList = $("#gridList");
  3305. var queryJson = {
  3306. POCode: $("#txt_POCode").val(),
  3307. VenCode: $("#txt_VenCode").val(),
  3308. VenName: $("#txt_VenName").val(),
  3309. InvCode: $("#txt_InvCode").val(),
  3310. InvName: $("#txt_InvName").val(),
  3311. BatchCode: $("#txt_BatchCode").val(),
  3312. POStatus: $("#selShow").val()
  3313. }
  3314. $gridList.dataGrid({
  3315. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonWWJSD" + "?" + Math.random(),
  3316. postData: { queryJson: JSON.stringify(queryJson) },
  3317. height: $(window).height() - 200,
  3318. width: $(window).width() - 300,
  3319. colModel: _Clos,
  3320. //colModel: [
  3321. // { label: "主键", name: "ID", hidden: true, key: true },
  3322. // { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' },
  3323. // { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' },
  3324. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  3325. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  3326. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  3327. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  3328. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3329. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3330. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  3331. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3332. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3333. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3334. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3335. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3336. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  3337. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3338. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3339. //],
  3340. //colModel: ColModelMain,
  3341. width: "100%",
  3342. autowidth: true,
  3343. //shrinkToFit: true,
  3344. gridComplete: function () {
  3345. },
  3346. pager: "#gridPager",
  3347. // sortname: 'OOCode,cast(Sequence as int)',
  3348. sortname: "OOCode,REPLICATE('0',10-len(OOSequence))+OOSequence ",
  3349. sortorder: "asc",
  3350. viewrecords: true,
  3351. multiselect: true,
  3352. //beforeSelectRow: function (rowid, e) {
  3353. // $("#gridList").jqGrid('resetSelection');
  3354. // return (true);
  3355. //},
  3356. subGrid: true, // (1)开启子表格支持
  3357. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3358. $("#gridList").jqGrid("setSelection", rowid, false);
  3359. bindSubGrid11(subgrid_id, rowid)
  3360. }
  3361. });
  3362. $("#warehouse a.btn-default").click(function () {
  3363. $("#warehouse a.btn-default").removeClass("active");
  3364. $(this).addClass("active");
  3365. $('#btn_search').trigger("click");
  3366. });
  3367. $("#btn_search").click(function () {
  3368. var warehouse = $("#warehouse a.active").attr('data-value');
  3369. var queryJson = {
  3370. POCode: $("#txt_POCode").val(),
  3371. VenCode: $("#txt_VenCode").val(),
  3372. VenName: $("#txt_VenName").val(),
  3373. InvCode: $("#txt_InvCode").val(),
  3374. InvName: $("#txt_InvName").val(),
  3375. BatchCode: $("#txt_BatchCode").val(),
  3376. POStatus: $("#selShow").val()
  3377. }
  3378. $gridList.jqGrid('setGridParam', {
  3379. postData: { queryJson: JSON.stringify(queryJson) },
  3380. }).trigger('reloadGrid');
  3381. });
  3382. }
  3383. function bindSubGrid11(subgrid_id, rowid) {
  3384. $("#gridList").jqGrid("setSelection", rowid, false);
  3385. var subgrid_table_id;
  3386. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3387. var subgrid_pager_id;
  3388. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3389. // (5)动态添加子报表的table和pager
  3390. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3391. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).OOCode;
  3392. var Sequence = $("#gridList").jqGrid('getRowData', rowid).OOSequence;
  3393. // (6)创建jqGrid对象
  3394. $("#" + subgrid_table_id).dataGrid({
  3395. cellEdit: true,
  3396. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3397. //colModel: [
  3398. // { label: "主键", name: "ID", hidden: true, key: true },
  3399. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3400. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3401. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3402. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3403. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3404. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3405. //],
  3406. colModel: _Clos1,
  3407. //colModel: ColModelSub,
  3408. shrinkToFit: true,//宽度自适应
  3409. multiselect: true,
  3410. prmNames: { search: "search" },
  3411. viewrecords: true,
  3412. height: "100%",
  3413. rowNum: 20,
  3414. pager: subgrid_pager_id,
  3415. });
  3416. }
  3417. //领料申请退料生成条码
  3418. function gridList12() {
  3419. var $gridList = $("#gridList");
  3420. var queryJson = {
  3421. POCode: $("#txt_POCode").val(),
  3422. InvCode: $("#txt_InvCode").val(),
  3423. InvName: $("#txt_InvName").val(),
  3424. BatchCode: $("#txt_BatchCode").val(),
  3425. FromTime: $("#FromTime").val(),
  3426. ToTime: $("#ToTime").val(),
  3427. POStatus: $("#selShow").val()
  3428. }
  3429. $gridList.dataGrid({
  3430. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonLLSQTL" + "?" + Math.random(),
  3431. postData: { queryJson: JSON.stringify(queryJson) },
  3432. height: $(window).height() - 200,
  3433. width: $(window).width() - 300,
  3434. colModel: _Clos,
  3435. //colModel: [
  3436. // { label: "主键", name: "ID", hidden: true, key: true },
  3437. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  3438. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3439. // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, },
  3440. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3441. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  3442. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3443. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3444. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3445. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3446. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3447. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3448. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3449. //],
  3450. //colModel: ColModelMain,
  3451. width: "100%",
  3452. autowidth: true,
  3453. //shrinkToFit: true,
  3454. gridComplete: function () {
  3455. },
  3456. pager: "#gridPager",
  3457. // sortname: 'ApplyNegCode,cast(Sequence as int)',
  3458. sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3459. sortorder: "asc",
  3460. viewrecords: true,
  3461. multiselect: true,
  3462. //beforeSelectRow: function (rowid, e) {
  3463. // $("#gridList").jqGrid('resetSelection');
  3464. // return (true);
  3465. //},
  3466. subGrid: true, // (1)开启子表格支持
  3467. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3468. $("#gridList").jqGrid("setSelection", rowid, false);
  3469. bindSubGrid12(subgrid_id, rowid)
  3470. }
  3471. });
  3472. $("#warehouse a.btn-default").click(function () {
  3473. $("#warehouse a.btn-default").removeClass("active");
  3474. $(this).addClass("active");
  3475. $('#btn_search').trigger("click");
  3476. });
  3477. $("#btn_search").click(function () {
  3478. var warehouse = $("#warehouse a.active").attr('data-value');
  3479. var queryJson = {
  3480. POCode: $("#txt_POCode").val(),
  3481. InvCode: $("#txt_InvCode").val(),
  3482. InvName: $("#txt_InvName").val(),
  3483. BatchCode: $("#txt_BatchCode").val(),
  3484. FromTime: $("#FromTime").val(),
  3485. ToTime: $("#ToTime").val(),
  3486. POStatus: $("#selShow").val()
  3487. }
  3488. $gridList.jqGrid('setGridParam', {
  3489. postData: { queryJson: JSON.stringify(queryJson) },
  3490. }).trigger('reloadGrid');
  3491. });
  3492. }
  3493. function bindSubGrid12(subgrid_id, rowid) {
  3494. $("#gridList").jqGrid("setSelection", rowid, false);
  3495. var subgrid_table_id;
  3496. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3497. var subgrid_pager_id;
  3498. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3499. // (5)动态添加子报表的table和pager
  3500. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3501. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  3502. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3503. // (6)创建jqGrid对象
  3504. $("#" + subgrid_table_id).dataGrid({
  3505. cellEdit: true,
  3506. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3507. //colModel: [
  3508. // { label: "主键", name: "ID", hidden: true, key: true },
  3509. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3510. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3511. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3512. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3513. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3514. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3515. //],
  3516. colModel: _Clos1,
  3517. //colModel: ColModelSub,
  3518. shrinkToFit: true,//宽度自适应
  3519. multiselect: true,
  3520. prmNames: { search: "search" },
  3521. viewrecords: true,
  3522. height: "100%",
  3523. rowNum: 20,
  3524. pager: subgrid_pager_id,
  3525. });
  3526. }
  3527. //材料出库退料
  3528. function gridList13() {
  3529. var $gridList = $("#gridList");
  3530. var queryJson = {
  3531. POCode: $("#txt_POCode").val(),
  3532. InvCode: $("#txt_InvCode").val(),
  3533. InvName: $("#txt_InvName").val(),
  3534. BatchCode: $("#txt_BatchCode").val(),
  3535. POStatus: $("#selShow").val(),
  3536. SCode: $("#txt_SCode").val(),
  3537. }
  3538. $gridList.dataGrid({
  3539. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonCLCK" + "?" + Math.random(),
  3540. postData: { queryJson: JSON.stringify(queryJson) },
  3541. height: $(window).height() - 200,
  3542. width: $(window).width() - 300,
  3543. colModel: _Clos,
  3544. //colModel: [
  3545. // { label: "主键", name: "ID", hidden: true, key: true },
  3546. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  3547. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3548. // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, },
  3549. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3550. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  3551. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3552. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3553. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3554. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3555. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3556. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3557. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3558. //],
  3559. //colModel: ColModelMain,
  3560. width: "100%",
  3561. autowidth: true,
  3562. //shrinkToFit: true,
  3563. gridComplete: function () {
  3564. },
  3565. pager: "#gridPager",
  3566. // sortname: 'ApplyNegCode,cast(Sequence as int)',
  3567. sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3568. sortorder: "asc",
  3569. viewrecords: true,
  3570. multiselect: true,
  3571. //beforeSelectRow: function (rowid, e) {
  3572. // $("#gridList").jqGrid('resetSelection');
  3573. // return (true);
  3574. //},
  3575. subGrid: true, // (1)开启子表格支持
  3576. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3577. $("#gridList").jqGrid("setSelection", rowid, false);
  3578. bindSubGrid13(subgrid_id, rowid)
  3579. }
  3580. });
  3581. $("#warehouse a.btn-default").click(function () {
  3582. $("#warehouse a.btn-default").removeClass("active");
  3583. $(this).addClass("active");
  3584. $('#btn_search').trigger("click");
  3585. });
  3586. $("#btn_search").click(function () {
  3587. var warehouse = $("#warehouse a.active").attr('data-value');
  3588. var queryJson = {
  3589. POCode: $("#txt_POCode").val(),
  3590. InvCode: $("#txt_InvCode").val(),
  3591. InvName: $("#txt_InvName").val(),
  3592. BatchCode: $("#txt_BatchCode").val(),
  3593. POStatus: $("#selShow").val(),
  3594. SCode: $("#txt_SCode").val(),
  3595. }
  3596. $gridList.jqGrid('setGridParam', {
  3597. postData: { queryJson: JSON.stringify(queryJson) },
  3598. }).trigger('reloadGrid');
  3599. });
  3600. }
  3601. function bindSubGrid13(subgrid_id, rowid) {
  3602. $("#gridList").jqGrid("setSelection", rowid, false);
  3603. var subgrid_table_id;
  3604. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3605. var subgrid_pager_id;
  3606. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3607. // (5)动态添加子报表的table和pager
  3608. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3609. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  3610. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3611. // (6)创建jqGrid对象
  3612. $("#" + subgrid_table_id).dataGrid({
  3613. cellEdit: true,
  3614. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3615. //colModel: [
  3616. // { label: "主键", name: "ID", hidden: true, key: true },
  3617. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3618. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3619. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3620. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3621. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3622. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3623. //],
  3624. colModel: _Clos1,
  3625. //colModel: ColModelSub,
  3626. shrinkToFit: true,//宽度自适应
  3627. multiselect: true,
  3628. prmNames: { search: "search" },
  3629. viewrecords: true,
  3630. height: "100%",
  3631. rowNum: 20,
  3632. pager: subgrid_pager_id,
  3633. });
  3634. }
  3635. //委外领料申请退料
  3636. function gridList14() {
  3637. var $gridList = $("#gridList");
  3638. var queryJson = {
  3639. POCode: $("#txt_POCode").val(),
  3640. InvCode: $("#txt_InvCode").val(),
  3641. InvName: $("#txt_InvName").val(),
  3642. BatchCode: $("#txt_BatchCode").val(),
  3643. POStatus: $("#selShow").val()
  3644. }
  3645. $gridList.dataGrid({
  3646. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonWWLLTL" + "?" + Math.random(),
  3647. postData: { queryJson: JSON.stringify(queryJson) },
  3648. height: $(window).height() - 200,
  3649. width: $(window).width() - 300,
  3650. colModel: _Clos,
  3651. //colModel: [
  3652. // { label: "主键", name: "ID", hidden: true, key: true },
  3653. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3654. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3655. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3656. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3657. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3658. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3659. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3660. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3661. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3662. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3663. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3664. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3665. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3666. //],
  3667. //colModel: ColModelMain,
  3668. width: "100%",
  3669. autowidth: true,
  3670. //shrinkToFit: true,
  3671. gridComplete: function () {
  3672. },
  3673. pager: "#gridPager",
  3674. //sortname: 'OApplyNegCode,cast(Sequence as int)',
  3675. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3676. sortorder: "asc",
  3677. viewrecords: true,
  3678. multiselect: true,
  3679. //beforeSelectRow: function (rowid, e) {
  3680. // $("#gridList").jqGrid('resetSelection');
  3681. // return (true);
  3682. //},
  3683. subGrid: true, // (1)开启子表格支持
  3684. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3685. $("#gridList").jqGrid("setSelection", rowid, false);
  3686. bindSubGrid14(subgrid_id, rowid)
  3687. }
  3688. });
  3689. $("#warehouse a.btn-default").click(function () {
  3690. $("#warehouse a.btn-default").removeClass("active");
  3691. $(this).addClass("active");
  3692. $('#btn_search').trigger("click");
  3693. });
  3694. $("#btn_search").click(function () {
  3695. var warehouse = $("#warehouse a.active").attr('data-value');
  3696. var queryJson = {
  3697. POCode: $("#txt_POCode").val(),
  3698. InvCode: $("#txt_InvCode").val(),
  3699. InvName: $("#txt_InvName").val(),
  3700. BatchCode: $("#txt_BatchCode").val(),
  3701. POStatus: $("#selShow").val()
  3702. }
  3703. $gridList.jqGrid('setGridParam', {
  3704. postData: { queryJson: JSON.stringify(queryJson) },
  3705. }).trigger('reloadGrid');
  3706. });
  3707. }
  3708. function bindSubGrid14(subgrid_id, rowid) {
  3709. $("#gridList").jqGrid("setSelection", rowid, false);
  3710. var subgrid_table_id;
  3711. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3712. var subgrid_pager_id;
  3713. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3714. // (5)动态添加子报表的table和pager
  3715. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3716. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  3717. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3718. // (6)创建jqGrid对象
  3719. $("#" + subgrid_table_id).dataGrid({
  3720. cellEdit: true,
  3721. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3722. //colModel: [
  3723. // { label: "主键", name: "ID", hidden: true, key: true },
  3724. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3725. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3726. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3727. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3728. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3729. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3730. //],
  3731. colModel: _Clos1,
  3732. //colModel: ColModelSub,
  3733. shrinkToFit: true,//宽度自适应
  3734. multiselect: true,
  3735. prmNames: { search: "search" },
  3736. viewrecords: true,
  3737. height: "100%",
  3738. rowNum: 20,
  3739. pager: subgrid_pager_id,
  3740. });
  3741. }
  3742. //委外材料出库
  3743. function gridList15() {
  3744. var $gridList = $("#gridList");
  3745. var queryJson = {
  3746. POCode: $("#txt_POCode").val(),
  3747. InvCode: $("#txt_InvCode").val(),
  3748. InvName: $("#txt_InvName").val(),
  3749. BatchCode: $("#txt_BatchCode").val(),
  3750. POStatus: $("#selShow").val()
  3751. }
  3752. $gridList.dataGrid({
  3753. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonWWCLCK" + "?" + Math.random(),
  3754. postData: { queryJson: JSON.stringify(queryJson) },
  3755. height: $(window).height() - 200,
  3756. width: $(window).width() - 300,
  3757. colModel: _Clos,
  3758. //colModel: [
  3759. // { label: "主键", name: "ID", hidden: true, key: true },
  3760. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3761. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3762. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3763. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3764. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3765. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3766. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3767. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3768. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3769. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3770. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3771. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3772. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3773. //],
  3774. //colModel: ColModelMain,
  3775. width: "100%",
  3776. autowidth: true,
  3777. //shrinkToFit: true,
  3778. gridComplete: function () {
  3779. },
  3780. pager: "#gridPager",
  3781. //sortname: 'OApplyNegCode,cast(Sequence as int)',
  3782. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3783. sortorder: "asc",
  3784. viewrecords: true,
  3785. multiselect: true,
  3786. //beforeSelectRow: function (rowid, e) {
  3787. // $("#gridList").jqGrid('resetSelection');
  3788. // return (true);
  3789. //},
  3790. subGrid: true, // (1)开启子表格支持
  3791. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3792. $("#gridList").jqGrid("setSelection", rowid, false);
  3793. bindSubGrid15(subgrid_id, rowid)
  3794. }
  3795. });
  3796. $("#warehouse a.btn-default").click(function () {
  3797. $("#warehouse a.btn-default").removeClass("active");
  3798. $(this).addClass("active");
  3799. $('#btn_search').trigger("click");
  3800. });
  3801. $("#btn_search").click(function () {
  3802. var warehouse = $("#warehouse a.active").attr('data-value');
  3803. var queryJson = {
  3804. POCode: $("#txt_POCode").val(),
  3805. InvCode: $("#txt_InvCode").val(),
  3806. InvName: $("#txt_InvName").val(),
  3807. BatchCode: $("#txt_BatchCode").val(),
  3808. POStatus: $("#selShow").val()
  3809. }
  3810. $gridList.jqGrid('setGridParam', {
  3811. postData: { queryJson: JSON.stringify(queryJson) },
  3812. }).trigger('reloadGrid');
  3813. });
  3814. }
  3815. function bindSubGrid15(subgrid_id, rowid) {
  3816. $("#gridList").jqGrid("setSelection", rowid, false);
  3817. var subgrid_table_id;
  3818. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3819. var subgrid_pager_id;
  3820. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3821. // (5)动态添加子报表的table和pager
  3822. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3823. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  3824. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3825. // (6)创建jqGrid对象
  3826. $("#" + subgrid_table_id).dataGrid({
  3827. cellEdit: true,
  3828. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3829. //colModel: [
  3830. // { label: "主键", name: "ID", hidden: true, key: true },
  3831. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3832. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3833. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3834. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3835. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3836. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3837. //],
  3838. colModel: _Clos1,
  3839. //colModel: ColModelSub,
  3840. shrinkToFit: true,//宽度自适应
  3841. //multiselect: true,
  3842. prmNames: { search: "search" },
  3843. multiselect: true,
  3844. viewrecords: true,
  3845. height: "100%",
  3846. rowNum: 20,
  3847. pager: subgrid_pager_id,
  3848. });
  3849. }
  3850. function gridList16() {
  3851. var $gridList = $("#gridList");
  3852. var queryJson = {
  3853. POCode: $("#txt_POCode").val(),
  3854. InvCode: $("#txt_InvCode").val(),
  3855. InvName: $("#txt_InvName").val(),
  3856. BatchCode: $("#txt_BatchCode").val(),
  3857. POStatus: $("#selShow").val()
  3858. }
  3859. $gridList.dataGrid({
  3860. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonFGGD" + "?" + Math.random(),
  3861. postData: { queryJson: JSON.stringify(queryJson) },
  3862. height: $(window).height() - 200,
  3863. width: $(window).width() - 300,
  3864. colModel: _Clos,
  3865. //colModel: [
  3866. // { label: "主键", name: "ID", hidden: true, key: true },
  3867. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3868. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3869. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3870. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3871. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3872. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3873. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3874. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3875. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3876. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3877. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3878. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3879. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3880. //],
  3881. //colModel: ColModelMain,
  3882. width: "100%",
  3883. autowidth: true,
  3884. //shrinkToFit: true,
  3885. gridComplete: function () {
  3886. },
  3887. pager: "#gridPager",
  3888. // sortname: 'MOCode,cast(Sequence as int)',
  3889. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3890. sortorder: "asc",
  3891. viewrecords: true,
  3892. multiselect: true,
  3893. //beforeSelectRow: function (rowid, e) {
  3894. // $("#gridList").jqGrid('resetSelection');
  3895. // return (true);
  3896. //},
  3897. subGrid: true, // (1)开启子表格支持
  3898. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3899. $("#gridList").jqGrid("setSelection", rowid, false);
  3900. bindSubGrid16(subgrid_id, rowid)
  3901. }
  3902. });
  3903. $("#warehouse a.btn-default").click(function () {
  3904. $("#warehouse a.btn-default").removeClass("active");
  3905. $(this).addClass("active");
  3906. $('#btn_search').trigger("click");
  3907. });
  3908. $("#btn_search").click(function () {
  3909. var warehouse = $("#warehouse a.active").attr('data-value');
  3910. var queryJson = {
  3911. POCode: $("#txt_POCode").val(),
  3912. InvCode: $("#txt_InvCode").val(),
  3913. InvName: $("#txt_InvName").val(),
  3914. BatchCode: $("#txt_BatchCode").val(),
  3915. POStatus: $("#selShow").val()
  3916. }
  3917. $gridList.jqGrid('setGridParam', {
  3918. postData: { queryJson: JSON.stringify(queryJson) },
  3919. }).trigger('reloadGrid');
  3920. });
  3921. }
  3922. function bindSubGrid16(subgrid_id, rowid) {
  3923. $("#gridList").jqGrid("setSelection", rowid, false);
  3924. var subgrid_table_id;
  3925. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3926. var subgrid_pager_id;
  3927. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3928. // (5)动态添加子报表的table和pager
  3929. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3930. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  3931. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3932. // (6)创建jqGrid对象
  3933. $("#" + subgrid_table_id).dataGrid({
  3934. cellEdit: true,
  3935. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3936. //colModel: [
  3937. // { label: "主键", name: "ID", hidden: true, key: true },
  3938. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3939. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3940. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3941. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3942. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3943. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3944. //],
  3945. colModel: _Clos1,
  3946. //colModel: ColModelSub,
  3947. shrinkToFit: true,//宽度自适应
  3948. multiselect: true,
  3949. prmNames: { search: "search" },
  3950. viewrecords: true,
  3951. height: "100%",
  3952. rowNum: 20,
  3953. pager: subgrid_pager_id,
  3954. });
  3955. }
  3956. //检验不合格
  3957. function gridList17() {
  3958. var $gridList = $("#gridList");
  3959. var queryJson = {
  3960. POCode: $("#txt_POCode").val(),
  3961. InvCode: $("#txt_InvCode").val(),
  3962. InvName: $("#txt_InvName").val(),
  3963. BatchCode: $("#txt_BatchCode").val(),
  3964. POStatus: $("#selShow").val()
  3965. }
  3966. $gridList.dataGrid({
  3967. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonBHGTM" + "?" + Math.random(),
  3968. postData: { queryJson: JSON.stringify(queryJson) },
  3969. height: $(window).height() - 200,
  3970. width: $(window).width() - 300,
  3971. colModel: _Clos,
  3972. //colModel: [
  3973. // { label: "主键", name: "ID", hidden: true, key: true },
  3974. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3975. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3976. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3977. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3978. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3979. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3980. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3981. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3982. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3983. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3984. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3985. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3986. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3987. //],
  3988. //colModel: ColModelMain,
  3989. width: "100%",
  3990. autowidth: true,
  3991. //shrinkToFit: true,
  3992. gridComplete: function () {
  3993. },
  3994. pager: "#gridPager",
  3995. sortname: 'LotNo',
  3996. sortorder: "asc",
  3997. viewrecords: true,
  3998. multiselect: true,
  3999. //beforeSelectRow: function (rowid, e) {
  4000. // $("#gridList").jqGrid('resetSelection');
  4001. // return (true);
  4002. //},
  4003. subGrid: true, // (1)开启子表格支持
  4004. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4005. $("#gridList").jqGrid("setSelection", rowid, false);
  4006. bindSubGrid17(subgrid_id, rowid)
  4007. }
  4008. });
  4009. $("#warehouse a.btn-default").click(function () {
  4010. $("#warehouse a.btn-default").removeClass("active");
  4011. $(this).addClass("active");
  4012. $('#btn_search').trigger("click");
  4013. });
  4014. $("#btn_search").click(function () {
  4015. var warehouse = $("#warehouse a.active").attr('data-value');
  4016. var queryJson = {
  4017. POCode: $("#txt_POCode").val(),
  4018. InvCode: $("#txt_InvCode").val(),
  4019. InvName: $("#txt_InvName").val(),
  4020. BatchCode: $("#txt_BatchCode").val(),
  4021. POStatus: $("#selShow").val()
  4022. }
  4023. $gridList.jqGrid('setGridParam', {
  4024. postData: { queryJson: JSON.stringify(queryJson) },
  4025. }).trigger('reloadGrid');
  4026. });
  4027. }
  4028. function bindSubGrid17(subgrid_id, rowid) {
  4029. $("#gridList").jqGrid("setSelection", rowid, false);
  4030. var subgrid_table_id;
  4031. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4032. var subgrid_pager_id;
  4033. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4034. // (5)动态添加子报表的table和pager
  4035. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4036. var LotNo = $("#gridList").jqGrid('getRowData', rowid).LotNo;
  4037. // var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4038. // (6)创建jqGrid对象
  4039. $("#" + subgrid_table_id).dataGrid({
  4040. cellEdit: true,
  4041. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJsonBHGTM?LotNo=" + LotNo + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4042. //colModel: [
  4043. // { label: "主键", name: "ID", hidden: true, key: true },
  4044. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  4045. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  4046. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  4047. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  4048. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  4049. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  4050. //],
  4051. colModel: _Clos1,
  4052. //colModel: ColModelSub,
  4053. shrinkToFit: true,//宽度自适应
  4054. multiselect: true,
  4055. prmNames: { search: "search" },
  4056. viewrecords: true,
  4057. height: "100%",
  4058. rowNum: 20,
  4059. pager: subgrid_pager_id,
  4060. });
  4061. }
  4062. function gridList18() {
  4063. var $gridList = $("#gridList");
  4064. var queryJson = {
  4065. POCode: $("#txt_POCode").val(),
  4066. InvCode: $("#txt_InvCode").val(),
  4067. InvName: $("#txt_InvName").val(),
  4068. BatchCode: $("#txt_BatchCode").val(),
  4069. POStatus: $("#selShow").val()
  4070. }
  4071. $gridList.dataGrid({
  4072. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonFCP" + "?" + Math.random(),
  4073. postData: { queryJson: JSON.stringify(queryJson) },
  4074. height: $(window).height() - 200,
  4075. width: $(window).width() - 300,
  4076. colModel: _Clos,
  4077. //colModel: [
  4078. // { label: "主键", name: "ID", hidden: true, key: true },
  4079. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  4080. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  4081. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  4082. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  4083. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  4084. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  4085. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  4086. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  4087. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  4088. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  4089. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  4090. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  4091. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  4092. //],
  4093. //colModel: ColModelMain,
  4094. width: "100%",
  4095. autowidth: true,
  4096. //shrinkToFit: true,
  4097. gridComplete: function () {
  4098. },
  4099. pager: "#gridPager",
  4100. // sortname: 'MOCode,cast(Sequence as int)',
  4101. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  4102. sortorder: "asc",
  4103. viewrecords: true,
  4104. multiselect: true,
  4105. //beforeSelectRow: function (rowid, e) {
  4106. // $("#gridList").jqGrid('resetSelection');
  4107. // return (true);
  4108. //},
  4109. subGrid: true, // (1)开启子表格支持
  4110. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4111. $("#gridList").jqGrid("setSelection", rowid, false);
  4112. bindSubGrid18(subgrid_id, rowid)
  4113. }
  4114. });
  4115. $("#warehouse a.btn-default").click(function () {
  4116. $("#warehouse a.btn-default").removeClass("active");
  4117. $(this).addClass("active");
  4118. $('#btn_search').trigger("click");
  4119. });
  4120. $("#btn_search").click(function () {
  4121. var warehouse = $("#warehouse a.active").attr('data-value');
  4122. var queryJson = {
  4123. POCode: $("#txt_POCode").val(),
  4124. InvCode: $("#txt_InvCode").val(),
  4125. InvName: $("#txt_InvName").val(),
  4126. BatchCode: $("#txt_BatchCode").val(),
  4127. POStatus: $("#selShow").val()
  4128. }
  4129. $gridList.jqGrid('setGridParam', {
  4130. postData: { queryJson: JSON.stringify(queryJson) },
  4131. }).trigger('reloadGrid');
  4132. });
  4133. }
  4134. function bindSubGrid18(subgrid_id, rowid) {
  4135. $("#gridList").jqGrid("setSelection", rowid, false);
  4136. var subgrid_table_id;
  4137. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4138. var subgrid_pager_id;
  4139. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4140. // (5)动态添加子报表的table和pager
  4141. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4142. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  4143. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4144. // (6)创建jqGrid对象
  4145. $("#" + subgrid_table_id).dataGrid({
  4146. cellEdit: true,
  4147. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4148. //colModel: [
  4149. // { label: "主键", name: "ID", hidden: true, key: true },
  4150. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  4151. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  4152. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  4153. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  4154. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  4155. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  4156. //],
  4157. colModel: _Clos1,
  4158. //colModel: ColModelSub,
  4159. shrinkToFit: true,//宽度自适应
  4160. multiselect: true,
  4161. prmNames: { search: "search" },
  4162. viewrecords: true,
  4163. height: "100%",
  4164. rowNum: 20,
  4165. pager: subgrid_pager_id,
  4166. });
  4167. }
  4168. function gridList20() {
  4169. var $gridList = $("#gridList");
  4170. var queryJson = {
  4171. POCode: $("#txt_POCode").val(),
  4172. InvCode: $("#txt_InvCode").val(),
  4173. InvName: $("#txt_InvName").val(),
  4174. BatchCode: $("#txt_BatchCode").val(),
  4175. POStatus: $("#selShow").val()
  4176. }
  4177. $gridList.dataGrid({
  4178. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonTransfer" + "?" + Math.random(),
  4179. postData: { queryJson: JSON.stringify(queryJson) },
  4180. height: $(window).height() - 200,
  4181. width: $(window).width() - 300,
  4182. colModel: _Clos,
  4183. width: "100%",
  4184. autowidth: true,
  4185. //shrinkToFit: true,
  4186. gridComplete: function () {
  4187. },
  4188. pager: "#gridPager",
  4189. // sortname: 'MOCode,cast(Sequence as int)',
  4190. sortname: "TransferNO,Cast(Sequence as int) ",
  4191. sortorder: "asc",
  4192. viewrecords: true,
  4193. multiselect: true,
  4194. //beforeSelectRow: function (rowid, e) {
  4195. // $("#gridList").jqGrid('resetSelection');
  4196. // return (true);
  4197. //},
  4198. subGrid: true, // (1)开启子表格支持
  4199. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4200. $("#gridList").jqGrid("setSelection", rowid, false);
  4201. bindSubGrid20(subgrid_id, rowid)
  4202. }
  4203. });
  4204. $("#warehouse a.btn-default").click(function () {
  4205. $("#warehouse a.btn-default").removeClass("active");
  4206. $(this).addClass("active");
  4207. $('#btn_search').trigger("click");
  4208. });
  4209. $("#btn_search").click(function () {
  4210. var warehouse = $("#warehouse a.active").attr('data-value');
  4211. var queryJson = {
  4212. POCode: $("#txt_POCode").val(),
  4213. InvCode: $("#txt_InvCode").val(),
  4214. InvName: $("#txt_InvName").val(),
  4215. BatchCode: $("#txt_BatchCode").val(),
  4216. POStatus: $("#selShow").val()
  4217. }
  4218. $gridList.jqGrid('setGridParam', {
  4219. postData: { queryJson: JSON.stringify(queryJson) },
  4220. }).trigger('reloadGrid');
  4221. });
  4222. }
  4223. function bindSubGrid20(subgrid_id, rowid) {
  4224. debugger;
  4225. $("#gridList").jqGrid("setSelection", rowid, false);
  4226. var subgrid_table_id;
  4227. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4228. var subgrid_pager_id;
  4229. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4230. // (5)动态添加子报表的table和pager
  4231. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4232. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4233. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4234. // (6)创建jqGrid对象
  4235. $("#" + subgrid_table_id).dataGrid({
  4236. cellEdit: true,
  4237. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4238. colModel: _Clos1,
  4239. //colModel: ColModelSub,
  4240. shrinkToFit: true,//宽度自适应
  4241. multiselect: true,
  4242. prmNames: { search: "search" },
  4243. viewrecords: true,
  4244. height: "100%",
  4245. rowNum: 20,
  4246. pager: subgrid_pager_id,
  4247. });
  4248. }
  4249. //采购入库 ICSPurchaseReceive
  4250. function gridList22() {
  4251. var $gridList = $("#gridList");
  4252. var queryJson = {
  4253. POCode: $("#txt_POCode").val(),
  4254. VenCode: $("#txt_VenCode").val(),
  4255. VenName: $("#txt_VenName").val(),
  4256. InvCode: $("#txt_InvCode").val(),
  4257. InvName: $("#txt_InvName").val(),
  4258. BatchCode: $("#txt_BatchCode").val(),
  4259. FromTime: $("#FromTime").val(),
  4260. ToTime: $("#ToTime").val(),
  4261. WHCode: $("#txt_WHCode").val(),
  4262. WHStatus: $("#selStatus").val(),
  4263. POStatus: $("#selShow").val()
  4264. }
  4265. $gridList.dataGrid({
  4266. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonPurchaseReceive" + "?" + Math.random(),
  4267. postData: { queryJson: JSON.stringify(queryJson) },
  4268. height: $(window).height() - 200,
  4269. width: $(window).width() - 300,
  4270. colModel: _Clos,
  4271. width: "100%",
  4272. autowidth: true,
  4273. //shrinkToFit: true,
  4274. gridComplete: function () {
  4275. },
  4276. pager: "#gridPager",
  4277. // sortname: 'MOCode,cast(Sequence as int)',
  4278. sortname: "RCVCode,Cast(Sequence as int) ",
  4279. sortorder: "asc",
  4280. viewrecords: true,
  4281. multiselect: true,
  4282. //beforeSelectRow: function (rowid, e) {
  4283. // $("#gridList").jqGrid('resetSelection');
  4284. // return (true);
  4285. //},
  4286. subGrid: true, // (1)开启子表格支持
  4287. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4288. $("#gridList").jqGrid("setSelection", rowid, false);
  4289. bindSubGrid22(subgrid_id, rowid)
  4290. }
  4291. });
  4292. $("#warehouse a.btn-default").click(function () {
  4293. $("#warehouse a.btn-default").removeClass("active");
  4294. $(this).addClass("active");
  4295. $('#btn_search').trigger("click");
  4296. });
  4297. $("#btn_search").click(function () {
  4298. var warehouse = $("#warehouse a.active").attr('data-value');
  4299. var queryJson = {
  4300. POCode: $("#txt_POCode").val(),
  4301. InvCode: $("#txt_InvCode").val(),
  4302. InvName: $("#txt_InvName").val(),
  4303. BatchCode: $("#txt_BatchCode").val(),
  4304. FromTime: $("#FromTime").val(),
  4305. ToTime: $("#ToTime").val(),
  4306. WHCode: $("#txt_WHCode").val(),
  4307. POStatus: $("#selShow").val()
  4308. }
  4309. $gridList.jqGrid('setGridParam', {
  4310. postData: { queryJson: JSON.stringify(queryJson) },
  4311. }).trigger('reloadGrid');
  4312. });
  4313. }
  4314. function bindSubGrid22(subgrid_id, rowid) {
  4315. debugger;
  4316. $("#gridList").jqGrid("setSelection", rowid, false);
  4317. var subgrid_table_id;
  4318. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4319. var subgrid_pager_id;
  4320. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4321. // (5)动态添加子报表的table和pager
  4322. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4323. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  4324. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4325. // (6)创建jqGrid对象
  4326. $("#" + subgrid_table_id).dataGrid({
  4327. cellEdit: true,
  4328. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4329. colModel: _Clos1,
  4330. //colModel: ColModelSub,
  4331. shrinkToFit: true,//宽度自适应
  4332. multiselect: true,
  4333. prmNames: { search: "search" },
  4334. viewrecords: true,
  4335. height: "100%",
  4336. rowNum: 20,
  4337. pager: subgrid_pager_id,
  4338. });
  4339. }
  4340. //委外采购入库 ICSOutPurchaseReceive
  4341. function gridList23() {
  4342. var $gridList = $("#gridList");
  4343. var queryJson = {
  4344. POCode: $("#txt_POCode").val(),
  4345. InvCode: $("#txt_InvCode").val(),
  4346. InvName: $("#txt_InvName").val(),
  4347. BatchCode: $("#txt_BatchCode").val(),
  4348. FromTime: $("#FromTime").val(),
  4349. ToTime: $("#ToTime").val(),
  4350. WHCode: $("#txt_WHCode").val(),
  4351. POStatus: $("#selShow").val()
  4352. }
  4353. $gridList.dataGrid({
  4354. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonOutPurchaseReceive" + "?" + Math.random(),
  4355. postData: { queryJson: JSON.stringify(queryJson) },
  4356. height: $(window).height() - 200,
  4357. width: $(window).width() - 300,
  4358. colModel: _Clos,
  4359. width: "100%",
  4360. autowidth: true,
  4361. //shrinkToFit: true,
  4362. gridComplete: function () {
  4363. },
  4364. pager: "#gridPager",
  4365. // sortname: 'MOCode,cast(Sequence as int)',
  4366. sortname: "CreateDateTime ",
  4367. sortorder: "DESC",
  4368. viewrecords: true,
  4369. multiselect: true,
  4370. //beforeSelectRow: function (rowid, e) {
  4371. // $("#gridList").jqGrid('resetSelection');
  4372. // return (true);
  4373. //},
  4374. subGrid: true, // (1)开启子表格支持
  4375. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4376. $("#gridList").jqGrid("setSelection", rowid, false);
  4377. bindSubGrid23(subgrid_id, rowid)
  4378. }
  4379. });
  4380. $("#warehouse a.btn-default").click(function () {
  4381. $("#warehouse a.btn-default").removeClass("active");
  4382. $(this).addClass("active");
  4383. $('#btn_search').trigger("click");
  4384. });
  4385. $("#btn_search").click(function () {
  4386. var warehouse = $("#warehouse a.active").attr('data-value');
  4387. var queryJson = {
  4388. POCode: $("#txt_POCode").val(),
  4389. InvCode: $("#txt_InvCode").val(),
  4390. InvName: $("#txt_InvName").val(),
  4391. BatchCode: $("#txt_BatchCode").val(),
  4392. FromTime: $("#FromTime").val(),
  4393. ToTime: $("#ToTime").val(),
  4394. WHCode: $("#txt_WHCode").val(),
  4395. POStatus: $("#selShow").val()
  4396. }
  4397. $gridList.jqGrid('setGridParam', {
  4398. postData: { queryJson: JSON.stringify(queryJson) },
  4399. }).trigger('reloadGrid');
  4400. });
  4401. }
  4402. function bindSubGrid23(subgrid_id, rowid) {
  4403. debugger;
  4404. $("#gridList").jqGrid("setSelection", rowid, false);
  4405. var subgrid_table_id;
  4406. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4407. var subgrid_pager_id;
  4408. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4409. // (5)动态添加子报表的table和pager
  4410. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4411. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  4412. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4413. // (6)创建jqGrid对象
  4414. $("#" + subgrid_table_id).dataGrid({
  4415. cellEdit: true,
  4416. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4417. colModel: _Clos1,
  4418. //colModel: ColModelSub,
  4419. shrinkToFit: true,//宽度自适应
  4420. multiselect: true,
  4421. prmNames: { search: "search" },
  4422. viewrecords: true,
  4423. height: "100%",
  4424. rowNum: 20,
  4425. pager: subgrid_pager_id,
  4426. });
  4427. }
  4428. //线边仓调拨申请单生成条码(派纳)
  4429. function gridList201() {
  4430. var $gridList = $("#gridList");
  4431. var queryJson = {
  4432. POCode: $("#txt_POCode").val(),
  4433. InvCode: $("#txt_InvCode").val(),
  4434. InvName: $("#txt_InvName").val(),
  4435. BatchCode: $("#txt_BatchCode").val(),
  4436. POStatus: $("#selShow").val()
  4437. }
  4438. $gridList.dataGrid({
  4439. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonTransferApplicationPN" + "?" + Math.random(),
  4440. postData: { queryJson: JSON.stringify(queryJson) },
  4441. height: $(window).height() - 200,
  4442. width: $(window).width() - 300,
  4443. colModel: _Clos,
  4444. width: "100%",
  4445. autowidth: true,
  4446. //shrinkToFit: true,
  4447. gridComplete: function () {
  4448. },
  4449. pager: "#gridPager",
  4450. // sortname: 'MOCode,cast(Sequence as int)',
  4451. sortname: "TransferNO,Cast(Sequence as int) ",
  4452. sortorder: "asc",
  4453. viewrecords: true,
  4454. multiselect: true,
  4455. //beforeSelectRow: function (rowid, e) {
  4456. // $("#gridList").jqGrid('resetSelection');
  4457. // return (true);
  4458. //},
  4459. subGrid: true, // (1)开启子表格支持
  4460. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4461. $("#gridList").jqGrid("setSelection", rowid, false);
  4462. bindSubGrid201(subgrid_id, rowid)
  4463. }
  4464. });
  4465. $("#warehouse a.btn-default").click(function () {
  4466. $("#warehouse a.btn-default").removeClass("active");
  4467. $(this).addClass("active");
  4468. $('#btn_search').trigger("click");
  4469. });
  4470. $("#btn_search").click(function () {
  4471. var warehouse = $("#warehouse a.active").attr('data-value');
  4472. var queryJson = {
  4473. POCode: $("#txt_POCode").val(),
  4474. InvCode: $("#txt_InvCode").val(),
  4475. InvName: $("#txt_InvName").val(),
  4476. BatchCode: $("#txt_BatchCode").val(),
  4477. POStatus: $("#selShow").val()
  4478. }
  4479. $gridList.jqGrid('setGridParam', {
  4480. postData: { queryJson: JSON.stringify(queryJson) },
  4481. }).trigger('reloadGrid');
  4482. });
  4483. }
  4484. //调拨申请单生成条码
  4485. function gridList202() {
  4486. var $gridList = $("#gridList");
  4487. var queryJson = {
  4488. POCode: $("#txt_POCode").val(),
  4489. InvCode: $("#txt_InvCode").val(),
  4490. InvName: $("#txt_InvName").val(),
  4491. BatchCode: $("#txt_BatchCode").val(),
  4492. POStatus: $("#selShow").val()
  4493. }
  4494. $gridList.dataGrid({
  4495. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonTransferApplication" + "?" + Math.random(),
  4496. postData: { queryJson: JSON.stringify(queryJson) },
  4497. height: $(window).height() - 200,
  4498. width: $(window).width() - 300,
  4499. colModel: _Clos,
  4500. width: "100%",
  4501. autowidth: true,
  4502. //shrinkToFit: true,
  4503. gridComplete: function () {
  4504. },
  4505. pager: "#gridPager",
  4506. // sortname: 'MOCode,cast(Sequence as int)',
  4507. sortname: "TransferNO,Cast(Sequence as int) ",
  4508. sortorder: "asc",
  4509. viewrecords: true,
  4510. multiselect: true,
  4511. //beforeSelectRow: function (rowid, e) {
  4512. // $("#gridList").jqGrid('resetSelection');
  4513. // return (true);
  4514. //},
  4515. subGrid: true, // (1)开启子表格支持
  4516. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4517. $("#gridList").jqGrid("setSelection", rowid, false);
  4518. bindSubGrid202(subgrid_id, rowid)
  4519. }
  4520. });
  4521. $("#warehouse a.btn-default").click(function () {
  4522. $("#warehouse a.btn-default").removeClass("active");
  4523. $(this).addClass("active");
  4524. $('#btn_search').trigger("click");
  4525. });
  4526. $("#btn_search").click(function () {
  4527. var warehouse = $("#warehouse a.active").attr('data-value');
  4528. var queryJson = {
  4529. POCode: $("#txt_POCode").val(),
  4530. InvCode: $("#txt_InvCode").val(),
  4531. InvName: $("#txt_InvName").val(),
  4532. BatchCode: $("#txt_BatchCode").val(),
  4533. POStatus: $("#selShow").val()
  4534. }
  4535. $gridList.jqGrid('setGridParam', {
  4536. postData: { queryJson: JSON.stringify(queryJson) },
  4537. }).trigger('reloadGrid');
  4538. });
  4539. }
  4540. function bindSubGrid201(subgrid_id, rowid) {
  4541. debugger;
  4542. $("#gridList").jqGrid("setSelection", rowid, false);
  4543. var subgrid_table_id;
  4544. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4545. var subgrid_pager_id;
  4546. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4547. // (5)动态添加子报表的table和pager
  4548. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4549. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4550. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4551. // (6)创建jqGrid对象
  4552. $("#" + subgrid_table_id).dataGrid({
  4553. cellEdit: true,
  4554. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4555. colModel: _Clos1,
  4556. //colModel: ColModelSub,
  4557. shrinkToFit: true,//宽度自适应
  4558. multiselect: true,
  4559. prmNames: { search: "search" },
  4560. viewrecords: true,
  4561. height: "100%",
  4562. rowNum: 20,
  4563. pager: subgrid_pager_id,
  4564. });
  4565. }
  4566. function bindSubGrid202(subgrid_id, rowid) {
  4567. debugger;
  4568. $("#gridList").jqGrid("setSelection", rowid, false);
  4569. var subgrid_table_id;
  4570. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4571. var subgrid_pager_id;
  4572. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4573. // (5)动态添加子报表的table和pager
  4574. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4575. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4576. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4577. // (6)创建jqGrid对象
  4578. $("#" + subgrid_table_id).dataGrid({
  4579. cellEdit: true,
  4580. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4581. colModel: _Clos1,
  4582. //colModel: ColModelSub,
  4583. shrinkToFit: true,//宽度自适应
  4584. multiselect: true,
  4585. prmNames: { search: "search" },
  4586. viewrecords: true,
  4587. height: "100%",
  4588. rowNum: 20,
  4589. pager: subgrid_pager_id,
  4590. });
  4591. }
  4592. //线边仓一步调入单生成条码(派纳)
  4593. function gridList203() {
  4594. var $gridList = $("#gridList");
  4595. var queryJson = {
  4596. POCode: $("#txt_POCode").val(),
  4597. InvCode: $("#txt_InvCode").val(),
  4598. InvName: $("#txt_InvName").val(),
  4599. BatchCode: $("#txt_BatchCode").val(),
  4600. FromTime: $("#FromTime").val(),
  4601. ToTime: $("#ToTime").val(),
  4602. WHCode: $("#txt_WHCode").val(),
  4603. POStatus: $("#selShow").val()
  4604. }
  4605. $gridList.dataGrid({
  4606. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonOneSetpTransPN" + "?" + Math.random(),
  4607. postData: { queryJson: JSON.stringify(queryJson) },
  4608. height: $(window).height() - 200,
  4609. width: $(window).width() - 300,
  4610. colModel: _Clos,
  4611. width: "100%",
  4612. autowidth: true,
  4613. //shrinkToFit: true,
  4614. gridComplete: function () {
  4615. },
  4616. pager: "#gridPager",
  4617. // sortname: 'MOCode,cast(Sequence as int)',
  4618. sortname: "TransferNO,Cast(Sequence as int) ",
  4619. sortorder: "asc",
  4620. viewrecords: true,
  4621. multiselect: true,
  4622. //beforeSelectRow: function (rowid, e) {
  4623. // $("#gridList").jqGrid('resetSelection');
  4624. // return (true);
  4625. //},
  4626. subGrid: true, // (1)开启子表格支持
  4627. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4628. $("#gridList").jqGrid("setSelection", rowid, false);
  4629. bindSubGrid203(subgrid_id, rowid)
  4630. }
  4631. });
  4632. $("#warehouse a.btn-default").click(function () {
  4633. $("#warehouse a.btn-default").removeClass("active");
  4634. $(this).addClass("active");
  4635. $('#btn_search').trigger("click");
  4636. });
  4637. $("#btn_search").click(function () {
  4638. var warehouse = $("#warehouse a.active").attr('data-value');
  4639. var queryJson = {
  4640. POCode: $("#txt_POCode").val(),
  4641. InvCode: $("#txt_InvCode").val(),
  4642. InvName: $("#txt_InvName").val(),
  4643. BatchCode: $("#txt_BatchCode").val(),
  4644. FromTime: $("#FromTime").val(),
  4645. ToTime: $("#ToTime").val(),
  4646. WHCode: $("#txt_WHCode").val(),
  4647. POStatus: $("#selShow").val()
  4648. }
  4649. $gridList.jqGrid('setGridParam', {
  4650. postData: { queryJson: JSON.stringify(queryJson) },
  4651. }).trigger('reloadGrid');
  4652. });
  4653. }
  4654. function bindSubGrid203(subgrid_id, rowid) {
  4655. debugger;
  4656. $("#gridList").jqGrid("setSelection", rowid, false);
  4657. var subgrid_table_id;
  4658. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4659. var subgrid_pager_id;
  4660. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4661. // (5)动态添加子报表的table和pager
  4662. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4663. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4664. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4665. // (6)创建jqGrid对象
  4666. $("#" + subgrid_table_id).dataGrid({
  4667. cellEdit: true,
  4668. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4669. colModel: _Clos1,
  4670. //colModel: ColModelSub,
  4671. shrinkToFit: true,//宽度自适应
  4672. multiselect: true,
  4673. prmNames: { search: "search" },
  4674. viewrecords: true,
  4675. height: "100%",
  4676. rowNum: 20,
  4677. pager: subgrid_pager_id,
  4678. });
  4679. }
  4680. //红字销售出库单
  4681. function gridList24() {
  4682. var $gridList = $("#gridList");
  4683. var queryJson = {
  4684. POCode: $("#txt_POCode").val(),
  4685. VenCode: $("#txt_VenCode").val(),
  4686. VenName: $("#txt_VenName").val(),
  4687. InvCode: $("#txt_InvCode").val(),
  4688. InvName: $("#txt_InvName").val(),
  4689. BatchCode: $("#txt_BatchCode").val(),
  4690. FromTime: $("#FromTime").val(),
  4691. ToTime: $("#ToTime").val(),
  4692. WHCode: $("#txt_WHCode").val(),
  4693. POStatus: $("#selShow").val(),
  4694. WHStatus: $("#selStatus").val()
  4695. }
  4696. $gridList.dataGrid({
  4697. url: "/XJYWMS/WMSCreateItemLot/GetGridJsonWMSSSD" + "?" + Math.random(),
  4698. postData: { queryJson: JSON.stringify(queryJson) },
  4699. height: $(window).height() - 200,
  4700. width: $(window).width() - 300,
  4701. colModel: _Clos,
  4702. //colModel: ColModelMain,
  4703. width: "100%",
  4704. autowidth: true,
  4705. //shrinkToFit: true,
  4706. gridComplete: function () {
  4707. },
  4708. pager: "#gridPager",
  4709. //sortname: 'ODNCode,cast(Sequence as int)',
  4710. sortname: "SSDCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  4711. sortorder: "asc",
  4712. viewrecords: true,
  4713. multiselect: true,
  4714. //beforeSelectRow: function (rowid, e) {
  4715. // $("#gridList").jqGrid('resetSelection');
  4716. // return (true);
  4717. //},
  4718. subGrid: true, // (1)开启子表格支持
  4719. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4720. $("#gridList").jqGrid("setSelection", rowid, false);
  4721. bindSubGrid24(subgrid_id, rowid)
  4722. }
  4723. });
  4724. $("#warehouse a.btn-default").click(function () {
  4725. $("#warehouse a.btn-default").removeClass("active");
  4726. $(this).addClass("active");
  4727. $('#btn_search').trigger("click");
  4728. });
  4729. $("#btn_search").click(function () {
  4730. var warehouse = $("#warehouse a.active").attr('data-value');
  4731. var queryJson = {
  4732. POCode: $("#txt_POCode").val(),
  4733. VenCode: $("#txt_VenCode").val(),
  4734. VenName: $("#txt_VenName").val(),
  4735. InvCode: $("#txt_InvCode").val(),
  4736. InvName: $("#txt_InvName").val(),
  4737. BatchCode: $("#txt_BatchCode").val(),
  4738. FromTime: $("#FromTime").val(),
  4739. ToTime: $("#ToTime").val(),
  4740. WHCode: $("#txt_WHCode").val(),
  4741. POStatus: $("#selShow").val(),
  4742. WHStatus: $("#selStatus").val()
  4743. }
  4744. $gridList.jqGrid('setGridParam', {
  4745. postData: { queryJson: JSON.stringify(queryJson) },
  4746. }).trigger('reloadGrid');
  4747. });
  4748. }
  4749. function bindSubGrid24(subgrid_id, rowid) {
  4750. $("#gridList").jqGrid("setSelection", rowid, false);
  4751. var subgrid_table_id;
  4752. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4753. var subgrid_pager_id;
  4754. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4755. // (5)动态添加子报表的table和pager
  4756. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4757. var SSDCode = $("#gridList").jqGrid('getRowData', rowid).SSDCode;
  4758. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4759. // (6)创建jqGrid对象
  4760. $("#" + subgrid_table_id).dataGrid({
  4761. cellEdit: true,
  4762. url: "/XJYWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SSDCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4763. //colModel: [
  4764. // { label: "主键", name: "ID", hidden: true, key: true },
  4765. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  4766. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  4767. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  4768. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  4769. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  4770. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  4771. //],
  4772. colModel: _Clos1,
  4773. //colModel: ColModelSub,
  4774. shrinkToFit: true,//宽度自适应
  4775. multiselect: true,
  4776. prmNames: { search: "search" },
  4777. viewrecords: true,
  4778. height: "100%",
  4779. rowNum: 20,
  4780. pager: subgrid_pager_id,
  4781. });
  4782. }
  4783. function btnDelete() {
  4784. var objArr = '';
  4785. var obj = $("#gridList").jqGrid("getRowData");
  4786. for (var i = 0; i < obj.length; i++) {
  4787. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  4788. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  4789. if (rowData != "undefined" && rowData != null) {
  4790. for (var j = 0; j < rowData.length; j++) {
  4791. objArr += "'" + rowData[j] + "',";
  4792. }
  4793. }
  4794. }
  4795. if (objArr == "") {
  4796. $.modalAlertNew("WMS00099");
  4797. return;
  4798. }
  4799. $.deleteForm({
  4800. url: "/XJYWMS/WMSCreateItemLot/DeleteItemLot",
  4801. param: { keyValue: JSON.stringify(objArr) },
  4802. success: function () {
  4803. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4804. }
  4805. })
  4806. }
  4807. function btnAllCreate() {
  4808. debugger;
  4809. var PoStatus;
  4810. var jsonData = '';
  4811. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  4812. //if (ids.length != 1) {
  4813. // $.modalAlertNew("WMS00100");
  4814. // return;
  4815. //}
  4816. var POCode = "";
  4817. var PORow = "";
  4818. var VenCode = "";
  4819. var WorkPoint = "";
  4820. var VendorLot = "";
  4821. //生产退料
  4822. if (Type == '1') {
  4823. debugger;
  4824. var ARR = [];
  4825. for (var i in ids) {
  4826. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4827. Code = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  4828. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4829. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  4830. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  4831. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  4832. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  4833. if (thisCreateQty == 0) {
  4834. $.modalAlert("该单据条码已全部生成完毕!");
  4835. return;
  4836. }
  4837. thisCreateQty = thisCreateQty.toFixed(4);
  4838. var minPackQty = thisCreateQty;//最小包装量
  4839. //minPackQty = minPackQty.toFixed(4);
  4840. var createPageCount = 1;//本次生成张数
  4841. createPageCount = createPageCount.toFixed(0);
  4842. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  4843. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  4844. Quantity = Quantity.toFixed(2);
  4845. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  4846. CreatedQty = CreatedQty.toFixed(2);
  4847. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  4848. if (Quantity == CreatedQty) {
  4849. return false;
  4850. }
  4851. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  4852. if (EffectiveEnable == 'true') {
  4853. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  4854. } else {
  4855. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  4856. }
  4857. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  4858. var obj = {
  4859. ID:ID,
  4860. Code: Code,
  4861. Sequence: Sequence,
  4862. thisCreateQty: thisCreateQty,
  4863. minPackQty: minPackQty,
  4864. createPageCount: createPageCount,
  4865. //VendorLot: VendorLot,
  4866. PRODUCTDATE: PRODUCTDATE,
  4867. ExpirationDate: ExpirationDate,
  4868. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  4869. //自由项
  4870. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  4871. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  4872. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  4873. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  4874. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  4875. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  4876. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  4877. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  4878. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  4879. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  4880. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  4881. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  4882. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  4883. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  4884. }
  4885. ARR.push(obj);
  4886. }
  4887. $.submitForm({
  4888. url: "/XJYWMS/WMSCreateItemLot/SubmitFormGDTLALL" + "?" + Math.random(),
  4889. param: {
  4890. keyValue: JSON.stringify(ARR)
  4891. },
  4892. success: function () {
  4893. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4894. }
  4895. })
  4896. }
  4897. //销售退货
  4898. if (Type == '4') {
  4899. debugger;
  4900. var ARR = [];
  4901. for (var i in ids) {
  4902. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4903. Code = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  4904. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4905. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  4906. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  4907. //console.log("单号:" + DNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  4908. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  4909. if (thisCreateQty == 0) {
  4910. $.modalAlert("该单据条码已全部生成完毕!");
  4911. return;
  4912. }
  4913. thisCreateQty = thisCreateQty.toFixed(4);
  4914. var minPackQty = thisCreateQty;//最小包装量
  4915. //minPackQty = minPackQty.toFixed(4);
  4916. var createPageCount = 1;//本次生成张数
  4917. createPageCount = createPageCount.toFixed(0);
  4918. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  4919. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  4920. Quantity = Quantity.toFixed(2);
  4921. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  4922. CreatedQty = CreatedQty.toFixed(2);
  4923. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  4924. if (Quantity == CreatedQty) {
  4925. return false;
  4926. }
  4927. if (EffectiveEnable == 'true') {
  4928. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  4929. } else {
  4930. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  4931. }
  4932. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  4933. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  4934. var obj = {
  4935. ID: ID,
  4936. Code: Code,
  4937. Sequence: Sequence,
  4938. thisCreateQty: thisCreateQty,
  4939. minPackQty: minPackQty,
  4940. createPageCount: createPageCount,
  4941. //VendorLot: VendorLot,
  4942. PRODUCTDATE: PRODUCTDATE,
  4943. ExpirationDate: ExpirationDate,
  4944. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  4945. //自由项
  4946. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  4947. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  4948. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  4949. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  4950. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  4951. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  4952. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  4953. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  4954. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  4955. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  4956. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  4957. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  4958. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  4959. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  4960. }
  4961. ARR.push(obj);
  4962. }
  4963. $.submitForm({
  4964. url: "/XJYWMS/WMSCreateItemLot/SubmitFormXSTHALL" + "?" + Math.random(),
  4965. param: {
  4966. keyValue: JSON.stringify(ARR)
  4967. },
  4968. success: function () {
  4969. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4970. }
  4971. })
  4972. }
  4973. //销售退货
  4974. if (Type == '5') {
  4975. debugger;
  4976. var ARR = [];
  4977. for (var i in ids) {
  4978. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4979. Code = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  4980. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4981. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  4982. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  4983. //console.log("单号:" + DNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  4984. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  4985. if (thisCreateQty == 0) {
  4986. $.modalAlert("该单据条码已全部生成完毕!");
  4987. return;
  4988. }
  4989. thisCreateQty = thisCreateQty.toFixed(4);
  4990. var minPackQty = thisCreateQty;//最小包装量
  4991. //minPackQty = minPackQty.toFixed(4);
  4992. var createPageCount = 1;//本次生成张数
  4993. createPageCount = createPageCount.toFixed(0);
  4994. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  4995. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  4996. Quantity = Quantity.toFixed(2);
  4997. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  4998. CreatedQty = CreatedQty.toFixed(2);
  4999. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5000. if (Quantity == CreatedQty) {
  5001. return false;
  5002. }
  5003. if (EffectiveEnable == 'true') {
  5004. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5005. } else {
  5006. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5007. }
  5008. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5009. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5010. var obj = {
  5011. ID: ID,
  5012. Code: Code,
  5013. Sequence: Sequence,
  5014. thisCreateQty: thisCreateQty,
  5015. minPackQty: minPackQty,
  5016. createPageCount: createPageCount,
  5017. //VendorLot: VendorLot,
  5018. PRODUCTDATE: PRODUCTDATE,
  5019. ExpirationDate: ExpirationDate,
  5020. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5021. //自由项
  5022. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5023. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5024. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5025. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5026. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5027. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5028. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5029. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5030. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5031. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5032. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5033. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5034. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5035. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5036. }
  5037. ARR.push(obj);
  5038. }
  5039. $.submitForm({
  5040. url: "/XJYWMS/WMSCreateItemLot/SubmitFormQiTaALL" + "?" + Math.random(),
  5041. param: {
  5042. keyValue: JSON.stringify(ARR)
  5043. },
  5044. success: function () {
  5045. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5046. }
  5047. })
  5048. }
  5049. //普通到货单
  5050. if (Type == '7') {
  5051. debugger;
  5052. var ARR = [];
  5053. for (var i in ids) {
  5054. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5055. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  5056. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5057. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5058. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5059. //console.log("单号:" + DNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5060. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5061. if (thisCreateQty == 0) {
  5062. $.modalAlert("该单据条码已全部生成完毕!");
  5063. return;
  5064. }
  5065. thisCreateQty = thisCreateQty.toFixed(4);
  5066. var minPackQty = thisCreateQty;//最小包装量
  5067. //minPackQty = minPackQty.toFixed(4);
  5068. var createPageCount = 1;//本次生成张数
  5069. createPageCount = createPageCount.toFixed(0);
  5070. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5071. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5072. Quantity = Quantity.toFixed(2);
  5073. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5074. CreatedQty = CreatedQty.toFixed(2);
  5075. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5076. if (Quantity == CreatedQty) {
  5077. return false;
  5078. }
  5079. if (EffectiveEnable == 'true') {
  5080. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5081. } else {
  5082. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5083. }
  5084. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5085. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5086. var obj = {
  5087. ID:ID,
  5088. Code: DNCode,
  5089. Sequence: Sequence,
  5090. thisCreateQty: thisCreateQty,
  5091. minPackQty: minPackQty,
  5092. createPageCount: createPageCount,
  5093. //VendorLot: VendorLot,
  5094. PRODUCTDATE: PRODUCTDATE,
  5095. ExpirationDate: ExpirationDate,
  5096. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5097. //自由项
  5098. ProjectCode : $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5099. BatchCode : $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5100. Version : $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5101. Brand : $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5102. cFree1 : $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5103. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5104. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5105. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5106. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5107. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5108. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5109. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5110. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5111. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5112. }
  5113. ARR.push(obj);
  5114. }
  5115. $.submitForm({
  5116. url: "/XJYWMS/WMSCreateItemLot/SubmitFormSHDHALL" + "?" + Math.random(),
  5117. param: {
  5118. keyValue: JSON.stringify(ARR)
  5119. },
  5120. success: function () {
  5121. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5122. }
  5123. })
  5124. }
  5125. //委外到货单
  5126. if (Type == '8') {
  5127. debugger;
  5128. var ARR = [];
  5129. for (var i in ids) {
  5130. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5131. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  5132. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5133. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5134. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5135. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5136. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5137. if (thisCreateQty == 0) {
  5138. $.modalAlert("该单据条码已全部生成完毕!");
  5139. return;
  5140. }
  5141. thisCreateQty = thisCreateQty.toFixed(4);
  5142. var minPackQty = thisCreateQty;//最小包装量
  5143. //minPackQty = minPackQty.toFixed(4);
  5144. var createPageCount = 1;//本次生成张数
  5145. createPageCount = createPageCount.toFixed(0);
  5146. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5147. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5148. Quantity = Quantity.toFixed(2);
  5149. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5150. CreatedQty = CreatedQty.toFixed(2);
  5151. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5152. if (Quantity == CreatedQty) {
  5153. return false;
  5154. }
  5155. if (EffectiveEnable == 'true') {
  5156. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5157. } else {
  5158. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5159. }
  5160. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5161. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5162. var obj = {
  5163. ID:ID,
  5164. Code: ODNCode,
  5165. Sequence: Sequence,
  5166. thisCreateQty: thisCreateQty,
  5167. minPackQty: minPackQty,
  5168. createPageCount: createPageCount,
  5169. //VendorLot: VendorLot,
  5170. PRODUCTDATE: PRODUCTDATE,
  5171. ExpirationDate: ExpirationDate,
  5172. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5173. //自由项
  5174. ProjectCode : $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5175. BatchCode : $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5176. Version : $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5177. Brand : $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5178. cFree1 : $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5179. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5180. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5181. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5182. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5183. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5184. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5185. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5186. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5187. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5188. }
  5189. ARR.push(obj);
  5190. }
  5191. $.submitForm({
  5192. url: "/XJYWMS/WMSCreateItemLot/SubmitFormWWSHDHALL" + "?" + Math.random(),
  5193. param: {
  5194. keyValue: JSON.stringify(obj)
  5195. },
  5196. success: function () {
  5197. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5198. }
  5199. })
  5200. }
  5201. //成品入库单条码生成
  5202. if (Type == '9') {
  5203. debugger;
  5204. var ARR = [];
  5205. for (var i in ids) {
  5206. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5207. Code = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5208. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5209. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5210. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5211. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5212. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5213. if (thisCreateQty == 0) {
  5214. $.modalAlert("该单据条码已全部生成完毕!");
  5215. return;
  5216. }
  5217. thisCreateQty = thisCreateQty.toFixed(4);
  5218. var minPackQty = thisCreateQty;//最小包装量
  5219. //minPackQty = minPackQty.toFixed(4);
  5220. var createPageCount = 1;//本次生成张数
  5221. createPageCount = createPageCount.toFixed(0);
  5222. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5223. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5224. Quantity = Quantity.toFixed(2);
  5225. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5226. CreatedQty = CreatedQty.toFixed(2);
  5227. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5228. if (Quantity == CreatedQty) {
  5229. return false;
  5230. }
  5231. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5232. if (EffectiveEnable=='true') {
  5233. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5234. } else {
  5235. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5236. }
  5237. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5238. var obj = {
  5239. ID:ID,
  5240. Code: Code,
  5241. Sequence:Sequence,
  5242. thisCreateQty: thisCreateQty,
  5243. minPackQty: minPackQty,
  5244. createPageCount: createPageCount,
  5245. //VendorLot: VendorLot,
  5246. PRODUCTDATE: PRODUCTDATE,
  5247. ExpirationDate: ExpirationDate,
  5248. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5249. //自由项
  5250. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5251. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5252. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5253. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5254. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5255. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5256. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5257. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5258. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5259. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5260. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5261. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5262. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5263. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5264. }
  5265. ARR.push(obj);
  5266. }
  5267. $.submitForm({
  5268. url: "/XJYWMS/WMSCreateItemLot/SubmitFormKLCPRKALL" + "?" + Math.random(),
  5269. param: {
  5270. keyValue: JSON.stringify(ARR)
  5271. },
  5272. success: function () {
  5273. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5274. }
  5275. })
  5276. }
  5277. if (Type == '13') {
  5278. debugger;
  5279. var ARR = [];
  5280. for (var i in ids) {
  5281. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5282. Code = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5283. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5284. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5285. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5286. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5287. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5288. if (thisCreateQty == 0) {
  5289. $.modalAlert("该单据条码已全部生成完毕!");
  5290. return;
  5291. }
  5292. thisCreateQty = thisCreateQty.toFixed(4);
  5293. var minPackQty = thisCreateQty;//最小包装量
  5294. //minPackQty = minPackQty.toFixed(4);
  5295. var createPageCount = 1;//本次生成张数
  5296. createPageCount = createPageCount.toFixed(0);
  5297. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5298. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5299. Quantity = Quantity.toFixed(2);
  5300. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5301. CreatedQty = CreatedQty.toFixed(2);
  5302. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5303. if (Quantity == CreatedQty) {
  5304. return false;
  5305. }
  5306. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5307. if (EffectiveEnable == 'true') {
  5308. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5309. } else {
  5310. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5311. }
  5312. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5313. var obj = {
  5314. ID: ID,
  5315. Code: Code,
  5316. Sequence: Sequence,
  5317. thisCreateQty: thisCreateQty,
  5318. minPackQty: minPackQty,
  5319. createPageCount: createPageCount,
  5320. //VendorLot: VendorLot,
  5321. PRODUCTDATE: PRODUCTDATE,
  5322. ExpirationDate: ExpirationDate,
  5323. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5324. //自由项
  5325. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5326. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5327. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5328. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5329. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5330. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5331. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5332. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5333. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5334. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5335. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5336. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5337. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5338. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5339. }
  5340. ARR.push(obj);
  5341. }
  5342. $.submitForm({
  5343. url: "/XJYWMS/WMSCreateItemLot/SubmitFormCLCKTLALL" + "?" + Math.random(),
  5344. param: {
  5345. keyValue: JSON.stringify(ARR)
  5346. },
  5347. success: function () {
  5348. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5349. }
  5350. })
  5351. }
  5352. if (Type == '17') {
  5353. for (var i in ids) {
  5354. LotNo = $("#gridList").jqGrid('getRowData', ids[i]).LotNo;
  5355. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5356. if (thisCreateQty==0) {
  5357. $.modalAlert("该条码已全部生成完毕!");
  5358. return;
  5359. }
  5360. thisCreateQty = thisCreateQty.toFixed(4);
  5361. var minPackQty = thisCreateQty;//最小包装量
  5362. var createPageCount = 1;//本次生成张数
  5363. createPageCount = createPageCount.toFixed(0);
  5364. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5365. Quantity = Quantity.toFixed(2);
  5366. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5367. CreatedQty = CreatedQty.toFixed(2);
  5368. if (Quantity == CreatedQty) {
  5369. return false;
  5370. }
  5371. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5372. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5373. var obj = {
  5374. thisCreateQty: thisCreateQty,
  5375. minPackQty: minPackQty,
  5376. createPageCount: createPageCount,
  5377. //VendorLot: VendorLot,
  5378. PRODUCTDATE: PRODUCTDATE,
  5379. ExpirationDate: ExpirationDate,
  5380. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5381. }
  5382. $.submitForm({
  5383. url: "/XJYWMS/WMSCreateItemLot/SubmitFormBHGTM?LotNo=" + LotNo + "&WorkPoint=" + WorkPoints,
  5384. param: {
  5385. keyValue: JSON.stringify(obj)
  5386. },
  5387. success: function () {
  5388. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5389. }
  5390. })
  5391. }
  5392. }
  5393. //委外收货生成条码
  5394. if (Type == '23') {
  5395. debugger;
  5396. var ARR = [];
  5397. for (var i in ids) {
  5398. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5399. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5400. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5401. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5402. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5403. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5404. if (thisCreateQty == 0) {
  5405. $.modalAlert("该单据条码已全部生成完毕!");
  5406. return;
  5407. }
  5408. thisCreateQty = thisCreateQty.toFixed(4);
  5409. var minPackQty = thisCreateQty;//最小包装量
  5410. //minPackQty = minPackQty.toFixed(4);
  5411. var createPageCount = 1;//本次生成张数
  5412. createPageCount = createPageCount.toFixed(0);
  5413. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5414. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5415. Quantity = Quantity.toFixed(2);
  5416. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5417. CreatedQty = CreatedQty.toFixed(2);
  5418. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5419. if (Quantity == CreatedQty) {
  5420. return false;
  5421. }
  5422. if (EffectiveEnable == 'true') {
  5423. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5424. } else {
  5425. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5426. }
  5427. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5428. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5429. var obj = {
  5430. ID: ID,
  5431. Code: RCVCode,
  5432. Sequence: Sequence,
  5433. thisCreateQty: thisCreateQty,
  5434. minPackQty: minPackQty,
  5435. createPageCount: createPageCount,
  5436. //VendorLot: VendorLot,
  5437. PRODUCTDATE: PRODUCTDATE,
  5438. ExpirationDate: ExpirationDate,
  5439. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5440. //自由项
  5441. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5442. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5443. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5444. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5445. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5446. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5447. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5448. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5449. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5450. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5451. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5452. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5453. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5454. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5455. }
  5456. ARR.push(obj);
  5457. }
  5458. $.submitForm({
  5459. url: "/XJYWMS/WMSCreateItemLot/SubmitFormWWSHALL" + "?" + Math.random(),
  5460. param: {
  5461. keyValue: JSON.stringify(ARR)
  5462. },
  5463. success: function () {
  5464. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5465. }
  5466. })
  5467. }
  5468. }
  5469. function dateChange(num, date) {
  5470. if (!date) {
  5471. date = new Date();//没有传入值时,默认是当前日期
  5472. date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
  5473. }
  5474. date += " 00:00:00";//设置为当天凌晨12点
  5475. date = Date.parse(new Date(date)) / 1000;//转换为时间戳
  5476. date += (86400) * num;//修改后的时间戳
  5477. var newDate = new Date(parseInt(date) * 1000);//转换为时间
  5478. return newDate.getFullYear() + '-' + (newDate.getMonth() + 1) + '-' + newDate.getDate();
  5479. }
  5480. function btnCreate() {
  5481. debugger;
  5482. var PoStatus;
  5483. var jsonData = '';
  5484. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  5485. if (ids.length != 1) {
  5486. $.modalAlertNew("WMS00100");
  5487. return;
  5488. }
  5489. var POCode = "";
  5490. var PORow = "";
  5491. if (Type == '1') {
  5492. for (var i in ids) {
  5493. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5494. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5495. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5496. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5497. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5498. }
  5499. $.modalOpen({
  5500. id: "FormAddItemLot",
  5501. title: "生产退料条码生成",
  5502. url: "/XJYWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5503. width: "550px",
  5504. height: "1000px",
  5505. callBack: function (iframeId) {
  5506. top.frames[iframeId].submitForm();
  5507. }
  5508. });
  5509. } else if (Type == '2') {
  5510. for (var i in ids) {
  5511. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  5512. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5513. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5514. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5515. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5516. }
  5517. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5518. $.modalOpen({
  5519. id: "FormAddItemLot",
  5520. title: "委外退料条码生成",
  5521. url: "/XJYWMS/WMSCreateItemLot/FromNew?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5522. width: "550px",
  5523. height: "1000px",
  5524. callBack: function (iframeId) {
  5525. top.frames[iframeId].submitForm();
  5526. }
  5527. });
  5528. }
  5529. else {
  5530. $.modalOpen({
  5531. id: "FormAddItemLot",
  5532. title: "委外退料条码生成",
  5533. url: "/XJYWMS/WMSCreateItemLot/From?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5534. width: "550px",
  5535. height: "1000px",
  5536. callBack: function (iframeId) {
  5537. top.frames[iframeId].submitForm();
  5538. }
  5539. });
  5540. }
  5541. } else if (Type == '3') {
  5542. for (var i in ids) {
  5543. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  5544. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  5545. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5546. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5547. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5548. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5549. }
  5550. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5551. $.modalOpen({
  5552. id: "FormAddItemLot",
  5553. title: "成品条码产生",
  5554. url: "/XJYWMS/WMSCreateItemLot/FromNew?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  5555. width: "550px",
  5556. height: "1000px",
  5557. callBack: function (iframeId) {
  5558. top.frames[iframeId].submitForm();
  5559. }
  5560. });
  5561. }
  5562. else {
  5563. $.modalOpen({
  5564. id: "FormAddItemLot",
  5565. title: "成品条码产生",
  5566. url: "/XJYWMS/WMSCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  5567. width: "550px",
  5568. height: "1000px",
  5569. callBack: function (iframeId) {
  5570. top.frames[iframeId].submitForm();
  5571. }
  5572. });
  5573. }
  5574. } else if (Type == '4') {
  5575. for (var i in ids) {
  5576. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  5577. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5578. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5579. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5580. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5581. }
  5582. $.modalOpen({
  5583. id: "FormAddItemLot",
  5584. title: "销售退货条码产生",
  5585. url: "/XJYWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5586. width: "550px",
  5587. height: "1000px",
  5588. callBack: function (iframeId) {
  5589. top.frames[iframeId].submitForm();
  5590. }
  5591. });
  5592. } else if (Type == '5') {
  5593. for (var i in ids) {
  5594. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  5595. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5596. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5597. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5598. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5599. }
  5600. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5601. $.modalOpen({
  5602. id: "FormAddItemLot",
  5603. title: "其他入库条码产生",
  5604. url: "/XJYWMS/WMSCreateItemLot/FromNew?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5605. width: "550px",
  5606. height: "1000px",
  5607. callBack: function (iframeId) {
  5608. top.frames[iframeId].submitForm();
  5609. }
  5610. });
  5611. }
  5612. else {
  5613. $.modalOpen({
  5614. id: "FormAddItemLot",
  5615. title: "其他入库条码产生",
  5616. url: "/XJYWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5617. width: "550px",
  5618. height: "1000px",
  5619. callBack: function (iframeId) {
  5620. top.frames[iframeId].submitForm();
  5621. }
  5622. });
  5623. }
  5624. } else if (Type == '6') {
  5625. for (var i in ids) {
  5626. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  5627. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5628. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5629. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5630. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5631. }
  5632. $.modalOpen({
  5633. id: "FormAddItemLot",
  5634. title: "归还单条码产生",
  5635. url: "/XJYWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5636. width: "550px",
  5637. height: "1000px",
  5638. callBack: function (iframeId) {
  5639. top.frames[iframeId].submitForm();
  5640. }
  5641. });
  5642. } else if (Type == '7') {
  5643. for (var i in ids) {
  5644. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  5645. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5646. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5647. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5648. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5649. }
  5650. $.modalOpen({
  5651. id: "FormAddItemLot",
  5652. title: "审核到货单生成条码",
  5653. url: "/XJYWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5654. width: "550px",
  5655. height: "1000px",
  5656. callBack: function (iframeId) {
  5657. top.frames[iframeId].submitForm();
  5658. }
  5659. });
  5660. } else if (Type == '8') {
  5661. for (var i in ids) {
  5662. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  5663. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5664. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  5665. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5666. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5667. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5668. }
  5669. $.modalOpen({
  5670. id: "FormAddItemLot",
  5671. title: "审核委外到货单生成条码",
  5672. url: "/XJYWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(),
  5673. width: "550px",
  5674. height: "1000px",
  5675. callBack: function (iframeId) {
  5676. top.frames[iframeId].submitForm();
  5677. }
  5678. });
  5679. } else if (Type == '9') {
  5680. for (var i in ids) {
  5681. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5682. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5683. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5684. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5685. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5686. }
  5687. $.modalOpen({
  5688. id: "FormAddItemLot",
  5689. title: "开立成品入库单生成条码",
  5690. url: "/XJYWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5691. width: "550px",
  5692. height: "1000px",
  5693. callBack: function (iframeId) {
  5694. top.frames[iframeId].submitForm();
  5695. }
  5696. });
  5697. } else if (Type == '10') {
  5698. for (var i in ids) {
  5699. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  5700. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5701. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5702. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5703. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5704. }
  5705. $.modalOpen({
  5706. id: "FormAddItemLot",
  5707. title: "审核拒收单生成条码",
  5708. url: "/XJYWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5709. width: "550px",
  5710. height: "1000px",
  5711. callBack: function (iframeId) {
  5712. top.frames[iframeId].submitForm();
  5713. }
  5714. });
  5715. } else if (Type == '11') {
  5716. for (var i in ids) {
  5717. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  5718. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  5719. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5720. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5721. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5722. }
  5723. $.modalOpen({
  5724. id: "FormAddItemLot",
  5725. title: "审核委外拒收单生成条码",
  5726. url: "/XJYWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5727. width: "550px",
  5728. height: "1000px",
  5729. callBack: function (iframeId) {
  5730. top.frames[iframeId].submitForm();
  5731. }
  5732. });
  5733. } else if (Type == '12') {
  5734. for (var i in ids) {
  5735. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5736. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5737. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5738. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5739. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5740. }
  5741. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5742. $.modalOpen({
  5743. id: "FormAddItemLot",
  5744. title: "审核领料申请退料生成条码",
  5745. url: "/XJYWMS/WMSCreateItemLot/FromNew?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5746. width: "550px",
  5747. height: "1000px",
  5748. callBack: function (iframeId) {
  5749. top.frames[iframeId].submitForm();
  5750. }
  5751. });
  5752. }
  5753. else {
  5754. $.modalOpen({
  5755. id: "FormAddItemLot",
  5756. title: "审核领料申请退料生成条码",
  5757. url: "/XJYWMS/WMSCreateItemLot/From?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5758. width: "550px",
  5759. height: "1000px",
  5760. callBack: function (iframeId) {
  5761. top.frames[iframeId].submitForm();
  5762. }
  5763. });
  5764. }
  5765. } else if (Type == '13') {
  5766. for (var i in ids) {
  5767. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5768. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5769. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5770. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5771. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5772. }
  5773. $.modalOpen({
  5774. id: "FormAddItemLot",
  5775. title: "材料出库退料生成条码",
  5776. url: "/XJYWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5777. width: "550px",
  5778. height: "1000px",
  5779. callBack: function (iframeId) {
  5780. top.frames[iframeId].submitForm();
  5781. }
  5782. });
  5783. } else if (Type == '14') {
  5784. for (var i in ids) {
  5785. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  5786. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5787. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5788. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5789. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5790. }
  5791. $.modalOpen({
  5792. id: "FormAddItemLot",
  5793. title: "委外领料退料条码生成",
  5794. url: "/XJYWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5795. width: "550px",
  5796. height: "1000px",
  5797. callBack: function (iframeId) {
  5798. top.frames[iframeId].submitForm();
  5799. }
  5800. });
  5801. }
  5802. else if (Type == '15') {
  5803. for (var i in ids) {
  5804. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  5805. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5806. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5807. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5808. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5809. }
  5810. $.modalOpen({
  5811. id: "FormAddItemLot",
  5812. title: "委外材料出库退料生成条码",
  5813. url: "/XJYWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5814. width: "550px",
  5815. height: "1000px",
  5816. callBack: function (iframeId) {
  5817. top.frames[iframeId].submitForm();
  5818. }
  5819. });
  5820. }
  5821. else if (Type == '16') {
  5822. for (var i in ids) {
  5823. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  5824. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5825. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5826. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5827. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5828. }
  5829. $.modalOpen({
  5830. id: "FormAddItemLot",
  5831. title: "返工工单生成条码",
  5832. url: "/XJYWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5833. width: "550px",
  5834. height: "1000px",
  5835. callBack: function (iframeId) {
  5836. top.frames[iframeId].submitForm();
  5837. }
  5838. });
  5839. }
  5840. else if (Type == '18') {
  5841. for (var i in ids) {
  5842. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  5843. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5844. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  5845. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5846. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5847. }
  5848. $.modalOpen({
  5849. id: "FormAddItemLot",
  5850. title: "副产品生成条码",
  5851. url: "/XJYWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5852. width: "550px",
  5853. height: "1000px",
  5854. callBack: function (iframeId) {
  5855. top.frames[iframeId].submitForm();
  5856. }
  5857. });
  5858. }
  5859. else if (Type == '20') {
  5860. for (var i in ids) {
  5861. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5862. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5863. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5864. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5865. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5866. }
  5867. $.modalOpen({
  5868. id: "FormAddItemLot",
  5869. title: "两步调入生成条码",
  5870. url: "/XJYWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5871. width: "550px",
  5872. height: "1000px",
  5873. callBack: function (iframeId) {
  5874. top.frames[iframeId].submitForm();
  5875. }
  5876. });
  5877. }
  5878. else if (Type == '22') {
  5879. for (var i in ids) {
  5880. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5881. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5882. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5883. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5884. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5885. }
  5886. console.log($(event.target).attr('id'));
  5887. if ($(event.target).attr('id') == 'NF-CreateNew')
  5888. {
  5889. $.modalOpen({
  5890. id: "FormAddItemLot",
  5891. title: "采购入库生成条码",
  5892. url: "/XJYWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5893. width: "550px",
  5894. height: "1000px",
  5895. callBack: function (iframeId) {
  5896. top.frames[iframeId].submitForm();
  5897. }
  5898. });
  5899. }
  5900. else {
  5901. $.modalOpen({
  5902. id: "FormAddItemLot",
  5903. title: "采购入库生成条码",
  5904. url: "/XJYWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5905. width: "550px",
  5906. height: "1000px",
  5907. callBack: function (iframeId) {
  5908. top.frames[iframeId].submitForm();
  5909. }
  5910. });
  5911. }
  5912. }
  5913. else if (Type == '23') {
  5914. for (var i in ids) {
  5915. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5916. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5917. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5918. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5919. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5920. }
  5921. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5922. $.modalOpen({
  5923. id: "FormAddItemLot",
  5924. title: "委外采购入库生成条码",
  5925. url: "/XJYWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5926. width: "550px",
  5927. height: "1000px",
  5928. callBack: function (iframeId) {
  5929. top.frames[iframeId].submitForm();
  5930. }
  5931. });
  5932. }
  5933. else {
  5934. $.modalOpen({
  5935. id: "FormAddItemLot",
  5936. title: "委外采购入库生成条码",
  5937. url: "/XJYWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5938. width: "550px",
  5939. height: "1000px",
  5940. callBack: function (iframeId) {
  5941. top.frames[iframeId].submitForm();
  5942. }
  5943. });
  5944. }
  5945. }
  5946. else if (Type == '24') {
  5947. for (var i in ids) {
  5948. SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  5949. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5950. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5951. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5952. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5953. }
  5954. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5955. $.modalOpen({
  5956. id: "FormAddItemLot",
  5957. title: "红字销售出库单生成条码",
  5958. url: "/XJYWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5959. width: "550px",
  5960. height: "1000px",
  5961. callBack: function (iframeId) {
  5962. top.frames[iframeId].submitForm();
  5963. }
  5964. });
  5965. }
  5966. else {
  5967. $.modalOpen({
  5968. id: "FormAddItemLot",
  5969. title: "红字销售出库单生成条码",
  5970. url: "/XJYWMS/WMSCreateItemLot/FromPN?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5971. width: "550px",
  5972. height: "1000px",
  5973. callBack: function (iframeId) {
  5974. top.frames[iframeId].submitForm();
  5975. }
  5976. });
  5977. }
  5978. }
  5979. else if (Type == '201') {
  5980. for (var i in ids) {
  5981. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5982. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5983. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5984. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5985. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5986. }
  5987. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5988. $.modalOpen({
  5989. id: "FormAddItemLot",
  5990. title: "调拨申请单生成条码",
  5991. url: "/XJYWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5992. width: "550px",
  5993. height: "1000px",
  5994. callBack: function (iframeId) {
  5995. top.frames[iframeId].submitForm();
  5996. }
  5997. });
  5998. }
  5999. else {
  6000. $.modalOpen({
  6001. id: "FormAddItemLot",
  6002. title: "调拨申请单生成条码",
  6003. url: "/XJYWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6004. width: "550px",
  6005. height: "1000px",
  6006. callBack: function (iframeId) {
  6007. top.frames[iframeId].submitForm();
  6008. }
  6009. });
  6010. }
  6011. }
  6012. else if (Type == '202') {
  6013. for (var i in ids) {
  6014. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6015. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6016. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6017. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6018. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6019. }
  6020. $.modalOpen({
  6021. id: "FormAddItemLot",
  6022. title: "调拨申请单生成条码",
  6023. url: "/XJYWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6024. width: "550px",
  6025. height: "1000px",
  6026. callBack: function (iframeId) {
  6027. top.frames[iframeId].submitForm();
  6028. }
  6029. });
  6030. }
  6031. else if (Type == '203') {
  6032. for (var i in ids) {
  6033. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6034. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6035. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6036. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6037. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6038. }
  6039. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6040. $.modalOpen({
  6041. id: "FormAddItemLot",
  6042. title: "调拨申请单生成条码",
  6043. url: "/XJYWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 203 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6044. width: "550px",
  6045. height: "1000px",
  6046. callBack: function (iframeId) {
  6047. top.frames[iframeId].submitForm();
  6048. }
  6049. });
  6050. }
  6051. else {
  6052. $.modalOpen({
  6053. id: "FormAddItemLot",
  6054. title: "调拨申请单生成条码",
  6055. url: "/XJYWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 203 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6056. width: "550px",
  6057. height: "1000px",
  6058. callBack: function (iframeId) {
  6059. top.frames[iframeId].submitForm();
  6060. }
  6061. });
  6062. }
  6063. }
  6064. }
  6065. function btnCreatePN() {
  6066. debugger;
  6067. var PoStatus;
  6068. var jsonData = '';
  6069. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  6070. if (ids.length != 1) {
  6071. $.modalAlertNew("WMS00100");
  6072. return;
  6073. }
  6074. var POCode = "";
  6075. var PORow = "";
  6076. if (Type == '1') {
  6077. for (var i in ids) {
  6078. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6079. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6080. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6081. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6082. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6083. }
  6084. $.modalOpen({
  6085. id: "FormAddItemLot",
  6086. title: "生产退料条码生成",
  6087. url: "/XJYWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6088. width: "550px",
  6089. height: "1000px",
  6090. callBack: function (iframeId) {
  6091. top.frames[iframeId].submitForm();
  6092. }
  6093. });
  6094. } else if (Type == '2') {
  6095. for (var i in ids) {
  6096. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6097. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6098. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6099. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6100. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6101. }
  6102. $.modalOpen({
  6103. id: "FormAddItemLot",
  6104. title: "委外退料条码生成",
  6105. url: "/XJYWMS/WMSCreateItemLot/FromPN?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6106. width: "550px",
  6107. height: "1000px",
  6108. callBack: function (iframeId) {
  6109. top.frames[iframeId].submitForm();
  6110. }
  6111. });
  6112. } else if (Type == '3') {
  6113. for (var i in ids) {
  6114. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  6115. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6116. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6117. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6118. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6119. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6120. }
  6121. $.modalOpen({
  6122. id: "FormAddItemLot",
  6123. title: "成品条码产生",
  6124. url: "/XJYWMS/WMSCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  6125. width: "550px",
  6126. height: "1000px",
  6127. callBack: function (iframeId) {
  6128. top.frames[iframeId].submitForm();
  6129. }
  6130. });
  6131. } else if (Type == '4') {
  6132. for (var i in ids) {
  6133. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  6134. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6135. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6136. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6137. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6138. }
  6139. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6140. $.modalOpen({
  6141. id: "FormAddItemLot",
  6142. title: "销售退货条码产生",
  6143. url: "/XJYWMS/WMSCreateItemLot/FromNew?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6144. width: "550px",
  6145. height: "1000px",
  6146. callBack: function (iframeId) {
  6147. top.frames[iframeId].submitForm();
  6148. }
  6149. });
  6150. }
  6151. else {
  6152. $.modalOpen({
  6153. id: "FormAddItemLot",
  6154. title: "销售退货条码产生",
  6155. url: "/XJYWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6156. width: "550px",
  6157. height: "1000px",
  6158. callBack: function (iframeId) {
  6159. top.frames[iframeId].submitForm();
  6160. }
  6161. });
  6162. }
  6163. } else if (Type == '5') {
  6164. for (var i in ids) {
  6165. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  6166. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6167. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6168. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6169. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6170. }
  6171. $.modalOpen({
  6172. id: "FormAddItemLot",
  6173. title: "其他入库条码产生",
  6174. url: "/XJYWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6175. width: "550px",
  6176. height: "1000px",
  6177. callBack: function (iframeId) {
  6178. top.frames[iframeId].submitForm();
  6179. }
  6180. });
  6181. } else if (Type == '6') {
  6182. for (var i in ids) {
  6183. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  6184. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6185. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6186. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6187. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6188. }
  6189. $.modalOpen({
  6190. id: "FormAddItemLot",
  6191. title: "归还单条码产生",
  6192. url: "/XJYWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6193. width: "550px",
  6194. height: "1000px",
  6195. callBack: function (iframeId) {
  6196. top.frames[iframeId].submitForm();
  6197. }
  6198. });
  6199. } else if (Type == '7') {
  6200. for (var i in ids) {
  6201. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  6202. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6203. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6204. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6205. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6206. }
  6207. $.modalOpen({
  6208. id: "FormAddItemLot",
  6209. title: "审核到货单生成条码",
  6210. url: "/XJYWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6211. width: "550px",
  6212. height: "1000px",
  6213. callBack: function (iframeId) {
  6214. top.frames[iframeId].submitForm();
  6215. }
  6216. });
  6217. } else if (Type == '8') {
  6218. for (var i in ids) {
  6219. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  6220. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6221. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  6222. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6223. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6224. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6225. }
  6226. $.modalOpen({
  6227. id: "FormAddItemLot",
  6228. title: "审核委外到货单生成条码",
  6229. url: "/XJYWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(),
  6230. width: "550px",
  6231. height: "1000px",
  6232. callBack: function (iframeId) {
  6233. top.frames[iframeId].submitForm();
  6234. }
  6235. });
  6236. } else if (Type == '9') {
  6237. for (var i in ids) {
  6238. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6239. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6240. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6241. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6242. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6243. }
  6244. $.modalOpen({
  6245. id: "FormAddItemLot",
  6246. title: "开立成品入库单生成条码",
  6247. url: "/XJYWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6248. width: "550px",
  6249. height: "1000px",
  6250. callBack: function (iframeId) {
  6251. top.frames[iframeId].submitForm();
  6252. }
  6253. });
  6254. } else if (Type == '10') {
  6255. for (var i in ids) {
  6256. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  6257. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6258. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6259. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6260. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6261. }
  6262. $.modalOpen({
  6263. id: "FormAddItemLot",
  6264. title: "审核拒收单生成条码",
  6265. url: "/XJYWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6266. width: "550px",
  6267. height: "1000px",
  6268. callBack: function (iframeId) {
  6269. top.frames[iframeId].submitForm();
  6270. }
  6271. });
  6272. } else if (Type == '11') {
  6273. for (var i in ids) {
  6274. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  6275. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  6276. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6277. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6278. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6279. }
  6280. $.modalOpen({
  6281. id: "FormAddItemLot",
  6282. title: "审核委外拒收单生成条码",
  6283. url: "/XJYWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6284. width: "550px",
  6285. height: "1000px",
  6286. callBack: function (iframeId) {
  6287. top.frames[iframeId].submitForm();
  6288. }
  6289. });
  6290. } else if (Type == '12') {
  6291. for (var i in ids) {
  6292. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6293. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6294. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6295. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6296. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6297. }
  6298. $.modalOpen({
  6299. id: "FormAddItemLot",
  6300. title: "审核领料申请退料生成条码",
  6301. url: "/XJYWMS/WMSCreateItemLot/FromPN?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6302. width: "550px",
  6303. height: "1000px",
  6304. callBack: function (iframeId) {
  6305. top.frames[iframeId].submitForm();
  6306. }
  6307. });
  6308. } else if (Type == '13') {
  6309. for (var i in ids) {
  6310. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6311. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6312. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6313. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6314. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6315. }
  6316. $.modalOpen({
  6317. id: "FormAddItemLot",
  6318. title: "材料出库退料生成条码",
  6319. url: "/XJYWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6320. width: "550px",
  6321. height: "1000px",
  6322. callBack: function (iframeId) {
  6323. top.frames[iframeId].submitForm();
  6324. }
  6325. });
  6326. } else if (Type == '14') {
  6327. for (var i in ids) {
  6328. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6329. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6330. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6331. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6332. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6333. }
  6334. $.modalOpen({
  6335. id: "FormAddItemLot",
  6336. title: "委外领料退料条码生成",
  6337. url: "/XJYWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6338. width: "550px",
  6339. height: "1000px",
  6340. callBack: function (iframeId) {
  6341. top.frames[iframeId].submitForm();
  6342. }
  6343. });
  6344. }
  6345. else if (Type == '15') {
  6346. for (var i in ids) {
  6347. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6348. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6349. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6350. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6351. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6352. }
  6353. $.modalOpen({
  6354. id: "FormAddItemLot",
  6355. title: "委外材料出库退料生成条码",
  6356. url: "/XJYWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6357. width: "550px",
  6358. height: "1000px",
  6359. callBack: function (iframeId) {
  6360. top.frames[iframeId].submitForm();
  6361. }
  6362. });
  6363. }
  6364. else if (Type == '16') {
  6365. for (var i in ids) {
  6366. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6367. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6368. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6369. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6370. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6371. }
  6372. $.modalOpen({
  6373. id: "FormAddItemLot",
  6374. title: "返工工单生成条码",
  6375. url: "/XJYWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6376. width: "550px",
  6377. height: "1000px",
  6378. callBack: function (iframeId) {
  6379. top.frames[iframeId].submitForm();
  6380. }
  6381. });
  6382. }
  6383. else if (Type == '18') {
  6384. for (var i in ids) {
  6385. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6386. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6387. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  6388. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6389. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6390. }
  6391. $.modalOpen({
  6392. id: "FormAddItemLot",
  6393. title: "副产品生成条码",
  6394. url: "/XJYWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6395. width: "550px",
  6396. height: "1000px",
  6397. callBack: function (iframeId) {
  6398. top.frames[iframeId].submitForm();
  6399. }
  6400. });
  6401. }
  6402. else if (Type == '20') {
  6403. for (var i in ids) {
  6404. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6405. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6406. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6407. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6408. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6409. }
  6410. $.modalOpen({
  6411. id: "FormAddItemLot",
  6412. title: "两步调入生成条码",
  6413. url: "/XJYWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6414. width: "550px",
  6415. height: "1000px",
  6416. callBack: function (iframeId) {
  6417. top.frames[iframeId].submitForm();
  6418. }
  6419. });
  6420. }
  6421. else if (Type == '22') {
  6422. for (var i in ids) {
  6423. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6424. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6425. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6426. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6427. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6428. }
  6429. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6430. $.modalOpen({
  6431. id: "FormAddItemLot",
  6432. title: "采购入库生成条码",
  6433. url: "/XJYWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6434. width: "550px",
  6435. height: "1000px",
  6436. callBack: function (iframeId) {
  6437. top.frames[iframeId].submitForm();
  6438. }
  6439. });
  6440. }
  6441. else {
  6442. $.modalOpen({
  6443. id: "FormAddItemLot",
  6444. title: "采购入库生成条码",
  6445. url: "/XJYWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6446. width: "550px",
  6447. height: "1000px",
  6448. callBack: function (iframeId) {
  6449. top.frames[iframeId].submitForm();
  6450. }
  6451. });
  6452. }
  6453. }
  6454. else if (Type == '23') {
  6455. for (var i in ids) {
  6456. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6457. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6458. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6459. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6460. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6461. }
  6462. $.modalOpen({
  6463. id: "FormAddItemLot",
  6464. title: "委外采购入库生成条码",
  6465. url: "/XJYWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6466. width: "550px",
  6467. height: "1000px",
  6468. callBack: function (iframeId) {
  6469. top.frames[iframeId].submitForm();
  6470. }
  6471. });
  6472. }
  6473. else if (Type == '24') {
  6474. for (var i in ids) {
  6475. SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  6476. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6477. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6478. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6479. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6480. }
  6481. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6482. $.modalOpen({
  6483. id: "FormAddItemLot",
  6484. title: "红字销售出库单生成条码",
  6485. url: "/XJYWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6486. width: "550px",
  6487. height: "1000px",
  6488. callBack: function (iframeId) {
  6489. top.frames[iframeId].submitForm();
  6490. }
  6491. });
  6492. }
  6493. else {
  6494. $.modalOpen({
  6495. id: "FormAddItemLot",
  6496. title: "红字销售出库单生成条码",
  6497. url: "/XJYWMS/WMSCreateItemLot/From?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6498. width: "550px",
  6499. height: "1000px",
  6500. callBack: function (iframeId) {
  6501. top.frames[iframeId].submitForm();
  6502. }
  6503. });
  6504. }
  6505. }
  6506. else if (Type == '201') {
  6507. for (var i in ids) {
  6508. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6509. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6510. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6511. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6512. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6513. }
  6514. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6515. $.modalOpen({
  6516. id: "FormAddItemLot",
  6517. title: "调拨申请单生成条码",
  6518. url: "/XJYWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6519. width: "550px",
  6520. height: "1000px",
  6521. callBack: function (iframeId) {
  6522. top.frames[iframeId].submitForm();
  6523. }
  6524. });
  6525. }
  6526. else {
  6527. $.modalOpen({
  6528. id: "FormAddItemLot",
  6529. title: "调拨申请单生成条码",
  6530. url: "/XJYWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6531. width: "550px",
  6532. height: "1000px",
  6533. callBack: function (iframeId) {
  6534. top.frames[iframeId].submitForm();
  6535. }
  6536. });
  6537. }
  6538. }
  6539. else if (Type == '202') {
  6540. for (var i in ids) {
  6541. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6542. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6543. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6544. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6545. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6546. }
  6547. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6548. $.modalOpen({
  6549. id: "FormAddItemLot",
  6550. title: "调拨申请单生成条码",
  6551. url: "/XJYWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6552. width: "550px",
  6553. height: "1000px",
  6554. callBack: function (iframeId) {
  6555. top.frames[iframeId].submitForm();
  6556. }
  6557. });
  6558. }
  6559. else {
  6560. $.modalOpen({
  6561. id: "FormAddItemLot",
  6562. title: "调拨申请单生成条码",
  6563. url: "/XJYWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6564. width: "550px",
  6565. height: "1000px",
  6566. callBack: function (iframeId) {
  6567. top.frames[iframeId].submitForm();
  6568. }
  6569. });
  6570. }
  6571. }
  6572. }
  6573. function btnCreateHG() {
  6574. debugger;
  6575. var PoStatus;
  6576. var jsonData = '';
  6577. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  6578. if (ids.length != 1) {
  6579. $.modalAlertNew("WMS00100");
  6580. return;
  6581. }
  6582. var POCode = "";
  6583. var PORow = "";
  6584. if (Type == '1') {
  6585. for (var i in ids) {
  6586. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6587. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6588. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6589. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6590. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6591. }
  6592. $.modalOpen({
  6593. id: "FormAddItemLot",
  6594. title: "生产退料条码生成",
  6595. url: "/XJYWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6596. width: "550px",
  6597. height: "1000px",
  6598. callBack: function (iframeId) {
  6599. top.frames[iframeId].submitForm();
  6600. }
  6601. });
  6602. } else if (Type == '2') {
  6603. for (var i in ids) {
  6604. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6605. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6606. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6607. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6608. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6609. }
  6610. $.modalOpen({
  6611. id: "FormAddItemLot",
  6612. title: "委外退料条码生成",
  6613. url: "/XJYWMS/WMSCreateItemLot/From?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6614. width: "550px",
  6615. height: "1000px",
  6616. callBack: function (iframeId) {
  6617. top.frames[iframeId].submitForm();
  6618. }
  6619. });
  6620. } else if (Type == '3') {
  6621. for (var i in ids) {
  6622. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  6623. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6624. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6625. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6626. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6627. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6628. }
  6629. $.modalOpen({
  6630. id: "FormAddItemLot",
  6631. title: "成品条码产生",
  6632. url: "/XJYWMS/WMSCreateItemLot/FromHG?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  6633. width: "550px",
  6634. height: "1000px",
  6635. callBack: function (iframeId) {
  6636. top.frames[iframeId].submitForm();
  6637. }
  6638. });
  6639. } else if (Type == '4') {
  6640. for (var i in ids) {
  6641. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  6642. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6643. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6644. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6645. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6646. }
  6647. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6648. $.modalOpen({
  6649. id: "FormAddItemLot",
  6650. title: "销售退货条码产生",
  6651. url: "/XJYWMS/WMSCreateItemLot/FromNew?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6652. width: "550px",
  6653. height: "1000px",
  6654. callBack: function (iframeId) {
  6655. top.frames[iframeId].submitForm();
  6656. }
  6657. });
  6658. }
  6659. else {
  6660. $.modalOpen({
  6661. id: "FormAddItemLot",
  6662. title: "销售退货条码产生",
  6663. url: "/XJYWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6664. width: "550px",
  6665. height: "1000px",
  6666. callBack: function (iframeId) {
  6667. top.frames[iframeId].submitForm();
  6668. }
  6669. });
  6670. }
  6671. } else if (Type == '5') {
  6672. for (var i in ids) {
  6673. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  6674. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6675. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6676. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6677. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6678. }
  6679. $.modalOpen({
  6680. id: "FormAddItemLot",
  6681. title: "其他入库条码产生",
  6682. url: "/XJYWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6683. width: "550px",
  6684. height: "1000px",
  6685. callBack: function (iframeId) {
  6686. top.frames[iframeId].submitForm();
  6687. }
  6688. });
  6689. } else if (Type == '6') {
  6690. for (var i in ids) {
  6691. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  6692. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6693. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6694. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6695. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6696. }
  6697. $.modalOpen({
  6698. id: "FormAddItemLot",
  6699. title: "归还单条码产生",
  6700. url: "/XJYWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6701. width: "550px",
  6702. height: "1000px",
  6703. callBack: function (iframeId) {
  6704. top.frames[iframeId].submitForm();
  6705. }
  6706. });
  6707. } else if (Type == '7') {
  6708. for (var i in ids) {
  6709. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  6710. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6711. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6712. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6713. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6714. }
  6715. $.modalOpen({
  6716. id: "FormAddItemLot",
  6717. title: "审核到货单生成条码",
  6718. url: "/XJYWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6719. width: "550px",
  6720. height: "1000px",
  6721. callBack: function (iframeId) {
  6722. top.frames[iframeId].submitForm();
  6723. }
  6724. });
  6725. } else if (Type == '8') {
  6726. for (var i in ids) {
  6727. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  6728. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6729. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  6730. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6731. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6732. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6733. }
  6734. $.modalOpen({
  6735. id: "FormAddItemLot",
  6736. title: "审核委外到货单生成条码",
  6737. url: "/XJYWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(),
  6738. width: "550px",
  6739. height: "1000px",
  6740. callBack: function (iframeId) {
  6741. top.frames[iframeId].submitForm();
  6742. }
  6743. });
  6744. } else if (Type == '9') {
  6745. for (var i in ids) {
  6746. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6747. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6748. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6749. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6750. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6751. }
  6752. $.modalOpen({
  6753. id: "FormAddItemLot",
  6754. title: "开立成品入库单生成条码",
  6755. url: "/XJYWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6756. width: "550px",
  6757. height: "1000px",
  6758. callBack: function (iframeId) {
  6759. top.frames[iframeId].submitForm();
  6760. }
  6761. });
  6762. } else if (Type == '10') {
  6763. for (var i in ids) {
  6764. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  6765. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6766. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6767. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6768. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6769. }
  6770. $.modalOpen({
  6771. id: "FormAddItemLot",
  6772. title: "审核拒收单生成条码",
  6773. url: "/XJYWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6774. width: "550px",
  6775. height: "1000px",
  6776. callBack: function (iframeId) {
  6777. top.frames[iframeId].submitForm();
  6778. }
  6779. });
  6780. } else if (Type == '11') {
  6781. for (var i in ids) {
  6782. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  6783. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  6784. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6785. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6786. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6787. }
  6788. $.modalOpen({
  6789. id: "FormAddItemLot",
  6790. title: "审核委外拒收单生成条码",
  6791. url: "/XJYWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6792. width: "550px",
  6793. height: "1000px",
  6794. callBack: function (iframeId) {
  6795. top.frames[iframeId].submitForm();
  6796. }
  6797. });
  6798. } else if (Type == '12') {
  6799. for (var i in ids) {
  6800. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6801. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6802. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6803. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6804. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6805. }
  6806. $.modalOpen({
  6807. id: "FormAddItemLot",
  6808. title: "审核领料申请退料生成条码",
  6809. url: "/XJYWMS/WMSCreateItemLot/FromPN?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6810. width: "550px",
  6811. height: "1000px",
  6812. callBack: function (iframeId) {
  6813. top.frames[iframeId].submitForm();
  6814. }
  6815. });
  6816. } else if (Type == '13') {
  6817. for (var i in ids) {
  6818. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6819. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6820. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6821. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6822. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6823. }
  6824. $.modalOpen({
  6825. id: "FormAddItemLot",
  6826. title: "材料出库退料生成条码",
  6827. url: "/XJYWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6828. width: "550px",
  6829. height: "1000px",
  6830. callBack: function (iframeId) {
  6831. top.frames[iframeId].submitForm();
  6832. }
  6833. });
  6834. } else if (Type == '14') {
  6835. for (var i in ids) {
  6836. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6837. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6838. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6839. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6840. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6841. }
  6842. $.modalOpen({
  6843. id: "FormAddItemLot",
  6844. title: "委外领料退料条码生成",
  6845. url: "/XJYWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6846. width: "550px",
  6847. height: "1000px",
  6848. callBack: function (iframeId) {
  6849. top.frames[iframeId].submitForm();
  6850. }
  6851. });
  6852. }
  6853. else if (Type == '15') {
  6854. for (var i in ids) {
  6855. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6856. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6857. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6858. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6859. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6860. }
  6861. $.modalOpen({
  6862. id: "FormAddItemLot",
  6863. title: "委外材料出库退料生成条码",
  6864. url: "/XJYWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6865. width: "550px",
  6866. height: "1000px",
  6867. callBack: function (iframeId) {
  6868. top.frames[iframeId].submitForm();
  6869. }
  6870. });
  6871. }
  6872. else if (Type == '16') {
  6873. for (var i in ids) {
  6874. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6875. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6876. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6877. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6878. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6879. }
  6880. $.modalOpen({
  6881. id: "FormAddItemLot",
  6882. title: "返工工单生成条码",
  6883. url: "/XJYWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6884. width: "550px",
  6885. height: "1000px",
  6886. callBack: function (iframeId) {
  6887. top.frames[iframeId].submitForm();
  6888. }
  6889. });
  6890. }
  6891. else if (Type == '18') {
  6892. for (var i in ids) {
  6893. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6894. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6895. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  6896. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6897. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6898. }
  6899. $.modalOpen({
  6900. id: "FormAddItemLot",
  6901. title: "副产品生成条码",
  6902. url: "/XJYWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6903. width: "550px",
  6904. height: "1000px",
  6905. callBack: function (iframeId) {
  6906. top.frames[iframeId].submitForm();
  6907. }
  6908. });
  6909. }
  6910. else if (Type == '20') {
  6911. for (var i in ids) {
  6912. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6913. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6914. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6915. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6916. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6917. }
  6918. $.modalOpen({
  6919. id: "FormAddItemLot",
  6920. title: "两步调入生成条码",
  6921. url: "/XJYWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6922. width: "550px",
  6923. height: "1000px",
  6924. callBack: function (iframeId) {
  6925. top.frames[iframeId].submitForm();
  6926. }
  6927. });
  6928. }
  6929. else if (Type == '22') {
  6930. for (var i in ids) {
  6931. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6932. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6933. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6934. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6935. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6936. }
  6937. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6938. $.modalOpen({
  6939. id: "FormAddItemLot",
  6940. title: "采购入库生成条码",
  6941. url: "/XJYWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6942. width: "550px",
  6943. height: "1000px",
  6944. callBack: function (iframeId) {
  6945. top.frames[iframeId].submitForm();
  6946. }
  6947. });
  6948. }
  6949. else {
  6950. $.modalOpen({
  6951. id: "FormAddItemLot",
  6952. title: "采购入库生成条码",
  6953. url: "/XJYWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6954. width: "550px",
  6955. height: "1000px",
  6956. callBack: function (iframeId) {
  6957. top.frames[iframeId].submitForm();
  6958. }
  6959. });
  6960. }
  6961. }
  6962. else if (Type == '23') {
  6963. for (var i in ids) {
  6964. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6965. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6966. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6967. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6968. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6969. }
  6970. $.modalOpen({
  6971. id: "FormAddItemLot",
  6972. title: "委外采购入库生成条码",
  6973. url: "/XJYWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6974. width: "550px",
  6975. height: "1000px",
  6976. callBack: function (iframeId) {
  6977. top.frames[iframeId].submitForm();
  6978. }
  6979. });
  6980. }
  6981. else if (Type == '24') {
  6982. for (var i in ids) {
  6983. SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  6984. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6985. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6986. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6987. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6988. }
  6989. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6990. $.modalOpen({
  6991. id: "FormAddItemLot",
  6992. title: "红字销售出库单生成条码",
  6993. url: "/XJYWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6994. width: "550px",
  6995. height: "1000px",
  6996. callBack: function (iframeId) {
  6997. top.frames[iframeId].submitForm();
  6998. }
  6999. });
  7000. }
  7001. else {
  7002. $.modalOpen({
  7003. id: "FormAddItemLot",
  7004. title: "红字销售出库单生成条码",
  7005. url: "/XJYWMS/WMSCreateItemLot/From?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  7006. width: "550px",
  7007. height: "1000px",
  7008. callBack: function (iframeId) {
  7009. top.frames[iframeId].submitForm();
  7010. }
  7011. });
  7012. }
  7013. }
  7014. else if (Type == '201') {
  7015. for (var i in ids) {
  7016. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  7017. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  7018. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  7019. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  7020. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  7021. }
  7022. if ($(event.target).attr('id') == 'NF-CreateNew') {
  7023. $.modalOpen({
  7024. id: "FormAddItemLot",
  7025. title: "调拨申请单生成条码",
  7026. url: "/XJYWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  7027. width: "550px",
  7028. height: "1000px",
  7029. callBack: function (iframeId) {
  7030. top.frames[iframeId].submitForm();
  7031. }
  7032. });
  7033. }
  7034. else {
  7035. $.modalOpen({
  7036. id: "FormAddItemLot",
  7037. title: "调拨申请单生成条码",
  7038. url: "/XJYWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  7039. width: "550px",
  7040. height: "1000px",
  7041. callBack: function (iframeId) {
  7042. top.frames[iframeId].submitForm();
  7043. }
  7044. });
  7045. }
  7046. }
  7047. else if (Type == '202') {
  7048. for (var i in ids) {
  7049. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  7050. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  7051. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  7052. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  7053. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  7054. }
  7055. if ($(event.target).attr('id') == 'NF-CreateNew') {
  7056. $.modalOpen({
  7057. id: "FormAddItemLot",
  7058. title: "调拨申请单生成条码",
  7059. url: "/XJYWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  7060. width: "550px",
  7061. height: "1000px",
  7062. callBack: function (iframeId) {
  7063. top.frames[iframeId].submitForm();
  7064. }
  7065. });
  7066. }
  7067. else {
  7068. $.modalOpen({
  7069. id: "FormAddItemLot",
  7070. title: "调拨申请单生成条码",
  7071. url: "/XJYWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  7072. width: "550px",
  7073. height: "1000px",
  7074. callBack: function (iframeId) {
  7075. top.frames[iframeId].submitForm();
  7076. }
  7077. });
  7078. }
  7079. }
  7080. }
  7081. function btnStockIN() {
  7082. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  7083. if (ids.length != 1) {
  7084. $.modalAlertNew("WMS00100");
  7085. return;
  7086. }
  7087. if (Type == "23") {
  7088. for (var i in ids) {
  7089. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  7090. }
  7091. $.modalConfirm("是否确定使用一键入库?", function (r) {
  7092. if (r) {
  7093. $.submitForm({
  7094. url: "/XJYWMS/WMSCreateItemLot/LotStockINWW",
  7095. param: {
  7096. ID: ID
  7097. },
  7098. success: function () {
  7099. $.currentWindow().$("#gridList").trigger("reloadGrid");
  7100. }
  7101. })
  7102. //$.submitForm({
  7103. // url: "/XJYWMS/WMSCreateItemLot/LotStockINWW?ID=" + ID,
  7104. // success: function () {
  7105. // $.currentWindow().$("#gridList").trigger("reloadGrid");
  7106. // }
  7107. //})
  7108. }
  7109. });
  7110. }
  7111. }
  7112. function fullscreen() {
  7113. var docElm = document.documentElement;
  7114. if (docElm.requestFullscreen) {
  7115. docElm.requestFullscreen();
  7116. } else if (docElm.mozRequestFullScreen) {
  7117. docElm.mozRequestFullScreen();
  7118. } else if (docElm.webkitRequestFullScreen) {
  7119. docElm.webkitRequestFullScreen();
  7120. } else if (docElm.msRequestFullscreen) {
  7121. docElm.msRequestFullscreen();
  7122. }
  7123. $(window).bind('resize', function () {
  7124. $("#gridList").setGridWidth($(window).width());
  7125. }).trigger('resize');
  7126. $(window).bind('resize', function () {
  7127. $("#gridList").setGridHeight($(window).height());
  7128. }).trigger('resize');
  7129. }
  7130. function btnPrint() {
  7131. debugger;
  7132. if (mold == '')
  7133. {
  7134. if (Type == '1') { mold = '00001'; }//生产退料生成条码
  7135. if (Type == '2') { mold = '00002'; }//委外退料生成条码
  7136. if (Type == '3') { mold = '00003'; }//工单成品生成条码
  7137. if (Type == '4') { mold = '00004'; }//销售退货生成条码
  7138. if (Type == '5') { mold = '00005'; }//其他入库生成条码
  7139. if (Type == '6') { mold = '00006'; }//归还单生成条码
  7140. if (Type == '7') { mold = '00007'; }//普通到货单生成条码
  7141. if (Type == '8') { mold = '00008'; }//委外到货单生成条码
  7142. if (Type == '9') { mold = '00009'; }//成品入库单生成条码
  7143. if (Type == '10') { mold = '00010'; }//拒收单生成条码
  7144. if (Type == '11') { mold = '00011'; }//委外拒收单生成条码
  7145. if (Type == '12') { mold = '00012'; }//领料申请退料
  7146. if (Type == '13') { mold = '00013'; }//材料出库退料
  7147. if (Type == '14') { mold = '00014'; }//委外领料申请退料
  7148. if (Type == '15') { mold = '00015'; }//委外材料出库退料
  7149. if (Type == '16') { mold = '00016'; }//返工工单
  7150. if (Type == '17') { mold = 'BHG00001'; }//不合格条码入库
  7151. if (Type == '18') { mold = 'FCP00001'; }//副产品生成条码
  7152. if (Type == '22') { mold = '00018'; }//采购入库生成条码
  7153. if (Type == '23') { mold = '00019'; }//委外采购入库生成条码
  7154. if (Type == '201') { mold = '00020'; }//委外采购入库生成条码
  7155. if (Type == '202') { mold = '00020'; }//委外采购入库生成条码
  7156. }
  7157. var objArr = '';
  7158. var arr = [];
  7159. var obj = $("#gridList").jqGrid("getRowData");
  7160. for (var i = 0; i < obj.length; i++) {
  7161. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  7162. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  7163. if (rowData != "undefined" && rowData != null && rowData.length != 0) {
  7164. for (var j = 0; j < rowData.length; j++) {
  7165. objArr += "'" + rowData[j] + "',";
  7166. }
  7167. }
  7168. }
  7169. objArr = objArr.slice(0, objArr.length - 1);
  7170. if (objArr == "") {
  7171. $.modalAlertNew("WMS00101");
  7172. return;
  7173. }
  7174. objArr = "" + objArr + "|";
  7175. arr.push(objArr);
  7176. $.modalOpen({
  7177. id: "PrintLot",
  7178. title: "打印",
  7179. url: "/WMS/Print/PrintViewByLot?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  7180. width: "550px",
  7181. height: "1000px",
  7182. callBack: function (iframeId) {
  7183. top.frames[iframeId].submitForm();
  7184. }
  7185. });
  7186. }
  7187. function btnBatchPrint() {
  7188. debugger;
  7189. if (mold == '')
  7190. {
  7191. if (Type == '7') { mold = '00056'; }//普通到货单生成条码
  7192. if (Type == '8') { mold = '00057'; }//委外到货单生成条码
  7193. }
  7194. var objArr = '';
  7195. var arr = [];
  7196. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  7197. if (ids.length == 0) {
  7198. $.modalAlertNew("WMS00100");
  7199. return;
  7200. }
  7201. var ID = '';
  7202. for (var i in ids) {
  7203. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  7204. objArr += "'" + ID + "',";
  7205. }
  7206. objArr = objArr.slice(0, objArr.length - 1);
  7207. objArr = "" + objArr + "|";
  7208. arr.push(objArr);
  7209. var xxx = "";
  7210. $.modalOpen({
  7211. id: "PrintLot",
  7212. title: "打印",
  7213. url: "/WMS/Print/PrintView?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  7214. width: "550px",
  7215. height: "1000px",
  7216. callBack: function (iframeId) {
  7217. top.frames[iframeId].submitForm();
  7218. }
  7219. });
  7220. }
  7221. function btn_ExportAll() {
  7222. debugger;
  7223. var objArr = '';
  7224. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7225. for (var i in ids) {
  7226. objArr += "'" + $("#gridList").jqGrid('getRowData', ids[i]).ID + "',";
  7227. }
  7228. if (objArr=="") {
  7229. $.modalAlert("请选择单据后导出!");
  7230. return;
  7231. }
  7232. var postData = "&Type=" + Type + "";
  7233. //postData += "&ID=" + ID
  7234. postData += "&ID=" + objArr;
  7235. $.download("/XJYWMS/WMSCreateItemLot/StatementExportAll" + "?" + Math.random(), postData, 'post');
  7236. }
  7237. //function Select_SelGDLX() {
  7238. // $("#SelGDLX").find("option").remove();
  7239. // var DeptName = $("#SelGDLX option:checked").text();
  7240. // $("#SelGDLX").append("<option value=''>--请选择--</option>");
  7241. // $.ajax({
  7242. // url: "/XJYWMS/WMSCreateItemLot/SelGDLX" + "?" + Math.random(),
  7243. // dataType: "json",
  7244. // async: false,
  7245. // success: function (data) {
  7246. // if (data != null && data.length > 0) {
  7247. // for (var i = 0; i < data.length; i++) {
  7248. // $("#SelGDLX").append("<option value='" + data[i].Code + "'>" + data[i].Name + "</option>");
  7249. // }
  7250. // }
  7251. // }
  7252. // });
  7253. // $("#SelGDLX option:checked").val('');
  7254. //}
  7255. function CheckParentMO() {
  7256. $.ajax({
  7257. url: "/XJYWMS/WMSCreateItemLot/CheckParentMO" + "?" + Math.random(),
  7258. dataType: "json",
  7259. async: false,
  7260. success: function (data) {
  7261. debugger;
  7262. if (data != null && data.length > 0) {
  7263. if (data[0].F_EnabledMark == true) {
  7264. $(".HideParentMOCode").css('display', 'table-cell');
  7265. NeedParentMO = '1';
  7266. }
  7267. }
  7268. }
  7269. });
  7270. }
  7271. function btnCreateLook() {
  7272. var MODetailID = '';
  7273. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7274. for (var i = 0; i < objList.length; i++) {
  7275. var rowId = objList[i];
  7276. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  7277. MODetailID = rowData.MODetailID;
  7278. }
  7279. $.modalOpenClean({
  7280. id: "FormMoPick",
  7281. title: "工单子件信息",
  7282. url: "/XJYWMS/WMSCreateItemLot/FormMoPick" + "?" + Math.random() + "&MODetailID=" + MODetailID,
  7283. width: "90%",
  7284. height: "90%",
  7285. callBack: function (iframeId) {
  7286. top.frames[iframeId].submitForm();
  7287. }
  7288. });
  7289. }
  7290. function btn_Import() {
  7291. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  7292. if (objList.length != 1) {
  7293. $.modalAlertNew("WMS00100");
  7294. return;
  7295. }
  7296. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7297. for (var i = 0; i < objList.length; i++) {
  7298. var rowId = objList[i];
  7299. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  7300. var Code = rowData.MOCode;
  7301. var Sequence = rowData.Sequence;
  7302. $.modalOpen({
  7303. id: "Upload",
  7304. title: "导入",
  7305. url: "/XJYWMS/WMSCreateItemLot/ImportLot?Code=" + Code + "&Sequence=" + Sequence + "&" + Math.random(),
  7306. width: "400px",
  7307. height: "200px",
  7308. btn: null,
  7309. });
  7310. }
  7311. }
  7312. function btnPrints() {
  7313. debugger;
  7314. // var mold = '';
  7315. if (mold == '') {
  7316. if (Type == '1') { mold = '00001'; }//生产退料生成条码
  7317. if (Type == '2') { mold = '00002'; }//委外退料生成条码
  7318. if (Type == '3') { mold = '00003'; }//工单成品生成条码
  7319. if (Type == '4') { mold = '00004'; }//销售退货生成条码
  7320. if (Type == '5') { mold = '00005'; }//其他入库生成条码
  7321. if (Type == '6') { mold = '00006'; }//归还单生成条码
  7322. if (Type == '7') { mold = '00007'; }//普通到货单生成条码
  7323. if (Type == '8') { mold = '00008'; }//委外到货单生成条码
  7324. if (Type == '9') { mold = '00009'; }//成品入库单生成条码
  7325. if (Type == '10') { mold = '00010'; }//拒收单生成条码
  7326. if (Type == '11') { mold = '00011'; }//委外拒收单生成条码
  7327. if (Type == '12') { mold = '00012'; }//领料申请退料
  7328. if (Type == '13') { mold = '00013'; }//材料出库退料
  7329. if (Type == '14') { mold = '00014'; }//委外领料申请退料
  7330. if (Type == '15') { mold = '00015'; }//委外材料出库退料
  7331. if (Type == '16') { mold = '00016'; }//返工工单
  7332. if (Type == '17') { mold = 'BHG00001'; }//不合格条码入库
  7333. if (Type == '18') { mold = 'FCP00001'; }//副产品生成条码
  7334. if (Type == '19') { mold = '00019'; }//委外收货单生成条码
  7335. }
  7336. var objArr = '';
  7337. var arr = [];
  7338. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7339. for (var i = 0; i < objList.length; i++) {
  7340. var rowId = objList[i];
  7341. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  7342. objArr += "'" + rowData.ID + "',";
  7343. }
  7344. objArr = objArr.slice(0, objArr.length - 1);
  7345. if (objArr == "") {
  7346. $.modalAlertNew("WMS00110");
  7347. return;
  7348. }
  7349. objArr = "" + objArr + "|";
  7350. arr.push(objArr);
  7351. $.modalOpen({
  7352. id: "PrintLot",
  7353. title: "打印",
  7354. url: "/WMS/Print/PrintViewByLot?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  7355. width: "550px",
  7356. height: "1000px",
  7357. callBack: function (iframeId) {
  7358. top.frames[iframeId].submitForm();
  7359. }
  7360. });
  7361. }
  7362. function btnInWareHouse() {
  7363. debugger;
  7364. var objArr = '';
  7365. var arr = [];
  7366. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7367. for (var i = 0; i < objList.length; i++) {
  7368. var rowId = objList[i];
  7369. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  7370. objArr += "'" + rowData.ID + "',";
  7371. }
  7372. objArr = objArr.slice(0, objArr.length - 1);
  7373. if (objArr == "") {
  7374. $.modalAlertNew("WMS00110");
  7375. return;
  7376. }
  7377. arr.push(objArr);
  7378. $.submitForm({
  7379. url: "/XJYWMS/WMSCreateItemLot/PostInWareHouse" ,
  7380. param: {
  7381. IDs: JSON.stringify(objArr)
  7382. },
  7383. success: function () {
  7384. $.currentWindow().$("#gridList").trigger("reloadGrid");
  7385. }
  7386. })
  7387. }
  7388. function btn_Rebind() {
  7389. var objArr = '';
  7390. var obj = $("#gridList").jqGrid("getRowData");
  7391. for (var i = 0; i < obj.length; i++) {
  7392. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  7393. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  7394. if (rowData != "undefined" && rowData != null && rowData.length != 0) {
  7395. for (var j = 0; j < rowData.length; j++) {
  7396. var rowDataZ = $SubGird.jqGrid('getRowData', rowData[j]);
  7397. objArr += "'" + rowDataZ.LotNo + "',";
  7398. }
  7399. objArr = objArr.slice(0, objArr.length - 1);
  7400. }
  7401. }
  7402. if (objArr == "") {
  7403. $.modalAlert("请选择条码信息后,进行重新绑定!");
  7404. return;
  7405. }
  7406. $.modalOpen({
  7407. id: "ICSLotRebind",
  7408. title: "条码重新绑定",
  7409. url: "/XJYWMS/WMSCreateItemLot/ICSLotRebind?LotNo=" + encodeURI(encodeURI(objArr)) + "&" + Math.random(),
  7410. width: "500px",
  7411. height: "350px",
  7412. callBack: function (iframeId) {
  7413. top.frames[iframeId].submitForm();
  7414. }
  7415. });
  7416. }
  7417. </script>
  7418. <iframe id="ifrm" src="" width="0" height="0"></iframe>
  7419. <script>
  7420. </script>
  7421. <div class="topPanel" style="height:149px;">
  7422. <div class="toolbar">
  7423. <div class="btn-group">
  7424. <a id="NF-ALLCreate" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnAllCreate()"><i class="fa fa-pencil-square-o"></i>一键生成</a>
  7425. <a id="NF-CreateNew" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnCreate()"><i class="fa fa-pencil-square-o"></i>生成条码(非规则)</a>
  7426. <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>
  7427. <a id="NF-StockIN" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnStockIN()"><i class="fa fa-pencil-square-o"></i>一键入库</a>
  7428. <a id="NF-CreatePN" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnCreatePN()"><i class="fa fa-pencil-square-o"></i>生成条码</a>
  7429. <a id="NF-CreateHG" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnCreateHG()"><i class="fa fa-pencil-square-o"></i>生成条码</a>
  7430. <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>
  7431. <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>
  7432. <a id="NF-BatchPrint" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnBatchPrint()"><i class="fa fa-pencil-square-o"></i>批量打印</a>
  7433. <a id="NF-btnInWareHouse" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnInWareHouse()"><i class="fa fa-pencil-square-o"></i>一键退库</a>
  7434. <a id="NF-Prints" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnPrints()"><i class="fa fa-pencil-square-o"></i>单据批量打印</a>
  7435. <a id="NF-ExportAll" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_ExportAll()"><i class="fa fa-pencil-square-o"></i>导出</a>
  7436. @*<a id="NF-ExportAll" authorize="yes" class="btn btn-default" onclick="btn_ExportAll()"><i class="fa fa-download"></i>导出</a>*@
  7437. <a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
  7438. </div>
  7439. <div class="btn-group" style="display:block;padding-left:2px;">
  7440. <a class="btn btn-primary" id="downPrintControl" href="~/PrintActivex.exe" style="display:none">点击下载打印组件</a>
  7441. <a id="NF-Import" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_Import()"><i class="fa fa-pencil-square-o"></i>导入</a>
  7442. <a id="NF-Rebind" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_Rebind()"><i class="fa fa-pencil-square-o"></i>重新绑定</a>
  7443. <a id="NF-Looks" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnCreateLook()"><i class="fa fa-pencil-square-o"></i>查看子件信息</a>
  7444. </div>
  7445. <script>$('.toolbar').authorizeButton()</script>
  7446. </div>
  7447. <div class="search">
  7448. <table>
  7449. <tr>
  7450. <td class="HideParentMOCode" style="text-align:right;"><label class="lglabel" for="txt_ParentMOCode">&nbsp;&nbsp;大生产订单</label>:</td>
  7451. <td class="HideParentMOCode">
  7452. <div class="input-group">
  7453. <input id="txt_ParentMOCode" type="text" class="form-control" style="width: 130px;">
  7454. </div>
  7455. </td>
  7456. <td class="POCodeShow" style="text-align:right;"><label class="lglabel " id="POCodeShowLable" for="txt_POCode">&nbsp;&nbsp;</label>:</td>
  7457. <td class="POCodeShow">
  7458. <div class="input-group">
  7459. <input id="txt_POCode" type="text" class="form-control" style="width: 130px;">
  7460. </div>
  7461. </td>
  7462. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenCode">&nbsp;&nbsp;供应商代码</label>:</td>
  7463. <td class="HideItems">
  7464. <div class="input-group HideItems">
  7465. <input id="txt_VenCode" type="text" class="form-control HideItems" style="width: 130px;">
  7466. </div>
  7467. </td>
  7468. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenName">&nbsp;&nbsp;供应商名称</label>:</td>
  7469. <td class="HideItems">
  7470. <div class="input-group HideItems">
  7471. <input id="txt_VenName" type="text" class="form-control HideItems" style="width: 130px;">
  7472. </div>
  7473. </td>
  7474. <td class="HideItems2" style="text-align:right;"><label class="lglabel HideItems2" for="txt_VenName">&nbsp;&nbsp;源头单据号</label>:</td>
  7475. <td class="HideItems2">
  7476. <div class="input-group HideItems2">
  7477. <input id="txt_SCode" type="text" class="form-control HideItems2" style="width: 130px;">
  7478. </div>
  7479. </td>
  7480. <td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName">&nbsp;&nbsp;日期(从)</label>:</td>
  7481. <td class="HideItemsTime">
  7482. <div class="input-group HideItemsTime">
  7483. <input id="FromTime" name="FromTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(从)" />
  7484. </div>
  7485. </td>
  7486. <td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName">&nbsp;&nbsp;日期(到)</label>:</td>
  7487. <td class="HideItemsTime">
  7488. <div class="input-group HideItemsTime">
  7489. <input id="ToTime" name="ToTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(到)" />
  7490. </div>
  7491. </td>
  7492. </tr>
  7493. <tr>
  7494. <td style="text-align:right;"><label class="lglabel" for="txt_InvCode">&nbsp;&nbsp;料品编码</label>:</td>
  7495. <td>
  7496. <div class="input-group">
  7497. <input id="txt_InvCode" type="text" class="form-control" style="width: 130px;">
  7498. </div>
  7499. </td>
  7500. <td style="text-align:right;"><label class="lglabel" for="txt_InvName">&nbsp;&nbsp;料品名称</label>:</td>
  7501. <td>
  7502. <div class="input-group">
  7503. <input id="txt_InvName" type="text" class="form-control" style="width: 130px;">
  7504. </div>
  7505. </td>
  7506. <td class="HideItems3" style="text-align:right;"><label class="lglabel HideItems3" for="txt_InvStd">&nbsp;&nbsp;规格型号</label>:</td>
  7507. <td class="HideItems3">
  7508. <div class="input-group HideItems3">
  7509. <input id="txt_InvStd" type="text" class="form-control" style="width: 130px;">
  7510. </div>
  7511. </td>
  7512. <td class="HideBatch" style="text-align:right;"><label class="lglabel" for="txt_BatchCode">&nbsp;&nbsp;批次号</label>:</td>
  7513. <td>
  7514. <div class="input-group HideBatch">
  7515. <input id="txt_BatchCode" type="text" class="form-control" style="width: 130px;">
  7516. </div>
  7517. </td>
  7518. @*<td id="GDLX">
  7519. <label>&nbsp;&nbsp;&nbsp;工单类型:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7520. </td>
  7521. <td id="GDLX2">
  7522. <div class="input-group">
  7523. <select id="SelGDLX" name="SelShow" class="form-control" style="width: 130px;">
  7524. </select>
  7525. </div>
  7526. </td>*@
  7527. </tr>
  7528. <tr>
  7529. <td class="HideWH" style="text-align:right;">
  7530. <label>&nbsp;&nbsp;仓库编码:&nbsp;&nbsp;</label>
  7531. </td>
  7532. <td class="HideWH">
  7533. <div class="input-group HideWH">
  7534. <input id="txt_WHCode" type="text" class="form-control HideWH" style="width: 130px;">
  7535. </div>
  7536. </td>
  7537. <td>
  7538. <label>&nbsp;&nbsp;是否全部生成:&nbsp;&nbsp;</label>
  7539. </td>
  7540. <td>
  7541. <div class="input-group">
  7542. <select id="selShow" name="F_Target" class="form-control" style="width: 130px;">
  7543. <option value="0" selected="selected">显示全部</option>
  7544. <option value="1">已全部生成</option>
  7545. <option value="2">未全部生成</option>
  7546. </select>
  7547. </div>
  7548. </td>
  7549. <td clsaa="Status">
  7550. <label>&nbsp;&nbsp;是否全部入库:&nbsp;&nbsp;</label>
  7551. </td>
  7552. <td clsaa="Status">
  7553. <div class="input-group">
  7554. <select id="selStatus" name="F_Target" class="form-control" style="width: 130px;">
  7555. <option value="0" selected="selected">全部</option>
  7556. <option value="1">未全部入库</option>
  7557. <option value="2">已全部入库</option>
  7558. </select>
  7559. </div>
  7560. </td>
  7561. <td class="HideItems3">
  7562. <label>&nbsp;&nbsp;条码是否打印:&nbsp;&nbsp;</label>
  7563. </td>
  7564. <td class="HideItems3">
  7565. <div class="input-group HideItems3">
  7566. <select id="selPrint" name="selPrint" class="form-control HideItems3" style="width: 130px;">
  7567. <option value="0" selected="selected">显示全部</option>
  7568. <option value="1">已打印</option>
  7569. <option value="2">未打印</option>
  7570. </select>
  7571. </div>
  7572. </td>
  7573. <td>
  7574. <span class="input-group-btn">
  7575. <button id="btn_search" type="button" class="btn btn-primary"><i class="fa fa-search"></i></button>
  7576. </span>
  7577. </td>
  7578. </tr>
  7579. </table>
  7580. </div>
  7581. </div>
  7582. <div class="gridPanel">
  7583. <table id="gridList"></table>
  7584. <div id="gridPager"></div>
  7585. </div>