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.

7153 lines
357 KiB

3 weeks ago
  1. @{
  2. ViewBag.Title = "Index";
  3. Layout = "~/Views/Shared/_Index.cshtml";
  4. }
  5. <script src="~/Content/js/datepicker/WdatePicker.js"></script>
  6. <script>
  7. debugger;
  8. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location';
  9. var _Clos = new Array();
  10. var Type = $.request("Type");
  11. var mold = $.request("mold");
  12. var Name = "单据号";
  13. var ColModelMain = [];
  14. var ColModelSub = [];
  15. $(function () {
  16. SetCols();
  17. if (Type != '1') {
  18. $("#NF - Prints").css('display', 'none');
  19. $("#NF-btnInWareHouse").css('display', 'none');
  20. }
  21. if (Type != '13' && Type != '9') {
  22. $(".HideItems2").css('display', 'none');
  23. }
  24. if (Type != '1' && Type != '12' && Type != '22' && Type != '23' && Type != '2' && Type != '3' && Type != '24'
  25. && Type != '5' && Type != '203') {
  26. $(".HideItemsTime").css('display', 'none');
  27. }
  28. if (Type != '22' && Type != '23' && Type != '2' && Type != '3' && Type != '24' && Type != '5' && Type != '203') {
  29. $(".HideWH").css('display', 'none');
  30. }
  31. if (Type != '3' && Type != '7' && Type != '8') {
  32. $(".selStatus").css('display', 'none');
  33. }
  34. if (Type != '3') {
  35. $(".HideClassGroup").css('display', 'none');
  36. }
  37. if (Type != '3' && Type != '4' && Type != '5' && Type != '7' && Type != '8' && Type != '22') {
  38. $(".HideItems3").css('display', 'none');
  39. }
  40. if (Type == '17') {
  41. Name = "条码号";
  42. $("#POCodeShowLable").text(Name);
  43. } else {
  44. $("#POCodeShowLable").text(Name);
  45. }
  46. if (Type!='3') {
  47. $("#GDLX").css('display', 'none');
  48. $("#GDLX2").css('display', 'none');
  49. $("#NF-Rebind").css('display', 'none');
  50. }
  51. if (Type == '1' || Type == '2' || Type == '3' || Type == '4' || Type == '5' || Type == '6' || Type == '9' || Type == '17') {
  52. $(".HideItems").css('display', 'none');
  53. $(".HideItemsVednCode").css('display', 'none');
  54. }
  55. if (Type != "22") {
  56. $(".HideItemsSourceCode").css('display', 'none');
  57. }
  58. if (Type == '1') {
  59. gridList();
  60. }
  61. if (Type == '2') {
  62. gridList2();
  63. }
  64. if (Type == '3') {
  65. $(".GDLX").css('display', 'block');
  66. Select_SelGDLX();
  67. gridList3();
  68. }
  69. if (Type == '4') {
  70. gridList4();
  71. }
  72. if (Type == '5') {
  73. gridList5();
  74. }
  75. if (Type == '6') {
  76. gridList6();
  77. }
  78. //审核到货单生成条码
  79. if (Type == '7') {
  80. gridList7();
  81. }
  82. //审核委外到货单生成条码
  83. if (Type == '8') {
  84. gridList8();
  85. }
  86. //开立成品入库单生成条码
  87. if (Type == '9') {
  88. gridList9();
  89. }
  90. //审核拒收单生成条码
  91. if (Type == '10') {
  92. gridList10();
  93. }
  94. //审核委外拒收单生成条码
  95. if (Type == '11') {
  96. gridList11();
  97. }
  98. //领料申请退料生成条码
  99. if (Type == '12') {
  100. gridList12();
  101. }
  102. //材料出库退料生成条码
  103. if (Type == '13') {
  104. gridList13();
  105. }
  106. //委外领料申请退料生成条码
  107. if (Type == '14') {
  108. gridList14();
  109. }
  110. //委外材料出库退料生成条码
  111. if (Type == '15') {
  112. gridList15();
  113. }
  114. //返工工单
  115. if (Type == '16') {
  116. gridList16();
  117. }
  118. //不合格条码入库
  119. if (Type == '17') {
  120. gridList17();
  121. }
  122. //副产品
  123. if (Type == '18') {
  124. gridList18();
  125. }
  126. //锐腾两步调入生成条码
  127. if (Type == '20') {
  128. gridList20();
  129. }
  130. //采购入库生成条码
  131. if (Type == '22') {
  132. $(".HideItemsVednCode").css('display', 'none');
  133. gridList22();
  134. }
  135. //委外采购入库生成条码
  136. if (Type == '23') {
  137. gridList23();
  138. }
  139. //红字销售出库单
  140. if (Type == '24') {
  141. gridList24();
  142. }
  143. //线边仓调拨申请单生成条码(派纳)
  144. if (Type == '201') {
  145. gridList201();
  146. }
  147. //调拨申请单生成条码
  148. if (Type == '202') {
  149. gridList202();
  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: 'LOTQTY', width: 60, align: 'left', };
  258. cols.push(collast);
  259. $.ajax({
  260. url: "/Print/SelectTableColumnName?" + Math.random(),
  261. dataType: "json",
  262. async: false,
  263. success: function (data) {
  264. if (data != null && data.length > 0) {
  265. DateList = data;
  266. for (var i = 0; i < data.length; i++) {
  267. var TableCode = data[i].TableCode;
  268. if (TableCode == "ICSOApplyNegDetail") {
  269. var Code = data[i].Code;
  270. var Name = data[i].Name;
  271. var obj = new Array();
  272. obj = {
  273. label: Name,
  274. name: Code,
  275. width: 80,
  276. align: "left"
  277. }
  278. cols.push(obj);
  279. }
  280. if (TableCode == "ICSInventory") {
  281. var Code = "ICSInventory"+data[i].Code;
  282. var Name = data[i].Name;
  283. var obj = new Array();
  284. obj = {
  285. label: Name,
  286. name: Code,
  287. width: 80,
  288. align: "left"
  289. }
  290. cols.push(obj);
  291. }
  292. }
  293. }
  294. _Clos = cols;
  295. }
  296. });
  297. }
  298. if (Type == '3') {
  299. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  300. cols.push(collast);
  301. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  302. cols.push(collast);
  303. var collast = { label: '工单行号', name: 'Sequence', width: 50, align: 'left' };
  304. cols.push(collast);
  305. var collast = { label: 'ERP工单行ID', name: 'MODetailID', hidden: true };
  306. cols.push(collast);
  307. var collast = { label: '已入库数量', name: 'RCVQuantity', hidden: true, };
  308. cols.push(collast);
  309. $.ajax({
  310. url: "/Print/SelectTableColumnName?" + Math.random(),
  311. dataType: "json",
  312. async: false,
  313. success: function (data) {
  314. if (data != null && data.length > 0) {
  315. DateList = data;
  316. for (var i = 0; i < data.length; i++) {
  317. var TableCode = data[i].TableCode;
  318. if (TableCode == "ICSMO") {
  319. var Code = data[i].Code;
  320. var Name = data[i].Name;
  321. var obj = new Array();
  322. obj = {
  323. label: Name,
  324. name: Code,
  325. width: 80,
  326. align: "left"
  327. }
  328. cols.push(obj);
  329. }
  330. }
  331. }
  332. _Clos = cols;
  333. }
  334. });
  335. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  336. cols.push(collast);
  337. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  338. cols.push(collast);
  339. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  340. cols.push(collast);
  341. var collast = { label: '最小包装量', name: 'MPQ', width: 100, align: 'left', editable: true, editrules: { number: true } };
  342. cols.push(collast);
  343. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  344. cols.push(collast);
  345. var collast = { label: '仓库编码', name: 'WHCode', width: 150, align: 'left' };
  346. cols.push(collast);
  347. var collast = { label: '仓库名称', name: 'WHName', width: 150, align: 'left' };
  348. cols.push(collast);
  349. var collast = { label: '工单部门', name: 'DepName', width: 100, align: 'left' };
  350. cols.push(collast);
  351. var collast = { label: '工单创建日期', name: 'CreateDateTime', width: 60, align: 'left', };
  352. cols.push(collast);
  353. var collast = {
  354. label: "状态", name: "MOStatus", width: 60, align: "left",
  355. formatter: function (cellvalue) {
  356. if (cellvalue == "1") {
  357. return "初始";
  358. } else if (cellvalue == "2") {
  359. return "下发";
  360. }
  361. else if (cellvalue == "3") {
  362. return "关单";
  363. }
  364. else { return ""; }
  365. }
  366. };
  367. cols.push(collast);
  368. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  369. cols.push(collast);
  370. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  371. cols.push(collast);
  372. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  373. cols.push(collast);
  374. var collast = { label: '已入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  375. cols.push(collast);
  376. var collast = { label: '可入库数量', name: 'ERPNum', width: 100, align: 'left' };
  377. cols.push(collast);
  378. var collast = { label: '工单备注', name: 'MOMemo', width: 100, align: 'left' };
  379. cols.push(collast);
  380. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', hidden: true, };
  381. cols.push(collast);
  382. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', hidden: true,};
  383. cols.push(collast);
  384. $.ajax({
  385. url: "/Print/SelectTableColumnName?" + Math.random(),
  386. dataType: "json",
  387. async: false,
  388. success: function (data) {
  389. if (data != null && data.length > 0) {
  390. DateList = data;
  391. for (var i = 0; i < data.length; i++) {
  392. var TableCode = data[i].TableCode;
  393. if (TableCode == "ICSInventory") {
  394. var Code = "ICSInventory"+data[i].Code;
  395. var Name = data[i].Name;
  396. var obj = new Array();
  397. obj = {
  398. label: Name,
  399. name: Code,
  400. width: 80,
  401. align: "left"
  402. }
  403. cols.push(obj);
  404. }
  405. }
  406. }
  407. _Clos = cols;
  408. }
  409. });
  410. }
  411. if (Type == '4') {
  412. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  413. cols.push(collast);
  414. var collast = { label: '单据号', name: 'SDNCode', width: 120, align: 'left' };
  415. cols.push(collast);
  416. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  417. cols.push(collast);
  418. var collast = { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' };
  419. cols.push(collast);
  420. var collast = { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' };
  421. cols.push(collast);
  422. var collast = { label: '客户代码', name: 'CusCode', width: 120, align: 'left' };
  423. cols.push(collast);
  424. var collast = { label: '客户名称', name: 'CusName', width: 50, align: 'left' };
  425. cols.push(collast);
  426. var collast = { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' };
  427. cols.push(collast);
  428. var collast = { label: '已发数量', name: 'SDNQuantity', width: 50, align: 'left' };
  429. cols.push(collast);
  430. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  431. cols.push(collast);
  432. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  433. cols.push(collast);
  434. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  435. cols.push(collast);
  436. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  437. cols.push(collast);
  438. var collast = {
  439. label: "状态", name: "Status", width: 60, align: "left",
  440. formatter: function (cellvalue) {
  441. if (cellvalue == "1") {
  442. return "开立";
  443. } else if (cellvalue == "2") {
  444. return "审核";
  445. }
  446. else if (cellvalue == "3") {
  447. return "关闭";
  448. }
  449. else { return ""; }
  450. }
  451. };
  452. cols.push(collast);
  453. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  454. cols.push(collast);
  455. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  456. cols.push(collast);
  457. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  458. cols.push(collast);
  459. $.ajax({
  460. url: "/Print/SelectTableColumnName?" + Math.random(),
  461. dataType: "json",
  462. async: false,
  463. success: function (data) {
  464. if (data != null && data.length > 0) {
  465. DateList = data;
  466. for (var i = 0; i < data.length; i++) {
  467. var TableCode = data[i].TableCode;
  468. if (TableCode == "ICSSDN") {
  469. var Code = data[i].Code;
  470. var Name = data[i].Name;
  471. var obj = new Array();
  472. obj = {
  473. label: Name,
  474. name: Code,
  475. width: 80,
  476. align: "left"
  477. }
  478. cols.push(obj);
  479. }
  480. if (TableCode == "ICSInventory") {
  481. var Code = "ICSInventory"+data[i].Code;
  482. var Name = data[i].Name;
  483. var obj = new Array();
  484. obj = {
  485. label: Name,
  486. name: Code,
  487. width: 80,
  488. align: "left"
  489. }
  490. cols.push(obj);
  491. }
  492. }
  493. }
  494. _Clos = cols;
  495. }
  496. });
  497. }
  498. if (Type == '5') {
  499. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  500. cols.push(collast);
  501. var collast = { label: '单据号', name: 'InCode', width: 120, align: 'left' };
  502. cols.push(collast);
  503. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  504. cols.push(collast);
  505. var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' };
  506. cols.push(collast);
  507. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  508. cols.push(collast);
  509. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  510. cols.push(collast);
  511. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  512. cols.push(collast);
  513. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left' };
  514. cols.push(collast);
  515. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  516. cols.push(collast);
  517. var collast = { label: '收益部门', name: 'EATTRIBUTE4', width: 50, align: 'left' };
  518. cols.push(collast);
  519. var collast = { label: '供应商', name: 'EATTRIBUTE3', width: 50, align: 'left' };
  520. cols.push(collast);
  521. var collast = { label: '项目名称', name: 'EATTRIBUTE8', width: 50, align: 'left' };
  522. cols.push(collast);
  523. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  524. cols.push(collast);
  525. var collast = { label: '最小包装量', name: 'MPQ', width: 100, align: 'left', editable: true, editrules: { number: true } };
  526. cols.push(collast);
  527. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  528. cols.push(collast);
  529. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  530. cols.push(collast);
  531. var collast = { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', };
  532. cols.push(collast);
  533. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  534. cols.push(collast);
  535. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  536. cols.push(collast);
  537. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  538. //cols.push(collast);
  539. $.ajax({
  540. url: "/Print/SelectTableColumnName?" + Math.random(),
  541. dataType: "json",
  542. async: false,
  543. success: function (data) {
  544. if (data != null && data.length > 0) {
  545. DateList = data;
  546. for (var i = 0; i < data.length; i++) {
  547. var TableCode = data[i].TableCode;
  548. if (TableCode == "ICSOtherIn") {
  549. var Code = data[i].Code;
  550. var Name = data[i].Name;
  551. var obj = new Array();
  552. obj = {
  553. label: Name,
  554. name: Code,
  555. width: 80,
  556. align: "left"
  557. }
  558. cols.push(obj);
  559. }
  560. if (TableCode == "ICSInventory") {
  561. var Code = "ICSInventory" + data[i].Code;
  562. var Name = data[i].Name;
  563. var obj = new Array();
  564. obj = {
  565. label: Name,
  566. name: Code,
  567. width: 80,
  568. align: "left"
  569. }
  570. cols.push(obj);
  571. }
  572. }
  573. }
  574. _Clos = cols;
  575. //_Clos1 = cols1;
  576. }
  577. });
  578. }
  579. if (Type == '6') {
  580. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  581. cols.push(collast);
  582. var collast = { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' };
  583. cols.push(collast);
  584. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  585. cols.push(collast);
  586. var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' };
  587. cols.push(collast);
  588. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  589. cols.push(collast);
  590. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  591. cols.push(collast);
  592. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  593. cols.push(collast);
  594. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  595. cols.push(collast);
  596. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  597. cols.push(collast);
  598. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  599. cols.push(collast);
  600. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  601. cols.push(collast);
  602. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  603. cols.push(collast);
  604. var collast = { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', };
  605. cols.push(collast);
  606. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  607. cols.push(collast);
  608. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  609. cols.push(collast);
  610. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  611. //cols.push(collast);
  612. $.ajax({
  613. url: "/Print/SelectTableColumnName?" + Math.random(),
  614. dataType: "json",
  615. async: false,
  616. success: function (data) {
  617. if (data != null && data.length > 0) {
  618. DateList = data;
  619. for (var i = 0; i < data.length; i++) {
  620. var TableCode = data[i].TableCode;
  621. if (TableCode == "ICSReturn") {
  622. var Code = data[i].Code;
  623. var Name = data[i].Name;
  624. var obj = new Array();
  625. obj = {
  626. label: Name,
  627. name: Code,
  628. width: 80,
  629. align: "left"
  630. }
  631. cols.push(obj);
  632. }
  633. if (TableCode == "ICSInventory") {
  634. var Code = data[i].Code;
  635. var Name = data[i].Name;
  636. var obj = new Array();
  637. obj = {
  638. label: Name,
  639. name: Code,
  640. width: 80,
  641. align: "left"
  642. }
  643. cols.push(obj);
  644. //cols1.push(obj);
  645. }
  646. }
  647. }
  648. _Clos = cols;
  649. //_Clos1 = cols1;
  650. }
  651. });
  652. }
  653. //审核到货单生成条码
  654. if (Type == '7') {
  655. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  656. cols.push(collast);
  657. var collast = { label: '单据号', name: 'DNCode', width: 120, align: 'left' };
  658. cols.push(collast);
  659. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  660. cols.push(collast);
  661. var collast = { label: '采购订单号', name: 'POCode', width: 50, align: 'left' };
  662. cols.push(collast);
  663. var collast = { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' };
  664. cols.push(collast);
  665. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  666. cols.push(collast);
  667. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  668. cols.push(collast);
  669. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  670. cols.push(collast);
  671. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  672. cols.push(collast);
  673. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  674. cols.push(collast);
  675. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  676. cols.push(collast);
  677. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  678. cols.push(collast);
  679. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  680. cols.push(collast);
  681. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  682. cols.push(collast);
  683. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  684. //cols.push(collast);
  685. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  686. cols.push(collast);
  687. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  688. cols.push(collast);
  689. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  690. cols.push(collast);
  691. var collast = { label: '未入库数量', name: 'NRCVQuantity', width: 60, align: 'left', };
  692. cols.push(collast);
  693. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  694. cols.push(collast);
  695. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  696. cols.push(collast);
  697. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  698. cols.push(collast);
  699. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  700. cols.push(collast);
  701. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  702. cols.push(collast);
  703. $.ajax({
  704. url: "/Print/SelectTableColumnName?" + Math.random(),
  705. dataType: "json",
  706. async: false,
  707. success: function (data) {
  708. if (data != null && data.length > 0) {
  709. DateList = data;
  710. for (var i = 0; i < data.length; i++) {
  711. var TableCode = data[i].TableCode;
  712. if (TableCode == "ICSDeliveryNotice") {
  713. debugger;
  714. var Code = data[i].Code;
  715. var Name = data[i].Name;
  716. var obj = new Array();
  717. obj = {
  718. label: Name,
  719. name: Code,
  720. width: 80,
  721. align: "left"
  722. }
  723. cols.push(obj);
  724. }
  725. if (TableCode == "ICSInventory") {
  726. var Code = data[i].Code;
  727. var Name = data[i].Name;
  728. var obj = new Array();
  729. obj = {
  730. label: Name,
  731. name: Code,
  732. width: 80,
  733. align: "left"
  734. }
  735. cols.push(obj);
  736. //cols1.push(obj);
  737. }
  738. }
  739. }
  740. _Clos = cols;
  741. //_Clos1 = cols1;
  742. }
  743. });
  744. }
  745. //审核委外到货单生成条码
  746. if (Type == '8') {
  747. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  748. cols.push(collast);
  749. var collast = { label: '单据号', name: 'ODNCode', width: 120, align: 'left' };
  750. cols.push(collast);
  751. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  752. cols.push(collast);
  753. var collast = { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' };
  754. cols.push(collast);
  755. var collast = { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' };
  756. cols.push(collast);
  757. var collast = { label: '委外订单表体ID', name: 'OODetailID', hidden: true };
  758. cols.push(collast);
  759. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  760. cols.push(collast);
  761. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  762. cols.push(collast);
  763. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  764. cols.push(collast);
  765. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  766. cols.push(collast);
  767. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  768. cols.push(collast);
  769. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  770. cols.push(collast);
  771. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  772. cols.push(collast);
  773. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  774. cols.push(collast);
  775. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  776. cols.push(collast);
  777. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  778. cols.push(collast);
  779. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  780. cols.push(collast);
  781. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  782. cols.push(collast);
  783. var collast = { label: '未入库数量', name: 'NRCVQuantity', width: 60, align: 'left', };
  784. cols.push(collast);
  785. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  786. cols.push(collast);
  787. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  788. cols.push(collast);
  789. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  790. cols.push(collast);
  791. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  792. cols.push(collast);
  793. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  794. cols.push(collast);
  795. $.ajax({
  796. url: "/Print/SelectTableColumnName?" + Math.random(),
  797. dataType: "json",
  798. async: false,
  799. success: function (data) {
  800. if (data != null && data.length > 0) {
  801. DateList = data;
  802. for (var i = 0; i < data.length; i++) {
  803. var TableCode = data[i].TableCode;
  804. if (TableCode == "ICSODeliveryNotice") {
  805. var Code = data[i].Code;
  806. var Name = data[i].Name;
  807. var obj = new Array();
  808. obj = {
  809. label: Name,
  810. name: Code,
  811. width: 80,
  812. align: "left"
  813. }
  814. cols.push(obj);
  815. }
  816. if (TableCode == "ICSInventory") {
  817. var Code = "ICSInventory"+data[i].Code;
  818. var Name = data[i].Name;
  819. var obj = new Array();
  820. obj = {
  821. label: Name,
  822. name: Code,
  823. width: 80,
  824. align: "left"
  825. }
  826. cols.push(obj);
  827. }
  828. }
  829. }
  830. _Clos = cols;
  831. }
  832. });
  833. }
  834. //开立成品入库单生成条码
  835. if (Type == '9') {
  836. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  837. cols.push(collast);
  838. var collast = { label: '单据号', name: 'RCVCode', width: 120, align: 'left' };
  839. cols.push(collast);
  840. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  841. cols.push(collast);
  842. var collast = { label: '源头单据号', name: 'MOCode', width: 50, align: 'left' };
  843. cols.push(collast);
  844. var collast = { label: '仓库号', name: 'WHCode', width: 120, align: 'left' };
  845. cols.push(collast);
  846. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  847. cols.push(collast);
  848. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  849. cols.push(collast);
  850. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  851. cols.push(collast);
  852. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  853. cols.push(collast);
  854. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  855. cols.push(collast);
  856. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  857. cols.push(collast);
  858. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  859. //cols.push(collast);
  860. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  861. cols.push(collast);
  862. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  863. cols.push(collast);
  864. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  865. cols.push(collast);
  866. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  867. cols.push(collast);
  868. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  869. cols.push(collast);
  870. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  871. cols.push(collast);
  872. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  873. cols.push(collast);
  874. $.ajax({
  875. url: "/Print/SelectTableColumnName?" + Math.random(),
  876. dataType: "json",
  877. async: false,
  878. success: function (data) {
  879. if (data != null && data.length > 0) {
  880. DateList = data;
  881. for (var i = 0; i < data.length; i++) {
  882. var TableCode = data[i].TableCode;
  883. if (TableCode == "ICSMO") {
  884. var Code = data[i].Code;
  885. var Name = data[i].Name;
  886. var obj = new Array();
  887. obj = {
  888. label: Name,
  889. name: Code,
  890. width: 80,
  891. align: "left"
  892. }
  893. cols.push(obj);
  894. }
  895. if (TableCode == "ICSInventory") {
  896. var Code = data[i].Code;
  897. var Name = data[i].Name;
  898. var obj = new Array();
  899. obj = {
  900. label: Name,
  901. name: Code,
  902. width: 80,
  903. align: "left"
  904. }
  905. cols.push(obj);
  906. //cols1.push(obj);
  907. }
  908. }
  909. }
  910. _Clos = cols;
  911. //_Clos1 = cols1;
  912. }
  913. });
  914. }
  915. //审核拒收单生成条码
  916. if (Type == '10') {
  917. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  918. cols.push(collast);
  919. var collast = { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' };
  920. cols.push(collast);
  921. var collast = { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' };
  922. cols.push(collast);
  923. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  924. cols.push(collast);
  925. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  926. cols.push(collast);
  927. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  928. cols.push(collast);
  929. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  930. cols.push(collast);
  931. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  932. cols.push(collast);
  933. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  934. cols.push(collast);
  935. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  936. cols.push(collast);
  937. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  938. cols.push(collast);
  939. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  940. cols.push(collast);
  941. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  942. cols.push(collast);
  943. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  944. cols.push(collast);
  945. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  946. cols.push(collast);
  947. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  948. cols.push(collast);
  949. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  950. cols.push(collast);
  951. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  952. cols.push(collast);
  953. $.ajax({
  954. url: "/Print/SelectTableColumnName?" + Math.random(),
  955. dataType: "json",
  956. async: false,
  957. success: function (data) {
  958. if (data != null && data.length > 0) {
  959. DateList = data;
  960. for (var i = 0; i < data.length; i++) {
  961. var TableCode = data[i].TableCode;
  962. if (TableCode == "ICSDeliveryNotice") {
  963. var Code = data[i].Code;
  964. var Name = data[i].Name;
  965. var obj = new Array();
  966. obj = {
  967. label: Name,
  968. name: Code,
  969. width: 80,
  970. align: "left"
  971. }
  972. cols.push(obj);
  973. }
  974. if (TableCode == "ICSInventory") {
  975. var Code = data[i].Code;
  976. var Name = data[i].Name;
  977. var obj = new Array();
  978. obj = {
  979. label: Name,
  980. name: Code,
  981. width: 80,
  982. align: "left"
  983. }
  984. cols.push(obj);
  985. //cols1.push(obj);
  986. }
  987. }
  988. }
  989. _Clos = cols;
  990. //_Clos1 = cols1;
  991. }
  992. });
  993. }
  994. //审核委外拒收单生成条码
  995. if (Type == '11') {
  996. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  997. cols.push(collast);
  998. var collast = { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' };
  999. cols.push(collast);
  1000. var collast = { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' };
  1001. cols.push(collast);
  1002. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  1003. cols.push(collast);
  1004. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  1005. cols.push(collast);
  1006. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1007. cols.push(collast);
  1008. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  1009. cols.push(collast);
  1010. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  1011. cols.push(collast);
  1012. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  1013. cols.push(collast);
  1014. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  1015. cols.push(collast);
  1016. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1017. cols.push(collast);
  1018. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1019. cols.push(collast);
  1020. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  1021. cols.push(collast);
  1022. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1023. cols.push(collast);
  1024. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  1025. cols.push(collast);
  1026. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  1027. cols.push(collast);
  1028. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  1029. cols.push(collast);
  1030. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  1031. cols.push(collast);
  1032. $.ajax({
  1033. url: "/Print/SelectTableColumnName?" + Math.random(),
  1034. dataType: "json",
  1035. async: false,
  1036. success: function (data) {
  1037. if (data != null && data.length > 0) {
  1038. DateList = data;
  1039. for (var i = 0; i < data.length; i++) {
  1040. var TableCode = data[i].TableCode;
  1041. if (TableCode == "ICSODeliveryNotice") {
  1042. var Code = data[i].Code;
  1043. var Name = data[i].Name;
  1044. var obj = new Array();
  1045. obj = {
  1046. label: Name,
  1047. name: Code,
  1048. width: 80,
  1049. align: "left"
  1050. }
  1051. cols.push(obj);
  1052. }
  1053. if (TableCode == "ICSInventory") {
  1054. var Code = data[i].Code;
  1055. var Name = data[i].Name;
  1056. var obj = new Array();
  1057. obj = {
  1058. label: Name,
  1059. name: Code,
  1060. width: 80,
  1061. align: "left"
  1062. }
  1063. cols.push(obj);
  1064. //cols1.push(obj);
  1065. }
  1066. }
  1067. }
  1068. _Clos = cols;
  1069. //_Clos1 = cols1;
  1070. }
  1071. });
  1072. }
  1073. //领料申请退料生成条码
  1074. if (Type == '12') {
  1075. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1076. cols.push(collast);
  1077. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  1078. cols.push(collast);
  1079. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1080. cols.push(collast);
  1081. var collast = { label: '来源单据号', name: 'SourceCodea', width: 120, align: 'left' };
  1082. cols.push(collast);
  1083. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  1084. cols.push(collast);
  1085. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1086. cols.push(collast);
  1087. var collast = { label: '料品编码', name: 'InvName', width: 150, align: 'left', };
  1088. cols.push(collast);
  1089. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1090. cols.push(collast);
  1091. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1092. cols.push(collast);
  1093. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1094. cols.push(collast);
  1095. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1096. cols.push(collast);
  1097. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1098. cols.push(collast);
  1099. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1100. //cols.push(collast);
  1101. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1102. cols.push(collast);
  1103. $.ajax({
  1104. url: "/Print/SelectTableColumnName?" + Math.random(),
  1105. dataType: "json",
  1106. async: false,
  1107. success: function (data) {
  1108. if (data != null && data.length > 0) {
  1109. DateList = data;
  1110. for (var i = 0; i < data.length; i++) {
  1111. var TableCode = data[i].TableCode;
  1112. if (TableCode == "ICSMOApplyNegDetail") {
  1113. var Code = data[i].Code;
  1114. var Name = data[i].Name;
  1115. var obj = new Array();
  1116. obj = {
  1117. label: Name,
  1118. name: Code,
  1119. width: 80,
  1120. align: "left"
  1121. }
  1122. cols.push(obj);
  1123. }
  1124. if (TableCode == "ICSInventory") {
  1125. var Code = data[i].Code;
  1126. var Name = data[i].Name;
  1127. var obj = new Array();
  1128. obj = {
  1129. label: Name,
  1130. name: Code,
  1131. width: 80,
  1132. align: "left"
  1133. }
  1134. cols.push(obj);
  1135. //cols1.push(obj);
  1136. }
  1137. }
  1138. }
  1139. _Clos = cols;
  1140. //_Clos1 = cols1;
  1141. }
  1142. });
  1143. }
  1144. //材料出库退料生成条码
  1145. if (Type == '13') {
  1146. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1147. cols.push(collast);
  1148. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  1149. cols.push(collast);
  1150. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1151. cols.push(collast);
  1152. var collast = { label: '源头单据号', name: 'SCode', width: 120, align: 'left' };
  1153. cols.push(collast);
  1154. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  1155. cols.push(collast);
  1156. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1157. cols.push(collast);
  1158. var collast = { label: '料品编码', name: 'InvName', width: 150, align: 'left', };
  1159. cols.push(collast);
  1160. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1161. cols.push(collast);
  1162. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1163. cols.push(collast);
  1164. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1165. cols.push(collast);
  1166. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1167. cols.push(collast);
  1168. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1169. cols.push(collast);
  1170. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1171. //cols.push(collast);
  1172. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1173. cols.push(collast);
  1174. }
  1175. //委外领料申请退料生成条码
  1176. if (Type == '14') {
  1177. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1178. cols.push(collast);
  1179. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  1180. cols.push(collast);
  1181. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1182. cols.push(collast);
  1183. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  1184. cols.push(collast);
  1185. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1186. cols.push(collast);
  1187. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1188. cols.push(collast);
  1189. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1190. cols.push(collast);
  1191. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1192. cols.push(collast);
  1193. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1194. cols.push(collast);
  1195. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1196. cols.push(collast);
  1197. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1198. cols.push(collast);
  1199. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1200. //cols.push(collast);
  1201. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1202. cols.push(collast);
  1203. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1204. //cols.push(collast);
  1205. $.ajax({
  1206. url: "/Print/SelectTableColumnName?" + Math.random(),
  1207. dataType: "json",
  1208. async: false,
  1209. success: function (data) {
  1210. if (data != null && data.length > 0) {
  1211. DateList = data;
  1212. for (var i = 0; i < data.length; i++) {
  1213. var TableCode = data[i].TableCode;
  1214. if (TableCode == "ICSOApplyNegDetail") {
  1215. var Code = data[i].Code;
  1216. var Name = data[i].Name;
  1217. var obj = new Array();
  1218. obj = {
  1219. label: Name,
  1220. name: Code,
  1221. width: 80,
  1222. align: "left"
  1223. }
  1224. cols.push(obj);
  1225. }
  1226. if (TableCode == "ICSInventory") {
  1227. var Code = data[i].Code;
  1228. var Name = data[i].Name;
  1229. var obj = new Array();
  1230. obj = {
  1231. label: Name,
  1232. name: Code,
  1233. width: 80,
  1234. align: "left"
  1235. }
  1236. cols.push(obj);
  1237. //cols1.push(obj);
  1238. }
  1239. }
  1240. }
  1241. _Clos = cols;
  1242. //_Clos1 = cols1;
  1243. }
  1244. });
  1245. }
  1246. //委外材料出库退料生成条码
  1247. if (Type == '15') {
  1248. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1249. cols.push(collast);
  1250. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  1251. cols.push(collast);
  1252. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1253. cols.push(collast);
  1254. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  1255. cols.push(collast);
  1256. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1257. cols.push(collast);
  1258. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1259. cols.push(collast);
  1260. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1261. cols.push(collast);
  1262. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1263. cols.push(collast);
  1264. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1265. cols.push(collast);
  1266. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1267. cols.push(collast);
  1268. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1269. cols.push(collast);
  1270. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1271. //cols.push(collast);
  1272. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1273. cols.push(collast);
  1274. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1275. //cols.push(collast);
  1276. $.ajax({
  1277. url: "/Print/SelectTableColumnName?" + Math.random(),
  1278. dataType: "json",
  1279. async: false,
  1280. success: function (data) {
  1281. if (data != null && data.length > 0) {
  1282. DateList = data;
  1283. for (var i = 0; i < data.length; i++) {
  1284. var TableCode = data[i].TableCode;
  1285. if (TableCode == "ICSOApplyNegDetail") {
  1286. var Code = data[i].Code;
  1287. var Name = data[i].Name;
  1288. var obj = new Array();
  1289. obj = {
  1290. label: Name,
  1291. name: Code,
  1292. width: 80,
  1293. align: "left"
  1294. }
  1295. cols.push(obj);
  1296. }
  1297. if (TableCode == "ICSInventory") {
  1298. var Code = data[i].Code;
  1299. var Name = data[i].Name;
  1300. var obj = new Array();
  1301. obj = {
  1302. label: Name,
  1303. name: Code,
  1304. width: 80,
  1305. align: "left"
  1306. }
  1307. cols.push(obj);
  1308. //cols1.push(obj);
  1309. }
  1310. }
  1311. }
  1312. _Clos = cols;
  1313. //_Clos1 = cols1;
  1314. }
  1315. });
  1316. }
  1317. //返工工单生成条码
  1318. if (Type == '16') {
  1319. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1320. cols.push(collast);
  1321. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  1322. cols.push(collast);
  1323. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  1324. cols.push(collast);
  1325. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  1326. cols.push(collast);
  1327. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1328. cols.push(collast);
  1329. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1330. cols.push(collast);
  1331. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1332. cols.push(collast);
  1333. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1334. cols.push(collast);
  1335. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  1336. cols.push(collast);
  1337. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1338. cols.push(collast);
  1339. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1340. cols.push(collast);
  1341. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1342. //cols.push(collast);
  1343. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1344. cols.push(collast);
  1345. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1346. //cols.push(collast);
  1347. $.ajax({
  1348. url: "/Print/SelectTableColumnName?" + Math.random(),
  1349. dataType: "json",
  1350. async: false,
  1351. success: function (data) {
  1352. if (data != null && data.length > 0) {
  1353. DateList = data;
  1354. for (var i = 0; i < data.length; i++) {
  1355. var TableCode = data[i].TableCode;
  1356. if (TableCode == "ICSMOPick") {
  1357. var Code = data[i].Code;
  1358. var Name = data[i].Name;
  1359. var obj = new Array();
  1360. obj = {
  1361. label: Name,
  1362. name: Code,
  1363. width: 80,
  1364. align: "left"
  1365. }
  1366. cols.push(obj);
  1367. }
  1368. if (TableCode == "ICSInventory") {
  1369. var Code = data[i].Code;
  1370. var Name = data[i].Name;
  1371. var obj = new Array();
  1372. obj = {
  1373. label: Name,
  1374. name: Code,
  1375. width: 80,
  1376. align: "left"
  1377. }
  1378. cols.push(obj);
  1379. //cols1.push(obj);
  1380. }
  1381. }
  1382. }
  1383. _Clos = cols;
  1384. //_Clos1 = cols1;
  1385. }
  1386. });
  1387. }
  1388. //不合格条码生成条码
  1389. if (Type == '17') {
  1390. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1391. cols.push(collast);
  1392. var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' };
  1393. cols.push(collast);
  1394. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1395. cols.push(collast);
  1396. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1397. cols.push(collast);
  1398. var collast = { label: '不合格数量', name: 'Quantity', width: 100, align: 'left' };
  1399. cols.push(collast);
  1400. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1401. cols.push(collast);
  1402. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1403. cols.push(collast);
  1404. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1405. cols.push(collast);
  1406. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1407. //cols.push(collast);
  1408. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1409. cols.push(collast);
  1410. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1411. //cols.push(collast);
  1412. $.ajax({
  1413. url: "/Print/SelectTableColumnName?" + Math.random(),
  1414. dataType: "json",
  1415. async: false,
  1416. success: function (data) {
  1417. if (data != null && data.length > 0) {
  1418. DateList = data;
  1419. for (var i = 0; i < data.length; i++) {
  1420. var TableCode = data[i].TableCode;
  1421. if (TableCode == "ICSInspection") {
  1422. var Code = data[i].Code;
  1423. var Name = data[i].Name;
  1424. var obj = new Array();
  1425. obj = {
  1426. label: Name,
  1427. name: Code,
  1428. width: 80,
  1429. align: "left"
  1430. }
  1431. cols.push(obj);
  1432. }
  1433. if (TableCode == "ICSInventory") {
  1434. var Code = data[i].Code;
  1435. var Name = data[i].Name;
  1436. var obj = new Array();
  1437. obj = {
  1438. label: Name,
  1439. name: Code,
  1440. width: 80,
  1441. align: "left"
  1442. }
  1443. cols.push(obj);
  1444. //cols1.push(obj);
  1445. }
  1446. }
  1447. }
  1448. _Clos = cols;
  1449. //_Clos1 = cols1;
  1450. }
  1451. });
  1452. }
  1453. //副产品生成条码
  1454. if (Type == '18') {
  1455. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1456. cols.push(collast);
  1457. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  1458. cols.push(collast);
  1459. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  1460. cols.push(collast);
  1461. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  1462. cols.push(collast);
  1463. var collast = { label: '料品编码(子)', name: 'ZInvCode', width: 120, align: 'left' };
  1464. cols.push(collast);
  1465. var collast = { label: '料品编码(母)', name: 'MInvCode', width: 120, align: 'left' };
  1466. cols.push(collast);
  1467. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1468. cols.push(collast);
  1469. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1470. cols.push(collast);
  1471. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1472. cols.push(collast);
  1473. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  1474. cols.push(collast);
  1475. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1476. cols.push(collast);
  1477. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1478. cols.push(collast);
  1479. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1480. cols.push(collast);
  1481. $.ajax({
  1482. url: "/Print/SelectTableColumnName?" + Math.random(),
  1483. dataType: "json",
  1484. async: false,
  1485. success: function (data) {
  1486. if (data != null && data.length > 0) {
  1487. DateList = data;
  1488. for (var i = 0; i < data.length; i++) {
  1489. var TableCode = data[i].TableCode;
  1490. if (TableCode == "ICSMOPick") {
  1491. var Code = data[i].Code;
  1492. var Name = data[i].Name;
  1493. var obj = new Array();
  1494. obj = {
  1495. label: Name,
  1496. name: Code,
  1497. width: 80,
  1498. align: "left"
  1499. }
  1500. cols.push(obj);
  1501. }
  1502. if (TableCode == "ICSInventory") {
  1503. var Code = "ICSInventory"+data[i].Code;
  1504. var Name = data[i].Name;
  1505. var obj = new Array();
  1506. obj = {
  1507. label: Name,
  1508. name: Code,
  1509. width: 80,
  1510. align: "left"
  1511. }
  1512. cols.push(obj);
  1513. }
  1514. }
  1515. }
  1516. _Clos = cols;
  1517. }
  1518. });
  1519. }
  1520. //锐腾两步调入生成条码
  1521. if (Type == '20') {
  1522. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1523. cols.push(collast);
  1524. var collast = { label: '调拨单号', name: 'TransferNO', width: 120, align: 'left' };
  1525. cols.push(collast);
  1526. var collast = { label: '调拨单行号', name: 'Sequence', width: 50, align: 'left' };
  1527. cols.push(collast);
  1528. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1529. cols.push(collast);
  1530. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1531. cols.push(collast);
  1532. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1533. cols.push(collast);
  1534. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1535. cols.push(collast);
  1536. var collast = { label: '已调入数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1537. cols.push(collast);
  1538. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1539. cols.push(collast);
  1540. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1541. cols.push(collast);
  1542. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1543. //cols.push(collast);
  1544. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1545. cols.push(collast);
  1546. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1547. //cols.push(collast);
  1548. $.ajax({
  1549. url: "/Print/SelectTableColumnName?" + Math.random(),
  1550. dataType: "json",
  1551. async: false,
  1552. success: function (data) {
  1553. if (data != null && data.length > 0) {
  1554. DateList = data;
  1555. for (var i = 0; i < data.length; i++) {
  1556. var TableCode = data[i].TableCode;
  1557. if (TableCode == "ICSMOPick") {
  1558. var Code = data[i].Code;
  1559. var Name = data[i].Name;
  1560. var obj = new Array();
  1561. obj = {
  1562. label: Name,
  1563. name: Code,
  1564. width: 80,
  1565. align: "left"
  1566. }
  1567. cols.push(obj);
  1568. }
  1569. if (TableCode == "ICSInventory") {
  1570. var Code = data[i].Code;
  1571. var Name = data[i].Name;
  1572. var obj = new Array();
  1573. obj = {
  1574. label: Name,
  1575. name: Code,
  1576. width: 80,
  1577. align: "left"
  1578. }
  1579. cols.push(obj);
  1580. //cols1.push(obj);
  1581. }
  1582. }
  1583. }
  1584. _Clos = cols;
  1585. //_Clos1 = cols1;
  1586. }
  1587. });
  1588. }
  1589. //采购入库生成条码
  1590. if (Type == '22') {
  1591. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1592. cols.push(collast);
  1593. var collast = { label: '入库单号', name: 'RCVCode', width: 120, align: 'left' };
  1594. cols.push(collast);
  1595. var collast = { label: '入库单行号', name: 'Sequence', width: 50, align: 'left' };
  1596. cols.push(collast);
  1597. var collast = { label: '采购订单号', name: 'SourceCode', width: 50, align: 'left' };
  1598. cols.push(collast);
  1599. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1600. cols.push(collast);
  1601. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1602. cols.push(collast);
  1603. var collast = { label: '规格型号', name: 'InvStd', width: 150, align: 'left', };
  1604. cols.push(collast);
  1605. if (data != null && data.length > 0) {
  1606. DateList = data;
  1607. for (var i = 0; i < data.length; i++) {
  1608. var ColName = data[i].ColName;
  1609. var ColCode = data[i].ColCode;
  1610. var obj = new Array();
  1611. obj = {
  1612. label: ColName,
  1613. name: ColCode,
  1614. width: 80,
  1615. align: "left"
  1616. }
  1617. cols.push(obj);
  1618. }
  1619. }
  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: 'LOTQTY', width: 60, align: 'left', };
  1629. cols.push(collast);
  1630. $.ajax({
  1631. url: "/Print/SelectTableColumnName?" + Math.random(),
  1632. dataType: "json",
  1633. async: false,
  1634. success: function (data) {
  1635. if (data != null && data.length > 0) {
  1636. DateList = data;
  1637. for (var i = 0; i < data.length; i++) {
  1638. var TableCode = data[i].TableCode;
  1639. if (TableCode == "ICSPurchaseReceive") {
  1640. var Code = data[i].Code;
  1641. var Name = data[i].Name;
  1642. var obj = new Array();
  1643. obj = {
  1644. label: Name,
  1645. name: Code,
  1646. width: 80,
  1647. align: "left"
  1648. }
  1649. cols.push(obj);
  1650. }
  1651. if (TableCode == "ICSInventory") {
  1652. var Code = "ICSInventory"+data[i].Code;
  1653. var Name = data[i].Name;
  1654. var obj = new Array();
  1655. obj = {
  1656. label: Name,
  1657. name: Code,
  1658. width: 80,
  1659. align: "left"
  1660. }
  1661. cols.push(obj);
  1662. }
  1663. }
  1664. }
  1665. _Clos = cols;
  1666. }
  1667. });
  1668. var collast = { label: '厂商料号', name: 'ManufacturerInvCode', width: 150, align: 'left', };
  1669. cols.push(collast);
  1670. var collast = { label: '供应商', name: 'EATTRIBUTE3', width: 150, align: 'left', };
  1671. cols.push(collast);
  1672. var collast = { label: '采购员', name: 'F_RealName', width: 150, align: 'left', };
  1673. cols.push(collast);
  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: 'InvCode', width: 120, align: 'left' };
  1684. cols.push(collast);
  1685. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1686. cols.push(collast);
  1687. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1688. cols.push(collast);
  1689. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1690. cols.push(collast);
  1691. var collast = { label: '已入数量', name: 'RCVQuantity', width: 100, align: 'left' };
  1692. cols.push(collast);
  1693. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1694. cols.push(collast);
  1695. $.ajax({
  1696. url: "/Print/SelectTableColumnName?" + Math.random(),
  1697. dataType: "json",
  1698. async: false,
  1699. success: function (data) {
  1700. if (data != null && data.length > 0) {
  1701. DateList = data;
  1702. for (var i = 0; i < data.length; i++) {
  1703. var TableCode = data[i].TableCode;
  1704. if (TableCode == "ICSOutsourcingReceive") {
  1705. var Code = data[i].Code;
  1706. var Name = data[i].Name;
  1707. var obj = new Array();
  1708. obj = {
  1709. label: Name,
  1710. name: Code,
  1711. width: 80,
  1712. align: "left"
  1713. }
  1714. cols.push(obj);
  1715. }
  1716. if (TableCode == "ICSInventory") {
  1717. var Code = "ICSInventory"+data[i].Code;
  1718. var Name = data[i].Name;
  1719. var obj = new Array();
  1720. obj = {
  1721. label: Name,
  1722. name: Code,
  1723. width: 80,
  1724. align: "left"
  1725. }
  1726. cols.push(obj);
  1727. }
  1728. }
  1729. }
  1730. _Clos = cols;
  1731. }
  1732. });
  1733. }
  1734. //红字销售单出库生成条码
  1735. if (Type == '24') {
  1736. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1737. cols.push(collast);
  1738. var collast = { label: '单据号', name: 'SSDCode', width: 120, align: 'left' };
  1739. cols.push(collast);
  1740. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  1741. cols.push(collast);
  1742. var collast = { label: '客户编码', name: 'CusCode', width: 120, align: 'left' };
  1743. cols.push(collast);
  1744. var collast = { label: '客户名称', name: 'CusName', width: 120, align: 'left' };
  1745. cols.push(collast);
  1746. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1747. cols.push(collast);
  1748. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  1749. cols.push(collast);
  1750. var collast = { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' };
  1751. cols.push(collast);
  1752. var collast = { label: '退货日期', name: 'CreateDateTime', width: 150, align: 'left' };
  1753. cols.push(collast);
  1754. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  1755. cols.push(collast);
  1756. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  1757. cols.push(collast);
  1758. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  1759. cols.push(collast);
  1760. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  1761. cols.push(collast);
  1762. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1763. cols.push(collast);
  1764. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  1765. cols.push(collast);
  1766. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1767. cols.push(collast);
  1768. var collast = { label: '入库数量', name: 'SSDQuantity', width: 60, align: 'left', };
  1769. cols.push(collast);
  1770. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  1771. cols.push(collast);
  1772. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  1773. cols.push(collast);
  1774. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  1775. cols.push(collast);
  1776. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  1777. cols.push(collast);
  1778. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  1779. cols.push(collast);
  1780. $.ajax({
  1781. url: "/Print/SelectTableColumnName?" + Math.random(),
  1782. dataType: "json",
  1783. async: false,
  1784. success: function (data) {
  1785. if (data != null && data.length > 0) {
  1786. DateList = data;
  1787. for (var i = 0; i < data.length; i++) {
  1788. var TableCode = data[i].TableCode;
  1789. if (TableCode == "ICSSSD") {
  1790. debugger;
  1791. var Code = data[i].Code;
  1792. var Name = data[i].Name;
  1793. var obj = new Array();
  1794. obj = {
  1795. label: Name,
  1796. name: Code,
  1797. width: 80,
  1798. align: "left"
  1799. }
  1800. cols.push(obj);
  1801. }
  1802. if (TableCode == "ICSInventory") {
  1803. var Code = data[i].Code;
  1804. var Name = data[i].Name;
  1805. var obj = new Array();
  1806. obj = {
  1807. label: Name,
  1808. name: Code,
  1809. width: 80,
  1810. align: "left"
  1811. }
  1812. cols.push(obj);
  1813. }
  1814. }
  1815. }
  1816. _Clos = cols;
  1817. }
  1818. });
  1819. }
  1820. //派纳线边仓调拨申请单生成条码
  1821. if (Type == '201') {
  1822. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1823. cols.push(collast);
  1824. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1825. cols.push(collast);
  1826. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1827. cols.push(collast);
  1828. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  1829. cols.push(collast);
  1830. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  1831. cols.push(collast);
  1832. var collast = { label: '调出仓库', name: 'FromWHName', width: 100, align: 'left', };
  1833. cols.push(collast);
  1834. var collast = { label: '调入仓库', name: 'ToWHName', width: 100, align: 'left', };
  1835. cols.push(collast);
  1836. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1837. cols.push(collast);
  1838. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1839. cols.push(collast);
  1840. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1841. cols.push(collast);
  1842. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1843. cols.push(collast);
  1844. $.ajax({
  1845. url: "/Print/SelectTableColumnName?" + Math.random(),
  1846. dataType: "json",
  1847. async: false,
  1848. success: function (data) {
  1849. if (data != null && data.length > 0) {
  1850. DateList = data;
  1851. for (var i = 0; i < data.length; i++) {
  1852. var TableCode = data[i].TableCode;
  1853. if (TableCode == "ICSTransferApplication") {
  1854. var Code = data[i].Code;
  1855. var Name = data[i].Name;
  1856. var obj = new Array();
  1857. obj = {
  1858. label: Name,
  1859. name: Code,
  1860. width: 80,
  1861. align: "left"
  1862. }
  1863. cols.push(obj);
  1864. }
  1865. if (TableCode == "ICSInventory") {
  1866. var Code = data[i].Code;
  1867. var Name = data[i].Name;
  1868. var obj = new Array();
  1869. obj = {
  1870. label: Name,
  1871. name: Code,
  1872. width: 80,
  1873. align: "left"
  1874. }
  1875. cols.push(obj);
  1876. }
  1877. }
  1878. }
  1879. _Clos = cols;
  1880. }
  1881. });
  1882. }
  1883. //调拨申请单生成条码
  1884. if (Type == '202') {
  1885. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1886. cols.push(collast);
  1887. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1888. cols.push(collast);
  1889. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1890. cols.push(collast);
  1891. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1892. cols.push(collast);
  1893. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1894. cols.push(collast);
  1895. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1896. cols.push(collast);
  1897. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1898. cols.push(collast);
  1899. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1900. cols.push(collast);
  1901. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1902. //cols.push(collast);
  1903. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1904. cols.push(collast);
  1905. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1906. //cols.push(collast);
  1907. $.ajax({
  1908. url: "/Print/SelectTableColumnName?" + Math.random(),
  1909. dataType: "json",
  1910. async: false,
  1911. success: function (data) {
  1912. if (data != null && data.length > 0) {
  1913. DateList = data;
  1914. for (var i = 0; i < data.length; i++) {
  1915. var TableCode = data[i].TableCode;
  1916. if (TableCode == "ICSTransferApplication") {
  1917. var Code = data[i].Code;
  1918. var Name = data[i].Name;
  1919. var obj = new Array();
  1920. obj = {
  1921. label: Name,
  1922. name: Code,
  1923. width: 80,
  1924. align: "left"
  1925. }
  1926. cols.push(obj);
  1927. }
  1928. if (TableCode == "ICSInventory") {
  1929. var Code = data[i].Code;
  1930. var Name = data[i].Name;
  1931. var obj = new Array();
  1932. obj = {
  1933. label: Name,
  1934. name: Code,
  1935. width: 80,
  1936. align: "left"
  1937. }
  1938. cols.push(obj);
  1939. //cols1.push(obj);
  1940. }
  1941. }
  1942. }
  1943. _Clos = cols;
  1944. //_Clos1 = cols1;
  1945. }
  1946. });
  1947. }
  1948. //子表
  1949. if (Type=='17') {
  1950. var cols1 = new Array();
  1951. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  1952. cols1.push(collast1);
  1953. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  1954. cols1.push(collast1);
  1955. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  1956. cols1.push(collast1);
  1957. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  1958. cols1.push(collast1);
  1959. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  1960. cols1.push(collast1);
  1961. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  1962. cols1.push(collast1);
  1963. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  1964. cols1.push(collast1);
  1965. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  1966. cols1.push(collast1);
  1967. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  1968. cols1.push(collast1);
  1969. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  1970. cols1.push(collast1);
  1971. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  1972. cols1.push(collast1);
  1973. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  1974. cols1.push(collast1);
  1975. var collast1 = { label: '是否打印', name: 'isPrint', width: 150, align: 'left' };
  1976. cols1.push(collast1);
  1977. }
  1978. else if (Type == '3') {
  1979. var cols1 = new Array();
  1980. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  1981. cols1.push(collast1);
  1982. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  1983. cols1.push(collast1);
  1984. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  1985. cols1.push(collast1);
  1986. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  1987. cols1.push(collast1);
  1988. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  1989. cols1.push(collast1);
  1990. var collast1 = { label: '所属箱号', name: 'ContainerCode', width: 200, align: 'left' };
  1991. cols1.push(collast1);
  1992. var collast1 = { label: '是否打印', name: 'isPrint', width: 150, align: 'left' };
  1993. cols1.push(collast1);
  1994. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  1995. cols1.push(collast1);
  1996. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  1997. cols1.push(collast1);
  1998. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  1999. cols1.push(collast1);
  2000. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  2001. cols1.push(collast1);
  2002. var collast1 = { label: '备注', name: 'EATTRIBUTE5', width: 100, align: 'left' };
  2003. cols1.push(collast1);
  2004. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  2005. cols1.push(collast1);
  2006. var collast1 = { label: '是否检验', name: 'isInspection', width: 100, align: 'left' };
  2007. cols1.push(collast1);
  2008. var collast1 = { label: '免检', name: 'isExemption', width: 100, align: 'left' };
  2009. cols1.push(collast1);
  2010. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  2011. cols1.push(collast1);
  2012. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  2013. cols1.push(collast1);
  2014. }
  2015. else {
  2016. var cols1 = new Array();
  2017. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  2018. cols1.push(collast1);
  2019. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  2020. cols1.push(collast1);
  2021. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  2022. cols1.push(collast1);
  2023. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  2024. cols1.push(collast1);
  2025. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  2026. cols1.push(collast1);
  2027. var collast1 = { label: '是否打印', name: 'isPrint', width: 150, align: 'left' };
  2028. cols1.push(collast1);
  2029. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  2030. cols1.push(collast1);
  2031. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  2032. cols1.push(collast1);
  2033. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  2034. cols1.push(collast1);
  2035. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  2036. cols1.push(collast1);
  2037. var collast1 = { label: '备注', name: 'EATTRIBUTE5', width: 100, align: 'left' };
  2038. cols1.push(collast1);
  2039. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  2040. cols1.push(collast1);
  2041. var collast1 = { label: '是否检验', name: 'isInspection', width: 100, align: 'left' };
  2042. cols1.push(collast1);
  2043. var collast1 = { label: '免检', name: 'isExemption', width: 100, align: 'left' };
  2044. cols1.push(collast1);
  2045. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  2046. cols1.push(collast1);
  2047. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  2048. cols1.push(collast1);
  2049. }
  2050. if (data != null && data.length > 0) {
  2051. DateList = data;
  2052. for (var i = 0; i < data.length; i++) {
  2053. var ColName = data[i].ColName;
  2054. var ColCode = data[i].ColCode;
  2055. var obj = new Array();
  2056. obj = {
  2057. label: ColName,
  2058. name: ColCode,
  2059. width: 80,
  2060. align: "left"
  2061. }
  2062. if (Type != "22") {
  2063. cols.push(obj);
  2064. }
  2065. cols1.push(obj);
  2066. }
  2067. }
  2068. _Clos = cols;
  2069. _Clos1 = cols1;
  2070. }
  2071. });
  2072. }
  2073. //生产退料
  2074. function gridList() {
  2075. var $gridList = $("#gridList");
  2076. var queryJson = {
  2077. POCode: $("#txt_POCode").val(),
  2078. InvCode: $("#txt_InvCode").val(),
  2079. InvName: $("#txt_InvName").val(),
  2080. BatchCode: $("#txt_BatchCode").val(),
  2081. FromTime: $("#FromTime").val(),
  2082. ToTime: $("#ToTime").val(),
  2083. POStatus: $("#selShow").val()
  2084. }
  2085. $gridList.dataGrid({
  2086. url: "/JHWMS/WMSCreateItemLot/GetGridJson" + "?" + Math.random(),
  2087. postData: { queryJson: JSON.stringify(queryJson) },
  2088. height: $(window).height() - 200,
  2089. width: $(window).width() - 300,
  2090. colModel: _Clos,
  2091. //colModel: [
  2092. // { label: "主键", name: "ID", hidden: true, key: true },
  2093. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  2094. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2095. // { label: '工单子件', name: 'SourceDetailID', hidden: true, },
  2096. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2097. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  2098. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2099. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2100. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2101. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2102. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2103. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2104. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2105. //],
  2106. //colModel: ColModelMain,
  2107. width: "100%",
  2108. autowidth: true,
  2109. //shrinkToFit: true,
  2110. gridComplete: function () {
  2111. },
  2112. pager: "#gridPager",
  2113. sortname: " MTIME desc ,ApplyNegCode asc,REPLICATE('0',10-len(Sequence))+Sequence  ",
  2114. // sortname: 'ApplyNegCode ',
  2115. //let str = `He said, "It's a 'beautiful' day."`,
  2116. //sortorder: "asc",
  2117. viewrecords: true,
  2118. multiselect: true,
  2119. //beforeSelectRow: function (rowid, e) {
  2120. // $("#gridList").jqGrid('resetSelection');
  2121. // return (true);
  2122. //},
  2123. subGrid: true, // (1)开启子表格支持
  2124. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2125. $("#gridList").jqGrid("setSelection", rowid, false);
  2126. bindSubGrid(subgrid_id, rowid)
  2127. }
  2128. });
  2129. $("#warehouse a.btn-default").click(function () {
  2130. $("#warehouse a.btn-default").removeClass("active");
  2131. $(this).addClass("active");
  2132. $('#btn_search').trigger("click");
  2133. });
  2134. $("#btn_search").click(function () {
  2135. var warehouse = $("#warehouse a.active").attr('data-value');
  2136. var queryJson = {
  2137. POCode: $("#txt_POCode").val(),
  2138. InvCode: $("#txt_InvCode").val(),
  2139. InvName: $("#txt_InvName").val(),
  2140. BatchCode: $("#txt_BatchCode").val(),
  2141. FromTime: $("#FromTime").val(),
  2142. ToTime: $("#ToTime").val(),
  2143. POStatus: $("#selShow").val()
  2144. }
  2145. $gridList.jqGrid('setGridParam', {
  2146. postData: { queryJson: JSON.stringify(queryJson) },
  2147. }).trigger('reloadGrid');
  2148. });
  2149. }
  2150. function bindSubGrid(subgrid_id, rowid) {
  2151. $("#gridList").jqGrid("setSelection", rowid, false);
  2152. var subgrid_table_id;
  2153. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2154. var subgrid_pager_id;
  2155. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2156. // (5)动态添加子报表的table和pager
  2157. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2158. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  2159. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2160. // (6)创建jqGrid对象
  2161. $("#" + subgrid_table_id).dataGrid({
  2162. cellEdit: true,
  2163. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2164. //colModel: [
  2165. // { label: "主键", name: "ID", hidden: true, key: true },
  2166. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2167. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2168. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2169. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2170. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2171. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2172. //],
  2173. colModel: _Clos1,
  2174. //colModel: ColModelSub,
  2175. shrinkToFit: true,//宽度自适应
  2176. multiselect: true,
  2177. prmNames: { search: "search" },
  2178. viewrecords: true,
  2179. height: "100%",
  2180. rowNum: 20,
  2181. pager: subgrid_pager_id,
  2182. });
  2183. }
  2184. //委外退料
  2185. function gridList2() {
  2186. var $gridList = $("#gridList");
  2187. var queryJson = {
  2188. POCode: $("#txt_POCode").val(),
  2189. InvCode: $("#txt_InvCode").val(),
  2190. InvName: $("#txt_InvName").val(),
  2191. BatchCode: $("#txt_BatchCode").val(),
  2192. FromTime: $("#FromTime").val(),
  2193. ToTime: $("#ToTime").val(),
  2194. WHCode: $("#txt_WHCode").val(),
  2195. POStatus: $("#selShow").val()
  2196. }
  2197. $gridList.dataGrid({
  2198. url: "/JHWMS/WMSCreateItemLot/GetGridJsonWeiWai" + "?" + Math.random(),
  2199. postData: { queryJson: JSON.stringify(queryJson) },
  2200. height: $(window).height() - 200,
  2201. width: $(window).width() - 300,
  2202. colModel: _Clos,
  2203. width: "100%",
  2204. autowidth: true,
  2205. gridComplete: function () {
  2206. },
  2207. pager: "#gridPager",
  2208. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2209. sortorder: "asc",
  2210. viewrecords: true,
  2211. multiselect: true,
  2212. subGrid: true, // (1)开启子表格支持
  2213. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2214. $("#gridList").jqGrid("setSelection", rowid, false);
  2215. bindSubGrid2(subgrid_id, rowid)
  2216. }
  2217. });
  2218. $("#warehouse a.btn-default").click(function () {
  2219. $("#warehouse a.btn-default").removeClass("active");
  2220. $(this).addClass("active");
  2221. $('#btn_search').trigger("click");
  2222. });
  2223. $("#btn_search").click(function () {
  2224. var warehouse = $("#warehouse a.active").attr('data-value');
  2225. var queryJson = {
  2226. POCode: $("#txt_POCode").val(),
  2227. InvCode: $("#txt_InvCode").val(),
  2228. InvName: $("#txt_InvName").val(),
  2229. BatchCode: $("#txt_BatchCode").val(),
  2230. FromTime: $("#FromTime").val(),
  2231. ToTime: $("#ToTime").val(),
  2232. WHCode: $("#txt_WHCode").val(),
  2233. POStatus: $("#selShow").val()
  2234. }
  2235. $gridList.jqGrid('setGridParam', {
  2236. postData: { queryJson: JSON.stringify(queryJson) },
  2237. }).trigger('reloadGrid');
  2238. });
  2239. }
  2240. function bindSubGrid2(subgrid_id, rowid) {
  2241. $("#gridList").jqGrid("setSelection", rowid, false);
  2242. var subgrid_table_id;
  2243. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2244. var subgrid_pager_id;
  2245. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2246. // (5)动态添加子报表的table和pager
  2247. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2248. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  2249. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2250. // (6)创建jqGrid对象
  2251. $("#" + subgrid_table_id).dataGrid({
  2252. cellEdit: true,
  2253. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2254. colModel: _Clos1,
  2255. shrinkToFit: true,//宽度自适应
  2256. multiselect: true,
  2257. prmNames: { search: "search" },
  2258. viewrecords: true,
  2259. height: "100%",
  2260. rowNum: 20,
  2261. pager: subgrid_pager_id,
  2262. });
  2263. }
  2264. //成品
  2265. function gridList3() {
  2266. var $gridList = $("#gridList");
  2267. var queryJson = {
  2268. POCode: $("#txt_POCode").val(),
  2269. InvCode: $("#txt_InvCode").val(),
  2270. InvName: $("#txt_InvName").val(),
  2271. BatchCode: $("#txt_BatchCode").val(),
  2272. FromTime: $("#FromTime").val(),
  2273. ToTime: $("#ToTime").val(),
  2274. WHCode: $("#txt_WHCode").val(),
  2275. POStatus: $("#selShow").val(),
  2276. SelGDLX: $("#SelGDLX option:checked").val(),
  2277. WHStatus: $("#selStatus").val(),
  2278. InvStd: $("#txt_InvStd").val(),
  2279. ClassGroup: $("#selClassGroup").val(),
  2280. VenInvCode: $("#txt_VenInvCode").val(),
  2281. }
  2282. $gridList.dataGrid({
  2283. url: "/JHWMS/WMSCreateItemLot/GetGridJsonChengPing" + "?" + Math.random(),
  2284. postData: { queryJson: JSON.stringify(queryJson) },
  2285. height: $(window).height() - 200,
  2286. width: $(window).width() - 300,
  2287. colModel: _Clos,
  2288. width: "100%",
  2289. autowidth: true,
  2290. cellEdit: true,
  2291. cellsubmit: "clientArray",
  2292. gridComplete: function () {
  2293. },
  2294. pager: "#gridPager",
  2295. sortname: "CreateDateTime ",
  2296. sortorder: "desc",
  2297. viewrecords: true,
  2298. multiselect: true,
  2299. subGrid: true, // (1)开启子表格支持
  2300. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2301. $("#gridList").jqGrid("setSelection", rowid, false);
  2302. bindSubGrid3(subgrid_id, rowid)
  2303. }
  2304. });
  2305. $("#warehouse a.btn-default").click(function () {
  2306. $("#warehouse a.btn-default").removeClass("active");
  2307. $(this).addClass("active");
  2308. $('#btn_search').trigger("click");
  2309. });
  2310. $("#btn_search").click(function () {
  2311. var warehouse = $("#warehouse a.active").attr('data-value');
  2312. var queryJson = {
  2313. POCode: $("#txt_POCode").val(),
  2314. InvCode: $("#txt_InvCode").val(),
  2315. InvName: $("#txt_InvName").val(),
  2316. BatchCode: $("#txt_BatchCode").val(),
  2317. FromTime: $("#FromTime").val(),
  2318. ToTime: $("#ToTime").val(),
  2319. WHCode: $("#txt_WHCode").val(),
  2320. POStatus: $("#selShow").val(),
  2321. SelGDLX: $("#SelGDLX option:checked").val(),
  2322. WHStatus: $("#selStatus").val(),
  2323. InvStd: $("#txt_InvStd").val(),
  2324. ClassGroup: $("#selClassGroup").val(),
  2325. VenInvCode: $("#txt_VenInvCode").val(),
  2326. }
  2327. $gridList.jqGrid('setGridParam', {
  2328. postData: { queryJson: JSON.stringify(queryJson) },
  2329. }).trigger('reloadGrid');
  2330. });
  2331. }
  2332. function bindSubGrid3(subgrid_id, rowid) {
  2333. $("#gridList").jqGrid("setSelection", rowid, false);
  2334. var subgrid_table_id;
  2335. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2336. var subgrid_pager_id;
  2337. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2338. // (5)动态添加子报表的table和pager
  2339. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2340. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  2341. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2342. var isPrint = $("#selPrint").val();
  2343. // (6)创建jqGrid对象
  2344. $("#" + subgrid_table_id).dataGrid({
  2345. cellEdit: true,
  2346. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2347. colModel: _Clos1,
  2348. shrinkToFit: true,//宽度自适应
  2349. multiselect: true,
  2350. prmNames: { search: "search" },
  2351. viewrecords: true,
  2352. height: "100%",
  2353. rowNum: 20,
  2354. pager: subgrid_pager_id,
  2355. });
  2356. }
  2357. //销售退货
  2358. function gridList4() {
  2359. var $gridList = $("#gridList");
  2360. var queryJson = {
  2361. POCode: $("#txt_POCode").val(),
  2362. InvCode: $("#txt_InvCode").val(),
  2363. InvName: $("#txt_InvName").val(),
  2364. BatchCode: $("#txt_BatchCode").val(),
  2365. POStatus: $("#selShow").val()
  2366. }
  2367. $gridList.dataGrid({
  2368. url: "/JHWMS/WMSCreateItemLot/GetGridJsonXiaoShou" + "?" + Math.random(),
  2369. postData: { queryJson: JSON.stringify(queryJson) },
  2370. height: $(window).height() - 200,
  2371. width: $(window).width() - 300,
  2372. colModel: _Clos,
  2373. width: "100%",
  2374. autowidth: true,
  2375. gridComplete: function () {
  2376. },
  2377. pager: "#gridPager",
  2378. sortname: "SDNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2379. sortorder: "asc",
  2380. viewrecords: true,
  2381. multiselect: true,
  2382. subGrid: true, // (1)开启子表格支持
  2383. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2384. $("#gridList").jqGrid("setSelection", rowid, false);
  2385. bindSubGrid4(subgrid_id, rowid)
  2386. }
  2387. });
  2388. $("#warehouse a.btn-default").click(function () {
  2389. $("#warehouse a.btn-default").removeClass("active");
  2390. $(this).addClass("active");
  2391. $('#btn_search').trigger("click");
  2392. });
  2393. $("#btn_search").click(function () {
  2394. var warehouse = $("#warehouse a.active").attr('data-value');
  2395. var queryJson = {
  2396. POCode: $("#txt_POCode").val(),
  2397. InvCode: $("#txt_InvCode").val(),
  2398. InvName: $("#txt_InvName").val(),
  2399. BatchCode: $("#txt_BatchCode").val(),
  2400. POStatus: $("#selShow").val()
  2401. }
  2402. $gridList.jqGrid('setGridParam', {
  2403. postData: { queryJson: JSON.stringify(queryJson) },
  2404. }).trigger('reloadGrid');
  2405. });
  2406. }
  2407. function bindSubGrid4(subgrid_id, rowid) {
  2408. $("#gridList").jqGrid("setSelection", rowid, false);
  2409. var subgrid_table_id;
  2410. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2411. var subgrid_pager_id;
  2412. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2413. // (5)动态添加子报表的table和pager
  2414. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2415. var SDNCode = $("#gridList").jqGrid('getRowData', rowid).SDNCode;
  2416. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2417. var isPrint = $("#selPrint").val();
  2418. // (6)创建jqGrid对象
  2419. $("#" + subgrid_table_id).dataGrid({
  2420. cellEdit: true,
  2421. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SDNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2422. colModel: _Clos1,
  2423. shrinkToFit: true,//宽度自适应
  2424. multiselect: true,
  2425. prmNames: { search: "search" },
  2426. viewrecords: true,
  2427. height: "100%",
  2428. rowNum: 20,
  2429. pager: subgrid_pager_id,
  2430. });
  2431. }
  2432. //其它入库生成条码
  2433. function gridList5() {
  2434. var $gridList = $("#gridList");
  2435. var queryJson = {
  2436. POCode: $("#txt_POCode").val(),
  2437. InvCode: $("#txt_InvCode").val(),
  2438. InvName: $("#txt_InvName").val(),
  2439. BatchCode: $("#txt_BatchCode").val(),
  2440. FromTime: $("#FromTime").val(),
  2441. ToTime: $("#ToTime").val(),
  2442. WHCode: $("#txt_WHCode").val(),
  2443. POStatus: $("#selShow").val(),
  2444. InvStd: $("#txt_InvStd").val(),
  2445. VenInvCode: $("#txt_VenInvCode").val(),
  2446. }
  2447. $gridList.dataGrid({
  2448. url: "/JHWMS/WMSCreateItemLot/GetGridJsonQiTa" + "?" + Math.random(),
  2449. postData: { queryJson: JSON.stringify(queryJson) },
  2450. height: $(window).height() - 200,
  2451. width: $(window).width() - 300,
  2452. colModel: _Clos,
  2453. cellEdit: true,
  2454. cellsubmit: "clientArray",
  2455. width: "100%",
  2456. autowidth: true,
  2457. gridComplete: function () {
  2458. },
  2459. pager: "#gridPager",
  2460. sortname: 'InCode',
  2461. sortorder: "asc",
  2462. viewrecords: true,
  2463. multiselect: true,
  2464. subGrid: true, // (1)开启子表格支持
  2465. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2466. $("#gridList").jqGrid("setSelection", rowid, false);
  2467. bindSubGrid5(subgrid_id, rowid)
  2468. }
  2469. });
  2470. $("#warehouse a.btn-default").click(function () {
  2471. $("#warehouse a.btn-default").removeClass("active");
  2472. $(this).addClass("active");
  2473. $('#btn_search').trigger("click");
  2474. });
  2475. $("#btn_search").click(function () {
  2476. var warehouse = $("#warehouse a.active").attr('data-value');
  2477. var queryJson = {
  2478. POCode: $("#txt_POCode").val(),
  2479. InvCode: $("#txt_InvCode").val(),
  2480. InvName: $("#txt_InvName").val(),
  2481. BatchCode: $("#txt_BatchCode").val(),
  2482. FromTime: $("#FromTime").val(),
  2483. ToTime: $("#ToTime").val(),
  2484. WHCode: $("#txt_WHCode").val(),
  2485. POStatus: $("#selShow").val(),
  2486. InvStd: $("#txt_InvStd").val(),
  2487. VenInvCode: $("#txt_VenInvCode").val(),
  2488. }
  2489. $gridList.jqGrid('setGridParam', {
  2490. postData: { queryJson: JSON.stringify(queryJson) },
  2491. }).trigger('reloadGrid');
  2492. });
  2493. }
  2494. function bindSubGrid5(subgrid_id, rowid) {
  2495. $("#gridList").jqGrid("setSelection", rowid, false);
  2496. var subgrid_table_id;
  2497. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2498. var subgrid_pager_id;
  2499. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2500. // (5)动态添加子报表的table和pager
  2501. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2502. var InCode = $("#gridList").jqGrid('getRowData', rowid).InCode;
  2503. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2504. var isPrint = $("#selPrint").val();
  2505. // (6)创建jqGrid对象
  2506. $("#" + subgrid_table_id).dataGrid({
  2507. cellEdit: true,
  2508. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + InCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2509. colModel: _Clos1,
  2510. shrinkToFit: true,//宽度自适应
  2511. multiselect: true,
  2512. prmNames: { search: "search" },
  2513. viewrecords: true,
  2514. height: "100%",
  2515. rowNum: 20,
  2516. pager: subgrid_pager_id,
  2517. });
  2518. }
  2519. //归还单生成条码
  2520. function gridList6() {
  2521. var $gridList = $("#gridList");
  2522. var queryJson = {
  2523. POCode: $("#txt_POCode").val(),
  2524. InvCode: $("#txt_InvCode").val(),
  2525. InvName: $("#txt_InvName").val(),
  2526. BatchCode: $("#txt_BatchCode").val(),
  2527. POStatus: $("#selShow").val()
  2528. }
  2529. $gridList.dataGrid({
  2530. url: "/JHWMS/WMSCreateItemLot/GetGridJsonGuiHuan" + "?" + Math.random(),
  2531. postData: { queryJson: JSON.stringify(queryJson) },
  2532. height: $(window).height() - 200,
  2533. width: $(window).width() - 300,
  2534. colModel: _Clos,
  2535. width: "100%",
  2536. autowidth: true,
  2537. gridComplete: function () {
  2538. },
  2539. pager: "#gridPager",
  2540. sortname: "ReturnCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2541. sortorder: "asc",
  2542. viewrecords: true,
  2543. multiselect: true,
  2544. subGrid: true, // (1)开启子表格支持
  2545. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2546. $("#gridList").jqGrid("setSelection", rowid, false);
  2547. bindSubGrid6(subgrid_id, rowid)
  2548. }
  2549. });
  2550. $("#warehouse a.btn-default").click(function () {
  2551. $("#warehouse a.btn-default").removeClass("active");
  2552. $(this).addClass("active");
  2553. $('#btn_search').trigger("click");
  2554. });
  2555. $("#btn_search").click(function () {
  2556. var warehouse = $("#warehouse a.active").attr('data-value');
  2557. var queryJson = {
  2558. POCode: $("#txt_POCode").val(),
  2559. InvCode: $("#txt_InvCode").val(),
  2560. InvName: $("#txt_InvName").val(),
  2561. BatchCode: $("#txt_BatchCode").val(),
  2562. POStatus: $("#selShow").val()
  2563. }
  2564. $gridList.jqGrid('setGridParam', {
  2565. postData: { queryJson: JSON.stringify(queryJson) },
  2566. }).trigger('reloadGrid');
  2567. });
  2568. }
  2569. function bindSubGrid6(subgrid_id, rowid) {
  2570. $("#gridList").jqGrid("setSelection", rowid, false);
  2571. var subgrid_table_id;
  2572. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2573. var subgrid_pager_id;
  2574. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2575. // (5)动态添加子报表的table和pager
  2576. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2577. var ReturnCode = $("#gridList").jqGrid('getRowData', rowid).ReturnCode;
  2578. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2579. // (6)创建jqGrid对象
  2580. $("#" + subgrid_table_id).dataGrid({
  2581. cellEdit: true,
  2582. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ReturnCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2583. colModel: _Clos1,
  2584. //colModel: ColModelSub,
  2585. shrinkToFit: true,//宽度自适应
  2586. multiselect: true,
  2587. prmNames: { search: "search" },
  2588. viewrecords: true,
  2589. height: "100%",
  2590. rowNum: 20,
  2591. pager: subgrid_pager_id,
  2592. });
  2593. }
  2594. //*审核到货单生成条码
  2595. function gridList7() {
  2596. var $gridList = $("#gridList");
  2597. var queryJson = {
  2598. POCode: $("#txt_POCode").val(),
  2599. VenCode: $("#txt_VenCode").val(),
  2600. VenName: $("#txt_VenName").val(),
  2601. InvCode: $("#txt_InvCode").val(),
  2602. InvName: $("#txt_InvName").val(),
  2603. BatchCode: $("#txt_BatchCode").val(),
  2604. POStatus: $("#selShow").val(),
  2605. WHStatus: $("#selStatus").val(),
  2606. InvStd: $("#txt_InvStd").val(),
  2607. }
  2608. $gridList.dataGrid({
  2609. url: "/JHWMS/WMSCreateItemLot/GetGridJsonSHDH" + "?" + Math.random(),
  2610. postData: { queryJson: JSON.stringify(queryJson) },
  2611. height: $(window).height() - 200,
  2612. width: $(window).width() - 300,
  2613. colModel: _Clos,
  2614. width: "100%",
  2615. autowidth: true,
  2616. gridComplete: function () {
  2617. },
  2618. pager: "#gridPager",
  2619. sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2620. sortorder: "asc",
  2621. viewrecords: true,
  2622. multiselect: true,
  2623. subGrid: true, // (1)开启子表格支持
  2624. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2625. $("#gridList").jqGrid("setSelection", rowid, false);
  2626. bindSubGrid7(subgrid_id, rowid)
  2627. }
  2628. });
  2629. $("#warehouse a.btn-default").click(function () {
  2630. $("#warehouse a.btn-default").removeClass("active");
  2631. $(this).addClass("active");
  2632. $('#btn_search').trigger("click");
  2633. });
  2634. $("#btn_search").click(function () {
  2635. var warehouse = $("#warehouse a.active").attr('data-value');
  2636. var queryJson = {
  2637. POCode: $("#txt_POCode").val(),
  2638. VenCode: $("#txt_VenCode").val(),
  2639. VenName: $("#txt_VenName").val(),
  2640. InvCode: $("#txt_InvCode").val(),
  2641. InvName: $("#txt_InvName").val(),
  2642. BatchCode: $("#txt_BatchCode").val(),
  2643. POStatus: $("#selShow").val(),
  2644. WHStatus: $("#selStatus").val(),
  2645. InvStd: $("#txt_InvStd").val(),
  2646. }
  2647. $gridList.jqGrid('setGridParam', {
  2648. postData: { queryJson: JSON.stringify(queryJson) },
  2649. }).trigger('reloadGrid');
  2650. });
  2651. }
  2652. function bindSubGrid7(subgrid_id, rowid) {
  2653. $("#gridList").jqGrid("setSelection", rowid, false);
  2654. var subgrid_table_id;
  2655. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2656. var subgrid_pager_id;
  2657. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2658. // (5)动态添加子报表的table和pager
  2659. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2660. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  2661. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2662. var isPrint = $("#selPrint").val();
  2663. // (6)创建jqGrid对象
  2664. $("#" + subgrid_table_id).dataGrid({
  2665. cellEdit: true,
  2666. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2667. colModel: _Clos1,
  2668. shrinkToFit: true,//宽度自适应
  2669. multiselect: true,
  2670. prmNames: { search: "search" },
  2671. viewrecords: true,
  2672. height: "100%",
  2673. rowNum: 20,
  2674. pager: subgrid_pager_id,
  2675. });
  2676. }
  2677. //审核委外到货单生成条码
  2678. function gridList8() {
  2679. var $gridList = $("#gridList");
  2680. var queryJson = {
  2681. POCode: $("#txt_POCode").val(),
  2682. VenCode: $("#txt_VenCode").val(),
  2683. VenName: $("#txt_VenName").val(),
  2684. InvCode: $("#txt_InvCode").val(),
  2685. InvName: $("#txt_InvName").val(),
  2686. BatchCode: $("#txt_BatchCode").val(),
  2687. POStatus: $("#selShow").val(),
  2688. WHStatus: $("#selStatus").val(),
  2689. InvStd: $("#txt_InvStd").val(),
  2690. }
  2691. $gridList.dataGrid({
  2692. url: "/JHWMS/WMSCreateItemLot/GetGridJsonWWSHDH" + "?" + Math.random(),
  2693. postData: { queryJson: JSON.stringify(queryJson) },
  2694. height: $(window).height() - 200,
  2695. width: $(window).width() - 300,
  2696. colModel: _Clos,
  2697. width: "100%",
  2698. autowidth: true,
  2699. gridComplete: function () {
  2700. },
  2701. pager: "#gridPager",
  2702. sortname: "ODNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2703. sortorder: "asc",
  2704. viewrecords: true,
  2705. multiselect: true,
  2706. subGrid: true, // (1)开启子表格支持
  2707. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2708. $("#gridList").jqGrid("setSelection", rowid, false);
  2709. bindSubGrid8(subgrid_id, rowid)
  2710. }
  2711. });
  2712. $("#warehouse a.btn-default").click(function () {
  2713. $("#warehouse a.btn-default").removeClass("active");
  2714. $(this).addClass("active");
  2715. $('#btn_search').trigger("click");
  2716. });
  2717. $("#btn_search").click(function () {
  2718. var warehouse = $("#warehouse a.active").attr('data-value');
  2719. var queryJson = {
  2720. POCode: $("#txt_POCode").val(),
  2721. VenCode: $("#txt_VenCode").val(),
  2722. VenName: $("#txt_VenName").val(),
  2723. InvCode: $("#txt_InvCode").val(),
  2724. InvName: $("#txt_InvName").val(),
  2725. BatchCode: $("#txt_BatchCode").val(),
  2726. POStatus: $("#selShow").val(),
  2727. WHStatus: $("#selStatus").val(),
  2728. InvStd: $("#txt_InvStd").val(),
  2729. }
  2730. $gridList.jqGrid('setGridParam', {
  2731. postData: { queryJson: JSON.stringify(queryJson) },
  2732. }).trigger('reloadGrid');
  2733. });
  2734. }
  2735. function bindSubGrid8(subgrid_id, rowid) {
  2736. $("#gridList").jqGrid("setSelection", rowid, false);
  2737. var subgrid_table_id;
  2738. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2739. var subgrid_pager_id;
  2740. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2741. // (5)动态添加子报表的table和pager
  2742. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2743. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).ODNCode;
  2744. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2745. var isPrint = $("#selPrint").val();
  2746. // (6)创建jqGrid对象
  2747. $("#" + subgrid_table_id).dataGrid({
  2748. cellEdit: true,
  2749. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2750. colModel: _Clos1,
  2751. //colModel: ColModelSub,
  2752. shrinkToFit: true,//宽度自适应
  2753. multiselect: true,
  2754. prmNames: { search: "search" },
  2755. viewrecords: true,
  2756. height: "100%",
  2757. rowNum: 20,
  2758. pager: subgrid_pager_id,
  2759. });
  2760. }
  2761. //开立得成品入库单 生成条码
  2762. function gridList9() {
  2763. var $gridList = $("#gridList");
  2764. var queryJson = {
  2765. POCode: $("#txt_POCode").val(),
  2766. InvCode: $("#txt_InvCode").val(),
  2767. InvName: $("#txt_InvName").val(),
  2768. BatchCode: $("#txt_BatchCode").val(),
  2769. POStatus: $("#selShow").val(),
  2770. SCode: $("#txt_SCode").val(),
  2771. }
  2772. $gridList.dataGrid({
  2773. url: "/JHWMS/WMSCreateItemLot/GetGridJsonKLCPRK" + "?" + Math.random(),
  2774. postData: { queryJson: JSON.stringify(queryJson) },
  2775. height: $(window).height() - 200,
  2776. width: $(window).width() - 300,
  2777. colModel: _Clos,
  2778. width: "100%",
  2779. autowidth: true,
  2780. gridComplete: function () {
  2781. },
  2782. pager: "#gridPager",
  2783. sortname: "RCVCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2784. sortorder: "asc",
  2785. viewrecords: true,
  2786. multiselect: true,
  2787. subGrid: true, // (1)开启子表格支持
  2788. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2789. $("#gridList").jqGrid("setSelection", rowid, false);
  2790. bindSubGrid9(subgrid_id, rowid)
  2791. }
  2792. });
  2793. $("#warehouse a.btn-default").click(function () {
  2794. $("#warehouse a.btn-default").removeClass("active");
  2795. $(this).addClass("active");
  2796. $('#btn_search').trigger("click");
  2797. });
  2798. $("#btn_search").click(function () {
  2799. var warehouse = $("#warehouse a.active").attr('data-value');
  2800. var queryJson = {
  2801. POCode: $("#txt_POCode").val(),
  2802. InvCode: $("#txt_InvCode").val(),
  2803. InvName: $("#txt_InvName").val(),
  2804. BatchCode: $("#txt_BatchCode").val(),
  2805. POStatus: $("#selShow").val(),
  2806. SCode: $("#txt_SCode").val(),
  2807. }
  2808. $gridList.jqGrid('setGridParam', {
  2809. postData: { queryJson: JSON.stringify(queryJson) },
  2810. }).trigger('reloadGrid');
  2811. });
  2812. }
  2813. function bindSubGrid9(subgrid_id, rowid) {
  2814. $("#gridList").jqGrid("setSelection", rowid, false);
  2815. var subgrid_table_id;
  2816. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2817. var subgrid_pager_id;
  2818. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2819. // (5)动态添加子报表的table和pager
  2820. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2821. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  2822. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2823. // (6)创建jqGrid对象
  2824. $("#" + subgrid_table_id).dataGrid({
  2825. cellEdit: true,
  2826. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2827. colModel: _Clos1,
  2828. //colModel: ColModelSub,
  2829. shrinkToFit: true,//宽度自适应
  2830. multiselect: true,
  2831. prmNames: { search: "search" },
  2832. viewrecords: true,
  2833. height: "100%",
  2834. rowNum: 20,
  2835. pager: subgrid_pager_id,
  2836. });
  2837. }
  2838. //采购拒收单
  2839. function gridList10() {
  2840. var $gridList = $("#gridList");
  2841. var queryJson = {
  2842. POCode: $("#txt_POCode").val(),
  2843. VenCode: $("#txt_VenCode").val(),
  2844. VenName: $("#txt_VenName").val(),
  2845. InvCode: $("#txt_InvCode").val(),
  2846. InvName: $("#txt_InvName").val(),
  2847. BatchCode: $("#txt_BatchCode").val(),
  2848. POStatus: $("#selShow").val()
  2849. }
  2850. $gridList.dataGrid({
  2851. url: "/JHWMS/WMSCreateItemLot/GetGridJsonJSD" + "?" + Math.random(),
  2852. postData: { queryJson: JSON.stringify(queryJson) },
  2853. height: $(window).height() - 200,
  2854. width: $(window).width() - 300,
  2855. colModel: _Clos,
  2856. width: "100%",
  2857. autowidth: true,
  2858. gridComplete: function () {
  2859. },
  2860. pager: "#gridPager",
  2861. sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2862. sortorder: "asc",
  2863. viewrecords: true,
  2864. multiselect: true,
  2865. subGrid: true, // (1)开启子表格支持
  2866. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2867. $("#gridList").jqGrid("setSelection", rowid, false);
  2868. bindSubGrid10(subgrid_id, rowid)
  2869. }
  2870. });
  2871. $("#warehouse a.btn-default").click(function () {
  2872. $("#warehouse a.btn-default").removeClass("active");
  2873. $(this).addClass("active");
  2874. $('#btn_search').trigger("click");
  2875. });
  2876. $("#btn_search").click(function () {
  2877. var warehouse = $("#warehouse a.active").attr('data-value');
  2878. var queryJson = {
  2879. POCode: $("#txt_POCode").val(),
  2880. VenCode: $("#txt_VenCode").val(),
  2881. VenName: $("#txt_VenName").val(),
  2882. InvCode: $("#txt_InvCode").val(),
  2883. InvName: $("#txt_InvName").val(),
  2884. BatchCode: $("#txt_BatchCode").val(),
  2885. POStatus: $("#selShow").val()
  2886. }
  2887. $gridList.jqGrid('setGridParam', {
  2888. postData: { queryJson: JSON.stringify(queryJson) },
  2889. }).trigger('reloadGrid');
  2890. });
  2891. }
  2892. function bindSubGrid10(subgrid_id, rowid) {
  2893. $("#gridList").jqGrid("setSelection", rowid, false);
  2894. var subgrid_table_id;
  2895. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2896. var subgrid_pager_id;
  2897. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2898. // (5)动态添加子报表的table和pager
  2899. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2900. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  2901. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2902. // (6)创建jqGrid对象
  2903. $("#" + subgrid_table_id).dataGrid({
  2904. cellEdit: true,
  2905. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2906. colModel: _Clos1,
  2907. //colModel: ColModelSub,
  2908. shrinkToFit: true,//宽度自适应
  2909. multiselect: true,
  2910. prmNames: { search: "search" },
  2911. viewrecords: true,
  2912. height: "100%",
  2913. rowNum: 20,
  2914. pager: subgrid_pager_id,
  2915. });
  2916. }
  2917. //委外拒收单生成条码
  2918. function gridList11() {
  2919. var $gridList = $("#gridList");
  2920. var queryJson = {
  2921. POCode: $("#txt_POCode").val(),
  2922. VenCode: $("#txt_VenCode").val(),
  2923. VenName: $("#txt_VenName").val(),
  2924. InvCode: $("#txt_InvCode").val(),
  2925. InvName: $("#txt_InvName").val(),
  2926. BatchCode: $("#txt_BatchCode").val(),
  2927. POStatus: $("#selShow").val()
  2928. }
  2929. $gridList.dataGrid({
  2930. url: "/JHWMS/WMSCreateItemLot/GetGridJsonWWJSD" + "?" + Math.random(),
  2931. postData: { queryJson: JSON.stringify(queryJson) },
  2932. height: $(window).height() - 200,
  2933. width: $(window).width() - 300,
  2934. colModel: _Clos,
  2935. width: "100%",
  2936. autowidth: true,
  2937. gridComplete: function () {
  2938. },
  2939. pager: "#gridPager",
  2940. sortname: "OOCode,REPLICATE('0',10-len(OOSequence))+OOSequence ",
  2941. sortorder: "asc",
  2942. viewrecords: true,
  2943. multiselect: true,
  2944. subGrid: true, // (1)开启子表格支持
  2945. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2946. $("#gridList").jqGrid("setSelection", rowid, false);
  2947. bindSubGrid11(subgrid_id, rowid)
  2948. }
  2949. });
  2950. $("#warehouse a.btn-default").click(function () {
  2951. $("#warehouse a.btn-default").removeClass("active");
  2952. $(this).addClass("active");
  2953. $('#btn_search').trigger("click");
  2954. });
  2955. $("#btn_search").click(function () {
  2956. var warehouse = $("#warehouse a.active").attr('data-value');
  2957. var queryJson = {
  2958. POCode: $("#txt_POCode").val(),
  2959. VenCode: $("#txt_VenCode").val(),
  2960. VenName: $("#txt_VenName").val(),
  2961. InvCode: $("#txt_InvCode").val(),
  2962. InvName: $("#txt_InvName").val(),
  2963. BatchCode: $("#txt_BatchCode").val(),
  2964. POStatus: $("#selShow").val()
  2965. }
  2966. $gridList.jqGrid('setGridParam', {
  2967. postData: { queryJson: JSON.stringify(queryJson) },
  2968. }).trigger('reloadGrid');
  2969. });
  2970. }
  2971. function bindSubGrid11(subgrid_id, rowid) {
  2972. $("#gridList").jqGrid("setSelection", rowid, false);
  2973. var subgrid_table_id;
  2974. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2975. var subgrid_pager_id;
  2976. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2977. // (5)动态添加子报表的table和pager
  2978. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2979. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).OOCode;
  2980. var Sequence = $("#gridList").jqGrid('getRowData', rowid).OOSequence;
  2981. // (6)创建jqGrid对象
  2982. $("#" + subgrid_table_id).dataGrid({
  2983. cellEdit: true,
  2984. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2985. colModel: _Clos1,
  2986. //colModel: ColModelSub,
  2987. shrinkToFit: true,//宽度自适应
  2988. multiselect: true,
  2989. prmNames: { search: "search" },
  2990. viewrecords: true,
  2991. height: "100%",
  2992. rowNum: 20,
  2993. pager: subgrid_pager_id,
  2994. });
  2995. }
  2996. //领料申请退料生成条码
  2997. function gridList12() {
  2998. var $gridList = $("#gridList");
  2999. var queryJson = {
  3000. POCode: $("#txt_POCode").val(),
  3001. InvCode: $("#txt_InvCode").val(),
  3002. InvName: $("#txt_InvName").val(),
  3003. BatchCode: $("#txt_BatchCode").val(),
  3004. FromTime: $("#FromTime").val(),
  3005. ToTime: $("#ToTime").val(),
  3006. POStatus: $("#selShow").val()
  3007. }
  3008. $gridList.dataGrid({
  3009. url: "/JHWMS/WMSCreateItemLot/GetGridJsonLLSQTL" + "?" + Math.random(),
  3010. postData: { queryJson: JSON.stringify(queryJson) },
  3011. height: $(window).height() - 200,
  3012. width: $(window).width() - 300,
  3013. colModel: _Clos,
  3014. width: "100%",
  3015. autowidth: true,
  3016. gridComplete: function () {
  3017. },
  3018. pager: "#gridPager",
  3019. sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3020. sortorder: "asc",
  3021. viewrecords: true,
  3022. multiselect: true,
  3023. subGrid: true, // (1)开启子表格支持
  3024. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3025. $("#gridList").jqGrid("setSelection", rowid, false);
  3026. bindSubGrid12(subgrid_id, rowid)
  3027. }
  3028. });
  3029. $("#warehouse a.btn-default").click(function () {
  3030. $("#warehouse a.btn-default").removeClass("active");
  3031. $(this).addClass("active");
  3032. $('#btn_search').trigger("click");
  3033. });
  3034. $("#btn_search").click(function () {
  3035. var warehouse = $("#warehouse a.active").attr('data-value');
  3036. var queryJson = {
  3037. POCode: $("#txt_POCode").val(),
  3038. InvCode: $("#txt_InvCode").val(),
  3039. InvName: $("#txt_InvName").val(),
  3040. BatchCode: $("#txt_BatchCode").val(),
  3041. FromTime: $("#FromTime").val(),
  3042. ToTime: $("#ToTime").val(),
  3043. POStatus: $("#selShow").val()
  3044. }
  3045. $gridList.jqGrid('setGridParam', {
  3046. postData: { queryJson: JSON.stringify(queryJson) },
  3047. }).trigger('reloadGrid');
  3048. });
  3049. }
  3050. function bindSubGrid12(subgrid_id, rowid) {
  3051. $("#gridList").jqGrid("setSelection", rowid, false);
  3052. var subgrid_table_id;
  3053. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3054. var subgrid_pager_id;
  3055. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3056. // (5)动态添加子报表的table和pager
  3057. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3058. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  3059. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3060. // (6)创建jqGrid对象
  3061. $("#" + subgrid_table_id).dataGrid({
  3062. cellEdit: true,
  3063. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3064. colModel: _Clos1,
  3065. shrinkToFit: true,//宽度自适应
  3066. multiselect: true,
  3067. prmNames: { search: "search" },
  3068. viewrecords: true,
  3069. height: "100%",
  3070. rowNum: 20,
  3071. pager: subgrid_pager_id,
  3072. });
  3073. }
  3074. //材料出库退料
  3075. function gridList13() {
  3076. var $gridList = $("#gridList");
  3077. var queryJson = {
  3078. POCode: $("#txt_POCode").val(),
  3079. InvCode: $("#txt_InvCode").val(),
  3080. InvName: $("#txt_InvName").val(),
  3081. BatchCode: $("#txt_BatchCode").val(),
  3082. POStatus: $("#selShow").val(),
  3083. SCode: $("#txt_SCode").val(),
  3084. }
  3085. $gridList.dataGrid({
  3086. url: "/JHWMS/WMSCreateItemLot/GetGridJsonCLCK" + "?" + Math.random(),
  3087. postData: { queryJson: JSON.stringify(queryJson) },
  3088. height: $(window).height() - 200,
  3089. width: $(window).width() - 300,
  3090. colModel: _Clos,
  3091. width: "100%",
  3092. autowidth: true,
  3093. //shrinkToFit: true,
  3094. gridComplete: function () {
  3095. },
  3096. pager: "#gridPager",
  3097. // sortname: 'ApplyNegCode,cast(Sequence as int)',
  3098. sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3099. sortorder: "asc",
  3100. viewrecords: true,
  3101. multiselect: true,
  3102. subGrid: true, // (1)开启子表格支持
  3103. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3104. $("#gridList").jqGrid("setSelection", rowid, false);
  3105. bindSubGrid13(subgrid_id, rowid)
  3106. }
  3107. });
  3108. $("#warehouse a.btn-default").click(function () {
  3109. $("#warehouse a.btn-default").removeClass("active");
  3110. $(this).addClass("active");
  3111. $('#btn_search').trigger("click");
  3112. });
  3113. $("#btn_search").click(function () {
  3114. var warehouse = $("#warehouse a.active").attr('data-value');
  3115. var queryJson = {
  3116. POCode: $("#txt_POCode").val(),
  3117. InvCode: $("#txt_InvCode").val(),
  3118. InvName: $("#txt_InvName").val(),
  3119. BatchCode: $("#txt_BatchCode").val(),
  3120. POStatus: $("#selShow").val(),
  3121. SCode: $("#txt_SCode").val(),
  3122. }
  3123. $gridList.jqGrid('setGridParam', {
  3124. postData: { queryJson: JSON.stringify(queryJson) },
  3125. }).trigger('reloadGrid');
  3126. });
  3127. }
  3128. function bindSubGrid13(subgrid_id, rowid) {
  3129. $("#gridList").jqGrid("setSelection", rowid, false);
  3130. var subgrid_table_id;
  3131. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3132. var subgrid_pager_id;
  3133. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3134. // (5)动态添加子报表的table和pager
  3135. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3136. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  3137. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3138. // (6)创建jqGrid对象
  3139. $("#" + subgrid_table_id).dataGrid({
  3140. cellEdit: true,
  3141. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3142. colModel: _Clos1,
  3143. shrinkToFit: true,//宽度自适应
  3144. multiselect: true,
  3145. prmNames: { search: "search" },
  3146. viewrecords: true,
  3147. height: "100%",
  3148. rowNum: 20,
  3149. pager: subgrid_pager_id,
  3150. });
  3151. }
  3152. //委外领料申请退料
  3153. function gridList14() {
  3154. var $gridList = $("#gridList");
  3155. var queryJson = {
  3156. POCode: $("#txt_POCode").val(),
  3157. InvCode: $("#txt_InvCode").val(),
  3158. InvName: $("#txt_InvName").val(),
  3159. BatchCode: $("#txt_BatchCode").val(),
  3160. POStatus: $("#selShow").val()
  3161. }
  3162. $gridList.dataGrid({
  3163. url: "/JHWMS/WMSCreateItemLot/GetGridJsonWWLLTL" + "?" + Math.random(),
  3164. postData: { queryJson: JSON.stringify(queryJson) },
  3165. height: $(window).height() - 200,
  3166. width: $(window).width() - 300,
  3167. colModel: _Clos,
  3168. width: "100%",
  3169. autowidth: true,
  3170. gridComplete: function () {
  3171. },
  3172. pager: "#gridPager",
  3173. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3174. sortorder: "asc",
  3175. viewrecords: true,
  3176. multiselect: true,
  3177. subGrid: true, // (1)开启子表格支持
  3178. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3179. $("#gridList").jqGrid("setSelection", rowid, false);
  3180. bindSubGrid14(subgrid_id, rowid)
  3181. }
  3182. });
  3183. $("#warehouse a.btn-default").click(function () {
  3184. $("#warehouse a.btn-default").removeClass("active");
  3185. $(this).addClass("active");
  3186. $('#btn_search').trigger("click");
  3187. });
  3188. $("#btn_search").click(function () {
  3189. var warehouse = $("#warehouse a.active").attr('data-value');
  3190. var queryJson = {
  3191. POCode: $("#txt_POCode").val(),
  3192. InvCode: $("#txt_InvCode").val(),
  3193. InvName: $("#txt_InvName").val(),
  3194. BatchCode: $("#txt_BatchCode").val(),
  3195. POStatus: $("#selShow").val()
  3196. }
  3197. $gridList.jqGrid('setGridParam', {
  3198. postData: { queryJson: JSON.stringify(queryJson) },
  3199. }).trigger('reloadGrid');
  3200. });
  3201. }
  3202. function bindSubGrid14(subgrid_id, rowid) {
  3203. $("#gridList").jqGrid("setSelection", rowid, false);
  3204. var subgrid_table_id;
  3205. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3206. var subgrid_pager_id;
  3207. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3208. // (5)动态添加子报表的table和pager
  3209. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3210. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  3211. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3212. // (6)创建jqGrid对象
  3213. $("#" + subgrid_table_id).dataGrid({
  3214. cellEdit: true,
  3215. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3216. colModel: _Clos1,
  3217. shrinkToFit: true,//宽度自适应
  3218. multiselect: true,
  3219. prmNames: { search: "search" },
  3220. viewrecords: true,
  3221. height: "100%",
  3222. rowNum: 20,
  3223. pager: subgrid_pager_id,
  3224. });
  3225. }
  3226. //委外材料出库
  3227. function gridList15() {
  3228. var $gridList = $("#gridList");
  3229. var queryJson = {
  3230. POCode: $("#txt_POCode").val(),
  3231. InvCode: $("#txt_InvCode").val(),
  3232. InvName: $("#txt_InvName").val(),
  3233. BatchCode: $("#txt_BatchCode").val(),
  3234. POStatus: $("#selShow").val()
  3235. }
  3236. $gridList.dataGrid({
  3237. url: "/JHWMS/WMSCreateItemLot/GetGridJsonWWCLCK" + "?" + Math.random(),
  3238. postData: { queryJson: JSON.stringify(queryJson) },
  3239. height: $(window).height() - 200,
  3240. width: $(window).width() - 300,
  3241. colModel: _Clos,
  3242. width: "100%",
  3243. autowidth: true,
  3244. gridComplete: function () {
  3245. },
  3246. pager: "#gridPager",
  3247. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3248. sortorder: "asc",
  3249. viewrecords: true,
  3250. multiselect: true,
  3251. subGrid: true, // (1)开启子表格支持
  3252. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3253. $("#gridList").jqGrid("setSelection", rowid, false);
  3254. bindSubGrid15(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. InvCode: $("#txt_InvCode").val(),
  3267. InvName: $("#txt_InvName").val(),
  3268. BatchCode: $("#txt_BatchCode").val(),
  3269. POStatus: $("#selShow").val()
  3270. }
  3271. $gridList.jqGrid('setGridParam', {
  3272. postData: { queryJson: JSON.stringify(queryJson) },
  3273. }).trigger('reloadGrid');
  3274. });
  3275. }
  3276. function bindSubGrid15(subgrid_id, rowid) {
  3277. $("#gridList").jqGrid("setSelection", rowid, false);
  3278. var subgrid_table_id;
  3279. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3280. var subgrid_pager_id;
  3281. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3282. // (5)动态添加子报表的table和pager
  3283. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3284. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  3285. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3286. // (6)创建jqGrid对象
  3287. $("#" + subgrid_table_id).dataGrid({
  3288. cellEdit: true,
  3289. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3290. colModel: _Clos1,
  3291. shrinkToFit: true,//宽度自适应
  3292. prmNames: { search: "search" },
  3293. multiselect: true,
  3294. viewrecords: true,
  3295. height: "100%",
  3296. rowNum: 20,
  3297. pager: subgrid_pager_id,
  3298. });
  3299. }
  3300. function gridList16() {
  3301. var $gridList = $("#gridList");
  3302. var queryJson = {
  3303. POCode: $("#txt_POCode").val(),
  3304. InvCode: $("#txt_InvCode").val(),
  3305. InvName: $("#txt_InvName").val(),
  3306. BatchCode: $("#txt_BatchCode").val(),
  3307. POStatus: $("#selShow").val()
  3308. }
  3309. $gridList.dataGrid({
  3310. url: "/JHWMS/WMSCreateItemLot/GetGridJsonFGGD" + "?" + Math.random(),
  3311. postData: { queryJson: JSON.stringify(queryJson) },
  3312. height: $(window).height() - 200,
  3313. width: $(window).width() - 300,
  3314. colModel: _Clos,
  3315. width: "100%",
  3316. autowidth: true,
  3317. gridComplete: function () {
  3318. },
  3319. pager: "#gridPager",
  3320. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3321. sortorder: "asc",
  3322. viewrecords: true,
  3323. multiselect: true,
  3324. subGrid: true, // (1)开启子表格支持
  3325. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3326. $("#gridList").jqGrid("setSelection", rowid, false);
  3327. bindSubGrid16(subgrid_id, rowid)
  3328. }
  3329. });
  3330. $("#warehouse a.btn-default").click(function () {
  3331. $("#warehouse a.btn-default").removeClass("active");
  3332. $(this).addClass("active");
  3333. $('#btn_search').trigger("click");
  3334. });
  3335. $("#btn_search").click(function () {
  3336. var warehouse = $("#warehouse a.active").attr('data-value');
  3337. var queryJson = {
  3338. POCode: $("#txt_POCode").val(),
  3339. InvCode: $("#txt_InvCode").val(),
  3340. InvName: $("#txt_InvName").val(),
  3341. BatchCode: $("#txt_BatchCode").val(),
  3342. POStatus: $("#selShow").val()
  3343. }
  3344. $gridList.jqGrid('setGridParam', {
  3345. postData: { queryJson: JSON.stringify(queryJson) },
  3346. }).trigger('reloadGrid');
  3347. });
  3348. }
  3349. function bindSubGrid16(subgrid_id, rowid) {
  3350. $("#gridList").jqGrid("setSelection", rowid, false);
  3351. var subgrid_table_id;
  3352. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3353. var subgrid_pager_id;
  3354. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3355. // (5)动态添加子报表的table和pager
  3356. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3357. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  3358. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3359. // (6)创建jqGrid对象
  3360. $("#" + subgrid_table_id).dataGrid({
  3361. cellEdit: true,
  3362. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3363. colModel: _Clos1,
  3364. shrinkToFit: true,//宽度自适应
  3365. multiselect: true,
  3366. prmNames: { search: "search" },
  3367. viewrecords: true,
  3368. height: "100%",
  3369. rowNum: 20,
  3370. pager: subgrid_pager_id,
  3371. });
  3372. }
  3373. //检验不合格
  3374. function gridList17() {
  3375. var $gridList = $("#gridList");
  3376. var queryJson = {
  3377. POCode: $("#txt_POCode").val(),
  3378. InvCode: $("#txt_InvCode").val(),
  3379. InvName: $("#txt_InvName").val(),
  3380. BatchCode: $("#txt_BatchCode").val(),
  3381. POStatus: $("#selShow").val()
  3382. }
  3383. $gridList.dataGrid({
  3384. url: "/JHWMS/WMSCreateItemLot/GetGridJsonBHGTM" + "?" + Math.random(),
  3385. postData: { queryJson: JSON.stringify(queryJson) },
  3386. height: $(window).height() - 200,
  3387. width: $(window).width() - 300,
  3388. colModel: _Clos,
  3389. width: "100%",
  3390. autowidth: true,
  3391. gridComplete: function () {
  3392. },
  3393. pager: "#gridPager",
  3394. sortname: 'LotNo',
  3395. sortorder: "asc",
  3396. viewrecords: true,
  3397. multiselect: true,
  3398. subGrid: true, // (1)开启子表格支持
  3399. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3400. $("#gridList").jqGrid("setSelection", rowid, false);
  3401. bindSubGrid17(subgrid_id, rowid)
  3402. }
  3403. });
  3404. $("#warehouse a.btn-default").click(function () {
  3405. $("#warehouse a.btn-default").removeClass("active");
  3406. $(this).addClass("active");
  3407. $('#btn_search').trigger("click");
  3408. });
  3409. $("#btn_search").click(function () {
  3410. var warehouse = $("#warehouse a.active").attr('data-value');
  3411. var queryJson = {
  3412. POCode: $("#txt_POCode").val(),
  3413. InvCode: $("#txt_InvCode").val(),
  3414. InvName: $("#txt_InvName").val(),
  3415. BatchCode: $("#txt_BatchCode").val(),
  3416. POStatus: $("#selShow").val()
  3417. }
  3418. $gridList.jqGrid('setGridParam', {
  3419. postData: { queryJson: JSON.stringify(queryJson) },
  3420. }).trigger('reloadGrid');
  3421. });
  3422. }
  3423. function bindSubGrid17(subgrid_id, rowid) {
  3424. $("#gridList").jqGrid("setSelection", rowid, false);
  3425. var subgrid_table_id;
  3426. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3427. var subgrid_pager_id;
  3428. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3429. // (5)动态添加子报表的table和pager
  3430. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3431. var LotNo = $("#gridList").jqGrid('getRowData', rowid).LotNo;
  3432. // var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3433. // (6)创建jqGrid对象
  3434. $("#" + subgrid_table_id).dataGrid({
  3435. cellEdit: true,
  3436. url: "/JHWMS/WMSCreateItemLot/GetSubGridJsonBHGTM?LotNo=" + LotNo + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3437. colModel: _Clos1,
  3438. shrinkToFit: true,//宽度自适应
  3439. multiselect: true,
  3440. prmNames: { search: "search" },
  3441. viewrecords: true,
  3442. height: "100%",
  3443. rowNum: 20,
  3444. pager: subgrid_pager_id,
  3445. });
  3446. }
  3447. function gridList18() {
  3448. var $gridList = $("#gridList");
  3449. var queryJson = {
  3450. POCode: $("#txt_POCode").val(),
  3451. InvCode: $("#txt_InvCode").val(),
  3452. InvName: $("#txt_InvName").val(),
  3453. BatchCode: $("#txt_BatchCode").val(),
  3454. POStatus: $("#selShow").val()
  3455. }
  3456. $gridList.dataGrid({
  3457. url: "/JHWMS/WMSCreateItemLot/GetGridJsonFCP" + "?" + Math.random(),
  3458. postData: { queryJson: JSON.stringify(queryJson) },
  3459. height: $(window).height() - 200,
  3460. width: $(window).width() - 300,
  3461. colModel: _Clos,
  3462. width: "100%",
  3463. autowidth: true,
  3464. gridComplete: function () {
  3465. },
  3466. pager: "#gridPager",
  3467. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3468. sortorder: "asc",
  3469. viewrecords: true,
  3470. multiselect: true,
  3471. subGrid: true, // (1)开启子表格支持
  3472. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3473. $("#gridList").jqGrid("setSelection", rowid, false);
  3474. bindSubGrid18(subgrid_id, rowid)
  3475. }
  3476. });
  3477. $("#warehouse a.btn-default").click(function () {
  3478. $("#warehouse a.btn-default").removeClass("active");
  3479. $(this).addClass("active");
  3480. $('#btn_search').trigger("click");
  3481. });
  3482. $("#btn_search").click(function () {
  3483. var warehouse = $("#warehouse a.active").attr('data-value');
  3484. var queryJson = {
  3485. POCode: $("#txt_POCode").val(),
  3486. InvCode: $("#txt_InvCode").val(),
  3487. InvName: $("#txt_InvName").val(),
  3488. BatchCode: $("#txt_BatchCode").val(),
  3489. POStatus: $("#selShow").val()
  3490. }
  3491. $gridList.jqGrid('setGridParam', {
  3492. postData: { queryJson: JSON.stringify(queryJson) },
  3493. }).trigger('reloadGrid');
  3494. });
  3495. }
  3496. function bindSubGrid18(subgrid_id, rowid) {
  3497. $("#gridList").jqGrid("setSelection", rowid, false);
  3498. var subgrid_table_id;
  3499. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3500. var subgrid_pager_id;
  3501. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3502. // (5)动态添加子报表的table和pager
  3503. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3504. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  3505. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3506. // (6)创建jqGrid对象
  3507. $("#" + subgrid_table_id).dataGrid({
  3508. cellEdit: true,
  3509. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3510. colModel: _Clos1,
  3511. shrinkToFit: true,//宽度自适应
  3512. multiselect: true,
  3513. prmNames: { search: "search" },
  3514. viewrecords: true,
  3515. height: "100%",
  3516. rowNum: 20,
  3517. pager: subgrid_pager_id,
  3518. });
  3519. }
  3520. function gridList20() {
  3521. var $gridList = $("#gridList");
  3522. var queryJson = {
  3523. POCode: $("#txt_POCode").val(),
  3524. InvCode: $("#txt_InvCode").val(),
  3525. InvName: $("#txt_InvName").val(),
  3526. BatchCode: $("#txt_BatchCode").val(),
  3527. POStatus: $("#selShow").val()
  3528. }
  3529. $gridList.dataGrid({
  3530. url: "/JHWMS/WMSCreateItemLot/GetGridJsonTransfer" + "?" + Math.random(),
  3531. postData: { queryJson: JSON.stringify(queryJson) },
  3532. height: $(window).height() - 200,
  3533. width: $(window).width() - 300,
  3534. colModel: _Clos,
  3535. width: "100%",
  3536. autowidth: true,
  3537. gridComplete: function () {
  3538. },
  3539. pager: "#gridPager",
  3540. sortname: "TransferNO,Cast(Sequence as int) ",
  3541. sortorder: "asc",
  3542. viewrecords: true,
  3543. multiselect: true,
  3544. subGrid: true, // (1)开启子表格支持
  3545. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3546. $("#gridList").jqGrid("setSelection", rowid, false);
  3547. bindSubGrid20(subgrid_id, rowid)
  3548. }
  3549. });
  3550. $("#warehouse a.btn-default").click(function () {
  3551. $("#warehouse a.btn-default").removeClass("active");
  3552. $(this).addClass("active");
  3553. $('#btn_search').trigger("click");
  3554. });
  3555. $("#btn_search").click(function () {
  3556. var warehouse = $("#warehouse a.active").attr('data-value');
  3557. var queryJson = {
  3558. POCode: $("#txt_POCode").val(),
  3559. InvCode: $("#txt_InvCode").val(),
  3560. InvName: $("#txt_InvName").val(),
  3561. BatchCode: $("#txt_BatchCode").val(),
  3562. POStatus: $("#selShow").val()
  3563. }
  3564. $gridList.jqGrid('setGridParam', {
  3565. postData: { queryJson: JSON.stringify(queryJson) },
  3566. }).trigger('reloadGrid');
  3567. });
  3568. }
  3569. function bindSubGrid20(subgrid_id, rowid) {
  3570. debugger;
  3571. $("#gridList").jqGrid("setSelection", rowid, false);
  3572. var subgrid_table_id;
  3573. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3574. var subgrid_pager_id;
  3575. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3576. // (5)动态添加子报表的table和pager
  3577. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3578. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  3579. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3580. // (6)创建jqGrid对象
  3581. $("#" + subgrid_table_id).dataGrid({
  3582. cellEdit: true,
  3583. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3584. colModel: _Clos1,
  3585. //colModel: ColModelSub,
  3586. shrinkToFit: true,//宽度自适应
  3587. multiselect: true,
  3588. prmNames: { search: "search" },
  3589. viewrecords: true,
  3590. height: "100%",
  3591. rowNum: 20,
  3592. pager: subgrid_pager_id,
  3593. });
  3594. }
  3595. //采购入库 ICSPurchaseReceive
  3596. function gridList22() {
  3597. var $gridList = $("#gridList");
  3598. var queryJson = {
  3599. POCode: $("#txt_POCode").val(),
  3600. SourceCode: $("#txt_SourceCode").val(),
  3601. InvCode: $("#txt_InvCode").val(),
  3602. InvName: $("#txt_InvName").val(),
  3603. VenCode: $("#txt_VenCode").val(),
  3604. VenName: $("#txt_VenName").val(),
  3605. BatchCode: $("#txt_BatchCode").val(),
  3606. FromTime: $("#FromTime").val(),
  3607. ToTime: $("#ToTime").val(),
  3608. WHCode: $("#txt_WHCode").val(),
  3609. POStatus: $("#selShow").val(),
  3610. WHStatus: $("#selStatus").val(),
  3611. }
  3612. $gridList.dataGrid({
  3613. url: "/JHWMS/WMSCreateItemLot/GetGridJsonPurchaseReceive" + "?" + Math.random(),
  3614. postData: { queryJson: JSON.stringify(queryJson) },
  3615. height: $(window).height() - 200,
  3616. width: $(window).width() - 300,
  3617. colModel: _Clos,
  3618. width: "100%",
  3619. cellEdit: true,
  3620. cellsubmit: "clientArray",
  3621. autowidth: true,
  3622. gridComplete: function () {
  3623. },
  3624. pager: "#gridPager",
  3625. sortname: "RCVCode ,Cast(Sequence as int) ",
  3626. sortorder: "asc",
  3627. viewrecords: true,
  3628. multiselect: true,
  3629. subGrid: true, // (1)开启子表格支持
  3630. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3631. $("#gridList").jqGrid("setSelection", rowid, false);
  3632. bindSubGrid22(subgrid_id, rowid)
  3633. }
  3634. });
  3635. $("#warehouse a.btn-default").click(function () {
  3636. $("#warehouse a.btn-default").removeClass("active");
  3637. $(this).addClass("active");
  3638. $('#btn_search').trigger("click");
  3639. });
  3640. $("#btn_search").click(function () {
  3641. var warehouse = $("#warehouse a.active").attr('data-value');
  3642. var queryJson = {
  3643. POCode: $("#txt_POCode").val(),
  3644. SourceCode: $("#txt_SourceCode").val(),
  3645. InvCode: $("#txt_InvCode").val(),
  3646. InvName: $("#txt_InvName").val(),
  3647. VenCode: $("#txt_VenCode").val(),
  3648. VenName: $("#txt_VenName").val(),
  3649. BatchCode: $("#txt_BatchCode").val(),
  3650. FromTime: $("#FromTime").val(),
  3651. ToTime: $("#ToTime").val(),
  3652. WHCode: $("#txt_WHCode").val(),
  3653. POStatus: $("#selShow").val(),
  3654. WHStatus: $("#selStatus").val(),
  3655. }
  3656. $gridList.jqGrid('setGridParam', {
  3657. postData: { queryJson: JSON.stringify(queryJson) },
  3658. }).trigger('reloadGrid');
  3659. });
  3660. }
  3661. function bindSubGrid22(subgrid_id, rowid) {
  3662. debugger;
  3663. $("#gridList").jqGrid("setSelection", rowid, false);
  3664. var subgrid_table_id;
  3665. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3666. var subgrid_pager_id;
  3667. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3668. // (5)动态添加子报表的table和pager
  3669. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3670. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  3671. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3672. var isPrint = $("#selPrint").val();
  3673. // (6)创建jqGrid对象
  3674. $("#" + subgrid_table_id).dataGrid({
  3675. cellEdit: true,
  3676. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3677. colModel: _Clos1,
  3678. //colModel: ColModelSub,
  3679. shrinkToFit: true,//宽度自适应
  3680. multiselect: true,
  3681. prmNames: { search: "search" },
  3682. viewrecords: true,
  3683. height: "100%",
  3684. rowNum: 20,
  3685. pager: subgrid_pager_id,
  3686. });
  3687. }
  3688. //委外采购入库 ICSOutPurchaseReceive
  3689. function gridList23() {
  3690. var $gridList = $("#gridList");
  3691. var queryJson = {
  3692. POCode: $("#txt_POCode").val(),
  3693. InvCode: $("#txt_InvCode").val(),
  3694. InvName: $("#txt_InvName").val(),
  3695. BatchCode: $("#txt_BatchCode").val(),
  3696. FromTime: $("#FromTime").val(),
  3697. ToTime: $("#ToTime").val(),
  3698. WHCode: $("#txt_WHCode").val(),
  3699. POStatus: $("#selShow").val()
  3700. }
  3701. $gridList.dataGrid({
  3702. url: "/JHWMS/WMSCreateItemLot/GetGridJsonOutPurchaseReceive" + "?" + Math.random(),
  3703. postData: { queryJson: JSON.stringify(queryJson) },
  3704. height: $(window).height() - 200,
  3705. width: $(window).width() - 300,
  3706. colModel: _Clos,
  3707. width: "100%",
  3708. autowidth: true,
  3709. gridComplete: function () {
  3710. },
  3711. pager: "#gridPager",
  3712. sortname: "RCVCode ",
  3713. sortorder: "desc",
  3714. viewrecords: true,
  3715. multiselect: true,
  3716. subGrid: true, // (1)开启子表格支持
  3717. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3718. $("#gridList").jqGrid("setSelection", rowid, false);
  3719. bindSubGrid23(subgrid_id, rowid)
  3720. }
  3721. });
  3722. $("#warehouse a.btn-default").click(function () {
  3723. $("#warehouse a.btn-default").removeClass("active");
  3724. $(this).addClass("active");
  3725. $('#btn_search').trigger("click");
  3726. });
  3727. $("#btn_search").click(function () {
  3728. var warehouse = $("#warehouse a.active").attr('data-value');
  3729. var queryJson = {
  3730. POCode: $("#txt_POCode").val(),
  3731. InvCode: $("#txt_InvCode").val(),
  3732. InvName: $("#txt_InvName").val(),
  3733. BatchCode: $("#txt_BatchCode").val(),
  3734. FromTime: $("#FromTime").val(),
  3735. ToTime: $("#ToTime").val(),
  3736. WHCode: $("#txt_WHCode").val(),
  3737. POStatus: $("#selShow").val()
  3738. }
  3739. $gridList.jqGrid('setGridParam', {
  3740. postData: { queryJson: JSON.stringify(queryJson) },
  3741. }).trigger('reloadGrid');
  3742. });
  3743. }
  3744. function bindSubGrid23(subgrid_id, rowid) {
  3745. debugger;
  3746. $("#gridList").jqGrid("setSelection", rowid, false);
  3747. var subgrid_table_id;
  3748. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3749. var subgrid_pager_id;
  3750. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3751. // (5)动态添加子报表的table和pager
  3752. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3753. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  3754. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3755. // (6)创建jqGrid对象
  3756. $("#" + subgrid_table_id).dataGrid({
  3757. cellEdit: true,
  3758. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3759. colModel: _Clos1,
  3760. //colModel: ColModelSub,
  3761. shrinkToFit: true,//宽度自适应
  3762. multiselect: true,
  3763. prmNames: { search: "search" },
  3764. viewrecords: true,
  3765. height: "100%",
  3766. rowNum: 20,
  3767. pager: subgrid_pager_id,
  3768. });
  3769. }
  3770. //线边仓调拨申请单生成条码(派纳)
  3771. function gridList201() {
  3772. var $gridList = $("#gridList");
  3773. var queryJson = {
  3774. POCode: $("#txt_POCode").val(),
  3775. InvCode: $("#txt_InvCode").val(),
  3776. InvName: $("#txt_InvName").val(),
  3777. BatchCode: $("#txt_BatchCode").val(),
  3778. POStatus: $("#selShow").val()
  3779. }
  3780. $gridList.dataGrid({
  3781. url: "/JHWMS/WMSCreateItemLot/GetGridJsonTransferApplicationPN" + "?" + Math.random(),
  3782. postData: { queryJson: JSON.stringify(queryJson) },
  3783. height: $(window).height() - 200,
  3784. width: $(window).width() - 300,
  3785. colModel: _Clos,
  3786. width: "100%",
  3787. autowidth: true,
  3788. gridComplete: function () {
  3789. },
  3790. pager: "#gridPager",
  3791. sortname: "TransferNO,Cast(Sequence as int) ",
  3792. sortorder: "asc",
  3793. viewrecords: true,
  3794. multiselect: true,
  3795. subGrid: true, // (1)开启子表格支持
  3796. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3797. $("#gridList").jqGrid("setSelection", rowid, false);
  3798. bindSubGrid201(subgrid_id, rowid)
  3799. }
  3800. });
  3801. $("#warehouse a.btn-default").click(function () {
  3802. $("#warehouse a.btn-default").removeClass("active");
  3803. $(this).addClass("active");
  3804. $('#btn_search').trigger("click");
  3805. });
  3806. $("#btn_search").click(function () {
  3807. var warehouse = $("#warehouse a.active").attr('data-value');
  3808. var queryJson = {
  3809. POCode: $("#txt_POCode").val(),
  3810. InvCode: $("#txt_InvCode").val(),
  3811. InvName: $("#txt_InvName").val(),
  3812. BatchCode: $("#txt_BatchCode").val(),
  3813. POStatus: $("#selShow").val()
  3814. }
  3815. $gridList.jqGrid('setGridParam', {
  3816. postData: { queryJson: JSON.stringify(queryJson) },
  3817. }).trigger('reloadGrid');
  3818. });
  3819. }
  3820. //调拨申请单生成条码
  3821. function gridList202() {
  3822. var $gridList = $("#gridList");
  3823. var queryJson = {
  3824. POCode: $("#txt_POCode").val(),
  3825. InvCode: $("#txt_InvCode").val(),
  3826. InvName: $("#txt_InvName").val(),
  3827. BatchCode: $("#txt_BatchCode").val(),
  3828. POStatus: $("#selShow").val()
  3829. }
  3830. $gridList.dataGrid({
  3831. url: "/JHWMS/WMSCreateItemLot/GetGridJsonTransferApplication" + "?" + Math.random(),
  3832. postData: { queryJson: JSON.stringify(queryJson) },
  3833. height: $(window).height() - 200,
  3834. width: $(window).width() - 300,
  3835. colModel: _Clos,
  3836. width: "100%",
  3837. autowidth: true,
  3838. gridComplete: function () {
  3839. },
  3840. pager: "#gridPager",
  3841. sortname: "TransferNO,Cast(Sequence as int) ",
  3842. sortorder: "asc",
  3843. viewrecords: true,
  3844. multiselect: true,
  3845. subGrid: true, // (1)开启子表格支持
  3846. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3847. $("#gridList").jqGrid("setSelection", rowid, false);
  3848. bindSubGrid202(subgrid_id, rowid)
  3849. }
  3850. });
  3851. $("#warehouse a.btn-default").click(function () {
  3852. $("#warehouse a.btn-default").removeClass("active");
  3853. $(this).addClass("active");
  3854. $('#btn_search').trigger("click");
  3855. });
  3856. $("#btn_search").click(function () {
  3857. var warehouse = $("#warehouse a.active").attr('data-value');
  3858. var queryJson = {
  3859. POCode: $("#txt_POCode").val(),
  3860. InvCode: $("#txt_InvCode").val(),
  3861. InvName: $("#txt_InvName").val(),
  3862. BatchCode: $("#txt_BatchCode").val(),
  3863. POStatus: $("#selShow").val()
  3864. }
  3865. $gridList.jqGrid('setGridParam', {
  3866. postData: { queryJson: JSON.stringify(queryJson) },
  3867. }).trigger('reloadGrid');
  3868. });
  3869. }
  3870. function bindSubGrid201(subgrid_id, rowid) {
  3871. debugger;
  3872. $("#gridList").jqGrid("setSelection", rowid, false);
  3873. var subgrid_table_id;
  3874. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3875. var subgrid_pager_id;
  3876. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3877. // (5)动态添加子报表的table和pager
  3878. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3879. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  3880. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3881. // (6)创建jqGrid对象
  3882. $("#" + subgrid_table_id).dataGrid({
  3883. cellEdit: true,
  3884. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3885. colModel: _Clos1,
  3886. //colModel: ColModelSub,
  3887. shrinkToFit: true,//宽度自适应
  3888. multiselect: true,
  3889. prmNames: { search: "search" },
  3890. viewrecords: true,
  3891. height: "100%",
  3892. rowNum: 20,
  3893. pager: subgrid_pager_id,
  3894. });
  3895. }
  3896. function bindSubGrid202(subgrid_id, rowid) {
  3897. debugger;
  3898. $("#gridList").jqGrid("setSelection", rowid, false);
  3899. var subgrid_table_id;
  3900. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3901. var subgrid_pager_id;
  3902. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3903. // (5)动态添加子报表的table和pager
  3904. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3905. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  3906. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3907. // (6)创建jqGrid对象
  3908. $("#" + subgrid_table_id).dataGrid({
  3909. cellEdit: true,
  3910. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3911. colModel: _Clos1,
  3912. //colModel: ColModelSub,
  3913. shrinkToFit: true,//宽度自适应
  3914. multiselect: true,
  3915. prmNames: { search: "search" },
  3916. viewrecords: true,
  3917. height: "100%",
  3918. rowNum: 20,
  3919. pager: subgrid_pager_id,
  3920. });
  3921. }
  3922. //红字销售出库单
  3923. function gridList24() {
  3924. var $gridList = $("#gridList");
  3925. var queryJson = {
  3926. POCode: $("#txt_POCode").val(),
  3927. VenCode: $("#txt_VenCode").val(),
  3928. VenName: $("#txt_VenName").val(),
  3929. InvCode: $("#txt_InvCode").val(),
  3930. InvName: $("#txt_InvName").val(),
  3931. BatchCode: $("#txt_BatchCode").val(),
  3932. FromTime: $("#FromTime").val(),
  3933. ToTime: $("#ToTime").val(),
  3934. WHCode: $("#txt_WHCode").val(),
  3935. POStatus: $("#selShow").val(),
  3936. WHStatus: $("#selStatus").val()
  3937. }
  3938. $gridList.dataGrid({
  3939. url: "/JHWMS/WMSCreateItemLot/GetGridJsonWMSSSD" + "?" + Math.random(),
  3940. postData: { queryJson: JSON.stringify(queryJson) },
  3941. height: $(window).height() - 200,
  3942. width: $(window).width() - 300,
  3943. colModel: _Clos,
  3944. width: "100%",
  3945. autowidth: true,
  3946. gridComplete: function () {
  3947. },
  3948. pager: "#gridPager",
  3949. sortname: "SSDCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3950. sortorder: "asc",
  3951. viewrecords: true,
  3952. multiselect: true,
  3953. subGrid: true, // (1)开启子表格支持
  3954. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3955. $("#gridList").jqGrid("setSelection", rowid, false);
  3956. bindSubGrid24(subgrid_id, rowid)
  3957. }
  3958. });
  3959. $("#warehouse a.btn-default").click(function () {
  3960. $("#warehouse a.btn-default").removeClass("active");
  3961. $(this).addClass("active");
  3962. $('#btn_search').trigger("click");
  3963. });
  3964. $("#btn_search").click(function () {
  3965. var warehouse = $("#warehouse a.active").attr('data-value');
  3966. var queryJson = {
  3967. POCode: $("#txt_POCode").val(),
  3968. VenCode: $("#txt_VenCode").val(),
  3969. VenName: $("#txt_VenName").val(),
  3970. InvCode: $("#txt_InvCode").val(),
  3971. InvName: $("#txt_InvName").val(),
  3972. BatchCode: $("#txt_BatchCode").val(),
  3973. FromTime: $("#FromTime").val(),
  3974. ToTime: $("#ToTime").val(),
  3975. WHCode: $("#txt_WHCode").val(),
  3976. POStatus: $("#selShow").val(),
  3977. WHStatus: $("#selStatus").val()
  3978. }
  3979. $gridList.jqGrid('setGridParam', {
  3980. postData: { queryJson: JSON.stringify(queryJson) },
  3981. }).trigger('reloadGrid');
  3982. });
  3983. }
  3984. function bindSubGrid24(subgrid_id, rowid) {
  3985. $("#gridList").jqGrid("setSelection", rowid, false);
  3986. var subgrid_table_id;
  3987. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3988. var subgrid_pager_id;
  3989. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3990. // (5)动态添加子报表的table和pager
  3991. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3992. var SSDCode = $("#gridList").jqGrid('getRowData', rowid).SSDCode;
  3993. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3994. // (6)创建jqGrid对象
  3995. $("#" + subgrid_table_id).dataGrid({
  3996. cellEdit: true,
  3997. url: "/JHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SSDCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3998. colModel: _Clos1,
  3999. shrinkToFit: true,//宽度自适应
  4000. multiselect: true,
  4001. prmNames: { search: "search" },
  4002. viewrecords: true,
  4003. height: "100%",
  4004. rowNum: 20,
  4005. pager: subgrid_pager_id,
  4006. });
  4007. }
  4008. function btnDelete() {
  4009. var objArr = '';
  4010. var obj = $("#gridList").jqGrid("getRowData");
  4011. for (var i = 0; i < obj.length; i++) {
  4012. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  4013. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  4014. if (rowData != "undefined" && rowData != null) {
  4015. for (var j = 0; j < rowData.length; j++) {
  4016. objArr += "'" + rowData[j] + "',";
  4017. }
  4018. }
  4019. }
  4020. if (objArr == "") {
  4021. $.modalAlertNew("WMS00099");
  4022. return;
  4023. }
  4024. $.deleteForm({
  4025. url: "/JHWMS/WMSCreateItemLot/DeleteItemLot",
  4026. param: { keyValue: JSON.stringify(objArr) },
  4027. success: function () {
  4028. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4029. }
  4030. })
  4031. }
  4032. function dateChange(num, date) {
  4033. if (!date) {
  4034. date = new Date();//没有传入值时,默认是当前日期
  4035. date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
  4036. }
  4037. date += " 00:00:00";//设置为当天凌晨12点
  4038. date = Date.parse(new Date(date)) / 1000;//转换为时间戳
  4039. date += (86400) * num;//修改后的时间戳
  4040. var newDate = new Date(parseInt(date) * 1000);//转换为时间
  4041. return newDate.getFullYear() + '-' + (newDate.getMonth() + 1) + '-' + newDate.getDate();
  4042. }
  4043. function btnCreate() {
  4044. debugger;
  4045. var PoStatus;
  4046. var jsonData = '';
  4047. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  4048. if (ids.length != 1) {
  4049. $.modalAlertNew("WMS00100");
  4050. return;
  4051. }
  4052. var POCode = "";
  4053. var PORow = "";
  4054. if (Type == '1') {
  4055. for (var i in ids) {
  4056. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  4057. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4058. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4059. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4060. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4061. }
  4062. $.modalOpen({
  4063. id: "FormAddItemLot",
  4064. title: "生产退料条码生成",
  4065. url: "/JHWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4066. width: "550px",
  4067. height: "1000px",
  4068. callBack: function (iframeId) {
  4069. top.frames[iframeId].submitForm();
  4070. }
  4071. });
  4072. } else if (Type == '2') {
  4073. for (var i in ids) {
  4074. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  4075. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4076. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4077. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4078. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4079. }
  4080. if ($(event.target).attr('id') == 'NF-CreateNew') {
  4081. $.modalOpen({
  4082. id: "FormAddItemLot",
  4083. title: "委外退料条码生成",
  4084. url: "/JHWMS/WMSCreateItemLot/FromNew?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4085. width: "550px",
  4086. height: "1000px",
  4087. callBack: function (iframeId) {
  4088. top.frames[iframeId].submitForm();
  4089. }
  4090. });
  4091. }
  4092. else {
  4093. $.modalOpen({
  4094. id: "FormAddItemLot",
  4095. title: "委外退料条码生成",
  4096. url: "/JHWMS/WMSCreateItemLot/From?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4097. width: "550px",
  4098. height: "1000px",
  4099. callBack: function (iframeId) {
  4100. top.frames[iframeId].submitForm();
  4101. }
  4102. });
  4103. }
  4104. } else if (Type == '3') {
  4105. for (var i in ids) {
  4106. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  4107. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  4108. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4109. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4110. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4111. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4112. }
  4113. if ($(event.target).attr('id') == 'NF-CreateNew') {
  4114. $.modalOpen({
  4115. id: "FormAddItemLot",
  4116. title: "成品条码产生",
  4117. url: "/JHWMS/WMSCreateItemLot/FromNew?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  4118. width: "550px",
  4119. height: "1000px",
  4120. callBack: function (iframeId) {
  4121. top.frames[iframeId].submitForm();
  4122. }
  4123. });
  4124. }
  4125. else {
  4126. $.modalOpen({
  4127. id: "FormAddItemLot",
  4128. title: "成品条码产生",
  4129. url: "/JHWMS/WMSCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  4130. width: "550px",
  4131. height: "1000px",
  4132. callBack: function (iframeId) {
  4133. top.frames[iframeId].submitForm();
  4134. }
  4135. });
  4136. }
  4137. } else if (Type == '4') {
  4138. for (var i in ids) {
  4139. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  4140. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4141. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4142. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4143. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4144. }
  4145. $.modalOpen({
  4146. id: "FormAddItemLot",
  4147. title: "销售退货条码产生",
  4148. url: "/JHWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4149. width: "550px",
  4150. height: "1000px",
  4151. callBack: function (iframeId) {
  4152. top.frames[iframeId].submitForm();
  4153. }
  4154. });
  4155. } else if (Type == '5') {
  4156. for (var i in ids) {
  4157. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  4158. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4159. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4160. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4161. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4162. }
  4163. if ($(event.target).attr('id') == 'NF-CreateNew') {
  4164. $.modalOpen({
  4165. id: "FormAddItemLot",
  4166. title: "其他入库条码产生",
  4167. url: "/JHWMS/WMSCreateItemLot/FromNew?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4168. width: "550px",
  4169. height: "1000px",
  4170. callBack: function (iframeId) {
  4171. top.frames[iframeId].submitForm();
  4172. }
  4173. });
  4174. }
  4175. else {
  4176. $.modalOpen({
  4177. id: "FormAddItemLot",
  4178. title: "其他入库条码产生",
  4179. url: "/JHWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4180. width: "550px",
  4181. height: "1000px",
  4182. callBack: function (iframeId) {
  4183. top.frames[iframeId].submitForm();
  4184. }
  4185. });
  4186. }
  4187. } else if (Type == '6') {
  4188. for (var i in ids) {
  4189. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  4190. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4191. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4192. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4193. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4194. }
  4195. $.modalOpen({
  4196. id: "FormAddItemLot",
  4197. title: "归还单条码产生",
  4198. url: "/JHWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4199. width: "550px",
  4200. height: "1000px",
  4201. callBack: function (iframeId) {
  4202. top.frames[iframeId].submitForm();
  4203. }
  4204. });
  4205. } else if (Type == '7') {
  4206. for (var i in ids) {
  4207. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  4208. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4209. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4210. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4211. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4212. }
  4213. $.modalOpen({
  4214. id: "FormAddItemLot",
  4215. title: "审核到货单生成条码",
  4216. url: "/JHWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4217. width: "550px",
  4218. height: "1000px",
  4219. callBack: function (iframeId) {
  4220. top.frames[iframeId].submitForm();
  4221. }
  4222. });
  4223. } else if (Type == '8') {
  4224. for (var i in ids) {
  4225. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  4226. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4227. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  4228. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4229. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4230. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4231. }
  4232. $.modalOpen({
  4233. id: "FormAddItemLot",
  4234. title: "审核委外到货单生成条码",
  4235. url: "/JHWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(),
  4236. width: "550px",
  4237. height: "1000px",
  4238. callBack: function (iframeId) {
  4239. top.frames[iframeId].submitForm();
  4240. }
  4241. });
  4242. } else if (Type == '9') {
  4243. for (var i in ids) {
  4244. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  4245. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4246. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4247. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4248. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4249. }
  4250. $.modalOpen({
  4251. id: "FormAddItemLot",
  4252. title: "开立成品入库单生成条码",
  4253. url: "/JHWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4254. width: "550px",
  4255. height: "1000px",
  4256. callBack: function (iframeId) {
  4257. top.frames[iframeId].submitForm();
  4258. }
  4259. });
  4260. } else if (Type == '10') {
  4261. for (var i in ids) {
  4262. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  4263. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4264. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4265. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4266. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4267. }
  4268. $.modalOpen({
  4269. id: "FormAddItemLot",
  4270. title: "审核拒收单生成条码",
  4271. url: "/JHWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4272. width: "550px",
  4273. height: "1000px",
  4274. callBack: function (iframeId) {
  4275. top.frames[iframeId].submitForm();
  4276. }
  4277. });
  4278. } else if (Type == '11') {
  4279. for (var i in ids) {
  4280. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  4281. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  4282. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4283. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4284. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4285. }
  4286. $.modalOpen({
  4287. id: "FormAddItemLot",
  4288. title: "审核委外拒收单生成条码",
  4289. url: "/JHWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4290. width: "550px",
  4291. height: "1000px",
  4292. callBack: function (iframeId) {
  4293. top.frames[iframeId].submitForm();
  4294. }
  4295. });
  4296. } else if (Type == '12') {
  4297. for (var i in ids) {
  4298. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  4299. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4300. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4301. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4302. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4303. }
  4304. if ($(event.target).attr('id') == 'NF-CreateNew') {
  4305. $.modalOpen({
  4306. id: "FormAddItemLot",
  4307. title: "审核领料申请退料生成条码",
  4308. url: "/JHWMS/WMSCreateItemLot/FromNew?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4309. width: "550px",
  4310. height: "1000px",
  4311. callBack: function (iframeId) {
  4312. top.frames[iframeId].submitForm();
  4313. }
  4314. });
  4315. }
  4316. else {
  4317. $.modalOpen({
  4318. id: "FormAddItemLot",
  4319. title: "审核领料申请退料生成条码",
  4320. url: "/JHWMS/WMSCreateItemLot/From?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4321. width: "550px",
  4322. height: "1000px",
  4323. callBack: function (iframeId) {
  4324. top.frames[iframeId].submitForm();
  4325. }
  4326. });
  4327. }
  4328. } else if (Type == '13') {
  4329. for (var i in ids) {
  4330. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  4331. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4332. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4333. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4334. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4335. }
  4336. $.modalOpen({
  4337. id: "FormAddItemLot",
  4338. title: "材料出库退料生成条码",
  4339. url: "/JHWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4340. width: "550px",
  4341. height: "1000px",
  4342. callBack: function (iframeId) {
  4343. top.frames[iframeId].submitForm();
  4344. }
  4345. });
  4346. } else if (Type == '14') {
  4347. for (var i in ids) {
  4348. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  4349. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4350. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4351. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4352. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4353. }
  4354. $.modalOpen({
  4355. id: "FormAddItemLot",
  4356. title: "委外领料退料条码生成",
  4357. url: "/JHWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4358. width: "550px",
  4359. height: "1000px",
  4360. callBack: function (iframeId) {
  4361. top.frames[iframeId].submitForm();
  4362. }
  4363. });
  4364. }
  4365. else if (Type == '15') {
  4366. for (var i in ids) {
  4367. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  4368. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4369. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4370. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4371. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4372. }
  4373. $.modalOpen({
  4374. id: "FormAddItemLot",
  4375. title: "委外材料出库退料生成条码",
  4376. url: "/JHWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4377. width: "550px",
  4378. height: "1000px",
  4379. callBack: function (iframeId) {
  4380. top.frames[iframeId].submitForm();
  4381. }
  4382. });
  4383. }
  4384. else if (Type == '16') {
  4385. for (var i in ids) {
  4386. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  4387. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4388. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4389. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4390. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4391. }
  4392. $.modalOpen({
  4393. id: "FormAddItemLot",
  4394. title: "返工工单生成条码",
  4395. url: "/JHWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4396. width: "550px",
  4397. height: "1000px",
  4398. callBack: function (iframeId) {
  4399. top.frames[iframeId].submitForm();
  4400. }
  4401. });
  4402. }
  4403. else if (Type == '18') {
  4404. for (var i in ids) {
  4405. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  4406. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4407. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  4408. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4409. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4410. }
  4411. $.modalOpen({
  4412. id: "FormAddItemLot",
  4413. title: "副产品生成条码",
  4414. url: "/JHWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4415. width: "550px",
  4416. height: "1000px",
  4417. callBack: function (iframeId) {
  4418. top.frames[iframeId].submitForm();
  4419. }
  4420. });
  4421. }
  4422. else if (Type == '20') {
  4423. for (var i in ids) {
  4424. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  4425. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4426. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4427. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4428. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4429. }
  4430. $.modalOpen({
  4431. id: "FormAddItemLot",
  4432. title: "两步调入生成条码",
  4433. url: "/JHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4434. width: "550px",
  4435. height: "1000px",
  4436. callBack: function (iframeId) {
  4437. top.frames[iframeId].submitForm();
  4438. }
  4439. });
  4440. }
  4441. else if (Type == '22') {
  4442. for (var i in ids) {
  4443. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  4444. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4445. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4446. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4447. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4448. ProductDate = $("#gridList").jqGrid('getRowData', ids[i]).SupplierBatch;
  4449. }
  4450. console.log($(event.target).attr('id'));
  4451. if ($(event.target).attr('id') == 'NF-CreateNew')
  4452. {
  4453. $.modalOpen({
  4454. id: "FormAddItemLot",
  4455. title: "采购入库生成条码",
  4456. url: "/JHWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&ProductDate=" + ProductDate+"&" + Math.random(),
  4457. width: "550px",
  4458. height: "1000px",
  4459. callBack: function (iframeId) {
  4460. top.frames[iframeId].submitForm();
  4461. }
  4462. });
  4463. }
  4464. else {
  4465. $.modalOpen({
  4466. id: "FormAddItemLot",
  4467. title: "采购入库生成条码",
  4468. url: "/JHWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&ProductDate=" + ProductDate + "&" + Math.random(),
  4469. width: "550px",
  4470. height: "1000px",
  4471. callBack: function (iframeId) {
  4472. top.frames[iframeId].submitForm();
  4473. }
  4474. });
  4475. }
  4476. }
  4477. else if (Type == '23') {
  4478. for (var i in ids) {
  4479. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  4480. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4481. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4482. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4483. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4484. }
  4485. if ($(event.target).attr('id') == 'NF-CreateNew') {
  4486. $.modalOpen({
  4487. id: "FormAddItemLot",
  4488. title: "委外采购入库生成条码",
  4489. url: "/JHWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4490. width: "550px",
  4491. height: "1000px",
  4492. callBack: function (iframeId) {
  4493. top.frames[iframeId].submitForm();
  4494. }
  4495. });
  4496. }
  4497. else {
  4498. $.modalOpen({
  4499. id: "FormAddItemLot",
  4500. title: "委外采购入库生成条码",
  4501. url: "/JHWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4502. width: "550px",
  4503. height: "1000px",
  4504. callBack: function (iframeId) {
  4505. top.frames[iframeId].submitForm();
  4506. }
  4507. });
  4508. }
  4509. }
  4510. else if (Type == '24') {
  4511. for (var i in ids) {
  4512. SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  4513. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4514. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4515. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4516. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4517. }
  4518. if ($(event.target).attr('id') == 'NF-CreateNew') {
  4519. $.modalOpen({
  4520. id: "FormAddItemLot",
  4521. title: "红字销售出库单生成条码",
  4522. url: "/JHWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4523. width: "550px",
  4524. height: "1000px",
  4525. callBack: function (iframeId) {
  4526. top.frames[iframeId].submitForm();
  4527. }
  4528. });
  4529. }
  4530. else {
  4531. $.modalOpen({
  4532. id: "FormAddItemLot",
  4533. title: "红字销售出库单生成条码",
  4534. url: "/JHWMS/WMSCreateItemLot/FromPN?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4535. width: "550px",
  4536. height: "1000px",
  4537. callBack: function (iframeId) {
  4538. top.frames[iframeId].submitForm();
  4539. }
  4540. });
  4541. }
  4542. }
  4543. else if (Type == '201') {
  4544. for (var i in ids) {
  4545. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  4546. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4547. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4548. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4549. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4550. }
  4551. if ($(event.target).attr('id') == 'NF-CreateNew') {
  4552. $.modalOpen({
  4553. id: "FormAddItemLot",
  4554. title: "调拨申请单生成条码",
  4555. url: "/JHWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4556. width: "550px",
  4557. height: "1000px",
  4558. callBack: function (iframeId) {
  4559. top.frames[iframeId].submitForm();
  4560. }
  4561. });
  4562. }
  4563. else {
  4564. $.modalOpen({
  4565. id: "FormAddItemLot",
  4566. title: "调拨申请单生成条码",
  4567. url: "/JHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4568. width: "550px",
  4569. height: "1000px",
  4570. callBack: function (iframeId) {
  4571. top.frames[iframeId].submitForm();
  4572. }
  4573. });
  4574. }
  4575. }
  4576. else if (Type == '202') {
  4577. for (var i in ids) {
  4578. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  4579. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4580. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4581. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4582. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4583. }
  4584. $.modalOpen({
  4585. id: "FormAddItemLot",
  4586. title: "调拨申请单生成条码",
  4587. url: "/JHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4588. width: "550px",
  4589. height: "1000px",
  4590. callBack: function (iframeId) {
  4591. top.frames[iframeId].submitForm();
  4592. }
  4593. });
  4594. }
  4595. }
  4596. function btnCreatePN() {
  4597. debugger;
  4598. var PoStatus;
  4599. var jsonData = '';
  4600. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  4601. if (ids.length != 1) {
  4602. $.modalAlertNew("WMS00100");
  4603. return;
  4604. }
  4605. var POCode = "";
  4606. var PORow = "";
  4607. if (Type == '1') {
  4608. for (var i in ids) {
  4609. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  4610. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4611. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4612. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4613. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4614. }
  4615. $.modalOpen({
  4616. id: "FormAddItemLot",
  4617. title: "生产退料条码生成",
  4618. url: "/JHWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4619. width: "550px",
  4620. height: "1000px",
  4621. callBack: function (iframeId) {
  4622. top.frames[iframeId].submitForm();
  4623. }
  4624. });
  4625. } else if (Type == '2') {
  4626. for (var i in ids) {
  4627. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  4628. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4629. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4630. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4631. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4632. }
  4633. $.modalOpen({
  4634. id: "FormAddItemLot",
  4635. title: "委外退料条码生成",
  4636. url: "/JHWMS/WMSCreateItemLot/FromPN?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4637. width: "550px",
  4638. height: "1000px",
  4639. callBack: function (iframeId) {
  4640. top.frames[iframeId].submitForm();
  4641. }
  4642. });
  4643. } else if (Type == '3') {
  4644. for (var i in ids) {
  4645. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  4646. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  4647. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4648. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4649. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4650. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4651. }
  4652. $.modalOpen({
  4653. id: "FormAddItemLot",
  4654. title: "成品条码产生",
  4655. url: "/JHWMS/WMSCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  4656. width: "550px",
  4657. height: "1000px",
  4658. callBack: function (iframeId) {
  4659. top.frames[iframeId].submitForm();
  4660. }
  4661. });
  4662. } else if (Type == '4') {
  4663. for (var i in ids) {
  4664. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  4665. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4666. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4667. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4668. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4669. }
  4670. if ($(event.target).attr('id') == 'NF-CreateNew') {
  4671. $.modalOpen({
  4672. id: "FormAddItemLot",
  4673. title: "销售退货条码产生",
  4674. url: "/JHWMS/WMSCreateItemLot/FromNew?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4675. width: "550px",
  4676. height: "1000px",
  4677. callBack: function (iframeId) {
  4678. top.frames[iframeId].submitForm();
  4679. }
  4680. });
  4681. }
  4682. else {
  4683. $.modalOpen({
  4684. id: "FormAddItemLot",
  4685. title: "销售退货条码产生",
  4686. url: "/JHWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4687. width: "550px",
  4688. height: "1000px",
  4689. callBack: function (iframeId) {
  4690. top.frames[iframeId].submitForm();
  4691. }
  4692. });
  4693. }
  4694. } else if (Type == '5') {
  4695. for (var i in ids) {
  4696. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  4697. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4698. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4699. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4700. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4701. }
  4702. $.modalOpen({
  4703. id: "FormAddItemLot",
  4704. title: "其他入库条码产生",
  4705. url: "/JHWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4706. width: "550px",
  4707. height: "1000px",
  4708. callBack: function (iframeId) {
  4709. top.frames[iframeId].submitForm();
  4710. }
  4711. });
  4712. } else if (Type == '6') {
  4713. for (var i in ids) {
  4714. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  4715. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4716. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4717. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4718. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4719. }
  4720. $.modalOpen({
  4721. id: "FormAddItemLot",
  4722. title: "归还单条码产生",
  4723. url: "/JHWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4724. width: "550px",
  4725. height: "1000px",
  4726. callBack: function (iframeId) {
  4727. top.frames[iframeId].submitForm();
  4728. }
  4729. });
  4730. } else if (Type == '7') {
  4731. for (var i in ids) {
  4732. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  4733. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4734. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4735. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4736. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4737. }
  4738. $.modalOpen({
  4739. id: "FormAddItemLot",
  4740. title: "审核到货单生成条码",
  4741. url: "/JHWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4742. width: "550px",
  4743. height: "1000px",
  4744. callBack: function (iframeId) {
  4745. top.frames[iframeId].submitForm();
  4746. }
  4747. });
  4748. } else if (Type == '8') {
  4749. for (var i in ids) {
  4750. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  4751. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4752. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  4753. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4754. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4755. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4756. }
  4757. $.modalOpen({
  4758. id: "FormAddItemLot",
  4759. title: "审核委外到货单生成条码",
  4760. url: "/JHWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(),
  4761. width: "550px",
  4762. height: "1000px",
  4763. callBack: function (iframeId) {
  4764. top.frames[iframeId].submitForm();
  4765. }
  4766. });
  4767. } else if (Type == '9') {
  4768. for (var i in ids) {
  4769. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  4770. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4771. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4772. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4773. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4774. }
  4775. $.modalOpen({
  4776. id: "FormAddItemLot",
  4777. title: "开立成品入库单生成条码",
  4778. url: "/JHWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4779. width: "550px",
  4780. height: "1000px",
  4781. callBack: function (iframeId) {
  4782. top.frames[iframeId].submitForm();
  4783. }
  4784. });
  4785. } else if (Type == '10') {
  4786. for (var i in ids) {
  4787. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  4788. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4789. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4790. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4791. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4792. }
  4793. $.modalOpen({
  4794. id: "FormAddItemLot",
  4795. title: "审核拒收单生成条码",
  4796. url: "/JHWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4797. width: "550px",
  4798. height: "1000px",
  4799. callBack: function (iframeId) {
  4800. top.frames[iframeId].submitForm();
  4801. }
  4802. });
  4803. } else if (Type == '11') {
  4804. for (var i in ids) {
  4805. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  4806. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  4807. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4808. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4809. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4810. }
  4811. $.modalOpen({
  4812. id: "FormAddItemLot",
  4813. title: "审核委外拒收单生成条码",
  4814. url: "/JHWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4815. width: "550px",
  4816. height: "1000px",
  4817. callBack: function (iframeId) {
  4818. top.frames[iframeId].submitForm();
  4819. }
  4820. });
  4821. } else if (Type == '12') {
  4822. for (var i in ids) {
  4823. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  4824. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4825. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4826. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4827. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4828. }
  4829. $.modalOpen({
  4830. id: "FormAddItemLot",
  4831. title: "审核领料申请退料生成条码",
  4832. url: "/JHWMS/WMSCreateItemLot/FromPN?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4833. width: "550px",
  4834. height: "1000px",
  4835. callBack: function (iframeId) {
  4836. top.frames[iframeId].submitForm();
  4837. }
  4838. });
  4839. } else if (Type == '13') {
  4840. for (var i in ids) {
  4841. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  4842. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4843. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4844. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4845. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4846. }
  4847. $.modalOpen({
  4848. id: "FormAddItemLot",
  4849. title: "材料出库退料生成条码",
  4850. url: "/JHWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4851. width: "550px",
  4852. height: "1000px",
  4853. callBack: function (iframeId) {
  4854. top.frames[iframeId].submitForm();
  4855. }
  4856. });
  4857. } else if (Type == '14') {
  4858. for (var i in ids) {
  4859. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  4860. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4861. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4862. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4863. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4864. }
  4865. $.modalOpen({
  4866. id: "FormAddItemLot",
  4867. title: "委外领料退料条码生成",
  4868. url: "/JHWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4869. width: "550px",
  4870. height: "1000px",
  4871. callBack: function (iframeId) {
  4872. top.frames[iframeId].submitForm();
  4873. }
  4874. });
  4875. }
  4876. else if (Type == '15') {
  4877. for (var i in ids) {
  4878. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  4879. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4880. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4881. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4882. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4883. }
  4884. $.modalOpen({
  4885. id: "FormAddItemLot",
  4886. title: "委外材料出库退料生成条码",
  4887. url: "/JHWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4888. width: "550px",
  4889. height: "1000px",
  4890. callBack: function (iframeId) {
  4891. top.frames[iframeId].submitForm();
  4892. }
  4893. });
  4894. }
  4895. else if (Type == '16') {
  4896. for (var i in ids) {
  4897. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  4898. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4899. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4900. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4901. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4902. }
  4903. $.modalOpen({
  4904. id: "FormAddItemLot",
  4905. title: "返工工单生成条码",
  4906. url: "/JHWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4907. width: "550px",
  4908. height: "1000px",
  4909. callBack: function (iframeId) {
  4910. top.frames[iframeId].submitForm();
  4911. }
  4912. });
  4913. }
  4914. else if (Type == '18') {
  4915. for (var i in ids) {
  4916. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  4917. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4918. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  4919. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4920. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4921. }
  4922. $.modalOpen({
  4923. id: "FormAddItemLot",
  4924. title: "副产品生成条码",
  4925. url: "/JHWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4926. width: "550px",
  4927. height: "1000px",
  4928. callBack: function (iframeId) {
  4929. top.frames[iframeId].submitForm();
  4930. }
  4931. });
  4932. }
  4933. else if (Type == '20') {
  4934. for (var i in ids) {
  4935. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  4936. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4937. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4938. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4939. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4940. }
  4941. $.modalOpen({
  4942. id: "FormAddItemLot",
  4943. title: "两步调入生成条码",
  4944. url: "/JHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4945. width: "550px",
  4946. height: "1000px",
  4947. callBack: function (iframeId) {
  4948. top.frames[iframeId].submitForm();
  4949. }
  4950. });
  4951. }
  4952. else if (Type == '22') {
  4953. for (var i in ids) {
  4954. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  4955. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4956. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4957. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4958. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4959. }
  4960. if ($(event.target).attr('id') == 'NF-CreateNew') {
  4961. $.modalOpen({
  4962. id: "FormAddItemLot",
  4963. title: "采购入库生成条码",
  4964. url: "/JHWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4965. width: "550px",
  4966. height: "1000px",
  4967. callBack: function (iframeId) {
  4968. top.frames[iframeId].submitForm();
  4969. }
  4970. });
  4971. }
  4972. else {
  4973. $.modalOpen({
  4974. id: "FormAddItemLot",
  4975. title: "采购入库生成条码",
  4976. url: "/JHWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4977. width: "550px",
  4978. height: "1000px",
  4979. callBack: function (iframeId) {
  4980. top.frames[iframeId].submitForm();
  4981. }
  4982. });
  4983. }
  4984. }
  4985. else if (Type == '23') {
  4986. for (var i in ids) {
  4987. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  4988. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4989. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4990. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4991. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4992. }
  4993. $.modalOpen({
  4994. id: "FormAddItemLot",
  4995. title: "委外采购入库生成条码",
  4996. url: "/JHWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  4997. width: "550px",
  4998. height: "1000px",
  4999. callBack: function (iframeId) {
  5000. top.frames[iframeId].submitForm();
  5001. }
  5002. });
  5003. }
  5004. else if (Type == '24') {
  5005. for (var i in ids) {
  5006. SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  5007. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5008. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5009. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5010. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5011. }
  5012. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5013. $.modalOpen({
  5014. id: "FormAddItemLot",
  5015. title: "红字销售出库单生成条码",
  5016. url: "/JHWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5017. width: "550px",
  5018. height: "1000px",
  5019. callBack: function (iframeId) {
  5020. top.frames[iframeId].submitForm();
  5021. }
  5022. });
  5023. }
  5024. else {
  5025. $.modalOpen({
  5026. id: "FormAddItemLot",
  5027. title: "红字销售出库单生成条码",
  5028. url: "/JHWMS/WMSCreateItemLot/From?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5029. width: "550px",
  5030. height: "1000px",
  5031. callBack: function (iframeId) {
  5032. top.frames[iframeId].submitForm();
  5033. }
  5034. });
  5035. }
  5036. }
  5037. else if (Type == '201') {
  5038. for (var i in ids) {
  5039. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5040. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5041. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5042. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5043. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5044. }
  5045. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5046. $.modalOpen({
  5047. id: "FormAddItemLot",
  5048. title: "调拨申请单生成条码",
  5049. url: "/JHWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5050. width: "550px",
  5051. height: "1000px",
  5052. callBack: function (iframeId) {
  5053. top.frames[iframeId].submitForm();
  5054. }
  5055. });
  5056. }
  5057. else {
  5058. $.modalOpen({
  5059. id: "FormAddItemLot",
  5060. title: "调拨申请单生成条码",
  5061. url: "/JHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5062. width: "550px",
  5063. height: "1000px",
  5064. callBack: function (iframeId) {
  5065. top.frames[iframeId].submitForm();
  5066. }
  5067. });
  5068. }
  5069. }
  5070. else if (Type == '202') {
  5071. for (var i in ids) {
  5072. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5073. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5074. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5075. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5076. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5077. }
  5078. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5079. $.modalOpen({
  5080. id: "FormAddItemLot",
  5081. title: "调拨申请单生成条码",
  5082. url: "/JHWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5083. width: "550px",
  5084. height: "1000px",
  5085. callBack: function (iframeId) {
  5086. top.frames[iframeId].submitForm();
  5087. }
  5088. });
  5089. }
  5090. else {
  5091. $.modalOpen({
  5092. id: "FormAddItemLot",
  5093. title: "调拨申请单生成条码",
  5094. url: "/JHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5095. width: "550px",
  5096. height: "1000px",
  5097. callBack: function (iframeId) {
  5098. top.frames[iframeId].submitForm();
  5099. }
  5100. });
  5101. }
  5102. }
  5103. }
  5104. function fullscreen() {
  5105. var docElm = document.documentElement;
  5106. if (docElm.requestFullscreen) {
  5107. docElm.requestFullscreen();
  5108. } else if (docElm.mozRequestFullScreen) {
  5109. docElm.mozRequestFullScreen();
  5110. } else if (docElm.webkitRequestFullScreen) {
  5111. docElm.webkitRequestFullScreen();
  5112. } else if (docElm.msRequestFullscreen) {
  5113. docElm.msRequestFullscreen();
  5114. }
  5115. $(window).bind('resize', function () {
  5116. $("#gridList").setGridWidth($(window).width());
  5117. }).trigger('resize');
  5118. $(window).bind('resize', function () {
  5119. $("#gridList").setGridHeight($(window).height());
  5120. }).trigger('resize');
  5121. }
  5122. function btnPrint() {
  5123. debugger;
  5124. if (mold == '')
  5125. {
  5126. if (Type == '1') { mold = '00001'; }//生产退料生成条码
  5127. if (Type == '2') { mold = '00002'; }//委外退料生成条码
  5128. if (Type == '3') { mold = '00003'; }//工单成品生成条码
  5129. if (Type == '4') { mold = '00004'; }//销售退货生成条码
  5130. if (Type == '5') { mold = '00005'; }//其他入库生成条码
  5131. if (Type == '6') { mold = '00006'; }//归还单生成条码
  5132. if (Type == '7') { mold = '00007'; }//普通到货单生成条码
  5133. if (Type == '8') { mold = '00008'; }//委外到货单生成条码
  5134. if (Type == '9') { mold = '00009'; }//成品入库单生成条码
  5135. if (Type == '10') { mold = '00010'; }//拒收单生成条码
  5136. if (Type == '11') { mold = '00011'; }//委外拒收单生成条码
  5137. if (Type == '12') { mold = '00012'; }//领料申请退料
  5138. if (Type == '13') { mold = '00013'; }//材料出库退料
  5139. if (Type == '14') { mold = '00014'; }//委外领料申请退料
  5140. if (Type == '15') { mold = '00015'; }//委外材料出库退料
  5141. if (Type == '16') { mold = '00016'; }//返工工单
  5142. if (Type == '17') { mold = 'BHG00001'; }//不合格条码入库
  5143. if (Type == '18') { mold = 'FCP00001'; }//副产品生成条码
  5144. if (Type == '22') { mold = '00018'; }//采购入库生成条码
  5145. if (Type == '23') { mold = '00019'; }//委外采购入库生成条码
  5146. if (Type == '201') { mold = '00020'; }//委外采购入库生成条码
  5147. if (Type == '202') { mold = '00020'; }//委外采购入库生成条码
  5148. if (Type == '203') { mold = 'DZ0001'; }//派纳特殊一步调入生成条码
  5149. if (Type == '24') { mold = 'HZXS0001'; }//红字销售出库单
  5150. }
  5151. var objArr = '';
  5152. var arr = [];
  5153. var obj = $("#gridList").jqGrid("getRowData");
  5154. for (var i = 0; i < obj.length; i++) {
  5155. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  5156. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  5157. if (rowData != "undefined" && rowData != null && rowData.length != 0) {
  5158. for (var j = 0; j < rowData.length; j++) {
  5159. objArr += "'" + rowData[j] + "',";
  5160. }
  5161. }
  5162. }
  5163. objArr = objArr.slice(0, objArr.length - 1);
  5164. if (objArr == "") {
  5165. $.modalAlertNew("WMS00101");
  5166. return;
  5167. }
  5168. objArr = "" + objArr + "|";
  5169. arr.push(objArr);
  5170. $.modalOpen({
  5171. id: "PrintLot",
  5172. title: "打印",
  5173. url: "/WMS/Print/PrintViewByLot?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  5174. width: "550px",
  5175. height: "1000px",
  5176. callBack: function (iframeId) {
  5177. top.frames[iframeId].submitForm();
  5178. }
  5179. });
  5180. }
  5181. function btnBatchPrint() {
  5182. debugger;
  5183. if (mold == '')
  5184. {
  5185. if (Type == '7') { mold = '00056'; }//普通到货单生成条码
  5186. if (Type == '8') { mold = '00057'; }//委外到货单生成条码
  5187. }
  5188. var objArr = '';
  5189. var arr = [];
  5190. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  5191. if (ids.length == 0) {
  5192. $.modalAlertNew("WMS00100");
  5193. return;
  5194. }
  5195. var ID = '';
  5196. for (var i in ids) {
  5197. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5198. objArr += "'" + ID + "',";
  5199. }
  5200. objArr = objArr.slice(0, objArr.length - 1);
  5201. objArr = "" + objArr + "|";
  5202. arr.push(objArr);
  5203. var xxx = "";
  5204. $.modalOpen({
  5205. id: "PrintLot",
  5206. title: "打印",
  5207. url: "/WMS/Print/PrintView?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  5208. width: "550px",
  5209. height: "1000px",
  5210. callBack: function (iframeId) {
  5211. top.frames[iframeId].submitForm();
  5212. }
  5213. });
  5214. }
  5215. function btn_ExportAll() {
  5216. debugger;
  5217. var objArr = '';
  5218. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  5219. for (var i in ids) {
  5220. objArr += "'" + $("#gridList").jqGrid('getRowData', ids[i]).ID + "',";
  5221. }
  5222. if (objArr=="") {
  5223. $.modalAlert("请选择单据后导出!");
  5224. return;
  5225. }
  5226. var postData = "&Type=" + Type + "";
  5227. //postData += "&ID=" + ID
  5228. postData += "&ID=" + objArr;
  5229. $.download("/JHWMS/WMSCreateItemLot/StatementExportAll" + "?" + Math.random(), postData, 'post');
  5230. }
  5231. function Select_SelGDLX() {
  5232. $("#SelGDLX").find("option").remove();
  5233. var DeptName = $("#SelGDLX option:checked").text();
  5234. $("#SelGDLX").append("<option value=''>--请选择--</option>");
  5235. $.ajax({
  5236. url: "/JHWMS/WMSCreateItemLot/SelGDLX" + "?" + Math.random(),
  5237. dataType: "json",
  5238. async: false,
  5239. success: function (data) {
  5240. if (data != null && data.length > 0) {
  5241. for (var i = 0; i < data.length; i++) {
  5242. $("#SelGDLX").append("<option value='" + data[i].Code + "'>" + data[i].Name + "</option>");
  5243. }
  5244. }
  5245. }
  5246. });
  5247. $("#SelGDLX option:checked").val('');
  5248. }
  5249. function btnCreateLook() {
  5250. var MODetailID = '';
  5251. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  5252. for (var i = 0; i < objList.length; i++) {
  5253. var rowId = objList[i];
  5254. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  5255. MODetailID = rowData.MODetailID;
  5256. }
  5257. $.modalOpenClean({
  5258. id: "FormMoPick",
  5259. title: "工单子件信息",
  5260. url: "/JHWMS/WMSCreateItemLot/FormMoPick" + "?" + Math.random() + "&MODetailID=" + MODetailID,
  5261. width: "90%",
  5262. height: "90%",
  5263. callBack: function (iframeId) {
  5264. top.frames[iframeId].submitForm();
  5265. }
  5266. });
  5267. }
  5268. function btn_Import() {
  5269. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  5270. if (objList.length != 1) {
  5271. $.modalAlertNew("WMS00100");
  5272. return;
  5273. }
  5274. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  5275. for (var i = 0; i < objList.length; i++) {
  5276. var rowId = objList[i];
  5277. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  5278. var Code = rowData.MOCode;
  5279. var Sequence = rowData.Sequence;
  5280. $.modalOpen({
  5281. id: "Upload",
  5282. title: "导入",
  5283. url: "/JHWMS/WMSCreateItemLot/ImportLot?Code=" + Code + "&Sequence=" + Sequence + "&" + Math.random(),
  5284. width: "400px",
  5285. height: "200px",
  5286. btn: null,
  5287. });
  5288. }
  5289. }
  5290. function btnPrints() {
  5291. debugger;
  5292. // var mold = '';
  5293. if (mold == '') {
  5294. if (Type == '1') { mold = '00001'; }//生产退料生成条码
  5295. if (Type == '2') { mold = '00002'; }//委外退料生成条码
  5296. if (Type == '3') { mold = '00003'; }//工单成品生成条码
  5297. if (Type == '4') { mold = '00004'; }//销售退货生成条码
  5298. if (Type == '5') { mold = '00005'; }//其他入库生成条码
  5299. if (Type == '6') { mold = '00006'; }//归还单生成条码
  5300. if (Type == '7') { mold = '00007'; }//普通到货单生成条码
  5301. if (Type == '8') { mold = '00008'; }//委外到货单生成条码
  5302. if (Type == '9') { mold = '00009'; }//成品入库单生成条码
  5303. if (Type == '10') { mold = '00010'; }//拒收单生成条码
  5304. if (Type == '11') { mold = '00011'; }//委外拒收单生成条码
  5305. if (Type == '12') { mold = '00012'; }//领料申请退料
  5306. if (Type == '13') { mold = '00013'; }//材料出库退料
  5307. if (Type == '14') { mold = '00014'; }//委外领料申请退料
  5308. if (Type == '15') { mold = '00015'; }//委外材料出库退料
  5309. if (Type == '16') { mold = '00016'; }//返工工单
  5310. if (Type == '17') { mold = 'BHG00001'; }//不合格条码入库
  5311. if (Type == '18') { mold = 'FCP00001'; }//副产品生成条码
  5312. if (Type == '22') { mold = '00018'; }//采购入库生成条码
  5313. if (Type == '23') { mold = '00019'; }//委外采购入库生成条码
  5314. if (Type == '203') { mold = 'DZ0001'; }//派纳特殊一步调入生成条码
  5315. }
  5316. var objArr = '';
  5317. var arr = [];
  5318. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  5319. for (var i = 0; i < objList.length; i++) {
  5320. var rowId = objList[i];
  5321. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  5322. objArr += "'" + rowData.ID + "',";
  5323. }
  5324. objArr = objArr.slice(0, objArr.length - 1);
  5325. if (objArr == "") {
  5326. $.modalAlertNew("WMS00110");
  5327. return;
  5328. }
  5329. objArr = "" + objArr + "|";
  5330. arr.push(objArr);
  5331. $.modalOpen({
  5332. id: "PrintLot",
  5333. title: "打印",
  5334. url: "/WMS/Print/PrintViewByLot?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  5335. width: "550px",
  5336. height: "1000px",
  5337. callBack: function (iframeId) {
  5338. top.frames[iframeId].submitForm();
  5339. }
  5340. });
  5341. }
  5342. function btnInWareHouse() {
  5343. debugger;
  5344. var objArr = '';
  5345. var arr = [];
  5346. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  5347. for (var i = 0; i < objList.length; i++) {
  5348. var rowId = objList[i];
  5349. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  5350. objArr += "'" + rowData.ID + "',";
  5351. }
  5352. objArr = objArr.slice(0, objArr.length - 1);
  5353. if (objArr == "") {
  5354. $.modalAlertNew("WMS00110");
  5355. return;
  5356. }
  5357. arr.push(objArr);
  5358. $.submitForm({
  5359. url: "/JHWMS/WMSCreateItemLot/PostInWareHouse" ,
  5360. param: {
  5361. IDs: JSON.stringify(objArr)
  5362. },
  5363. success: function () {
  5364. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5365. }
  5366. })
  5367. }
  5368. function btn_Rebind() {
  5369. var objArr = '';
  5370. var obj = $("#gridList").jqGrid("getRowData");
  5371. for (var i = 0; i < obj.length; i++) {
  5372. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  5373. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  5374. if (rowData != "undefined" && rowData != null && rowData.length != 0) {
  5375. for (var j = 0; j < rowData.length; j++) {
  5376. var rowDataZ = $SubGird.jqGrid('getRowData', rowData[j]);
  5377. objArr += "'" + rowDataZ.LotNo + "',";
  5378. }
  5379. objArr = objArr.slice(0, objArr.length - 1);
  5380. }
  5381. }
  5382. if (objArr == "") {
  5383. $.modalAlert("请选择条码信息后,进行重新绑定!");
  5384. return;
  5385. }
  5386. $.modalOpen({
  5387. id: "ICSLotRebind",
  5388. title: "条码重新绑定",
  5389. url: "/JHWMS/WMSCreateItemLot/ICSLotRebind?LotNo=" + encodeURI(encodeURI(objArr)) + "&" + Math.random(),
  5390. width: "500px",
  5391. height: "350px",
  5392. callBack: function (iframeId) {
  5393. top.frames[iframeId].submitForm();
  5394. }
  5395. });
  5396. }
  5397. function btnAllCreatePN() {
  5398. $("#gridList").find($("td[aria-describedby='gridList_rn']")).click();
  5399. var PoStatus;
  5400. var jsonData = '';
  5401. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  5402. var POCode = "";
  5403. var PORow = "";
  5404. var VenCode = "";
  5405. var WorkPoint = "";
  5406. var VendorLot = "";
  5407. if (Type == '3') {
  5408. debugger;
  5409. var ARR = [];
  5410. for (var i in ids) {
  5411. var ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5412. var Code = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  5413. var Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5414. var EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5415. var EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5416. var minPackQty = $("#gridList").jqGrid('getRowData', ids[i]).MPQ;
  5417. var InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5418. var BatchCode = $("#gridList").jqGrid('getRowData', ids[i]).BatchCode;
  5419. if (minPackQty == '' || minPackQty == 0) {
  5420. $.modalAlert("单据:" + Code + ",行号:" + Sequence + "请输入最小包装量!");
  5421. return;
  5422. }
  5423. var Complete = '';
  5424. $.ajax({
  5425. url: "/PNWMS/WMSCreateItemLot/GetInvBatchEnable?InvCode=" + InvCode,
  5426. dataType: "json",
  5427. async: false,
  5428. success: function (data) {
  5429. if (data != null && data.length > 0) {
  5430. Complete = data[0].BatchEnable;
  5431. }
  5432. }
  5433. });
  5434. if (Complete == true) {
  5435. if (BatchCode == "") {
  5436. $.modalAlert("单号:" + Code + " 行号:" + Sequence + " 物料:" + InvCode + ",料品已开启批次,请输入批次!", "warning");
  5437. return;
  5438. }
  5439. }
  5440. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5441. if (thisCreateQty <= 0) {
  5442. $.modalAlert("该单据条码已全部生成完毕!");
  5443. return;
  5444. }
  5445. thisCreateQty = thisCreateQty.toFixed(6);
  5446. minPackQty = Number(minPackQty).toFixed(6);
  5447. if (parseInt(Math.ceil(thisCreateQty * 10000)) % parseInt(Math.ceil(minPackQty * 10000)) != 0) {
  5448. createPageCount = Math.floor(thisCreateQty / minPackQty) + 1;
  5449. }
  5450. else {
  5451. createPageCount = parseInt(thisCreateQty / minPackQty);
  5452. }
  5453. createPageCount = createPageCount.toFixed(0);
  5454. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//订单总数
  5455. Quantity = Quantity.toFixed(2);
  5456. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5457. CreatedQty = CreatedQty.toFixed(2);
  5458. if (Quantity == CreatedQty) {
  5459. return false;
  5460. }
  5461. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5462. if (EffectiveEnable == 'true') {
  5463. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5464. } else {
  5465. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5466. }
  5467. var obj = {
  5468. ID: ID,
  5469. Code: Code,
  5470. Sequence: Sequence,
  5471. thisCreateQty: thisCreateQty,
  5472. minPackQty: minPackQty,
  5473. createPageCount: createPageCount,
  5474. //VendorLot: VendorLot,
  5475. PRODUCTDATE: PRODUCTDATE,
  5476. ExpirationDate: ExpirationDate,
  5477. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5478. //自由项
  5479. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5480. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5481. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5482. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5483. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5484. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5485. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5486. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5487. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5488. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5489. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5490. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5491. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5492. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5493. }
  5494. ARR.push(obj);
  5495. }
  5496. $.submitForm({
  5497. url: "/PNWMS/WMSCreateItemLot/SubmitFormGDCPALL" + "?" + Math.random(),
  5498. param: {
  5499. keyValue: JSON.stringify(ARR)
  5500. },
  5501. success: function () {
  5502. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5503. }
  5504. })
  5505. }
  5506. if (Type == '5') {
  5507. debugger;
  5508. var ARR = [];
  5509. for (var i in ids) {
  5510. var ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5511. var Code = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  5512. var Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5513. var EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5514. var EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5515. var minPackQty = $("#gridList").jqGrid('getRowData', ids[i]).MPQ;
  5516. var InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5517. var BatchCode = $("#gridList").jqGrid('getRowData', ids[i]).BatchCode;
  5518. if (minPackQty == '' || minPackQty == 0) {
  5519. $.modalAlert("单据:" + Code + ",行号:" + Sequence + "请输入最小包装量!");
  5520. return;
  5521. }
  5522. var Complete = '';
  5523. $.ajax({
  5524. url: "/PNWMS/WMSCreateItemLot/GetInvBatchEnable?InvCode=" + InvCode,
  5525. dataType: "json",
  5526. async: false,
  5527. success: function (data) {
  5528. if (data != null && data.length > 0) {
  5529. Complete = data[0].BatchEnable;
  5530. }
  5531. }
  5532. });
  5533. if (Complete == true) {
  5534. if (BatchCode == "") {
  5535. $.modalAlert("单号:" + Code + " 行号:" + Sequence + " 物料:" + InvCode + ",料品已开启批次,请输入批次!", "warning");
  5536. return;
  5537. }
  5538. }
  5539. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5540. if (thisCreateQty <= 0) {
  5541. $.modalAlert("该单据条码已全部生成完毕!");
  5542. return;
  5543. }
  5544. thisCreateQty = thisCreateQty.toFixed(6);
  5545. minPackQty = Number(minPackQty).toFixed(6);
  5546. if (parseInt(Math.ceil(thisCreateQty * 10000)) % parseInt(Math.ceil(minPackQty * 10000)) != 0) {
  5547. createPageCount = Math.floor(thisCreateQty / minPackQty) + 1;
  5548. }
  5549. else {
  5550. createPageCount = parseInt(thisCreateQty / minPackQty);
  5551. }
  5552. createPageCount = createPageCount.toFixed(0);
  5553. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//订单总数
  5554. Quantity = Quantity.toFixed(2);
  5555. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5556. CreatedQty = CreatedQty.toFixed(2);
  5557. if (Quantity == CreatedQty) {
  5558. return false;
  5559. }
  5560. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5561. if (EffectiveEnable == 'true') {
  5562. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5563. } else {
  5564. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5565. }
  5566. var obj = {
  5567. ID: ID,
  5568. Code: Code,
  5569. Sequence: Sequence,
  5570. thisCreateQty: thisCreateQty,
  5571. minPackQty: minPackQty,
  5572. createPageCount: createPageCount,
  5573. //VendorLot: VendorLot,
  5574. PRODUCTDATE: PRODUCTDATE,
  5575. ExpirationDate: ExpirationDate,
  5576. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5577. //自由项
  5578. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5579. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5580. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5581. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5582. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5583. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5584. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5585. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5586. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5587. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5588. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5589. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5590. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5591. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5592. }
  5593. ARR.push(obj);
  5594. }
  5595. $.submitForm({
  5596. url: "/JHWMS/WMSCreateItemLot/SubmitFormQTRKALL" + "?" + Math.random(),
  5597. param: {
  5598. keyValue: JSON.stringify(ARR)
  5599. },
  5600. success: function () {
  5601. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5602. }
  5603. })
  5604. }
  5605. if (Type == '22') {
  5606. debugger;
  5607. var ARR = [];
  5608. for (var i in ids) {
  5609. var ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5610. var Code = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5611. var Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5612. var EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5613. var EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5614. var minPackQty = $("#gridList").jqGrid('getRowData', ids[i]).MPQ;
  5615. var InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5616. var BatchCode = $("#gridList").jqGrid('getRowData', ids[i]).BatchCode;
  5617. if (minPackQty == '' || minPackQty == 0) {
  5618. $.modalAlert("单据:" + Code + ",行号:" + Sequence + "请输入最小包装量!");
  5619. return;
  5620. }
  5621. var Complete = '';
  5622. $.ajax({
  5623. url: "/PNWMS/WMSCreateItemLot/GetInvBatchEnable?InvCode=" + InvCode,
  5624. dataType: "json",
  5625. async: false,
  5626. success: function (data) {
  5627. if (data != null && data.length > 0) {
  5628. Complete = data[0].BatchEnable;
  5629. }
  5630. }
  5631. });
  5632. if (Complete == true) {
  5633. if (BatchCode == "") {
  5634. $.modalAlert("单号:" + Code + " 行号:" + Sequence + " 物料:" + InvCode + ",料品已开启批次,请输入批次!", "warning");
  5635. return;
  5636. }
  5637. }
  5638. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5639. if (thisCreateQty <= 0) {
  5640. $.modalAlert("该单据条码已全部生成完毕!");
  5641. return;
  5642. }
  5643. thisCreateQty = thisCreateQty.toFixed(6);
  5644. minPackQty = Number(minPackQty).toFixed(6);
  5645. if (parseInt(Math.ceil(thisCreateQty * 10000)) % parseInt(Math.ceil(minPackQty * 10000)) != 0) {
  5646. createPageCount = Math.floor(thisCreateQty / minPackQty) + 1;
  5647. }
  5648. else {
  5649. createPageCount = parseInt(thisCreateQty / minPackQty);
  5650. }
  5651. createPageCount = createPageCount.toFixed(0);
  5652. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5653. Quantity = Quantity.toFixed(2);
  5654. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5655. CreatedQty = CreatedQty.toFixed(2);
  5656. if (Quantity == CreatedQty) {
  5657. return false;
  5658. }
  5659. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5660. if (EffectiveEnable == 'true') {
  5661. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5662. } else {
  5663. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5664. }
  5665. var obj = {
  5666. ID: ID,
  5667. Code: Code,
  5668. Sequence: Sequence,
  5669. thisCreateQty: thisCreateQty,
  5670. minPackQty: minPackQty,
  5671. createPageCount: createPageCount,
  5672. //VendorLot: VendorLot,
  5673. PRODUCTDATE: PRODUCTDATE,
  5674. ExpirationDate: ExpirationDate,
  5675. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5676. //自由项
  5677. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5678. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5679. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5680. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5681. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5682. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5683. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5684. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5685. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5686. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5687. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5688. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5689. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5690. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5691. }
  5692. ARR.push(obj);
  5693. }
  5694. $.submitForm({
  5695. url: "/JHWMS/WMSCreateItemLot/SubmitFormCGRKALL" + "?" + Math.random(),
  5696. param: {
  5697. keyValue: JSON.stringify(ARR)
  5698. },
  5699. success: function () {
  5700. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5701. }
  5702. })
  5703. }
  5704. if (Type == '24') {
  5705. debugger;
  5706. var ARR = [];
  5707. for (var i in ids) {
  5708. var ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5709. var Code = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  5710. var Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5711. var EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5712. var EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5713. var minPackQty = $("#gridList").jqGrid('getRowData', ids[i]).MPQ;
  5714. var InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5715. var BatchCode = $("#gridList").jqGrid('getRowData', ids[i]).BatchCode;
  5716. if (minPackQty == '' || minPackQty == 0) {
  5717. $.modalAlert("单据:" + Code + ",行号:" + Sequence + "请输入最小包装量!");
  5718. return;
  5719. }
  5720. var Complete = '';
  5721. $.ajax({
  5722. url: "/PNWMS/WMSCreateItemLot/GetInvBatchEnable?InvCode=" + InvCode,
  5723. dataType: "json",
  5724. async: false,
  5725. success: function (data) {
  5726. if (data != null && data.length > 0) {
  5727. Complete = data[0].BatchEnable;
  5728. }
  5729. }
  5730. });
  5731. if (Complete == true) {
  5732. if (BatchCode == "") {
  5733. $.modalAlert("单号:" + Code + " 行号:" + Sequence + " 物料:" + InvCode + ",料品已开启批次,请输入批次!", "warning");
  5734. return;
  5735. }
  5736. }
  5737. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5738. if (thisCreateQty <= 0) {
  5739. $.modalAlert("该单据条码已全部生成完毕!");
  5740. return;
  5741. }
  5742. thisCreateQty = thisCreateQty.toFixed(6);
  5743. minPackQty = Number(minPackQty).toFixed(6);
  5744. if (parseInt(Math.ceil(thisCreateQty * 10000)) % parseInt(Math.ceil(minPackQty * 10000)) != 0) {
  5745. createPageCount = Math.floor(thisCreateQty / minPackQty) + 1;
  5746. }
  5747. else {
  5748. createPageCount = parseInt(thisCreateQty / minPackQty);
  5749. }
  5750. createPageCount = createPageCount.toFixed(0);
  5751. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//订单总数
  5752. Quantity = Quantity.toFixed(2);
  5753. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5754. CreatedQty = CreatedQty.toFixed(2);
  5755. if (Quantity == CreatedQty) {
  5756. return false;
  5757. }
  5758. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5759. if (EffectiveEnable == 'true') {
  5760. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5761. } else {
  5762. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5763. }
  5764. var obj = {
  5765. ID: ID,
  5766. Code: Code,
  5767. Sequence: Sequence,
  5768. thisCreateQty: thisCreateQty,
  5769. minPackQty: minPackQty,
  5770. createPageCount: createPageCount,
  5771. //VendorLot: VendorLot,
  5772. PRODUCTDATE: PRODUCTDATE,
  5773. ExpirationDate: ExpirationDate,
  5774. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5775. //自由项
  5776. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5777. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5778. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5779. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5780. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5781. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5782. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5783. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5784. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5785. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5786. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5787. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5788. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5789. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5790. }
  5791. ARR.push(obj);
  5792. }
  5793. $.submitForm({
  5794. url: "/PNWMS/WMSCreateItemLot/SubmitFormXSTHALL" + "?" + Math.random(),
  5795. param: {
  5796. keyValue: JSON.stringify(ARR)
  5797. },
  5798. success: function () {
  5799. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5800. }
  5801. })
  5802. }
  5803. if (Type == '203') {
  5804. debugger;
  5805. var ARR = [];
  5806. for (var i in ids) {
  5807. var ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5808. var Code = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5809. var Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5810. var EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5811. var EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5812. var minPackQty = $("#gridList").jqGrid('getRowData', ids[i]).MPQ;
  5813. var InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5814. var BatchCode = $("#gridList").jqGrid('getRowData', ids[i]).BatchCode;
  5815. if (minPackQty == '' || minPackQty == 0) {
  5816. $.modalAlert("单据:" + Code + ",行号:" + Sequence + "请输入最小包装量!");
  5817. return;
  5818. }
  5819. var Complete = '';
  5820. $.ajax({
  5821. url: "/PNWMS/WMSCreateItemLot/GetInvBatchEnable?InvCode=" + InvCode,
  5822. dataType: "json",
  5823. async: false,
  5824. success: function (data) {
  5825. if (data != null && data.length > 0) {
  5826. Complete = data[0].BatchEnable;
  5827. }
  5828. }
  5829. });
  5830. if (Complete == true) {
  5831. if (BatchCode == "") {
  5832. $.modalAlert("单号:" + Code + " 行号:" + Sequence + " 物料:" + InvCode + ",料品已开启批次,请输入批次!", "warning");
  5833. return;
  5834. }
  5835. }
  5836. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5837. if (thisCreateQty <= 0) {
  5838. $.modalAlert("该单据条码已全部生成完毕!");
  5839. return;
  5840. }
  5841. thisCreateQty = thisCreateQty.toFixed(6);
  5842. minPackQty = Number(minPackQty).toFixed(6);
  5843. if (parseInt(Math.ceil(thisCreateQty * 10000)) % parseInt(Math.ceil(minPackQty * 10000)) != 0) {
  5844. createPageCount = Math.floor(thisCreateQty / minPackQty) + 1;
  5845. }
  5846. else {
  5847. createPageCount = parseInt(thisCreateQty / minPackQty);
  5848. }
  5849. createPageCount = createPageCount.toFixed(0);
  5850. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5851. Quantity = Quantity.toFixed(2);
  5852. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5853. CreatedQty = CreatedQty.toFixed(2);
  5854. if (Quantity == CreatedQty) {
  5855. return false;
  5856. }
  5857. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5858. if (EffectiveEnable == 'true') {
  5859. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5860. } else {
  5861. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5862. }
  5863. var obj = {
  5864. ID: ID,
  5865. Code: Code,
  5866. Sequence: Sequence,
  5867. thisCreateQty: thisCreateQty,
  5868. minPackQty: minPackQty,
  5869. createPageCount: createPageCount,
  5870. //VendorLot: VendorLot,
  5871. PRODUCTDATE: PRODUCTDATE,
  5872. ExpirationDate: ExpirationDate,
  5873. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5874. //自由项
  5875. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5876. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5877. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5878. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5879. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5880. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5881. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5882. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5883. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5884. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5885. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5886. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5887. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5888. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5889. }
  5890. ARR.push(obj);
  5891. }
  5892. $.submitForm({
  5893. url: "/PNWMS/WMSCreateItemLot/SubmitFormYBDBALL" + "?" + Math.random(),
  5894. param: {
  5895. keyValue: JSON.stringify(ARR)
  5896. },
  5897. success: function () {
  5898. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5899. }
  5900. })
  5901. }
  5902. }
  5903. function btnAllCreate() {
  5904. debugger;
  5905. var PoStatus;
  5906. var jsonData = '';
  5907. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  5908. var POCode = "";
  5909. var PORow = "";
  5910. var VenCode = "";
  5911. var WorkPoint = "";
  5912. var VendorLot = "";
  5913. //生产退料
  5914. if (Type == '1') {
  5915. debugger;
  5916. var ARR = [];
  5917. for (var i in ids) {
  5918. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5919. Code = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5920. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5921. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5922. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5923. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5924. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5925. if (thisCreateQty == 0) {
  5926. $.modalAlert("该单据条码已全部生成完毕!");
  5927. return;
  5928. }
  5929. thisCreateQty = thisCreateQty.toFixed(4);
  5930. var minPackQty = thisCreateQty;//最小包装量
  5931. //minPackQty = minPackQty.toFixed(4);
  5932. var createPageCount = 1;//本次生成张数
  5933. createPageCount = createPageCount.toFixed(0);
  5934. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5935. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5936. Quantity = Quantity.toFixed(2);
  5937. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5938. CreatedQty = CreatedQty.toFixed(2);
  5939. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5940. if (Quantity == CreatedQty) {
  5941. return false;
  5942. }
  5943. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5944. if (EffectiveEnable == 'true') {
  5945. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5946. } else {
  5947. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5948. }
  5949. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5950. var obj = {
  5951. ID: ID,
  5952. Code: Code,
  5953. Sequence: Sequence,
  5954. thisCreateQty: thisCreateQty,
  5955. minPackQty: minPackQty,
  5956. createPageCount: createPageCount,
  5957. //VendorLot: VendorLot,
  5958. PRODUCTDATE: PRODUCTDATE,
  5959. ExpirationDate: ExpirationDate,
  5960. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5961. //自由项
  5962. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5963. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5964. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5965. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5966. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5967. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5968. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5969. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5970. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5971. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5972. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5973. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5974. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5975. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5976. }
  5977. ARR.push(obj);
  5978. }
  5979. $.submitForm({
  5980. url: "/JHWMS/WMSCreateItemLot/SubmitFormGDTLALL" + "?" + Math.random(),
  5981. param: {
  5982. keyValue: JSON.stringify(ARR)
  5983. },
  5984. success: function () {
  5985. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5986. }
  5987. })
  5988. }
  5989. //普通到货单
  5990. if (Type == '7') {
  5991. debugger;
  5992. var ARR = [];
  5993. for (var i in ids) {
  5994. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5995. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  5996. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5997. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5998. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5999. //console.log("单号:" + DNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  6000. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  6001. if (thisCreateQty == 0) {
  6002. $.modalAlert("该单据条码已全部生成完毕!");
  6003. return;
  6004. }
  6005. thisCreateQty = thisCreateQty.toFixed(4);
  6006. var minPackQty = thisCreateQty;//最小包装量
  6007. //minPackQty = minPackQty.toFixed(4);
  6008. var createPageCount = 1;//本次生成张数
  6009. createPageCount = createPageCount.toFixed(0);
  6010. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  6011. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  6012. Quantity = Quantity.toFixed(2);
  6013. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  6014. CreatedQty = CreatedQty.toFixed(2);
  6015. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  6016. if (Quantity == CreatedQty) {
  6017. return false;
  6018. }
  6019. if (EffectiveEnable == 'true') {
  6020. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  6021. } else {
  6022. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  6023. }
  6024. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  6025. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  6026. var obj = {
  6027. ID: ID,
  6028. Code: DNCode,
  6029. Sequence: Sequence,
  6030. thisCreateQty: thisCreateQty,
  6031. minPackQty: minPackQty,
  6032. createPageCount: createPageCount,
  6033. //VendorLot: VendorLot,
  6034. PRODUCTDATE: PRODUCTDATE,
  6035. ExpirationDate: ExpirationDate,
  6036. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  6037. //自由项
  6038. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  6039. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  6040. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  6041. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  6042. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  6043. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  6044. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  6045. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  6046. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  6047. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  6048. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  6049. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  6050. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  6051. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  6052. }
  6053. ARR.push(obj);
  6054. }
  6055. $.submitForm({
  6056. url: "/JHWMS/WMSCreateItemLot/SubmitFormSHDHALL" + "?" + Math.random(),
  6057. param: {
  6058. keyValue: JSON.stringify(ARR)
  6059. },
  6060. success: function () {
  6061. $.currentWindow().$("#gridList").trigger("reloadGrid");
  6062. }
  6063. })
  6064. }
  6065. //委外到货单
  6066. if (Type == '8') {
  6067. debugger;
  6068. var ARR = [];
  6069. for (var i in ids) {
  6070. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6071. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  6072. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6073. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  6074. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  6075. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  6076. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  6077. if (thisCreateQty == 0) {
  6078. $.modalAlert("该单据条码已全部生成完毕!");
  6079. return;
  6080. }
  6081. thisCreateQty = thisCreateQty.toFixed(4);
  6082. var minPackQty = thisCreateQty;//最小包装量
  6083. //minPackQty = minPackQty.toFixed(4);
  6084. var createPageCount = 1;//本次生成张数
  6085. createPageCount = createPageCount.toFixed(0);
  6086. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  6087. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  6088. Quantity = Quantity.toFixed(2);
  6089. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  6090. CreatedQty = CreatedQty.toFixed(2);
  6091. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  6092. if (Quantity == CreatedQty) {
  6093. return false;
  6094. }
  6095. if (EffectiveEnable == 'true') {
  6096. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  6097. } else {
  6098. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  6099. }
  6100. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  6101. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  6102. var obj = {
  6103. ID: ID,
  6104. Code: ODNCode,
  6105. Sequence: Sequence,
  6106. thisCreateQty: thisCreateQty,
  6107. minPackQty: minPackQty,
  6108. createPageCount: createPageCount,
  6109. //VendorLot: VendorLot,
  6110. PRODUCTDATE: PRODUCTDATE,
  6111. ExpirationDate: ExpirationDate,
  6112. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  6113. //自由项
  6114. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  6115. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  6116. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  6117. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  6118. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  6119. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  6120. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  6121. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  6122. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  6123. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  6124. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  6125. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  6126. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  6127. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  6128. }
  6129. ARR.push(obj);
  6130. }
  6131. $.submitForm({
  6132. url: "/JHWMS/WMSCreateItemLot/SubmitFormWWSHDHALL" + "?" + Math.random(),
  6133. param: {
  6134. keyValue: JSON.stringify(obj)
  6135. },
  6136. success: function () {
  6137. $.currentWindow().$("#gridList").trigger("reloadGrid");
  6138. }
  6139. })
  6140. }
  6141. //成品入库单条码生成
  6142. if (Type == '9') {
  6143. debugger;
  6144. var ARR = [];
  6145. for (var i in ids) {
  6146. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6147. Code = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6148. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6149. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  6150. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  6151. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  6152. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  6153. if (thisCreateQty == 0) {
  6154. $.modalAlert("该单据条码已全部生成完毕!");
  6155. return;
  6156. }
  6157. thisCreateQty = thisCreateQty.toFixed(4);
  6158. var minPackQty = thisCreateQty;//最小包装量
  6159. //minPackQty = minPackQty.toFixed(4);
  6160. var createPageCount = 1;//本次生成张数
  6161. createPageCount = createPageCount.toFixed(0);
  6162. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  6163. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  6164. Quantity = Quantity.toFixed(2);
  6165. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  6166. CreatedQty = CreatedQty.toFixed(2);
  6167. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  6168. if (Quantity == CreatedQty) {
  6169. return false;
  6170. }
  6171. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  6172. if (EffectiveEnable == 'true') {
  6173. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  6174. } else {
  6175. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  6176. }
  6177. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  6178. var obj = {
  6179. ID: ID,
  6180. Code: Code,
  6181. Sequence: Sequence,
  6182. thisCreateQty: thisCreateQty,
  6183. minPackQty: minPackQty,
  6184. createPageCount: createPageCount,
  6185. //VendorLot: VendorLot,
  6186. PRODUCTDATE: PRODUCTDATE,
  6187. ExpirationDate: ExpirationDate,
  6188. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  6189. //自由项
  6190. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  6191. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  6192. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  6193. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  6194. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  6195. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  6196. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  6197. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  6198. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  6199. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  6200. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  6201. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  6202. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  6203. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  6204. }
  6205. ARR.push(obj);
  6206. }
  6207. $.submitForm({
  6208. url: "/JHWMS/WMSCreateItemLot/SubmitFormKLCPRKALL" + "?" + Math.random(),
  6209. param: {
  6210. keyValue: JSON.stringify(ARR)
  6211. },
  6212. success: function () {
  6213. $.currentWindow().$("#gridList").trigger("reloadGrid");
  6214. }
  6215. })
  6216. }
  6217. if (Type == '17') {
  6218. for (var i in ids) {
  6219. LotNo = $("#gridList").jqGrid('getRowData', ids[i]).LotNo;
  6220. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  6221. if (thisCreateQty == 0) {
  6222. $.modalAlert("该条码已全部生成完毕!");
  6223. return;
  6224. }
  6225. thisCreateQty = thisCreateQty.toFixed(4);
  6226. var minPackQty = thisCreateQty;//最小包装量
  6227. var createPageCount = 1;//本次生成张数
  6228. createPageCount = createPageCount.toFixed(0);
  6229. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  6230. Quantity = Quantity.toFixed(2);
  6231. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  6232. CreatedQty = CreatedQty.toFixed(2);
  6233. if (Quantity == CreatedQty) {
  6234. return false;
  6235. }
  6236. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  6237. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  6238. var obj = {
  6239. thisCreateQty: thisCreateQty,
  6240. minPackQty: minPackQty,
  6241. createPageCount: createPageCount,
  6242. //VendorLot: VendorLot,
  6243. PRODUCTDATE: PRODUCTDATE,
  6244. ExpirationDate: ExpirationDate,
  6245. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  6246. }
  6247. $.submitForm({
  6248. url: "/JHWMS/WMSCreateItemLot/SubmitFormBHGTM?LotNo=" + LotNo + "&WorkPoint=" + WorkPoints,
  6249. param: {
  6250. keyValue: JSON.stringify(obj)
  6251. },
  6252. success: function () {
  6253. $.currentWindow().$("#gridList").trigger("reloadGrid");
  6254. }
  6255. })
  6256. }
  6257. }
  6258. }
  6259. function btnAllPOCreate(){
  6260. debugger;
  6261. var PoStatus;
  6262. var jsonData = '';
  6263. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  6264. var POCode = "";
  6265. var PORow = "";
  6266. var VenCode = "";
  6267. var WorkPoint = "";
  6268. var VendorLot = "";
  6269. //生产退料
  6270. if (Type == '3') {
  6271. debugger;
  6272. var ARR = [];
  6273. for (var i in ids) {
  6274. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6275. Code = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6276. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6277. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  6278. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  6279. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  6280. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  6281. if (thisCreateQty == 0) {
  6282. $.modalAlert("该单据条码已全部生成完毕!");
  6283. return;
  6284. }
  6285. thisCreateQty = thisCreateQty.toFixed(4);
  6286. var minPackQty = thisCreateQty;//最小包装量
  6287. //minPackQty = minPackQty.toFixed(4);
  6288. var createPageCount = 1;//本次生成张数
  6289. createPageCount = createPageCount.toFixed(0);
  6290. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  6291. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  6292. Quantity = Quantity.toFixed(2);
  6293. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  6294. CreatedQty = CreatedQty.toFixed(2);
  6295. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  6296. if (Quantity == CreatedQty) {
  6297. return false;
  6298. }
  6299. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  6300. if (EffectiveEnable == 'true') {
  6301. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  6302. } else {
  6303. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  6304. }
  6305. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  6306. var obj = {
  6307. ID: ID,
  6308. Code: Code,
  6309. Sequence: Sequence,
  6310. thisCreateQty: thisCreateQty,
  6311. minPackQty: minPackQty,
  6312. createPageCount: createPageCount,
  6313. //VendorLot: VendorLot,
  6314. PRODUCTDATE: PRODUCTDATE,
  6315. ExpirationDate: ExpirationDate,
  6316. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  6317. //自由项
  6318. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  6319. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  6320. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  6321. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  6322. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  6323. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  6324. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  6325. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  6326. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  6327. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  6328. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  6329. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  6330. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  6331. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  6332. }
  6333. ARR.push(obj);
  6334. }
  6335. $.submitForm({
  6336. url: "/JHWMS/WMSCreateItemLot/SubmitFormGDCPZXALL" + "?" + Math.random(),
  6337. param: {
  6338. keyValue: JSON.stringify(ARR)
  6339. },
  6340. success: function () {
  6341. $.currentWindow().$("#gridList").trigger("reloadGrid");
  6342. }
  6343. })
  6344. }
  6345. }
  6346. function GetBoxNum() {
  6347. debugger;
  6348. var BoxNum = "";
  6349. //获取新生成的箱号
  6350. $.ajax({
  6351. url: "/JHWMS/WMSCreateItemLot/SeachBoxNum?" + Math.random(),
  6352. dataType: "json",
  6353. async: false,
  6354. success: function (data) {
  6355. if (data.rows == "") {
  6356. $.modalAlert("生成箱号失败!");
  6357. return;
  6358. } else {
  6359. BoxNum = data.rows;
  6360. }
  6361. }
  6362. });
  6363. return BoxNum;
  6364. }
  6365. function BoxPacking() {
  6366. debugger;
  6367. var BoxNum = GetBoxNum();
  6368. var objArr = '';
  6369. var arr = [];
  6370. var obj = $("#gridList").jqGrid("getRowData");
  6371. for (var i = 0; i < obj.length; i++) {
  6372. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  6373. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  6374. if (rowData != "undefined" && rowData != null && rowData.length != 0) {
  6375. for (var j = 0; j < rowData.length; j++) {
  6376. var curRowData = $SubGird.jqGrid('getRowData', rowData[j])
  6377. objArr += "'" + curRowData.LotNo + "',";
  6378. }
  6379. }
  6380. }
  6381. objArr = objArr.slice(0, objArr.length - 1);
  6382. $.modalConfirm("请确认是否将所选条码装入箱号: " + BoxNum +" 中 ?", function (r) {
  6383. if (r) {
  6384. $.submitForm({
  6385. url: "/JHWMS/WMSCreateItemLot/SubmitBoxPacking?BoxNum=" + BoxNum + "&" + Math.random(),
  6386. param: {
  6387. keyValue: JSON.stringify(objArr)
  6388. },
  6389. success: function () {
  6390. $.currentWindow().$("#gridList").trigger("reloadGrid");
  6391. }
  6392. })
  6393. }
  6394. });
  6395. }
  6396. </script>
  6397. <iframe id="ifrm" src="" width="0" height="0"></iframe>
  6398. <script>
  6399. </script>
  6400. <div class="topPanel" style="height:149px;">
  6401. <div class="toolbar">
  6402. <div class="btn-group">
  6403. <a id="NF-BoxPacking" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="BoxPacking()"><i class="fa fa-pencil-square-o"></i>条码装箱</a>
  6404. <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>
  6405. <a id="NF-ALLPOCreate" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnAllPOCreate()"><i class="fa fa-pencil-square-o"></i>成品一键生成</a>
  6406. <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>
  6407. <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>
  6408. <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>
  6409. <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>
  6410. <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>
  6411. <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>
  6412. <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>
  6413. <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>
  6414. <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>
  6415. <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>
  6416. @*<a id="NF-ExportAll" authorize="yes" class="btn btn-default" onclick="btn_ExportAll()"><i class="fa fa-download"></i>导出</a>*@
  6417. <a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
  6418. </div>
  6419. <div class="btn-group" style="display:block;padding-left:2px;">
  6420. <a class="btn btn-primary" id="downPrintControl" href="~/PrintActivex.exe" style="display:none">点击下载打印组件</a>
  6421. <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>
  6422. <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>
  6423. <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>
  6424. </div>
  6425. <script>$('.toolbar').authorizeButton()</script>
  6426. </div>
  6427. <div class="search">
  6428. <table>
  6429. <tr>
  6430. <td class="POCodeShow" style="text-align:right;"><label class="lglabel " id="POCodeShowLable" for="txt_POCode">&nbsp;&nbsp;&nbsp;&nbsp;</label>:</td>
  6431. <td class="POCodeShow">
  6432. <div class="input-group">
  6433. <input id="txt_POCode" type="text" class="form-control" style="width: 130px;">
  6434. </div>
  6435. </td>
  6436. <td class="HideItemsSourceCode" style="text-align:right;"><label class="lglabel " for="txt_SourceCode">&nbsp;&nbsp;&nbsp;&nbsp;</label>采购订单号:</td>
  6437. <td class="HideItemsSourceCode">
  6438. <div class="input-group">
  6439. <input id="txt_SourceCode" type="text" class="form-control" style="width: 130px;">
  6440. </div>
  6441. </td>
  6442. <td class="HideItemsVednCode" style="text-align:right;"><label class="lglabel HideItemsVednCode" for="txt_VenCode">&nbsp;&nbsp;&nbsp;&nbsp;供应商代码</label>:</td>
  6443. <td class="HideItemsVednCode">
  6444. <div class="input-group HideItemsVednCode">
  6445. <input id="txt_VenCode" type="text" class="form-control HideItemsVednCode" style="width: 130px;">
  6446. </div>
  6447. </td>
  6448. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;供应商名称</label>:</td>
  6449. <td class="HideItems">
  6450. <div class="input-group HideItems">
  6451. <input id="txt_VenName" type="text" class="form-control HideItems" style="width: 130px;">
  6452. </div>
  6453. </td>
  6454. <td class="HideItems2" style="text-align:right;"><label class="lglabel HideItems2" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;源头单据号</label>:</td>
  6455. <td class="HideItems2">
  6456. <div class="input-group HideItems2">
  6457. <input id="txt_SCode" type="text" class="form-control HideItems2" style="width: 130px;">
  6458. </div>
  6459. </td>
  6460. <td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;日期(从)</label>:</td>
  6461. <td class="HideItemsTime">
  6462. <div class="input-group HideItemsTime">
  6463. <input id="FromTime" name="FromTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(从)" />
  6464. </div>
  6465. </td>
  6466. <td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;日期(到)</label>:</td>
  6467. <td class="HideItemsTime">
  6468. <div class="input-group HideItemsTime">
  6469. <input id="ToTime" name="ToTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(到)" />
  6470. </div>
  6471. </td>
  6472. <td class="HideItems3" style="text-align:right;"><label class="lglabel HideItems3" for="txt_VenInvCode">&nbsp;&nbsp;&nbsp;&nbsp;客户料号</label>:</td>
  6473. <td class="HideItems3">
  6474. <div class="input-group HideItems3">
  6475. <input id="txt_VenInvCode" type="text" class="form-control HideItems3" style="width: 130px;">
  6476. </div>
  6477. </td>
  6478. <td class="HideClassGroup" style="text-align:right;">
  6479. <label>&nbsp;&nbsp;&nbsp;班组:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  6480. </td>
  6481. <td class="HideClassGroup">
  6482. <div class="input-group">
  6483. <select id="selClassGroup" name="F_Target" class="form-control" style="width: 130px;">
  6484. <option value=""></option>
  6485. <option value="风电一组">风电一组</option>
  6486. <option value="风电二组">风电二组</option>
  6487. <option value="数控组">数控组</option>
  6488. <option value="新能源组">新能源组</option>
  6489. <option value="裁线组">裁线组</option>
  6490. <option value="中高压组">中高压组</option>
  6491. <option value="样品组">样品组</option>
  6492. <option value="铜排">铜排</option>
  6493. <option value="风电三组">风电三组</option>
  6494. <option value="风电四组">风电四组</option>
  6495. <option value="机器人线束">机器人线束</option>
  6496. </select>
  6497. </div>
  6498. </td>
  6499. </tr>
  6500. <tr>
  6501. <td style="text-align:right;"><label class="lglabel" for="txt_InvCode">&nbsp;&nbsp;&nbsp;&nbsp;料品编码</label>:</td>
  6502. <td>
  6503. <div class="input-group">
  6504. <input id="txt_InvCode" type="text" class="form-control" style="width: 130px;">
  6505. </div>
  6506. </td>
  6507. <td style="text-align:right;"><label class="lglabel" for="txt_InvName">&nbsp;&nbsp;&nbsp;&nbsp;料品名称</label>:</td>
  6508. <td>
  6509. <div class="input-group">
  6510. <input id="txt_InvName" type="text" class="form-control" style="width: 130px;">
  6511. </div>
  6512. </td>
  6513. <td class="HideItems3" style="text-align:right;"><label class="lglabel HideItems3" for="txt_InvStd">&nbsp;&nbsp;&nbsp;&nbsp;规格型号</label>:</td>
  6514. <td class="HideItems3">
  6515. <div class="input-group HideItems3">
  6516. <input id="txt_InvStd" type="text" class="form-control" style="width: 130px;">
  6517. </div>
  6518. </td>
  6519. <td style="text-align:right;"><label class="lglabel" for="txt_BatchCode">&nbsp;&nbsp;&nbsp;&nbsp;批次号</label>:</td>
  6520. <td>
  6521. <div class="input-group">
  6522. <input id="txt_BatchCode" type="text" class="form-control" style="width: 130px;">
  6523. </div>
  6524. </td>
  6525. <td id="GDLX">
  6526. <label>&nbsp;&nbsp;&nbsp;工单类型:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  6527. </td>
  6528. <td id="GDLX2">
  6529. <div class="input-group">
  6530. <select id="SelGDLX" name="SelShow" class="form-control" style="width: 130px;"></select>
  6531. </div>
  6532. </td>
  6533. </tr>
  6534. <tr>
  6535. <td class="HideWH">
  6536. <label>&nbsp;&nbsp;&nbsp;仓库编码:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  6537. </td>
  6538. <td class="HideWH">
  6539. <div class="input-group HideWH">
  6540. <input id="txt_WHCode" type="text" class="form-control HideWH" style="width: 130px;">
  6541. </div>
  6542. </td>
  6543. <td>
  6544. <label>&nbsp;&nbsp;&nbsp;是否全部生成:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  6545. </td>
  6546. <td>
  6547. <div class="input-group">
  6548. <select id="selShow" name="F_Target" class="form-control" style="width: 130px;">
  6549. <option value="0" selected="selected">显示全部</option>
  6550. <option value="1">已全部生成</option>
  6551. <option value="2">未全部生成</option>
  6552. </select>
  6553. </div>
  6554. </td>
  6555. <td clsaa="Status">
  6556. <label>&nbsp;&nbsp;&nbsp;是否全部入库:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  6557. </td>
  6558. <td clsaa="Status">
  6559. <div class="input-group">
  6560. <select id="selStatus" name="F_Target" class="form-control" style="width: 130px;">
  6561. <option value="0" selected="selected">全部</option>
  6562. <option value="1">未全部入库</option>
  6563. <option value="2">已全部入库</option>
  6564. </select>
  6565. </div>
  6566. </td>
  6567. <td class="HideItems3">
  6568. <label>&nbsp;&nbsp;&nbsp;条码是否打印:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  6569. </td>
  6570. <td class="HideItems3">
  6571. <div class="input-group HideItems3">
  6572. <select id="selPrint" name="selPrint" class="form-control HideItems3" style="width: 130px;">
  6573. <option value="0" selected="selected">显示全部</option>
  6574. <option value="1">已打印</option>
  6575. <option value="2">未打印</option>
  6576. </select>
  6577. </div>
  6578. </td>
  6579. <td>
  6580. <span class="input-group-btn">
  6581. <button id="btn_search" type="button" class="btn btn-primary"><i class="fa fa-search"></i></button>
  6582. </span>
  6583. </td>
  6584. </tr>
  6585. </table>
  6586. </div>
  6587. </div>
  6588. <div class="gridPanel">
  6589. <table id="gridList"></table>
  6590. <div id="gridPager"></div>
  6591. </div>