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.

7704 lines
400 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 _Clos = new Array();
  9. var Type = $.request("Type");
  10. var mold = $.request("mold");
  11. var Name = "单据号";
  12. var ColModelMain = [];
  13. var ColModelSub = [];
  14. $(function () {
  15. SetCols();
  16. if (Type != '1') {
  17. $("#NF - Prints").css('display', 'none');
  18. $("#NF-btnInWareHouse").css('display', 'none');
  19. }
  20. if (Type != '13' && Type != '9') {
  21. $(".HideItems2").css('display', 'none');
  22. }
  23. if (Type != '23' ) {
  24. $(".HideItems4").css('display', 'none');
  25. }
  26. if (Type != '1' && Type != '12' && Type != '22' && Type != '23' && Type != '2' && Type != '3' && Type != '24'
  27. && Type != '203') {
  28. $(".HideItemsTime").css('display', 'none');
  29. }
  30. if (Type != '22' && Type != '23' && Type != '2' && Type != '3' && Type != '24' && Type != '203') {
  31. $(".HideWH").css('display', 'none');
  32. }
  33. if (Type != '3' && Type != '7' && Type != '8') {
  34. $(".selStatus").css('display', 'none');
  35. }
  36. if (Type != '3') {
  37. $(".HideClassGroup").css('display', 'none');
  38. }
  39. if (Type != '3' && Type != '4' && Type != '5' && Type != '7' && Type != '8' && Type != '22') {
  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 = 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 = 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. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  308. cols.push(collast);
  309. var collast = { label: '工单行号', name: 'Sequence', width: 50, align: 'left' };
  310. cols.push(collast);
  311. var collast = { label: 'ERP工单行ID', name: 'MODetailID', hidden: true };
  312. cols.push(collast);
  313. var collast = { label: '已入库数量', name: 'RCVQuantity', hidden: true, };
  314. cols.push(collast);
  315. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  316. cols.push(collast);
  317. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  318. cols.push(collast);
  319. var collast = { label: '客户料号', name: 'CustInvCode', width: 150, align: 'left', };
  320. cols.push(collast);
  321. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  322. cols.push(collast);
  323. var collast = { label: '最小包装量', name: 'MPQ', width: 100, align: 'left', editable: true, editrules: { number: true } };
  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 = 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 = 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: 'BatchCode', width: 100, align: 'left' };
  534. //cols.push(collast);
  535. $.ajax({
  536. url: "/Print/SelectTableColumnName?" + Math.random(),
  537. dataType: "json",
  538. async: false,
  539. success: function (data) {
  540. if (data != null && data.length > 0) {
  541. DateList = data;
  542. for (var i = 0; i < data.length; i++) {
  543. var TableCode = data[i].TableCode;
  544. if (TableCode == "ICSOtherIn") {
  545. var Code = data[i].Code;
  546. var Name = data[i].Name;
  547. var obj = new Array();
  548. obj = {
  549. label: Name,
  550. name: Code,
  551. width: 80,
  552. align: "left"
  553. }
  554. cols.push(obj);
  555. }
  556. if (TableCode == "ICSInventory") {
  557. var Code = data[i].Code;
  558. var Name = data[i].Name;
  559. var obj = new Array();
  560. obj = {
  561. label: Name,
  562. name: Code,
  563. width: 80,
  564. align: "left"
  565. }
  566. cols.push(obj);
  567. //cols1.push(obj);
  568. }
  569. }
  570. }
  571. _Clos = cols;
  572. //_Clos1 = cols1;
  573. }
  574. });
  575. }
  576. if (Type == '6') {
  577. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  578. cols.push(collast);
  579. var collast = { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' };
  580. cols.push(collast);
  581. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  582. cols.push(collast);
  583. var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' };
  584. cols.push(collast);
  585. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  586. cols.push(collast);
  587. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  588. cols.push(collast);
  589. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  590. cols.push(collast);
  591. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  592. cols.push(collast);
  593. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  594. cols.push(collast);
  595. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  596. cols.push(collast);
  597. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  598. cols.push(collast);
  599. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  600. cols.push(collast);
  601. var collast = { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', };
  602. cols.push(collast);
  603. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  604. cols.push(collast);
  605. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  606. cols.push(collast);
  607. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  608. //cols.push(collast);
  609. $.ajax({
  610. url: "/Print/SelectTableColumnName?" + Math.random(),
  611. dataType: "json",
  612. async: false,
  613. success: function (data) {
  614. if (data != null && data.length > 0) {
  615. DateList = data;
  616. for (var i = 0; i < data.length; i++) {
  617. var TableCode = data[i].TableCode;
  618. if (TableCode == "ICSReturn") {
  619. var Code = data[i].Code;
  620. var Name = data[i].Name;
  621. var obj = new Array();
  622. obj = {
  623. label: Name,
  624. name: Code,
  625. width: 80,
  626. align: "left"
  627. }
  628. cols.push(obj);
  629. }
  630. if (TableCode == "ICSInventory") {
  631. var Code = data[i].Code;
  632. var Name = data[i].Name;
  633. var obj = new Array();
  634. obj = {
  635. label: Name,
  636. name: Code,
  637. width: 80,
  638. align: "left"
  639. }
  640. cols.push(obj);
  641. //cols1.push(obj);
  642. }
  643. }
  644. }
  645. _Clos = cols;
  646. //_Clos1 = cols1;
  647. }
  648. });
  649. }
  650. //审核到货单生成条码
  651. if (Type == '7') {
  652. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  653. cols.push(collast);
  654. var collast = { label: '单据号', name: 'DNCode', width: 120, align: 'left' };
  655. cols.push(collast);
  656. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  657. cols.push(collast);
  658. var collast = { label: '采购订单号', name: 'POCode', width: 50, align: 'left' };
  659. cols.push(collast);
  660. var collast = { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' };
  661. cols.push(collast);
  662. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  663. cols.push(collast);
  664. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  665. cols.push(collast);
  666. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  667. cols.push(collast);
  668. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  669. cols.push(collast);
  670. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  671. cols.push(collast);
  672. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  673. cols.push(collast);
  674. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  675. cols.push(collast);
  676. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  677. cols.push(collast);
  678. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  679. cols.push(collast);
  680. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  681. //cols.push(collast);
  682. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  683. cols.push(collast);
  684. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  685. cols.push(collast);
  686. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  687. cols.push(collast);
  688. var collast = { label: '未入库数量', name: 'NRCVQuantity', width: 60, align: 'left', };
  689. cols.push(collast);
  690. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  691. cols.push(collast);
  692. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  693. cols.push(collast);
  694. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  695. cols.push(collast);
  696. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  697. cols.push(collast);
  698. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  699. cols.push(collast);
  700. $.ajax({
  701. url: "/Print/SelectTableColumnName?" + Math.random(),
  702. dataType: "json",
  703. async: false,
  704. success: function (data) {
  705. if (data != null && data.length > 0) {
  706. DateList = data;
  707. for (var i = 0; i < data.length; i++) {
  708. var TableCode = data[i].TableCode;
  709. if (TableCode == "ICSDeliveryNotice") {
  710. debugger;
  711. var Code = data[i].Code;
  712. var Name = data[i].Name;
  713. var obj = new Array();
  714. obj = {
  715. label: Name,
  716. name: Code,
  717. width: 80,
  718. align: "left"
  719. }
  720. cols.push(obj);
  721. }
  722. if (TableCode == "ICSInventory") {
  723. var Code = data[i].Code;
  724. var Name = data[i].Name;
  725. var obj = new Array();
  726. obj = {
  727. label: Name,
  728. name: Code,
  729. width: 80,
  730. align: "left"
  731. }
  732. cols.push(obj);
  733. //cols1.push(obj);
  734. }
  735. }
  736. }
  737. _Clos = cols;
  738. //_Clos1 = cols1;
  739. }
  740. });
  741. }
  742. //审核委外到货单生成条码
  743. if (Type == '8') {
  744. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  745. cols.push(collast);
  746. var collast = { label: '单据号', name: 'ODNCode', width: 120, align: 'left' };
  747. cols.push(collast);
  748. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  749. cols.push(collast);
  750. var collast = { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' };
  751. cols.push(collast);
  752. var collast = { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' };
  753. cols.push(collast);
  754. var collast = { label: '委外订单表体ID', name: 'OODetailID', hidden: true };
  755. cols.push(collast);
  756. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  757. cols.push(collast);
  758. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  759. cols.push(collast);
  760. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  761. cols.push(collast);
  762. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  763. cols.push(collast);
  764. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  765. cols.push(collast);
  766. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  767. cols.push(collast);
  768. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  769. cols.push(collast);
  770. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  771. cols.push(collast);
  772. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  773. cols.push(collast);
  774. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  775. //cols.push(collast);
  776. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  777. cols.push(collast);
  778. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  779. cols.push(collast);
  780. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  781. cols.push(collast);
  782. var collast = { label: '未入库数量', name: 'NRCVQuantity', width: 60, align: 'left', };
  783. cols.push(collast);
  784. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  785. cols.push(collast);
  786. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  787. cols.push(collast);
  788. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  789. cols.push(collast);
  790. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  791. cols.push(collast);
  792. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  793. cols.push(collast);
  794. $.ajax({
  795. url: "/Print/SelectTableColumnName?" + Math.random(),
  796. dataType: "json",
  797. async: false,
  798. success: function (data) {
  799. if (data != null && data.length > 0) {
  800. DateList = data;
  801. for (var i = 0; i < data.length; i++) {
  802. var TableCode = data[i].TableCode;
  803. if (TableCode == "ICSODeliveryNotice") {
  804. var Code = data[i].Code;
  805. var Name = data[i].Name;
  806. var obj = new Array();
  807. obj = {
  808. label: Name,
  809. name: Code,
  810. width: 80,
  811. align: "left"
  812. }
  813. cols.push(obj);
  814. }
  815. if (TableCode == "ICSInventory") {
  816. var Code = data[i].Code;
  817. var Name = data[i].Name;
  818. var obj = new Array();
  819. obj = {
  820. label: Name,
  821. name: Code,
  822. width: 80,
  823. align: "left"
  824. }
  825. cols.push(obj);
  826. //cols1.push(obj);
  827. }
  828. }
  829. }
  830. _Clos = cols;
  831. //_Clos1 = cols1;
  832. }
  833. });
  834. }
  835. //开立成品入库单生成条码
  836. if (Type == '9') {
  837. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  838. cols.push(collast);
  839. var collast = { label: '单据号', name: 'RCVCode', width: 120, align: 'left' };
  840. cols.push(collast);
  841. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  842. cols.push(collast);
  843. var collast = { label: '源头单据号', name: 'MOCode', width: 50, align: 'left' };
  844. cols.push(collast);
  845. var collast = { label: '仓库号', name: 'WHCode', width: 120, align: 'left' };
  846. cols.push(collast);
  847. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  848. cols.push(collast);
  849. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  850. cols.push(collast);
  851. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  852. cols.push(collast);
  853. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  854. cols.push(collast);
  855. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  856. cols.push(collast);
  857. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  858. cols.push(collast);
  859. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  860. //cols.push(collast);
  861. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  862. cols.push(collast);
  863. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  864. cols.push(collast);
  865. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  866. cols.push(collast);
  867. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  868. cols.push(collast);
  869. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  870. cols.push(collast);
  871. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  872. cols.push(collast);
  873. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  874. cols.push(collast);
  875. $.ajax({
  876. url: "/Print/SelectTableColumnName?" + Math.random(),
  877. dataType: "json",
  878. async: false,
  879. success: function (data) {
  880. if (data != null && data.length > 0) {
  881. DateList = data;
  882. for (var i = 0; i < data.length; i++) {
  883. var TableCode = data[i].TableCode;
  884. if (TableCode == "ICSMO") {
  885. var Code = data[i].Code;
  886. var Name = data[i].Name;
  887. var obj = new Array();
  888. obj = {
  889. label: Name,
  890. name: Code,
  891. width: 80,
  892. align: "left"
  893. }
  894. cols.push(obj);
  895. }
  896. if (TableCode == "ICSInventory") {
  897. var Code = data[i].Code;
  898. var Name = data[i].Name;
  899. var obj = new Array();
  900. obj = {
  901. label: Name,
  902. name: Code,
  903. width: 80,
  904. align: "left"
  905. }
  906. cols.push(obj);
  907. //cols1.push(obj);
  908. }
  909. }
  910. }
  911. _Clos = cols;
  912. //_Clos1 = cols1;
  913. }
  914. });
  915. }
  916. //审核拒收单生成条码
  917. if (Type == '10') {
  918. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  919. cols.push(collast);
  920. var collast = { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' };
  921. cols.push(collast);
  922. var collast = { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' };
  923. cols.push(collast);
  924. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  925. cols.push(collast);
  926. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  927. cols.push(collast);
  928. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  929. cols.push(collast);
  930. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  931. cols.push(collast);
  932. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  933. cols.push(collast);
  934. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  935. cols.push(collast);
  936. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  937. cols.push(collast);
  938. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  939. cols.push(collast);
  940. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  941. cols.push(collast);
  942. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  943. cols.push(collast);
  944. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  945. cols.push(collast);
  946. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  947. cols.push(collast);
  948. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  949. cols.push(collast);
  950. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  951. cols.push(collast);
  952. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  953. cols.push(collast);
  954. $.ajax({
  955. url: "/Print/SelectTableColumnName?" + Math.random(),
  956. dataType: "json",
  957. async: false,
  958. success: function (data) {
  959. if (data != null && data.length > 0) {
  960. DateList = data;
  961. for (var i = 0; i < data.length; i++) {
  962. var TableCode = data[i].TableCode;
  963. if (TableCode == "ICSDeliveryNotice") {
  964. var Code = data[i].Code;
  965. var Name = data[i].Name;
  966. var obj = new Array();
  967. obj = {
  968. label: Name,
  969. name: Code,
  970. width: 80,
  971. align: "left"
  972. }
  973. cols.push(obj);
  974. }
  975. if (TableCode == "ICSInventory") {
  976. var Code = data[i].Code;
  977. var Name = data[i].Name;
  978. var obj = new Array();
  979. obj = {
  980. label: Name,
  981. name: Code,
  982. width: 80,
  983. align: "left"
  984. }
  985. cols.push(obj);
  986. //cols1.push(obj);
  987. }
  988. }
  989. }
  990. _Clos = cols;
  991. //_Clos1 = cols1;
  992. }
  993. });
  994. }
  995. //审核委外拒收单生成条码
  996. if (Type == '11') {
  997. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  998. cols.push(collast);
  999. var collast = { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' };
  1000. cols.push(collast);
  1001. var collast = { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' };
  1002. cols.push(collast);
  1003. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  1004. cols.push(collast);
  1005. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  1006. cols.push(collast);
  1007. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1008. cols.push(collast);
  1009. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  1010. cols.push(collast);
  1011. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  1012. cols.push(collast);
  1013. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  1014. cols.push(collast);
  1015. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  1016. cols.push(collast);
  1017. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1018. cols.push(collast);
  1019. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1020. cols.push(collast);
  1021. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  1022. cols.push(collast);
  1023. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1024. cols.push(collast);
  1025. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  1026. cols.push(collast);
  1027. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  1028. cols.push(collast);
  1029. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  1030. cols.push(collast);
  1031. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  1032. cols.push(collast);
  1033. $.ajax({
  1034. url: "/Print/SelectTableColumnName?" + Math.random(),
  1035. dataType: "json",
  1036. async: false,
  1037. success: function (data) {
  1038. if (data != null && data.length > 0) {
  1039. DateList = data;
  1040. for (var i = 0; i < data.length; i++) {
  1041. var TableCode = data[i].TableCode;
  1042. if (TableCode == "ICSODeliveryNotice") {
  1043. var Code = data[i].Code;
  1044. var Name = data[i].Name;
  1045. var obj = new Array();
  1046. obj = {
  1047. label: Name,
  1048. name: Code,
  1049. width: 80,
  1050. align: "left"
  1051. }
  1052. cols.push(obj);
  1053. }
  1054. if (TableCode == "ICSInventory") {
  1055. var Code = data[i].Code;
  1056. var Name = data[i].Name;
  1057. var obj = new Array();
  1058. obj = {
  1059. label: Name,
  1060. name: Code,
  1061. width: 80,
  1062. align: "left"
  1063. }
  1064. cols.push(obj);
  1065. //cols1.push(obj);
  1066. }
  1067. }
  1068. }
  1069. _Clos = cols;
  1070. //_Clos1 = cols1;
  1071. }
  1072. });
  1073. }
  1074. //领料申请退料生成条码
  1075. if (Type == '12') {
  1076. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1077. cols.push(collast);
  1078. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  1079. cols.push(collast);
  1080. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1081. cols.push(collast);
  1082. var collast = { label: '来源单据号', name: 'SourceCodea', width: 120, align: 'left' };
  1083. cols.push(collast);
  1084. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  1085. cols.push(collast);
  1086. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1087. cols.push(collast);
  1088. var collast = { label: '料品编码', name: 'InvName', width: 150, align: 'left', };
  1089. cols.push(collast);
  1090. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1091. cols.push(collast);
  1092. var collast = { label: '最小包装量', name: 'MPQ', width: 100, align: 'left', editable: true, editrules: { number: true } };
  1093. cols.push(collast);
  1094. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1095. cols.push(collast);
  1096. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1097. cols.push(collast);
  1098. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1099. cols.push(collast);
  1100. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1101. cols.push(collast);
  1102. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left', editable: true };
  1103. cols.push(collast);
  1104. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1105. cols.push(collast);
  1106. $.ajax({
  1107. url: "/Print/SelectTableColumnName?" + Math.random(),
  1108. dataType: "json",
  1109. async: false,
  1110. success: function (data) {
  1111. if (data != null && data.length > 0) {
  1112. DateList = data;
  1113. for (var i = 0; i < data.length; i++) {
  1114. var TableCode = data[i].TableCode;
  1115. if (TableCode == "ICSMOApplyNegDetail") {
  1116. var Code = data[i].Code;
  1117. var Name = data[i].Name;
  1118. var obj = new Array();
  1119. obj = {
  1120. label: Name,
  1121. name: Code,
  1122. width: 80,
  1123. align: "left"
  1124. }
  1125. cols.push(obj);
  1126. }
  1127. if (TableCode == "ICSInventory") {
  1128. var Code = data[i].Code;
  1129. var Name = data[i].Name;
  1130. var obj = new Array();
  1131. obj = {
  1132. label: Name,
  1133. name: Code,
  1134. width: 80,
  1135. align: "left"
  1136. }
  1137. cols.push(obj);
  1138. //cols1.push(obj);
  1139. }
  1140. }
  1141. }
  1142. _Clos = cols;
  1143. //_Clos1 = cols1;
  1144. }
  1145. });
  1146. }
  1147. //材料出库退料生成条码
  1148. if (Type == '13') {
  1149. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1150. cols.push(collast);
  1151. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  1152. cols.push(collast);
  1153. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1154. cols.push(collast);
  1155. var collast = { label: '源头单据号', name: 'SCode', width: 120, align: 'left' };
  1156. cols.push(collast);
  1157. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  1158. cols.push(collast);
  1159. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1160. cols.push(collast);
  1161. var collast = { label: '料品编码', name: 'InvName', width: 150, align: 'left', };
  1162. cols.push(collast);
  1163. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1164. cols.push(collast);
  1165. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1166. cols.push(collast);
  1167. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1168. cols.push(collast);
  1169. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1170. cols.push(collast);
  1171. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1172. cols.push(collast);
  1173. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1174. //cols.push(collast);
  1175. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1176. cols.push(collast);
  1177. }
  1178. //委外领料申请退料生成条码
  1179. if (Type == '14') {
  1180. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1181. cols.push(collast);
  1182. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  1183. cols.push(collast);
  1184. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1185. cols.push(collast);
  1186. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  1187. cols.push(collast);
  1188. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1189. cols.push(collast);
  1190. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1191. cols.push(collast);
  1192. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1193. cols.push(collast);
  1194. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1195. cols.push(collast);
  1196. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1197. cols.push(collast);
  1198. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1199. cols.push(collast);
  1200. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1201. cols.push(collast);
  1202. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1203. //cols.push(collast);
  1204. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1205. cols.push(collast);
  1206. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1207. //cols.push(collast);
  1208. $.ajax({
  1209. url: "/Print/SelectTableColumnName?" + Math.random(),
  1210. dataType: "json",
  1211. async: false,
  1212. success: function (data) {
  1213. if (data != null && data.length > 0) {
  1214. DateList = data;
  1215. for (var i = 0; i < data.length; i++) {
  1216. var TableCode = data[i].TableCode;
  1217. if (TableCode == "ICSOApplyNegDetail") {
  1218. var Code = data[i].Code;
  1219. var Name = data[i].Name;
  1220. var obj = new Array();
  1221. obj = {
  1222. label: Name,
  1223. name: Code,
  1224. width: 80,
  1225. align: "left"
  1226. }
  1227. cols.push(obj);
  1228. }
  1229. if (TableCode == "ICSInventory") {
  1230. var Code = data[i].Code;
  1231. var Name = data[i].Name;
  1232. var obj = new Array();
  1233. obj = {
  1234. label: Name,
  1235. name: Code,
  1236. width: 80,
  1237. align: "left"
  1238. }
  1239. cols.push(obj);
  1240. //cols1.push(obj);
  1241. }
  1242. }
  1243. }
  1244. _Clos = cols;
  1245. //_Clos1 = cols1;
  1246. }
  1247. });
  1248. }
  1249. //委外材料出库退料生成条码
  1250. if (Type == '15') {
  1251. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1252. cols.push(collast);
  1253. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  1254. cols.push(collast);
  1255. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1256. cols.push(collast);
  1257. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  1258. cols.push(collast);
  1259. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1260. cols.push(collast);
  1261. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1262. cols.push(collast);
  1263. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1264. cols.push(collast);
  1265. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1266. cols.push(collast);
  1267. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1268. cols.push(collast);
  1269. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1270. cols.push(collast);
  1271. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1272. cols.push(collast);
  1273. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1274. //cols.push(collast);
  1275. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1276. cols.push(collast);
  1277. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1278. //cols.push(collast);
  1279. $.ajax({
  1280. url: "/Print/SelectTableColumnName?" + Math.random(),
  1281. dataType: "json",
  1282. async: false,
  1283. success: function (data) {
  1284. if (data != null && data.length > 0) {
  1285. DateList = data;
  1286. for (var i = 0; i < data.length; i++) {
  1287. var TableCode = data[i].TableCode;
  1288. if (TableCode == "ICSOApplyNegDetail") {
  1289. var Code = data[i].Code;
  1290. var Name = data[i].Name;
  1291. var obj = new Array();
  1292. obj = {
  1293. label: Name,
  1294. name: Code,
  1295. width: 80,
  1296. align: "left"
  1297. }
  1298. cols.push(obj);
  1299. }
  1300. if (TableCode == "ICSInventory") {
  1301. var Code = data[i].Code;
  1302. var Name = data[i].Name;
  1303. var obj = new Array();
  1304. obj = {
  1305. label: Name,
  1306. name: Code,
  1307. width: 80,
  1308. align: "left"
  1309. }
  1310. cols.push(obj);
  1311. //cols1.push(obj);
  1312. }
  1313. }
  1314. }
  1315. _Clos = cols;
  1316. //_Clos1 = cols1;
  1317. }
  1318. });
  1319. }
  1320. //返工工单生成条码
  1321. if (Type == '16') {
  1322. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1323. cols.push(collast);
  1324. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  1325. cols.push(collast);
  1326. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  1327. cols.push(collast);
  1328. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  1329. cols.push(collast);
  1330. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1331. cols.push(collast);
  1332. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1333. cols.push(collast);
  1334. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1335. cols.push(collast);
  1336. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1337. cols.push(collast);
  1338. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  1339. cols.push(collast);
  1340. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1341. cols.push(collast);
  1342. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1343. cols.push(collast);
  1344. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1345. //cols.push(collast);
  1346. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1347. cols.push(collast);
  1348. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1349. //cols.push(collast);
  1350. $.ajax({
  1351. url: "/Print/SelectTableColumnName?" + Math.random(),
  1352. dataType: "json",
  1353. async: false,
  1354. success: function (data) {
  1355. if (data != null && data.length > 0) {
  1356. DateList = data;
  1357. for (var i = 0; i < data.length; i++) {
  1358. var TableCode = data[i].TableCode;
  1359. if (TableCode == "ICSMOPick") {
  1360. var Code = data[i].Code;
  1361. var Name = data[i].Name;
  1362. var obj = new Array();
  1363. obj = {
  1364. label: Name,
  1365. name: Code,
  1366. width: 80,
  1367. align: "left"
  1368. }
  1369. cols.push(obj);
  1370. }
  1371. if (TableCode == "ICSInventory") {
  1372. var Code = data[i].Code;
  1373. var Name = data[i].Name;
  1374. var obj = new Array();
  1375. obj = {
  1376. label: Name,
  1377. name: Code,
  1378. width: 80,
  1379. align: "left"
  1380. }
  1381. cols.push(obj);
  1382. //cols1.push(obj);
  1383. }
  1384. }
  1385. }
  1386. _Clos = cols;
  1387. //_Clos1 = cols1;
  1388. }
  1389. });
  1390. }
  1391. //不合格条码生成条码
  1392. if (Type == '17') {
  1393. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1394. cols.push(collast);
  1395. var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' };
  1396. cols.push(collast);
  1397. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1398. cols.push(collast);
  1399. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1400. cols.push(collast);
  1401. var collast = { label: '不合格数量', name: 'Quantity', width: 100, align: 'left' };
  1402. cols.push(collast);
  1403. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1404. cols.push(collast);
  1405. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1406. cols.push(collast);
  1407. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1408. cols.push(collast);
  1409. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1410. //cols.push(collast);
  1411. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1412. cols.push(collast);
  1413. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1414. //cols.push(collast);
  1415. $.ajax({
  1416. url: "/Print/SelectTableColumnName?" + Math.random(),
  1417. dataType: "json",
  1418. async: false,
  1419. success: function (data) {
  1420. if (data != null && data.length > 0) {
  1421. DateList = data;
  1422. for (var i = 0; i < data.length; i++) {
  1423. var TableCode = data[i].TableCode;
  1424. if (TableCode == "ICSInspection") {
  1425. var Code = data[i].Code;
  1426. var Name = data[i].Name;
  1427. var obj = new Array();
  1428. obj = {
  1429. label: Name,
  1430. name: Code,
  1431. width: 80,
  1432. align: "left"
  1433. }
  1434. cols.push(obj);
  1435. }
  1436. if (TableCode == "ICSInventory") {
  1437. var Code = data[i].Code;
  1438. var Name = data[i].Name;
  1439. var obj = new Array();
  1440. obj = {
  1441. label: Name,
  1442. name: Code,
  1443. width: 80,
  1444. align: "left"
  1445. }
  1446. cols.push(obj);
  1447. //cols1.push(obj);
  1448. }
  1449. }
  1450. }
  1451. _Clos = cols;
  1452. //_Clos1 = cols1;
  1453. }
  1454. });
  1455. }
  1456. //副产品生成条码
  1457. if (Type == '18') {
  1458. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1459. cols.push(collast);
  1460. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  1461. cols.push(collast);
  1462. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  1463. cols.push(collast);
  1464. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  1465. cols.push(collast);
  1466. var collast = { label: '料品编码(子)', name: 'ZInvCode', width: 120, align: 'left' };
  1467. cols.push(collast);
  1468. var collast = { label: '料品编码(母)', name: 'MInvCode', width: 120, align: 'left' };
  1469. cols.push(collast);
  1470. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1471. cols.push(collast);
  1472. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1473. cols.push(collast);
  1474. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1475. cols.push(collast);
  1476. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  1477. cols.push(collast);
  1478. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1479. cols.push(collast);
  1480. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1481. cols.push(collast);
  1482. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1483. //cols.push(collast);
  1484. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1485. cols.push(collast);
  1486. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1487. //cols.push(collast);
  1488. $.ajax({
  1489. url: "/Print/SelectTableColumnName?" + Math.random(),
  1490. dataType: "json",
  1491. async: false,
  1492. success: function (data) {
  1493. if (data != null && data.length > 0) {
  1494. DateList = data;
  1495. for (var i = 0; i < data.length; i++) {
  1496. var TableCode = data[i].TableCode;
  1497. if (TableCode == "ICSMOPick") {
  1498. var Code = data[i].Code;
  1499. var Name = data[i].Name;
  1500. var obj = new Array();
  1501. obj = {
  1502. label: Name,
  1503. name: Code,
  1504. width: 80,
  1505. align: "left"
  1506. }
  1507. cols.push(obj);
  1508. }
  1509. if (TableCode == "ICSInventory") {
  1510. var Code = data[i].Code;
  1511. var Name = data[i].Name;
  1512. var obj = new Array();
  1513. obj = {
  1514. label: Name,
  1515. name: Code,
  1516. width: 80,
  1517. align: "left"
  1518. }
  1519. cols.push(obj);
  1520. //cols1.push(obj);
  1521. }
  1522. }
  1523. }
  1524. _Clos = cols;
  1525. //_Clos1 = cols1;
  1526. }
  1527. });
  1528. }
  1529. //锐腾两步调入生成条码
  1530. if (Type == '20') {
  1531. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1532. cols.push(collast);
  1533. var collast = { label: '调拨单号', name: 'TransferNO', width: 120, align: 'left' };
  1534. cols.push(collast);
  1535. var collast = { label: '调拨单行号', name: 'Sequence', width: 50, align: 'left' };
  1536. cols.push(collast);
  1537. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1538. cols.push(collast);
  1539. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1540. cols.push(collast);
  1541. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1542. cols.push(collast);
  1543. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1544. cols.push(collast);
  1545. var collast = { label: '已调入数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1546. cols.push(collast);
  1547. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1548. cols.push(collast);
  1549. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1550. cols.push(collast);
  1551. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1552. //cols.push(collast);
  1553. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1554. cols.push(collast);
  1555. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1556. //cols.push(collast);
  1557. $.ajax({
  1558. url: "/Print/SelectTableColumnName?" + Math.random(),
  1559. dataType: "json",
  1560. async: false,
  1561. success: function (data) {
  1562. if (data != null && data.length > 0) {
  1563. DateList = data;
  1564. for (var i = 0; i < data.length; i++) {
  1565. var TableCode = data[i].TableCode;
  1566. if (TableCode == "ICSMOPick") {
  1567. var Code = data[i].Code;
  1568. var Name = data[i].Name;
  1569. var obj = new Array();
  1570. obj = {
  1571. label: Name,
  1572. name: Code,
  1573. width: 80,
  1574. align: "left"
  1575. }
  1576. cols.push(obj);
  1577. }
  1578. if (TableCode == "ICSInventory") {
  1579. var Code = data[i].Code;
  1580. var Name = data[i].Name;
  1581. var obj = new Array();
  1582. obj = {
  1583. label: Name,
  1584. name: Code,
  1585. width: 80,
  1586. align: "left"
  1587. }
  1588. cols.push(obj);
  1589. //cols1.push(obj);
  1590. }
  1591. }
  1592. }
  1593. _Clos = cols;
  1594. //_Clos1 = cols1;
  1595. }
  1596. });
  1597. }
  1598. //采购入库生成条码
  1599. if (Type == '22') {
  1600. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1601. cols.push(collast);
  1602. var collast = { label: '入库单号', name: 'RCVCode', width: 120, align: 'left' };
  1603. cols.push(collast);
  1604. var collast = { label: '入库单行号', name: 'Sequence', width: 50, align: 'left' };
  1605. cols.push(collast);
  1606. var collast = { label: '采购订单号', name: 'SourceCode', width: 50, align: 'left' };
  1607. cols.push(collast);
  1608. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1609. cols.push(collast);
  1610. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1611. cols.push(collast);
  1612. var collast = { label: '规格型号', name: 'InvStd', width: 150, align: 'left', };
  1613. cols.push(collast);
  1614. var collast = { label: '厂商料号', name: 'ManufacturerInvCode', width: 150, align: 'left', };
  1615. cols.push(collast);
  1616. var collast = { label: '供应商', name: 'EATTRIBUTE3', width: 150, align: 'left', };
  1617. cols.push(collast);
  1618. var collast = { label: '采购员', name: 'F_RealName', width: 150, align: 'left', };
  1619. cols.push(collast);
  1620. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1621. cols.push(collast);
  1622. var collast = { label: '最小包装量', name: 'MPQ', width: 100, align: 'left', editable: true, editrules: { number: true } };
  1623. cols.push(collast);
  1624. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1625. cols.push(collast);
  1626. var collast = { label: '已入数量', name: 'RCVQuantity', width: 100, align: 'left' };
  1627. cols.push(collast);
  1628. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1629. //cols.push(collast);
  1630. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1631. cols.push(collast);
  1632. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1633. //cols.push(collast);
  1634. $.ajax({
  1635. url: "/Print/SelectTableColumnName?" + Math.random(),
  1636. dataType: "json",
  1637. async: false,
  1638. success: function (data) {
  1639. if (data != null && data.length > 0) {
  1640. DateList = data;
  1641. for (var i = 0; i < data.length; i++) {
  1642. var TableCode = data[i].TableCode;
  1643. if (TableCode == "ICSPurchaseReceive") {
  1644. var Code = data[i].Code;
  1645. var Name = data[i].Name;
  1646. var obj = new Array();
  1647. obj = {
  1648. label: Name,
  1649. name: Code,
  1650. width: 80,
  1651. align: "left"
  1652. }
  1653. cols.push(obj);
  1654. }
  1655. if (TableCode == "ICSInventory") {
  1656. var Code = data[i].Code;
  1657. var Name = data[i].Name;
  1658. var obj = new Array();
  1659. obj = {
  1660. label: Name,
  1661. name: Code,
  1662. width: 80,
  1663. align: "left"
  1664. }
  1665. cols.push(obj);
  1666. //cols1.push(obj);
  1667. }
  1668. }
  1669. }
  1670. _Clos = cols;
  1671. //_Clos1 = cols1;
  1672. }
  1673. });
  1674. }
  1675. //采购入库生成条码
  1676. if (Type == '23') {
  1677. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1678. cols.push(collast);
  1679. var collast = { label: '委外入库单号', name: 'RCVCode', width: 120, align: 'left' };
  1680. cols.push(collast);
  1681. var collast = { label: '委外入库单行号', name: 'Sequence', width: 50, align: 'left' };
  1682. cols.push(collast);
  1683. var collast = { label: '采购单号', name: 'OOCode', width: 120, 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: 'VenName', width: 150, align: 'left', };
  1688. cols.push(collast);
  1689. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1690. cols.push(collast);
  1691. var collast = { label: '规格型号', name: 'InvStd', width: 150, align: 'left', };
  1692. cols.push(collast);
  1693. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1694. cols.push(collast);
  1695. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1696. cols.push(collast);
  1697. var collast = { label: '已入数量', name: 'RCVQuantity', width: 100, align: 'left' };
  1698. cols.push(collast);
  1699. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1700. //cols.push(collast);
  1701. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1702. cols.push(collast);
  1703. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1704. //cols.push(collast);
  1705. $.ajax({
  1706. url: "/Print/SelectTableColumnName?" + Math.random(),
  1707. dataType: "json",
  1708. async: false,
  1709. success: function (data) {
  1710. if (data != null && data.length > 0) {
  1711. DateList = data;
  1712. for (var i = 0; i < data.length; i++) {
  1713. var TableCode = data[i].TableCode;
  1714. if (TableCode == "ICSOutsourcingReceive") {
  1715. var Code = data[i].Code;
  1716. var Name = data[i].Name;
  1717. var obj = new Array();
  1718. obj = {
  1719. label: Name,
  1720. name: Code,
  1721. width: 80,
  1722. align: "left"
  1723. }
  1724. cols.push(obj);
  1725. }
  1726. if (TableCode == "ICSInventory") {
  1727. var Code = data[i].Code;
  1728. var Name = data[i].Name;
  1729. var obj = new Array();
  1730. obj = {
  1731. label: Name,
  1732. name: Code,
  1733. width: 80,
  1734. align: "left"
  1735. }
  1736. cols.push(obj);
  1737. //cols1.push(obj);
  1738. }
  1739. }
  1740. }
  1741. _Clos = cols;
  1742. //_Clos1 = cols1;
  1743. }
  1744. });
  1745. }
  1746. //红字销售单出库生成条码
  1747. if (Type == '24') {
  1748. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1749. cols.push(collast);
  1750. var collast = { label: '单据号', name: 'SSDCode', width: 120, align: 'left' };
  1751. cols.push(collast);
  1752. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  1753. cols.push(collast);
  1754. var collast = { label: '客户编码', name: 'CusCode', width: 120, align: 'left' };
  1755. cols.push(collast);
  1756. var collast = { label: '客户名称', name: 'CusName', width: 120, align: 'left' };
  1757. cols.push(collast);
  1758. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1759. cols.push(collast);
  1760. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  1761. cols.push(collast);
  1762. var collast = { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' };
  1763. cols.push(collast);
  1764. var collast = { label: '退货日期', name: 'CreateDateTime', width: 150, align: 'left' };
  1765. cols.push(collast);
  1766. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  1767. cols.push(collast);
  1768. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  1769. cols.push(collast);
  1770. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  1771. cols.push(collast);
  1772. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  1773. cols.push(collast);
  1774. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1775. cols.push(collast);
  1776. var collast = { label: '最小包装量', name: 'MPQ', width: 100, align: 'left', editable: true, editrules: { number: true } };
  1777. cols.push(collast);
  1778. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1779. //cols.push(collast);
  1780. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  1781. cols.push(collast);
  1782. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1783. cols.push(collast);
  1784. var collast = { label: '入库数量', name: 'SSDQuantity', width: 60, align: 'left', };
  1785. cols.push(collast);
  1786. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  1787. cols.push(collast);
  1788. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  1789. cols.push(collast);
  1790. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  1791. cols.push(collast);
  1792. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  1793. cols.push(collast);
  1794. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  1795. cols.push(collast);
  1796. $.ajax({
  1797. url: "/Print/SelectTableColumnName?" + Math.random(),
  1798. dataType: "json",
  1799. async: false,
  1800. success: function (data) {
  1801. if (data != null && data.length > 0) {
  1802. DateList = data;
  1803. for (var i = 0; i < data.length; i++) {
  1804. var TableCode = data[i].TableCode;
  1805. if (TableCode == "ICSSSD") {
  1806. debugger;
  1807. var Code = data[i].Code;
  1808. var Name = data[i].Name;
  1809. var obj = new Array();
  1810. obj = {
  1811. label: Name,
  1812. name: Code,
  1813. width: 80,
  1814. align: "left"
  1815. }
  1816. cols.push(obj);
  1817. }
  1818. if (TableCode == "ICSInventory") {
  1819. var Code = data[i].Code;
  1820. var Name = data[i].Name;
  1821. var obj = new Array();
  1822. obj = {
  1823. label: Name,
  1824. name: Code,
  1825. width: 80,
  1826. align: "left"
  1827. }
  1828. cols.push(obj);
  1829. //cols1.push(obj);
  1830. }
  1831. }
  1832. }
  1833. _Clos = cols;
  1834. //_Clos1 = cols1;
  1835. }
  1836. });
  1837. }
  1838. //派纳线边仓调拨申请单生成条码
  1839. if (Type == '201') {
  1840. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1841. cols.push(collast);
  1842. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1843. cols.push(collast);
  1844. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1845. cols.push(collast);
  1846. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  1847. cols.push(collast);
  1848. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  1849. cols.push(collast);
  1850. var collast = { label: '调出仓库', name: 'FromWHName', width: 100, align: 'left', };
  1851. cols.push(collast);
  1852. var collast = { label: '调入仓库', name: 'ToWHName', width: 100, align: 'left', };
  1853. cols.push(collast);
  1854. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1855. cols.push(collast);
  1856. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1857. cols.push(collast);
  1858. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1859. cols.push(collast);
  1860. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1861. //cols.push(collast);
  1862. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1863. cols.push(collast);
  1864. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1865. //cols.push(collast);
  1866. $.ajax({
  1867. url: "/Print/SelectTableColumnName?" + Math.random(),
  1868. dataType: "json",
  1869. async: false,
  1870. success: function (data) {
  1871. if (data != null && data.length > 0) {
  1872. DateList = data;
  1873. for (var i = 0; i < data.length; i++) {
  1874. var TableCode = data[i].TableCode;
  1875. if (TableCode == "ICSTransferApplication") {
  1876. var Code = data[i].Code;
  1877. var Name = data[i].Name;
  1878. var obj = new Array();
  1879. obj = {
  1880. label: Name,
  1881. name: Code,
  1882. width: 80,
  1883. align: "left"
  1884. }
  1885. cols.push(obj);
  1886. }
  1887. if (TableCode == "ICSInventory") {
  1888. var Code = data[i].Code;
  1889. var Name = data[i].Name;
  1890. var obj = new Array();
  1891. obj = {
  1892. label: Name,
  1893. name: Code,
  1894. width: 80,
  1895. align: "left"
  1896. }
  1897. cols.push(obj);
  1898. //cols1.push(obj);
  1899. }
  1900. }
  1901. }
  1902. _Clos = cols;
  1903. //_Clos1 = cols1;
  1904. }
  1905. });
  1906. }
  1907. //调拨申请单生成条码
  1908. if (Type == '202') {
  1909. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1910. cols.push(collast);
  1911. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1912. cols.push(collast);
  1913. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1914. cols.push(collast);
  1915. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1916. cols.push(collast);
  1917. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1918. cols.push(collast);
  1919. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1920. cols.push(collast);
  1921. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1922. cols.push(collast);
  1923. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1924. cols.push(collast);
  1925. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1926. //cols.push(collast);
  1927. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1928. cols.push(collast);
  1929. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1930. //cols.push(collast);
  1931. $.ajax({
  1932. url: "/Print/SelectTableColumnName?" + Math.random(),
  1933. dataType: "json",
  1934. async: false,
  1935. success: function (data) {
  1936. if (data != null && data.length > 0) {
  1937. DateList = data;
  1938. for (var i = 0; i < data.length; i++) {
  1939. var TableCode = data[i].TableCode;
  1940. if (TableCode == "ICSTransferApplication") {
  1941. var Code = data[i].Code;
  1942. var Name = data[i].Name;
  1943. var obj = new Array();
  1944. obj = {
  1945. label: Name,
  1946. name: Code,
  1947. width: 80,
  1948. align: "left"
  1949. }
  1950. cols.push(obj);
  1951. }
  1952. if (TableCode == "ICSInventory") {
  1953. var Code = data[i].Code;
  1954. var Name = data[i].Name;
  1955. var obj = new Array();
  1956. obj = {
  1957. label: Name,
  1958. name: Code,
  1959. width: 80,
  1960. align: "left"
  1961. }
  1962. cols.push(obj);
  1963. //cols1.push(obj);
  1964. }
  1965. }
  1966. }
  1967. _Clos = cols;
  1968. //_Clos1 = cols1;
  1969. }
  1970. });
  1971. }
  1972. //一步调入单生成条码
  1973. if (Type == '203') {
  1974. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1975. cols.push(collast);
  1976. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1977. cols.push(collast);
  1978. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1979. cols.push(collast);
  1980. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1981. cols.push(collast);
  1982. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1983. cols.push(collast);
  1984. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1985. cols.push(collast);
  1986. var collast = { label: '最小包装量', name: 'MPQ', width: 100, align: 'left', editable: true, editrules: { number: true } };
  1987. cols.push(collast);
  1988. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1989. cols.push(collast);
  1990. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1991. cols.push(collast);
  1992. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1993. //cols.push(collast);
  1994. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1995. cols.push(collast);
  1996. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1997. //cols.push(collast);
  1998. $.ajax({
  1999. url: "/Print/SelectTableColumnName?" + Math.random(),
  2000. dataType: "json",
  2001. async: false,
  2002. success: function (data) {
  2003. if (data != null && data.length > 0) {
  2004. DateList = data;
  2005. for (var i = 0; i < data.length; i++) {
  2006. var TableCode = data[i].TableCode;
  2007. if (TableCode == "ICSTransferApplication") {
  2008. var Code = data[i].Code;
  2009. var Name = data[i].Name;
  2010. var obj = new Array();
  2011. obj = {
  2012. label: Name,
  2013. name: Code,
  2014. width: 80,
  2015. align: "left"
  2016. }
  2017. cols.push(obj);
  2018. }
  2019. if (TableCode == "ICSInventory") {
  2020. var Code = data[i].Code;
  2021. var Name = data[i].Name;
  2022. var obj = new Array();
  2023. obj = {
  2024. label: Name,
  2025. name: Code,
  2026. width: 80,
  2027. align: "left"
  2028. }
  2029. cols.push(obj);
  2030. //cols1.push(obj);
  2031. }
  2032. }
  2033. }
  2034. _Clos = cols;
  2035. //_Clos1 = cols1;
  2036. }
  2037. });
  2038. }
  2039. if (Type=='17') {
  2040. var cols1 = new Array();
  2041. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  2042. cols1.push(collast1);
  2043. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  2044. cols1.push(collast1);
  2045. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  2046. cols1.push(collast1);
  2047. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  2048. cols1.push(collast1);
  2049. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  2050. cols1.push(collast1);
  2051. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  2052. cols1.push(collast1);
  2053. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  2054. cols1.push(collast1);
  2055. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  2056. cols1.push(collast1);
  2057. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  2058. cols1.push(collast1);
  2059. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  2060. cols1.push(collast1);
  2061. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  2062. cols1.push(collast1);
  2063. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  2064. cols1.push(collast1);
  2065. var collast1 = { label: '是否打印', name: 'isPrint', width: 150, align: 'left' };
  2066. cols1.push(collast1);
  2067. } else {
  2068. var cols1 = new Array();
  2069. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  2070. cols1.push(collast1);
  2071. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  2072. cols1.push(collast1);
  2073. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  2074. cols1.push(collast1);
  2075. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  2076. cols1.push(collast1);
  2077. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  2078. cols1.push(collast1);
  2079. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  2080. cols1.push(collast1);
  2081. //var collast1 = { label: '炉批号', name: 'EATTRIBUTE4', width: 100, align: 'left' };
  2082. //cols1.push(collast1);
  2083. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  2084. cols1.push(collast1);
  2085. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  2086. cols1.push(collast1);
  2087. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  2088. cols1.push(collast1);
  2089. var collast1 = { label: '备注', name: 'EATTRIBUTE5', width: 100, align: 'left' };
  2090. cols1.push(collast1);
  2091. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  2092. cols1.push(collast1);
  2093. var collast1 = { label: '是否检验', name: 'isInspection', width: 100, align: 'left' };
  2094. cols1.push(collast1);
  2095. var collast1 = { label: '免检', name: 'isExemption', width: 100, align: 'left' };
  2096. cols1.push(collast1);
  2097. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  2098. cols1.push(collast1);
  2099. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  2100. cols1.push(collast1);
  2101. var collast1 = { label: '是否打印', name: 'isPrint', width: 150, align: 'left' };
  2102. cols1.push(collast1);
  2103. }
  2104. if (data != null && data.length > 0) {
  2105. DateList = data;
  2106. for (var i = 0; i < data.length; i++) {
  2107. var ColName = data[i].ColName;
  2108. var ColCode = data[i].ColCode;
  2109. var obj = new Array();
  2110. if (ColCode == 'BatchCode' && Type == '12') {
  2111. }
  2112. else {
  2113. obj = {
  2114. label: ColName,
  2115. name: ColCode,
  2116. width: 80,
  2117. align: "left"
  2118. }
  2119. cols.push(obj);
  2120. cols1.push(obj);
  2121. }
  2122. }
  2123. }
  2124. _Clos = cols;
  2125. _Clos1 = cols1;
  2126. }
  2127. });
  2128. }
  2129. //生产退料
  2130. function gridList() {
  2131. var $gridList = $("#gridList");
  2132. var queryJson = {
  2133. POCode: $("#txt_POCode").val(),
  2134. InvCode: $("#txt_InvCode").val(),
  2135. InvName: $("#txt_InvName").val(),
  2136. BatchCode: $("#txt_BatchCode").val(),
  2137. FromTime: $("#FromTime").val(),
  2138. ToTime: $("#ToTime").val(),
  2139. POStatus: $("#selShow").val()
  2140. }
  2141. $gridList.dataGrid({
  2142. url: "/PNWMS/WMSCreateItemLot/GetGridJson" + "?" + Math.random(),
  2143. postData: { queryJson: JSON.stringify(queryJson) },
  2144. height: $(window).height() - 200,
  2145. width: $(window).width() - 300,
  2146. colModel: _Clos,
  2147. //colModel: [
  2148. // { label: "主键", name: "ID", hidden: true, key: true },
  2149. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  2150. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2151. // { label: '工单子件', name: 'SourceDetailID', hidden: true, },
  2152. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2153. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  2154. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2155. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2156. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2157. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2158. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2159. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2160. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2161. //],
  2162. //colModel: ColModelMain,
  2163. width: "100%",
  2164. autowidth: true,
  2165. //shrinkToFit: true,
  2166. gridComplete: function () {
  2167. },
  2168. pager: "#gridPager",
  2169. sortname: " MTIME ,ApplyNegCode desc,REPLICATE('0',10-len(Sequence))+Sequence  ",
  2170. // sortname: 'ApplyNegCode ',
  2171. //let str = `He said, "It's a 'beautiful' day."`,
  2172. sortorder: "desc",
  2173. viewrecords: true,
  2174. multiselect: true,
  2175. //beforeSelectRow: function (rowid, e) {
  2176. // $("#gridList").jqGrid('resetSelection');
  2177. // return (true);
  2178. //},
  2179. subGrid: true, // (1)开启子表格支持
  2180. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2181. $("#gridList").jqGrid("setSelection", rowid, false);
  2182. bindSubGrid(subgrid_id, rowid)
  2183. }
  2184. });
  2185. $("#warehouse a.btn-default").click(function () {
  2186. $("#warehouse a.btn-default").removeClass("active");
  2187. $(this).addClass("active");
  2188. $('#btn_search').trigger("click");
  2189. });
  2190. $("#btn_search").click(function () {
  2191. var warehouse = $("#warehouse a.active").attr('data-value');
  2192. var queryJson = {
  2193. POCode: $("#txt_POCode").val(),
  2194. InvCode: $("#txt_InvCode").val(),
  2195. InvName: $("#txt_InvName").val(),
  2196. BatchCode: $("#txt_BatchCode").val(),
  2197. FromTime: $("#FromTime").val(),
  2198. ToTime: $("#ToTime").val(),
  2199. POStatus: $("#selShow").val()
  2200. }
  2201. $gridList.jqGrid('setGridParam', {
  2202. postData: { queryJson: JSON.stringify(queryJson) },
  2203. }).trigger('reloadGrid');
  2204. });
  2205. }
  2206. function bindSubGrid(subgrid_id, rowid) {
  2207. $("#gridList").jqGrid("setSelection", rowid, false);
  2208. var subgrid_table_id;
  2209. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2210. var subgrid_pager_id;
  2211. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2212. // (5)动态添加子报表的table和pager
  2213. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2214. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  2215. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2216. // (6)创建jqGrid对象
  2217. $("#" + subgrid_table_id).dataGrid({
  2218. cellEdit: true,
  2219. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2220. //colModel: [
  2221. // { label: "主键", name: "ID", hidden: true, key: true },
  2222. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2223. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2224. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2225. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2226. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2227. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2228. //],
  2229. colModel: _Clos1,
  2230. //colModel: ColModelSub,
  2231. shrinkToFit: true,//宽度自适应
  2232. multiselect: true,
  2233. prmNames: { search: "search" },
  2234. viewrecords: true,
  2235. height: "100%",
  2236. rowNum: 20,
  2237. pager: subgrid_pager_id,
  2238. });
  2239. }
  2240. //委外退料
  2241. function gridList2() {
  2242. var $gridList = $("#gridList");
  2243. var queryJson = {
  2244. POCode: $("#txt_POCode").val(),
  2245. InvCode: $("#txt_InvCode").val(),
  2246. InvName: $("#txt_InvName").val(),
  2247. BatchCode: $("#txt_BatchCode").val(),
  2248. FromTime: $("#FromTime").val(),
  2249. ToTime: $("#ToTime").val(),
  2250. WHCode: $("#txt_WHCode").val(),
  2251. POStatus: $("#selShow").val()
  2252. }
  2253. $gridList.dataGrid({
  2254. url: "/PNWMS/WMSCreateItemLot/GetGridJsonWeiWai" + "?" + Math.random(),
  2255. postData: { queryJson: JSON.stringify(queryJson) },
  2256. height: $(window).height() - 200,
  2257. width: $(window).width() - 300,
  2258. colModel: _Clos,
  2259. //colModel: [
  2260. // { label: "主键", name: "ID", hidden: true, key: true },
  2261. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  2262. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2263. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  2264. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2265. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  2266. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2267. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2268. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2269. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2270. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2271. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2272. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2273. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2274. //],
  2275. //colModel: ColModelMain,
  2276. width: "100%",
  2277. autowidth: true,
  2278. //shrinkToFit: true,
  2279. gridComplete: function () {
  2280. },
  2281. pager: "#gridPager",
  2282. // sortname: 'OApplyNegCode,cast(Sequence as int)',
  2283. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2284. sortorder: "desc",
  2285. viewrecords: true,
  2286. multiselect: true,
  2287. //beforeSelectRow: function (rowid, e) {
  2288. // $("#gridList").jqGrid('resetSelection');
  2289. // return (true);
  2290. //},
  2291. subGrid: true, // (1)开启子表格支持
  2292. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2293. $("#gridList").jqGrid("setSelection", rowid, false);
  2294. bindSubGrid2(subgrid_id, rowid)
  2295. }
  2296. });
  2297. $("#warehouse a.btn-default").click(function () {
  2298. $("#warehouse a.btn-default").removeClass("active");
  2299. $(this).addClass("active");
  2300. $('#btn_search').trigger("click");
  2301. });
  2302. $("#btn_search").click(function () {
  2303. var warehouse = $("#warehouse a.active").attr('data-value');
  2304. var queryJson = {
  2305. POCode: $("#txt_POCode").val(),
  2306. InvCode: $("#txt_InvCode").val(),
  2307. InvName: $("#txt_InvName").val(),
  2308. BatchCode: $("#txt_BatchCode").val(),
  2309. FromTime: $("#FromTime").val(),
  2310. ToTime: $("#ToTime").val(),
  2311. WHCode: $("#txt_WHCode").val(),
  2312. POStatus: $("#selShow").val()
  2313. }
  2314. $gridList.jqGrid('setGridParam', {
  2315. postData: { queryJson: JSON.stringify(queryJson) },
  2316. }).trigger('reloadGrid');
  2317. });
  2318. }
  2319. function bindSubGrid2(subgrid_id, rowid) {
  2320. $("#gridList").jqGrid("setSelection", rowid, false);
  2321. var subgrid_table_id;
  2322. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2323. var subgrid_pager_id;
  2324. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2325. // (5)动态添加子报表的table和pager
  2326. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2327. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  2328. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2329. // (6)创建jqGrid对象
  2330. $("#" + subgrid_table_id).dataGrid({
  2331. cellEdit: true,
  2332. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2333. //colModel: [
  2334. // { label: "主键", name: "ID", hidden: true, key: true },
  2335. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2336. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2337. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2338. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2339. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2340. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2341. //],
  2342. colModel: _Clos1,
  2343. //colModel: ColModelSub,
  2344. shrinkToFit: true,//宽度自适应
  2345. multiselect: true,
  2346. prmNames: { search: "search" },
  2347. viewrecords: true,
  2348. height: "100%",
  2349. rowNum: 20,
  2350. pager: subgrid_pager_id,
  2351. });
  2352. }
  2353. //成品
  2354. function gridList3() {
  2355. var $gridList = $("#gridList");
  2356. var queryJson = {
  2357. POCode: $("#txt_POCode").val(),
  2358. InvCode: $("#txt_InvCode").val(),
  2359. InvName: $("#txt_InvName").val(),
  2360. BatchCode: $("#txt_BatchCode").val(),
  2361. FromTime: $("#FromTime").val(),
  2362. ToTime: $("#ToTime").val(),
  2363. WHCode: $("#txt_WHCode").val(),
  2364. POStatus: $("#selShow").val(),
  2365. SelGDLX: $("#SelGDLX option:checked").val(),
  2366. WHStatus: $("#selStatus").val(),
  2367. InvStd: $("#txt_InvStd").val(),
  2368. ClassGroup: $("#selClassGroup").val(),
  2369. }
  2370. $gridList.dataGrid({
  2371. url: "/PNWMS/WMSCreateItemLot/GetGridJsonChengPing" + "?" + Math.random(),
  2372. postData: { queryJson: JSON.stringify(queryJson) },
  2373. height: $(window).height() - 200,
  2374. width: $(window).width() - 300,
  2375. colModel: _Clos,
  2376. //colModel: [
  2377. // { label: "主键", name: "ID", hidden: true, key: true },
  2378. // { label: '工单号', name: 'MOCode', width: 120, align: 'left' },
  2379. // { label: '工单行号', name: 'Sequence', width: 50, align: 'left' },
  2380. // { label: '已入库数量', name: 'RCVQuantity', hidden: true, },
  2381. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2382. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  2383. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2384. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2385. // {
  2386. // label: "状态", name: "MOStatus", width: 60, align: "left",
  2387. // formatter: function (cellvalue) {
  2388. // if (cellvalue == "1") {
  2389. // return "初始";
  2390. // } else if (cellvalue == "2") {
  2391. // return "下发";
  2392. // }
  2393. // else if (cellvalue == "3") {
  2394. // return "关单";
  2395. // }
  2396. // else { return ""; }
  2397. // }
  2398. // },
  2399. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2400. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2401. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2402. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2403. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2404. // { label: '可入库数量', name: 'ERPNum', width: 100, align: 'left' },
  2405. //],
  2406. //colModel: ColModelMain,
  2407. width: "100%",
  2408. cellEdit: true,
  2409. cellsubmit: "clientArray",
  2410. autowidth: true,
  2411. //shrinkToFit: true,
  2412. gridComplete: function () {
  2413. },
  2414. pager: "#gridPager",
  2415. //sortname: 'MOCode,cast(Sequence as int)',
  2416. sortname: "MOCode desc,REPLICATE('0',10-len(Sequence))+Sequence ",
  2417. // sortorder: "asc",
  2418. viewrecords: true,
  2419. multiselect: true,
  2420. //beforeSelectRow: function (rowid, e) {
  2421. // $("#gridList").jqGrid('resetSelection');
  2422. // return (true);
  2423. //},
  2424. subGrid: true, // (1)开启子表格支持
  2425. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2426. $("#gridList").jqGrid("setSelection", rowid, false);
  2427. bindSubGrid3(subgrid_id, rowid)
  2428. }
  2429. });
  2430. $("#warehouse a.btn-default").click(function () {
  2431. $("#warehouse a.btn-default").removeClass("active");
  2432. $(this).addClass("active");
  2433. $('#btn_search').trigger("click");
  2434. });
  2435. $("#btn_search").click(function () {
  2436. var warehouse = $("#warehouse a.active").attr('data-value');
  2437. var queryJson = {
  2438. POCode: $("#txt_POCode").val(),
  2439. InvCode: $("#txt_InvCode").val(),
  2440. InvName: $("#txt_InvName").val(),
  2441. BatchCode: $("#txt_BatchCode").val(),
  2442. FromTime: $("#FromTime").val(),
  2443. ToTime: $("#ToTime").val(),
  2444. WHCode: $("#txt_WHCode").val(),
  2445. POStatus: $("#selShow").val(),
  2446. SelGDLX: $("#SelGDLX option:checked").val(),
  2447. WHStatus: $("#selStatus").val(),
  2448. InvStd: $("#txt_InvStd").val(),
  2449. ClassGroup: $("#selClassGroup").val(),
  2450. }
  2451. $gridList.jqGrid('setGridParam', {
  2452. postData: { queryJson: JSON.stringify(queryJson) },
  2453. }).trigger('reloadGrid');
  2454. });
  2455. }
  2456. function bindSubGrid3(subgrid_id, rowid) {
  2457. $("#gridList").jqGrid("setSelection", rowid, false);
  2458. var subgrid_table_id;
  2459. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2460. var subgrid_pager_id;
  2461. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2462. // (5)动态添加子报表的table和pager
  2463. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2464. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  2465. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2466. var isPrint = $("#selPrint").val();
  2467. // (6)创建jqGrid对象
  2468. $("#" + subgrid_table_id).dataGrid({
  2469. cellEdit: true,
  2470. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2471. //colModel: [
  2472. // { label: "主键", name: "ID", hidden: true, key: true },
  2473. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2474. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2475. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2476. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2477. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2478. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2479. //],
  2480. colModel: _Clos1,
  2481. //colModel: ColModelSub,
  2482. shrinkToFit: true,//宽度自适应
  2483. multiselect: true,
  2484. prmNames: { search: "search" },
  2485. viewrecords: true,
  2486. height: "100%",
  2487. rowNum: 20,
  2488. pager: subgrid_pager_id,
  2489. });
  2490. }
  2491. //销售退货
  2492. function gridList4() {
  2493. var $gridList = $("#gridList");
  2494. var queryJson = {
  2495. POCode: $("#txt_POCode").val(),
  2496. InvCode: $("#txt_InvCode").val(),
  2497. InvName: $("#txt_InvName").val(),
  2498. BatchCode: $("#txt_BatchCode").val(),
  2499. POStatus: $("#selShow").val()
  2500. }
  2501. $gridList.dataGrid({
  2502. url: "/PNWMS/WMSCreateItemLot/GetGridJsonXiaoShou" + "?" + Math.random(),
  2503. postData: { queryJson: JSON.stringify(queryJson) },
  2504. height: $(window).height() - 200,
  2505. width: $(window).width() - 300,
  2506. colModel: _Clos,
  2507. //colModel: [
  2508. // { label: "主键", name: "ID", hidden: true, key: true },
  2509. // { label: '单据号', name: 'SDNCode', width: 120, align: 'left' },
  2510. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2511. // { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' },
  2512. // { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' },
  2513. // { label: '客户代码', name: 'CusCode', width: 120, align: 'left' },
  2514. // { label: '客户名称', name: 'CusName', width: 50, align: 'left' },
  2515. // { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' },
  2516. // { label: '已发数量', name: 'SDNQuantity', width: 50, align: 'left' },
  2517. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2518. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  2519. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2520. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2521. // {
  2522. // label: "状态", name: "Status", width: 60, align: "left",
  2523. // formatter: function (cellvalue) {
  2524. // if (cellvalue == "1") {
  2525. // return "开立";
  2526. // } else if (cellvalue == "2") {
  2527. // return "审核";
  2528. // }
  2529. // else if (cellvalue == "3") {
  2530. // return "关闭";
  2531. // }
  2532. // else { return ""; }
  2533. // }
  2534. // },
  2535. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2536. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2537. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2538. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2539. //],
  2540. //colModel: ColModelMain,
  2541. width: "100%",
  2542. autowidth: true,
  2543. //shrinkToFit: true,
  2544. gridComplete: function () {
  2545. },
  2546. pager: "#gridPager",
  2547. // sortname: 'SDNCode,cast(Sequence as int)',
  2548. sortname: "SDNCode,REPLICATE('0',10-len(Sequence))+Sequence",
  2549. sortorder: "desc",
  2550. viewrecords: true,
  2551. multiselect: true,
  2552. //beforeSelectRow: function (rowid, e) {
  2553. // $("#gridList").jqGrid('resetSelection');
  2554. // return (true);
  2555. //},
  2556. subGrid: true, // (1)开启子表格支持
  2557. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2558. $("#gridList").jqGrid("setSelection", rowid, false);
  2559. bindSubGrid4(subgrid_id, rowid)
  2560. }
  2561. });
  2562. $("#warehouse a.btn-default").click(function () {
  2563. $("#warehouse a.btn-default").removeClass("active");
  2564. $(this).addClass("active");
  2565. $('#btn_search').trigger("click");
  2566. });
  2567. $("#btn_search").click(function () {
  2568. var warehouse = $("#warehouse a.active").attr('data-value');
  2569. var queryJson = {
  2570. POCode: $("#txt_POCode").val(),
  2571. InvCode: $("#txt_InvCode").val(),
  2572. InvName: $("#txt_InvName").val(),
  2573. BatchCode: $("#txt_BatchCode").val(),
  2574. POStatus: $("#selShow").val()
  2575. }
  2576. $gridList.jqGrid('setGridParam', {
  2577. postData: { queryJson: JSON.stringify(queryJson) },
  2578. }).trigger('reloadGrid');
  2579. });
  2580. }
  2581. function bindSubGrid4(subgrid_id, rowid) {
  2582. $("#gridList").jqGrid("setSelection", rowid, false);
  2583. var subgrid_table_id;
  2584. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2585. var subgrid_pager_id;
  2586. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2587. // (5)动态添加子报表的table和pager
  2588. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2589. var SDNCode = $("#gridList").jqGrid('getRowData', rowid).SDNCode;
  2590. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2591. var isPrint = $("#selPrint").val();
  2592. // (6)创建jqGrid对象
  2593. $("#" + subgrid_table_id).dataGrid({
  2594. cellEdit: true,
  2595. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SDNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2596. //colModel: [
  2597. // { label: "主键", name: "ID", hidden: true, key: true },
  2598. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2599. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2600. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2601. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2602. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2603. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2604. //],
  2605. colModel: _Clos1,
  2606. //colModel: ColModelSub,
  2607. shrinkToFit: true,//宽度自适应
  2608. multiselect: true,
  2609. prmNames: { search: "search" },
  2610. viewrecords: true,
  2611. height: "100%",
  2612. rowNum: 20,
  2613. pager: subgrid_pager_id,
  2614. });
  2615. }
  2616. //其它入库生成条码
  2617. function gridList5() {
  2618. var $gridList = $("#gridList");
  2619. var queryJson = {
  2620. POCode: $("#txt_POCode").val(),
  2621. InvCode: $("#txt_InvCode").val(),
  2622. InvName: $("#txt_InvName").val(),
  2623. BatchCode: $("#txt_BatchCode").val(),
  2624. FromTime: $("#FromTime").val(),
  2625. ToTime: $("#ToTime").val(),
  2626. WHCode: $("#txt_WHCode").val(),
  2627. POStatus: $("#selShow").val(),
  2628. InvStd: $("#txt_InvStd").val(),
  2629. }
  2630. $gridList.dataGrid({
  2631. url: "/PNWMS/WMSCreateItemLot/GetGridJsonQiTa" + "?" + Math.random(),
  2632. postData: { queryJson: JSON.stringify(queryJson) },
  2633. height: $(window).height() - 200,
  2634. width: $(window).width() - 300,
  2635. colModel: _Clos,
  2636. //colModel: [
  2637. // { label: "主键", name: "ID", hidden: true, key: true },
  2638. // { label: '单据号', name: 'InCode', width: 120, align: 'left' },
  2639. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2640. // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' },
  2641. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2642. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2643. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2644. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2645. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2646. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2647. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2648. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2649. // { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', },
  2650. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2651. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2652. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2653. //],
  2654. //colModel: ColModelMain,
  2655. width: "100%",
  2656. autowidth: true,
  2657. //shrinkToFit: true,
  2658. gridComplete: function () {
  2659. },
  2660. pager: "#gridPager",
  2661. sortname: 'InCode ',
  2662. sortorder: "desc",
  2663. viewrecords: true,
  2664. multiselect: true,
  2665. //beforeSelectRow: function (rowid, e) {
  2666. // $("#gridList").jqGrid('resetSelection');
  2667. // return (true);
  2668. //},
  2669. subGrid: true, // (1)开启子表格支持
  2670. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2671. $("#gridList").jqGrid("setSelection", rowid, false);
  2672. bindSubGrid5(subgrid_id, rowid)
  2673. }
  2674. });
  2675. $("#warehouse a.btn-default").click(function () {
  2676. $("#warehouse a.btn-default").removeClass("active");
  2677. $(this).addClass("active");
  2678. $('#btn_search').trigger("click");
  2679. });
  2680. $("#btn_search").click(function () {
  2681. var warehouse = $("#warehouse a.active").attr('data-value');
  2682. var queryJson = {
  2683. POCode: $("#txt_POCode").val(),
  2684. InvCode: $("#txt_InvCode").val(),
  2685. InvName: $("#txt_InvName").val(),
  2686. BatchCode: $("#txt_BatchCode").val(),
  2687. FromTime: $("#FromTime").val(),
  2688. ToTime: $("#ToTime").val(),
  2689. WHCode: $("#txt_WHCode").val(),
  2690. POStatus: $("#selShow").val(),
  2691. InvStd: $("#txt_InvStd").val(),
  2692. }
  2693. $gridList.jqGrid('setGridParam', {
  2694. postData: { queryJson: JSON.stringify(queryJson) },
  2695. }).trigger('reloadGrid');
  2696. });
  2697. }
  2698. function bindSubGrid5(subgrid_id, rowid) {
  2699. $("#gridList").jqGrid("setSelection", rowid, false);
  2700. var subgrid_table_id;
  2701. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2702. var subgrid_pager_id;
  2703. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2704. // (5)动态添加子报表的table和pager
  2705. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2706. var InCode = $("#gridList").jqGrid('getRowData', rowid).InCode;
  2707. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2708. var isPrint = $("#selPrint").val();
  2709. // (6)创建jqGrid对象
  2710. $("#" + subgrid_table_id).dataGrid({
  2711. cellEdit: true,
  2712. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + InCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2713. //colModel: [
  2714. // { label: "主键", name: "ID", hidden: true, key: true },
  2715. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2716. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2717. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2718. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2719. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2720. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2721. //],
  2722. colModel: _Clos1,
  2723. //colModel: ColModelSub,
  2724. shrinkToFit: true,//宽度自适应
  2725. multiselect: true,
  2726. prmNames: { search: "search" },
  2727. viewrecords: true,
  2728. height: "100%",
  2729. rowNum: 20,
  2730. pager: subgrid_pager_id,
  2731. });
  2732. }
  2733. //归还单生成条码
  2734. function gridList6() {
  2735. var $gridList = $("#gridList");
  2736. var queryJson = {
  2737. POCode: $("#txt_POCode").val(),
  2738. InvCode: $("#txt_InvCode").val(),
  2739. InvName: $("#txt_InvName").val(),
  2740. BatchCode: $("#txt_BatchCode").val(),
  2741. POStatus: $("#selShow").val()
  2742. }
  2743. $gridList.dataGrid({
  2744. url: "/PNWMS/WMSCreateItemLot/GetGridJsonGuiHuan" + "?" + Math.random(),
  2745. postData: { queryJson: JSON.stringify(queryJson) },
  2746. height: $(window).height() - 200,
  2747. width: $(window).width() - 300,
  2748. colModel: _Clos,
  2749. //colModel: [
  2750. // { label: "主键", name: "ID", hidden: true, key: true },
  2751. // { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' },
  2752. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2753. // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' },
  2754. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2755. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2756. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2757. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2758. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2759. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2760. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2761. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2762. // { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', },
  2763. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2764. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2765. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2766. //],
  2767. //colModel: ColModelMain,
  2768. width: "100%",
  2769. autowidth: true,
  2770. //shrinkToFit: true,
  2771. gridComplete: function () {
  2772. },
  2773. pager: "#gridPager",
  2774. /// sortname: 'ReturnCode,cast(Sequence as int)',
  2775. sortname: "ReturnCode,REPLICATE('0',10-len(Sequence))+Sequence",
  2776. sortorder: "desc",
  2777. viewrecords: true,
  2778. multiselect: true,
  2779. //beforeSelectRow: function (rowid, e) {
  2780. // $("#gridList").jqGrid('resetSelection');
  2781. // return (true);
  2782. //},
  2783. subGrid: true, // (1)开启子表格支持
  2784. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2785. $("#gridList").jqGrid("setSelection", rowid, false);
  2786. bindSubGrid6(subgrid_id, rowid)
  2787. }
  2788. });
  2789. $("#warehouse a.btn-default").click(function () {
  2790. $("#warehouse a.btn-default").removeClass("active");
  2791. $(this).addClass("active");
  2792. $('#btn_search').trigger("click");
  2793. });
  2794. $("#btn_search").click(function () {
  2795. var warehouse = $("#warehouse a.active").attr('data-value');
  2796. var queryJson = {
  2797. POCode: $("#txt_POCode").val(),
  2798. InvCode: $("#txt_InvCode").val(),
  2799. InvName: $("#txt_InvName").val(),
  2800. BatchCode: $("#txt_BatchCode").val(),
  2801. POStatus: $("#selShow").val()
  2802. }
  2803. $gridList.jqGrid('setGridParam', {
  2804. postData: { queryJson: JSON.stringify(queryJson) },
  2805. }).trigger('reloadGrid');
  2806. });
  2807. }
  2808. function bindSubGrid6(subgrid_id, rowid) {
  2809. $("#gridList").jqGrid("setSelection", rowid, false);
  2810. var subgrid_table_id;
  2811. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2812. var subgrid_pager_id;
  2813. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2814. // (5)动态添加子报表的table和pager
  2815. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2816. var ReturnCode = $("#gridList").jqGrid('getRowData', rowid).ReturnCode;
  2817. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2818. // (6)创建jqGrid对象
  2819. $("#" + subgrid_table_id).dataGrid({
  2820. cellEdit: true,
  2821. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ReturnCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2822. //colModel: [
  2823. // { label: "主键", name: "ID", hidden: true, key: true },
  2824. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2825. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2826. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2827. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2828. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2829. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2830. //],
  2831. colModel: _Clos1,
  2832. //colModel: ColModelSub,
  2833. shrinkToFit: true,//宽度自适应
  2834. multiselect: true,
  2835. prmNames: { search: "search" },
  2836. viewrecords: true,
  2837. height: "100%",
  2838. rowNum: 20,
  2839. pager: subgrid_pager_id,
  2840. });
  2841. }
  2842. //*审核到货单生成条码
  2843. function gridList7() {
  2844. var $gridList = $("#gridList");
  2845. var queryJson = {
  2846. POCode: $("#txt_POCode").val(),
  2847. VenCode: $("#txt_VenCode").val(),
  2848. VenName: $("#txt_VenName").val(),
  2849. InvCode: $("#txt_InvCode").val(),
  2850. InvName: $("#txt_InvName").val(),
  2851. BatchCode: $("#txt_BatchCode").val(),
  2852. POStatus: $("#selShow").val(),
  2853. WHStatus: $("#selStatus").val(),
  2854. InvStd: $("#txt_InvStd").val(),
  2855. }
  2856. $gridList.dataGrid({
  2857. url: "/PNWMS/WMSCreateItemLot/GetGridJsonSHDH" + "?" + Math.random(),
  2858. postData: { queryJson: JSON.stringify(queryJson) },
  2859. height: $(window).height() - 200,
  2860. width: $(window).width() - 300,
  2861. colModel: _Clos,
  2862. //colModel: [
  2863. // { label: "主键", name: "ID", hidden: true, key: true },
  2864. // { label: '单据号', name: 'DNCode', width: 120, align: 'left' },
  2865. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2866. // { label: '采购订单号', name: 'POCode', width: 50, align: 'left' },
  2867. // { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' },
  2868. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  2869. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  2870. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2871. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2872. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2873. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2874. // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' },
  2875. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2876. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2877. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2878. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2879. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  2880. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  2881. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2882. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2883. //],
  2884. //colModel: ColModelMain,
  2885. width: "100%",
  2886. autowidth: true,
  2887. //shrinkToFit: true,
  2888. gridComplete: function () {
  2889. },
  2890. pager: "#gridPager",
  2891. //sortname: 'DNCode,cast(Sequence as int)',
  2892. sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2893. sortorder: "asc",
  2894. viewrecords: true,
  2895. multiselect: true,
  2896. //beforeSelectRow: function (rowid, e) {
  2897. // $("#gridList").jqGrid('resetSelection');
  2898. // return (true);
  2899. //},
  2900. subGrid: true, // (1)开启子表格支持
  2901. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2902. $("#gridList").jqGrid("setSelection", rowid, false);
  2903. bindSubGrid7(subgrid_id, rowid)
  2904. }
  2905. });
  2906. $("#warehouse a.btn-default").click(function () {
  2907. $("#warehouse a.btn-default").removeClass("active");
  2908. $(this).addClass("active");
  2909. $('#btn_search').trigger("click");
  2910. });
  2911. $("#btn_search").click(function () {
  2912. var warehouse = $("#warehouse a.active").attr('data-value');
  2913. var queryJson = {
  2914. POCode: $("#txt_POCode").val(),
  2915. VenCode: $("#txt_VenCode").val(),
  2916. VenName: $("#txt_VenName").val(),
  2917. InvCode: $("#txt_InvCode").val(),
  2918. InvName: $("#txt_InvName").val(),
  2919. BatchCode: $("#txt_BatchCode").val(),
  2920. POStatus: $("#selShow").val(),
  2921. WHStatus: $("#selStatus").val(),
  2922. InvStd: $("#txt_InvStd").val(),
  2923. }
  2924. $gridList.jqGrid('setGridParam', {
  2925. postData: { queryJson: JSON.stringify(queryJson) },
  2926. }).trigger('reloadGrid');
  2927. });
  2928. }
  2929. function bindSubGrid7(subgrid_id, rowid) {
  2930. $("#gridList").jqGrid("setSelection", rowid, false);
  2931. var subgrid_table_id;
  2932. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2933. var subgrid_pager_id;
  2934. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2935. // (5)动态添加子报表的table和pager
  2936. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2937. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  2938. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2939. var isPrint = $("#selPrint").val();
  2940. // (6)创建jqGrid对象
  2941. $("#" + subgrid_table_id).dataGrid({
  2942. cellEdit: true,
  2943. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2944. //colModel: [
  2945. // { label: "主键", name: "ID", hidden: true, key: true },
  2946. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2947. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2948. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2949. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2950. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2951. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2952. //],
  2953. colModel: _Clos1,
  2954. //colModel: ColModelSub,
  2955. shrinkToFit: true,//宽度自适应
  2956. multiselect: true,
  2957. prmNames: { search: "search" },
  2958. viewrecords: true,
  2959. height: "100%",
  2960. rowNum: 20,
  2961. pager: subgrid_pager_id,
  2962. });
  2963. }
  2964. //审核委外到货单生成条码
  2965. function gridList8() {
  2966. var $gridList = $("#gridList");
  2967. var queryJson = {
  2968. POCode: $("#txt_POCode").val(),
  2969. VenCode: $("#txt_VenCode").val(),
  2970. VenName: $("#txt_VenName").val(),
  2971. InvCode: $("#txt_InvCode").val(),
  2972. InvName: $("#txt_InvName").val(),
  2973. BatchCode: $("#txt_BatchCode").val(),
  2974. POStatus: $("#selShow").val(),
  2975. WHStatus: $("#selStatus").val(),
  2976. InvStd: $("#txt_InvStd").val(),
  2977. }
  2978. $gridList.dataGrid({
  2979. url: "/PNWMS/WMSCreateItemLot/GetGridJsonWWSHDH" + "?" + Math.random(),
  2980. postData: { queryJson: JSON.stringify(queryJson) },
  2981. height: $(window).height() - 200,
  2982. width: $(window).width() - 300,
  2983. colModel: _Clos,
  2984. //colModel: [
  2985. // { label: "主键", name: "ID", hidden: true, key: true },
  2986. // { label: '单据号', name: 'ODNCode', width: 120, align: 'left' },
  2987. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2988. // { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' },
  2989. // { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' },
  2990. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  2991. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  2992. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2993. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2994. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2995. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2996. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2997. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2998. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2999. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3000. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3001. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3002. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  3003. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3004. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3005. //],
  3006. //colModel: ColModelMain,
  3007. width: "100%",
  3008. autowidth: true,
  3009. //shrinkToFit: true,
  3010. gridComplete: function () {
  3011. },
  3012. pager: "#gridPager",
  3013. //sortname: 'ODNCode,cast(Sequence as int)',
  3014. sortname: "ODNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3015. sortorder: "asc",
  3016. viewrecords: true,
  3017. multiselect: true,
  3018. //beforeSelectRow: function (rowid, e) {
  3019. // $("#gridList").jqGrid('resetSelection');
  3020. // return (true);
  3021. //},
  3022. subGrid: true, // (1)开启子表格支持
  3023. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3024. $("#gridList").jqGrid("setSelection", rowid, false);
  3025. bindSubGrid8(subgrid_id, rowid)
  3026. }
  3027. });
  3028. $("#warehouse a.btn-default").click(function () {
  3029. $("#warehouse a.btn-default").removeClass("active");
  3030. $(this).addClass("active");
  3031. $('#btn_search').trigger("click");
  3032. });
  3033. $("#btn_search").click(function () {
  3034. var warehouse = $("#warehouse a.active").attr('data-value');
  3035. var queryJson = {
  3036. POCode: $("#txt_POCode").val(),
  3037. VenCode: $("#txt_VenCode").val(),
  3038. VenName: $("#txt_VenName").val(),
  3039. InvCode: $("#txt_InvCode").val(),
  3040. InvName: $("#txt_InvName").val(),
  3041. BatchCode: $("#txt_BatchCode").val(),
  3042. POStatus: $("#selShow").val(),
  3043. WHStatus: $("#selStatus").val(),
  3044. InvStd: $("#txt_InvStd").val(),
  3045. }
  3046. $gridList.jqGrid('setGridParam', {
  3047. postData: { queryJson: JSON.stringify(queryJson) },
  3048. }).trigger('reloadGrid');
  3049. });
  3050. }
  3051. function bindSubGrid8(subgrid_id, rowid) {
  3052. $("#gridList").jqGrid("setSelection", rowid, false);
  3053. var subgrid_table_id;
  3054. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3055. var subgrid_pager_id;
  3056. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3057. // (5)动态添加子报表的table和pager
  3058. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3059. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).ODNCode;
  3060. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3061. var isPrint = $("#selPrint").val();
  3062. // (6)创建jqGrid对象
  3063. $("#" + subgrid_table_id).dataGrid({
  3064. cellEdit: true,
  3065. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3066. //colModel: [
  3067. // { label: "主键", name: "ID", hidden: true, key: true },
  3068. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3069. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3070. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3071. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3072. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3073. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3074. //],
  3075. colModel: _Clos1,
  3076. //colModel: ColModelSub,
  3077. shrinkToFit: true,//宽度自适应
  3078. multiselect: true,
  3079. prmNames: { search: "search" },
  3080. viewrecords: true,
  3081. height: "100%",
  3082. rowNum: 20,
  3083. pager: subgrid_pager_id,
  3084. });
  3085. }
  3086. //开立得成品入库单 生成条码
  3087. function gridList9() {
  3088. var $gridList = $("#gridList");
  3089. var queryJson = {
  3090. POCode: $("#txt_POCode").val(),
  3091. InvCode: $("#txt_InvCode").val(),
  3092. InvName: $("#txt_InvName").val(),
  3093. BatchCode: $("#txt_BatchCode").val(),
  3094. POStatus: $("#selShow").val(),
  3095. SCode: $("#txt_SCode").val(),
  3096. }
  3097. $gridList.dataGrid({
  3098. url: "/PNWMS/WMSCreateItemLot/GetGridJsonKLCPRK" + "?" + Math.random(),
  3099. postData: { queryJson: JSON.stringify(queryJson) },
  3100. height: $(window).height() - 200,
  3101. width: $(window).width() - 300,
  3102. colModel: _Clos,
  3103. //colModel: [
  3104. // { label: "主键", name: "ID", hidden: true, key: true },
  3105. // { label: '单据号', name: 'RCVCode', width: 120, align: 'left' },
  3106. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  3107. // { label: '仓库号', name: 'WHCode', width: 120, align: 'left' },
  3108. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  3109. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  3110. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3111. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3112. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  3113. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3114. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3115. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3116. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3117. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3118. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3119. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3120. //],
  3121. //colModel: ColModelMain,
  3122. width: "100%",
  3123. autowidth: true,
  3124. //shrinkToFit: true,
  3125. gridComplete: function () {
  3126. },
  3127. pager: "#gridPager",
  3128. //sortname: 'RCVCode,cast(Sequence as int)',
  3129. sortname: "RCVCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3130. sortorder: "asc",
  3131. viewrecords: true,
  3132. multiselect: true,
  3133. //beforeSelectRow: function (rowid, e) {
  3134. // $("#gridList").jqGrid('resetSelection');
  3135. // return (true);
  3136. //},
  3137. subGrid: true, // (1)开启子表格支持
  3138. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3139. $("#gridList").jqGrid("setSelection", rowid, false);
  3140. bindSubGrid9(subgrid_id, rowid)
  3141. }
  3142. });
  3143. $("#warehouse a.btn-default").click(function () {
  3144. $("#warehouse a.btn-default").removeClass("active");
  3145. $(this).addClass("active");
  3146. $('#btn_search').trigger("click");
  3147. });
  3148. $("#btn_search").click(function () {
  3149. var warehouse = $("#warehouse a.active").attr('data-value');
  3150. var queryJson = {
  3151. POCode: $("#txt_POCode").val(),
  3152. InvCode: $("#txt_InvCode").val(),
  3153. InvName: $("#txt_InvName").val(),
  3154. BatchCode: $("#txt_BatchCode").val(),
  3155. POStatus: $("#selShow").val(),
  3156. SCode: $("#txt_SCode").val(),
  3157. }
  3158. $gridList.jqGrid('setGridParam', {
  3159. postData: { queryJson: JSON.stringify(queryJson) },
  3160. }).trigger('reloadGrid');
  3161. });
  3162. }
  3163. function bindSubGrid9(subgrid_id, rowid) {
  3164. $("#gridList").jqGrid("setSelection", rowid, false);
  3165. var subgrid_table_id;
  3166. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3167. var subgrid_pager_id;
  3168. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3169. // (5)动态添加子报表的table和pager
  3170. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3171. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  3172. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3173. // (6)创建jqGrid对象
  3174. $("#" + subgrid_table_id).dataGrid({
  3175. cellEdit: true,
  3176. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3177. //colModel: [
  3178. // { label: "主键", name: "ID", hidden: true, key: true },
  3179. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3180. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3181. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3182. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3183. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3184. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3185. //],
  3186. colModel: _Clos1,
  3187. //colModel: ColModelSub,
  3188. shrinkToFit: true,//宽度自适应
  3189. multiselect: true,
  3190. prmNames: { search: "search" },
  3191. viewrecords: true,
  3192. height: "100%",
  3193. rowNum: 20,
  3194. pager: subgrid_pager_id,
  3195. });
  3196. }
  3197. //采购拒收单
  3198. function gridList10() {
  3199. var $gridList = $("#gridList");
  3200. var queryJson = {
  3201. POCode: $("#txt_POCode").val(),
  3202. VenCode: $("#txt_VenCode").val(),
  3203. VenName: $("#txt_VenName").val(),
  3204. InvCode: $("#txt_InvCode").val(),
  3205. InvName: $("#txt_InvName").val(),
  3206. BatchCode: $("#txt_BatchCode").val(),
  3207. POStatus: $("#selShow").val()
  3208. }
  3209. $gridList.dataGrid({
  3210. url: "/PNWMS/WMSCreateItemLot/GetGridJsonJSD" + "?" + Math.random(),
  3211. postData: { queryJson: JSON.stringify(queryJson) },
  3212. height: $(window).height() - 200,
  3213. width: $(window).width() - 300,
  3214. colModel: _Clos,
  3215. //colModel: [
  3216. // { label: "主键", name: "ID", hidden: true, key: true },
  3217. // { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' },
  3218. // { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' },
  3219. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  3220. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  3221. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  3222. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  3223. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3224. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3225. // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' },
  3226. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3227. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3228. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3229. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3230. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3231. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  3232. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3233. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3234. //],
  3235. //colModel: ColModelMain,
  3236. width: "100%",
  3237. autowidth: true,
  3238. //shrinkToFit: true,
  3239. gridComplete: function () {
  3240. },
  3241. pager: "#gridPager",
  3242. //sortname: 'DNCode,cast(Sequence as int)',
  3243. sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3244. sortorder: "asc",
  3245. viewrecords: true,
  3246. multiselect: true,
  3247. //beforeSelectRow: function (rowid, e) {
  3248. // $("#gridList").jqGrid('resetSelection');
  3249. // return (true);
  3250. //},
  3251. subGrid: true, // (1)开启子表格支持
  3252. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3253. $("#gridList").jqGrid("setSelection", rowid, false);
  3254. bindSubGrid10(subgrid_id, rowid)
  3255. }
  3256. });
  3257. $("#warehouse a.btn-default").click(function () {
  3258. $("#warehouse a.btn-default").removeClass("active");
  3259. $(this).addClass("active");
  3260. $('#btn_search').trigger("click");
  3261. });
  3262. $("#btn_search").click(function () {
  3263. var warehouse = $("#warehouse a.active").attr('data-value');
  3264. var queryJson = {
  3265. POCode: $("#txt_POCode").val(),
  3266. VenCode: $("#txt_VenCode").val(),
  3267. VenName: $("#txt_VenName").val(),
  3268. InvCode: $("#txt_InvCode").val(),
  3269. InvName: $("#txt_InvName").val(),
  3270. BatchCode: $("#txt_BatchCode").val(),
  3271. POStatus: $("#selShow").val()
  3272. }
  3273. $gridList.jqGrid('setGridParam', {
  3274. postData: { queryJson: JSON.stringify(queryJson) },
  3275. }).trigger('reloadGrid');
  3276. });
  3277. }
  3278. function bindSubGrid10(subgrid_id, rowid) {
  3279. $("#gridList").jqGrid("setSelection", rowid, false);
  3280. var subgrid_table_id;
  3281. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3282. var subgrid_pager_id;
  3283. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3284. // (5)动态添加子报表的table和pager
  3285. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3286. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  3287. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3288. // (6)创建jqGrid对象
  3289. $("#" + subgrid_table_id).dataGrid({
  3290. cellEdit: true,
  3291. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3292. //colModel: [
  3293. // { label: "主键", name: "ID", hidden: true, key: true },
  3294. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3295. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3296. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3297. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3298. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3299. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3300. //],
  3301. colModel: _Clos1,
  3302. //colModel: ColModelSub,
  3303. shrinkToFit: true,//宽度自适应
  3304. multiselect: true,
  3305. prmNames: { search: "search" },
  3306. viewrecords: true,
  3307. height: "100%",
  3308. rowNum: 20,
  3309. pager: subgrid_pager_id,
  3310. });
  3311. }
  3312. //委外拒收单生成条码
  3313. function gridList11() {
  3314. var $gridList = $("#gridList");
  3315. var queryJson = {
  3316. POCode: $("#txt_POCode").val(),
  3317. VenCode: $("#txt_VenCode").val(),
  3318. VenName: $("#txt_VenName").val(),
  3319. InvCode: $("#txt_InvCode").val(),
  3320. InvName: $("#txt_InvName").val(),
  3321. BatchCode: $("#txt_BatchCode").val(),
  3322. POStatus: $("#selShow").val()
  3323. }
  3324. $gridList.dataGrid({
  3325. url: "/PNWMS/WMSCreateItemLot/GetGridJsonWWJSD" + "?" + Math.random(),
  3326. postData: { queryJson: JSON.stringify(queryJson) },
  3327. height: $(window).height() - 200,
  3328. width: $(window).width() - 300,
  3329. colModel: _Clos,
  3330. //colModel: [
  3331. // { label: "主键", name: "ID", hidden: true, key: true },
  3332. // { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' },
  3333. // { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' },
  3334. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  3335. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  3336. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  3337. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  3338. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3339. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3340. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  3341. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3342. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3343. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3344. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3345. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3346. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  3347. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3348. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3349. //],
  3350. //colModel: ColModelMain,
  3351. width: "100%",
  3352. autowidth: true,
  3353. //shrinkToFit: true,
  3354. gridComplete: function () {
  3355. },
  3356. pager: "#gridPager",
  3357. // sortname: 'OOCode,cast(Sequence as int)',
  3358. sortname: "OOCode,REPLICATE('0',10-len(OOSequence))+OOSequence ",
  3359. sortorder: "asc",
  3360. viewrecords: true,
  3361. multiselect: true,
  3362. //beforeSelectRow: function (rowid, e) {
  3363. // $("#gridList").jqGrid('resetSelection');
  3364. // return (true);
  3365. //},
  3366. subGrid: true, // (1)开启子表格支持
  3367. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3368. $("#gridList").jqGrid("setSelection", rowid, false);
  3369. bindSubGrid11(subgrid_id, rowid)
  3370. }
  3371. });
  3372. $("#warehouse a.btn-default").click(function () {
  3373. $("#warehouse a.btn-default").removeClass("active");
  3374. $(this).addClass("active");
  3375. $('#btn_search').trigger("click");
  3376. });
  3377. $("#btn_search").click(function () {
  3378. var warehouse = $("#warehouse a.active").attr('data-value');
  3379. var queryJson = {
  3380. POCode: $("#txt_POCode").val(),
  3381. VenCode: $("#txt_VenCode").val(),
  3382. VenName: $("#txt_VenName").val(),
  3383. InvCode: $("#txt_InvCode").val(),
  3384. InvName: $("#txt_InvName").val(),
  3385. BatchCode: $("#txt_BatchCode").val(),
  3386. POStatus: $("#selShow").val()
  3387. }
  3388. $gridList.jqGrid('setGridParam', {
  3389. postData: { queryJson: JSON.stringify(queryJson) },
  3390. }).trigger('reloadGrid');
  3391. });
  3392. }
  3393. function bindSubGrid11(subgrid_id, rowid) {
  3394. $("#gridList").jqGrid("setSelection", rowid, false);
  3395. var subgrid_table_id;
  3396. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3397. var subgrid_pager_id;
  3398. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3399. // (5)动态添加子报表的table和pager
  3400. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3401. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).OOCode;
  3402. var Sequence = $("#gridList").jqGrid('getRowData', rowid).OOSequence;
  3403. // (6)创建jqGrid对象
  3404. $("#" + subgrid_table_id).dataGrid({
  3405. cellEdit: true,
  3406. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3407. //colModel: [
  3408. // { label: "主键", name: "ID", hidden: true, key: true },
  3409. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3410. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3411. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3412. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3413. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3414. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3415. //],
  3416. colModel: _Clos1,
  3417. //colModel: ColModelSub,
  3418. shrinkToFit: true,//宽度自适应
  3419. multiselect: true,
  3420. prmNames: { search: "search" },
  3421. viewrecords: true,
  3422. height: "100%",
  3423. rowNum: 20,
  3424. pager: subgrid_pager_id,
  3425. });
  3426. }
  3427. //领料申请退料生成条码
  3428. function gridList12() {
  3429. var $gridList = $("#gridList");
  3430. var queryJson = {
  3431. POCode: $("#txt_POCode").val(),
  3432. InvCode: $("#txt_InvCode").val(),
  3433. InvName: $("#txt_InvName").val(),
  3434. BatchCode: $("#txt_BatchCode").val(),
  3435. FromTime: $("#FromTime").val(),
  3436. ToTime: $("#ToTime").val(),
  3437. POStatus: $("#selShow").val()
  3438. }
  3439. $gridList.dataGrid({
  3440. url: "/PNWMS/WMSCreateItemLot/GetGridJsonLLSQTL" + "?" + Math.random(),
  3441. postData: { queryJson: JSON.stringify(queryJson) },
  3442. height: $(window).height() - 200,
  3443. width: $(window).width() - 300,
  3444. colModel: _Clos,
  3445. //colModel: [
  3446. // { label: "主键", name: "ID", hidden: true, key: true },
  3447. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  3448. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3449. // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, },
  3450. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3451. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  3452. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3453. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3454. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3455. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3456. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3457. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3458. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3459. //],
  3460. //colModel: ColModelMain,
  3461. width: "100%",
  3462. autowidth: true,
  3463. cellEdit: true,
  3464. cellsubmit: "clientArray",
  3465. //shrinkToFit: true,
  3466. gridComplete: function () {
  3467. },
  3468. pager: "#gridPager",
  3469. // sortname: 'ApplyNegCode,cast(Sequence as int)',
  3470. sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3471. sortorder: "asc",
  3472. viewrecords: true,
  3473. multiselect: true,
  3474. //beforeSelectRow: function (rowid, e) {
  3475. // $("#gridList").jqGrid('resetSelection');
  3476. // return (true);
  3477. //},
  3478. subGrid: true, // (1)开启子表格支持
  3479. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3480. $("#gridList").jqGrid("setSelection", rowid, false);
  3481. bindSubGrid12(subgrid_id, rowid)
  3482. }
  3483. });
  3484. $("#warehouse a.btn-default").click(function () {
  3485. $("#warehouse a.btn-default").removeClass("active");
  3486. $(this).addClass("active");
  3487. $('#btn_search').trigger("click");
  3488. });
  3489. $("#btn_search").click(function () {
  3490. var warehouse = $("#warehouse a.active").attr('data-value');
  3491. var queryJson = {
  3492. POCode: $("#txt_POCode").val(),
  3493. InvCode: $("#txt_InvCode").val(),
  3494. InvName: $("#txt_InvName").val(),
  3495. BatchCode: $("#txt_BatchCode").val(),
  3496. FromTime: $("#FromTime").val(),
  3497. ToTime: $("#ToTime").val(),
  3498. POStatus: $("#selShow").val()
  3499. }
  3500. $gridList.jqGrid('setGridParam', {
  3501. postData: { queryJson: JSON.stringify(queryJson) },
  3502. }).trigger('reloadGrid');
  3503. });
  3504. }
  3505. function bindSubGrid12(subgrid_id, rowid) {
  3506. $("#gridList").jqGrid("setSelection", rowid, false);
  3507. var subgrid_table_id;
  3508. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3509. var subgrid_pager_id;
  3510. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3511. // (5)动态添加子报表的table和pager
  3512. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3513. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  3514. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3515. // (6)创建jqGrid对象
  3516. $("#" + subgrid_table_id).dataGrid({
  3517. cellEdit: true,
  3518. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3519. //colModel: [
  3520. // { label: "主键", name: "ID", hidden: true, key: true },
  3521. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3522. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3523. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3524. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3525. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3526. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3527. //],
  3528. colModel: _Clos1,
  3529. //colModel: ColModelSub,
  3530. shrinkToFit: true,//宽度自适应
  3531. multiselect: true,
  3532. prmNames: { search: "search" },
  3533. viewrecords: true,
  3534. height: "100%",
  3535. rowNum: 20,
  3536. pager: subgrid_pager_id,
  3537. });
  3538. }
  3539. //材料出库退料
  3540. function gridList13() {
  3541. var $gridList = $("#gridList");
  3542. var queryJson = {
  3543. POCode: $("#txt_POCode").val(),
  3544. InvCode: $("#txt_InvCode").val(),
  3545. InvName: $("#txt_InvName").val(),
  3546. BatchCode: $("#txt_BatchCode").val(),
  3547. POStatus: $("#selShow").val(),
  3548. SCode: $("#txt_SCode").val(),
  3549. }
  3550. $gridList.dataGrid({
  3551. url: "/PNWMS/WMSCreateItemLot/GetGridJsonCLCK" + "?" + Math.random(),
  3552. postData: { queryJson: JSON.stringify(queryJson) },
  3553. height: $(window).height() - 200,
  3554. width: $(window).width() - 300,
  3555. colModel: _Clos,
  3556. //colModel: [
  3557. // { label: "主键", name: "ID", hidden: true, key: true },
  3558. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  3559. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3560. // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, },
  3561. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3562. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  3563. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3564. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3565. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3566. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3567. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3568. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3569. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3570. //],
  3571. //colModel: ColModelMain,
  3572. width: "100%",
  3573. autowidth: true,
  3574. //shrinkToFit: true,
  3575. gridComplete: function () {
  3576. },
  3577. pager: "#gridPager",
  3578. // sortname: 'ApplyNegCode,cast(Sequence as int)',
  3579. sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3580. sortorder: "asc",
  3581. viewrecords: true,
  3582. multiselect: true,
  3583. //beforeSelectRow: function (rowid, e) {
  3584. // $("#gridList").jqGrid('resetSelection');
  3585. // return (true);
  3586. //},
  3587. subGrid: true, // (1)开启子表格支持
  3588. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3589. $("#gridList").jqGrid("setSelection", rowid, false);
  3590. bindSubGrid13(subgrid_id, rowid)
  3591. }
  3592. });
  3593. $("#warehouse a.btn-default").click(function () {
  3594. $("#warehouse a.btn-default").removeClass("active");
  3595. $(this).addClass("active");
  3596. $('#btn_search').trigger("click");
  3597. });
  3598. $("#btn_search").click(function () {
  3599. var warehouse = $("#warehouse a.active").attr('data-value');
  3600. var queryJson = {
  3601. POCode: $("#txt_POCode").val(),
  3602. InvCode: $("#txt_InvCode").val(),
  3603. InvName: $("#txt_InvName").val(),
  3604. BatchCode: $("#txt_BatchCode").val(),
  3605. POStatus: $("#selShow").val(),
  3606. SCode: $("#txt_SCode").val(),
  3607. }
  3608. $gridList.jqGrid('setGridParam', {
  3609. postData: { queryJson: JSON.stringify(queryJson) },
  3610. }).trigger('reloadGrid');
  3611. });
  3612. }
  3613. function bindSubGrid13(subgrid_id, rowid) {
  3614. $("#gridList").jqGrid("setSelection", rowid, false);
  3615. var subgrid_table_id;
  3616. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3617. var subgrid_pager_id;
  3618. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3619. // (5)动态添加子报表的table和pager
  3620. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3621. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  3622. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3623. // (6)创建jqGrid对象
  3624. $("#" + subgrid_table_id).dataGrid({
  3625. cellEdit: true,
  3626. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3627. //colModel: [
  3628. // { label: "主键", name: "ID", hidden: true, key: true },
  3629. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3630. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3631. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3632. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3633. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3634. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3635. //],
  3636. colModel: _Clos1,
  3637. //colModel: ColModelSub,
  3638. shrinkToFit: true,//宽度自适应
  3639. multiselect: true,
  3640. prmNames: { search: "search" },
  3641. viewrecords: true,
  3642. height: "100%",
  3643. rowNum: 20,
  3644. pager: subgrid_pager_id,
  3645. });
  3646. }
  3647. //委外领料申请退料
  3648. function gridList14() {
  3649. var $gridList = $("#gridList");
  3650. var queryJson = {
  3651. POCode: $("#txt_POCode").val(),
  3652. InvCode: $("#txt_InvCode").val(),
  3653. InvName: $("#txt_InvName").val(),
  3654. BatchCode: $("#txt_BatchCode").val(),
  3655. POStatus: $("#selShow").val()
  3656. }
  3657. $gridList.dataGrid({
  3658. url: "/PNWMS/WMSCreateItemLot/GetGridJsonWWLLTL" + "?" + Math.random(),
  3659. postData: { queryJson: JSON.stringify(queryJson) },
  3660. height: $(window).height() - 200,
  3661. width: $(window).width() - 300,
  3662. colModel: _Clos,
  3663. //colModel: [
  3664. // { label: "主键", name: "ID", hidden: true, key: true },
  3665. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3666. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3667. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3668. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3669. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3670. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3671. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3672. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3673. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3674. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3675. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3676. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3677. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3678. //],
  3679. //colModel: ColModelMain,
  3680. width: "100%",
  3681. autowidth: true,
  3682. //shrinkToFit: true,
  3683. gridComplete: function () {
  3684. },
  3685. pager: "#gridPager",
  3686. //sortname: 'OApplyNegCode,cast(Sequence as int)',
  3687. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3688. sortorder: "asc",
  3689. viewrecords: true,
  3690. multiselect: true,
  3691. //beforeSelectRow: function (rowid, e) {
  3692. // $("#gridList").jqGrid('resetSelection');
  3693. // return (true);
  3694. //},
  3695. subGrid: true, // (1)开启子表格支持
  3696. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3697. $("#gridList").jqGrid("setSelection", rowid, false);
  3698. bindSubGrid14(subgrid_id, rowid)
  3699. }
  3700. });
  3701. $("#warehouse a.btn-default").click(function () {
  3702. $("#warehouse a.btn-default").removeClass("active");
  3703. $(this).addClass("active");
  3704. $('#btn_search').trigger("click");
  3705. });
  3706. $("#btn_search").click(function () {
  3707. var warehouse = $("#warehouse a.active").attr('data-value');
  3708. var queryJson = {
  3709. POCode: $("#txt_POCode").val(),
  3710. InvCode: $("#txt_InvCode").val(),
  3711. InvName: $("#txt_InvName").val(),
  3712. BatchCode: $("#txt_BatchCode").val(),
  3713. POStatus: $("#selShow").val()
  3714. }
  3715. $gridList.jqGrid('setGridParam', {
  3716. postData: { queryJson: JSON.stringify(queryJson) },
  3717. }).trigger('reloadGrid');
  3718. });
  3719. }
  3720. function bindSubGrid14(subgrid_id, rowid) {
  3721. $("#gridList").jqGrid("setSelection", rowid, false);
  3722. var subgrid_table_id;
  3723. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3724. var subgrid_pager_id;
  3725. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3726. // (5)动态添加子报表的table和pager
  3727. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3728. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  3729. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3730. // (6)创建jqGrid对象
  3731. $("#" + subgrid_table_id).dataGrid({
  3732. cellEdit: true,
  3733. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3734. //colModel: [
  3735. // { label: "主键", name: "ID", hidden: true, key: true },
  3736. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3737. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3738. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3739. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3740. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3741. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3742. //],
  3743. colModel: _Clos1,
  3744. //colModel: ColModelSub,
  3745. shrinkToFit: true,//宽度自适应
  3746. multiselect: true,
  3747. prmNames: { search: "search" },
  3748. viewrecords: true,
  3749. height: "100%",
  3750. rowNum: 20,
  3751. pager: subgrid_pager_id,
  3752. });
  3753. }
  3754. //委外材料出库
  3755. function gridList15() {
  3756. var $gridList = $("#gridList");
  3757. var queryJson = {
  3758. POCode: $("#txt_POCode").val(),
  3759. InvCode: $("#txt_InvCode").val(),
  3760. InvName: $("#txt_InvName").val(),
  3761. BatchCode: $("#txt_BatchCode").val(),
  3762. POStatus: $("#selShow").val()
  3763. }
  3764. $gridList.dataGrid({
  3765. url: "/PNWMS/WMSCreateItemLot/GetGridJsonWWCLCK" + "?" + Math.random(),
  3766. postData: { queryJson: JSON.stringify(queryJson) },
  3767. height: $(window).height() - 200,
  3768. width: $(window).width() - 300,
  3769. colModel: _Clos,
  3770. //colModel: [
  3771. // { label: "主键", name: "ID", hidden: true, key: true },
  3772. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3773. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3774. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3775. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3776. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3777. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3778. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3779. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3780. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3781. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3782. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3783. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3784. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3785. //],
  3786. //colModel: ColModelMain,
  3787. width: "100%",
  3788. autowidth: true,
  3789. //shrinkToFit: true,
  3790. gridComplete: function () {
  3791. },
  3792. pager: "#gridPager",
  3793. //sortname: 'OApplyNegCode,cast(Sequence as int)',
  3794. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3795. sortorder: "asc",
  3796. viewrecords: true,
  3797. multiselect: true,
  3798. //beforeSelectRow: function (rowid, e) {
  3799. // $("#gridList").jqGrid('resetSelection');
  3800. // return (true);
  3801. //},
  3802. subGrid: true, // (1)开启子表格支持
  3803. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3804. $("#gridList").jqGrid("setSelection", rowid, false);
  3805. bindSubGrid15(subgrid_id, rowid)
  3806. }
  3807. });
  3808. $("#warehouse a.btn-default").click(function () {
  3809. $("#warehouse a.btn-default").removeClass("active");
  3810. $(this).addClass("active");
  3811. $('#btn_search').trigger("click");
  3812. });
  3813. $("#btn_search").click(function () {
  3814. var warehouse = $("#warehouse a.active").attr('data-value');
  3815. var queryJson = {
  3816. POCode: $("#txt_POCode").val(),
  3817. InvCode: $("#txt_InvCode").val(),
  3818. InvName: $("#txt_InvName").val(),
  3819. BatchCode: $("#txt_BatchCode").val(),
  3820. POStatus: $("#selShow").val()
  3821. }
  3822. $gridList.jqGrid('setGridParam', {
  3823. postData: { queryJson: JSON.stringify(queryJson) },
  3824. }).trigger('reloadGrid');
  3825. });
  3826. }
  3827. function bindSubGrid15(subgrid_id, rowid) {
  3828. $("#gridList").jqGrid("setSelection", rowid, false);
  3829. var subgrid_table_id;
  3830. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3831. var subgrid_pager_id;
  3832. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3833. // (5)动态添加子报表的table和pager
  3834. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3835. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  3836. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3837. // (6)创建jqGrid对象
  3838. $("#" + subgrid_table_id).dataGrid({
  3839. cellEdit: true,
  3840. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3841. //colModel: [
  3842. // { label: "主键", name: "ID", hidden: true, key: true },
  3843. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3844. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3845. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3846. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3847. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3848. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3849. //],
  3850. colModel: _Clos1,
  3851. //colModel: ColModelSub,
  3852. shrinkToFit: true,//宽度自适应
  3853. //multiselect: true,
  3854. prmNames: { search: "search" },
  3855. multiselect: true,
  3856. viewrecords: true,
  3857. height: "100%",
  3858. rowNum: 20,
  3859. pager: subgrid_pager_id,
  3860. });
  3861. }
  3862. function gridList16() {
  3863. var $gridList = $("#gridList");
  3864. var queryJson = {
  3865. POCode: $("#txt_POCode").val(),
  3866. InvCode: $("#txt_InvCode").val(),
  3867. InvName: $("#txt_InvName").val(),
  3868. BatchCode: $("#txt_BatchCode").val(),
  3869. POStatus: $("#selShow").val()
  3870. }
  3871. $gridList.dataGrid({
  3872. url: "/PNWMS/WMSCreateItemLot/GetGridJsonFGGD" + "?" + Math.random(),
  3873. postData: { queryJson: JSON.stringify(queryJson) },
  3874. height: $(window).height() - 200,
  3875. width: $(window).width() - 300,
  3876. colModel: _Clos,
  3877. //colModel: [
  3878. // { label: "主键", name: "ID", hidden: true, key: true },
  3879. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3880. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3881. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3882. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3883. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3884. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3885. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3886. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3887. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3888. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3889. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3890. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3891. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3892. //],
  3893. //colModel: ColModelMain,
  3894. width: "100%",
  3895. autowidth: true,
  3896. //shrinkToFit: true,
  3897. gridComplete: function () {
  3898. },
  3899. pager: "#gridPager",
  3900. // sortname: 'MOCode,cast(Sequence as int)',
  3901. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3902. sortorder: "asc",
  3903. viewrecords: true,
  3904. multiselect: true,
  3905. //beforeSelectRow: function (rowid, e) {
  3906. // $("#gridList").jqGrid('resetSelection');
  3907. // return (true);
  3908. //},
  3909. subGrid: true, // (1)开启子表格支持
  3910. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3911. $("#gridList").jqGrid("setSelection", rowid, false);
  3912. bindSubGrid16(subgrid_id, rowid)
  3913. }
  3914. });
  3915. $("#warehouse a.btn-default").click(function () {
  3916. $("#warehouse a.btn-default").removeClass("active");
  3917. $(this).addClass("active");
  3918. $('#btn_search').trigger("click");
  3919. });
  3920. $("#btn_search").click(function () {
  3921. var warehouse = $("#warehouse a.active").attr('data-value');
  3922. var queryJson = {
  3923. POCode: $("#txt_POCode").val(),
  3924. InvCode: $("#txt_InvCode").val(),
  3925. InvName: $("#txt_InvName").val(),
  3926. BatchCode: $("#txt_BatchCode").val(),
  3927. POStatus: $("#selShow").val()
  3928. }
  3929. $gridList.jqGrid('setGridParam', {
  3930. postData: { queryJson: JSON.stringify(queryJson) },
  3931. }).trigger('reloadGrid');
  3932. });
  3933. }
  3934. function bindSubGrid16(subgrid_id, rowid) {
  3935. $("#gridList").jqGrid("setSelection", rowid, false);
  3936. var subgrid_table_id;
  3937. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3938. var subgrid_pager_id;
  3939. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3940. // (5)动态添加子报表的table和pager
  3941. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3942. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  3943. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3944. // (6)创建jqGrid对象
  3945. $("#" + subgrid_table_id).dataGrid({
  3946. cellEdit: true,
  3947. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3948. //colModel: [
  3949. // { label: "主键", name: "ID", hidden: true, key: true },
  3950. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3951. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3952. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3953. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3954. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3955. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3956. //],
  3957. colModel: _Clos1,
  3958. //colModel: ColModelSub,
  3959. shrinkToFit: true,//宽度自适应
  3960. multiselect: true,
  3961. prmNames: { search: "search" },
  3962. viewrecords: true,
  3963. height: "100%",
  3964. rowNum: 20,
  3965. pager: subgrid_pager_id,
  3966. });
  3967. }
  3968. //检验不合格
  3969. function gridList17() {
  3970. var $gridList = $("#gridList");
  3971. var queryJson = {
  3972. POCode: $("#txt_POCode").val(),
  3973. InvCode: $("#txt_InvCode").val(),
  3974. InvName: $("#txt_InvName").val(),
  3975. BatchCode: $("#txt_BatchCode").val(),
  3976. POStatus: $("#selShow").val()
  3977. }
  3978. $gridList.dataGrid({
  3979. url: "/PNWMS/WMSCreateItemLot/GetGridJsonBHGTM" + "?" + Math.random(),
  3980. postData: { queryJson: JSON.stringify(queryJson) },
  3981. height: $(window).height() - 200,
  3982. width: $(window).width() - 300,
  3983. colModel: _Clos,
  3984. //colModel: [
  3985. // { label: "主键", name: "ID", hidden: true, key: true },
  3986. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3987. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3988. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3989. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3990. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3991. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3992. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3993. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3994. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3995. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3996. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3997. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3998. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3999. //],
  4000. //colModel: ColModelMain,
  4001. width: "100%",
  4002. autowidth: true,
  4003. //shrinkToFit: true,
  4004. gridComplete: function () {
  4005. },
  4006. pager: "#gridPager",
  4007. sortname: 'LotNo',
  4008. sortorder: "asc",
  4009. viewrecords: true,
  4010. multiselect: true,
  4011. //beforeSelectRow: function (rowid, e) {
  4012. // $("#gridList").jqGrid('resetSelection');
  4013. // return (true);
  4014. //},
  4015. subGrid: true, // (1)开启子表格支持
  4016. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4017. $("#gridList").jqGrid("setSelection", rowid, false);
  4018. bindSubGrid17(subgrid_id, rowid)
  4019. }
  4020. });
  4021. $("#warehouse a.btn-default").click(function () {
  4022. $("#warehouse a.btn-default").removeClass("active");
  4023. $(this).addClass("active");
  4024. $('#btn_search').trigger("click");
  4025. });
  4026. $("#btn_search").click(function () {
  4027. var warehouse = $("#warehouse a.active").attr('data-value');
  4028. var queryJson = {
  4029. POCode: $("#txt_POCode").val(),
  4030. InvCode: $("#txt_InvCode").val(),
  4031. InvName: $("#txt_InvName").val(),
  4032. BatchCode: $("#txt_BatchCode").val(),
  4033. POStatus: $("#selShow").val()
  4034. }
  4035. $gridList.jqGrid('setGridParam', {
  4036. postData: { queryJson: JSON.stringify(queryJson) },
  4037. }).trigger('reloadGrid');
  4038. });
  4039. }
  4040. function bindSubGrid17(subgrid_id, rowid) {
  4041. $("#gridList").jqGrid("setSelection", rowid, false);
  4042. var subgrid_table_id;
  4043. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4044. var subgrid_pager_id;
  4045. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4046. // (5)动态添加子报表的table和pager
  4047. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4048. var LotNo = $("#gridList").jqGrid('getRowData', rowid).LotNo;
  4049. // var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4050. // (6)创建jqGrid对象
  4051. $("#" + subgrid_table_id).dataGrid({
  4052. cellEdit: true,
  4053. url: "/PNWMS/WMSCreateItemLot/GetSubGridJsonBHGTM?LotNo=" + LotNo + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4054. //colModel: [
  4055. // { label: "主键", name: "ID", hidden: true, key: true },
  4056. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  4057. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  4058. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  4059. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  4060. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  4061. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  4062. //],
  4063. colModel: _Clos1,
  4064. //colModel: ColModelSub,
  4065. shrinkToFit: true,//宽度自适应
  4066. multiselect: true,
  4067. prmNames: { search: "search" },
  4068. viewrecords: true,
  4069. height: "100%",
  4070. rowNum: 20,
  4071. pager: subgrid_pager_id,
  4072. });
  4073. }
  4074. function gridList18() {
  4075. var $gridList = $("#gridList");
  4076. var queryJson = {
  4077. POCode: $("#txt_POCode").val(),
  4078. InvCode: $("#txt_InvCode").val(),
  4079. InvName: $("#txt_InvName").val(),
  4080. BatchCode: $("#txt_BatchCode").val(),
  4081. POStatus: $("#selShow").val()
  4082. }
  4083. $gridList.dataGrid({
  4084. url: "/PNWMS/WMSCreateItemLot/GetGridJsonFCP" + "?" + Math.random(),
  4085. postData: { queryJson: JSON.stringify(queryJson) },
  4086. height: $(window).height() - 200,
  4087. width: $(window).width() - 300,
  4088. colModel: _Clos,
  4089. //colModel: [
  4090. // { label: "主键", name: "ID", hidden: true, key: true },
  4091. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  4092. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  4093. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  4094. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  4095. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  4096. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  4097. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  4098. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  4099. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  4100. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  4101. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  4102. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  4103. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  4104. //],
  4105. //colModel: ColModelMain,
  4106. width: "100%",
  4107. autowidth: true,
  4108. //shrinkToFit: true,
  4109. gridComplete: function () {
  4110. },
  4111. pager: "#gridPager",
  4112. // sortname: 'MOCode,cast(Sequence as int)',
  4113. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  4114. sortorder: "asc",
  4115. viewrecords: true,
  4116. multiselect: true,
  4117. //beforeSelectRow: function (rowid, e) {
  4118. // $("#gridList").jqGrid('resetSelection');
  4119. // return (true);
  4120. //},
  4121. subGrid: true, // (1)开启子表格支持
  4122. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4123. $("#gridList").jqGrid("setSelection", rowid, false);
  4124. bindSubGrid18(subgrid_id, rowid)
  4125. }
  4126. });
  4127. $("#warehouse a.btn-default").click(function () {
  4128. $("#warehouse a.btn-default").removeClass("active");
  4129. $(this).addClass("active");
  4130. $('#btn_search').trigger("click");
  4131. });
  4132. $("#btn_search").click(function () {
  4133. var warehouse = $("#warehouse a.active").attr('data-value');
  4134. var queryJson = {
  4135. POCode: $("#txt_POCode").val(),
  4136. InvCode: $("#txt_InvCode").val(),
  4137. InvName: $("#txt_InvName").val(),
  4138. BatchCode: $("#txt_BatchCode").val(),
  4139. POStatus: $("#selShow").val()
  4140. }
  4141. $gridList.jqGrid('setGridParam', {
  4142. postData: { queryJson: JSON.stringify(queryJson) },
  4143. }).trigger('reloadGrid');
  4144. });
  4145. }
  4146. function bindSubGrid18(subgrid_id, rowid) {
  4147. $("#gridList").jqGrid("setSelection", rowid, false);
  4148. var subgrid_table_id;
  4149. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4150. var subgrid_pager_id;
  4151. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4152. // (5)动态添加子报表的table和pager
  4153. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4154. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  4155. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4156. // (6)创建jqGrid对象
  4157. $("#" + subgrid_table_id).dataGrid({
  4158. cellEdit: true,
  4159. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4160. //colModel: [
  4161. // { label: "主键", name: "ID", hidden: true, key: true },
  4162. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  4163. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  4164. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  4165. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  4166. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  4167. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  4168. //],
  4169. colModel: _Clos1,
  4170. //colModel: ColModelSub,
  4171. shrinkToFit: true,//宽度自适应
  4172. multiselect: true,
  4173. prmNames: { search: "search" },
  4174. viewrecords: true,
  4175. height: "100%",
  4176. rowNum: 20,
  4177. pager: subgrid_pager_id,
  4178. });
  4179. }
  4180. function gridList20() {
  4181. var $gridList = $("#gridList");
  4182. var queryJson = {
  4183. POCode: $("#txt_POCode").val(),
  4184. InvCode: $("#txt_InvCode").val(),
  4185. InvName: $("#txt_InvName").val(),
  4186. BatchCode: $("#txt_BatchCode").val(),
  4187. POStatus: $("#selShow").val()
  4188. }
  4189. $gridList.dataGrid({
  4190. url: "/PNWMS/WMSCreateItemLot/GetGridJsonTransfer" + "?" + Math.random(),
  4191. postData: { queryJson: JSON.stringify(queryJson) },
  4192. height: $(window).height() - 200,
  4193. width: $(window).width() - 300,
  4194. colModel: _Clos,
  4195. width: "100%",
  4196. autowidth: true,
  4197. //shrinkToFit: true,
  4198. gridComplete: function () {
  4199. },
  4200. pager: "#gridPager",
  4201. // sortname: 'MOCode,cast(Sequence as int)',
  4202. sortname: "TransferNO,Cast(Sequence as int) ",
  4203. sortorder: "asc",
  4204. viewrecords: true,
  4205. multiselect: true,
  4206. //beforeSelectRow: function (rowid, e) {
  4207. // $("#gridList").jqGrid('resetSelection');
  4208. // return (true);
  4209. //},
  4210. subGrid: true, // (1)开启子表格支持
  4211. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4212. $("#gridList").jqGrid("setSelection", rowid, false);
  4213. bindSubGrid20(subgrid_id, rowid)
  4214. }
  4215. });
  4216. $("#warehouse a.btn-default").click(function () {
  4217. $("#warehouse a.btn-default").removeClass("active");
  4218. $(this).addClass("active");
  4219. $('#btn_search').trigger("click");
  4220. });
  4221. $("#btn_search").click(function () {
  4222. var warehouse = $("#warehouse a.active").attr('data-value');
  4223. var queryJson = {
  4224. POCode: $("#txt_POCode").val(),
  4225. InvCode: $("#txt_InvCode").val(),
  4226. InvName: $("#txt_InvName").val(),
  4227. BatchCode: $("#txt_BatchCode").val(),
  4228. POStatus: $("#selShow").val()
  4229. }
  4230. $gridList.jqGrid('setGridParam', {
  4231. postData: { queryJson: JSON.stringify(queryJson) },
  4232. }).trigger('reloadGrid');
  4233. });
  4234. }
  4235. function bindSubGrid20(subgrid_id, rowid) {
  4236. debugger;
  4237. $("#gridList").jqGrid("setSelection", rowid, false);
  4238. var subgrid_table_id;
  4239. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4240. var subgrid_pager_id;
  4241. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4242. // (5)动态添加子报表的table和pager
  4243. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4244. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4245. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4246. // (6)创建jqGrid对象
  4247. $("#" + subgrid_table_id).dataGrid({
  4248. cellEdit: true,
  4249. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4250. colModel: _Clos1,
  4251. //colModel: ColModelSub,
  4252. shrinkToFit: true,//宽度自适应
  4253. multiselect: true,
  4254. prmNames: { search: "search" },
  4255. viewrecords: true,
  4256. height: "100%",
  4257. rowNum: 20,
  4258. pager: subgrid_pager_id,
  4259. });
  4260. }
  4261. //采购入库 ICSPurchaseReceive
  4262. function gridList22() {
  4263. var $gridList = $("#gridList");
  4264. var queryJson = {
  4265. POCode: $("#txt_POCode").val(),
  4266. InvCode: $("#txt_InvCode").val(),
  4267. InvName: $("#txt_InvName").val(),
  4268. BatchCode: $("#txt_BatchCode").val(),
  4269. FromTime: $("#FromTime").val(),
  4270. ToTime: $("#ToTime").val(),
  4271. WHCode: $("#txt_WHCode").val(),
  4272. POStatus: $("#selShow").val(),
  4273. WHStatus: $("#selStatus").val(),
  4274. }
  4275. $gridList.dataGrid({
  4276. url: "/PNWMS/WMSCreateItemLot/GetGridJsonPurchaseReceive" + "?" + Math.random(),
  4277. postData: { queryJson: JSON.stringify(queryJson) },
  4278. height: $(window).height() - 200,
  4279. width: $(window).width() - 300,
  4280. colModel: _Clos,
  4281. width: "100%",
  4282. cellEdit: true,
  4283. cellsubmit: "clientArray",
  4284. autowidth: true,
  4285. //shrinkToFit: true,
  4286. gridComplete: function () {
  4287. },
  4288. pager: "#gridPager",
  4289. // sortname: 'MOCode,cast(Sequence as int)',
  4290. sortname: "RCVCode ",
  4291. sortorder: "desc",
  4292. viewrecords: true,
  4293. multiselect: true,
  4294. //beforeSelectRow: function (rowid, e) {
  4295. // $("#gridList").jqGrid('resetSelection');
  4296. // return (true);
  4297. //},
  4298. subGrid: true, // (1)开启子表格支持
  4299. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4300. $("#gridList").jqGrid("setSelection", rowid, false);
  4301. bindSubGrid22(subgrid_id, rowid)
  4302. }
  4303. });
  4304. $("#warehouse a.btn-default").click(function () {
  4305. $("#warehouse a.btn-default").removeClass("active");
  4306. $(this).addClass("active");
  4307. $('#btn_search').trigger("click");
  4308. });
  4309. $("#btn_search").click(function () {
  4310. var warehouse = $("#warehouse a.active").attr('data-value');
  4311. var queryJson = {
  4312. POCode: $("#txt_POCode").val(),
  4313. InvCode: $("#txt_InvCode").val(),
  4314. InvName: $("#txt_InvName").val(),
  4315. BatchCode: $("#txt_BatchCode").val(),
  4316. FromTime: $("#FromTime").val(),
  4317. ToTime: $("#ToTime").val(),
  4318. WHCode: $("#txt_WHCode").val(),
  4319. POStatus: $("#selShow").val(),
  4320. WHStatus: $("#selStatus").val(),
  4321. }
  4322. $gridList.jqGrid('setGridParam', {
  4323. postData: { queryJson: JSON.stringify(queryJson) },
  4324. }).trigger('reloadGrid');
  4325. });
  4326. }
  4327. function bindSubGrid22(subgrid_id, rowid) {
  4328. debugger;
  4329. $("#gridList").jqGrid("setSelection", rowid, false);
  4330. var subgrid_table_id;
  4331. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4332. var subgrid_pager_id;
  4333. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4334. // (5)动态添加子报表的table和pager
  4335. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4336. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  4337. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4338. var isPrint = $("#selPrint").val();
  4339. // (6)创建jqGrid对象
  4340. $("#" + subgrid_table_id).dataGrid({
  4341. cellEdit: true,
  4342. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4343. colModel: _Clos1,
  4344. //colModel: ColModelSub,
  4345. shrinkToFit: true,//宽度自适应
  4346. multiselect: true,
  4347. prmNames: { search: "search" },
  4348. viewrecords: true,
  4349. height: "100%",
  4350. rowNum: 20,
  4351. pager: subgrid_pager_id,
  4352. });
  4353. }
  4354. //委外采购入库 ICSOutPurchaseReceive
  4355. function gridList23() {
  4356. var $gridList = $("#gridList");
  4357. var queryJson = {
  4358. POCode: $("#txt_POCode").val(),
  4359. SourceCode: $("#txt_SourceCode").val(),
  4360. VenCode: $("#txt_VenCode").val(),
  4361. VenName: $("#txt_VenName").val(),
  4362. InvCode: $("#txt_InvCode").val(),
  4363. InvName: $("#txt_InvName").val(),
  4364. BatchCode: $("#txt_BatchCode").val(),
  4365. FromTime: $("#FromTime").val(),
  4366. ToTime: $("#ToTime").val(),
  4367. WHCode: $("#txt_WHCode").val(),
  4368. POStatus: $("#selShow").val(),
  4369. WHStatus: $("#selStatus").val(),
  4370. }
  4371. $gridList.dataGrid({
  4372. url: "/PNWMS/WMSCreateItemLot/GetGridJsonOutPurchaseReceive" + "?" + Math.random(),
  4373. postData: { queryJson: JSON.stringify(queryJson) },
  4374. height: $(window).height() - 200,
  4375. width: $(window).width() - 300,
  4376. colModel: _Clos,
  4377. width: "100%",
  4378. autowidth: true,
  4379. //shrinkToFit: true,
  4380. gridComplete: function () {
  4381. },
  4382. pager: "#gridPager",
  4383. // sortname: 'MOCode,cast(Sequence as int)',
  4384. sortname: "RCVCode ",
  4385. sortorder: "desc",
  4386. viewrecords: true,
  4387. multiselect: true,
  4388. //beforeSelectRow: function (rowid, e) {
  4389. // $("#gridList").jqGrid('resetSelection');
  4390. // return (true);
  4391. //},
  4392. subGrid: true, // (1)开启子表格支持
  4393. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4394. $("#gridList").jqGrid("setSelection", rowid, false);
  4395. bindSubGrid23(subgrid_id, rowid)
  4396. }
  4397. });
  4398. $("#warehouse a.btn-default").click(function () {
  4399. $("#warehouse a.btn-default").removeClass("active");
  4400. $(this).addClass("active");
  4401. $('#btn_search').trigger("click");
  4402. });
  4403. $("#btn_search").click(function () {
  4404. var warehouse = $("#warehouse a.active").attr('data-value');
  4405. var queryJson = {
  4406. POCode: $("#txt_POCode").val(),
  4407. SourceCode: $("#txt_SourceCode").val(),
  4408. VenCode: $("#txt_VenCode").val(),
  4409. VenName: $("#txt_VenName").val(),
  4410. InvCode: $("#txt_InvCode").val(),
  4411. InvName: $("#txt_InvName").val(),
  4412. BatchCode: $("#txt_BatchCode").val(),
  4413. FromTime: $("#FromTime").val(),
  4414. ToTime: $("#ToTime").val(),
  4415. WHCode: $("#txt_WHCode").val(),
  4416. POStatus: $("#selShow").val(),
  4417. WHStatus: $("#selStatus").val(),
  4418. }
  4419. $gridList.jqGrid('setGridParam', {
  4420. postData: { queryJson: JSON.stringify(queryJson) },
  4421. }).trigger('reloadGrid');
  4422. });
  4423. }
  4424. function bindSubGrid23(subgrid_id, rowid) {
  4425. debugger;
  4426. $("#gridList").jqGrid("setSelection", rowid, false);
  4427. var subgrid_table_id;
  4428. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4429. var subgrid_pager_id;
  4430. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4431. // (5)动态添加子报表的table和pager
  4432. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4433. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  4434. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4435. // (6)创建jqGrid对象
  4436. $("#" + subgrid_table_id).dataGrid({
  4437. cellEdit: true,
  4438. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4439. colModel: _Clos1,
  4440. //colModel: ColModelSub,
  4441. shrinkToFit: true,//宽度自适应
  4442. multiselect: true,
  4443. prmNames: { search: "search" },
  4444. viewrecords: true,
  4445. height: "100%",
  4446. rowNum: 20,
  4447. pager: subgrid_pager_id,
  4448. });
  4449. }
  4450. //线边仓调拨申请单生成条码(派纳)
  4451. function gridList201() {
  4452. var $gridList = $("#gridList");
  4453. var queryJson = {
  4454. POCode: $("#txt_POCode").val(),
  4455. InvCode: $("#txt_InvCode").val(),
  4456. InvName: $("#txt_InvName").val(),
  4457. BatchCode: $("#txt_BatchCode").val(),
  4458. POStatus: $("#selShow").val()
  4459. }
  4460. $gridList.dataGrid({
  4461. url: "/PNWMS/WMSCreateItemLot/GetGridJsonTransferApplicationPN" + "?" + Math.random(),
  4462. postData: { queryJson: JSON.stringify(queryJson) },
  4463. height: $(window).height() - 200,
  4464. width: $(window).width() - 300,
  4465. colModel: _Clos,
  4466. width: "100%",
  4467. autowidth: true,
  4468. //shrinkToFit: true,
  4469. gridComplete: function () {
  4470. },
  4471. pager: "#gridPager",
  4472. // sortname: 'MOCode,cast(Sequence as int)',
  4473. sortname: "TransferNO,Cast(Sequence as int) ",
  4474. sortorder: "asc",
  4475. viewrecords: true,
  4476. multiselect: true,
  4477. //beforeSelectRow: function (rowid, e) {
  4478. // $("#gridList").jqGrid('resetSelection');
  4479. // return (true);
  4480. //},
  4481. subGrid: true, // (1)开启子表格支持
  4482. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4483. $("#gridList").jqGrid("setSelection", rowid, false);
  4484. bindSubGrid201(subgrid_id, rowid)
  4485. }
  4486. });
  4487. $("#warehouse a.btn-default").click(function () {
  4488. $("#warehouse a.btn-default").removeClass("active");
  4489. $(this).addClass("active");
  4490. $('#btn_search').trigger("click");
  4491. });
  4492. $("#btn_search").click(function () {
  4493. var warehouse = $("#warehouse a.active").attr('data-value');
  4494. var queryJson = {
  4495. POCode: $("#txt_POCode").val(),
  4496. InvCode: $("#txt_InvCode").val(),
  4497. InvName: $("#txt_InvName").val(),
  4498. BatchCode: $("#txt_BatchCode").val(),
  4499. POStatus: $("#selShow").val()
  4500. }
  4501. $gridList.jqGrid('setGridParam', {
  4502. postData: { queryJson: JSON.stringify(queryJson) },
  4503. }).trigger('reloadGrid');
  4504. });
  4505. }
  4506. //调拨申请单生成条码
  4507. function gridList202() {
  4508. var $gridList = $("#gridList");
  4509. var queryJson = {
  4510. POCode: $("#txt_POCode").val(),
  4511. InvCode: $("#txt_InvCode").val(),
  4512. InvName: $("#txt_InvName").val(),
  4513. BatchCode: $("#txt_BatchCode").val(),
  4514. POStatus: $("#selShow").val()
  4515. }
  4516. $gridList.dataGrid({
  4517. url: "/PNWMS/WMSCreateItemLot/GetGridJsonTransferApplication" + "?" + Math.random(),
  4518. postData: { queryJson: JSON.stringify(queryJson) },
  4519. height: $(window).height() - 200,
  4520. width: $(window).width() - 300,
  4521. colModel: _Clos,
  4522. width: "100%",
  4523. autowidth: true,
  4524. //shrinkToFit: true,
  4525. gridComplete: function () {
  4526. },
  4527. pager: "#gridPager",
  4528. // sortname: 'MOCode,cast(Sequence as int)',
  4529. sortname: "TransferNO,Cast(Sequence as int) ",
  4530. sortorder: "asc",
  4531. viewrecords: true,
  4532. multiselect: true,
  4533. //beforeSelectRow: function (rowid, e) {
  4534. // $("#gridList").jqGrid('resetSelection');
  4535. // return (true);
  4536. //},
  4537. subGrid: true, // (1)开启子表格支持
  4538. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4539. $("#gridList").jqGrid("setSelection", rowid, false);
  4540. bindSubGrid202(subgrid_id, rowid)
  4541. }
  4542. });
  4543. $("#warehouse a.btn-default").click(function () {
  4544. $("#warehouse a.btn-default").removeClass("active");
  4545. $(this).addClass("active");
  4546. $('#btn_search').trigger("click");
  4547. });
  4548. $("#btn_search").click(function () {
  4549. var warehouse = $("#warehouse a.active").attr('data-value');
  4550. var queryJson = {
  4551. POCode: $("#txt_POCode").val(),
  4552. InvCode: $("#txt_InvCode").val(),
  4553. InvName: $("#txt_InvName").val(),
  4554. BatchCode: $("#txt_BatchCode").val(),
  4555. POStatus: $("#selShow").val()
  4556. }
  4557. $gridList.jqGrid('setGridParam', {
  4558. postData: { queryJson: JSON.stringify(queryJson) },
  4559. }).trigger('reloadGrid');
  4560. });
  4561. }
  4562. function bindSubGrid201(subgrid_id, rowid) {
  4563. debugger;
  4564. $("#gridList").jqGrid("setSelection", rowid, false);
  4565. var subgrid_table_id;
  4566. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4567. var subgrid_pager_id;
  4568. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4569. // (5)动态添加子报表的table和pager
  4570. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4571. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4572. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4573. // (6)创建jqGrid对象
  4574. $("#" + subgrid_table_id).dataGrid({
  4575. cellEdit: true,
  4576. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4577. colModel: _Clos1,
  4578. //colModel: ColModelSub,
  4579. shrinkToFit: true,//宽度自适应
  4580. multiselect: true,
  4581. prmNames: { search: "search" },
  4582. viewrecords: true,
  4583. height: "100%",
  4584. rowNum: 20,
  4585. pager: subgrid_pager_id,
  4586. });
  4587. }
  4588. function bindSubGrid202(subgrid_id, rowid) {
  4589. debugger;
  4590. $("#gridList").jqGrid("setSelection", rowid, false);
  4591. var subgrid_table_id;
  4592. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4593. var subgrid_pager_id;
  4594. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4595. // (5)动态添加子报表的table和pager
  4596. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4597. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4598. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4599. // (6)创建jqGrid对象
  4600. $("#" + subgrid_table_id).dataGrid({
  4601. cellEdit: true,
  4602. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4603. colModel: _Clos1,
  4604. //colModel: ColModelSub,
  4605. shrinkToFit: true,//宽度自适应
  4606. multiselect: true,
  4607. prmNames: { search: "search" },
  4608. viewrecords: true,
  4609. height: "100%",
  4610. rowNum: 20,
  4611. pager: subgrid_pager_id,
  4612. });
  4613. }
  4614. //线边仓一步调入单生成条码(派纳)
  4615. function gridList203() {
  4616. var $gridList = $("#gridList");
  4617. var queryJson = {
  4618. POCode: $("#txt_POCode").val(),
  4619. InvCode: $("#txt_InvCode").val(),
  4620. InvName: $("#txt_InvName").val(),
  4621. BatchCode: $("#txt_BatchCode").val(),
  4622. FromTime: $("#FromTime").val(),
  4623. ToTime: $("#ToTime").val(),
  4624. WHCode: $("#txt_WHCode").val(),
  4625. POStatus: $("#selShow").val()
  4626. }
  4627. $gridList.dataGrid({
  4628. url: "/PNWMS/WMSCreateItemLot/GetGridJsonOneSetpTransPN" + "?" + Math.random(),
  4629. postData: { queryJson: JSON.stringify(queryJson) },
  4630. height: $(window).height() - 200,
  4631. width: $(window).width() - 300,
  4632. colModel: _Clos,
  4633. width: "100%",
  4634. cellEdit: true,
  4635. cellsubmit: "clientArray",
  4636. autowidth: true,
  4637. //shrinkToFit: true,
  4638. gridComplete: function () {
  4639. },
  4640. pager: "#gridPager",
  4641. // sortname: 'MOCode,cast(Sequence as int)',
  4642. sortname: "TransferNO,Cast(Sequence as int) ",
  4643. sortorder: "asc",
  4644. viewrecords: true,
  4645. multiselect: true,
  4646. //beforeSelectRow: function (rowid, e) {
  4647. // $("#gridList").jqGrid('resetSelection');
  4648. // return (true);
  4649. //},
  4650. subGrid: true, // (1)开启子表格支持
  4651. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4652. $("#gridList").jqGrid("setSelection", rowid, false);
  4653. bindSubGrid203(subgrid_id, rowid)
  4654. }
  4655. });
  4656. $("#warehouse a.btn-default").click(function () {
  4657. $("#warehouse a.btn-default").removeClass("active");
  4658. $(this).addClass("active");
  4659. $('#btn_search').trigger("click");
  4660. });
  4661. $("#btn_search").click(function () {
  4662. var warehouse = $("#warehouse a.active").attr('data-value');
  4663. var queryJson = {
  4664. POCode: $("#txt_POCode").val(),
  4665. InvCode: $("#txt_InvCode").val(),
  4666. InvName: $("#txt_InvName").val(),
  4667. BatchCode: $("#txt_BatchCode").val(),
  4668. FromTime: $("#FromTime").val(),
  4669. ToTime: $("#ToTime").val(),
  4670. WHCode: $("#txt_WHCode").val(),
  4671. POStatus: $("#selShow").val()
  4672. }
  4673. $gridList.jqGrid('setGridParam', {
  4674. postData: { queryJson: JSON.stringify(queryJson) },
  4675. }).trigger('reloadGrid');
  4676. });
  4677. }
  4678. function bindSubGrid203(subgrid_id, rowid) {
  4679. debugger;
  4680. $("#gridList").jqGrid("setSelection", rowid, false);
  4681. var subgrid_table_id;
  4682. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4683. var subgrid_pager_id;
  4684. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4685. // (5)动态添加子报表的table和pager
  4686. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4687. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4688. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4689. // (6)创建jqGrid对象
  4690. $("#" + subgrid_table_id).dataGrid({
  4691. cellEdit: true,
  4692. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4693. colModel: _Clos1,
  4694. //colModel: ColModelSub,
  4695. shrinkToFit: true,//宽度自适应
  4696. multiselect: true,
  4697. prmNames: { search: "search" },
  4698. viewrecords: true,
  4699. height: "100%",
  4700. rowNum: 20,
  4701. pager: subgrid_pager_id,
  4702. });
  4703. }
  4704. //红字销售出库单
  4705. function gridList24() {
  4706. var $gridList = $("#gridList");
  4707. var queryJson = {
  4708. POCode: $("#txt_POCode").val(),
  4709. VenCode: $("#txt_VenCode").val(),
  4710. VenName: $("#txt_VenName").val(),
  4711. InvCode: $("#txt_InvCode").val(),
  4712. InvName: $("#txt_InvName").val(),
  4713. BatchCode: $("#txt_BatchCode").val(),
  4714. FromTime: $("#FromTime").val(),
  4715. ToTime: $("#ToTime").val(),
  4716. WHCode: $("#txt_WHCode").val(),
  4717. POStatus: $("#selShow").val(),
  4718. WHStatus: $("#selStatus").val()
  4719. }
  4720. $gridList.dataGrid({
  4721. url: "/PNWMS/WMSCreateItemLot/GetGridJsonWMSSSD" + "?" + Math.random(),
  4722. postData: { queryJson: JSON.stringify(queryJson) },
  4723. height: $(window).height() - 200,
  4724. width: $(window).width() - 300,
  4725. colModel: _Clos,
  4726. //colModel: ColModelMain,
  4727. width: "100%",
  4728. autowidth: true,
  4729. cellEdit: true,
  4730. cellsubmit: "clientArray",
  4731. //shrinkToFit: true,
  4732. gridComplete: function () {
  4733. },
  4734. pager: "#gridPager",
  4735. //sortname: 'ODNCode,cast(Sequence as int)',
  4736. sortname: "SSDCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  4737. sortorder: "asc",
  4738. viewrecords: true,
  4739. multiselect: true,
  4740. //beforeSelectRow: function (rowid, e) {
  4741. // $("#gridList").jqGrid('resetSelection');
  4742. // return (true);
  4743. //},
  4744. subGrid: true, // (1)开启子表格支持
  4745. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4746. $("#gridList").jqGrid("setSelection", rowid, false);
  4747. bindSubGrid24(subgrid_id, rowid)
  4748. }
  4749. });
  4750. $("#warehouse a.btn-default").click(function () {
  4751. $("#warehouse a.btn-default").removeClass("active");
  4752. $(this).addClass("active");
  4753. $('#btn_search').trigger("click");
  4754. });
  4755. $("#btn_search").click(function () {
  4756. var warehouse = $("#warehouse a.active").attr('data-value');
  4757. var queryJson = {
  4758. POCode: $("#txt_POCode").val(),
  4759. VenCode: $("#txt_VenCode").val(),
  4760. VenName: $("#txt_VenName").val(),
  4761. InvCode: $("#txt_InvCode").val(),
  4762. InvName: $("#txt_InvName").val(),
  4763. BatchCode: $("#txt_BatchCode").val(),
  4764. FromTime: $("#FromTime").val(),
  4765. ToTime: $("#ToTime").val(),
  4766. WHCode: $("#txt_WHCode").val(),
  4767. POStatus: $("#selShow").val(),
  4768. WHStatus: $("#selStatus").val()
  4769. }
  4770. $gridList.jqGrid('setGridParam', {
  4771. postData: { queryJson: JSON.stringify(queryJson) },
  4772. }).trigger('reloadGrid');
  4773. });
  4774. }
  4775. function bindSubGrid24(subgrid_id, rowid) {
  4776. $("#gridList").jqGrid("setSelection", rowid, false);
  4777. var subgrid_table_id;
  4778. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4779. var subgrid_pager_id;
  4780. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4781. // (5)动态添加子报表的table和pager
  4782. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4783. var SSDCode = $("#gridList").jqGrid('getRowData', rowid).SSDCode;
  4784. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4785. // (6)创建jqGrid对象
  4786. $("#" + subgrid_table_id).dataGrid({
  4787. cellEdit: true,
  4788. url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SSDCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4789. //colModel: [
  4790. // { label: "主键", name: "ID", hidden: true, key: true },
  4791. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  4792. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  4793. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  4794. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  4795. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  4796. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  4797. //],
  4798. colModel: _Clos1,
  4799. //colModel: ColModelSub,
  4800. shrinkToFit: true,//宽度自适应
  4801. multiselect: true,
  4802. prmNames: { search: "search" },
  4803. viewrecords: true,
  4804. height: "100%",
  4805. rowNum: 20,
  4806. pager: subgrid_pager_id,
  4807. });
  4808. }
  4809. function btnDelete() {
  4810. var objArr = '';
  4811. var obj = $("#gridList").jqGrid("getRowData");
  4812. for (var i = 0; i < obj.length; i++) {
  4813. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  4814. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  4815. if (rowData != "undefined" && rowData != null) {
  4816. for (var j = 0; j < rowData.length; j++) {
  4817. objArr += "'" + rowData[j] + "',";
  4818. }
  4819. }
  4820. }
  4821. if (objArr == "") {
  4822. $.modalAlertNew("WMS00099");
  4823. return;
  4824. }
  4825. $.deleteForm({
  4826. url: "/PNWMS/WMSCreateItemLot/DeleteItemLot",
  4827. param: { keyValue: JSON.stringify(objArr) },
  4828. success: function () {
  4829. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4830. }
  4831. })
  4832. }
  4833. function btnAllCreate() {
  4834. debugger;
  4835. var PoStatus;
  4836. var jsonData = '';
  4837. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  4838. //if (ids.length != 1) {
  4839. // $.modalAlertNew("WMS00100");
  4840. // return;
  4841. //}
  4842. var POCode = "";
  4843. var PORow = "";
  4844. var VenCode = "";
  4845. var WorkPoint = "";
  4846. var VendorLot = "";
  4847. //生产退料
  4848. if (Type == '1') {
  4849. debugger;
  4850. var ARR = [];
  4851. for (var i in ids) {
  4852. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4853. Code = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  4854. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4855. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  4856. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  4857. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  4858. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  4859. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  4860. if (thisCreateQty == 0) {
  4861. $.modalAlert("该单据条码已全部生成完毕!");
  4862. return;
  4863. }
  4864. thisCreateQty = thisCreateQty.toFixed(4);
  4865. var minPackQty = thisCreateQty;//最小包装量
  4866. //minPackQty = minPackQty.toFixed(4);
  4867. var createPageCount = 1;//本次生成张数
  4868. createPageCount = createPageCount.toFixed(0);
  4869. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  4870. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  4871. Quantity = Quantity.toFixed(2);
  4872. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  4873. CreatedQty = CreatedQty.toFixed(2);
  4874. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  4875. if (Quantity == CreatedQty) {
  4876. return false;
  4877. }
  4878. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  4879. if (EffectiveEnable == 'true') {
  4880. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  4881. } else {
  4882. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  4883. }
  4884. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  4885. var obj = {
  4886. ID:ID,
  4887. Code: Code,
  4888. Sequence: Sequence,
  4889. thisCreateQty: thisCreateQty,
  4890. minPackQty: minPackQty,
  4891. createPageCount: createPageCount,
  4892. //VendorLot: VendorLot,
  4893. PRODUCTDATE: PRODUCTDATE,
  4894. ExpirationDate: ExpirationDate,
  4895. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  4896. //自由项
  4897. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  4898. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  4899. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  4900. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  4901. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  4902. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  4903. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  4904. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  4905. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  4906. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  4907. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  4908. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  4909. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  4910. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  4911. }
  4912. ARR.push(obj);
  4913. }
  4914. $.submitForm({
  4915. url: "/PNWMS/WMSCreateItemLot/SubmitFormGDTLALL" + "?" + Math.random(),
  4916. param: {
  4917. keyValue: JSON.stringify(ARR)
  4918. },
  4919. success: function () {
  4920. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4921. }
  4922. })
  4923. }
  4924. //普通到货单
  4925. if (Type == '7') {
  4926. debugger;
  4927. var ARR = [];
  4928. for (var i in ids) {
  4929. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4930. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  4931. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4932. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  4933. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  4934. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  4935. //console.log("单号:" + DNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  4936. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  4937. if (thisCreateQty == 0) {
  4938. $.modalAlert("该单据条码已全部生成完毕!");
  4939. return;
  4940. }
  4941. thisCreateQty = thisCreateQty.toFixed(4);
  4942. var minPackQty = thisCreateQty;//最小包装量
  4943. //minPackQty = minPackQty.toFixed(4);
  4944. var createPageCount = 1;//本次生成张数
  4945. createPageCount = createPageCount.toFixed(0);
  4946. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  4947. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  4948. Quantity = Quantity.toFixed(2);
  4949. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  4950. CreatedQty = CreatedQty.toFixed(2);
  4951. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  4952. if (Quantity == CreatedQty) {
  4953. return false;
  4954. }
  4955. if (EffectiveEnable == 'true') {
  4956. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  4957. } else {
  4958. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  4959. }
  4960. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  4961. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  4962. var obj = {
  4963. ID:ID,
  4964. Code: DNCode,
  4965. Sequence: Sequence,
  4966. thisCreateQty: thisCreateQty,
  4967. minPackQty: minPackQty,
  4968. createPageCount: createPageCount,
  4969. //VendorLot: VendorLot,
  4970. PRODUCTDATE: PRODUCTDATE,
  4971. ExpirationDate: ExpirationDate,
  4972. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  4973. //自由项
  4974. ProjectCode : $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  4975. BatchCode : $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  4976. Version : $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  4977. Brand : $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  4978. cFree1 : $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  4979. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  4980. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  4981. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  4982. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  4983. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  4984. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  4985. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  4986. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  4987. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  4988. }
  4989. ARR.push(obj);
  4990. }
  4991. $.submitForm({
  4992. url: "/PNWMS/WMSCreateItemLot/SubmitFormSHDHALL" + "?" + Math.random(),
  4993. param: {
  4994. keyValue: JSON.stringify(ARR)
  4995. },
  4996. success: function () {
  4997. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4998. }
  4999. })
  5000. }
  5001. //委外到货单
  5002. if (Type == '8') {
  5003. debugger;
  5004. var ARR = [];
  5005. for (var i in ids) {
  5006. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5007. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  5008. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5009. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5010. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5011. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  5012. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5013. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5014. if (thisCreateQty == 0) {
  5015. $.modalAlert("该单据条码已全部生成完毕!");
  5016. return;
  5017. }
  5018. thisCreateQty = thisCreateQty.toFixed(4);
  5019. var minPackQty = thisCreateQty;//最小包装量
  5020. //minPackQty = minPackQty.toFixed(4);
  5021. var createPageCount = 1;//本次生成张数
  5022. createPageCount = createPageCount.toFixed(0);
  5023. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5024. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5025. Quantity = Quantity.toFixed(2);
  5026. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5027. CreatedQty = CreatedQty.toFixed(2);
  5028. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5029. if (Quantity == CreatedQty) {
  5030. return false;
  5031. }
  5032. if (EffectiveEnable == 'true') {
  5033. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5034. } else {
  5035. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5036. }
  5037. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5038. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5039. var obj = {
  5040. ID:ID,
  5041. Code: ODNCode,
  5042. Sequence: Sequence,
  5043. thisCreateQty: thisCreateQty,
  5044. minPackQty: minPackQty,
  5045. createPageCount: createPageCount,
  5046. //VendorLot: VendorLot,
  5047. PRODUCTDATE: PRODUCTDATE,
  5048. ExpirationDate: ExpirationDate,
  5049. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5050. //自由项
  5051. ProjectCode : $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5052. BatchCode : $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5053. Version : $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5054. Brand : $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5055. cFree1 : $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5056. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5057. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5058. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5059. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5060. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5061. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5062. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5063. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5064. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5065. }
  5066. ARR.push(obj);
  5067. }
  5068. $.submitForm({
  5069. url: "/PNWMS/WMSCreateItemLot/SubmitFormWWSHDHALL" + "?" + Math.random(),
  5070. param: {
  5071. keyValue: JSON.stringify(obj)
  5072. },
  5073. success: function () {
  5074. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5075. }
  5076. })
  5077. }
  5078. //成品入库单条码生成
  5079. if (Type == '9') {
  5080. debugger;
  5081. var ARR = [];
  5082. for (var i in ids) {
  5083. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5084. Code = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5085. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5086. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5087. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5088. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  5089. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5090. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5091. if (thisCreateQty == 0) {
  5092. $.modalAlert("该单据条码已全部生成完毕!");
  5093. return;
  5094. }
  5095. thisCreateQty = thisCreateQty.toFixed(4);
  5096. var minPackQty = thisCreateQty;//最小包装量
  5097. //minPackQty = minPackQty.toFixed(4);
  5098. var createPageCount = 1;//本次生成张数
  5099. createPageCount = createPageCount.toFixed(0);
  5100. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5101. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5102. Quantity = Quantity.toFixed(2);
  5103. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5104. CreatedQty = CreatedQty.toFixed(2);
  5105. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5106. if (Quantity == CreatedQty) {
  5107. return false;
  5108. }
  5109. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5110. if (EffectiveEnable=='true') {
  5111. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5112. } else {
  5113. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5114. }
  5115. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5116. var obj = {
  5117. ID:ID,
  5118. Code: Code,
  5119. Sequence:Sequence,
  5120. thisCreateQty: thisCreateQty,
  5121. minPackQty: minPackQty,
  5122. createPageCount: createPageCount,
  5123. //VendorLot: VendorLot,
  5124. PRODUCTDATE: PRODUCTDATE,
  5125. ExpirationDate: ExpirationDate,
  5126. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5127. //自由项
  5128. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5129. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5130. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5131. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5132. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5133. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5134. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5135. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5136. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5137. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5138. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5139. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5140. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5141. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5142. }
  5143. ARR.push(obj);
  5144. }
  5145. $.submitForm({
  5146. url: "/PNWMS/WMSCreateItemLot/SubmitFormKLCPRKALL" + "?" + Math.random(),
  5147. param: {
  5148. keyValue: JSON.stringify(ARR)
  5149. },
  5150. success: function () {
  5151. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5152. }
  5153. })
  5154. }
  5155. if (Type == '17') {
  5156. for (var i in ids) {
  5157. LotNo = $("#gridList").jqGrid('getRowData', ids[i]).LotNo;
  5158. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  5159. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5160. if (thisCreateQty==0) {
  5161. $.modalAlert("该条码已全部生成完毕!");
  5162. return;
  5163. }
  5164. thisCreateQty = thisCreateQty.toFixed(4);
  5165. var minPackQty = thisCreateQty;//最小包装量
  5166. var createPageCount = 1;//本次生成张数
  5167. createPageCount = createPageCount.toFixed(0);
  5168. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5169. Quantity = Quantity.toFixed(2);
  5170. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5171. CreatedQty = CreatedQty.toFixed(2);
  5172. if (Quantity == CreatedQty) {
  5173. return false;
  5174. }
  5175. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5176. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5177. var obj = {
  5178. thisCreateQty: thisCreateQty,
  5179. minPackQty: minPackQty,
  5180. createPageCount: createPageCount,
  5181. //VendorLot: VendorLot,
  5182. PRODUCTDATE: PRODUCTDATE,
  5183. ExpirationDate: ExpirationDate,
  5184. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5185. }
  5186. $.submitForm({
  5187. url: "/PNWMS/WMSCreateItemLot/SubmitFormBHGTM?LotNo=" + LotNo + "&WorkPoint=" + WorkPoints,
  5188. param: {
  5189. keyValue: JSON.stringify(obj)
  5190. },
  5191. success: function () {
  5192. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5193. }
  5194. })
  5195. }
  5196. }
  5197. }
  5198. function dateChange(num, date) {
  5199. if (!date) {
  5200. date = new Date();//没有传入值时,默认是当前日期
  5201. date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
  5202. }
  5203. date += " 00:00:00";//设置为当天凌晨12点
  5204. date = Date.parse(new Date(date)) / 1000;//转换为时间戳
  5205. date += (86400) * num;//修改后的时间戳
  5206. var newDate = new Date(parseInt(date) * 1000);//转换为时间
  5207. return newDate.getFullYear() + '-' + (newDate.getMonth() + 1) + '-' + newDate.getDate();
  5208. }
  5209. function btnCreate() {
  5210. debugger;
  5211. var PoStatus;
  5212. var jsonData = '';
  5213. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  5214. if (ids.length != 1) {
  5215. $.modalAlertNew("WMS00100");
  5216. return;
  5217. }
  5218. var POCode = "";
  5219. var PORow = "";
  5220. if (Type == '1') {
  5221. for (var i in ids) {
  5222. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5223. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5224. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5225. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5226. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5227. }
  5228. $.modalOpen({
  5229. id: "FormAddItemLot",
  5230. title: "生产退料条码生成",
  5231. url: "/PNWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5232. width: "550px",
  5233. height: "1000px",
  5234. callBack: function (iframeId) {
  5235. top.frames[iframeId].submitForm();
  5236. }
  5237. });
  5238. } else if (Type == '2') {
  5239. for (var i in ids) {
  5240. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  5241. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5242. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5243. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5244. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5245. }
  5246. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5247. $.modalOpen({
  5248. id: "FormAddItemLot",
  5249. title: "委外退料条码生成",
  5250. url: "/PNWMS/WMSCreateItemLot/FromNew?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5251. width: "550px",
  5252. height: "1000px",
  5253. callBack: function (iframeId) {
  5254. top.frames[iframeId].submitForm();
  5255. }
  5256. });
  5257. }
  5258. else {
  5259. $.modalOpen({
  5260. id: "FormAddItemLot",
  5261. title: "委外退料条码生成",
  5262. url: "/PNWMS/WMSCreateItemLot/From?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5263. width: "550px",
  5264. height: "1000px",
  5265. callBack: function (iframeId) {
  5266. top.frames[iframeId].submitForm();
  5267. }
  5268. });
  5269. }
  5270. } else if (Type == '3') {
  5271. for (var i in ids) {
  5272. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  5273. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  5274. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5275. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5276. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5277. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5278. }
  5279. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5280. $.modalOpen({
  5281. id: "FormAddItemLot",
  5282. title: "成品条码产生",
  5283. url: "/PNWMS/WMSCreateItemLot/FromNew?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  5284. width: "550px",
  5285. height: "1000px",
  5286. callBack: function (iframeId) {
  5287. top.frames[iframeId].submitForm();
  5288. }
  5289. });
  5290. }
  5291. else {
  5292. $.modalOpen({
  5293. id: "FormAddItemLot",
  5294. title: "成品条码产生",
  5295. url: "/PNWMS/WMSCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  5296. width: "550px",
  5297. height: "1000px",
  5298. callBack: function (iframeId) {
  5299. top.frames[iframeId].submitForm();
  5300. }
  5301. });
  5302. }
  5303. } else if (Type == '4') {
  5304. for (var i in ids) {
  5305. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  5306. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5307. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5308. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5309. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5310. }
  5311. $.modalOpen({
  5312. id: "FormAddItemLot",
  5313. title: "销售退货条码产生",
  5314. url: "/PNWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5315. width: "550px",
  5316. height: "1000px",
  5317. callBack: function (iframeId) {
  5318. top.frames[iframeId].submitForm();
  5319. }
  5320. });
  5321. } else if (Type == '5') {
  5322. for (var i in ids) {
  5323. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  5324. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5325. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5326. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5327. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5328. }
  5329. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5330. $.modalOpen({
  5331. id: "FormAddItemLot",
  5332. title: "其他入库条码产生",
  5333. url: "/PNWMS/WMSCreateItemLot/FromNew?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5334. width: "550px",
  5335. height: "1000px",
  5336. callBack: function (iframeId) {
  5337. top.frames[iframeId].submitForm();
  5338. }
  5339. });
  5340. }
  5341. else {
  5342. $.modalOpen({
  5343. id: "FormAddItemLot",
  5344. title: "其他入库条码产生",
  5345. url: "/PNWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5346. width: "550px",
  5347. height: "1000px",
  5348. callBack: function (iframeId) {
  5349. top.frames[iframeId].submitForm();
  5350. }
  5351. });
  5352. }
  5353. } else if (Type == '6') {
  5354. for (var i in ids) {
  5355. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  5356. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5357. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5358. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5359. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5360. }
  5361. $.modalOpen({
  5362. id: "FormAddItemLot",
  5363. title: "归还单条码产生",
  5364. url: "/PNWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5365. width: "550px",
  5366. height: "1000px",
  5367. callBack: function (iframeId) {
  5368. top.frames[iframeId].submitForm();
  5369. }
  5370. });
  5371. } else if (Type == '7') {
  5372. for (var i in ids) {
  5373. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  5374. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5375. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5376. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5377. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5378. }
  5379. $.modalOpen({
  5380. id: "FormAddItemLot",
  5381. title: "审核到货单生成条码",
  5382. url: "/PNWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5383. width: "550px",
  5384. height: "1000px",
  5385. callBack: function (iframeId) {
  5386. top.frames[iframeId].submitForm();
  5387. }
  5388. });
  5389. } else if (Type == '8') {
  5390. for (var i in ids) {
  5391. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  5392. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5393. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  5394. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5395. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5396. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5397. }
  5398. $.modalOpen({
  5399. id: "FormAddItemLot",
  5400. title: "审核委外到货单生成条码",
  5401. url: "/PNWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(),
  5402. width: "550px",
  5403. height: "1000px",
  5404. callBack: function (iframeId) {
  5405. top.frames[iframeId].submitForm();
  5406. }
  5407. });
  5408. } else if (Type == '9') {
  5409. for (var i in ids) {
  5410. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5411. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5412. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5413. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5414. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5415. }
  5416. $.modalOpen({
  5417. id: "FormAddItemLot",
  5418. title: "开立成品入库单生成条码",
  5419. url: "/PNWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5420. width: "550px",
  5421. height: "1000px",
  5422. callBack: function (iframeId) {
  5423. top.frames[iframeId].submitForm();
  5424. }
  5425. });
  5426. } else if (Type == '10') {
  5427. for (var i in ids) {
  5428. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  5429. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5430. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5431. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5432. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5433. }
  5434. $.modalOpen({
  5435. id: "FormAddItemLot",
  5436. title: "审核拒收单生成条码",
  5437. url: "/PNWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5438. width: "550px",
  5439. height: "1000px",
  5440. callBack: function (iframeId) {
  5441. top.frames[iframeId].submitForm();
  5442. }
  5443. });
  5444. } else if (Type == '11') {
  5445. for (var i in ids) {
  5446. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  5447. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  5448. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5449. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5450. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5451. }
  5452. $.modalOpen({
  5453. id: "FormAddItemLot",
  5454. title: "审核委外拒收单生成条码",
  5455. url: "/PNWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5456. width: "550px",
  5457. height: "1000px",
  5458. callBack: function (iframeId) {
  5459. top.frames[iframeId].submitForm();
  5460. }
  5461. });
  5462. } else if (Type == '12') {
  5463. for (var i in ids) {
  5464. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5465. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5466. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5467. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5468. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5469. }
  5470. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5471. $.modalOpen({
  5472. id: "FormAddItemLot",
  5473. title: "审核领料申请退料生成条码",
  5474. url: "/PNWMS/WMSCreateItemLot/FromNew?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5475. width: "550px",
  5476. height: "1000px",
  5477. callBack: function (iframeId) {
  5478. top.frames[iframeId].submitForm();
  5479. }
  5480. });
  5481. }
  5482. else {
  5483. $.modalOpen({
  5484. id: "FormAddItemLot",
  5485. title: "审核领料申请退料生成条码",
  5486. url: "/PNWMS/WMSCreateItemLot/From?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5487. width: "550px",
  5488. height: "1000px",
  5489. callBack: function (iframeId) {
  5490. top.frames[iframeId].submitForm();
  5491. }
  5492. });
  5493. }
  5494. } else if (Type == '13') {
  5495. for (var i in ids) {
  5496. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5497. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5498. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5499. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5500. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5501. }
  5502. $.modalOpen({
  5503. id: "FormAddItemLot",
  5504. title: "材料出库退料生成条码",
  5505. url: "/PNWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5506. width: "550px",
  5507. height: "1000px",
  5508. callBack: function (iframeId) {
  5509. top.frames[iframeId].submitForm();
  5510. }
  5511. });
  5512. } else if (Type == '14') {
  5513. for (var i in ids) {
  5514. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  5515. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5516. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5517. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5518. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5519. }
  5520. $.modalOpen({
  5521. id: "FormAddItemLot",
  5522. title: "委外领料退料条码生成",
  5523. url: "/PNWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5524. width: "550px",
  5525. height: "1000px",
  5526. callBack: function (iframeId) {
  5527. top.frames[iframeId].submitForm();
  5528. }
  5529. });
  5530. }
  5531. else if (Type == '15') {
  5532. for (var i in ids) {
  5533. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  5534. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5535. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5536. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5537. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5538. }
  5539. $.modalOpen({
  5540. id: "FormAddItemLot",
  5541. title: "委外材料出库退料生成条码",
  5542. url: "/PNWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5543. width: "550px",
  5544. height: "1000px",
  5545. callBack: function (iframeId) {
  5546. top.frames[iframeId].submitForm();
  5547. }
  5548. });
  5549. }
  5550. else if (Type == '16') {
  5551. for (var i in ids) {
  5552. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  5553. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5554. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5555. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5556. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5557. }
  5558. $.modalOpen({
  5559. id: "FormAddItemLot",
  5560. title: "返工工单生成条码",
  5561. url: "/PNWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5562. width: "550px",
  5563. height: "1000px",
  5564. callBack: function (iframeId) {
  5565. top.frames[iframeId].submitForm();
  5566. }
  5567. });
  5568. }
  5569. else if (Type == '18') {
  5570. for (var i in ids) {
  5571. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  5572. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5573. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  5574. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5575. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5576. }
  5577. $.modalOpen({
  5578. id: "FormAddItemLot",
  5579. title: "副产品生成条码",
  5580. url: "/PNWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5581. width: "550px",
  5582. height: "1000px",
  5583. callBack: function (iframeId) {
  5584. top.frames[iframeId].submitForm();
  5585. }
  5586. });
  5587. }
  5588. else if (Type == '20') {
  5589. for (var i in ids) {
  5590. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5591. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5592. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5593. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5594. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5595. }
  5596. $.modalOpen({
  5597. id: "FormAddItemLot",
  5598. title: "两步调入生成条码",
  5599. url: "/PNWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5600. width: "550px",
  5601. height: "1000px",
  5602. callBack: function (iframeId) {
  5603. top.frames[iframeId].submitForm();
  5604. }
  5605. });
  5606. }
  5607. else if (Type == '22') {
  5608. for (var i in ids) {
  5609. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5610. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5611. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5612. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5613. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5614. }
  5615. console.log($(event.target).attr('id'));
  5616. if ($(event.target).attr('id') == 'NF-CreateNew')
  5617. {
  5618. $.modalOpen({
  5619. id: "FormAddItemLot",
  5620. title: "采购入库生成条码",
  5621. url: "/PNWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5622. width: "550px",
  5623. height: "1000px",
  5624. callBack: function (iframeId) {
  5625. top.frames[iframeId].submitForm();
  5626. }
  5627. });
  5628. }
  5629. else {
  5630. $.modalOpen({
  5631. id: "FormAddItemLot",
  5632. title: "采购入库生成条码",
  5633. url: "/PNWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5634. width: "550px",
  5635. height: "1000px",
  5636. callBack: function (iframeId) {
  5637. top.frames[iframeId].submitForm();
  5638. }
  5639. });
  5640. }
  5641. }
  5642. else if (Type == '23') {
  5643. for (var i in ids) {
  5644. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  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. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5651. $.modalOpen({
  5652. id: "FormAddItemLot",
  5653. title: "委外采购入库生成条码",
  5654. url: "/PNWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5655. width: "550px",
  5656. height: "1000px",
  5657. callBack: function (iframeId) {
  5658. top.frames[iframeId].submitForm();
  5659. }
  5660. });
  5661. }
  5662. else {
  5663. $.modalOpen({
  5664. id: "FormAddItemLot",
  5665. title: "委外采购入库生成条码",
  5666. url: "/PNWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5667. width: "550px",
  5668. height: "1000px",
  5669. callBack: function (iframeId) {
  5670. top.frames[iframeId].submitForm();
  5671. }
  5672. });
  5673. }
  5674. }
  5675. else if (Type == '24') {
  5676. for (var i in ids) {
  5677. SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  5678. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5679. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5680. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5681. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5682. }
  5683. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5684. $.modalOpen({
  5685. id: "FormAddItemLot",
  5686. title: "红字销售出库单生成条码",
  5687. url: "/PNWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5688. width: "550px",
  5689. height: "1000px",
  5690. callBack: function (iframeId) {
  5691. top.frames[iframeId].submitForm();
  5692. }
  5693. });
  5694. }
  5695. else {
  5696. $.modalOpen({
  5697. id: "FormAddItemLot",
  5698. title: "红字销售出库单生成条码",
  5699. url: "/PNWMS/WMSCreateItemLot/FromPN?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5700. width: "550px",
  5701. height: "1000px",
  5702. callBack: function (iframeId) {
  5703. top.frames[iframeId].submitForm();
  5704. }
  5705. });
  5706. }
  5707. }
  5708. else if (Type == '201') {
  5709. for (var i in ids) {
  5710. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5711. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5712. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5713. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5714. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5715. }
  5716. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5717. $.modalOpen({
  5718. id: "FormAddItemLot",
  5719. title: "调拨申请单生成条码",
  5720. url: "/PNWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5721. width: "550px",
  5722. height: "1000px",
  5723. callBack: function (iframeId) {
  5724. top.frames[iframeId].submitForm();
  5725. }
  5726. });
  5727. }
  5728. else {
  5729. $.modalOpen({
  5730. id: "FormAddItemLot",
  5731. title: "调拨申请单生成条码",
  5732. url: "/PNWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5733. width: "550px",
  5734. height: "1000px",
  5735. callBack: function (iframeId) {
  5736. top.frames[iframeId].submitForm();
  5737. }
  5738. });
  5739. }
  5740. }
  5741. else if (Type == '202') {
  5742. for (var i in ids) {
  5743. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5744. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5745. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5746. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5747. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5748. }
  5749. $.modalOpen({
  5750. id: "FormAddItemLot",
  5751. title: "调拨申请单生成条码",
  5752. url: "/PNWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5753. width: "550px",
  5754. height: "1000px",
  5755. callBack: function (iframeId) {
  5756. top.frames[iframeId].submitForm();
  5757. }
  5758. });
  5759. }
  5760. else if (Type == '203') {
  5761. for (var i in ids) {
  5762. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5763. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5764. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5765. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5766. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5767. }
  5768. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5769. $.modalOpen({
  5770. id: "FormAddItemLot",
  5771. title: "调拨申请单生成条码",
  5772. url: "/PNWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 203 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5773. width: "550px",
  5774. height: "1000px",
  5775. callBack: function (iframeId) {
  5776. top.frames[iframeId].submitForm();
  5777. }
  5778. });
  5779. }
  5780. else {
  5781. $.modalOpen({
  5782. id: "FormAddItemLot",
  5783. title: "调拨申请单生成条码",
  5784. url: "/PNWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 203 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5785. width: "550px",
  5786. height: "1000px",
  5787. callBack: function (iframeId) {
  5788. top.frames[iframeId].submitForm();
  5789. }
  5790. });
  5791. }
  5792. }
  5793. }
  5794. function btnCreatePN() {
  5795. debugger;
  5796. var PoStatus;
  5797. var jsonData = '';
  5798. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  5799. if (ids.length != 1) {
  5800. $.modalAlertNew("WMS00100");
  5801. return;
  5802. }
  5803. var POCode = "";
  5804. var PORow = "";
  5805. if (Type == '1') {
  5806. for (var i in ids) {
  5807. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5808. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5809. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5810. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5811. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5812. }
  5813. $.modalOpen({
  5814. id: "FormAddItemLot",
  5815. title: "生产退料条码生成",
  5816. url: "/PNWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5817. width: "550px",
  5818. height: "1000px",
  5819. callBack: function (iframeId) {
  5820. top.frames[iframeId].submitForm();
  5821. }
  5822. });
  5823. } else if (Type == '2') {
  5824. for (var i in ids) {
  5825. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  5826. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5827. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5828. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5829. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5830. }
  5831. $.modalOpen({
  5832. id: "FormAddItemLot",
  5833. title: "委外退料条码生成",
  5834. url: "/PNWMS/WMSCreateItemLot/FromPN?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5835. width: "550px",
  5836. height: "1000px",
  5837. callBack: function (iframeId) {
  5838. top.frames[iframeId].submitForm();
  5839. }
  5840. });
  5841. } else if (Type == '3') {
  5842. for (var i in ids) {
  5843. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  5844. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  5845. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5846. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5847. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5848. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5849. }
  5850. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5851. $.modalOpen({
  5852. id: "FormAddItemLot",
  5853. title: "成品条码产生",
  5854. url: "/PNWMS/WMSCreateItemLot/FromNew?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  5855. width: "550px",
  5856. height: "1000px",
  5857. callBack: function (iframeId) {
  5858. top.frames[iframeId].submitForm();
  5859. }
  5860. });
  5861. }
  5862. else {
  5863. $.modalOpen({
  5864. id: "FormAddItemLot",
  5865. title: "成品条码产生",
  5866. url: "/PNWMS/WMSCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  5867. width: "550px",
  5868. height: "1000px",
  5869. callBack: function (iframeId) {
  5870. top.frames[iframeId].submitForm();
  5871. }
  5872. });
  5873. }
  5874. } else if (Type == '4') {
  5875. for (var i in ids) {
  5876. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  5877. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5878. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5879. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5880. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5881. }
  5882. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5883. $.modalOpen({
  5884. id: "FormAddItemLot",
  5885. title: "销售退货条码产生",
  5886. url: "/PNWMS/WMSCreateItemLot/FromNew?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5887. width: "550px",
  5888. height: "1000px",
  5889. callBack: function (iframeId) {
  5890. top.frames[iframeId].submitForm();
  5891. }
  5892. });
  5893. }
  5894. else {
  5895. $.modalOpen({
  5896. id: "FormAddItemLot",
  5897. title: "销售退货条码产生",
  5898. url: "/PNWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5899. width: "550px",
  5900. height: "1000px",
  5901. callBack: function (iframeId) {
  5902. top.frames[iframeId].submitForm();
  5903. }
  5904. });
  5905. }
  5906. } else if (Type == '5') {
  5907. for (var i in ids) {
  5908. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  5909. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5910. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5911. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5912. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5913. }
  5914. $.modalOpen({
  5915. id: "FormAddItemLot",
  5916. title: "其他入库条码产生",
  5917. url: "/PNWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5918. width: "550px",
  5919. height: "1000px",
  5920. callBack: function (iframeId) {
  5921. top.frames[iframeId].submitForm();
  5922. }
  5923. });
  5924. } else if (Type == '6') {
  5925. for (var i in ids) {
  5926. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  5927. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5928. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5929. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5930. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5931. }
  5932. $.modalOpen({
  5933. id: "FormAddItemLot",
  5934. title: "归还单条码产生",
  5935. url: "/PNWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5936. width: "550px",
  5937. height: "1000px",
  5938. callBack: function (iframeId) {
  5939. top.frames[iframeId].submitForm();
  5940. }
  5941. });
  5942. } else if (Type == '7') {
  5943. for (var i in ids) {
  5944. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  5945. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5946. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5947. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5948. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5949. }
  5950. $.modalOpen({
  5951. id: "FormAddItemLot",
  5952. title: "审核到货单生成条码",
  5953. url: "/PNWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5954. width: "550px",
  5955. height: "1000px",
  5956. callBack: function (iframeId) {
  5957. top.frames[iframeId].submitForm();
  5958. }
  5959. });
  5960. } else if (Type == '8') {
  5961. for (var i in ids) {
  5962. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  5963. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5964. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  5965. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5966. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5967. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5968. }
  5969. $.modalOpen({
  5970. id: "FormAddItemLot",
  5971. title: "审核委外到货单生成条码",
  5972. url: "/PNWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(),
  5973. width: "550px",
  5974. height: "1000px",
  5975. callBack: function (iframeId) {
  5976. top.frames[iframeId].submitForm();
  5977. }
  5978. });
  5979. } else if (Type == '9') {
  5980. for (var i in ids) {
  5981. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  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. $.modalOpen({
  5988. id: "FormAddItemLot",
  5989. title: "开立成品入库单生成条码",
  5990. url: "/PNWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5991. width: "550px",
  5992. height: "1000px",
  5993. callBack: function (iframeId) {
  5994. top.frames[iframeId].submitForm();
  5995. }
  5996. });
  5997. } else if (Type == '10') {
  5998. for (var i in ids) {
  5999. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  6000. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6001. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6002. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6003. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6004. }
  6005. $.modalOpen({
  6006. id: "FormAddItemLot",
  6007. title: "审核拒收单生成条码",
  6008. url: "/PNWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6009. width: "550px",
  6010. height: "1000px",
  6011. callBack: function (iframeId) {
  6012. top.frames[iframeId].submitForm();
  6013. }
  6014. });
  6015. } else if (Type == '11') {
  6016. for (var i in ids) {
  6017. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  6018. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  6019. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6020. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6021. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6022. }
  6023. $.modalOpen({
  6024. id: "FormAddItemLot",
  6025. title: "审核委外拒收单生成条码",
  6026. url: "/PNWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6027. width: "550px",
  6028. height: "1000px",
  6029. callBack: function (iframeId) {
  6030. top.frames[iframeId].submitForm();
  6031. }
  6032. });
  6033. } else if (Type == '12') {
  6034. for (var i in ids) {
  6035. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6036. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6037. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6038. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6039. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6040. }
  6041. $.modalOpen({
  6042. id: "FormAddItemLot",
  6043. title: "审核领料申请退料生成条码",
  6044. url: "/PNWMS/WMSCreateItemLot/FromPN?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6045. width: "550px",
  6046. height: "1000px",
  6047. callBack: function (iframeId) {
  6048. top.frames[iframeId].submitForm();
  6049. }
  6050. });
  6051. } else if (Type == '13') {
  6052. for (var i in ids) {
  6053. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6054. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6055. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6056. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6057. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6058. }
  6059. $.modalOpen({
  6060. id: "FormAddItemLot",
  6061. title: "材料出库退料生成条码",
  6062. url: "/PNWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6063. width: "550px",
  6064. height: "1000px",
  6065. callBack: function (iframeId) {
  6066. top.frames[iframeId].submitForm();
  6067. }
  6068. });
  6069. } else if (Type == '14') {
  6070. for (var i in ids) {
  6071. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6072. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6073. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6074. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6075. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6076. }
  6077. $.modalOpen({
  6078. id: "FormAddItemLot",
  6079. title: "委外领料退料条码生成",
  6080. url: "/PNWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6081. width: "550px",
  6082. height: "1000px",
  6083. callBack: function (iframeId) {
  6084. top.frames[iframeId].submitForm();
  6085. }
  6086. });
  6087. }
  6088. else if (Type == '15') {
  6089. for (var i in ids) {
  6090. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6091. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6092. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6093. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6094. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6095. }
  6096. $.modalOpen({
  6097. id: "FormAddItemLot",
  6098. title: "委外材料出库退料生成条码",
  6099. url: "/PNWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6100. width: "550px",
  6101. height: "1000px",
  6102. callBack: function (iframeId) {
  6103. top.frames[iframeId].submitForm();
  6104. }
  6105. });
  6106. }
  6107. else if (Type == '16') {
  6108. for (var i in ids) {
  6109. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6110. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6111. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6112. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6113. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6114. }
  6115. $.modalOpen({
  6116. id: "FormAddItemLot",
  6117. title: "返工工单生成条码",
  6118. url: "/PNWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6119. width: "550px",
  6120. height: "1000px",
  6121. callBack: function (iframeId) {
  6122. top.frames[iframeId].submitForm();
  6123. }
  6124. });
  6125. }
  6126. else if (Type == '18') {
  6127. for (var i in ids) {
  6128. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6129. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6130. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  6131. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6132. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6133. }
  6134. $.modalOpen({
  6135. id: "FormAddItemLot",
  6136. title: "副产品生成条码",
  6137. url: "/PNWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6138. width: "550px",
  6139. height: "1000px",
  6140. callBack: function (iframeId) {
  6141. top.frames[iframeId].submitForm();
  6142. }
  6143. });
  6144. }
  6145. else if (Type == '20') {
  6146. for (var i in ids) {
  6147. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6148. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6149. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6150. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6151. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6152. }
  6153. $.modalOpen({
  6154. id: "FormAddItemLot",
  6155. title: "两步调入生成条码",
  6156. url: "/PNWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6157. width: "550px",
  6158. height: "1000px",
  6159. callBack: function (iframeId) {
  6160. top.frames[iframeId].submitForm();
  6161. }
  6162. });
  6163. }
  6164. else if (Type == '22') {
  6165. for (var i in ids) {
  6166. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6167. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6168. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6169. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6170. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6171. }
  6172. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6173. $.modalOpen({
  6174. id: "FormAddItemLot",
  6175. title: "采购入库生成条码",
  6176. url: "/PNWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6177. width: "550px",
  6178. height: "1000px",
  6179. callBack: function (iframeId) {
  6180. top.frames[iframeId].submitForm();
  6181. }
  6182. });
  6183. }
  6184. else {
  6185. $.modalOpen({
  6186. id: "FormAddItemLot",
  6187. title: "采购入库生成条码",
  6188. url: "/PNWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6189. width: "550px",
  6190. height: "1000px",
  6191. callBack: function (iframeId) {
  6192. top.frames[iframeId].submitForm();
  6193. }
  6194. });
  6195. }
  6196. }
  6197. else if (Type == '23') {
  6198. for (var i in ids) {
  6199. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6200. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6201. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6202. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6203. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6204. }
  6205. $.modalOpen({
  6206. id: "FormAddItemLot",
  6207. title: "委外采购入库生成条码",
  6208. url: "/PNWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6209. width: "550px",
  6210. height: "1000px",
  6211. callBack: function (iframeId) {
  6212. top.frames[iframeId].submitForm();
  6213. }
  6214. });
  6215. }
  6216. else if (Type == '24') {
  6217. for (var i in ids) {
  6218. SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  6219. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6220. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6221. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6222. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6223. }
  6224. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6225. $.modalOpen({
  6226. id: "FormAddItemLot",
  6227. title: "红字销售出库单生成条码",
  6228. url: "/PNWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6229. width: "550px",
  6230. height: "1000px",
  6231. callBack: function (iframeId) {
  6232. top.frames[iframeId].submitForm();
  6233. }
  6234. });
  6235. }
  6236. else {
  6237. $.modalOpen({
  6238. id: "FormAddItemLot",
  6239. title: "红字销售出库单生成条码",
  6240. url: "/PNWMS/WMSCreateItemLot/From?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6241. width: "550px",
  6242. height: "1000px",
  6243. callBack: function (iframeId) {
  6244. top.frames[iframeId].submitForm();
  6245. }
  6246. });
  6247. }
  6248. }
  6249. else if (Type == '201') {
  6250. for (var i in ids) {
  6251. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6252. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6253. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6254. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6255. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6256. }
  6257. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6258. $.modalOpen({
  6259. id: "FormAddItemLot",
  6260. title: "调拨申请单生成条码",
  6261. url: "/PNWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6262. width: "550px",
  6263. height: "1000px",
  6264. callBack: function (iframeId) {
  6265. top.frames[iframeId].submitForm();
  6266. }
  6267. });
  6268. }
  6269. else {
  6270. $.modalOpen({
  6271. id: "FormAddItemLot",
  6272. title: "调拨申请单生成条码",
  6273. url: "/PNWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6274. width: "550px",
  6275. height: "1000px",
  6276. callBack: function (iframeId) {
  6277. top.frames[iframeId].submitForm();
  6278. }
  6279. });
  6280. }
  6281. }
  6282. else if (Type == '202') {
  6283. for (var i in ids) {
  6284. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6285. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6286. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6287. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6288. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6289. }
  6290. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6291. $.modalOpen({
  6292. id: "FormAddItemLot",
  6293. title: "调拨申请单生成条码",
  6294. url: "/PNWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6295. width: "550px",
  6296. height: "1000px",
  6297. callBack: function (iframeId) {
  6298. top.frames[iframeId].submitForm();
  6299. }
  6300. });
  6301. }
  6302. else {
  6303. $.modalOpen({
  6304. id: "FormAddItemLot",
  6305. title: "调拨申请单生成条码",
  6306. url: "/PNWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6307. width: "550px",
  6308. height: "1000px",
  6309. callBack: function (iframeId) {
  6310. top.frames[iframeId].submitForm();
  6311. }
  6312. });
  6313. }
  6314. }
  6315. }
  6316. function fullscreen() {
  6317. var docElm = document.documentElement;
  6318. if (docElm.requestFullscreen) {
  6319. docElm.requestFullscreen();
  6320. } else if (docElm.mozRequestFullScreen) {
  6321. docElm.mozRequestFullScreen();
  6322. } else if (docElm.webkitRequestFullScreen) {
  6323. docElm.webkitRequestFullScreen();
  6324. } else if (docElm.msRequestFullscreen) {
  6325. docElm.msRequestFullscreen();
  6326. }
  6327. $(window).bind('resize', function () {
  6328. $("#gridList").setGridWidth($(window).width());
  6329. }).trigger('resize');
  6330. $(window).bind('resize', function () {
  6331. $("#gridList").setGridHeight($(window).height());
  6332. }).trigger('resize');
  6333. }
  6334. function btnPrint() {
  6335. debugger;
  6336. if (mold == '')
  6337. {
  6338. if (Type == '1') { mold = '00001'; }//生产退料生成条码
  6339. if (Type == '2') { mold = '00002'; }//委外退料生成条码
  6340. if (Type == '3') { mold = '00003'; }//工单成品生成条码
  6341. if (Type == '4') { mold = '00004'; }//销售退货生成条码
  6342. if (Type == '5') { mold = '00005'; }//其他入库生成条码
  6343. if (Type == '6') { mold = '00006'; }//归还单生成条码
  6344. if (Type == '7') { mold = '00007'; }//普通到货单生成条码
  6345. if (Type == '8') { mold = '00008'; }//委外到货单生成条码
  6346. if (Type == '9') { mold = '00009'; }//成品入库单生成条码
  6347. if (Type == '10') { mold = '00010'; }//拒收单生成条码
  6348. if (Type == '11') { mold = '00011'; }//委外拒收单生成条码
  6349. if (Type == '12') { mold = '00012'; }//领料申请退料
  6350. if (Type == '13') { mold = '00013'; }//材料出库退料
  6351. if (Type == '14') { mold = '00014'; }//委外领料申请退料
  6352. if (Type == '15') { mold = '00015'; }//委外材料出库退料
  6353. if (Type == '16') { mold = '00016'; }//返工工单
  6354. if (Type == '17') { mold = 'BHG00001'; }//不合格条码入库
  6355. if (Type == '18') { mold = 'FCP00001'; }//副产品生成条码
  6356. if (Type == '22') { mold = '00018'; }//采购入库生成条码
  6357. if (Type == '23') { mold = '00019'; }//委外采购入库生成条码
  6358. if (Type == '201') { mold = '00020'; }//委外采购入库生成条码
  6359. if (Type == '202') { mold = '00020'; }//委外采购入库生成条码
  6360. if (Type == '203') { mold = 'DZ0001'; }//派纳特殊一步调入生成条码
  6361. }
  6362. var objArr = '';
  6363. var arr = [];
  6364. var obj = $("#gridList").jqGrid("getRowData");
  6365. for (var i = 0; i < obj.length; i++) {
  6366. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  6367. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  6368. if (rowData != "undefined" && rowData != null && rowData.length != 0) {
  6369. for (var j = 0; j < rowData.length; j++) {
  6370. objArr += "'" + rowData[j] + "',";
  6371. }
  6372. }
  6373. }
  6374. objArr = objArr.slice(0, objArr.length - 1);
  6375. if (objArr == "") {
  6376. $.modalAlertNew("WMS00101");
  6377. return;
  6378. }
  6379. objArr = "" + objArr + "|";
  6380. arr.push(objArr);
  6381. $.modalOpen({
  6382. id: "PrintLot",
  6383. title: "打印",
  6384. url: "/WMS/Print/PrintViewByLot?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  6385. width: "550px",
  6386. height: "1000px",
  6387. callBack: function (iframeId) {
  6388. top.frames[iframeId].submitForm();
  6389. }
  6390. });
  6391. }
  6392. function btnBatchPrint() {
  6393. debugger;
  6394. if (mold == '')
  6395. {
  6396. if (Type == '7') { mold = '00056'; }//普通到货单生成条码
  6397. if (Type == '8') { mold = '00057'; }//委外到货单生成条码
  6398. }
  6399. var objArr = '';
  6400. var arr = [];
  6401. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  6402. if (ids.length == 0) {
  6403. $.modalAlertNew("WMS00100");
  6404. return;
  6405. }
  6406. var ID = '';
  6407. for (var i in ids) {
  6408. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6409. objArr += "'" + ID + "',";
  6410. }
  6411. objArr = objArr.slice(0, objArr.length - 1);
  6412. objArr = "" + objArr + "|";
  6413. arr.push(objArr);
  6414. var xxx = "";
  6415. $.modalOpen({
  6416. id: "PrintLot",
  6417. title: "打印",
  6418. url: "/WMS/Print/PrintView?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  6419. width: "550px",
  6420. height: "1000px",
  6421. callBack: function (iframeId) {
  6422. top.frames[iframeId].submitForm();
  6423. }
  6424. });
  6425. }
  6426. function btn_ExportAll() {
  6427. debugger;
  6428. var objArr = '';
  6429. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  6430. for (var i in ids) {
  6431. objArr += "'" + $("#gridList").jqGrid('getRowData', ids[i]).ID + "',";
  6432. }
  6433. if (objArr=="") {
  6434. $.modalAlert("请选择单据后导出!");
  6435. return;
  6436. }
  6437. var postData = "&Type=" + Type + "";
  6438. //postData += "&ID=" + ID
  6439. postData += "&ID=" + objArr;
  6440. $.download("/PNWMS/WMSCreateItemLot/StatementExportAll" + "?" + Math.random(), postData, 'post');
  6441. }
  6442. function Select_SelGDLX() {
  6443. $("#SelGDLX").find("option").remove();
  6444. var DeptName = $("#SelGDLX option:checked").text();
  6445. $("#SelGDLX").append("<option value=''>--请选择--</option>");
  6446. $.ajax({
  6447. url: "/PNWMS/WMSCreateItemLot/SelGDLX" + "?" + Math.random(),
  6448. dataType: "json",
  6449. async: false,
  6450. success: function (data) {
  6451. if (data != null && data.length > 0) {
  6452. for (var i = 0; i < data.length; i++) {
  6453. $("#SelGDLX").append("<option value='" + data[i].Code + "'>" + data[i].Name + "</option>");
  6454. }
  6455. }
  6456. }
  6457. });
  6458. $("#SelGDLX option:checked").val('');
  6459. }
  6460. function btnCreateLook() {
  6461. var MODetailID = '';
  6462. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  6463. for (var i = 0; i < objList.length; i++) {
  6464. var rowId = objList[i];
  6465. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  6466. MODetailID = rowData.MODetailID;
  6467. }
  6468. $.modalOpenClean({
  6469. id: "FormMoPick",
  6470. title: "工单子件信息",
  6471. url: "/PNWMS/WMSCreateItemLot/FormMoPick" + "?" + Math.random() + "&MODetailID=" + MODetailID,
  6472. width: "90%",
  6473. height: "90%",
  6474. callBack: function (iframeId) {
  6475. top.frames[iframeId].submitForm();
  6476. }
  6477. });
  6478. }
  6479. function btn_Import() {
  6480. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  6481. if (objList.length != 1) {
  6482. $.modalAlertNew("WMS00100");
  6483. return;
  6484. }
  6485. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  6486. for (var i = 0; i < objList.length; i++) {
  6487. var rowId = objList[i];
  6488. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  6489. var Code = rowData.MOCode;
  6490. var Sequence = rowData.Sequence;
  6491. $.modalOpen({
  6492. id: "Upload",
  6493. title: "导入",
  6494. url: "/PNWMS/WMSCreateItemLot/ImportLot?Code=" + Code + "&Sequence=" + Sequence + "&" + Math.random(),
  6495. width: "400px",
  6496. height: "200px",
  6497. btn: null,
  6498. });
  6499. }
  6500. }
  6501. function btnPrints() {
  6502. debugger;
  6503. // var mold = '';
  6504. if (mold == '') {
  6505. if (Type == '1') { mold = '00001'; }//生产退料生成条码
  6506. if (Type == '2') { mold = '00002'; }//委外退料生成条码
  6507. if (Type == '3') { mold = '00003'; }//工单成品生成条码
  6508. if (Type == '4') { mold = '00004'; }//销售退货生成条码
  6509. if (Type == '5') { mold = '00005'; }//其他入库生成条码
  6510. if (Type == '6') { mold = '00006'; }//归还单生成条码
  6511. if (Type == '7') { mold = '00007'; }//普通到货单生成条码
  6512. if (Type == '8') { mold = '00008'; }//委外到货单生成条码
  6513. if (Type == '9') { mold = '00009'; }//成品入库单生成条码
  6514. if (Type == '10') { mold = '00010'; }//拒收单生成条码
  6515. if (Type == '11') { mold = '00011'; }//委外拒收单生成条码
  6516. if (Type == '12') { mold = '00012'; }//领料申请退料
  6517. if (Type == '13') { mold = '00013'; }//材料出库退料
  6518. if (Type == '14') { mold = '00014'; }//委外领料申请退料
  6519. if (Type == '15') { mold = '00015'; }//委外材料出库退料
  6520. if (Type == '16') { mold = '00016'; }//返工工单
  6521. if (Type == '17') { mold = 'BHG00001'; }//不合格条码入库
  6522. if (Type == '18') { mold = 'FCP00001'; }//副产品生成条码
  6523. if (Type == '22') { mold = '00018'; }//采购入库生成条码
  6524. if (Type == '23') { mold = '00019'; }//委外采购入库生成条码
  6525. if (Type == '203') { mold = 'DZ0001'; }//派纳特殊一步调入生成条码
  6526. }
  6527. var objArr = '';
  6528. var arr = [];
  6529. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  6530. for (var i = 0; i < objList.length; i++) {
  6531. var rowId = objList[i];
  6532. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  6533. objArr += "'" + rowData.ID + "',";
  6534. }
  6535. objArr = objArr.slice(0, objArr.length - 1);
  6536. if (objArr == "") {
  6537. $.modalAlertNew("WMS00110");
  6538. return;
  6539. }
  6540. objArr = "" + objArr + "|";
  6541. arr.push(objArr);
  6542. $.modalOpen({
  6543. id: "PrintLot",
  6544. title: "打印",
  6545. url: "/WMS/Print/PrintViewByLot?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  6546. width: "550px",
  6547. height: "1000px",
  6548. callBack: function (iframeId) {
  6549. top.frames[iframeId].submitForm();
  6550. }
  6551. });
  6552. }
  6553. function btnInWareHouse() {
  6554. debugger;
  6555. var objArr = '';
  6556. var arr = [];
  6557. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  6558. for (var i = 0; i < objList.length; i++) {
  6559. var rowId = objList[i];
  6560. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  6561. objArr += "'" + rowData.ID + "',";
  6562. }
  6563. objArr = objArr.slice(0, objArr.length - 1);
  6564. if (objArr == "") {
  6565. $.modalAlertNew("WMS00110");
  6566. return;
  6567. }
  6568. arr.push(objArr);
  6569. $.submitForm({
  6570. url: "/PNWMS/WMSCreateItemLot/PostInWareHouse" ,
  6571. param: {
  6572. IDs: JSON.stringify(objArr)
  6573. },
  6574. success: function () {
  6575. $.currentWindow().$("#gridList").trigger("reloadGrid");
  6576. }
  6577. })
  6578. }
  6579. function btn_Rebind() {
  6580. var objArr = '';
  6581. var obj = $("#gridList").jqGrid("getRowData");
  6582. for (var i = 0; i < obj.length; i++) {
  6583. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  6584. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  6585. if (rowData != "undefined" && rowData != null && rowData.length != 0) {
  6586. for (var j = 0; j < rowData.length; j++) {
  6587. var rowDataZ = $SubGird.jqGrid('getRowData', rowData[j]);
  6588. objArr += "'" + rowDataZ.LotNo + "',";
  6589. }
  6590. objArr = objArr.slice(0, objArr.length - 1);
  6591. }
  6592. }
  6593. if (objArr == "") {
  6594. $.modalAlert("请选择条码信息后,进行重新绑定!");
  6595. return;
  6596. }
  6597. $.modalOpen({
  6598. id: "ICSLotRebind",
  6599. title: "条码重新绑定",
  6600. url: "/PNWMS/WMSCreateItemLot/ICSLotRebind?LotNo=" + encodeURI(encodeURI(objArr)) + "&" + Math.random(),
  6601. width: "500px",
  6602. height: "350px",
  6603. callBack: function (iframeId) {
  6604. top.frames[iframeId].submitForm();
  6605. }
  6606. });
  6607. }
  6608. function btnAllCreatePN() {
  6609. $("#gridList").find($("td[aria-describedby='gridList_rn']")).click();
  6610. var PoStatus;
  6611. var jsonData = '';
  6612. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  6613. var POCode = "";
  6614. var PORow = "";
  6615. var VenCode = "";
  6616. var WorkPoint = "";
  6617. var VendorLot = "";
  6618. if (Type == '3') {
  6619. debugger;
  6620. var ARR = [];
  6621. for (var i in ids) {
  6622. var ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6623. var Code = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6624. var Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6625. var EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  6626. var EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  6627. var minPackQty = $("#gridList").jqGrid('getRowData', ids[i]).MPQ;
  6628. var InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6629. var BatchCode = $("#gridList").jqGrid('getRowData', ids[i]).BatchCode;
  6630. if (minPackQty == '' || minPackQty == 0) {
  6631. $.modalAlert("单据:" + Code + ",行号:" + Sequence + "请输入最小包装量!");
  6632. return;
  6633. }
  6634. var Complete = '';
  6635. $.ajax({
  6636. url: "/PNWMS/WMSCreateItemLot/GetInvBatchEnable?InvCode=" + InvCode,
  6637. dataType: "json",
  6638. async: false,
  6639. success: function (data) {
  6640. if (data != null && data.length > 0) {
  6641. Complete = data[0].BatchEnable;
  6642. }
  6643. }
  6644. });
  6645. if (Complete == true) {
  6646. if (BatchCode == "") {
  6647. $.modalAlert("单号:" + Code + " 行号:" + Sequence + " 物料:" + InvCode + ",料品已开启批次,请输入批次!", "warning");
  6648. return;
  6649. }
  6650. }
  6651. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  6652. if (thisCreateQty == 0) {
  6653. $.modalAlert("该单据条码已全部生成完毕!");
  6654. return;
  6655. }
  6656. thisCreateQty = thisCreateQty.toFixed(6);
  6657. minPackQty = Number(minPackQty).toFixed(6);
  6658. if (parseInt(Math.ceil(thisCreateQty * 10000)) % parseInt(Math.ceil(minPackQty * 10000)) != 0) {
  6659. createPageCount = Math.floor(thisCreateQty / minPackQty) + 1;
  6660. }
  6661. else {
  6662. createPageCount = parseInt(thisCreateQty / minPackQty);
  6663. }
  6664. createPageCount = createPageCount.toFixed(0);
  6665. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//订单总数
  6666. Quantity = Quantity.toFixed(2);
  6667. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  6668. CreatedQty = CreatedQty.toFixed(2);
  6669. if (Quantity == CreatedQty) {
  6670. return false;
  6671. }
  6672. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  6673. if (EffectiveEnable == 'true') {
  6674. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  6675. } else {
  6676. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  6677. }
  6678. var obj = {
  6679. ID: ID,
  6680. Code: Code,
  6681. Sequence: Sequence,
  6682. thisCreateQty: thisCreateQty,
  6683. minPackQty: minPackQty,
  6684. createPageCount: createPageCount,
  6685. //VendorLot: VendorLot,
  6686. PRODUCTDATE: PRODUCTDATE,
  6687. ExpirationDate: ExpirationDate,
  6688. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  6689. //自由项
  6690. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  6691. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  6692. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  6693. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  6694. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  6695. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  6696. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  6697. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  6698. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  6699. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  6700. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  6701. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  6702. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  6703. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  6704. }
  6705. ARR.push(obj);
  6706. }
  6707. $.submitForm({
  6708. url: "/PNWMS/WMSCreateItemLot/SubmitFormGDCPALL" + "?" + Math.random(),
  6709. param: {
  6710. keyValue: JSON.stringify(ARR)
  6711. },
  6712. success: function () {
  6713. $.currentWindow().$("#gridList").trigger("reloadGrid");
  6714. }
  6715. })
  6716. }
  6717. if (Type == '22') {
  6718. debugger;
  6719. var ARR = [];
  6720. for (var i in ids) {
  6721. var ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6722. var Code = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6723. var Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6724. var EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  6725. var EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  6726. var minPackQty = $("#gridList").jqGrid('getRowData', ids[i]).MPQ;
  6727. var InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6728. var BatchCode = $("#gridList").jqGrid('getRowData', ids[i]).BatchCode;
  6729. if (minPackQty == '' || minPackQty == 0) {
  6730. $.modalAlert("单据:" + Code + ",行号:" + Sequence + "请输入最小包装量!");
  6731. return;
  6732. }
  6733. var Complete = '';
  6734. $.ajax({
  6735. url: "/PNWMS/WMSCreateItemLot/GetInvBatchEnable?InvCode=" + InvCode,
  6736. dataType: "json",
  6737. async: false,
  6738. success: function (data) {
  6739. if (data != null && data.length > 0) {
  6740. Complete = data[0].BatchEnable;
  6741. }
  6742. }
  6743. });
  6744. if (Complete == true) {
  6745. if (BatchCode == "") {
  6746. $.modalAlert("单号:" + Code + " 行号:" + Sequence + " 物料:" + InvCode + ",料品已开启批次,请输入批次!", "warning");
  6747. return;
  6748. }
  6749. }
  6750. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  6751. if (thisCreateQty == 0) {
  6752. $.modalAlert("该单据条码已全部生成完毕!");
  6753. return;
  6754. }
  6755. thisCreateQty = thisCreateQty.toFixed(6);
  6756. minPackQty = Number(minPackQty).toFixed(6);
  6757. if (parseInt(Math.ceil(thisCreateQty * 10000)) % parseInt(Math.ceil(minPackQty * 10000)) != 0) {
  6758. createPageCount = Math.floor(thisCreateQty / minPackQty) + 1;
  6759. }
  6760. else {
  6761. createPageCount = parseInt(thisCreateQty / minPackQty);
  6762. }
  6763. createPageCount = createPageCount.toFixed(0);
  6764. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  6765. Quantity = Quantity.toFixed(2);
  6766. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  6767. CreatedQty = CreatedQty.toFixed(2);
  6768. if (Quantity == CreatedQty) {
  6769. return false;
  6770. }
  6771. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  6772. if (EffectiveEnable == 'true') {
  6773. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  6774. } else {
  6775. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  6776. }
  6777. var obj = {
  6778. ID: ID,
  6779. Code: Code,
  6780. Sequence: Sequence,
  6781. thisCreateQty: thisCreateQty,
  6782. minPackQty: minPackQty,
  6783. createPageCount: createPageCount,
  6784. //VendorLot: VendorLot,
  6785. PRODUCTDATE: PRODUCTDATE,
  6786. ExpirationDate: ExpirationDate,
  6787. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  6788. //自由项
  6789. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  6790. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  6791. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  6792. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  6793. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  6794. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  6795. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  6796. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  6797. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  6798. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  6799. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  6800. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  6801. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  6802. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  6803. }
  6804. ARR.push(obj);
  6805. }
  6806. $.submitForm({
  6807. url: "/PNWMS/WMSCreateItemLot/SubmitFormCGRKALL" + "?" + Math.random(),
  6808. param: {
  6809. keyValue: JSON.stringify(ARR)
  6810. },
  6811. success: function () {
  6812. $.currentWindow().$("#gridList").trigger("reloadGrid");
  6813. }
  6814. })
  6815. }
  6816. if (Type == '24') {
  6817. debugger;
  6818. var ARR = [];
  6819. for (var i in ids) {
  6820. var ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6821. var Code = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  6822. var Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6823. var EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  6824. var EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  6825. var minPackQty = $("#gridList").jqGrid('getRowData', ids[i]).MPQ;
  6826. var InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6827. var BatchCode = $("#gridList").jqGrid('getRowData', ids[i]).BatchCode;
  6828. if (minPackQty == '' || minPackQty == 0) {
  6829. $.modalAlert("单据:" + Code + ",行号:" + Sequence + "请输入最小包装量!");
  6830. return;
  6831. }
  6832. var Complete = '';
  6833. $.ajax({
  6834. url: "/PNWMS/WMSCreateItemLot/GetInvBatchEnable?InvCode=" + InvCode,
  6835. dataType: "json",
  6836. async: false,
  6837. success: function (data) {
  6838. if (data != null && data.length > 0) {
  6839. Complete = data[0].BatchEnable;
  6840. }
  6841. }
  6842. });
  6843. if (Complete == true) {
  6844. if (BatchCode == "") {
  6845. $.modalAlert("单号:" + Code + " 行号:" + Sequence + " 物料:" + InvCode + ",料品已开启批次,请输入批次!", "warning");
  6846. return;
  6847. }
  6848. }
  6849. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  6850. if (thisCreateQty == 0) {
  6851. $.modalAlert("该单据条码已全部生成完毕!");
  6852. return;
  6853. }
  6854. thisCreateQty = thisCreateQty.toFixed(6);
  6855. minPackQty = Number(minPackQty).toFixed(6);
  6856. if (parseInt(Math.ceil(thisCreateQty * 10000)) % parseInt(Math.ceil(minPackQty * 10000)) != 0) {
  6857. createPageCount = Math.floor(thisCreateQty / minPackQty) + 1;
  6858. }
  6859. else {
  6860. createPageCount = parseInt(thisCreateQty / minPackQty);
  6861. }
  6862. createPageCount = createPageCount.toFixed(0);
  6863. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//订单总数
  6864. Quantity = Quantity.toFixed(2);
  6865. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  6866. CreatedQty = CreatedQty.toFixed(2);
  6867. if (Quantity == CreatedQty) {
  6868. return false;
  6869. }
  6870. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  6871. if (EffectiveEnable == 'true') {
  6872. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  6873. } else {
  6874. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  6875. }
  6876. var obj = {
  6877. ID: ID,
  6878. Code: Code,
  6879. Sequence: Sequence,
  6880. thisCreateQty: thisCreateQty,
  6881. minPackQty: minPackQty,
  6882. createPageCount: createPageCount,
  6883. //VendorLot: VendorLot,
  6884. PRODUCTDATE: PRODUCTDATE,
  6885. ExpirationDate: ExpirationDate,
  6886. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  6887. //自由项
  6888. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  6889. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  6890. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  6891. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  6892. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  6893. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  6894. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  6895. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  6896. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  6897. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  6898. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  6899. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  6900. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  6901. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  6902. }
  6903. ARR.push(obj);
  6904. }
  6905. $.submitForm({
  6906. url: "/PNWMS/WMSCreateItemLot/SubmitFormXSTHALL" + "?" + Math.random(),
  6907. param: {
  6908. keyValue: JSON.stringify(ARR)
  6909. },
  6910. success: function () {
  6911. $.currentWindow().$("#gridList").trigger("reloadGrid");
  6912. }
  6913. })
  6914. }
  6915. if (Type == '203') {
  6916. debugger;
  6917. var ARR = [];
  6918. for (var i in ids) {
  6919. var ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6920. var Code = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6921. var Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6922. var EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  6923. var EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  6924. var minPackQty = $("#gridList").jqGrid('getRowData', ids[i]).MPQ;
  6925. var InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6926. var BatchCode = $("#gridList").jqGrid('getRowData', ids[i]).BatchCode;
  6927. if (minPackQty == '' || minPackQty == 0) {
  6928. $.modalAlert("单据:" + Code + ",行号:" + Sequence + "请输入最小包装量!");
  6929. return;
  6930. }
  6931. var Complete = '';
  6932. $.ajax({
  6933. url: "/PNWMS/WMSCreateItemLot/GetInvBatchEnable?InvCode=" + InvCode,
  6934. dataType: "json",
  6935. async: false,
  6936. success: function (data) {
  6937. if (data != null && data.length > 0) {
  6938. Complete = data[0].BatchEnable;
  6939. }
  6940. }
  6941. });
  6942. if (Complete == true) {
  6943. if (BatchCode == "") {
  6944. $.modalAlert("单号:" + Code + " 行号:" + Sequence + " 物料:" + InvCode + ",料品已开启批次,请输入批次!", "warning");
  6945. return;
  6946. }
  6947. }
  6948. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  6949. if (thisCreateQty == 0) {
  6950. $.modalAlert("该单据条码已全部生成完毕!");
  6951. return;
  6952. }
  6953. thisCreateQty = thisCreateQty.toFixed(6);
  6954. minPackQty = Number(minPackQty).toFixed(6);
  6955. if (parseInt(Math.ceil(thisCreateQty * 10000)) % parseInt(Math.ceil(minPackQty * 10000)) != 0) {
  6956. createPageCount = Math.floor(thisCreateQty / minPackQty) + 1;
  6957. }
  6958. else {
  6959. createPageCount = parseInt(thisCreateQty / minPackQty);
  6960. }
  6961. createPageCount = createPageCount.toFixed(0);
  6962. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  6963. Quantity = Quantity.toFixed(2);
  6964. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  6965. CreatedQty = CreatedQty.toFixed(2);
  6966. if (Quantity == CreatedQty) {
  6967. return false;
  6968. }
  6969. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  6970. if (EffectiveEnable == 'true') {
  6971. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  6972. } else {
  6973. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  6974. }
  6975. var obj = {
  6976. ID: ID,
  6977. Code: Code,
  6978. Sequence: Sequence,
  6979. thisCreateQty: thisCreateQty,
  6980. minPackQty: minPackQty,
  6981. createPageCount: createPageCount,
  6982. //VendorLot: VendorLot,
  6983. PRODUCTDATE: PRODUCTDATE,
  6984. ExpirationDate: ExpirationDate,
  6985. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  6986. //自由项
  6987. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  6988. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  6989. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  6990. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  6991. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  6992. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  6993. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  6994. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  6995. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  6996. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  6997. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  6998. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  6999. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  7000. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  7001. }
  7002. ARR.push(obj);
  7003. }
  7004. $.submitForm({
  7005. url: "/PNWMS/WMSCreateItemLot/SubmitFormYBDBALL" + "?" + Math.random(),
  7006. param: {
  7007. keyValue: JSON.stringify(ARR)
  7008. },
  7009. success: function () {
  7010. $.currentWindow().$("#gridList").trigger("reloadGrid");
  7011. }
  7012. })
  7013. }
  7014. if (Type == '12') {
  7015. debugger;
  7016. var ARR = [];
  7017. for (var i in ids) {
  7018. var ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  7019. var Code = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  7020. var Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  7021. var EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  7022. var EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  7023. var minPackQty = $("#gridList").jqGrid('getRowData', ids[i]).MPQ;
  7024. var InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  7025. var BatchCode = $("#gridList").jqGrid('getRowData', ids[i]).BatchCode;
  7026. if (minPackQty == '' || minPackQty == 0) {
  7027. $.modalAlert("单据:" + Code + ",行号:" + Sequence + "请输入最小包装量!");
  7028. return;
  7029. }
  7030. var Complete = '';
  7031. $.ajax({
  7032. url: "/PNWMS/WMSCreateItemLot/GetInvBatchEnable?InvCode=" + InvCode,
  7033. dataType: "json",
  7034. async: false,
  7035. success: function (data) {
  7036. if (data != null && data.length > 0) {
  7037. Complete = data[0].BatchEnable;
  7038. }
  7039. }
  7040. });
  7041. if (Complete == true) {
  7042. if (BatchCode == "") {
  7043. $.modalAlert("单号:" + Code + " 行号:" + Sequence + " 物料:" + InvCode + ",料品已开启批次,请输入批次!", "warning");
  7044. return;
  7045. }
  7046. }
  7047. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  7048. if (thisCreateQty == 0) {
  7049. $.modalAlert("该单据条码已全部生成完毕!");
  7050. return;
  7051. }
  7052. thisCreateQty = thisCreateQty.toFixed(6);
  7053. minPackQty = Number(minPackQty).toFixed(6);
  7054. if (parseInt(Math.ceil(thisCreateQty * 10000)) % parseInt(Math.ceil(minPackQty * 10000)) != 0) {
  7055. createPageCount = Math.floor(thisCreateQty / minPackQty) + 1;
  7056. }
  7057. else {
  7058. createPageCount = parseInt(thisCreateQty / minPackQty);
  7059. }
  7060. createPageCount = createPageCount.toFixed(0);
  7061. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//订单总数
  7062. Quantity = Quantity.toFixed(2);
  7063. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  7064. CreatedQty = CreatedQty.toFixed(2);
  7065. if (Quantity == CreatedQty) {
  7066. return false;
  7067. }
  7068. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  7069. if (EffectiveEnable == 'true') {
  7070. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  7071. } else {
  7072. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  7073. }
  7074. var obj = {
  7075. ID: ID,
  7076. Code: Code,
  7077. Sequence: Sequence,
  7078. thisCreateQty: thisCreateQty,
  7079. minPackQty: minPackQty,
  7080. createPageCount: createPageCount,
  7081. //VendorLot: VendorLot,
  7082. PRODUCTDATE: PRODUCTDATE,
  7083. ExpirationDate: ExpirationDate,
  7084. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  7085. //自由项
  7086. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  7087. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  7088. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  7089. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  7090. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  7091. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  7092. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  7093. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  7094. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  7095. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  7096. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  7097. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  7098. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  7099. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  7100. }
  7101. ARR.push(obj);
  7102. }
  7103. $.submitForm({
  7104. url: "/PNWMS/WMSCreateItemLot/SubmitFormLLTLALL" + "?" + Math.random(),
  7105. param: {
  7106. keyValue: JSON.stringify(ARR)
  7107. },
  7108. success: function () {
  7109. $.currentWindow().$("#gridList").trigger("reloadGrid");
  7110. }
  7111. })
  7112. }
  7113. }
  7114. </script>
  7115. <iframe id="ifrm" src="" width="0" height="0"></iframe>
  7116. <script>
  7117. </script>
  7118. <div class="topPanel" style="height:149px;">
  7119. <div class="toolbar">
  7120. <div class="btn-group">
  7121. <a id="NF-ALLCreatePN" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnAllCreatePN()"><i class="fa fa-pencil-square-o"></i>整单条码生成</a>
  7122. <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>
  7123. <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>
  7124. <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>
  7125. <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>
  7126. <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>
  7127. <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>
  7128. <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>
  7129. <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>
  7130. <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>
  7131. <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>
  7132. @*<a id="NF-ExportAll" authorize="yes" class="btn btn-default" onclick="btn_ExportAll()"><i class="fa fa-download"></i>导出</a>*@
  7133. <a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
  7134. </div>
  7135. <div class="btn-group" style="display:block;padding-left:2px;">
  7136. <a class="btn btn-primary" id="downPrintControl" href="~/PrintActivex.exe" style="display:none">点击下载打印组件</a>
  7137. <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>
  7138. <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>
  7139. <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>
  7140. </div>
  7141. <script>$('.toolbar').authorizeButton()</script>
  7142. </div>
  7143. <div class="search">
  7144. <table>
  7145. <tr>
  7146. <td class="POCodeShow" style="text-align:right;"><label class="lglabel " id="POCodeShowLable" for="txt_POCode">&nbsp;&nbsp;&nbsp;&nbsp;</label>:</td>
  7147. <td class="POCodeShow">
  7148. <div class="input-group">
  7149. <input id="txt_POCode" type="text" class="form-control" style="width: 130px;">
  7150. </div>
  7151. </td>
  7152. <td class="HideItems4" style="text-align:right;"><label class="lglabel HideItems4" for="txt_SourceCode">&nbsp;&nbsp;&nbsp;&nbsp;采购单号</label>:</td>
  7153. <td class="HideItems4">
  7154. <div class="input-group HideItems4">
  7155. <input id="txt_SourceCode" type="text" class="form-control HideItems4" style="width: 130px;">
  7156. </div>
  7157. </td>
  7158. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenCode">&nbsp;&nbsp;&nbsp;&nbsp;供应商代码</label>:</td>
  7159. <td class="HideItems">
  7160. <div class="input-group HideItems">
  7161. <input id="txt_VenCode" type="text" class="form-control HideItems" style="width: 130px;">
  7162. </div>
  7163. </td>
  7164. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;供应商名称</label>:</td>
  7165. <td class="HideItems">
  7166. <div class="input-group HideItems">
  7167. <input id="txt_VenName" type="text" class="form-control HideItems" style="width: 130px;">
  7168. </div>
  7169. </td>
  7170. <td class="HideItems2" style="text-align:right;"><label class="lglabel HideItems2" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;源头单据号</label>:</td>
  7171. <td class="HideItems2">
  7172. <div class="input-group HideItems2">
  7173. <input id="txt_SCode" type="text" class="form-control HideItems2" style="width: 130px;">
  7174. </div>
  7175. </td>
  7176. <td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;日期(从)</label>:</td>
  7177. <td class="HideItemsTime">
  7178. <div class="input-group HideItemsTime">
  7179. <input id="FromTime" name="FromTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(从)" />
  7180. </div>
  7181. </td>
  7182. <td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;日期(到)</label>:</td>
  7183. <td class="HideItemsTime">
  7184. <div class="input-group HideItemsTime">
  7185. <input id="ToTime" name="ToTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(到)" />
  7186. </div>
  7187. </td>
  7188. <td class="HideClassGroup" style="text-align:right;">
  7189. <label>&nbsp;&nbsp;&nbsp;班组:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7190. </td>
  7191. <td class="HideClassGroup">
  7192. <div class="input-group">
  7193. <select id="selClassGroup" name="F_Target" class="form-control" style="width: 130px;">
  7194. <option value=""></option>
  7195. <option value="风电一组">风电一组</option>
  7196. <option value="风电二组">风电二组</option>
  7197. <option value="数控组">数控组</option>
  7198. <option value="新能源组">新能源组</option>
  7199. <option value="裁线组">裁线组</option>
  7200. <option value="中高压组">中高压组</option>
  7201. <option value="样品组">样品组</option>
  7202. <option value="铜排">铜排</option>
  7203. <option value="风电三组">风电三组</option>
  7204. <option value="风电四组">风电四组</option>
  7205. <option value="机器人线束">机器人线束</option>
  7206. </select>
  7207. </div>
  7208. </td>
  7209. </tr>
  7210. <tr>
  7211. <td style="text-align:right;"><label class="lglabel" for="txt_InvCode">&nbsp;&nbsp;&nbsp;&nbsp;料品编码</label>:</td>
  7212. <td>
  7213. <div class="input-group">
  7214. <input id="txt_InvCode" type="text" class="form-control" style="width: 130px;">
  7215. </div>
  7216. </td>
  7217. <td style="text-align:right;"><label class="lglabel" for="txt_InvName">&nbsp;&nbsp;&nbsp;&nbsp;料品名称</label>:</td>
  7218. <td>
  7219. <div class="input-group">
  7220. <input id="txt_InvName" type="text" class="form-control" style="width: 130px;">
  7221. </div>
  7222. </td>
  7223. <td class="HideItems3" style="text-align:right;"><label class="lglabel HideItems3" for="txt_InvStd">&nbsp;&nbsp;&nbsp;&nbsp;规格型号</label>:</td>
  7224. <td class="HideItems3">
  7225. <div class="input-group HideItems3">
  7226. <input id="txt_InvStd" type="text" class="form-control" style="width: 130px;">
  7227. </div>
  7228. </td>
  7229. <td style="text-align:right;"><label class="lglabel" for="txt_BatchCode">&nbsp;&nbsp;&nbsp;&nbsp;批次号</label>:</td>
  7230. <td>
  7231. <div class="input-group">
  7232. <input id="txt_BatchCode" type="text" class="form-control" style="width: 130px;">
  7233. </div>
  7234. </td>
  7235. <td id="GDLX">
  7236. <label>&nbsp;&nbsp;&nbsp;工单类型:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7237. </td>
  7238. <td id="GDLX2">
  7239. <div class="input-group">
  7240. <select id="SelGDLX" name="SelShow" class="form-control" style="width: 130px;">
  7241. </select>
  7242. </div>
  7243. </td>
  7244. </tr>
  7245. <tr>
  7246. <td class="HideWH" style="text-align:right;">
  7247. <label>&nbsp;&nbsp;&nbsp;仓库编码:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7248. </td>
  7249. <td class="HideWH">
  7250. <div class="input-group HideWH">
  7251. <input id="txt_WHCode" type="text" class="form-control HideWH" style="width: 130px;">
  7252. </div>
  7253. </td>
  7254. <td>
  7255. <label>&nbsp;&nbsp;&nbsp;是否全部生成:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7256. </td>
  7257. <td>
  7258. <div class="input-group">
  7259. <select id="selShow" name="F_Target" class="form-control" style="width: 130px;">
  7260. <option value="0" selected="selected">显示全部</option>
  7261. <option value="1">已全部生成</option>
  7262. <option value="2">未全部生成</option>
  7263. </select>
  7264. </div>
  7265. </td>
  7266. <td clsaa="Status">
  7267. <label>&nbsp;&nbsp;&nbsp;是否全部入库:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7268. </td>
  7269. <td clsaa="Status">
  7270. <div class="input-group">
  7271. <select id="selStatus" name="F_Target" class="form-control" style="width: 130px;">
  7272. <option value="0" selected="selected">全部</option>
  7273. <option value="1">未全部入库</option>
  7274. <option value="2">已全部入库</option>
  7275. </select>
  7276. </div>
  7277. </td>
  7278. <td class="HideItems3">
  7279. <label>&nbsp;&nbsp;&nbsp;条码是否打印:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7280. </td>
  7281. <td class="HideItems3">
  7282. <div class="input-group HideItems3">
  7283. <select id="selPrint" name="selPrint" class="form-control HideItems3" style="width: 130px;">
  7284. <option value="0" selected="selected">显示全部</option>
  7285. <option value="1">已打印</option>
  7286. <option value="2">未打印</option>
  7287. </select>
  7288. </div>
  7289. </td>
  7290. <td>
  7291. <span class="input-group-btn">
  7292. <button id="btn_search" type="button" class="btn btn-primary"><i class="fa fa-search"></i></button>
  7293. </span>
  7294. </td>
  7295. </tr>
  7296. </table>
  7297. </div>
  7298. </div>
  7299. <div class="gridPanel">
  7300. <table id="gridList"></table>
  7301. <div id="gridPager"></div>
  7302. </div>