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.

8104 lines
418 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 != '203') {
  26. $(".HideItemsTime").css('display', 'none');
  27. }
  28. if (Type != '22' && Type != '23' && Type != '2' && Type != '3' && Type != '24' && 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' && Type != '4' && Type != '5' && Type != '7' && Type != '8') {
  35. $(".HideItems3").css('display', 'none');
  36. }
  37. if (Type != '7') {
  38. $(".HideIsUpload").css('display', 'none');
  39. $(".HideItemStauts").css('display', 'none');
  40. }
  41. if (Type == '17') {
  42. Name = "条码号";
  43. $("#POCodeShowLable").text(Name);
  44. } else {
  45. $("#POCodeShowLable").text(Name);
  46. }
  47. if (Type!='3') {
  48. $("#GDLX").css('display', 'none');
  49. $("#GDLX2").css('display', 'none');
  50. $("#NF-Rebind").css('display', 'none');
  51. }
  52. if (Type == '1' || Type == '2' || Type == '3' || Type == '4' || Type == '5' || Type == '6' || Type == '9' || Type == '17') {
  53. $(".HideItems").css('display', 'none');
  54. }
  55. if (Type == '1') {
  56. gridList();
  57. }
  58. if (Type == '2') {
  59. gridList2();
  60. }
  61. if (Type == '3') {
  62. $(".GDLX").css('display', 'block');
  63. Select_SelGDLX();
  64. gridList3();
  65. }
  66. if (Type == '4') {
  67. gridList4();
  68. }
  69. if (Type == '5') {
  70. gridList5();
  71. }
  72. if (Type == '6') {
  73. gridList6();
  74. }
  75. //审核到货单生成条码
  76. if (Type == '7') {
  77. gridList7();
  78. }
  79. //审核委外到货单生成条码
  80. if (Type == '8') {
  81. gridList8();
  82. }
  83. //开立成品入库单生成条码
  84. if (Type == '9') {
  85. gridList9();
  86. }
  87. //审核拒收单生成条码
  88. if (Type == '10') {
  89. gridList10();
  90. }
  91. //审核委外拒收单生成条码
  92. if (Type == '11') {
  93. gridList11();
  94. }
  95. //领料申请退料生成条码
  96. if (Type == '12') {
  97. gridList12();
  98. }
  99. //材料出库退料生成条码
  100. if (Type == '13') {
  101. gridList13();
  102. }
  103. //委外领料申请退料生成条码
  104. if (Type == '14') {
  105. gridList14();
  106. }
  107. //委外材料出库退料生成条码
  108. if (Type == '15') {
  109. gridList15();
  110. }
  111. //返工工单
  112. if (Type == '16') {
  113. gridList16();
  114. }
  115. //不合格条码入库
  116. if (Type == '17') {
  117. gridList17();
  118. }
  119. //副产品
  120. if (Type == '18') {
  121. gridList18();
  122. }
  123. //锐腾两步调入生成条码
  124. if (Type == '20') {
  125. gridList20();
  126. }
  127. //采购入库生成条码
  128. if (Type == '22') {
  129. gridList22();
  130. }
  131. //委外采购入库生成条码
  132. if (Type == '23') {
  133. gridList23();
  134. }
  135. //红字销售出库单
  136. if (Type == '24') {
  137. gridList24();
  138. }
  139. //线边仓调拨申请单生成条码(派纳)
  140. if (Type == '201') {
  141. gridList201();
  142. }
  143. //调拨申请单生成条码
  144. if (Type == '202') {
  145. gridList202();
  146. }
  147. if (Type == '203') {
  148. gridList203();
  149. }
  150. })
  151. function SetCols() {
  152. $.ajax({
  153. url: "/Print/SelectColumnName?" + Math.random(),
  154. dataType: "json",
  155. async: false,
  156. success: function (data) {
  157. var cols = new Array();
  158. var cols1 = new Array();
  159. if (Type == '1') {
  160. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  161. cols.push(collast);
  162. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  163. cols.push(collast);
  164. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  165. cols.push(collast);
  166. var collast = { label: '工单子件', name: 'SourceDetailID', hidden: true, };
  167. cols.push(collast);
  168. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  169. cols.push(collast);
  170. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  171. cols.push(collast);
  172. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  173. cols.push(collast);
  174. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  175. cols.push(collast);
  176. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  177. cols.push(collast);
  178. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  179. cols.push(collast);
  180. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  181. cols.push(collast);
  182. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  183. //cols.push(collast);
  184. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  185. cols.push(collast);
  186. var collast = { label: '工单号', name: 'MOCode', width: 60, align: 'left', };
  187. cols.push(collast);
  188. var collast = { label: '创建日期', name: 'MTIME', width: 60, align: 'left', };
  189. cols.push(collast);
  190. $.ajax({
  191. url: "/Print/SelectTableColumnName?" + Math.random(),
  192. dataType: "json",
  193. async: false,
  194. success: function (data) {
  195. if (data != null && data.length > 0) {
  196. DateList = data;
  197. for (var i = 0; i < data.length; i++) {
  198. var TableCode = data[i].TableCode;
  199. if (TableCode == "ICSMOPick") {
  200. var Code = data[i].Code;
  201. var Name = data[i].Name;
  202. var obj = new Array();
  203. obj = {
  204. label: Name,
  205. name: Code,
  206. width: 80,
  207. align: "left"
  208. }
  209. cols.push(obj);
  210. }
  211. if (TableCode == "ICSInventory") {
  212. var Code = "ICSInventory"+data[i].Code;
  213. var Name = data[i].Name;
  214. var obj = new Array();
  215. obj = {
  216. label: Name,
  217. name: Code,
  218. width: 80,
  219. align: "left"
  220. }
  221. cols.push(obj);
  222. //cols1.push(obj);
  223. }
  224. }
  225. }
  226. _Clos = cols;
  227. //_Clos1 = cols1;
  228. }
  229. });
  230. }
  231. if (Type == '2') {
  232. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  233. cols.push(collast);
  234. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  235. cols.push(collast);
  236. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  237. cols.push(collast);
  238. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  239. cols.push(collast);
  240. var collast = { label: '供应商', name: 'VenName', width: 150, align: 'left' };
  241. cols.push(collast);
  242. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  243. cols.push(collast);
  244. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  245. cols.push(collast);
  246. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  247. cols.push(collast);
  248. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  249. cols.push(collast);
  250. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  251. cols.push(collast);
  252. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  253. cols.push(collast);
  254. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  255. cols.push(collast);
  256. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  257. //cols.push(collast);
  258. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  259. cols.push(collast);
  260. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  261. //cols.push(collast);
  262. $.ajax({
  263. url: "/Print/SelectTableColumnName?" + Math.random(),
  264. dataType: "json",
  265. async: false,
  266. success: function (data) {
  267. if (data != null && data.length > 0) {
  268. DateList = data;
  269. for (var i = 0; i < data.length; i++) {
  270. var TableCode = data[i].TableCode;
  271. if (TableCode == "ICSOApplyNegDetail") {
  272. var Code = data[i].Code;
  273. var Name = data[i].Name;
  274. var obj = new Array();
  275. obj = {
  276. label: Name,
  277. name: Code,
  278. width: 80,
  279. align: "left"
  280. }
  281. cols.push(obj);
  282. }
  283. if (TableCode == "ICSInventory") {
  284. var Code = "ICSInventory" + data[i].Code;
  285. var Name = data[i].Name;
  286. var obj = new Array();
  287. obj = {
  288. label: Name,
  289. name: Code,
  290. width: 80,
  291. align: "left"
  292. }
  293. cols.push(obj);
  294. //cols1.push(obj);
  295. }
  296. }
  297. }
  298. _Clos = cols;
  299. //_Clos1 = cols1;
  300. }
  301. });
  302. }
  303. if (Type == '3') {
  304. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  305. cols.push(collast);
  306. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  307. cols.push(collast);
  308. var collast = { label: '工单行号', name: 'Sequence', width: 50, align: 'left' };
  309. cols.push(collast);
  310. var collast = { label: 'ERP工单行ID', name: 'MODetailID', hidden: true };
  311. cols.push(collast);
  312. var collast = { label: '已入库数量', name: 'RCVQuantity', hidden: true, };
  313. cols.push(collast);
  314. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  315. cols.push(collast);
  316. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  317. cols.push(collast);
  318. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  319. cols.push(collast);
  320. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  321. cols.push(collast);
  322. var collast = { label: '仓库编码', name: 'WHCode', width: 150, align: 'left' };
  323. cols.push(collast);
  324. var collast = { label: '仓库名称', name: 'WHName', width: 150, align: 'left' };
  325. cols.push(collast);
  326. var collast = { label: '工单部门', name: 'DepName', width: 100, align: 'left' };
  327. cols.push(collast);
  328. var collast = { label: '工单创建日期', name: 'CreateDateTime', width: 60, align: 'left', };
  329. cols.push(collast);
  330. var collast = {
  331. label: "状态", name: "MOStatus", width: 60, align: "left",
  332. formatter: function (cellvalue) {
  333. if (cellvalue == "1") {
  334. return "初始";
  335. } else if (cellvalue == "2") {
  336. return "下发";
  337. }
  338. else if (cellvalue == "3") {
  339. return "关单";
  340. }
  341. else { return ""; }
  342. }
  343. };
  344. cols.push(collast);
  345. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  346. cols.push(collast);
  347. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  348. cols.push(collast);
  349. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  350. //cols.push(collast);
  351. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  352. cols.push(collast);
  353. var collast = { label: '已入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  354. cols.push(collast);
  355. var collast = { label: '可入库数量', name: 'ERPNum', width: 100, align: 'left' };
  356. cols.push(collast);
  357. var collast = { label: '工单备注', name: 'MOMemo', width: 100, align: 'left' };
  358. cols.push(collast);
  359. $.ajax({
  360. url: "/Print/SelectTableColumnName?" + Math.random(),
  361. dataType: "json",
  362. async: false,
  363. success: function (data) {
  364. if (data != null && data.length > 0) {
  365. DateList = data;
  366. for (var i = 0; i < data.length; i++) {
  367. var TableCode = data[i].TableCode;
  368. if (TableCode == "ICSMO") {
  369. var Code = data[i].Code;
  370. var Name = data[i].Name;
  371. var obj = new Array();
  372. obj = {
  373. label: Name,
  374. name: Code,
  375. width: 80,
  376. align: "left"
  377. }
  378. cols.push(obj);
  379. }
  380. if (TableCode == "ICSInventory") {
  381. var Code = "ICSInventory" + data[i].Code;
  382. var Name = data[i].Name;
  383. var obj = new Array();
  384. obj = {
  385. label: Name,
  386. name: Code,
  387. width: 80,
  388. align: "left"
  389. }
  390. cols.push(obj);
  391. //cols1.push(obj);
  392. }
  393. }
  394. }
  395. _Clos = cols;
  396. //_Clos1 = cols1;
  397. }
  398. });
  399. }
  400. if (Type == '4') {
  401. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  402. cols.push(collast);
  403. var collast = { label: '单据号', name: 'SDNCode', width: 120, align: 'left' };
  404. cols.push(collast);
  405. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  406. cols.push(collast);
  407. var collast = { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' };
  408. cols.push(collast);
  409. var collast = { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' };
  410. cols.push(collast);
  411. var collast = { label: '客户代码', name: 'CusCode', width: 120, align: 'left' };
  412. cols.push(collast);
  413. var collast = { label: '客户名称', name: 'CusName', width: 50, align: 'left' };
  414. cols.push(collast);
  415. var collast = { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' };
  416. cols.push(collast);
  417. var collast = { label: '已发数量', name: 'SDNQuantity', width: 50, align: 'left' };
  418. cols.push(collast);
  419. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  420. cols.push(collast);
  421. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  422. cols.push(collast);
  423. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  424. cols.push(collast);
  425. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  426. cols.push(collast);
  427. var collast = {
  428. label: "状态", name: "Status", width: 60, align: "left",
  429. formatter: function (cellvalue) {
  430. if (cellvalue == "1") {
  431. return "开立";
  432. } else if (cellvalue == "2") {
  433. return "审核";
  434. }
  435. else if (cellvalue == "3") {
  436. return "关闭";
  437. }
  438. else { return ""; }
  439. }
  440. };
  441. cols.push(collast);
  442. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  443. cols.push(collast);
  444. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  445. cols.push(collast);
  446. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  447. //cols.push(collast);
  448. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  449. cols.push(collast);
  450. $.ajax({
  451. url: "/Print/SelectTableColumnName?" + Math.random(),
  452. dataType: "json",
  453. async: false,
  454. success: function (data) {
  455. if (data != null && data.length > 0) {
  456. DateList = data;
  457. for (var i = 0; i < data.length; i++) {
  458. var TableCode = data[i].TableCode;
  459. if (TableCode == "ICSSDN") {
  460. var Code = data[i].Code;
  461. var Name = data[i].Name;
  462. var obj = new Array();
  463. obj = {
  464. label: Name,
  465. name: Code,
  466. width: 80,
  467. align: "left"
  468. }
  469. cols.push(obj);
  470. }
  471. if (TableCode == "ICSInventory") {
  472. var Code = "ICSInventory" + data[i].Code;
  473. var Name = data[i].Name;
  474. var obj = new Array();
  475. obj = {
  476. label: Name,
  477. name: Code,
  478. width: 80,
  479. align: "left"
  480. }
  481. cols.push(obj);
  482. //cols1.push(obj);
  483. }
  484. }
  485. }
  486. _Clos = cols;
  487. //_Clos1 = cols1;
  488. }
  489. });
  490. }
  491. if (Type == '5') {
  492. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  493. cols.push(collast);
  494. var collast = { label: '单据号', name: 'InCode', width: 120, align: 'left' };
  495. cols.push(collast);
  496. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  497. cols.push(collast);
  498. var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' };
  499. cols.push(collast);
  500. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  501. cols.push(collast);
  502. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  503. cols.push(collast);
  504. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  505. cols.push(collast);
  506. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left' };
  507. cols.push(collast);
  508. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  509. cols.push(collast);
  510. var collast = { label: '收益部门', name: 'EATTRIBUTE4', width: 50, align: 'left' };
  511. cols.push(collast);
  512. var collast = { label: '供应商', name: 'EATTRIBUTE3', width: 50, align: 'left' };
  513. cols.push(collast);
  514. var collast = { label: '项目名称', name: 'EATTRIBUTE8', width: 50, align: 'left' };
  515. cols.push(collast);
  516. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  517. cols.push(collast);
  518. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  519. cols.push(collast);
  520. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  521. cols.push(collast);
  522. var collast = { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', };
  523. cols.push(collast);
  524. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  525. cols.push(collast);
  526. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  527. cols.push(collast);
  528. var collast = { label: '料品失效天数', name: 'EffectiveDays', hidden: true };
  529. cols.push(collast);
  530. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', hidden: true };
  531. cols.push(collast);
  532. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  533. //cols.push(collast);
  534. $.ajax({
  535. url: "/Print/SelectTableColumnName?" + Math.random(),
  536. dataType: "json",
  537. async: false,
  538. success: function (data) {
  539. if (data != null && data.length > 0) {
  540. DateList = data;
  541. for (var i = 0; i < data.length; i++) {
  542. var TableCode = data[i].TableCode;
  543. if (TableCode == "ICSOtherIn") {
  544. var Code = data[i].Code;
  545. var Name = data[i].Name;
  546. var obj = new Array();
  547. obj = {
  548. label: Name,
  549. name: Code,
  550. width: 80,
  551. align: "left"
  552. }
  553. cols.push(obj);
  554. }
  555. if (TableCode == "ICSInventory") {
  556. var Code = "ICSInventory" + data[i].Code;
  557. var Name = data[i].Name;
  558. var obj = new Array();
  559. obj = {
  560. label: Name,
  561. name: Code,
  562. width: 80,
  563. align: "left"
  564. }
  565. cols.push(obj);
  566. //cols1.push(obj);
  567. }
  568. }
  569. }
  570. _Clos = cols;
  571. //_Clos1 = cols1;
  572. }
  573. });
  574. }
  575. if (Type == '6') {
  576. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  577. cols.push(collast);
  578. var collast = { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' };
  579. cols.push(collast);
  580. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  581. cols.push(collast);
  582. var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' };
  583. cols.push(collast);
  584. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  585. cols.push(collast);
  586. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  587. cols.push(collast);
  588. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  589. cols.push(collast);
  590. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  591. cols.push(collast);
  592. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  593. cols.push(collast);
  594. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  595. cols.push(collast);
  596. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  597. cols.push(collast);
  598. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  599. cols.push(collast);
  600. var collast = { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', };
  601. cols.push(collast);
  602. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  603. cols.push(collast);
  604. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  605. cols.push(collast);
  606. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  607. //cols.push(collast);
  608. $.ajax({
  609. url: "/Print/SelectTableColumnName?" + Math.random(),
  610. dataType: "json",
  611. async: false,
  612. success: function (data) {
  613. if (data != null && data.length > 0) {
  614. DateList = data;
  615. for (var i = 0; i < data.length; i++) {
  616. var TableCode = data[i].TableCode;
  617. if (TableCode == "ICSReturn") {
  618. var Code = data[i].Code;
  619. var Name = data[i].Name;
  620. var obj = new Array();
  621. obj = {
  622. label: Name,
  623. name: Code,
  624. width: 80,
  625. align: "left"
  626. }
  627. cols.push(obj);
  628. }
  629. if (TableCode == "ICSInventory") {
  630. var Code = "ICSInventory" + data[i].Code;
  631. var Name = data[i].Name;
  632. var obj = new Array();
  633. obj = {
  634. label: Name,
  635. name: Code,
  636. width: 80,
  637. align: "left"
  638. }
  639. cols.push(obj);
  640. //cols1.push(obj);
  641. }
  642. }
  643. }
  644. _Clos = cols;
  645. //_Clos1 = cols1;
  646. }
  647. });
  648. }
  649. //审核到货单生成条码
  650. if (Type == '7') {
  651. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  652. cols.push(collast);
  653. var collast = { label: '单据号', name: 'DNCode', width: 120, align: 'left' };
  654. cols.push(collast);
  655. var collast = { label: '单据状态', name: 'EATTRIBUTE5', width: 120, align: 'left' };
  656. cols.push(collast);
  657. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  658. cols.push(collast);
  659. var collast = { label: '采购订单号', name: 'POCode', width: 50, align: 'left' };
  660. cols.push(collast);
  661. var collast = { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' };
  662. cols.push(collast);
  663. var collast = { label: '交期', name: 'EATTRIBUTE7', width: 120, align: 'left' };
  664. cols.push(collast);
  665. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  666. cols.push(collast);
  667. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  668. cols.push(collast);
  669. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  670. cols.push(collast);
  671. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  672. cols.push(collast);
  673. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  674. cols.push(collast);
  675. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  676. cols.push(collast);
  677. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  678. cols.push(collast);
  679. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  680. cols.push(collast);
  681. var collast = { label: '计价数量', name: 'EATTRIBUTE30', 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. var collast = { label: '是否无条码物料', name: 'IsSpecialInv', hidden: true };
  704. cols.push(collast);
  705. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  706. cols.push(collast);
  707. $.ajax({
  708. url: "/Print/SelectTableColumnName?" + Math.random(),
  709. dataType: "json",
  710. async: false,
  711. success: function (data) {
  712. if (data != null && data.length > 0) {
  713. DateList = data;
  714. for (var i = 0; i < data.length; i++) {
  715. var TableCode = data[i].TableCode;
  716. if (TableCode == "ICSDeliveryNotice") {
  717. debugger;
  718. var Code = data[i].Code;
  719. var Name = data[i].Name;
  720. var obj = new Array();
  721. obj = {
  722. label: Name,
  723. name: Code,
  724. width: 80,
  725. align: "left"
  726. }
  727. cols.push(obj);
  728. }
  729. if (TableCode == "ICSInventory") {
  730. var Code = "ICSInventory" + data[i].Code;
  731. var Name = data[i].Name;
  732. var obj = new Array();
  733. obj = {
  734. label: Name,
  735. name: Code,
  736. width: 80,
  737. align: "left"
  738. }
  739. cols.push(obj);
  740. //cols1.push(obj);
  741. }
  742. }
  743. }
  744. _Clos = cols;
  745. //_Clos1 = cols1;
  746. }
  747. });
  748. }
  749. //审核委外到货单生成条码
  750. if (Type == '8') {
  751. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  752. cols.push(collast);
  753. var collast = { label: '单据号', name: 'ODNCode', width: 120, align: 'left' };
  754. cols.push(collast);
  755. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  756. cols.push(collast);
  757. var collast = { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' };
  758. cols.push(collast);
  759. var collast = { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' };
  760. cols.push(collast);
  761. var collast = { label: '委外订单表体ID', name: 'OODetailID', hidden: true };
  762. cols.push(collast);
  763. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  764. cols.push(collast);
  765. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  766. cols.push(collast);
  767. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  768. cols.push(collast);
  769. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  770. cols.push(collast);
  771. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  772. cols.push(collast);
  773. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  774. cols.push(collast);
  775. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  776. cols.push(collast);
  777. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  778. cols.push(collast);
  779. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  780. cols.push(collast);
  781. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  782. //cols.push(collast);
  783. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  784. cols.push(collast);
  785. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  786. cols.push(collast);
  787. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  788. cols.push(collast);
  789. var collast = { label: '未入库数量', name: 'NRCVQuantity', width: 60, align: 'left', };
  790. cols.push(collast);
  791. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  792. cols.push(collast);
  793. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  794. cols.push(collast);
  795. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  796. cols.push(collast);
  797. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  798. cols.push(collast);
  799. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  800. cols.push(collast);
  801. $.ajax({
  802. url: "/Print/SelectTableColumnName?" + Math.random(),
  803. dataType: "json",
  804. async: false,
  805. success: function (data) {
  806. if (data != null && data.length > 0) {
  807. DateList = data;
  808. for (var i = 0; i < data.length; i++) {
  809. var TableCode = data[i].TableCode;
  810. if (TableCode == "ICSODeliveryNotice") {
  811. var Code = data[i].Code;
  812. var Name = data[i].Name;
  813. var obj = new Array();
  814. obj = {
  815. label: Name,
  816. name: Code,
  817. width: 80,
  818. align: "left"
  819. }
  820. cols.push(obj);
  821. }
  822. if (TableCode == "ICSInventory") {
  823. var Code = "ICSInventory" + data[i].Code;
  824. var Name = data[i].Name;
  825. var obj = new Array();
  826. obj = {
  827. label: Name,
  828. name: Code,
  829. width: 80,
  830. align: "left"
  831. }
  832. cols.push(obj);
  833. //cols1.push(obj);
  834. }
  835. }
  836. }
  837. _Clos = cols;
  838. //_Clos1 = cols1;
  839. }
  840. });
  841. }
  842. //开立成品入库单生成条码
  843. if (Type == '9') {
  844. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  845. cols.push(collast);
  846. var collast = { label: '单据号', name: 'RCVCode', width: 120, align: 'left' };
  847. cols.push(collast);
  848. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  849. cols.push(collast);
  850. var collast = { label: '源头单据号', name: 'MOCode', width: 50, align: 'left' };
  851. cols.push(collast);
  852. var collast = { label: '仓库号', name: 'WHCode', width: 120, align: 'left' };
  853. cols.push(collast);
  854. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  855. cols.push(collast);
  856. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  857. cols.push(collast);
  858. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  859. cols.push(collast);
  860. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  861. cols.push(collast);
  862. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  863. cols.push(collast);
  864. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  865. cols.push(collast);
  866. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  867. //cols.push(collast);
  868. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  869. cols.push(collast);
  870. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  871. cols.push(collast);
  872. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  873. cols.push(collast);
  874. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  875. cols.push(collast);
  876. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  877. cols.push(collast);
  878. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  879. cols.push(collast);
  880. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  881. cols.push(collast);
  882. $.ajax({
  883. url: "/Print/SelectTableColumnName?" + Math.random(),
  884. dataType: "json",
  885. async: false,
  886. success: function (data) {
  887. if (data != null && data.length > 0) {
  888. DateList = data;
  889. for (var i = 0; i < data.length; i++) {
  890. var TableCode = data[i].TableCode;
  891. if (TableCode == "ICSMO") {
  892. var Code = data[i].Code;
  893. var Name = data[i].Name;
  894. var obj = new Array();
  895. obj = {
  896. label: Name,
  897. name: Code,
  898. width: 80,
  899. align: "left"
  900. }
  901. cols.push(obj);
  902. }
  903. if (TableCode == "ICSInventory") {
  904. var Code = "ICSInventory" + data[i].Code;
  905. var Name = data[i].Name;
  906. var obj = new Array();
  907. obj = {
  908. label: Name,
  909. name: Code,
  910. width: 80,
  911. align: "left"
  912. }
  913. cols.push(obj);
  914. //cols1.push(obj);
  915. }
  916. }
  917. }
  918. _Clos = cols;
  919. //_Clos1 = cols1;
  920. }
  921. });
  922. }
  923. //审核拒收单生成条码
  924. if (Type == '10') {
  925. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  926. cols.push(collast);
  927. var collast = { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' };
  928. cols.push(collast);
  929. var collast = { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' };
  930. cols.push(collast);
  931. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  932. cols.push(collast);
  933. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  934. cols.push(collast);
  935. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  936. cols.push(collast);
  937. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  938. cols.push(collast);
  939. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  940. cols.push(collast);
  941. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  942. cols.push(collast);
  943. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  944. cols.push(collast);
  945. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  946. cols.push(collast);
  947. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  948. cols.push(collast);
  949. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  950. cols.push(collast);
  951. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  952. cols.push(collast);
  953. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  954. cols.push(collast);
  955. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  956. cols.push(collast);
  957. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  958. cols.push(collast);
  959. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  960. cols.push(collast);
  961. $.ajax({
  962. url: "/Print/SelectTableColumnName?" + Math.random(),
  963. dataType: "json",
  964. async: false,
  965. success: function (data) {
  966. if (data != null && data.length > 0) {
  967. DateList = data;
  968. for (var i = 0; i < data.length; i++) {
  969. var TableCode = data[i].TableCode;
  970. if (TableCode == "ICSDeliveryNotice") {
  971. var Code = data[i].Code;
  972. var Name = data[i].Name;
  973. var obj = new Array();
  974. obj = {
  975. label: Name,
  976. name: Code,
  977. width: 80,
  978. align: "left"
  979. }
  980. cols.push(obj);
  981. }
  982. if (TableCode == "ICSInventory") {
  983. var Code = "ICSInventory" + data[i].Code;
  984. var Name = data[i].Name;
  985. var obj = new Array();
  986. obj = {
  987. label: Name,
  988. name: Code,
  989. width: 80,
  990. align: "left"
  991. }
  992. cols.push(obj);
  993. //cols1.push(obj);
  994. }
  995. }
  996. }
  997. _Clos = cols;
  998. //_Clos1 = cols1;
  999. }
  1000. });
  1001. }
  1002. //审核委外拒收单生成条码
  1003. if (Type == '11') {
  1004. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1005. cols.push(collast);
  1006. var collast = { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' };
  1007. cols.push(collast);
  1008. var collast = { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' };
  1009. cols.push(collast);
  1010. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  1011. cols.push(collast);
  1012. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  1013. cols.push(collast);
  1014. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1015. cols.push(collast);
  1016. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  1017. cols.push(collast);
  1018. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  1019. cols.push(collast);
  1020. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  1021. cols.push(collast);
  1022. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  1023. cols.push(collast);
  1024. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1025. cols.push(collast);
  1026. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1027. cols.push(collast);
  1028. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  1029. cols.push(collast);
  1030. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1031. cols.push(collast);
  1032. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  1033. cols.push(collast);
  1034. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  1035. cols.push(collast);
  1036. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  1037. cols.push(collast);
  1038. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  1039. cols.push(collast);
  1040. $.ajax({
  1041. url: "/Print/SelectTableColumnName?" + Math.random(),
  1042. dataType: "json",
  1043. async: false,
  1044. success: function (data) {
  1045. if (data != null && data.length > 0) {
  1046. DateList = data;
  1047. for (var i = 0; i < data.length; i++) {
  1048. var TableCode = data[i].TableCode;
  1049. if (TableCode == "ICSODeliveryNotice") {
  1050. var Code = data[i].Code;
  1051. var Name = data[i].Name;
  1052. var obj = new Array();
  1053. obj = {
  1054. label: Name,
  1055. name: Code,
  1056. width: 80,
  1057. align: "left"
  1058. }
  1059. cols.push(obj);
  1060. }
  1061. if (TableCode == "ICSInventory") {
  1062. var Code = "ICSInventory" + data[i].Code;
  1063. var Name = data[i].Name;
  1064. var obj = new Array();
  1065. obj = {
  1066. label: Name,
  1067. name: Code,
  1068. width: 80,
  1069. align: "left"
  1070. }
  1071. cols.push(obj);
  1072. //cols1.push(obj);
  1073. }
  1074. }
  1075. }
  1076. _Clos = cols;
  1077. //_Clos1 = cols1;
  1078. }
  1079. });
  1080. }
  1081. //领料申请退料生成条码
  1082. if (Type == '12') {
  1083. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1084. cols.push(collast);
  1085. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  1086. cols.push(collast);
  1087. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1088. cols.push(collast);
  1089. var collast = { label: '来源单据号', name: 'SourceCodea', width: 120, align: 'left' };
  1090. cols.push(collast);
  1091. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  1092. cols.push(collast);
  1093. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1094. cols.push(collast);
  1095. var collast = { label: '料品编码', name: 'InvName', width: 150, align: 'left', };
  1096. cols.push(collast);
  1097. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1098. cols.push(collast);
  1099. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1100. cols.push(collast);
  1101. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1102. cols.push(collast);
  1103. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1104. cols.push(collast);
  1105. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1106. cols.push(collast);
  1107. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1108. //cols.push(collast);
  1109. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1110. cols.push(collast);
  1111. $.ajax({
  1112. url: "/Print/SelectTableColumnName?" + Math.random(),
  1113. dataType: "json",
  1114. async: false,
  1115. success: function (data) {
  1116. if (data != null && data.length > 0) {
  1117. DateList = data;
  1118. for (var i = 0; i < data.length; i++) {
  1119. var TableCode = data[i].TableCode;
  1120. if (TableCode == "ICSMOApplyNegDetail") {
  1121. var Code = data[i].Code;
  1122. var Name = data[i].Name;
  1123. var obj = new Array();
  1124. obj = {
  1125. label: Name,
  1126. name: Code,
  1127. width: 80,
  1128. align: "left"
  1129. }
  1130. cols.push(obj);
  1131. }
  1132. if (TableCode == "ICSInventory") {
  1133. var Code = "ICSInventory" + data[i].Code;
  1134. var Name = data[i].Name;
  1135. var obj = new Array();
  1136. obj = {
  1137. label: Name,
  1138. name: Code,
  1139. width: 80,
  1140. align: "left"
  1141. }
  1142. cols.push(obj);
  1143. //cols1.push(obj);
  1144. }
  1145. }
  1146. }
  1147. _Clos = cols;
  1148. //_Clos1 = cols1;
  1149. }
  1150. });
  1151. }
  1152. //材料出库退料生成条码
  1153. if (Type == '13') {
  1154. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1155. cols.push(collast);
  1156. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  1157. cols.push(collast);
  1158. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1159. cols.push(collast);
  1160. var collast = { label: '源头单据号', name: 'SCode', width: 120, align: 'left' };
  1161. cols.push(collast);
  1162. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  1163. cols.push(collast);
  1164. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1165. cols.push(collast);
  1166. var collast = { label: '料品编码', name: 'InvName', width: 150, align: 'left', };
  1167. cols.push(collast);
  1168. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1169. cols.push(collast);
  1170. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1171. cols.push(collast);
  1172. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1173. cols.push(collast);
  1174. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1175. cols.push(collast);
  1176. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1177. cols.push(collast);
  1178. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1179. //cols.push(collast);
  1180. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1181. cols.push(collast);
  1182. var collast = { label: '料品失效天数', name: 'EffectiveDays', hidden: true };
  1183. cols.push(collast);
  1184. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', hidden: true };
  1185. cols.push(collast);
  1186. }
  1187. //委外领料申请退料生成条码
  1188. if (Type == '14') {
  1189. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1190. cols.push(collast);
  1191. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  1192. cols.push(collast);
  1193. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1194. cols.push(collast);
  1195. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  1196. cols.push(collast);
  1197. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1198. cols.push(collast);
  1199. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1200. cols.push(collast);
  1201. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1202. cols.push(collast);
  1203. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1204. cols.push(collast);
  1205. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1206. cols.push(collast);
  1207. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1208. cols.push(collast);
  1209. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1210. cols.push(collast);
  1211. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1212. //cols.push(collast);
  1213. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1214. cols.push(collast);
  1215. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1216. //cols.push(collast);
  1217. $.ajax({
  1218. url: "/Print/SelectTableColumnName?" + Math.random(),
  1219. dataType: "json",
  1220. async: false,
  1221. success: function (data) {
  1222. if (data != null && data.length > 0) {
  1223. DateList = data;
  1224. for (var i = 0; i < data.length; i++) {
  1225. var TableCode = data[i].TableCode;
  1226. if (TableCode == "ICSOApplyNegDetail") {
  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. }
  1238. if (TableCode == "ICSInventory") {
  1239. var Code = "ICSInventory" + data[i].Code;
  1240. var Name = data[i].Name;
  1241. var obj = new Array();
  1242. obj = {
  1243. label: Name,
  1244. name: Code,
  1245. width: 80,
  1246. align: "left"
  1247. }
  1248. cols.push(obj);
  1249. //cols1.push(obj);
  1250. }
  1251. }
  1252. }
  1253. _Clos = cols;
  1254. //_Clos1 = cols1;
  1255. }
  1256. });
  1257. }
  1258. //委外材料出库退料生成条码
  1259. if (Type == '15') {
  1260. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1261. cols.push(collast);
  1262. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  1263. cols.push(collast);
  1264. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1265. cols.push(collast);
  1266. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  1267. cols.push(collast);
  1268. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1269. cols.push(collast);
  1270. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1271. cols.push(collast);
  1272. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1273. cols.push(collast);
  1274. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1275. cols.push(collast);
  1276. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1277. cols.push(collast);
  1278. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1279. cols.push(collast);
  1280. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1281. cols.push(collast);
  1282. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1283. //cols.push(collast);
  1284. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1285. cols.push(collast);
  1286. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1287. //cols.push(collast);
  1288. $.ajax({
  1289. url: "/Print/SelectTableColumnName?" + Math.random(),
  1290. dataType: "json",
  1291. async: false,
  1292. success: function (data) {
  1293. if (data != null && data.length > 0) {
  1294. DateList = data;
  1295. for (var i = 0; i < data.length; i++) {
  1296. var TableCode = data[i].TableCode;
  1297. if (TableCode == "ICSOApplyNegDetail") {
  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. }
  1309. if (TableCode == "ICSInventory") {
  1310. var Code = "ICSInventory" + data[i].Code;
  1311. var Name = data[i].Name;
  1312. var obj = new Array();
  1313. obj = {
  1314. label: Name,
  1315. name: Code,
  1316. width: 80,
  1317. align: "left"
  1318. }
  1319. cols.push(obj);
  1320. //cols1.push(obj);
  1321. }
  1322. }
  1323. }
  1324. _Clos = cols;
  1325. //_Clos1 = cols1;
  1326. }
  1327. });
  1328. }
  1329. //返工工单生成条码
  1330. if (Type == '16') {
  1331. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1332. cols.push(collast);
  1333. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  1334. cols.push(collast);
  1335. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  1336. cols.push(collast);
  1337. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  1338. cols.push(collast);
  1339. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1340. cols.push(collast);
  1341. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1342. cols.push(collast);
  1343. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1344. cols.push(collast);
  1345. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1346. cols.push(collast);
  1347. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  1348. cols.push(collast);
  1349. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1350. cols.push(collast);
  1351. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1352. cols.push(collast);
  1353. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1354. //cols.push(collast);
  1355. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1356. cols.push(collast);
  1357. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1358. //cols.push(collast);
  1359. $.ajax({
  1360. url: "/Print/SelectTableColumnName?" + Math.random(),
  1361. dataType: "json",
  1362. async: false,
  1363. success: function (data) {
  1364. if (data != null && data.length > 0) {
  1365. DateList = data;
  1366. for (var i = 0; i < data.length; i++) {
  1367. var TableCode = data[i].TableCode;
  1368. if (TableCode == "ICSMOPick") {
  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. }
  1380. if (TableCode == "ICSInventory") {
  1381. var Code = "ICSInventory" + data[i].Code;
  1382. var Name = data[i].Name;
  1383. var obj = new Array();
  1384. obj = {
  1385. label: Name,
  1386. name: Code,
  1387. width: 80,
  1388. align: "left"
  1389. }
  1390. cols.push(obj);
  1391. //cols1.push(obj);
  1392. }
  1393. }
  1394. }
  1395. _Clos = cols;
  1396. //_Clos1 = cols1;
  1397. }
  1398. });
  1399. }
  1400. //不合格条码生成条码
  1401. if (Type == '17') {
  1402. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1403. cols.push(collast);
  1404. var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' };
  1405. cols.push(collast);
  1406. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1407. cols.push(collast);
  1408. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1409. cols.push(collast);
  1410. var collast = { label: '不合格数量', name: 'Quantity', width: 100, align: 'left' };
  1411. cols.push(collast);
  1412. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1413. cols.push(collast);
  1414. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1415. cols.push(collast);
  1416. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1417. cols.push(collast);
  1418. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1419. //cols.push(collast);
  1420. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1421. cols.push(collast);
  1422. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1423. //cols.push(collast);
  1424. $.ajax({
  1425. url: "/Print/SelectTableColumnName?" + Math.random(),
  1426. dataType: "json",
  1427. async: false,
  1428. success: function (data) {
  1429. if (data != null && data.length > 0) {
  1430. DateList = data;
  1431. for (var i = 0; i < data.length; i++) {
  1432. var TableCode = data[i].TableCode;
  1433. if (TableCode == "ICSInspection") {
  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. }
  1445. if (TableCode == "ICSInventory") {
  1446. var Code = "ICSInventory" + data[i].Code;
  1447. var Name = data[i].Name;
  1448. var obj = new Array();
  1449. obj = {
  1450. label: Name,
  1451. name: Code,
  1452. width: 80,
  1453. align: "left"
  1454. }
  1455. cols.push(obj);
  1456. //cols1.push(obj);
  1457. }
  1458. }
  1459. }
  1460. _Clos = cols;
  1461. //_Clos1 = cols1;
  1462. }
  1463. });
  1464. }
  1465. //副产品生成条码
  1466. if (Type == '18') {
  1467. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1468. cols.push(collast);
  1469. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  1470. cols.push(collast);
  1471. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  1472. cols.push(collast);
  1473. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  1474. cols.push(collast);
  1475. var collast = { label: '料品编码(子)', name: 'ZInvCode', width: 120, align: 'left' };
  1476. cols.push(collast);
  1477. var collast = { label: '料品编码(母)', name: 'MInvCode', width: 120, align: 'left' };
  1478. cols.push(collast);
  1479. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1480. cols.push(collast);
  1481. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1482. cols.push(collast);
  1483. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1484. cols.push(collast);
  1485. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  1486. cols.push(collast);
  1487. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1488. cols.push(collast);
  1489. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1490. cols.push(collast);
  1491. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1492. //cols.push(collast);
  1493. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1494. cols.push(collast);
  1495. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1496. //cols.push(collast);
  1497. $.ajax({
  1498. url: "/Print/SelectTableColumnName?" + Math.random(),
  1499. dataType: "json",
  1500. async: false,
  1501. success: function (data) {
  1502. if (data != null && data.length > 0) {
  1503. DateList = data;
  1504. for (var i = 0; i < data.length; i++) {
  1505. var TableCode = data[i].TableCode;
  1506. if (TableCode == "ICSMOPick") {
  1507. var Code = data[i].Code;
  1508. var Name = data[i].Name;
  1509. var obj = new Array();
  1510. obj = {
  1511. label: Name,
  1512. name: Code,
  1513. width: 80,
  1514. align: "left"
  1515. }
  1516. cols.push(obj);
  1517. }
  1518. if (TableCode == "ICSInventory") {
  1519. var Code = "ICSInventory" + data[i].Code;
  1520. var Name = data[i].Name;
  1521. var obj = new Array();
  1522. obj = {
  1523. label: Name,
  1524. name: Code,
  1525. width: 80,
  1526. align: "left"
  1527. }
  1528. cols.push(obj);
  1529. //cols1.push(obj);
  1530. }
  1531. }
  1532. }
  1533. _Clos = cols;
  1534. //_Clos1 = cols1;
  1535. }
  1536. });
  1537. }
  1538. //锐腾两步调入生成条码
  1539. if (Type == '20') {
  1540. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1541. cols.push(collast);
  1542. var collast = { label: '调拨单号', name: 'TransferNO', width: 120, align: 'left' };
  1543. cols.push(collast);
  1544. var collast = { label: '调拨单行号', name: 'Sequence', width: 50, align: 'left' };
  1545. cols.push(collast);
  1546. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1547. cols.push(collast);
  1548. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1549. cols.push(collast);
  1550. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1551. cols.push(collast);
  1552. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1553. cols.push(collast);
  1554. var collast = { label: '已调入数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1555. cols.push(collast);
  1556. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1557. cols.push(collast);
  1558. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1559. cols.push(collast);
  1560. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1561. //cols.push(collast);
  1562. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1563. cols.push(collast);
  1564. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1565. //cols.push(collast);
  1566. $.ajax({
  1567. url: "/Print/SelectTableColumnName?" + Math.random(),
  1568. dataType: "json",
  1569. async: false,
  1570. success: function (data) {
  1571. if (data != null && data.length > 0) {
  1572. DateList = data;
  1573. for (var i = 0; i < data.length; i++) {
  1574. var TableCode = data[i].TableCode;
  1575. if (TableCode == "ICSMOPick") {
  1576. var Code = data[i].Code;
  1577. var Name = data[i].Name;
  1578. var obj = new Array();
  1579. obj = {
  1580. label: Name,
  1581. name: Code,
  1582. width: 80,
  1583. align: "left"
  1584. }
  1585. cols.push(obj);
  1586. }
  1587. if (TableCode == "ICSInventory") {
  1588. var Code = "ICSInventory" + data[i].Code;
  1589. var Name = data[i].Name;
  1590. var obj = new Array();
  1591. obj = {
  1592. label: Name,
  1593. name: Code,
  1594. width: 80,
  1595. align: "left"
  1596. }
  1597. cols.push(obj);
  1598. //cols1.push(obj);
  1599. }
  1600. }
  1601. }
  1602. _Clos = cols;
  1603. //_Clos1 = cols1;
  1604. }
  1605. });
  1606. }
  1607. //采购入库生成条码
  1608. if (Type == '22') {
  1609. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1610. cols.push(collast);
  1611. var collast = { label: '入库单号', name: 'RCVCode', width: 120, align: 'left' };
  1612. cols.push(collast);
  1613. var collast = { label: '入库单行号', name: 'Sequence', width: 50, align: 'left' };
  1614. cols.push(collast);
  1615. var collast = { label: '采购订单号', name: 'SourceCode', width: 50, align: 'left' };
  1616. cols.push(collast);
  1617. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1618. cols.push(collast);
  1619. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1620. cols.push(collast);
  1621. var collast = { label: '规格型号', name: 'InvStd', width: 150, align: 'left', };
  1622. cols.push(collast);
  1623. var collast = { label: '供应商', name: 'VenName', width: 150, align: 'left', };
  1624. cols.push(collast);
  1625. var collast = { label: '采购员', name: 'F_RealName', width: 150, align: 'left', };
  1626. cols.push(collast);
  1627. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1628. cols.push(collast);
  1629. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1630. cols.push(collast);
  1631. var collast = { label: '已入数量', name: 'RCVQuantity', width: 100, align: 'left' };
  1632. cols.push(collast);
  1633. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1634. //cols.push(collast);
  1635. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1636. cols.push(collast);
  1637. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1638. //cols.push(collast);
  1639. $.ajax({
  1640. url: "/Print/SelectTableColumnName?" + Math.random(),
  1641. dataType: "json",
  1642. async: false,
  1643. success: function (data) {
  1644. if (data != null && data.length > 0) {
  1645. DateList = data;
  1646. for (var i = 0; i < data.length; i++) {
  1647. var TableCode = data[i].TableCode;
  1648. if (TableCode == "ICSPurchaseReceive") {
  1649. var Code = data[i].Code;
  1650. var Name = data[i].Name;
  1651. var obj = new Array();
  1652. obj = {
  1653. label: Name,
  1654. name: Code,
  1655. width: 80,
  1656. align: "left"
  1657. }
  1658. cols.push(obj);
  1659. }
  1660. if (TableCode == "ICSInventory") {
  1661. var Code = "ICSInventory" + data[i].Code;
  1662. var Name = data[i].Name;
  1663. var obj = new Array();
  1664. obj = {
  1665. label: Name,
  1666. name: Code,
  1667. width: 80,
  1668. align: "left"
  1669. }
  1670. cols.push(obj);
  1671. //cols1.push(obj);
  1672. }
  1673. }
  1674. }
  1675. _Clos = cols;
  1676. //_Clos1 = cols1;
  1677. }
  1678. });
  1679. }
  1680. //采购入库生成条码
  1681. if (Type == '23') {
  1682. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1683. cols.push(collast);
  1684. var collast = { label: '委外入库单号', name: 'RCVCode', width: 120, align: 'left' };
  1685. cols.push(collast);
  1686. var collast = { label: '委外入库单行号', name: 'Sequence', width: 50, align: 'left' };
  1687. cols.push(collast);
  1688. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1689. cols.push(collast);
  1690. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1691. cols.push(collast);
  1692. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1693. cols.push(collast);
  1694. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1695. cols.push(collast);
  1696. var collast = { label: '已入数量', name: 'RCVQuantity', width: 100, align: 'left' };
  1697. cols.push(collast);
  1698. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1699. //cols.push(collast);
  1700. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1701. cols.push(collast);
  1702. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1703. //cols.push(collast);
  1704. $.ajax({
  1705. url: "/Print/SelectTableColumnName?" + Math.random(),
  1706. dataType: "json",
  1707. async: false,
  1708. success: function (data) {
  1709. if (data != null && data.length > 0) {
  1710. DateList = data;
  1711. for (var i = 0; i < data.length; i++) {
  1712. var TableCode = data[i].TableCode;
  1713. if (TableCode == "ICSOutsourcingReceive") {
  1714. var Code = data[i].Code;
  1715. var Name = data[i].Name;
  1716. var obj = new Array();
  1717. obj = {
  1718. label: Name,
  1719. name: Code,
  1720. width: 80,
  1721. align: "left"
  1722. }
  1723. cols.push(obj);
  1724. }
  1725. if (TableCode == "ICSInventory") {
  1726. var Code = "ICSInventory" + data[i].Code;
  1727. var Name = data[i].Name;
  1728. var obj = new Array();
  1729. obj = {
  1730. label: Name,
  1731. name: Code,
  1732. width: 80,
  1733. align: "left"
  1734. }
  1735. cols.push(obj);
  1736. //cols1.push(obj);
  1737. }
  1738. }
  1739. }
  1740. _Clos = cols;
  1741. //_Clos1 = cols1;
  1742. }
  1743. });
  1744. }
  1745. //红字销售单出库生成条码
  1746. if (Type == '24') {
  1747. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1748. cols.push(collast);
  1749. var collast = { label: '单据号', name: 'SSDCode', width: 120, align: 'left' };
  1750. cols.push(collast);
  1751. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  1752. cols.push(collast);
  1753. var collast = { label: '客户编码', name: 'CusCode', width: 120, align: 'left' };
  1754. cols.push(collast);
  1755. var collast = { label: '客户名称', name: 'CusName', width: 120, align: 'left' };
  1756. cols.push(collast);
  1757. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1758. cols.push(collast);
  1759. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  1760. cols.push(collast);
  1761. var collast = { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' };
  1762. cols.push(collast);
  1763. var collast = { label: '退货日期', name: 'CreateDateTime', width: 150, align: 'left' };
  1764. cols.push(collast);
  1765. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  1766. cols.push(collast);
  1767. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  1768. cols.push(collast);
  1769. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  1770. cols.push(collast);
  1771. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  1772. cols.push(collast);
  1773. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1774. cols.push(collast);
  1775. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1776. //cols.push(collast);
  1777. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  1778. cols.push(collast);
  1779. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1780. cols.push(collast);
  1781. var collast = { label: '入库数量', name: 'SSDQuantity', width: 60, align: 'left', };
  1782. cols.push(collast);
  1783. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  1784. cols.push(collast);
  1785. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  1786. cols.push(collast);
  1787. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  1788. cols.push(collast);
  1789. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  1790. cols.push(collast);
  1791. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  1792. cols.push(collast);
  1793. $.ajax({
  1794. url: "/Print/SelectTableColumnName?" + Math.random(),
  1795. dataType: "json",
  1796. async: false,
  1797. success: function (data) {
  1798. if (data != null && data.length > 0) {
  1799. DateList = data;
  1800. for (var i = 0; i < data.length; i++) {
  1801. var TableCode = data[i].TableCode;
  1802. if (TableCode == "ICSSSD") {
  1803. debugger;
  1804. var Code = data[i].Code;
  1805. var Name = data[i].Name;
  1806. var obj = new Array();
  1807. obj = {
  1808. label: Name,
  1809. name: Code,
  1810. width: 80,
  1811. align: "left"
  1812. }
  1813. cols.push(obj);
  1814. }
  1815. if (TableCode == "ICSInventory") {
  1816. var Code = "ICSInventory" + data[i].Code;
  1817. var Name = data[i].Name;
  1818. var obj = new Array();
  1819. obj = {
  1820. label: Name,
  1821. name: Code,
  1822. width: 80,
  1823. align: "left"
  1824. }
  1825. cols.push(obj);
  1826. //cols1.push(obj);
  1827. }
  1828. }
  1829. }
  1830. _Clos = cols;
  1831. //_Clos1 = cols1;
  1832. }
  1833. });
  1834. }
  1835. //派纳线边仓调拨申请单生成条码
  1836. if (Type == '201') {
  1837. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1838. cols.push(collast);
  1839. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1840. cols.push(collast);
  1841. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1842. cols.push(collast);
  1843. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  1844. cols.push(collast);
  1845. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  1846. cols.push(collast);
  1847. var collast = { label: '调出仓库', name: 'FromWHName', width: 100, align: 'left', };
  1848. cols.push(collast);
  1849. var collast = { label: '调入仓库', name: 'ToWHName', width: 100, align: 'left', };
  1850. cols.push(collast);
  1851. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1852. cols.push(collast);
  1853. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1854. cols.push(collast);
  1855. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1856. cols.push(collast);
  1857. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1858. //cols.push(collast);
  1859. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1860. cols.push(collast);
  1861. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1862. //cols.push(collast);
  1863. $.ajax({
  1864. url: "/Print/SelectTableColumnName?" + Math.random(),
  1865. dataType: "json",
  1866. async: false,
  1867. success: function (data) {
  1868. if (data != null && data.length > 0) {
  1869. DateList = data;
  1870. for (var i = 0; i < data.length; i++) {
  1871. var TableCode = data[i].TableCode;
  1872. if (TableCode == "ICSTransferApplication") {
  1873. var Code = data[i].Code;
  1874. var Name = data[i].Name;
  1875. var obj = new Array();
  1876. obj = {
  1877. label: Name,
  1878. name: Code,
  1879. width: 80,
  1880. align: "left"
  1881. }
  1882. cols.push(obj);
  1883. }
  1884. if (TableCode == "ICSInventory") {
  1885. var Code = "ICSInventory" + data[i].Code;
  1886. var Name = data[i].Name;
  1887. var obj = new Array();
  1888. obj = {
  1889. label: Name,
  1890. name: Code,
  1891. width: 80,
  1892. align: "left"
  1893. }
  1894. cols.push(obj);
  1895. //cols1.push(obj);
  1896. }
  1897. }
  1898. }
  1899. _Clos = cols;
  1900. //_Clos1 = cols1;
  1901. }
  1902. });
  1903. }
  1904. //调拨申请单生成条码
  1905. if (Type == '202') {
  1906. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1907. cols.push(collast);
  1908. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1909. cols.push(collast);
  1910. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1911. cols.push(collast);
  1912. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1913. cols.push(collast);
  1914. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1915. cols.push(collast);
  1916. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1917. cols.push(collast);
  1918. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1919. cols.push(collast);
  1920. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1921. cols.push(collast);
  1922. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1923. //cols.push(collast);
  1924. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1925. cols.push(collast);
  1926. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1927. //cols.push(collast);
  1928. $.ajax({
  1929. url: "/Print/SelectTableColumnName?" + Math.random(),
  1930. dataType: "json",
  1931. async: false,
  1932. success: function (data) {
  1933. if (data != null && data.length > 0) {
  1934. DateList = data;
  1935. for (var i = 0; i < data.length; i++) {
  1936. var TableCode = data[i].TableCode;
  1937. if (TableCode == "ICSTransferApplication") {
  1938. var Code = data[i].Code;
  1939. var Name = data[i].Name;
  1940. var obj = new Array();
  1941. obj = {
  1942. label: Name,
  1943. name: Code,
  1944. width: 80,
  1945. align: "left"
  1946. }
  1947. cols.push(obj);
  1948. }
  1949. if (TableCode == "ICSInventory") {
  1950. var Code = "ICSInventory" + data[i].Code;
  1951. var Name = data[i].Name;
  1952. var obj = new Array();
  1953. obj = {
  1954. label: Name,
  1955. name: Code,
  1956. width: 80,
  1957. align: "left"
  1958. }
  1959. cols.push(obj);
  1960. //cols1.push(obj);
  1961. }
  1962. }
  1963. }
  1964. _Clos = cols;
  1965. //_Clos1 = cols1;
  1966. }
  1967. });
  1968. }
  1969. //一步调入单生成条码
  1970. if (Type == '203') {
  1971. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1972. cols.push(collast);
  1973. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1974. cols.push(collast);
  1975. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1976. cols.push(collast);
  1977. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1978. cols.push(collast);
  1979. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1980. cols.push(collast);
  1981. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1982. cols.push(collast);
  1983. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1984. cols.push(collast);
  1985. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1986. cols.push(collast);
  1987. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1988. //cols.push(collast);
  1989. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1990. cols.push(collast);
  1991. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1992. //cols.push(collast);
  1993. $.ajax({
  1994. url: "/Print/SelectTableColumnName?" + Math.random(),
  1995. dataType: "json",
  1996. async: false,
  1997. success: function (data) {
  1998. if (data != null && data.length > 0) {
  1999. DateList = data;
  2000. for (var i = 0; i < data.length; i++) {
  2001. var TableCode = data[i].TableCode;
  2002. if (TableCode == "ICSTransferApplication") {
  2003. var Code = data[i].Code;
  2004. var Name = data[i].Name;
  2005. var obj = new Array();
  2006. obj = {
  2007. label: Name,
  2008. name: Code,
  2009. width: 80,
  2010. align: "left"
  2011. }
  2012. cols.push(obj);
  2013. }
  2014. if (TableCode == "ICSInventory") {
  2015. var Code = "ICSInventory" + data[i].Code;
  2016. var Name = data[i].Name;
  2017. var obj = new Array();
  2018. obj = {
  2019. label: Name,
  2020. name: Code,
  2021. width: 80,
  2022. align: "left"
  2023. }
  2024. cols.push(obj);
  2025. //cols1.push(obj);
  2026. }
  2027. }
  2028. }
  2029. _Clos = cols;
  2030. //_Clos1 = cols1;
  2031. }
  2032. });
  2033. }
  2034. if (Type=='17') {
  2035. var cols1 = new Array();
  2036. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  2037. cols1.push(collast1);
  2038. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  2039. cols1.push(collast1);
  2040. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  2041. cols1.push(collast1);
  2042. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  2043. cols1.push(collast1);
  2044. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  2045. cols1.push(collast1);
  2046. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  2047. cols1.push(collast1);
  2048. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  2049. cols1.push(collast1);
  2050. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  2051. cols1.push(collast1);
  2052. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  2053. cols1.push(collast1);
  2054. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  2055. cols1.push(collast1);
  2056. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  2057. cols1.push(collast1);
  2058. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  2059. cols1.push(collast1);
  2060. var collast1 = { label: '是否打印', name: 'isPrint', width: 150, align: 'left' };
  2061. cols1.push(collast1);
  2062. }
  2063. else if (Type == '7')
  2064. {
  2065. var cols1 = new Array();
  2066. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  2067. cols1.push(collast1);
  2068. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  2069. cols1.push(collast1);
  2070. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  2071. cols1.push(collast1);
  2072. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  2073. cols1.push(collast1);
  2074. var collast1 = { label: '项目号', name: 'ProjectCode', width: 80, align: 'left' };
  2075. cols1.push(collast1);
  2076. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  2077. cols1.push(collast1);
  2078. var collast1 = { label: '批号', name: 'BatchCode', width: 80, align: 'left' };
  2079. cols1.push(collast1);
  2080. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  2081. cols1.push(collast1);
  2082. //var collast1 = { label: '炉批号', name: 'EATTRIBUTE4', width: 100, align: 'left' };
  2083. //cols1.push(collast1);
  2084. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  2085. cols1.push(collast1);
  2086. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  2087. cols1.push(collast1);
  2088. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  2089. cols1.push(collast1);
  2090. var collast1 = { label: '备注', name: 'EATTRIBUTE5', width: 100, align: 'left' };
  2091. cols1.push(collast1);
  2092. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  2093. cols1.push(collast1);
  2094. var collast1 = { label: '是否检验', name: 'isInspection', width: 100, align: 'left' };
  2095. cols1.push(collast1);
  2096. var collast1 = { label: '免检', name: 'isExemption', width: 100, align: 'left' };
  2097. cols1.push(collast1);
  2098. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  2099. cols1.push(collast1);
  2100. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  2101. cols1.push(collast1);
  2102. var collast1 = { label: '是否打印', name: 'isPrint', width: 150, align: 'left' };
  2103. cols1.push(collast1);
  2104. var collast1 = { label: '是否上传立库', name: 'isUpload', width: 150, align: 'left' };
  2105. cols1.push(collast1);
  2106. }
  2107. else {
  2108. var cols1 = new Array();
  2109. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  2110. cols1.push(collast1);
  2111. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  2112. cols1.push(collast1);
  2113. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  2114. cols1.push(collast1);
  2115. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  2116. cols1.push(collast1);
  2117. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  2118. cols1.push(collast1);
  2119. var collast1 = { label: '批号', name: 'BatchCode', width: 80, align: 'left' };
  2120. cols1.push(collast1);
  2121. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  2122. cols1.push(collast1);
  2123. //var collast1 = { label: '炉批号', name: 'EATTRIBUTE4', width: 100, align: 'left' };
  2124. //cols1.push(collast1);
  2125. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  2126. cols1.push(collast1);
  2127. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  2128. cols1.push(collast1);
  2129. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  2130. cols1.push(collast1);
  2131. var collast1 = { label: '备注', name: 'EATTRIBUTE5', width: 100, align: 'left' };
  2132. cols1.push(collast1);
  2133. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  2134. cols1.push(collast1);
  2135. var collast1 = { label: '是否检验', name: 'isInspection', width: 100, align: 'left' };
  2136. cols1.push(collast1);
  2137. var collast1 = { label: '免检', name: 'isExemption', width: 100, align: 'left' };
  2138. cols1.push(collast1);
  2139. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  2140. cols1.push(collast1);
  2141. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  2142. cols1.push(collast1);
  2143. var collast1 = { label: '是否打印', name: 'isPrint', width: 150, align: 'left' };
  2144. cols1.push(collast1);
  2145. }
  2146. if (data != null && data.length > 0) {
  2147. DateList = data;
  2148. for (var i = 0; i < data.length; i++) {
  2149. var ColName = data[i].ColName;
  2150. var ColCode = data[i].ColCode;
  2151. var obj = new Array();
  2152. obj = {
  2153. label: ColName,
  2154. name: ColCode,
  2155. width: 80,
  2156. align: "left"
  2157. }
  2158. cols.push(obj);
  2159. cols1.push(obj);
  2160. }
  2161. }
  2162. _Clos = cols;
  2163. _Clos1 = cols1;
  2164. }
  2165. });
  2166. }
  2167. //生产退料
  2168. function gridList() {
  2169. var $gridList = $("#gridList");
  2170. var queryJson = {
  2171. POCode: $("#txt_POCode").val(),
  2172. InvCode: $("#txt_InvCode").val(),
  2173. InvName: $("#txt_InvName").val(),
  2174. BatchCode: $("#txt_BatchCode").val(),
  2175. FromTime: $("#FromTime").val(),
  2176. ToTime: $("#ToTime").val(),
  2177. POStatus: $("#selShow").val()
  2178. }
  2179. $gridList.dataGrid({
  2180. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJson" + "?" + Math.random(),
  2181. postData: { queryJson: JSON.stringify(queryJson) },
  2182. height: $(window).height() - 200,
  2183. width: $(window).width() - 300,
  2184. colModel: _Clos,
  2185. //colModel: [
  2186. // { label: "主键", name: "ID", hidden: true, key: true },
  2187. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  2188. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2189. // { label: '工单子件', name: 'SourceDetailID', hidden: true, },
  2190. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2191. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  2192. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2193. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2194. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2195. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2196. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2197. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2198. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2199. //],
  2200. //colModel: ColModelMain,
  2201. width: "100%",
  2202. autowidth: true,
  2203. //shrinkToFit: true,
  2204. gridComplete: function () {
  2205. },
  2206. pager: "#gridPager",
  2207. sortname: " MTIME desc ,ApplyNegCode asc,REPLICATE('0',10-len(Sequence))+Sequence  ",
  2208. // sortname: 'ApplyNegCode ',
  2209. //let str = `He said, "It's a 'beautiful' day."`,
  2210. //sortorder: "asc",
  2211. viewrecords: true,
  2212. multiselect: true,
  2213. //beforeSelectRow: function (rowid, e) {
  2214. // $("#gridList").jqGrid('resetSelection');
  2215. // return (true);
  2216. //},
  2217. subGrid: true, // (1)开启子表格支持
  2218. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2219. $("#gridList").jqGrid("setSelection", rowid, false);
  2220. bindSubGrid(subgrid_id, rowid)
  2221. }
  2222. });
  2223. $("#warehouse a.btn-default").click(function () {
  2224. $("#warehouse a.btn-default").removeClass("active");
  2225. $(this).addClass("active");
  2226. $('#btn_search').trigger("click");
  2227. });
  2228. $("#btn_search").click(function () {
  2229. var warehouse = $("#warehouse a.active").attr('data-value');
  2230. var queryJson = {
  2231. POCode: $("#txt_POCode").val(),
  2232. InvCode: $("#txt_InvCode").val(),
  2233. InvName: $("#txt_InvName").val(),
  2234. BatchCode: $("#txt_BatchCode").val(),
  2235. FromTime: $("#FromTime").val(),
  2236. ToTime: $("#ToTime").val(),
  2237. POStatus: $("#selShow").val()
  2238. }
  2239. $gridList.jqGrid('setGridParam', {
  2240. postData: { queryJson: JSON.stringify(queryJson) },
  2241. }).trigger('reloadGrid');
  2242. });
  2243. }
  2244. function bindSubGrid(subgrid_id, rowid) {
  2245. $("#gridList").jqGrid("setSelection", rowid, false);
  2246. var subgrid_table_id;
  2247. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2248. var subgrid_pager_id;
  2249. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2250. // (5)动态添加子报表的table和pager
  2251. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2252. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  2253. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2254. // (6)创建jqGrid对象
  2255. $("#" + subgrid_table_id).dataGrid({
  2256. cellEdit: true,
  2257. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2258. //colModel: [
  2259. // { label: "主键", name: "ID", hidden: true, key: true },
  2260. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2261. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2262. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2263. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2264. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2265. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2266. //],
  2267. colModel: _Clos1,
  2268. //colModel: ColModelSub,
  2269. shrinkToFit: true,//宽度自适应
  2270. multiselect: true,
  2271. prmNames: { search: "search" },
  2272. viewrecords: true,
  2273. height: "100%",
  2274. rowNum: 20,
  2275. pager: subgrid_pager_id,
  2276. });
  2277. }
  2278. //委外退料
  2279. function gridList2() {
  2280. var $gridList = $("#gridList");
  2281. var queryJson = {
  2282. POCode: $("#txt_POCode").val(),
  2283. InvCode: $("#txt_InvCode").val(),
  2284. InvName: $("#txt_InvName").val(),
  2285. BatchCode: $("#txt_BatchCode").val(),
  2286. FromTime: $("#FromTime").val(),
  2287. ToTime: $("#ToTime").val(),
  2288. WHCode: $("#txt_WHCode").val(),
  2289. POStatus: $("#selShow").val()
  2290. }
  2291. $gridList.dataGrid({
  2292. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonWeiWai" + "?" + Math.random(),
  2293. postData: { queryJson: JSON.stringify(queryJson) },
  2294. height: $(window).height() - 200,
  2295. width: $(window).width() - 300,
  2296. colModel: _Clos,
  2297. //colModel: [
  2298. // { label: "主键", name: "ID", hidden: true, key: true },
  2299. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  2300. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2301. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  2302. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2303. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  2304. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2305. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2306. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2307. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2308. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2309. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2310. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2311. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2312. //],
  2313. //colModel: ColModelMain,
  2314. width: "100%",
  2315. autowidth: true,
  2316. //shrinkToFit: true,
  2317. gridComplete: function () {
  2318. },
  2319. pager: "#gridPager",
  2320. // sortname: 'OApplyNegCode,cast(Sequence as int)',
  2321. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2322. sortorder: "asc",
  2323. viewrecords: true,
  2324. multiselect: true,
  2325. //beforeSelectRow: function (rowid, e) {
  2326. // $("#gridList").jqGrid('resetSelection');
  2327. // return (true);
  2328. //},
  2329. subGrid: true, // (1)开启子表格支持
  2330. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2331. $("#gridList").jqGrid("setSelection", rowid, false);
  2332. bindSubGrid2(subgrid_id, rowid)
  2333. }
  2334. });
  2335. $("#warehouse a.btn-default").click(function () {
  2336. $("#warehouse a.btn-default").removeClass("active");
  2337. $(this).addClass("active");
  2338. $('#btn_search').trigger("click");
  2339. });
  2340. $("#btn_search").click(function () {
  2341. var warehouse = $("#warehouse a.active").attr('data-value');
  2342. var queryJson = {
  2343. POCode: $("#txt_POCode").val(),
  2344. InvCode: $("#txt_InvCode").val(),
  2345. InvName: $("#txt_InvName").val(),
  2346. BatchCode: $("#txt_BatchCode").val(),
  2347. FromTime: $("#FromTime").val(),
  2348. ToTime: $("#ToTime").val(),
  2349. WHCode: $("#txt_WHCode").val(),
  2350. POStatus: $("#selShow").val()
  2351. }
  2352. $gridList.jqGrid('setGridParam', {
  2353. postData: { queryJson: JSON.stringify(queryJson) },
  2354. }).trigger('reloadGrid');
  2355. });
  2356. }
  2357. function bindSubGrid2(subgrid_id, rowid) {
  2358. $("#gridList").jqGrid("setSelection", rowid, false);
  2359. var subgrid_table_id;
  2360. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2361. var subgrid_pager_id;
  2362. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2363. // (5)动态添加子报表的table和pager
  2364. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2365. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  2366. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2367. // (6)创建jqGrid对象
  2368. $("#" + subgrid_table_id).dataGrid({
  2369. cellEdit: true,
  2370. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2371. //colModel: [
  2372. // { label: "主键", name: "ID", hidden: true, key: true },
  2373. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2374. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2375. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2376. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2377. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2378. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2379. //],
  2380. colModel: _Clos1,
  2381. //colModel: ColModelSub,
  2382. shrinkToFit: true,//宽度自适应
  2383. multiselect: true,
  2384. prmNames: { search: "search" },
  2385. viewrecords: true,
  2386. height: "100%",
  2387. rowNum: 20,
  2388. pager: subgrid_pager_id,
  2389. });
  2390. }
  2391. //成品
  2392. function gridList3() {
  2393. var $gridList = $("#gridList");
  2394. var queryJson = {
  2395. POCode: $("#txt_POCode").val(),
  2396. InvCode: $("#txt_InvCode").val(),
  2397. InvName: $("#txt_InvName").val(),
  2398. BatchCode: $("#txt_BatchCode").val(),
  2399. FromTime: $("#FromTime").val(),
  2400. ToTime: $("#ToTime").val(),
  2401. WHCode: $("#txt_WHCode").val(),
  2402. POStatus: $("#selShow").val(),
  2403. SelGDLX: $("#SelGDLX option:checked").val(),
  2404. WHStatus: $("#selStatus").val(),
  2405. InvStd: $("#txt_InvStd").val(),
  2406. }
  2407. $gridList.dataGrid({
  2408. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonChengPing" + "?" + Math.random(),
  2409. postData: { queryJson: JSON.stringify(queryJson) },
  2410. height: $(window).height() - 200,
  2411. width: $(window).width() - 300,
  2412. colModel: _Clos,
  2413. //colModel: [
  2414. // { label: "主键", name: "ID", hidden: true, key: true },
  2415. // { label: '工单号', name: 'MOCode', width: 120, align: 'left' },
  2416. // { label: '工单行号', name: 'Sequence', width: 50, align: 'left' },
  2417. // { label: '已入库数量', name: 'RCVQuantity', hidden: true, },
  2418. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2419. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  2420. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2421. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2422. // {
  2423. // label: "状态", name: "MOStatus", width: 60, align: "left",
  2424. // formatter: function (cellvalue) {
  2425. // if (cellvalue == "1") {
  2426. // return "初始";
  2427. // } else if (cellvalue == "2") {
  2428. // return "下发";
  2429. // }
  2430. // else if (cellvalue == "3") {
  2431. // return "关单";
  2432. // }
  2433. // else { return ""; }
  2434. // }
  2435. // },
  2436. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2437. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2438. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2439. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2440. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2441. // { label: '可入库数量', name: 'ERPNum', width: 100, align: 'left' },
  2442. //],
  2443. //colModel: ColModelMain,
  2444. width: "100%",
  2445. autowidth: true,
  2446. //shrinkToFit: true,
  2447. gridComplete: function () {
  2448. },
  2449. pager: "#gridPager",
  2450. //sortname: 'MOCode,cast(Sequence as int)',
  2451. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2452. sortorder: "asc",
  2453. viewrecords: true,
  2454. multiselect: true,
  2455. //beforeSelectRow: function (rowid, e) {
  2456. // $("#gridList").jqGrid('resetSelection');
  2457. // return (true);
  2458. //},
  2459. subGrid: true, // (1)开启子表格支持
  2460. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2461. $("#gridList").jqGrid("setSelection", rowid, false);
  2462. bindSubGrid3(subgrid_id, rowid)
  2463. }
  2464. });
  2465. $("#warehouse a.btn-default").click(function () {
  2466. $("#warehouse a.btn-default").removeClass("active");
  2467. $(this).addClass("active");
  2468. $('#btn_search').trigger("click");
  2469. });
  2470. $("#btn_search").click(function () {
  2471. var warehouse = $("#warehouse a.active").attr('data-value');
  2472. var queryJson = {
  2473. POCode: $("#txt_POCode").val(),
  2474. InvCode: $("#txt_InvCode").val(),
  2475. InvName: $("#txt_InvName").val(),
  2476. BatchCode: $("#txt_BatchCode").val(),
  2477. FromTime: $("#FromTime").val(),
  2478. ToTime: $("#ToTime").val(),
  2479. WHCode: $("#txt_WHCode").val(),
  2480. POStatus: $("#selShow").val(),
  2481. SelGDLX: $("#SelGDLX option:checked").val(),
  2482. WHStatus: $("#selStatus").val(),
  2483. InvStd: $("#txt_InvStd").val(),
  2484. }
  2485. $gridList.jqGrid('setGridParam', {
  2486. postData: { queryJson: JSON.stringify(queryJson) },
  2487. }).trigger('reloadGrid');
  2488. });
  2489. }
  2490. function bindSubGrid3(subgrid_id, rowid) {
  2491. $("#gridList").jqGrid("setSelection", rowid, false);
  2492. var subgrid_table_id;
  2493. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2494. var subgrid_pager_id;
  2495. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2496. // (5)动态添加子报表的table和pager
  2497. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2498. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  2499. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2500. var isPrint = $("#selPrint").val();
  2501. // (6)创建jqGrid对象
  2502. $("#" + subgrid_table_id).dataGrid({
  2503. cellEdit: true,
  2504. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2505. //colModel: [
  2506. // { label: "主键", name: "ID", hidden: true, key: true },
  2507. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2508. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2509. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2510. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2511. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2512. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2513. //],
  2514. colModel: _Clos1,
  2515. sortname: "LotNo ",
  2516. sortorder: "desc",
  2517. //colModel: ColModelSub,
  2518. shrinkToFit: true,//宽度自适应
  2519. multiselect: true,
  2520. prmNames: { search: "search" },
  2521. viewrecords: true,
  2522. height: "100%",
  2523. rowNum: 20,
  2524. pager: subgrid_pager_id,
  2525. });
  2526. }
  2527. //销售退货
  2528. function gridList4() {
  2529. var $gridList = $("#gridList");
  2530. var queryJson = {
  2531. POCode: $("#txt_POCode").val(),
  2532. InvCode: $("#txt_InvCode").val(),
  2533. InvName: $("#txt_InvName").val(),
  2534. BatchCode: $("#txt_BatchCode").val(),
  2535. POStatus: $("#selShow").val()
  2536. }
  2537. $gridList.dataGrid({
  2538. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonXiaoShou" + "?" + Math.random(),
  2539. postData: { queryJson: JSON.stringify(queryJson) },
  2540. height: $(window).height() - 200,
  2541. width: $(window).width() - 300,
  2542. colModel: _Clos,
  2543. //colModel: [
  2544. // { label: "主键", name: "ID", hidden: true, key: true },
  2545. // { label: '单据号', name: 'SDNCode', width: 120, align: 'left' },
  2546. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2547. // { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' },
  2548. // { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' },
  2549. // { label: '客户代码', name: 'CusCode', width: 120, align: 'left' },
  2550. // { label: '客户名称', name: 'CusName', width: 50, align: 'left' },
  2551. // { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' },
  2552. // { label: '已发数量', name: 'SDNQuantity', width: 50, align: 'left' },
  2553. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2554. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  2555. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2556. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2557. // {
  2558. // label: "状态", name: "Status", width: 60, align: "left",
  2559. // formatter: function (cellvalue) {
  2560. // if (cellvalue == "1") {
  2561. // return "开立";
  2562. // } else if (cellvalue == "2") {
  2563. // return "审核";
  2564. // }
  2565. // else if (cellvalue == "3") {
  2566. // return "关闭";
  2567. // }
  2568. // else { return ""; }
  2569. // }
  2570. // },
  2571. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2572. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2573. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2574. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2575. //],
  2576. //colModel: ColModelMain,
  2577. width: "100%",
  2578. autowidth: true,
  2579. //shrinkToFit: true,
  2580. gridComplete: function () {
  2581. },
  2582. pager: "#gridPager",
  2583. // sortname: 'SDNCode,cast(Sequence as int)',
  2584. sortname: "SDNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2585. sortorder: "asc",
  2586. viewrecords: true,
  2587. multiselect: true,
  2588. //beforeSelectRow: function (rowid, e) {
  2589. // $("#gridList").jqGrid('resetSelection');
  2590. // return (true);
  2591. //},
  2592. subGrid: true, // (1)开启子表格支持
  2593. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2594. $("#gridList").jqGrid("setSelection", rowid, false);
  2595. bindSubGrid4(subgrid_id, rowid)
  2596. }
  2597. });
  2598. $("#warehouse a.btn-default").click(function () {
  2599. $("#warehouse a.btn-default").removeClass("active");
  2600. $(this).addClass("active");
  2601. $('#btn_search').trigger("click");
  2602. });
  2603. $("#btn_search").click(function () {
  2604. var warehouse = $("#warehouse a.active").attr('data-value');
  2605. var queryJson = {
  2606. POCode: $("#txt_POCode").val(),
  2607. InvCode: $("#txt_InvCode").val(),
  2608. InvName: $("#txt_InvName").val(),
  2609. BatchCode: $("#txt_BatchCode").val(),
  2610. POStatus: $("#selShow").val()
  2611. }
  2612. $gridList.jqGrid('setGridParam', {
  2613. postData: { queryJson: JSON.stringify(queryJson) },
  2614. }).trigger('reloadGrid');
  2615. });
  2616. }
  2617. function bindSubGrid4(subgrid_id, rowid) {
  2618. $("#gridList").jqGrid("setSelection", rowid, false);
  2619. var subgrid_table_id;
  2620. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2621. var subgrid_pager_id;
  2622. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2623. // (5)动态添加子报表的table和pager
  2624. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2625. var SDNCode = $("#gridList").jqGrid('getRowData', rowid).SDNCode;
  2626. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2627. var isPrint = $("#selPrint").val();
  2628. // (6)创建jqGrid对象
  2629. $("#" + subgrid_table_id).dataGrid({
  2630. cellEdit: true,
  2631. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SDNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2632. //colModel: [
  2633. // { label: "主键", name: "ID", hidden: true, key: true },
  2634. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2635. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2636. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2637. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2638. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2639. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2640. //],
  2641. colModel: _Clos1,
  2642. //colModel: ColModelSub,
  2643. shrinkToFit: true,//宽度自适应
  2644. multiselect: true,
  2645. prmNames: { search: "search" },
  2646. viewrecords: true,
  2647. height: "100%",
  2648. rowNum: 20,
  2649. pager: subgrid_pager_id,
  2650. });
  2651. }
  2652. //其它入库生成条码
  2653. function gridList5() {
  2654. var $gridList = $("#gridList");
  2655. var queryJson = {
  2656. POCode: $("#txt_POCode").val(),
  2657. InvCode: $("#txt_InvCode").val(),
  2658. InvName: $("#txt_InvName").val(),
  2659. BatchCode: $("#txt_BatchCode").val(),
  2660. FromTime: $("#FromTime").val(),
  2661. ToTime: $("#ToTime").val(),
  2662. WHCode: $("#txt_WHCode").val(),
  2663. POStatus: $("#selShow").val(),
  2664. InvStd: $("#txt_InvStd").val(),
  2665. }
  2666. $gridList.dataGrid({
  2667. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonQiTa" + "?" + Math.random(),
  2668. postData: { queryJson: JSON.stringify(queryJson) },
  2669. height: $(window).height() - 200,
  2670. width: $(window).width() - 300,
  2671. colModel: _Clos,
  2672. //colModel: [
  2673. // { label: "主键", name: "ID", hidden: true, key: true },
  2674. // { label: '单据号', name: 'InCode', width: 120, align: 'left' },
  2675. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2676. // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' },
  2677. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2678. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2679. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2680. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2681. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2682. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2683. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2684. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2685. // { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', },
  2686. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2687. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2688. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2689. //],
  2690. //colModel: ColModelMain,
  2691. width: "100%",
  2692. autowidth: true,
  2693. //shrinkToFit: true,
  2694. gridComplete: function () {
  2695. },
  2696. pager: "#gridPager",
  2697. sortname: 'InCode',
  2698. sortorder: "asc",
  2699. viewrecords: true,
  2700. multiselect: true,
  2701. //beforeSelectRow: function (rowid, e) {
  2702. // $("#gridList").jqGrid('resetSelection');
  2703. // return (true);
  2704. //},
  2705. subGrid: true, // (1)开启子表格支持
  2706. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2707. $("#gridList").jqGrid("setSelection", rowid, false);
  2708. bindSubGrid5(subgrid_id, rowid)
  2709. }
  2710. });
  2711. $("#warehouse a.btn-default").click(function () {
  2712. $("#warehouse a.btn-default").removeClass("active");
  2713. $(this).addClass("active");
  2714. $('#btn_search').trigger("click");
  2715. });
  2716. $("#btn_search").click(function () {
  2717. var warehouse = $("#warehouse a.active").attr('data-value');
  2718. var queryJson = {
  2719. POCode: $("#txt_POCode").val(),
  2720. InvCode: $("#txt_InvCode").val(),
  2721. InvName: $("#txt_InvName").val(),
  2722. BatchCode: $("#txt_BatchCode").val(),
  2723. FromTime: $("#FromTime").val(),
  2724. ToTime: $("#ToTime").val(),
  2725. WHCode: $("#txt_WHCode").val(),
  2726. POStatus: $("#selShow").val(),
  2727. InvStd: $("#txt_InvStd").val(),
  2728. }
  2729. $gridList.jqGrid('setGridParam', {
  2730. postData: { queryJson: JSON.stringify(queryJson) },
  2731. }).trigger('reloadGrid');
  2732. });
  2733. }
  2734. function bindSubGrid5(subgrid_id, rowid) {
  2735. $("#gridList").jqGrid("setSelection", rowid, false);
  2736. var subgrid_table_id;
  2737. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2738. var subgrid_pager_id;
  2739. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2740. // (5)动态添加子报表的table和pager
  2741. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2742. var InCode = $("#gridList").jqGrid('getRowData', rowid).InCode;
  2743. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2744. var isPrint = $("#selPrint").val();
  2745. // (6)创建jqGrid对象
  2746. $("#" + subgrid_table_id).dataGrid({
  2747. cellEdit: true,
  2748. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + InCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2749. //colModel: [
  2750. // { label: "主键", name: "ID", hidden: true, key: true },
  2751. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2752. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2753. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2754. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2755. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2756. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2757. //],
  2758. colModel: _Clos1,
  2759. //colModel: ColModelSub,
  2760. shrinkToFit: true,//宽度自适应
  2761. multiselect: true,
  2762. prmNames: { search: "search" },
  2763. viewrecords: true,
  2764. height: "100%",
  2765. rowNum: 20,
  2766. pager: subgrid_pager_id,
  2767. });
  2768. }
  2769. //归还单生成条码
  2770. function gridList6() {
  2771. var $gridList = $("#gridList");
  2772. var queryJson = {
  2773. POCode: $("#txt_POCode").val(),
  2774. InvCode: $("#txt_InvCode").val(),
  2775. InvName: $("#txt_InvName").val(),
  2776. BatchCode: $("#txt_BatchCode").val(),
  2777. POStatus: $("#selShow").val()
  2778. }
  2779. $gridList.dataGrid({
  2780. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonGuiHuan" + "?" + Math.random(),
  2781. postData: { queryJson: JSON.stringify(queryJson) },
  2782. height: $(window).height() - 200,
  2783. width: $(window).width() - 300,
  2784. colModel: _Clos,
  2785. //colModel: [
  2786. // { label: "主键", name: "ID", hidden: true, key: true },
  2787. // { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' },
  2788. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2789. // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' },
  2790. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2791. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2792. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2793. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2794. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2795. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2796. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2797. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2798. // { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', },
  2799. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2800. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2801. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2802. //],
  2803. //colModel: ColModelMain,
  2804. width: "100%",
  2805. autowidth: true,
  2806. //shrinkToFit: true,
  2807. gridComplete: function () {
  2808. },
  2809. pager: "#gridPager",
  2810. /// sortname: 'ReturnCode,cast(Sequence as int)',
  2811. sortname: "ReturnCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2812. sortorder: "asc",
  2813. viewrecords: true,
  2814. multiselect: true,
  2815. //beforeSelectRow: function (rowid, e) {
  2816. // $("#gridList").jqGrid('resetSelection');
  2817. // return (true);
  2818. //},
  2819. subGrid: true, // (1)开启子表格支持
  2820. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2821. $("#gridList").jqGrid("setSelection", rowid, false);
  2822. bindSubGrid6(subgrid_id, rowid)
  2823. }
  2824. });
  2825. $("#warehouse a.btn-default").click(function () {
  2826. $("#warehouse a.btn-default").removeClass("active");
  2827. $(this).addClass("active");
  2828. $('#btn_search').trigger("click");
  2829. });
  2830. $("#btn_search").click(function () {
  2831. var warehouse = $("#warehouse a.active").attr('data-value');
  2832. var queryJson = {
  2833. POCode: $("#txt_POCode").val(),
  2834. InvCode: $("#txt_InvCode").val(),
  2835. InvName: $("#txt_InvName").val(),
  2836. BatchCode: $("#txt_BatchCode").val(),
  2837. POStatus: $("#selShow").val()
  2838. }
  2839. $gridList.jqGrid('setGridParam', {
  2840. postData: { queryJson: JSON.stringify(queryJson) },
  2841. }).trigger('reloadGrid');
  2842. });
  2843. }
  2844. function bindSubGrid6(subgrid_id, rowid) {
  2845. $("#gridList").jqGrid("setSelection", rowid, false);
  2846. var subgrid_table_id;
  2847. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2848. var subgrid_pager_id;
  2849. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2850. // (5)动态添加子报表的table和pager
  2851. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2852. var ReturnCode = $("#gridList").jqGrid('getRowData', rowid).ReturnCode;
  2853. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2854. // (6)创建jqGrid对象
  2855. $("#" + subgrid_table_id).dataGrid({
  2856. cellEdit: true,
  2857. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ReturnCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2858. //colModel: [
  2859. // { label: "主键", name: "ID", hidden: true, key: true },
  2860. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2861. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2862. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2863. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2864. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2865. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2866. //],
  2867. colModel: _Clos1,
  2868. //colModel: ColModelSub,
  2869. shrinkToFit: true,//宽度自适应
  2870. multiselect: true,
  2871. prmNames: { search: "search" },
  2872. viewrecords: true,
  2873. height: "100%",
  2874. rowNum: 20,
  2875. pager: subgrid_pager_id,
  2876. });
  2877. }
  2878. //*审核到货单生成条码
  2879. function gridList7() {
  2880. var $gridList = $("#gridList");
  2881. var queryJson = {
  2882. POCode: $("#txt_POCode").val(),
  2883. VenCode: $("#txt_VenCode").val(),
  2884. VenName: $("#txt_VenName").val(),
  2885. InvCode: $("#txt_InvCode").val(),
  2886. InvName: $("#txt_InvName").val(),
  2887. BatchCode: $("#txt_BatchCode").val(),
  2888. POStatus: $("#selShow").val(),
  2889. WHStatus: $("#selStatus").val(),
  2890. InvStd: $("#txt_InvStd").val(),
  2891. isUpload: $("#selIsUpLoad").val(),
  2892. U9Status: $("#selU9Status").val(),
  2893. }
  2894. $gridList.dataGrid({
  2895. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonSHDH" + "?" + Math.random(),
  2896. postData: { queryJson: JSON.stringify(queryJson) },
  2897. height: $(window).height() - 200,
  2898. width: $(window).width() - 300,
  2899. colModel: _Clos,
  2900. //colModel: [
  2901. // { label: "主键", name: "ID", hidden: true, key: true },
  2902. // { label: '单据号', name: 'DNCode', width: 120, align: 'left' },
  2903. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2904. // { label: '采购订单号', name: 'POCode', width: 50, align: 'left' },
  2905. // { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' },
  2906. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  2907. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  2908. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2909. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2910. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2911. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2912. // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' },
  2913. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2914. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2915. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2916. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2917. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  2918. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  2919. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2920. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2921. //],
  2922. //colModel: ColModelMain,
  2923. width: "100%",
  2924. autowidth: true,
  2925. //shrinkToFit: true,
  2926. gridComplete: function () {
  2927. },
  2928. pager: "#gridPager",
  2929. //sortname: 'DNCode,cast(Sequence as int)',
  2930. sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2931. sortorder: "asc",
  2932. viewrecords: true,
  2933. multiselect: true,
  2934. //beforeSelectRow: function (rowid, e) {
  2935. // $("#gridList").jqGrid('resetSelection');
  2936. // return (true);
  2937. //},
  2938. subGrid: true, // (1)开启子表格支持
  2939. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2940. $("#gridList").jqGrid("setSelection", rowid, false);
  2941. bindSubGrid7(subgrid_id, rowid)
  2942. }
  2943. });
  2944. $("#warehouse a.btn-default").click(function () {
  2945. $("#warehouse a.btn-default").removeClass("active");
  2946. $(this).addClass("active");
  2947. $('#btn_search').trigger("click");
  2948. });
  2949. $("#btn_search").click(function () {
  2950. var warehouse = $("#warehouse a.active").attr('data-value');
  2951. var queryJson = {
  2952. POCode: $("#txt_POCode").val(),
  2953. VenCode: $("#txt_VenCode").val(),
  2954. VenName: $("#txt_VenName").val(),
  2955. InvCode: $("#txt_InvCode").val(),
  2956. InvName: $("#txt_InvName").val(),
  2957. BatchCode: $("#txt_BatchCode").val(),
  2958. POStatus: $("#selShow").val(),
  2959. WHStatus: $("#selStatus").val(),
  2960. InvStd: $("#txt_InvStd").val(),
  2961. U9Status: $("#selU9Status").val(),
  2962. }
  2963. $gridList.jqGrid('setGridParam', {
  2964. postData: { queryJson: JSON.stringify(queryJson) },
  2965. }).trigger('reloadGrid');
  2966. });
  2967. }
  2968. function bindSubGrid7(subgrid_id, rowid) {
  2969. $("#gridList").jqGrid("setSelection", rowid, false);
  2970. var subgrid_table_id;
  2971. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2972. var subgrid_pager_id;
  2973. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2974. // (5)动态添加子报表的table和pager
  2975. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2976. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  2977. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2978. var isPrint = $("#selPrint").val();
  2979. var isUpload = $("#selIsUpLoad").val();
  2980. // (6)创建jqGrid对象
  2981. $("#" + subgrid_table_id).dataGrid({
  2982. cellEdit: true,
  2983. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJsonLiKu?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&isUpload="+isUpload+ "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2984. //colModel: [
  2985. // { label: "主键", name: "ID", hidden: true, key: true },
  2986. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2987. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2988. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2989. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2990. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2991. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2992. //],
  2993. colModel: _Clos1,
  2994. //colModel: ColModelSub,
  2995. sortname: "LotNo ",
  2996. sortorder: "desc",
  2997. shrinkToFit: true,//宽度自适应
  2998. multiselect: true,
  2999. prmNames: { search: "search" },
  3000. viewrecords: true,
  3001. height: "100%",
  3002. rowNum: 20,
  3003. pager: subgrid_pager_id,
  3004. });
  3005. }
  3006. //审核委外到货单生成条码
  3007. function gridList8() {
  3008. var $gridList = $("#gridList");
  3009. var queryJson = {
  3010. POCode: $("#txt_POCode").val(),
  3011. VenCode: $("#txt_VenCode").val(),
  3012. VenName: $("#txt_VenName").val(),
  3013. InvCode: $("#txt_InvCode").val(),
  3014. InvName: $("#txt_InvName").val(),
  3015. BatchCode: $("#txt_BatchCode").val(),
  3016. POStatus: $("#selShow").val(),
  3017. WHStatus: $("#selStatus").val(),
  3018. InvStd: $("#txt_InvStd").val(),
  3019. }
  3020. $gridList.dataGrid({
  3021. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonWWSHDH" + "?" + Math.random(),
  3022. postData: { queryJson: JSON.stringify(queryJson) },
  3023. height: $(window).height() - 200,
  3024. width: $(window).width() - 300,
  3025. colModel: _Clos,
  3026. //colModel: [
  3027. // { label: "主键", name: "ID", hidden: true, key: true },
  3028. // { label: '单据号', name: 'ODNCode', width: 120, align: 'left' },
  3029. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  3030. // { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' },
  3031. // { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' },
  3032. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  3033. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  3034. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  3035. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  3036. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3037. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3038. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  3039. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3040. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3041. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3042. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3043. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3044. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  3045. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3046. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3047. //],
  3048. //colModel: ColModelMain,
  3049. width: "100%",
  3050. autowidth: true,
  3051. //shrinkToFit: true,
  3052. gridComplete: function () {
  3053. },
  3054. pager: "#gridPager",
  3055. //sortname: 'ODNCode,cast(Sequence as int)',
  3056. sortname: "ODNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3057. sortorder: "asc",
  3058. viewrecords: true,
  3059. multiselect: true,
  3060. //beforeSelectRow: function (rowid, e) {
  3061. // $("#gridList").jqGrid('resetSelection');
  3062. // return (true);
  3063. //},
  3064. subGrid: true, // (1)开启子表格支持
  3065. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3066. $("#gridList").jqGrid("setSelection", rowid, false);
  3067. bindSubGrid8(subgrid_id, rowid)
  3068. }
  3069. });
  3070. $("#warehouse a.btn-default").click(function () {
  3071. $("#warehouse a.btn-default").removeClass("active");
  3072. $(this).addClass("active");
  3073. $('#btn_search').trigger("click");
  3074. });
  3075. $("#btn_search").click(function () {
  3076. var warehouse = $("#warehouse a.active").attr('data-value');
  3077. var queryJson = {
  3078. POCode: $("#txt_POCode").val(),
  3079. VenCode: $("#txt_VenCode").val(),
  3080. VenName: $("#txt_VenName").val(),
  3081. InvCode: $("#txt_InvCode").val(),
  3082. InvName: $("#txt_InvName").val(),
  3083. BatchCode: $("#txt_BatchCode").val(),
  3084. POStatus: $("#selShow").val(),
  3085. WHStatus: $("#selStatus").val(),
  3086. InvStd: $("#txt_InvStd").val(),
  3087. }
  3088. $gridList.jqGrid('setGridParam', {
  3089. postData: { queryJson: JSON.stringify(queryJson) },
  3090. }).trigger('reloadGrid');
  3091. });
  3092. }
  3093. function bindSubGrid8(subgrid_id, rowid) {
  3094. $("#gridList").jqGrid("setSelection", rowid, false);
  3095. var subgrid_table_id;
  3096. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3097. var subgrid_pager_id;
  3098. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3099. // (5)动态添加子报表的table和pager
  3100. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3101. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).ODNCode;
  3102. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3103. var isPrint = $("#selPrint").val();
  3104. // (6)创建jqGrid对象
  3105. $("#" + subgrid_table_id).dataGrid({
  3106. cellEdit: true,
  3107. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3108. //colModel: [
  3109. // { label: "主键", name: "ID", hidden: true, key: true },
  3110. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3111. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3112. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3113. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3114. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3115. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3116. //],
  3117. colModel: _Clos1,
  3118. //colModel: ColModelSub,
  3119. sortname: "LotNo ",
  3120. sortorder: "desc",
  3121. shrinkToFit: true,//宽度自适应
  3122. multiselect: true,
  3123. prmNames: { search: "search" },
  3124. viewrecords: true,
  3125. height: "100%",
  3126. rowNum: 20,
  3127. pager: subgrid_pager_id,
  3128. });
  3129. }
  3130. //开立得成品入库单 生成条码
  3131. function gridList9() {
  3132. var $gridList = $("#gridList");
  3133. var queryJson = {
  3134. POCode: $("#txt_POCode").val(),
  3135. InvCode: $("#txt_InvCode").val(),
  3136. InvName: $("#txt_InvName").val(),
  3137. BatchCode: $("#txt_BatchCode").val(),
  3138. POStatus: $("#selShow").val(),
  3139. SCode: $("#txt_SCode").val(),
  3140. }
  3141. $gridList.dataGrid({
  3142. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonKLCPRK" + "?" + Math.random(),
  3143. postData: { queryJson: JSON.stringify(queryJson) },
  3144. height: $(window).height() - 200,
  3145. width: $(window).width() - 300,
  3146. colModel: _Clos,
  3147. //colModel: [
  3148. // { label: "主键", name: "ID", hidden: true, key: true },
  3149. // { label: '单据号', name: 'RCVCode', width: 120, align: 'left' },
  3150. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  3151. // { label: '仓库号', name: 'WHCode', width: 120, align: 'left' },
  3152. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  3153. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  3154. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3155. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3156. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  3157. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3158. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3159. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3160. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3161. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3162. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3163. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3164. //],
  3165. //colModel: ColModelMain,
  3166. width: "100%",
  3167. autowidth: true,
  3168. //shrinkToFit: true,
  3169. gridComplete: function () {
  3170. },
  3171. pager: "#gridPager",
  3172. //sortname: 'RCVCode,cast(Sequence as int)',
  3173. sortname: "RCVCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3174. sortorder: "asc",
  3175. viewrecords: true,
  3176. multiselect: true,
  3177. //beforeSelectRow: function (rowid, e) {
  3178. // $("#gridList").jqGrid('resetSelection');
  3179. // return (true);
  3180. //},
  3181. subGrid: true, // (1)开启子表格支持
  3182. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3183. $("#gridList").jqGrid("setSelection", rowid, false);
  3184. bindSubGrid9(subgrid_id, rowid)
  3185. }
  3186. });
  3187. $("#warehouse a.btn-default").click(function () {
  3188. $("#warehouse a.btn-default").removeClass("active");
  3189. $(this).addClass("active");
  3190. $('#btn_search').trigger("click");
  3191. });
  3192. $("#btn_search").click(function () {
  3193. var warehouse = $("#warehouse a.active").attr('data-value');
  3194. var queryJson = {
  3195. POCode: $("#txt_POCode").val(),
  3196. InvCode: $("#txt_InvCode").val(),
  3197. InvName: $("#txt_InvName").val(),
  3198. BatchCode: $("#txt_BatchCode").val(),
  3199. POStatus: $("#selShow").val(),
  3200. SCode: $("#txt_SCode").val(),
  3201. }
  3202. $gridList.jqGrid('setGridParam', {
  3203. postData: { queryJson: JSON.stringify(queryJson) },
  3204. }).trigger('reloadGrid');
  3205. });
  3206. }
  3207. function bindSubGrid9(subgrid_id, rowid) {
  3208. $("#gridList").jqGrid("setSelection", rowid, false);
  3209. var subgrid_table_id;
  3210. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3211. var subgrid_pager_id;
  3212. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3213. // (5)动态添加子报表的table和pager
  3214. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3215. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  3216. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3217. // (6)创建jqGrid对象
  3218. $("#" + subgrid_table_id).dataGrid({
  3219. cellEdit: true,
  3220. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3221. //colModel: [
  3222. // { label: "主键", name: "ID", hidden: true, key: true },
  3223. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3224. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3225. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3226. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3227. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3228. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3229. //],
  3230. colModel: _Clos1,
  3231. //colModel: ColModelSub,
  3232. shrinkToFit: true,//宽度自适应
  3233. multiselect: true,
  3234. prmNames: { search: "search" },
  3235. viewrecords: true,
  3236. height: "100%",
  3237. rowNum: 20,
  3238. pager: subgrid_pager_id,
  3239. });
  3240. }
  3241. //采购拒收单
  3242. function gridList10() {
  3243. var $gridList = $("#gridList");
  3244. var queryJson = {
  3245. POCode: $("#txt_POCode").val(),
  3246. VenCode: $("#txt_VenCode").val(),
  3247. VenName: $("#txt_VenName").val(),
  3248. InvCode: $("#txt_InvCode").val(),
  3249. InvName: $("#txt_InvName").val(),
  3250. BatchCode: $("#txt_BatchCode").val(),
  3251. POStatus: $("#selShow").val()
  3252. }
  3253. $gridList.dataGrid({
  3254. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonJSD" + "?" + Math.random(),
  3255. postData: { queryJson: JSON.stringify(queryJson) },
  3256. height: $(window).height() - 200,
  3257. width: $(window).width() - 300,
  3258. colModel: _Clos,
  3259. //colModel: [
  3260. // { label: "主键", name: "ID", hidden: true, key: true },
  3261. // { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' },
  3262. // { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' },
  3263. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  3264. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  3265. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  3266. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  3267. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3268. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3269. // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' },
  3270. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3271. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3272. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3273. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3274. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3275. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  3276. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3277. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3278. //],
  3279. //colModel: ColModelMain,
  3280. width: "100%",
  3281. autowidth: true,
  3282. //shrinkToFit: true,
  3283. gridComplete: function () {
  3284. },
  3285. pager: "#gridPager",
  3286. //sortname: 'DNCode,cast(Sequence as int)',
  3287. sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3288. sortorder: "asc",
  3289. viewrecords: true,
  3290. multiselect: true,
  3291. //beforeSelectRow: function (rowid, e) {
  3292. // $("#gridList").jqGrid('resetSelection');
  3293. // return (true);
  3294. //},
  3295. subGrid: true, // (1)开启子表格支持
  3296. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3297. $("#gridList").jqGrid("setSelection", rowid, false);
  3298. bindSubGrid10(subgrid_id, rowid)
  3299. }
  3300. });
  3301. $("#warehouse a.btn-default").click(function () {
  3302. $("#warehouse a.btn-default").removeClass("active");
  3303. $(this).addClass("active");
  3304. $('#btn_search').trigger("click");
  3305. });
  3306. $("#btn_search").click(function () {
  3307. var warehouse = $("#warehouse a.active").attr('data-value');
  3308. var queryJson = {
  3309. POCode: $("#txt_POCode").val(),
  3310. VenCode: $("#txt_VenCode").val(),
  3311. VenName: $("#txt_VenName").val(),
  3312. InvCode: $("#txt_InvCode").val(),
  3313. InvName: $("#txt_InvName").val(),
  3314. BatchCode: $("#txt_BatchCode").val(),
  3315. POStatus: $("#selShow").val()
  3316. }
  3317. $gridList.jqGrid('setGridParam', {
  3318. postData: { queryJson: JSON.stringify(queryJson) },
  3319. }).trigger('reloadGrid');
  3320. });
  3321. }
  3322. function bindSubGrid10(subgrid_id, rowid) {
  3323. $("#gridList").jqGrid("setSelection", rowid, false);
  3324. var subgrid_table_id;
  3325. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3326. var subgrid_pager_id;
  3327. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3328. // (5)动态添加子报表的table和pager
  3329. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3330. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  3331. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3332. // (6)创建jqGrid对象
  3333. $("#" + subgrid_table_id).dataGrid({
  3334. cellEdit: true,
  3335. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3336. //colModel: [
  3337. // { label: "主键", name: "ID", hidden: true, key: true },
  3338. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3339. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3340. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3341. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3342. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3343. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3344. //],
  3345. colModel: _Clos1,
  3346. //colModel: ColModelSub,
  3347. shrinkToFit: true,//宽度自适应
  3348. multiselect: true,
  3349. prmNames: { search: "search" },
  3350. viewrecords: true,
  3351. height: "100%",
  3352. rowNum: 20,
  3353. pager: subgrid_pager_id,
  3354. });
  3355. }
  3356. //委外拒收单生成条码
  3357. function gridList11() {
  3358. var $gridList = $("#gridList");
  3359. var queryJson = {
  3360. POCode: $("#txt_POCode").val(),
  3361. VenCode: $("#txt_VenCode").val(),
  3362. VenName: $("#txt_VenName").val(),
  3363. InvCode: $("#txt_InvCode").val(),
  3364. InvName: $("#txt_InvName").val(),
  3365. BatchCode: $("#txt_BatchCode").val(),
  3366. POStatus: $("#selShow").val()
  3367. }
  3368. $gridList.dataGrid({
  3369. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonWWJSD" + "?" + Math.random(),
  3370. postData: { queryJson: JSON.stringify(queryJson) },
  3371. height: $(window).height() - 200,
  3372. width: $(window).width() - 300,
  3373. colModel: _Clos,
  3374. //colModel: [
  3375. // { label: "主键", name: "ID", hidden: true, key: true },
  3376. // { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' },
  3377. // { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' },
  3378. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  3379. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  3380. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  3381. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  3382. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3383. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3384. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  3385. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3386. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3387. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3388. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3389. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3390. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  3391. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3392. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3393. //],
  3394. //colModel: ColModelMain,
  3395. width: "100%",
  3396. autowidth: true,
  3397. //shrinkToFit: true,
  3398. gridComplete: function () {
  3399. },
  3400. pager: "#gridPager",
  3401. // sortname: 'OOCode,cast(Sequence as int)',
  3402. sortname: "OOCode,REPLICATE('0',10-len(OOSequence))+OOSequence ",
  3403. sortorder: "asc",
  3404. viewrecords: true,
  3405. multiselect: true,
  3406. //beforeSelectRow: function (rowid, e) {
  3407. // $("#gridList").jqGrid('resetSelection');
  3408. // return (true);
  3409. //},
  3410. subGrid: true, // (1)开启子表格支持
  3411. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3412. $("#gridList").jqGrid("setSelection", rowid, false);
  3413. bindSubGrid11(subgrid_id, rowid)
  3414. }
  3415. });
  3416. $("#warehouse a.btn-default").click(function () {
  3417. $("#warehouse a.btn-default").removeClass("active");
  3418. $(this).addClass("active");
  3419. $('#btn_search').trigger("click");
  3420. });
  3421. $("#btn_search").click(function () {
  3422. var warehouse = $("#warehouse a.active").attr('data-value');
  3423. var queryJson = {
  3424. POCode: $("#txt_POCode").val(),
  3425. VenCode: $("#txt_VenCode").val(),
  3426. VenName: $("#txt_VenName").val(),
  3427. InvCode: $("#txt_InvCode").val(),
  3428. InvName: $("#txt_InvName").val(),
  3429. BatchCode: $("#txt_BatchCode").val(),
  3430. POStatus: $("#selShow").val()
  3431. }
  3432. $gridList.jqGrid('setGridParam', {
  3433. postData: { queryJson: JSON.stringify(queryJson) },
  3434. }).trigger('reloadGrid');
  3435. });
  3436. }
  3437. function bindSubGrid11(subgrid_id, rowid) {
  3438. $("#gridList").jqGrid("setSelection", rowid, false);
  3439. var subgrid_table_id;
  3440. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3441. var subgrid_pager_id;
  3442. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3443. // (5)动态添加子报表的table和pager
  3444. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3445. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).OOCode;
  3446. var Sequence = $("#gridList").jqGrid('getRowData', rowid).OOSequence;
  3447. // (6)创建jqGrid对象
  3448. $("#" + subgrid_table_id).dataGrid({
  3449. cellEdit: true,
  3450. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3451. //colModel: [
  3452. // { label: "主键", name: "ID", hidden: true, key: true },
  3453. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3454. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3455. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3456. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3457. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3458. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3459. //],
  3460. colModel: _Clos1,
  3461. //colModel: ColModelSub,
  3462. shrinkToFit: true,//宽度自适应
  3463. multiselect: true,
  3464. prmNames: { search: "search" },
  3465. viewrecords: true,
  3466. height: "100%",
  3467. rowNum: 20,
  3468. pager: subgrid_pager_id,
  3469. });
  3470. }
  3471. //领料申请退料生成条码
  3472. function gridList12() {
  3473. var $gridList = $("#gridList");
  3474. var queryJson = {
  3475. POCode: $("#txt_POCode").val(),
  3476. InvCode: $("#txt_InvCode").val(),
  3477. InvName: $("#txt_InvName").val(),
  3478. BatchCode: $("#txt_BatchCode").val(),
  3479. FromTime: $("#FromTime").val(),
  3480. ToTime: $("#ToTime").val(),
  3481. POStatus: $("#selShow").val()
  3482. }
  3483. $gridList.dataGrid({
  3484. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonLLSQTL" + "?" + Math.random(),
  3485. postData: { queryJson: JSON.stringify(queryJson) },
  3486. height: $(window).height() - 200,
  3487. width: $(window).width() - 300,
  3488. colModel: _Clos,
  3489. //colModel: [
  3490. // { label: "主键", name: "ID", hidden: true, key: true },
  3491. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  3492. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3493. // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, },
  3494. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3495. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  3496. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3497. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3498. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3499. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3500. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3501. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3502. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3503. //],
  3504. //colModel: ColModelMain,
  3505. width: "100%",
  3506. autowidth: true,
  3507. //shrinkToFit: true,
  3508. gridComplete: function () {
  3509. },
  3510. pager: "#gridPager",
  3511. // sortname: 'ApplyNegCode,cast(Sequence as int)',
  3512. sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3513. sortorder: "asc",
  3514. viewrecords: true,
  3515. multiselect: true,
  3516. //beforeSelectRow: function (rowid, e) {
  3517. // $("#gridList").jqGrid('resetSelection');
  3518. // return (true);
  3519. //},
  3520. subGrid: true, // (1)开启子表格支持
  3521. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3522. $("#gridList").jqGrid("setSelection", rowid, false);
  3523. bindSubGrid12(subgrid_id, rowid)
  3524. }
  3525. });
  3526. $("#warehouse a.btn-default").click(function () {
  3527. $("#warehouse a.btn-default").removeClass("active");
  3528. $(this).addClass("active");
  3529. $('#btn_search').trigger("click");
  3530. });
  3531. $("#btn_search").click(function () {
  3532. var warehouse = $("#warehouse a.active").attr('data-value');
  3533. var queryJson = {
  3534. POCode: $("#txt_POCode").val(),
  3535. InvCode: $("#txt_InvCode").val(),
  3536. InvName: $("#txt_InvName").val(),
  3537. BatchCode: $("#txt_BatchCode").val(),
  3538. FromTime: $("#FromTime").val(),
  3539. ToTime: $("#ToTime").val(),
  3540. POStatus: $("#selShow").val()
  3541. }
  3542. $gridList.jqGrid('setGridParam', {
  3543. postData: { queryJson: JSON.stringify(queryJson) },
  3544. }).trigger('reloadGrid');
  3545. });
  3546. }
  3547. function bindSubGrid12(subgrid_id, rowid) {
  3548. $("#gridList").jqGrid("setSelection", rowid, false);
  3549. var subgrid_table_id;
  3550. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3551. var subgrid_pager_id;
  3552. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3553. // (5)动态添加子报表的table和pager
  3554. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3555. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  3556. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3557. // (6)创建jqGrid对象
  3558. $("#" + subgrid_table_id).dataGrid({
  3559. cellEdit: true,
  3560. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3561. //colModel: [
  3562. // { label: "主键", name: "ID", hidden: true, key: true },
  3563. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3564. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3565. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3566. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3567. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3568. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3569. //],
  3570. colModel: _Clos1,
  3571. //colModel: ColModelSub,
  3572. shrinkToFit: true,//宽度自适应
  3573. multiselect: true,
  3574. prmNames: { search: "search" },
  3575. viewrecords: true,
  3576. height: "100%",
  3577. rowNum: 20,
  3578. pager: subgrid_pager_id,
  3579. });
  3580. }
  3581. //材料出库退料
  3582. function gridList13() {
  3583. var $gridList = $("#gridList");
  3584. var queryJson = {
  3585. POCode: $("#txt_POCode").val(),
  3586. InvCode: $("#txt_InvCode").val(),
  3587. InvName: $("#txt_InvName").val(),
  3588. BatchCode: $("#txt_BatchCode").val(),
  3589. POStatus: $("#selShow").val(),
  3590. SCode: $("#txt_SCode").val(),
  3591. }
  3592. $gridList.dataGrid({
  3593. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonCLCK" + "?" + Math.random(),
  3594. postData: { queryJson: JSON.stringify(queryJson) },
  3595. height: $(window).height() - 200,
  3596. width: $(window).width() - 300,
  3597. colModel: _Clos,
  3598. //colModel: [
  3599. // { label: "主键", name: "ID", hidden: true, key: true },
  3600. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  3601. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3602. // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, },
  3603. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3604. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  3605. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3606. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3607. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3608. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3609. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3610. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3611. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3612. //],
  3613. //colModel: ColModelMain,
  3614. width: "100%",
  3615. autowidth: true,
  3616. //shrinkToFit: true,
  3617. gridComplete: function () {
  3618. },
  3619. pager: "#gridPager",
  3620. // sortname: 'ApplyNegCode,cast(Sequence as int)',
  3621. sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3622. sortorder: "asc",
  3623. viewrecords: true,
  3624. multiselect: true,
  3625. //beforeSelectRow: function (rowid, e) {
  3626. // $("#gridList").jqGrid('resetSelection');
  3627. // return (true);
  3628. //},
  3629. subGrid: true, // (1)开启子表格支持
  3630. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3631. $("#gridList").jqGrid("setSelection", rowid, false);
  3632. bindSubGrid13(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. InvCode: $("#txt_InvCode").val(),
  3645. InvName: $("#txt_InvName").val(),
  3646. BatchCode: $("#txt_BatchCode").val(),
  3647. POStatus: $("#selShow").val(),
  3648. SCode: $("#txt_SCode").val(),
  3649. }
  3650. $gridList.jqGrid('setGridParam', {
  3651. postData: { queryJson: JSON.stringify(queryJson) },
  3652. }).trigger('reloadGrid');
  3653. });
  3654. }
  3655. function bindSubGrid13(subgrid_id, rowid) {
  3656. $("#gridList").jqGrid("setSelection", rowid, false);
  3657. var subgrid_table_id;
  3658. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3659. var subgrid_pager_id;
  3660. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3661. // (5)动态添加子报表的table和pager
  3662. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3663. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  3664. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3665. // (6)创建jqGrid对象
  3666. $("#" + subgrid_table_id).dataGrid({
  3667. cellEdit: true,
  3668. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3669. //colModel: [
  3670. // { label: "主键", name: "ID", hidden: true, key: true },
  3671. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3672. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3673. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3674. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3675. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3676. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3677. //],
  3678. colModel: _Clos1,
  3679. //colModel: ColModelSub,
  3680. shrinkToFit: true,//宽度自适应
  3681. multiselect: true,
  3682. prmNames: { search: "search" },
  3683. viewrecords: true,
  3684. height: "100%",
  3685. rowNum: 20,
  3686. pager: subgrid_pager_id,
  3687. });
  3688. }
  3689. //委外领料申请退料
  3690. function gridList14() {
  3691. var $gridList = $("#gridList");
  3692. var queryJson = {
  3693. POCode: $("#txt_POCode").val(),
  3694. InvCode: $("#txt_InvCode").val(),
  3695. InvName: $("#txt_InvName").val(),
  3696. BatchCode: $("#txt_BatchCode").val(),
  3697. POStatus: $("#selShow").val()
  3698. }
  3699. $gridList.dataGrid({
  3700. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonWWLLTL" + "?" + Math.random(),
  3701. postData: { queryJson: JSON.stringify(queryJson) },
  3702. height: $(window).height() - 200,
  3703. width: $(window).width() - 300,
  3704. colModel: _Clos,
  3705. //colModel: [
  3706. // { label: "主键", name: "ID", hidden: true, key: true },
  3707. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3708. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3709. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3710. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3711. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3712. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3713. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3714. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3715. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3716. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3717. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3718. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3719. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3720. //],
  3721. //colModel: ColModelMain,
  3722. width: "100%",
  3723. autowidth: true,
  3724. //shrinkToFit: true,
  3725. gridComplete: function () {
  3726. },
  3727. pager: "#gridPager",
  3728. //sortname: 'OApplyNegCode,cast(Sequence as int)',
  3729. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3730. sortorder: "asc",
  3731. viewrecords: true,
  3732. multiselect: true,
  3733. //beforeSelectRow: function (rowid, e) {
  3734. // $("#gridList").jqGrid('resetSelection');
  3735. // return (true);
  3736. //},
  3737. subGrid: true, // (1)开启子表格支持
  3738. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3739. $("#gridList").jqGrid("setSelection", rowid, false);
  3740. bindSubGrid14(subgrid_id, rowid)
  3741. }
  3742. });
  3743. $("#warehouse a.btn-default").click(function () {
  3744. $("#warehouse a.btn-default").removeClass("active");
  3745. $(this).addClass("active");
  3746. $('#btn_search').trigger("click");
  3747. });
  3748. $("#btn_search").click(function () {
  3749. var warehouse = $("#warehouse a.active").attr('data-value');
  3750. var queryJson = {
  3751. POCode: $("#txt_POCode").val(),
  3752. InvCode: $("#txt_InvCode").val(),
  3753. InvName: $("#txt_InvName").val(),
  3754. BatchCode: $("#txt_BatchCode").val(),
  3755. POStatus: $("#selShow").val()
  3756. }
  3757. $gridList.jqGrid('setGridParam', {
  3758. postData: { queryJson: JSON.stringify(queryJson) },
  3759. }).trigger('reloadGrid');
  3760. });
  3761. }
  3762. function bindSubGrid14(subgrid_id, rowid) {
  3763. $("#gridList").jqGrid("setSelection", rowid, false);
  3764. var subgrid_table_id;
  3765. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3766. var subgrid_pager_id;
  3767. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3768. // (5)动态添加子报表的table和pager
  3769. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3770. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  3771. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3772. // (6)创建jqGrid对象
  3773. $("#" + subgrid_table_id).dataGrid({
  3774. cellEdit: true,
  3775. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3776. //colModel: [
  3777. // { label: "主键", name: "ID", hidden: true, key: true },
  3778. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3779. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3780. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3781. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3782. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3783. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3784. //],
  3785. colModel: _Clos1,
  3786. //colModel: ColModelSub,
  3787. shrinkToFit: true,//宽度自适应
  3788. multiselect: true,
  3789. prmNames: { search: "search" },
  3790. viewrecords: true,
  3791. height: "100%",
  3792. rowNum: 20,
  3793. pager: subgrid_pager_id,
  3794. });
  3795. }
  3796. //委外材料出库
  3797. function gridList15() {
  3798. var $gridList = $("#gridList");
  3799. var queryJson = {
  3800. POCode: $("#txt_POCode").val(),
  3801. InvCode: $("#txt_InvCode").val(),
  3802. InvName: $("#txt_InvName").val(),
  3803. BatchCode: $("#txt_BatchCode").val(),
  3804. POStatus: $("#selShow").val()
  3805. }
  3806. $gridList.dataGrid({
  3807. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonWWCLCK" + "?" + Math.random(),
  3808. postData: { queryJson: JSON.stringify(queryJson) },
  3809. height: $(window).height() - 200,
  3810. width: $(window).width() - 300,
  3811. colModel: _Clos,
  3812. //colModel: [
  3813. // { label: "主键", name: "ID", hidden: true, key: true },
  3814. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3815. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3816. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3817. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3818. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3819. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3820. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3821. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3822. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3823. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3824. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3825. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3826. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3827. //],
  3828. //colModel: ColModelMain,
  3829. width: "100%",
  3830. autowidth: true,
  3831. //shrinkToFit: true,
  3832. gridComplete: function () {
  3833. },
  3834. pager: "#gridPager",
  3835. //sortname: 'OApplyNegCode,cast(Sequence as int)',
  3836. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3837. sortorder: "asc",
  3838. viewrecords: true,
  3839. multiselect: true,
  3840. //beforeSelectRow: function (rowid, e) {
  3841. // $("#gridList").jqGrid('resetSelection');
  3842. // return (true);
  3843. //},
  3844. subGrid: true, // (1)开启子表格支持
  3845. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3846. $("#gridList").jqGrid("setSelection", rowid, false);
  3847. bindSubGrid15(subgrid_id, rowid)
  3848. }
  3849. });
  3850. $("#warehouse a.btn-default").click(function () {
  3851. $("#warehouse a.btn-default").removeClass("active");
  3852. $(this).addClass("active");
  3853. $('#btn_search').trigger("click");
  3854. });
  3855. $("#btn_search").click(function () {
  3856. var warehouse = $("#warehouse a.active").attr('data-value');
  3857. var queryJson = {
  3858. POCode: $("#txt_POCode").val(),
  3859. InvCode: $("#txt_InvCode").val(),
  3860. InvName: $("#txt_InvName").val(),
  3861. BatchCode: $("#txt_BatchCode").val(),
  3862. POStatus: $("#selShow").val()
  3863. }
  3864. $gridList.jqGrid('setGridParam', {
  3865. postData: { queryJson: JSON.stringify(queryJson) },
  3866. }).trigger('reloadGrid');
  3867. });
  3868. }
  3869. function bindSubGrid15(subgrid_id, rowid) {
  3870. $("#gridList").jqGrid("setSelection", rowid, false);
  3871. var subgrid_table_id;
  3872. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3873. var subgrid_pager_id;
  3874. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3875. // (5)动态添加子报表的table和pager
  3876. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3877. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  3878. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3879. // (6)创建jqGrid对象
  3880. $("#" + subgrid_table_id).dataGrid({
  3881. cellEdit: true,
  3882. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3883. //colModel: [
  3884. // { label: "主键", name: "ID", hidden: true, key: true },
  3885. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3886. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3887. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3888. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3889. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3890. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3891. //],
  3892. colModel: _Clos1,
  3893. //colModel: ColModelSub,
  3894. shrinkToFit: true,//宽度自适应
  3895. //multiselect: true,
  3896. prmNames: { search: "search" },
  3897. multiselect: true,
  3898. viewrecords: true,
  3899. height: "100%",
  3900. rowNum: 20,
  3901. pager: subgrid_pager_id,
  3902. });
  3903. }
  3904. function gridList16() {
  3905. var $gridList = $("#gridList");
  3906. var queryJson = {
  3907. POCode: $("#txt_POCode").val(),
  3908. InvCode: $("#txt_InvCode").val(),
  3909. InvName: $("#txt_InvName").val(),
  3910. BatchCode: $("#txt_BatchCode").val(),
  3911. POStatus: $("#selShow").val()
  3912. }
  3913. $gridList.dataGrid({
  3914. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonFGGD" + "?" + Math.random(),
  3915. postData: { queryJson: JSON.stringify(queryJson) },
  3916. height: $(window).height() - 200,
  3917. width: $(window).width() - 300,
  3918. colModel: _Clos,
  3919. //colModel: [
  3920. // { label: "主键", name: "ID", hidden: true, key: true },
  3921. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3922. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3923. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3924. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3925. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3926. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3927. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3928. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3929. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3930. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3931. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3932. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3933. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3934. //],
  3935. //colModel: ColModelMain,
  3936. width: "100%",
  3937. autowidth: true,
  3938. //shrinkToFit: true,
  3939. gridComplete: function () {
  3940. },
  3941. pager: "#gridPager",
  3942. // sortname: 'MOCode,cast(Sequence as int)',
  3943. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3944. sortorder: "asc",
  3945. viewrecords: true,
  3946. multiselect: true,
  3947. //beforeSelectRow: function (rowid, e) {
  3948. // $("#gridList").jqGrid('resetSelection');
  3949. // return (true);
  3950. //},
  3951. subGrid: true, // (1)开启子表格支持
  3952. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3953. $("#gridList").jqGrid("setSelection", rowid, false);
  3954. bindSubGrid16(subgrid_id, rowid)
  3955. }
  3956. });
  3957. $("#warehouse a.btn-default").click(function () {
  3958. $("#warehouse a.btn-default").removeClass("active");
  3959. $(this).addClass("active");
  3960. $('#btn_search').trigger("click");
  3961. });
  3962. $("#btn_search").click(function () {
  3963. var warehouse = $("#warehouse a.active").attr('data-value');
  3964. var queryJson = {
  3965. POCode: $("#txt_POCode").val(),
  3966. InvCode: $("#txt_InvCode").val(),
  3967. InvName: $("#txt_InvName").val(),
  3968. BatchCode: $("#txt_BatchCode").val(),
  3969. POStatus: $("#selShow").val()
  3970. }
  3971. $gridList.jqGrid('setGridParam', {
  3972. postData: { queryJson: JSON.stringify(queryJson) },
  3973. }).trigger('reloadGrid');
  3974. });
  3975. }
  3976. function bindSubGrid16(subgrid_id, rowid) {
  3977. $("#gridList").jqGrid("setSelection", rowid, false);
  3978. var subgrid_table_id;
  3979. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3980. var subgrid_pager_id;
  3981. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3982. // (5)动态添加子报表的table和pager
  3983. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3984. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  3985. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3986. // (6)创建jqGrid对象
  3987. $("#" + subgrid_table_id).dataGrid({
  3988. cellEdit: true,
  3989. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3990. //colModel: [
  3991. // { label: "主键", name: "ID", hidden: true, key: true },
  3992. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3993. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3994. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3995. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3996. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3997. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3998. //],
  3999. colModel: _Clos1,
  4000. //colModel: ColModelSub,
  4001. shrinkToFit: true,//宽度自适应
  4002. multiselect: true,
  4003. prmNames: { search: "search" },
  4004. viewrecords: true,
  4005. height: "100%",
  4006. rowNum: 20,
  4007. pager: subgrid_pager_id,
  4008. });
  4009. }
  4010. //检验不合格
  4011. function gridList17() {
  4012. var $gridList = $("#gridList");
  4013. var queryJson = {
  4014. POCode: $("#txt_POCode").val(),
  4015. InvCode: $("#txt_InvCode").val(),
  4016. InvName: $("#txt_InvName").val(),
  4017. BatchCode: $("#txt_BatchCode").val(),
  4018. POStatus: $("#selShow").val()
  4019. }
  4020. $gridList.dataGrid({
  4021. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonBHGTM" + "?" + Math.random(),
  4022. postData: { queryJson: JSON.stringify(queryJson) },
  4023. height: $(window).height() - 200,
  4024. width: $(window).width() - 300,
  4025. colModel: _Clos,
  4026. //colModel: [
  4027. // { label: "主键", name: "ID", hidden: true, key: true },
  4028. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  4029. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  4030. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  4031. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  4032. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  4033. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  4034. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  4035. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  4036. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  4037. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  4038. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  4039. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  4040. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  4041. //],
  4042. //colModel: ColModelMain,
  4043. width: "100%",
  4044. autowidth: true,
  4045. //shrinkToFit: true,
  4046. gridComplete: function () {
  4047. },
  4048. pager: "#gridPager",
  4049. sortname: 'LotNo',
  4050. sortorder: "asc",
  4051. viewrecords: true,
  4052. multiselect: true,
  4053. //beforeSelectRow: function (rowid, e) {
  4054. // $("#gridList").jqGrid('resetSelection');
  4055. // return (true);
  4056. //},
  4057. subGrid: true, // (1)开启子表格支持
  4058. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4059. $("#gridList").jqGrid("setSelection", rowid, false);
  4060. bindSubGrid17(subgrid_id, rowid)
  4061. }
  4062. });
  4063. $("#warehouse a.btn-default").click(function () {
  4064. $("#warehouse a.btn-default").removeClass("active");
  4065. $(this).addClass("active");
  4066. $('#btn_search').trigger("click");
  4067. });
  4068. $("#btn_search").click(function () {
  4069. var warehouse = $("#warehouse a.active").attr('data-value');
  4070. var queryJson = {
  4071. POCode: $("#txt_POCode").val(),
  4072. InvCode: $("#txt_InvCode").val(),
  4073. InvName: $("#txt_InvName").val(),
  4074. BatchCode: $("#txt_BatchCode").val(),
  4075. POStatus: $("#selShow").val()
  4076. }
  4077. $gridList.jqGrid('setGridParam', {
  4078. postData: { queryJson: JSON.stringify(queryJson) },
  4079. }).trigger('reloadGrid');
  4080. });
  4081. }
  4082. function bindSubGrid17(subgrid_id, rowid) {
  4083. $("#gridList").jqGrid("setSelection", rowid, false);
  4084. var subgrid_table_id;
  4085. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4086. var subgrid_pager_id;
  4087. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4088. // (5)动态添加子报表的table和pager
  4089. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4090. var LotNo = $("#gridList").jqGrid('getRowData', rowid).LotNo;
  4091. // var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4092. // (6)创建jqGrid对象
  4093. $("#" + subgrid_table_id).dataGrid({
  4094. cellEdit: true,
  4095. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJsonBHGTM?LotNo=" + LotNo + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4096. //colModel: [
  4097. // { label: "主键", name: "ID", hidden: true, key: true },
  4098. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  4099. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  4100. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  4101. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  4102. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  4103. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  4104. //],
  4105. colModel: _Clos1,
  4106. //colModel: ColModelSub,
  4107. shrinkToFit: true,//宽度自适应
  4108. multiselect: true,
  4109. prmNames: { search: "search" },
  4110. viewrecords: true,
  4111. height: "100%",
  4112. rowNum: 20,
  4113. pager: subgrid_pager_id,
  4114. });
  4115. }
  4116. function gridList18() {
  4117. var $gridList = $("#gridList");
  4118. var queryJson = {
  4119. POCode: $("#txt_POCode").val(),
  4120. InvCode: $("#txt_InvCode").val(),
  4121. InvName: $("#txt_InvName").val(),
  4122. BatchCode: $("#txt_BatchCode").val(),
  4123. POStatus: $("#selShow").val()
  4124. }
  4125. $gridList.dataGrid({
  4126. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonFCP" + "?" + Math.random(),
  4127. postData: { queryJson: JSON.stringify(queryJson) },
  4128. height: $(window).height() - 200,
  4129. width: $(window).width() - 300,
  4130. colModel: _Clos,
  4131. //colModel: [
  4132. // { label: "主键", name: "ID", hidden: true, key: true },
  4133. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  4134. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  4135. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  4136. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  4137. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  4138. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  4139. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  4140. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  4141. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  4142. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  4143. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  4144. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  4145. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  4146. //],
  4147. //colModel: ColModelMain,
  4148. width: "100%",
  4149. autowidth: true,
  4150. //shrinkToFit: true,
  4151. gridComplete: function () {
  4152. },
  4153. pager: "#gridPager",
  4154. // sortname: 'MOCode,cast(Sequence as int)',
  4155. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  4156. sortorder: "asc",
  4157. viewrecords: true,
  4158. multiselect: true,
  4159. //beforeSelectRow: function (rowid, e) {
  4160. // $("#gridList").jqGrid('resetSelection');
  4161. // return (true);
  4162. //},
  4163. subGrid: true, // (1)开启子表格支持
  4164. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4165. $("#gridList").jqGrid("setSelection", rowid, false);
  4166. bindSubGrid18(subgrid_id, rowid)
  4167. }
  4168. });
  4169. $("#warehouse a.btn-default").click(function () {
  4170. $("#warehouse a.btn-default").removeClass("active");
  4171. $(this).addClass("active");
  4172. $('#btn_search').trigger("click");
  4173. });
  4174. $("#btn_search").click(function () {
  4175. var warehouse = $("#warehouse a.active").attr('data-value');
  4176. var queryJson = {
  4177. POCode: $("#txt_POCode").val(),
  4178. InvCode: $("#txt_InvCode").val(),
  4179. InvName: $("#txt_InvName").val(),
  4180. BatchCode: $("#txt_BatchCode").val(),
  4181. POStatus: $("#selShow").val()
  4182. }
  4183. $gridList.jqGrid('setGridParam', {
  4184. postData: { queryJson: JSON.stringify(queryJson) },
  4185. }).trigger('reloadGrid');
  4186. });
  4187. }
  4188. function bindSubGrid18(subgrid_id, rowid) {
  4189. $("#gridList").jqGrid("setSelection", rowid, false);
  4190. var subgrid_table_id;
  4191. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4192. var subgrid_pager_id;
  4193. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4194. // (5)动态添加子报表的table和pager
  4195. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4196. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  4197. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4198. // (6)创建jqGrid对象
  4199. $("#" + subgrid_table_id).dataGrid({
  4200. cellEdit: true,
  4201. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4202. //colModel: [
  4203. // { label: "主键", name: "ID", hidden: true, key: true },
  4204. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  4205. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  4206. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  4207. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  4208. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  4209. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  4210. //],
  4211. colModel: _Clos1,
  4212. //colModel: ColModelSub,
  4213. shrinkToFit: true,//宽度自适应
  4214. multiselect: true,
  4215. prmNames: { search: "search" },
  4216. viewrecords: true,
  4217. height: "100%",
  4218. rowNum: 20,
  4219. pager: subgrid_pager_id,
  4220. });
  4221. }
  4222. function gridList20() {
  4223. var $gridList = $("#gridList");
  4224. var queryJson = {
  4225. POCode: $("#txt_POCode").val(),
  4226. InvCode: $("#txt_InvCode").val(),
  4227. InvName: $("#txt_InvName").val(),
  4228. BatchCode: $("#txt_BatchCode").val(),
  4229. POStatus: $("#selShow").val()
  4230. }
  4231. $gridList.dataGrid({
  4232. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonTransfer" + "?" + Math.random(),
  4233. postData: { queryJson: JSON.stringify(queryJson) },
  4234. height: $(window).height() - 200,
  4235. width: $(window).width() - 300,
  4236. colModel: _Clos,
  4237. width: "100%",
  4238. autowidth: true,
  4239. //shrinkToFit: true,
  4240. gridComplete: function () {
  4241. },
  4242. pager: "#gridPager",
  4243. // sortname: 'MOCode,cast(Sequence as int)',
  4244. sortname: "TransferNO,Cast(Sequence as int) ",
  4245. sortorder: "asc",
  4246. viewrecords: true,
  4247. multiselect: true,
  4248. //beforeSelectRow: function (rowid, e) {
  4249. // $("#gridList").jqGrid('resetSelection');
  4250. // return (true);
  4251. //},
  4252. subGrid: true, // (1)开启子表格支持
  4253. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4254. $("#gridList").jqGrid("setSelection", rowid, false);
  4255. bindSubGrid20(subgrid_id, rowid)
  4256. }
  4257. });
  4258. $("#warehouse a.btn-default").click(function () {
  4259. $("#warehouse a.btn-default").removeClass("active");
  4260. $(this).addClass("active");
  4261. $('#btn_search').trigger("click");
  4262. });
  4263. $("#btn_search").click(function () {
  4264. var warehouse = $("#warehouse a.active").attr('data-value');
  4265. var queryJson = {
  4266. POCode: $("#txt_POCode").val(),
  4267. InvCode: $("#txt_InvCode").val(),
  4268. InvName: $("#txt_InvName").val(),
  4269. BatchCode: $("#txt_BatchCode").val(),
  4270. POStatus: $("#selShow").val()
  4271. }
  4272. $gridList.jqGrid('setGridParam', {
  4273. postData: { queryJson: JSON.stringify(queryJson) },
  4274. }).trigger('reloadGrid');
  4275. });
  4276. }
  4277. function bindSubGrid20(subgrid_id, rowid) {
  4278. debugger;
  4279. $("#gridList").jqGrid("setSelection", rowid, false);
  4280. var subgrid_table_id;
  4281. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4282. var subgrid_pager_id;
  4283. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4284. // (5)动态添加子报表的table和pager
  4285. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4286. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4287. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4288. // (6)创建jqGrid对象
  4289. $("#" + subgrid_table_id).dataGrid({
  4290. cellEdit: true,
  4291. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4292. colModel: _Clos1,
  4293. //colModel: ColModelSub,
  4294. shrinkToFit: true,//宽度自适应
  4295. multiselect: true,
  4296. prmNames: { search: "search" },
  4297. viewrecords: true,
  4298. height: "100%",
  4299. rowNum: 20,
  4300. pager: subgrid_pager_id,
  4301. });
  4302. }
  4303. //采购入库 ICSPurchaseReceive
  4304. function gridList22() {
  4305. var $gridList = $("#gridList");
  4306. var queryJson = {
  4307. POCode: $("#txt_POCode").val(),
  4308. InvCode: $("#txt_InvCode").val(),
  4309. InvName: $("#txt_InvName").val(),
  4310. BatchCode: $("#txt_BatchCode").val(),
  4311. FromTime: $("#FromTime").val(),
  4312. ToTime: $("#ToTime").val(),
  4313. WHCode: $("#txt_WHCode").val(),
  4314. POStatus: $("#selShow").val()
  4315. }
  4316. $gridList.dataGrid({
  4317. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonPurchaseReceive" + "?" + Math.random(),
  4318. postData: { queryJson: JSON.stringify(queryJson) },
  4319. height: $(window).height() - 200,
  4320. width: $(window).width() - 300,
  4321. colModel: _Clos,
  4322. width: "100%",
  4323. autowidth: true,
  4324. //shrinkToFit: true,
  4325. gridComplete: function () {
  4326. },
  4327. pager: "#gridPager",
  4328. // sortname: 'MOCode,cast(Sequence as int)',
  4329. sortname: "RCVCode,Cast(Sequence as int) ",
  4330. sortorder: "asc",
  4331. viewrecords: true,
  4332. multiselect: true,
  4333. //beforeSelectRow: function (rowid, e) {
  4334. // $("#gridList").jqGrid('resetSelection');
  4335. // return (true);
  4336. //},
  4337. subGrid: true, // (1)开启子表格支持
  4338. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4339. $("#gridList").jqGrid("setSelection", rowid, false);
  4340. bindSubGrid22(subgrid_id, rowid)
  4341. }
  4342. });
  4343. $("#warehouse a.btn-default").click(function () {
  4344. $("#warehouse a.btn-default").removeClass("active");
  4345. $(this).addClass("active");
  4346. $('#btn_search').trigger("click");
  4347. });
  4348. $("#btn_search").click(function () {
  4349. var warehouse = $("#warehouse a.active").attr('data-value');
  4350. var queryJson = {
  4351. POCode: $("#txt_POCode").val(),
  4352. InvCode: $("#txt_InvCode").val(),
  4353. InvName: $("#txt_InvName").val(),
  4354. BatchCode: $("#txt_BatchCode").val(),
  4355. FromTime: $("#FromTime").val(),
  4356. ToTime: $("#ToTime").val(),
  4357. WHCode: $("#txt_WHCode").val(),
  4358. POStatus: $("#selShow").val()
  4359. }
  4360. $gridList.jqGrid('setGridParam', {
  4361. postData: { queryJson: JSON.stringify(queryJson) },
  4362. }).trigger('reloadGrid');
  4363. });
  4364. }
  4365. function bindSubGrid22(subgrid_id, rowid) {
  4366. debugger;
  4367. $("#gridList").jqGrid("setSelection", rowid, false);
  4368. var subgrid_table_id;
  4369. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4370. var subgrid_pager_id;
  4371. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4372. // (5)动态添加子报表的table和pager
  4373. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4374. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  4375. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4376. // (6)创建jqGrid对象
  4377. $("#" + subgrid_table_id).dataGrid({
  4378. cellEdit: true,
  4379. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4380. colModel: _Clos1,
  4381. //colModel: ColModelSub,
  4382. shrinkToFit: true,//宽度自适应
  4383. multiselect: true,
  4384. prmNames: { search: "search" },
  4385. viewrecords: true,
  4386. height: "100%",
  4387. rowNum: 20,
  4388. pager: subgrid_pager_id,
  4389. });
  4390. }
  4391. //委外采购入库 ICSOutPurchaseReceive
  4392. function gridList23() {
  4393. var $gridList = $("#gridList");
  4394. var queryJson = {
  4395. POCode: $("#txt_POCode").val(),
  4396. InvCode: $("#txt_InvCode").val(),
  4397. InvName: $("#txt_InvName").val(),
  4398. BatchCode: $("#txt_BatchCode").val(),
  4399. FromTime: $("#FromTime").val(),
  4400. ToTime: $("#ToTime").val(),
  4401. WHCode: $("#txt_WHCode").val(),
  4402. POStatus: $("#selShow").val()
  4403. }
  4404. $gridList.dataGrid({
  4405. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonOutPurchaseReceive" + "?" + Math.random(),
  4406. postData: { queryJson: JSON.stringify(queryJson) },
  4407. height: $(window).height() - 200,
  4408. width: $(window).width() - 300,
  4409. colModel: _Clos,
  4410. width: "100%",
  4411. autowidth: true,
  4412. //shrinkToFit: true,
  4413. gridComplete: function () {
  4414. },
  4415. pager: "#gridPager",
  4416. // sortname: 'MOCode,cast(Sequence as int)',
  4417. sortname: "RCVCode,Cast(Sequence as int) ",
  4418. sortorder: "asc",
  4419. viewrecords: true,
  4420. multiselect: true,
  4421. //beforeSelectRow: function (rowid, e) {
  4422. // $("#gridList").jqGrid('resetSelection');
  4423. // return (true);
  4424. //},
  4425. subGrid: true, // (1)开启子表格支持
  4426. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4427. $("#gridList").jqGrid("setSelection", rowid, false);
  4428. bindSubGrid23(subgrid_id, rowid)
  4429. }
  4430. });
  4431. $("#warehouse a.btn-default").click(function () {
  4432. $("#warehouse a.btn-default").removeClass("active");
  4433. $(this).addClass("active");
  4434. $('#btn_search').trigger("click");
  4435. });
  4436. $("#btn_search").click(function () {
  4437. var warehouse = $("#warehouse a.active").attr('data-value');
  4438. var queryJson = {
  4439. POCode: $("#txt_POCode").val(),
  4440. InvCode: $("#txt_InvCode").val(),
  4441. InvName: $("#txt_InvName").val(),
  4442. BatchCode: $("#txt_BatchCode").val(),
  4443. FromTime: $("#FromTime").val(),
  4444. ToTime: $("#ToTime").val(),
  4445. WHCode: $("#txt_WHCode").val(),
  4446. POStatus: $("#selShow").val()
  4447. }
  4448. $gridList.jqGrid('setGridParam', {
  4449. postData: { queryJson: JSON.stringify(queryJson) },
  4450. }).trigger('reloadGrid');
  4451. });
  4452. }
  4453. function bindSubGrid23(subgrid_id, rowid) {
  4454. debugger;
  4455. $("#gridList").jqGrid("setSelection", rowid, false);
  4456. var subgrid_table_id;
  4457. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4458. var subgrid_pager_id;
  4459. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4460. // (5)动态添加子报表的table和pager
  4461. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4462. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  4463. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4464. // (6)创建jqGrid对象
  4465. $("#" + subgrid_table_id).dataGrid({
  4466. cellEdit: true,
  4467. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4468. colModel: _Clos1,
  4469. //colModel: ColModelSub,
  4470. shrinkToFit: true,//宽度自适应
  4471. multiselect: true,
  4472. prmNames: { search: "search" },
  4473. viewrecords: true,
  4474. height: "100%",
  4475. rowNum: 20,
  4476. pager: subgrid_pager_id,
  4477. });
  4478. }
  4479. //线边仓调拨申请单生成条码(派纳)
  4480. function gridList201() {
  4481. var $gridList = $("#gridList");
  4482. var queryJson = {
  4483. POCode: $("#txt_POCode").val(),
  4484. InvCode: $("#txt_InvCode").val(),
  4485. InvName: $("#txt_InvName").val(),
  4486. BatchCode: $("#txt_BatchCode").val(),
  4487. POStatus: $("#selShow").val()
  4488. }
  4489. $gridList.dataGrid({
  4490. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonTransferApplicationPN" + "?" + Math.random(),
  4491. postData: { queryJson: JSON.stringify(queryJson) },
  4492. height: $(window).height() - 200,
  4493. width: $(window).width() - 300,
  4494. colModel: _Clos,
  4495. width: "100%",
  4496. autowidth: true,
  4497. //shrinkToFit: true,
  4498. gridComplete: function () {
  4499. },
  4500. pager: "#gridPager",
  4501. // sortname: 'MOCode,cast(Sequence as int)',
  4502. sortname: "TransferNO,Cast(Sequence as int) ",
  4503. sortorder: "asc",
  4504. viewrecords: true,
  4505. multiselect: true,
  4506. //beforeSelectRow: function (rowid, e) {
  4507. // $("#gridList").jqGrid('resetSelection');
  4508. // return (true);
  4509. //},
  4510. subGrid: true, // (1)开启子表格支持
  4511. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4512. $("#gridList").jqGrid("setSelection", rowid, false);
  4513. bindSubGrid201(subgrid_id, rowid)
  4514. }
  4515. });
  4516. $("#warehouse a.btn-default").click(function () {
  4517. $("#warehouse a.btn-default").removeClass("active");
  4518. $(this).addClass("active");
  4519. $('#btn_search').trigger("click");
  4520. });
  4521. $("#btn_search").click(function () {
  4522. var warehouse = $("#warehouse a.active").attr('data-value');
  4523. var queryJson = {
  4524. POCode: $("#txt_POCode").val(),
  4525. InvCode: $("#txt_InvCode").val(),
  4526. InvName: $("#txt_InvName").val(),
  4527. BatchCode: $("#txt_BatchCode").val(),
  4528. POStatus: $("#selShow").val()
  4529. }
  4530. $gridList.jqGrid('setGridParam', {
  4531. postData: { queryJson: JSON.stringify(queryJson) },
  4532. }).trigger('reloadGrid');
  4533. });
  4534. }
  4535. //调拨申请单生成条码
  4536. function gridList202() {
  4537. var $gridList = $("#gridList");
  4538. var queryJson = {
  4539. POCode: $("#txt_POCode").val(),
  4540. InvCode: $("#txt_InvCode").val(),
  4541. InvName: $("#txt_InvName").val(),
  4542. BatchCode: $("#txt_BatchCode").val(),
  4543. POStatus: $("#selShow").val()
  4544. }
  4545. $gridList.dataGrid({
  4546. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonTransferApplication" + "?" + Math.random(),
  4547. postData: { queryJson: JSON.stringify(queryJson) },
  4548. height: $(window).height() - 200,
  4549. width: $(window).width() - 300,
  4550. colModel: _Clos,
  4551. width: "100%",
  4552. autowidth: true,
  4553. //shrinkToFit: true,
  4554. gridComplete: function () {
  4555. },
  4556. pager: "#gridPager",
  4557. // sortname: 'MOCode,cast(Sequence as int)',
  4558. sortname: "TransferNO,Cast(Sequence as int) ",
  4559. sortorder: "asc",
  4560. viewrecords: true,
  4561. multiselect: true,
  4562. //beforeSelectRow: function (rowid, e) {
  4563. // $("#gridList").jqGrid('resetSelection');
  4564. // return (true);
  4565. //},
  4566. subGrid: true, // (1)开启子表格支持
  4567. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4568. $("#gridList").jqGrid("setSelection", rowid, false);
  4569. bindSubGrid202(subgrid_id, rowid)
  4570. }
  4571. });
  4572. $("#warehouse a.btn-default").click(function () {
  4573. $("#warehouse a.btn-default").removeClass("active");
  4574. $(this).addClass("active");
  4575. $('#btn_search').trigger("click");
  4576. });
  4577. $("#btn_search").click(function () {
  4578. var warehouse = $("#warehouse a.active").attr('data-value');
  4579. var queryJson = {
  4580. POCode: $("#txt_POCode").val(),
  4581. InvCode: $("#txt_InvCode").val(),
  4582. InvName: $("#txt_InvName").val(),
  4583. BatchCode: $("#txt_BatchCode").val(),
  4584. POStatus: $("#selShow").val()
  4585. }
  4586. $gridList.jqGrid('setGridParam', {
  4587. postData: { queryJson: JSON.stringify(queryJson) },
  4588. }).trigger('reloadGrid');
  4589. });
  4590. }
  4591. function bindSubGrid201(subgrid_id, rowid) {
  4592. debugger;
  4593. $("#gridList").jqGrid("setSelection", rowid, false);
  4594. var subgrid_table_id;
  4595. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4596. var subgrid_pager_id;
  4597. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4598. // (5)动态添加子报表的table和pager
  4599. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4600. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4601. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4602. // (6)创建jqGrid对象
  4603. $("#" + subgrid_table_id).dataGrid({
  4604. cellEdit: true,
  4605. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4606. colModel: _Clos1,
  4607. //colModel: ColModelSub,
  4608. shrinkToFit: true,//宽度自适应
  4609. multiselect: true,
  4610. prmNames: { search: "search" },
  4611. viewrecords: true,
  4612. height: "100%",
  4613. rowNum: 20,
  4614. pager: subgrid_pager_id,
  4615. });
  4616. }
  4617. function bindSubGrid202(subgrid_id, rowid) {
  4618. debugger;
  4619. $("#gridList").jqGrid("setSelection", rowid, false);
  4620. var subgrid_table_id;
  4621. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4622. var subgrid_pager_id;
  4623. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4624. // (5)动态添加子报表的table和pager
  4625. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4626. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4627. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4628. // (6)创建jqGrid对象
  4629. $("#" + subgrid_table_id).dataGrid({
  4630. cellEdit: true,
  4631. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4632. colModel: _Clos1,
  4633. //colModel: ColModelSub,
  4634. shrinkToFit: true,//宽度自适应
  4635. multiselect: true,
  4636. prmNames: { search: "search" },
  4637. viewrecords: true,
  4638. height: "100%",
  4639. rowNum: 20,
  4640. pager: subgrid_pager_id,
  4641. });
  4642. }
  4643. //线边仓一步调入单生成条码(派纳)
  4644. function gridList203() {
  4645. var $gridList = $("#gridList");
  4646. var queryJson = {
  4647. POCode: $("#txt_POCode").val(),
  4648. InvCode: $("#txt_InvCode").val(),
  4649. InvName: $("#txt_InvName").val(),
  4650. BatchCode: $("#txt_BatchCode").val(),
  4651. FromTime: $("#FromTime").val(),
  4652. ToTime: $("#ToTime").val(),
  4653. WHCode: $("#txt_WHCode").val(),
  4654. POStatus: $("#selShow").val()
  4655. }
  4656. $gridList.dataGrid({
  4657. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonOneSetpTransPN" + "?" + Math.random(),
  4658. postData: { queryJson: JSON.stringify(queryJson) },
  4659. height: $(window).height() - 200,
  4660. width: $(window).width() - 300,
  4661. colModel: _Clos,
  4662. width: "100%",
  4663. autowidth: true,
  4664. //shrinkToFit: true,
  4665. gridComplete: function () {
  4666. },
  4667. pager: "#gridPager",
  4668. // sortname: 'MOCode,cast(Sequence as int)',
  4669. sortname: "TransferNO,Cast(Sequence as int) ",
  4670. sortorder: "asc",
  4671. viewrecords: true,
  4672. multiselect: true,
  4673. //beforeSelectRow: function (rowid, e) {
  4674. // $("#gridList").jqGrid('resetSelection');
  4675. // return (true);
  4676. //},
  4677. subGrid: true, // (1)开启子表格支持
  4678. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4679. $("#gridList").jqGrid("setSelection", rowid, false);
  4680. bindSubGrid203(subgrid_id, rowid)
  4681. }
  4682. });
  4683. $("#warehouse a.btn-default").click(function () {
  4684. $("#warehouse a.btn-default").removeClass("active");
  4685. $(this).addClass("active");
  4686. $('#btn_search').trigger("click");
  4687. });
  4688. $("#btn_search").click(function () {
  4689. var warehouse = $("#warehouse a.active").attr('data-value');
  4690. var queryJson = {
  4691. POCode: $("#txt_POCode").val(),
  4692. InvCode: $("#txt_InvCode").val(),
  4693. InvName: $("#txt_InvName").val(),
  4694. BatchCode: $("#txt_BatchCode").val(),
  4695. FromTime: $("#FromTime").val(),
  4696. ToTime: $("#ToTime").val(),
  4697. WHCode: $("#txt_WHCode").val(),
  4698. POStatus: $("#selShow").val()
  4699. }
  4700. $gridList.jqGrid('setGridParam', {
  4701. postData: { queryJson: JSON.stringify(queryJson) },
  4702. }).trigger('reloadGrid');
  4703. });
  4704. }
  4705. function bindSubGrid203(subgrid_id, rowid) {
  4706. debugger;
  4707. $("#gridList").jqGrid("setSelection", rowid, false);
  4708. var subgrid_table_id;
  4709. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4710. var subgrid_pager_id;
  4711. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4712. // (5)动态添加子报表的table和pager
  4713. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4714. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4715. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4716. // (6)创建jqGrid对象
  4717. $("#" + subgrid_table_id).dataGrid({
  4718. cellEdit: true,
  4719. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4720. colModel: _Clos1,
  4721. //colModel: ColModelSub,
  4722. shrinkToFit: true,//宽度自适应
  4723. multiselect: true,
  4724. prmNames: { search: "search" },
  4725. viewrecords: true,
  4726. height: "100%",
  4727. rowNum: 20,
  4728. pager: subgrid_pager_id,
  4729. });
  4730. }
  4731. //红字销售出库单
  4732. function gridList24() {
  4733. var $gridList = $("#gridList");
  4734. var queryJson = {
  4735. POCode: $("#txt_POCode").val(),
  4736. VenCode: $("#txt_VenCode").val(),
  4737. VenName: $("#txt_VenName").val(),
  4738. InvCode: $("#txt_InvCode").val(),
  4739. InvName: $("#txt_InvName").val(),
  4740. BatchCode: $("#txt_BatchCode").val(),
  4741. FromTime: $("#FromTime").val(),
  4742. ToTime: $("#ToTime").val(),
  4743. WHCode: $("#txt_WHCode").val(),
  4744. POStatus: $("#selShow").val(),
  4745. WHStatus: $("#selStatus").val()
  4746. }
  4747. $gridList.dataGrid({
  4748. url: "/JinHuaWMS/WMSCreateItemLot/GetGridJsonWMSSSD" + "?" + Math.random(),
  4749. postData: { queryJson: JSON.stringify(queryJson) },
  4750. height: $(window).height() - 200,
  4751. width: $(window).width() - 300,
  4752. colModel: _Clos,
  4753. //colModel: ColModelMain,
  4754. width: "100%",
  4755. autowidth: true,
  4756. //shrinkToFit: true,
  4757. gridComplete: function () {
  4758. },
  4759. pager: "#gridPager",
  4760. //sortname: 'ODNCode,cast(Sequence as int)',
  4761. sortname: "SSDCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  4762. sortorder: "asc",
  4763. viewrecords: true,
  4764. multiselect: true,
  4765. //beforeSelectRow: function (rowid, e) {
  4766. // $("#gridList").jqGrid('resetSelection');
  4767. // return (true);
  4768. //},
  4769. subGrid: true, // (1)开启子表格支持
  4770. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4771. $("#gridList").jqGrid("setSelection", rowid, false);
  4772. bindSubGrid24(subgrid_id, rowid)
  4773. }
  4774. });
  4775. $("#warehouse a.btn-default").click(function () {
  4776. $("#warehouse a.btn-default").removeClass("active");
  4777. $(this).addClass("active");
  4778. $('#btn_search').trigger("click");
  4779. });
  4780. $("#btn_search").click(function () {
  4781. var warehouse = $("#warehouse a.active").attr('data-value');
  4782. var queryJson = {
  4783. POCode: $("#txt_POCode").val(),
  4784. VenCode: $("#txt_VenCode").val(),
  4785. VenName: $("#txt_VenName").val(),
  4786. InvCode: $("#txt_InvCode").val(),
  4787. InvName: $("#txt_InvName").val(),
  4788. BatchCode: $("#txt_BatchCode").val(),
  4789. FromTime: $("#FromTime").val(),
  4790. ToTime: $("#ToTime").val(),
  4791. WHCode: $("#txt_WHCode").val(),
  4792. POStatus: $("#selShow").val(),
  4793. WHStatus: $("#selStatus").val()
  4794. }
  4795. $gridList.jqGrid('setGridParam', {
  4796. postData: { queryJson: JSON.stringify(queryJson) },
  4797. }).trigger('reloadGrid');
  4798. });
  4799. }
  4800. function bindSubGrid24(subgrid_id, rowid) {
  4801. $("#gridList").jqGrid("setSelection", rowid, false);
  4802. var subgrid_table_id;
  4803. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4804. var subgrid_pager_id;
  4805. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4806. // (5)动态添加子报表的table和pager
  4807. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4808. var SSDCode = $("#gridList").jqGrid('getRowData', rowid).SSDCode;
  4809. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4810. // (6)创建jqGrid对象
  4811. $("#" + subgrid_table_id).dataGrid({
  4812. cellEdit: true,
  4813. url: "/JinHuaWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SSDCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4814. //colModel: [
  4815. // { label: "主键", name: "ID", hidden: true, key: true },
  4816. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  4817. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  4818. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  4819. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  4820. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  4821. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  4822. //],
  4823. colModel: _Clos1,
  4824. //colModel: ColModelSub,
  4825. shrinkToFit: true,//宽度自适应
  4826. multiselect: true,
  4827. prmNames: { search: "search" },
  4828. viewrecords: true,
  4829. height: "100%",
  4830. rowNum: 20,
  4831. pager: subgrid_pager_id,
  4832. });
  4833. }
  4834. function btnDelete() {
  4835. var objArr = '';
  4836. var obj = $("#gridList").jqGrid("getRowData");
  4837. for (var i = 0; i < obj.length; i++) {
  4838. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  4839. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  4840. if (rowData != "undefined" && rowData != null) {
  4841. for (var j = 0; j < rowData.length; j++) {
  4842. objArr += "'" + rowData[j] + "',";
  4843. }
  4844. }
  4845. }
  4846. if (objArr == "") {
  4847. $.modalAlertNew("WMS00099");
  4848. return;
  4849. }
  4850. $.deleteForm({
  4851. url: "/JinHuaWMS/WMSCreateItemLot/DeleteItemLot",
  4852. param: { keyValue: JSON.stringify(objArr) },
  4853. success: function () {
  4854. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4855. }
  4856. })
  4857. }
  4858. function btnAllCreate() {
  4859. debugger;
  4860. var PoStatus;
  4861. var jsonData = '';
  4862. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  4863. //if (ids.length != 1) {
  4864. // $.modalAlertNew("WMS00100");
  4865. // return;
  4866. //}
  4867. var POCode = "";
  4868. var PORow = "";
  4869. var VenCode = "";
  4870. var WorkPoint = "";
  4871. var VendorLot = "";
  4872. //生产退料
  4873. if (Type == '1') {
  4874. debugger;
  4875. var ARR = [];
  4876. for (var i in ids) {
  4877. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4878. Code = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  4879. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4880. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  4881. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  4882. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  4883. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  4884. if (thisCreateQty == 0) {
  4885. $.modalAlert("该单据条码已全部生成完毕!");
  4886. return;
  4887. }
  4888. thisCreateQty = thisCreateQty.toFixed(4);
  4889. var minPackQty = thisCreateQty;//最小包装量
  4890. //minPackQty = minPackQty.toFixed(4);
  4891. var createPageCount = 1;//本次生成张数
  4892. createPageCount = createPageCount.toFixed(0);
  4893. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  4894. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  4895. Quantity = Quantity.toFixed(2);
  4896. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  4897. CreatedQty = CreatedQty.toFixed(2);
  4898. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  4899. if (Quantity == CreatedQty) {
  4900. return false;
  4901. }
  4902. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  4903. if (EffectiveEnable == 'true') {
  4904. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  4905. } else {
  4906. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  4907. }
  4908. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  4909. var obj = {
  4910. ID:ID,
  4911. Code: Code,
  4912. Sequence: Sequence,
  4913. thisCreateQty: thisCreateQty,
  4914. minPackQty: minPackQty,
  4915. createPageCount: createPageCount,
  4916. //VendorLot: VendorLot,
  4917. PRODUCTDATE: PRODUCTDATE,
  4918. ExpirationDate: ExpirationDate,
  4919. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  4920. //自由项
  4921. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  4922. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  4923. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  4924. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  4925. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  4926. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  4927. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  4928. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  4929. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  4930. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  4931. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  4932. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  4933. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  4934. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  4935. }
  4936. ARR.push(obj);
  4937. }
  4938. $.submitForm({
  4939. url: "/JinHuaWMS/WMSCreateItemLot/SubmitFormGDTLALL" + "?" + Math.random(),
  4940. param: {
  4941. keyValue: JSON.stringify(ARR)
  4942. },
  4943. success: function () {
  4944. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4945. }
  4946. })
  4947. }
  4948. //销售退货
  4949. if (Type == '4') {
  4950. debugger;
  4951. var ARR = [];
  4952. for (var i in ids) {
  4953. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4954. Code = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  4955. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4956. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  4957. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  4958. //console.log("单号:" + DNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  4959. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  4960. if (thisCreateQty == 0) {
  4961. $.modalAlert("该单据条码已全部生成完毕!");
  4962. return;
  4963. }
  4964. thisCreateQty = thisCreateQty.toFixed(4);
  4965. var minPackQty = thisCreateQty;//最小包装量
  4966. //minPackQty = minPackQty.toFixed(4);
  4967. var createPageCount = 1;//本次生成张数
  4968. createPageCount = createPageCount.toFixed(0);
  4969. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  4970. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  4971. Quantity = Quantity.toFixed(2);
  4972. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  4973. CreatedQty = CreatedQty.toFixed(2);
  4974. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  4975. if (Quantity == CreatedQty) {
  4976. return false;
  4977. }
  4978. if (EffectiveEnable == 'true') {
  4979. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  4980. } else {
  4981. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  4982. }
  4983. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  4984. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  4985. var obj = {
  4986. ID: ID,
  4987. Code: Code,
  4988. Sequence: Sequence,
  4989. thisCreateQty: thisCreateQty,
  4990. minPackQty: minPackQty,
  4991. createPageCount: createPageCount,
  4992. //VendorLot: VendorLot,
  4993. PRODUCTDATE: PRODUCTDATE,
  4994. ExpirationDate: ExpirationDate,
  4995. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  4996. //自由项
  4997. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  4998. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  4999. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5000. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5001. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5002. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5003. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5004. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5005. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5006. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5007. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5008. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5009. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5010. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5011. }
  5012. ARR.push(obj);
  5013. }
  5014. $.submitForm({
  5015. url: "/JinHuaWMS/WMSCreateItemLot/SubmitFormXSTHALL" + "?" + Math.random(),
  5016. param: {
  5017. keyValue: JSON.stringify(ARR)
  5018. },
  5019. success: function () {
  5020. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5021. }
  5022. })
  5023. }
  5024. //销售退货
  5025. if (Type == '5') {
  5026. debugger;
  5027. var ARR = [];
  5028. for (var i in ids) {
  5029. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5030. Code = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  5031. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5032. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5033. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5034. //console.log("单号:" + DNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5035. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5036. if (thisCreateQty == 0) {
  5037. $.modalAlert("该单据条码已全部生成完毕!");
  5038. return;
  5039. }
  5040. thisCreateQty = thisCreateQty.toFixed(4);
  5041. var minPackQty = thisCreateQty;//最小包装量
  5042. //minPackQty = minPackQty.toFixed(4);
  5043. var createPageCount = 1;//本次生成张数
  5044. createPageCount = createPageCount.toFixed(0);
  5045. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5046. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5047. Quantity = Quantity.toFixed(2);
  5048. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5049. CreatedQty = CreatedQty.toFixed(2);
  5050. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5051. if (Quantity == CreatedQty) {
  5052. return false;
  5053. }
  5054. if (EffectiveEnable == 'true') {
  5055. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5056. } else {
  5057. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5058. }
  5059. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5060. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5061. var obj = {
  5062. ID: ID,
  5063. Code: Code,
  5064. Sequence: Sequence,
  5065. thisCreateQty: thisCreateQty,
  5066. minPackQty: minPackQty,
  5067. createPageCount: createPageCount,
  5068. //VendorLot: VendorLot,
  5069. PRODUCTDATE: PRODUCTDATE,
  5070. ExpirationDate: ExpirationDate,
  5071. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5072. //自由项
  5073. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5074. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5075. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5076. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5077. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5078. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5079. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5080. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5081. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5082. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5083. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5084. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5085. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5086. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5087. }
  5088. ARR.push(obj);
  5089. }
  5090. $.submitForm({
  5091. url: "/JinHuaWMS/WMSCreateItemLot/SubmitFormQiTaALL" + "?" + Math.random(),
  5092. param: {
  5093. keyValue: JSON.stringify(ARR)
  5094. },
  5095. success: function () {
  5096. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5097. }
  5098. })
  5099. }
  5100. //普通到货单
  5101. if (Type == '7') {
  5102. debugger;
  5103. var ARR = [];
  5104. for (var i in ids) {
  5105. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5106. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  5107. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5108. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5109. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5110. //console.log("单号:" + DNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5111. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5112. if (thisCreateQty == 0) {
  5113. $.modalAlert("该单据条码已全部生成完毕!");
  5114. return;
  5115. }
  5116. thisCreateQty = thisCreateQty.toFixed(4);
  5117. var minPackQty = thisCreateQty;//最小包装量
  5118. //minPackQty = minPackQty.toFixed(4);
  5119. var createPageCount = 1;//本次生成张数
  5120. createPageCount = createPageCount.toFixed(0);
  5121. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5122. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5123. Quantity = Quantity.toFixed(2);
  5124. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5125. CreatedQty = CreatedQty.toFixed(2);
  5126. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5127. if (Quantity == CreatedQty) {
  5128. return false;
  5129. }
  5130. if (EffectiveEnable == 'true') {
  5131. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5132. } else {
  5133. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5134. }
  5135. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5136. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5137. var obj = {
  5138. ID:ID,
  5139. Code: DNCode,
  5140. Sequence: Sequence,
  5141. thisCreateQty: thisCreateQty,
  5142. minPackQty: minPackQty,
  5143. createPageCount: createPageCount,
  5144. //VendorLot: VendorLot,
  5145. PRODUCTDATE: PRODUCTDATE,
  5146. ExpirationDate: ExpirationDate,
  5147. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5148. //自由项
  5149. ProjectCode : $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5150. BatchCode : $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5151. Version : $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5152. Brand : $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5153. cFree1 : $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5154. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5155. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5156. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5157. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5158. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5159. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5160. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5161. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5162. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5163. }
  5164. ARR.push(obj);
  5165. }
  5166. $.submitForm({
  5167. url: "/JinHuaWMS/WMSCreateItemLot/SubmitFormSHDHALL" + "?" + Math.random(),
  5168. param: {
  5169. keyValue: JSON.stringify(ARR)
  5170. },
  5171. success: function () {
  5172. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5173. }
  5174. })
  5175. }
  5176. //委外到货单
  5177. if (Type == '8') {
  5178. debugger;
  5179. var ARR = [];
  5180. for (var i in ids) {
  5181. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5182. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  5183. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5184. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5185. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5186. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5187. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5188. if (thisCreateQty == 0) {
  5189. $.modalAlert("该单据条码已全部生成完毕!");
  5190. return;
  5191. }
  5192. thisCreateQty = thisCreateQty.toFixed(4);
  5193. var minPackQty = thisCreateQty;//最小包装量
  5194. //minPackQty = minPackQty.toFixed(4);
  5195. var createPageCount = 1;//本次生成张数
  5196. createPageCount = createPageCount.toFixed(0);
  5197. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5198. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5199. Quantity = Quantity.toFixed(2);
  5200. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5201. CreatedQty = CreatedQty.toFixed(2);
  5202. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5203. if (Quantity == CreatedQty) {
  5204. return false;
  5205. }
  5206. if (EffectiveEnable == 'true') {
  5207. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5208. } else {
  5209. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5210. }
  5211. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5212. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5213. var obj = {
  5214. ID:ID,
  5215. Code: ODNCode,
  5216. Sequence: Sequence,
  5217. thisCreateQty: thisCreateQty,
  5218. minPackQty: minPackQty,
  5219. createPageCount: createPageCount,
  5220. //VendorLot: VendorLot,
  5221. PRODUCTDATE: PRODUCTDATE,
  5222. ExpirationDate: ExpirationDate,
  5223. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5224. //自由项
  5225. ProjectCode : $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5226. BatchCode : $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5227. Version : $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5228. Brand : $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5229. cFree1 : $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5230. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5231. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5232. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5233. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5234. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5235. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5236. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5237. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5238. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5239. }
  5240. ARR.push(obj);
  5241. }
  5242. $.submitForm({
  5243. url: "/JinHuaWMS/WMSCreateItemLot/SubmitFormWWSHDHALL" + "?" + Math.random(),
  5244. param: {
  5245. keyValue: JSON.stringify(obj)
  5246. },
  5247. success: function () {
  5248. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5249. }
  5250. })
  5251. }
  5252. //成品入库单条码生成
  5253. if (Type == '9') {
  5254. debugger;
  5255. var ARR = [];
  5256. for (var i in ids) {
  5257. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5258. Code = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5259. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5260. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5261. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5262. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5263. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5264. if (thisCreateQty == 0) {
  5265. $.modalAlert("该单据条码已全部生成完毕!");
  5266. return;
  5267. }
  5268. thisCreateQty = thisCreateQty.toFixed(4);
  5269. var minPackQty = thisCreateQty;//最小包装量
  5270. //minPackQty = minPackQty.toFixed(4);
  5271. var createPageCount = 1;//本次生成张数
  5272. createPageCount = createPageCount.toFixed(0);
  5273. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5274. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5275. Quantity = Quantity.toFixed(2);
  5276. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5277. CreatedQty = CreatedQty.toFixed(2);
  5278. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5279. if (Quantity == CreatedQty) {
  5280. return false;
  5281. }
  5282. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5283. if (EffectiveEnable=='true') {
  5284. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5285. } else {
  5286. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5287. }
  5288. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5289. var obj = {
  5290. ID:ID,
  5291. Code: Code,
  5292. Sequence:Sequence,
  5293. thisCreateQty: thisCreateQty,
  5294. minPackQty: minPackQty,
  5295. createPageCount: createPageCount,
  5296. //VendorLot: VendorLot,
  5297. PRODUCTDATE: PRODUCTDATE,
  5298. ExpirationDate: ExpirationDate,
  5299. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5300. //自由项
  5301. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5302. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5303. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5304. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5305. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5306. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5307. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5308. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5309. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5310. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5311. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5312. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5313. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5314. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5315. }
  5316. ARR.push(obj);
  5317. }
  5318. $.submitForm({
  5319. url: "/JinHuaWMS/WMSCreateItemLot/SubmitFormKLCPRKALL" + "?" + Math.random(),
  5320. param: {
  5321. keyValue: JSON.stringify(ARR)
  5322. },
  5323. success: function () {
  5324. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5325. }
  5326. })
  5327. }
  5328. if (Type == '13') {
  5329. debugger;
  5330. var ARR = [];
  5331. for (var i in ids) {
  5332. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5333. Code = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5334. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5335. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5336. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5337. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5338. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5339. if (thisCreateQty == 0) {
  5340. $.modalAlert("该单据条码已全部生成完毕!");
  5341. return;
  5342. }
  5343. thisCreateQty = thisCreateQty.toFixed(4);
  5344. var minPackQty = thisCreateQty;//最小包装量
  5345. //minPackQty = minPackQty.toFixed(4);
  5346. var createPageCount = 1;//本次生成张数
  5347. createPageCount = createPageCount.toFixed(0);
  5348. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5349. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5350. Quantity = Quantity.toFixed(2);
  5351. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5352. CreatedQty = CreatedQty.toFixed(2);
  5353. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5354. if (Quantity == CreatedQty) {
  5355. return false;
  5356. }
  5357. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5358. if (EffectiveEnable == 'true') {
  5359. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5360. } else {
  5361. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5362. }
  5363. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5364. var obj = {
  5365. ID: ID,
  5366. Code: Code,
  5367. Sequence: Sequence,
  5368. thisCreateQty: thisCreateQty,
  5369. minPackQty: minPackQty,
  5370. createPageCount: createPageCount,
  5371. //VendorLot: VendorLot,
  5372. PRODUCTDATE: PRODUCTDATE,
  5373. ExpirationDate: ExpirationDate,
  5374. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5375. //自由项
  5376. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5377. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5378. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5379. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5380. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5381. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5382. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5383. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5384. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5385. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5386. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5387. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5388. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5389. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5390. }
  5391. ARR.push(obj);
  5392. }
  5393. $.submitForm({
  5394. url: "/JinHuaWMS/WMSCreateItemLot/SubmitFormCLCKTLALL" + "?" + Math.random(),
  5395. param: {
  5396. keyValue: JSON.stringify(ARR)
  5397. },
  5398. success: function () {
  5399. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5400. }
  5401. })
  5402. }
  5403. if (Type == '17') {
  5404. for (var i in ids) {
  5405. LotNo = $("#gridList").jqGrid('getRowData', ids[i]).LotNo;
  5406. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5407. if (thisCreateQty==0) {
  5408. $.modalAlert("该条码已全部生成完毕!");
  5409. return;
  5410. }
  5411. thisCreateQty = thisCreateQty.toFixed(4);
  5412. var minPackQty = thisCreateQty;//最小包装量
  5413. var createPageCount = 1;//本次生成张数
  5414. createPageCount = createPageCount.toFixed(0);
  5415. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5416. Quantity = Quantity.toFixed(2);
  5417. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5418. CreatedQty = CreatedQty.toFixed(2);
  5419. if (Quantity == CreatedQty) {
  5420. return false;
  5421. }
  5422. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5423. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5424. var obj = {
  5425. thisCreateQty: thisCreateQty,
  5426. minPackQty: minPackQty,
  5427. createPageCount: createPageCount,
  5428. //VendorLot: VendorLot,
  5429. PRODUCTDATE: PRODUCTDATE,
  5430. ExpirationDate: ExpirationDate,
  5431. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5432. }
  5433. $.submitForm({
  5434. url: "/JinHuaWMS/WMSCreateItemLot/SubmitFormBHGTM?LotNo=" + LotNo + "&WorkPoint=" + WorkPoints,
  5435. param: {
  5436. keyValue: JSON.stringify(obj)
  5437. },
  5438. success: function () {
  5439. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5440. }
  5441. })
  5442. }
  5443. }
  5444. }
  5445. function dateChange(num, date) {
  5446. if (!date) {
  5447. date = new Date();//没有传入值时,默认是当前日期
  5448. date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
  5449. }
  5450. date += " 00:00:00";//设置为当天凌晨12点
  5451. date = Date.parse(new Date(date)) / 1000;//转换为时间戳
  5452. date += (86400) * num;//修改后的时间戳
  5453. var newDate = new Date(parseInt(date) * 1000);//转换为时间
  5454. return newDate.getFullYear() + '-' + (newDate.getMonth() + 1) + '-' + newDate.getDate();
  5455. }
  5456. function btnCreate() {
  5457. debugger;
  5458. var PoStatus;
  5459. var jsonData = '';
  5460. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  5461. if (ids.length != 1) {
  5462. $.modalAlertNew("WMS00100");
  5463. return;
  5464. }
  5465. var POCode = "";
  5466. var PORow = "";
  5467. if (Type == '1') {
  5468. for (var i in ids) {
  5469. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5470. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5471. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5472. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5473. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5474. }
  5475. $.modalOpen({
  5476. id: "FormAddItemLot",
  5477. title: "生产退料条码生成",
  5478. url: "/JinHuaWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5479. width: "550px",
  5480. height: "1000px",
  5481. callBack: function (iframeId) {
  5482. top.frames[iframeId].submitForm();
  5483. }
  5484. });
  5485. } else if (Type == '2') {
  5486. for (var i in ids) {
  5487. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  5488. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5489. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5490. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5491. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5492. }
  5493. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5494. $.modalOpen({
  5495. id: "FormAddItemLot",
  5496. title: "委外退料条码生成",
  5497. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5498. width: "550px",
  5499. height: "1000px",
  5500. callBack: function (iframeId) {
  5501. top.frames[iframeId].submitForm();
  5502. }
  5503. });
  5504. }
  5505. else {
  5506. $.modalOpen({
  5507. id: "FormAddItemLot",
  5508. title: "委外退料条码生成",
  5509. url: "/JinHuaWMS/WMSCreateItemLot/From?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5510. width: "550px",
  5511. height: "1000px",
  5512. callBack: function (iframeId) {
  5513. top.frames[iframeId].submitForm();
  5514. }
  5515. });
  5516. }
  5517. } else if (Type == '3') {
  5518. for (var i in ids) {
  5519. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  5520. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  5521. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5522. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5523. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5524. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5525. }
  5526. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5527. $.modalOpen({
  5528. id: "FormAddItemLot",
  5529. title: "成品条码产生",
  5530. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  5531. width: "550px",
  5532. height: "1000px",
  5533. callBack: function (iframeId) {
  5534. top.frames[iframeId].submitForm();
  5535. }
  5536. });
  5537. }
  5538. else {
  5539. $.modalOpen({
  5540. id: "FormAddItemLot",
  5541. title: "成品条码产生",
  5542. url: "/JinHuaWMS/WMSCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  5543. width: "550px",
  5544. height: "1000px",
  5545. callBack: function (iframeId) {
  5546. top.frames[iframeId].submitForm();
  5547. }
  5548. });
  5549. }
  5550. } else if (Type == '4') {
  5551. for (var i in ids) {
  5552. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  5553. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5554. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5555. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5556. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5557. }
  5558. $.modalOpen({
  5559. id: "FormAddItemLot",
  5560. title: "销售退货条码产生",
  5561. url: "/JinHuaWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5562. width: "550px",
  5563. height: "1000px",
  5564. callBack: function (iframeId) {
  5565. top.frames[iframeId].submitForm();
  5566. }
  5567. });
  5568. } else if (Type == '5') {
  5569. for (var i in ids) {
  5570. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  5571. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5572. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5573. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5574. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5575. }
  5576. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5577. $.modalOpen({
  5578. id: "FormAddItemLot",
  5579. title: "其他入库条码产生",
  5580. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5581. width: "550px",
  5582. height: "1000px",
  5583. callBack: function (iframeId) {
  5584. top.frames[iframeId].submitForm();
  5585. }
  5586. });
  5587. }
  5588. else {
  5589. $.modalOpen({
  5590. id: "FormAddItemLot",
  5591. title: "其他入库条码产生",
  5592. url: "/JinHuaWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5593. width: "550px",
  5594. height: "1000px",
  5595. callBack: function (iframeId) {
  5596. top.frames[iframeId].submitForm();
  5597. }
  5598. });
  5599. }
  5600. } else if (Type == '6') {
  5601. for (var i in ids) {
  5602. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  5603. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5604. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5605. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5606. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5607. }
  5608. $.modalOpen({
  5609. id: "FormAddItemLot",
  5610. title: "归还单条码产生",
  5611. url: "/JinHuaWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5612. width: "550px",
  5613. height: "1000px",
  5614. callBack: function (iframeId) {
  5615. top.frames[iframeId].submitForm();
  5616. }
  5617. });
  5618. } else if (Type == '7') {
  5619. for (var i in ids) {
  5620. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  5621. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5622. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5623. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5624. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5625. IsSpecialInv = $("#gridList").jqGrid('getRowData', ids[i]).IsSpecialInv;
  5626. }
  5627. console.log($(event.target).attr('id'));
  5628. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5629. $.modalOpen({
  5630. id: "FormAddItemLot",
  5631. title: "采购入库生成条码",
  5632. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5633. width: "650px",
  5634. height: "1000px",
  5635. callBack: function (iframeId) {
  5636. top.frames[iframeId].submitForm();
  5637. }
  5638. });
  5639. }
  5640. else {
  5641. if (IsSpecialInv == "1") {
  5642. $.modalAlert("无条码物料请使用非规则生成条码!", "error");
  5643. return;
  5644. }
  5645. $.modalOpen({
  5646. id: "FormAddItemLot",
  5647. title: "审核到货单生成条码",
  5648. url: "/JinHuaWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5649. width: "550px",
  5650. height: "1000px",
  5651. callBack: function (iframeId) {
  5652. top.frames[iframeId].submitForm();
  5653. }
  5654. });
  5655. }
  5656. } else if (Type == '8') {
  5657. for (var i in ids) {
  5658. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  5659. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5660. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  5661. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5662. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5663. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5664. }
  5665. $.modalOpen({
  5666. id: "FormAddItemLot",
  5667. title: "审核委外到货单生成条码",
  5668. url: "/JinHuaWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(),
  5669. width: "550px",
  5670. height: "1000px",
  5671. callBack: function (iframeId) {
  5672. top.frames[iframeId].submitForm();
  5673. }
  5674. });
  5675. } else if (Type == '9') {
  5676. for (var i in ids) {
  5677. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5678. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5679. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5680. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5681. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5682. }
  5683. $.modalOpen({
  5684. id: "FormAddItemLot",
  5685. title: "开立成品入库单生成条码",
  5686. url: "/JinHuaWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5687. width: "550px",
  5688. height: "1000px",
  5689. callBack: function (iframeId) {
  5690. top.frames[iframeId].submitForm();
  5691. }
  5692. });
  5693. } else if (Type == '10') {
  5694. for (var i in ids) {
  5695. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  5696. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5697. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5698. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5699. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5700. }
  5701. $.modalOpen({
  5702. id: "FormAddItemLot",
  5703. title: "审核拒收单生成条码",
  5704. url: "/JinHuaWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5705. width: "550px",
  5706. height: "1000px",
  5707. callBack: function (iframeId) {
  5708. top.frames[iframeId].submitForm();
  5709. }
  5710. });
  5711. } else if (Type == '11') {
  5712. for (var i in ids) {
  5713. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  5714. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  5715. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5716. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5717. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5718. }
  5719. $.modalOpen({
  5720. id: "FormAddItemLot",
  5721. title: "审核委外拒收单生成条码",
  5722. url: "/JinHuaWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5723. width: "550px",
  5724. height: "1000px",
  5725. callBack: function (iframeId) {
  5726. top.frames[iframeId].submitForm();
  5727. }
  5728. });
  5729. } else if (Type == '12') {
  5730. for (var i in ids) {
  5731. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5732. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5733. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5734. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5735. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5736. }
  5737. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5738. $.modalOpen({
  5739. id: "FormAddItemLot",
  5740. title: "审核领料申请退料生成条码",
  5741. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5742. width: "550px",
  5743. height: "1000px",
  5744. callBack: function (iframeId) {
  5745. top.frames[iframeId].submitForm();
  5746. }
  5747. });
  5748. }
  5749. else {
  5750. $.modalOpen({
  5751. id: "FormAddItemLot",
  5752. title: "审核领料申请退料生成条码",
  5753. url: "/JinHuaWMS/WMSCreateItemLot/From?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5754. width: "550px",
  5755. height: "1000px",
  5756. callBack: function (iframeId) {
  5757. top.frames[iframeId].submitForm();
  5758. }
  5759. });
  5760. }
  5761. } else if (Type == '13') {
  5762. for (var i in ids) {
  5763. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5764. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5765. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5766. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5767. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5768. }
  5769. $.modalOpen({
  5770. id: "FormAddItemLot",
  5771. title: "材料出库退料生成条码",
  5772. url: "/JinHuaWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5773. width: "550px",
  5774. height: "1000px",
  5775. callBack: function (iframeId) {
  5776. top.frames[iframeId].submitForm();
  5777. }
  5778. });
  5779. } else if (Type == '14') {
  5780. for (var i in ids) {
  5781. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  5782. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5783. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5784. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5785. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5786. }
  5787. $.modalOpen({
  5788. id: "FormAddItemLot",
  5789. title: "委外领料退料条码生成",
  5790. url: "/JinHuaWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5791. width: "550px",
  5792. height: "1000px",
  5793. callBack: function (iframeId) {
  5794. top.frames[iframeId].submitForm();
  5795. }
  5796. });
  5797. }
  5798. else if (Type == '15') {
  5799. for (var i in ids) {
  5800. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  5801. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5802. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5803. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5804. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5805. }
  5806. $.modalOpen({
  5807. id: "FormAddItemLot",
  5808. title: "委外材料出库退料生成条码",
  5809. url: "/JinHuaWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5810. width: "550px",
  5811. height: "1000px",
  5812. callBack: function (iframeId) {
  5813. top.frames[iframeId].submitForm();
  5814. }
  5815. });
  5816. }
  5817. else if (Type == '16') {
  5818. for (var i in ids) {
  5819. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  5820. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5821. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5822. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5823. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5824. }
  5825. $.modalOpen({
  5826. id: "FormAddItemLot",
  5827. title: "返工工单生成条码",
  5828. url: "/JinHuaWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5829. width: "550px",
  5830. height: "1000px",
  5831. callBack: function (iframeId) {
  5832. top.frames[iframeId].submitForm();
  5833. }
  5834. });
  5835. }
  5836. else if (Type == '18') {
  5837. for (var i in ids) {
  5838. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  5839. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5840. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  5841. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5842. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5843. }
  5844. $.modalOpen({
  5845. id: "FormAddItemLot",
  5846. title: "副产品生成条码",
  5847. url: "/JinHuaWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5848. width: "550px",
  5849. height: "1000px",
  5850. callBack: function (iframeId) {
  5851. top.frames[iframeId].submitForm();
  5852. }
  5853. });
  5854. }
  5855. else if (Type == '20') {
  5856. for (var i in ids) {
  5857. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5858. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5859. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5860. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5861. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5862. }
  5863. $.modalOpen({
  5864. id: "FormAddItemLot",
  5865. title: "两步调入生成条码",
  5866. url: "/JinHuaWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5867. width: "550px",
  5868. height: "1000px",
  5869. callBack: function (iframeId) {
  5870. top.frames[iframeId].submitForm();
  5871. }
  5872. });
  5873. }
  5874. else if (Type == '22') {
  5875. for (var i in ids) {
  5876. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5877. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5878. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5879. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5880. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5881. }
  5882. console.log($(event.target).attr('id'));
  5883. if ($(event.target).attr('id') == 'NF-CreateNew')
  5884. {
  5885. $.modalOpen({
  5886. id: "FormAddItemLot",
  5887. title: "采购入库生成条码",
  5888. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5889. width: "550px",
  5890. height: "1000px",
  5891. callBack: function (iframeId) {
  5892. top.frames[iframeId].submitForm();
  5893. }
  5894. });
  5895. }
  5896. else {
  5897. $.modalOpen({
  5898. id: "FormAddItemLot",
  5899. title: "采购入库生成条码",
  5900. url: "/JinHuaWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5901. width: "550px",
  5902. height: "1000px",
  5903. callBack: function (iframeId) {
  5904. top.frames[iframeId].submitForm();
  5905. }
  5906. });
  5907. }
  5908. }
  5909. else if (Type == '23') {
  5910. for (var i in ids) {
  5911. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5912. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5913. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5914. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5915. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5916. }
  5917. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5918. $.modalOpen({
  5919. id: "FormAddItemLot",
  5920. title: "委外采购入库生成条码",
  5921. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5922. width: "550px",
  5923. height: "1000px",
  5924. callBack: function (iframeId) {
  5925. top.frames[iframeId].submitForm();
  5926. }
  5927. });
  5928. }
  5929. else {
  5930. $.modalOpen({
  5931. id: "FormAddItemLot",
  5932. title: "委外采购入库生成条码",
  5933. url: "/JinHuaWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5934. width: "550px",
  5935. height: "1000px",
  5936. callBack: function (iframeId) {
  5937. top.frames[iframeId].submitForm();
  5938. }
  5939. });
  5940. }
  5941. }
  5942. else if (Type == '24') {
  5943. for (var i in ids) {
  5944. SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  5945. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5946. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5947. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5948. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5949. }
  5950. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5951. $.modalOpen({
  5952. id: "FormAddItemLot",
  5953. title: "红字销售出库单生成条码",
  5954. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5955. width: "550px",
  5956. height: "1000px",
  5957. callBack: function (iframeId) {
  5958. top.frames[iframeId].submitForm();
  5959. }
  5960. });
  5961. }
  5962. else {
  5963. $.modalOpen({
  5964. id: "FormAddItemLot",
  5965. title: "红字销售出库单生成条码",
  5966. url: "/JinHuaWMS/WMSCreateItemLot/FromPN?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5967. width: "550px",
  5968. height: "1000px",
  5969. callBack: function (iframeId) {
  5970. top.frames[iframeId].submitForm();
  5971. }
  5972. });
  5973. }
  5974. }
  5975. else if (Type == '201') {
  5976. for (var i in ids) {
  5977. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5978. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5979. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5980. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5981. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5982. }
  5983. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5984. $.modalOpen({
  5985. id: "FormAddItemLot",
  5986. title: "调拨申请单生成条码",
  5987. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5988. width: "550px",
  5989. height: "1000px",
  5990. callBack: function (iframeId) {
  5991. top.frames[iframeId].submitForm();
  5992. }
  5993. });
  5994. }
  5995. else {
  5996. $.modalOpen({
  5997. id: "FormAddItemLot",
  5998. title: "调拨申请单生成条码",
  5999. url: "/JinHuaWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6000. width: "550px",
  6001. height: "1000px",
  6002. callBack: function (iframeId) {
  6003. top.frames[iframeId].submitForm();
  6004. }
  6005. });
  6006. }
  6007. }
  6008. else if (Type == '202') {
  6009. for (var i in ids) {
  6010. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6011. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6012. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6013. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6014. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6015. }
  6016. $.modalOpen({
  6017. id: "FormAddItemLot",
  6018. title: "调拨申请单生成条码",
  6019. url: "/JinHuaWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6020. width: "550px",
  6021. height: "1000px",
  6022. callBack: function (iframeId) {
  6023. top.frames[iframeId].submitForm();
  6024. }
  6025. });
  6026. }
  6027. else if (Type == '203') {
  6028. for (var i in ids) {
  6029. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6030. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6031. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6032. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6033. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6034. }
  6035. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6036. $.modalOpen({
  6037. id: "FormAddItemLot",
  6038. title: "调拨申请单生成条码",
  6039. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 203 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6040. width: "550px",
  6041. height: "1000px",
  6042. callBack: function (iframeId) {
  6043. top.frames[iframeId].submitForm();
  6044. }
  6045. });
  6046. }
  6047. else {
  6048. $.modalOpen({
  6049. id: "FormAddItemLot",
  6050. title: "调拨申请单生成条码",
  6051. url: "/JinHuaWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 203 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6052. width: "550px",
  6053. height: "1000px",
  6054. callBack: function (iframeId) {
  6055. top.frames[iframeId].submitForm();
  6056. }
  6057. });
  6058. }
  6059. }
  6060. }
  6061. function btnCreatePN() {
  6062. debugger;
  6063. var PoStatus;
  6064. var jsonData = '';
  6065. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  6066. if (ids.length != 1) {
  6067. $.modalAlertNew("WMS00100");
  6068. return;
  6069. }
  6070. var POCode = "";
  6071. var PORow = "";
  6072. if (Type == '1') {
  6073. for (var i in ids) {
  6074. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6075. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6076. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6077. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6078. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6079. }
  6080. $.modalOpen({
  6081. id: "FormAddItemLot",
  6082. title: "生产退料条码生成",
  6083. url: "/JinHuaWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6084. width: "550px",
  6085. height: "1000px",
  6086. callBack: function (iframeId) {
  6087. top.frames[iframeId].submitForm();
  6088. }
  6089. });
  6090. } else if (Type == '2') {
  6091. for (var i in ids) {
  6092. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6093. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6094. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6095. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6096. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6097. }
  6098. $.modalOpen({
  6099. id: "FormAddItemLot",
  6100. title: "委外退料条码生成",
  6101. url: "/JinHuaWMS/WMSCreateItemLot/FromPN?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6102. width: "550px",
  6103. height: "1000px",
  6104. callBack: function (iframeId) {
  6105. top.frames[iframeId].submitForm();
  6106. }
  6107. });
  6108. } else if (Type == '3') {
  6109. for (var i in ids) {
  6110. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  6111. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6112. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6113. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6114. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6115. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6116. }
  6117. $.modalOpen({
  6118. id: "FormAddItemLot",
  6119. title: "成品条码产生",
  6120. url: "/JinHuaWMS/WMSCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  6121. width: "550px",
  6122. height: "1000px",
  6123. callBack: function (iframeId) {
  6124. top.frames[iframeId].submitForm();
  6125. }
  6126. });
  6127. } else if (Type == '4') {
  6128. for (var i in ids) {
  6129. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  6130. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6131. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6132. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6133. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6134. }
  6135. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6136. $.modalOpen({
  6137. id: "FormAddItemLot",
  6138. title: "销售退货条码产生",
  6139. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6140. width: "550px",
  6141. height: "1000px",
  6142. callBack: function (iframeId) {
  6143. top.frames[iframeId].submitForm();
  6144. }
  6145. });
  6146. }
  6147. else {
  6148. $.modalOpen({
  6149. id: "FormAddItemLot",
  6150. title: "销售退货条码产生",
  6151. url: "/JinHuaWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6152. width: "550px",
  6153. height: "1000px",
  6154. callBack: function (iframeId) {
  6155. top.frames[iframeId].submitForm();
  6156. }
  6157. });
  6158. }
  6159. } else if (Type == '5') {
  6160. for (var i in ids) {
  6161. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  6162. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6163. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6164. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6165. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6166. }
  6167. $.modalOpen({
  6168. id: "FormAddItemLot",
  6169. title: "其他入库条码产生",
  6170. url: "/JinHuaWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6171. width: "550px",
  6172. height: "1000px",
  6173. callBack: function (iframeId) {
  6174. top.frames[iframeId].submitForm();
  6175. }
  6176. });
  6177. } else if (Type == '6') {
  6178. for (var i in ids) {
  6179. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  6180. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6181. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6182. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6183. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6184. }
  6185. $.modalOpen({
  6186. id: "FormAddItemLot",
  6187. title: "归还单条码产生",
  6188. url: "/JinHuaWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6189. width: "550px",
  6190. height: "1000px",
  6191. callBack: function (iframeId) {
  6192. top.frames[iframeId].submitForm();
  6193. }
  6194. });
  6195. } else if (Type == '7') {
  6196. for (var i in ids) {
  6197. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  6198. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6199. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6200. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6201. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6202. }
  6203. $.modalOpen({
  6204. id: "FormAddItemLot",
  6205. title: "审核到货单生成条码",
  6206. url: "/JinHuaWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6207. width: "550px",
  6208. height: "1000px",
  6209. callBack: function (iframeId) {
  6210. top.frames[iframeId].submitForm();
  6211. }
  6212. });
  6213. } else if (Type == '8') {
  6214. for (var i in ids) {
  6215. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  6216. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6217. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  6218. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6219. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6220. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6221. }
  6222. $.modalOpen({
  6223. id: "FormAddItemLot",
  6224. title: "审核委外到货单生成条码",
  6225. url: "/JinHuaWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(),
  6226. width: "550px",
  6227. height: "1000px",
  6228. callBack: function (iframeId) {
  6229. top.frames[iframeId].submitForm();
  6230. }
  6231. });
  6232. } else if (Type == '9') {
  6233. for (var i in ids) {
  6234. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6235. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6236. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6237. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6238. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6239. }
  6240. $.modalOpen({
  6241. id: "FormAddItemLot",
  6242. title: "开立成品入库单生成条码",
  6243. url: "/JinHuaWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6244. width: "550px",
  6245. height: "1000px",
  6246. callBack: function (iframeId) {
  6247. top.frames[iframeId].submitForm();
  6248. }
  6249. });
  6250. } else if (Type == '10') {
  6251. for (var i in ids) {
  6252. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  6253. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6254. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6255. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6256. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6257. }
  6258. $.modalOpen({
  6259. id: "FormAddItemLot",
  6260. title: "审核拒收单生成条码",
  6261. url: "/JinHuaWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6262. width: "550px",
  6263. height: "1000px",
  6264. callBack: function (iframeId) {
  6265. top.frames[iframeId].submitForm();
  6266. }
  6267. });
  6268. } else if (Type == '11') {
  6269. for (var i in ids) {
  6270. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  6271. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  6272. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6273. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6274. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6275. }
  6276. $.modalOpen({
  6277. id: "FormAddItemLot",
  6278. title: "审核委外拒收单生成条码",
  6279. url: "/JinHuaWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6280. width: "550px",
  6281. height: "1000px",
  6282. callBack: function (iframeId) {
  6283. top.frames[iframeId].submitForm();
  6284. }
  6285. });
  6286. } else if (Type == '12') {
  6287. for (var i in ids) {
  6288. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6289. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6290. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6291. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6292. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6293. }
  6294. $.modalOpen({
  6295. id: "FormAddItemLot",
  6296. title: "审核领料申请退料生成条码",
  6297. url: "/JinHuaWMS/WMSCreateItemLot/FromPN?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6298. width: "550px",
  6299. height: "1000px",
  6300. callBack: function (iframeId) {
  6301. top.frames[iframeId].submitForm();
  6302. }
  6303. });
  6304. } else if (Type == '13') {
  6305. for (var i in ids) {
  6306. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6307. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6308. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6309. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6310. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6311. }
  6312. $.modalOpen({
  6313. id: "FormAddItemLot",
  6314. title: "材料出库退料生成条码",
  6315. url: "/JinHuaWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6316. width: "550px",
  6317. height: "1000px",
  6318. callBack: function (iframeId) {
  6319. top.frames[iframeId].submitForm();
  6320. }
  6321. });
  6322. } else if (Type == '14') {
  6323. for (var i in ids) {
  6324. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6325. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6326. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6327. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6328. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6329. }
  6330. $.modalOpen({
  6331. id: "FormAddItemLot",
  6332. title: "委外领料退料条码生成",
  6333. url: "/JinHuaWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6334. width: "550px",
  6335. height: "1000px",
  6336. callBack: function (iframeId) {
  6337. top.frames[iframeId].submitForm();
  6338. }
  6339. });
  6340. }
  6341. else if (Type == '15') {
  6342. for (var i in ids) {
  6343. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6344. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6345. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6346. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6347. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6348. }
  6349. $.modalOpen({
  6350. id: "FormAddItemLot",
  6351. title: "委外材料出库退料生成条码",
  6352. url: "/JinHuaWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6353. width: "550px",
  6354. height: "1000px",
  6355. callBack: function (iframeId) {
  6356. top.frames[iframeId].submitForm();
  6357. }
  6358. });
  6359. }
  6360. else if (Type == '16') {
  6361. for (var i in ids) {
  6362. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6363. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6364. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6365. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6366. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6367. }
  6368. $.modalOpen({
  6369. id: "FormAddItemLot",
  6370. title: "返工工单生成条码",
  6371. url: "/JinHuaWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6372. width: "550px",
  6373. height: "1000px",
  6374. callBack: function (iframeId) {
  6375. top.frames[iframeId].submitForm();
  6376. }
  6377. });
  6378. }
  6379. else if (Type == '18') {
  6380. for (var i in ids) {
  6381. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6382. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6383. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  6384. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6385. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6386. }
  6387. $.modalOpen({
  6388. id: "FormAddItemLot",
  6389. title: "副产品生成条码",
  6390. url: "/JinHuaWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6391. width: "550px",
  6392. height: "1000px",
  6393. callBack: function (iframeId) {
  6394. top.frames[iframeId].submitForm();
  6395. }
  6396. });
  6397. }
  6398. else if (Type == '20') {
  6399. for (var i in ids) {
  6400. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6401. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6402. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6403. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6404. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6405. }
  6406. $.modalOpen({
  6407. id: "FormAddItemLot",
  6408. title: "两步调入生成条码",
  6409. url: "/JinHuaWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6410. width: "550px",
  6411. height: "1000px",
  6412. callBack: function (iframeId) {
  6413. top.frames[iframeId].submitForm();
  6414. }
  6415. });
  6416. }
  6417. else if (Type == '22') {
  6418. for (var i in ids) {
  6419. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6420. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6421. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6422. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6423. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6424. }
  6425. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6426. $.modalOpen({
  6427. id: "FormAddItemLot",
  6428. title: "采购入库生成条码",
  6429. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6430. width: "550px",
  6431. height: "1000px",
  6432. callBack: function (iframeId) {
  6433. top.frames[iframeId].submitForm();
  6434. }
  6435. });
  6436. }
  6437. else {
  6438. $.modalOpen({
  6439. id: "FormAddItemLot",
  6440. title: "采购入库生成条码",
  6441. url: "/JinHuaWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6442. width: "550px",
  6443. height: "1000px",
  6444. callBack: function (iframeId) {
  6445. top.frames[iframeId].submitForm();
  6446. }
  6447. });
  6448. }
  6449. }
  6450. else if (Type == '23') {
  6451. for (var i in ids) {
  6452. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6453. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6454. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6455. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6456. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6457. }
  6458. $.modalOpen({
  6459. id: "FormAddItemLot",
  6460. title: "委外采购入库生成条码",
  6461. url: "/JinHuaWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6462. width: "550px",
  6463. height: "1000px",
  6464. callBack: function (iframeId) {
  6465. top.frames[iframeId].submitForm();
  6466. }
  6467. });
  6468. }
  6469. else if (Type == '24') {
  6470. for (var i in ids) {
  6471. SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  6472. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6473. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6474. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6475. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6476. }
  6477. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6478. $.modalOpen({
  6479. id: "FormAddItemLot",
  6480. title: "红字销售出库单生成条码",
  6481. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6482. width: "550px",
  6483. height: "1000px",
  6484. callBack: function (iframeId) {
  6485. top.frames[iframeId].submitForm();
  6486. }
  6487. });
  6488. }
  6489. else {
  6490. $.modalOpen({
  6491. id: "FormAddItemLot",
  6492. title: "红字销售出库单生成条码",
  6493. url: "/JinHuaWMS/WMSCreateItemLot/From?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6494. width: "550px",
  6495. height: "1000px",
  6496. callBack: function (iframeId) {
  6497. top.frames[iframeId].submitForm();
  6498. }
  6499. });
  6500. }
  6501. }
  6502. else if (Type == '201') {
  6503. for (var i in ids) {
  6504. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6505. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6506. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6507. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6508. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6509. }
  6510. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6511. $.modalOpen({
  6512. id: "FormAddItemLot",
  6513. title: "调拨申请单生成条码",
  6514. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6515. width: "550px",
  6516. height: "1000px",
  6517. callBack: function (iframeId) {
  6518. top.frames[iframeId].submitForm();
  6519. }
  6520. });
  6521. }
  6522. else {
  6523. $.modalOpen({
  6524. id: "FormAddItemLot",
  6525. title: "调拨申请单生成条码",
  6526. url: "/JinHuaWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6527. width: "550px",
  6528. height: "1000px",
  6529. callBack: function (iframeId) {
  6530. top.frames[iframeId].submitForm();
  6531. }
  6532. });
  6533. }
  6534. }
  6535. else if (Type == '202') {
  6536. for (var i in ids) {
  6537. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6538. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6539. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6540. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6541. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6542. }
  6543. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6544. $.modalOpen({
  6545. id: "FormAddItemLot",
  6546. title: "调拨申请单生成条码",
  6547. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6548. width: "550px",
  6549. height: "1000px",
  6550. callBack: function (iframeId) {
  6551. top.frames[iframeId].submitForm();
  6552. }
  6553. });
  6554. }
  6555. else {
  6556. $.modalOpen({
  6557. id: "FormAddItemLot",
  6558. title: "调拨申请单生成条码",
  6559. url: "/JinHuaWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6560. width: "550px",
  6561. height: "1000px",
  6562. callBack: function (iframeId) {
  6563. top.frames[iframeId].submitForm();
  6564. }
  6565. });
  6566. }
  6567. }
  6568. }
  6569. function btnCreateHG() {
  6570. debugger;
  6571. var PoStatus;
  6572. var jsonData = '';
  6573. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  6574. if (ids.length != 1) {
  6575. $.modalAlertNew("WMS00100");
  6576. return;
  6577. }
  6578. var POCode = "";
  6579. var PORow = "";
  6580. if (Type == '1') {
  6581. for (var i in ids) {
  6582. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6583. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6584. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6585. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6586. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6587. }
  6588. $.modalOpen({
  6589. id: "FormAddItemLot",
  6590. title: "生产退料条码生成",
  6591. url: "/JinHuaWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6592. width: "550px",
  6593. height: "1000px",
  6594. callBack: function (iframeId) {
  6595. top.frames[iframeId].submitForm();
  6596. }
  6597. });
  6598. } else if (Type == '2') {
  6599. for (var i in ids) {
  6600. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6601. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6602. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6603. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6604. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6605. }
  6606. $.modalOpen({
  6607. id: "FormAddItemLot",
  6608. title: "委外退料条码生成",
  6609. url: "/JinHuaWMS/WMSCreateItemLot/From?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6610. width: "550px",
  6611. height: "1000px",
  6612. callBack: function (iframeId) {
  6613. top.frames[iframeId].submitForm();
  6614. }
  6615. });
  6616. } else if (Type == '3') {
  6617. for (var i in ids) {
  6618. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  6619. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6620. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6621. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6622. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6623. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6624. }
  6625. $.modalOpen({
  6626. id: "FormAddItemLot",
  6627. title: "成品条码产生",
  6628. url: "/JinHuaWMS/WMSCreateItemLot/FromHG?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  6629. width: "550px",
  6630. height: "1000px",
  6631. callBack: function (iframeId) {
  6632. top.frames[iframeId].submitForm();
  6633. }
  6634. });
  6635. } else if (Type == '4') {
  6636. for (var i in ids) {
  6637. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  6638. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6639. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6640. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6641. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6642. }
  6643. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6644. $.modalOpen({
  6645. id: "FormAddItemLot",
  6646. title: "销售退货条码产生",
  6647. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6648. width: "550px",
  6649. height: "1000px",
  6650. callBack: function (iframeId) {
  6651. top.frames[iframeId].submitForm();
  6652. }
  6653. });
  6654. }
  6655. else {
  6656. $.modalOpen({
  6657. id: "FormAddItemLot",
  6658. title: "销售退货条码产生",
  6659. url: "/JinHuaWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6660. width: "550px",
  6661. height: "1000px",
  6662. callBack: function (iframeId) {
  6663. top.frames[iframeId].submitForm();
  6664. }
  6665. });
  6666. }
  6667. } else if (Type == '5') {
  6668. for (var i in ids) {
  6669. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  6670. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6671. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6672. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6673. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6674. }
  6675. $.modalOpen({
  6676. id: "FormAddItemLot",
  6677. title: "其他入库条码产生",
  6678. url: "/JinHuaWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6679. width: "550px",
  6680. height: "1000px",
  6681. callBack: function (iframeId) {
  6682. top.frames[iframeId].submitForm();
  6683. }
  6684. });
  6685. } else if (Type == '6') {
  6686. for (var i in ids) {
  6687. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  6688. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6689. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6690. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6691. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6692. }
  6693. $.modalOpen({
  6694. id: "FormAddItemLot",
  6695. title: "归还单条码产生",
  6696. url: "/JinHuaWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6697. width: "550px",
  6698. height: "1000px",
  6699. callBack: function (iframeId) {
  6700. top.frames[iframeId].submitForm();
  6701. }
  6702. });
  6703. } else if (Type == '7') {
  6704. for (var i in ids) {
  6705. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  6706. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6707. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6708. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6709. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6710. }
  6711. $.modalOpen({
  6712. id: "FormAddItemLot",
  6713. title: "审核到货单生成条码",
  6714. url: "/JinHuaWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6715. width: "550px",
  6716. height: "1000px",
  6717. callBack: function (iframeId) {
  6718. top.frames[iframeId].submitForm();
  6719. }
  6720. });
  6721. } else if (Type == '8') {
  6722. for (var i in ids) {
  6723. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  6724. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6725. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  6726. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6727. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6728. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6729. }
  6730. $.modalOpen({
  6731. id: "FormAddItemLot",
  6732. title: "审核委外到货单生成条码",
  6733. url: "/JinHuaWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(),
  6734. width: "550px",
  6735. height: "1000px",
  6736. callBack: function (iframeId) {
  6737. top.frames[iframeId].submitForm();
  6738. }
  6739. });
  6740. } else if (Type == '9') {
  6741. for (var i in ids) {
  6742. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6743. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6744. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6745. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6746. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6747. }
  6748. $.modalOpen({
  6749. id: "FormAddItemLot",
  6750. title: "开立成品入库单生成条码",
  6751. url: "/JinHuaWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6752. width: "550px",
  6753. height: "1000px",
  6754. callBack: function (iframeId) {
  6755. top.frames[iframeId].submitForm();
  6756. }
  6757. });
  6758. } else if (Type == '10') {
  6759. for (var i in ids) {
  6760. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  6761. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6762. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6763. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6764. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6765. }
  6766. $.modalOpen({
  6767. id: "FormAddItemLot",
  6768. title: "审核拒收单生成条码",
  6769. url: "/JinHuaWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6770. width: "550px",
  6771. height: "1000px",
  6772. callBack: function (iframeId) {
  6773. top.frames[iframeId].submitForm();
  6774. }
  6775. });
  6776. } else if (Type == '11') {
  6777. for (var i in ids) {
  6778. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  6779. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  6780. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6781. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6782. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6783. }
  6784. $.modalOpen({
  6785. id: "FormAddItemLot",
  6786. title: "审核委外拒收单生成条码",
  6787. url: "/JinHuaWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6788. width: "550px",
  6789. height: "1000px",
  6790. callBack: function (iframeId) {
  6791. top.frames[iframeId].submitForm();
  6792. }
  6793. });
  6794. } else if (Type == '12') {
  6795. for (var i in ids) {
  6796. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6797. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6798. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6799. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6800. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6801. }
  6802. $.modalOpen({
  6803. id: "FormAddItemLot",
  6804. title: "审核领料申请退料生成条码",
  6805. url: "/JinHuaWMS/WMSCreateItemLot/FromPN?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6806. width: "550px",
  6807. height: "1000px",
  6808. callBack: function (iframeId) {
  6809. top.frames[iframeId].submitForm();
  6810. }
  6811. });
  6812. } else if (Type == '13') {
  6813. for (var i in ids) {
  6814. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6815. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6816. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6817. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6818. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6819. }
  6820. $.modalOpen({
  6821. id: "FormAddItemLot",
  6822. title: "材料出库退料生成条码",
  6823. url: "/JinHuaWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6824. width: "550px",
  6825. height: "1000px",
  6826. callBack: function (iframeId) {
  6827. top.frames[iframeId].submitForm();
  6828. }
  6829. });
  6830. } else if (Type == '14') {
  6831. for (var i in ids) {
  6832. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6833. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6834. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6835. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6836. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6837. }
  6838. $.modalOpen({
  6839. id: "FormAddItemLot",
  6840. title: "委外领料退料条码生成",
  6841. url: "/JinHuaWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6842. width: "550px",
  6843. height: "1000px",
  6844. callBack: function (iframeId) {
  6845. top.frames[iframeId].submitForm();
  6846. }
  6847. });
  6848. }
  6849. else if (Type == '15') {
  6850. for (var i in ids) {
  6851. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6852. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6853. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6854. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6855. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6856. }
  6857. $.modalOpen({
  6858. id: "FormAddItemLot",
  6859. title: "委外材料出库退料生成条码",
  6860. url: "/JinHuaWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6861. width: "550px",
  6862. height: "1000px",
  6863. callBack: function (iframeId) {
  6864. top.frames[iframeId].submitForm();
  6865. }
  6866. });
  6867. }
  6868. else if (Type == '16') {
  6869. for (var i in ids) {
  6870. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6871. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6872. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6873. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6874. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6875. }
  6876. $.modalOpen({
  6877. id: "FormAddItemLot",
  6878. title: "返工工单生成条码",
  6879. url: "/JinHuaWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6880. width: "550px",
  6881. height: "1000px",
  6882. callBack: function (iframeId) {
  6883. top.frames[iframeId].submitForm();
  6884. }
  6885. });
  6886. }
  6887. else if (Type == '18') {
  6888. for (var i in ids) {
  6889. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6890. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6891. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  6892. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6893. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6894. }
  6895. $.modalOpen({
  6896. id: "FormAddItemLot",
  6897. title: "副产品生成条码",
  6898. url: "/JinHuaWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6899. width: "550px",
  6900. height: "1000px",
  6901. callBack: function (iframeId) {
  6902. top.frames[iframeId].submitForm();
  6903. }
  6904. });
  6905. }
  6906. else if (Type == '20') {
  6907. for (var i in ids) {
  6908. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6909. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6910. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6911. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6912. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6913. }
  6914. $.modalOpen({
  6915. id: "FormAddItemLot",
  6916. title: "两步调入生成条码",
  6917. url: "/JinHuaWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6918. width: "550px",
  6919. height: "1000px",
  6920. callBack: function (iframeId) {
  6921. top.frames[iframeId].submitForm();
  6922. }
  6923. });
  6924. }
  6925. else if (Type == '22') {
  6926. for (var i in ids) {
  6927. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6928. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6929. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6930. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6931. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6932. }
  6933. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6934. $.modalOpen({
  6935. id: "FormAddItemLot",
  6936. title: "采购入库生成条码",
  6937. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6938. width: "550px",
  6939. height: "1000px",
  6940. callBack: function (iframeId) {
  6941. top.frames[iframeId].submitForm();
  6942. }
  6943. });
  6944. }
  6945. else {
  6946. $.modalOpen({
  6947. id: "FormAddItemLot",
  6948. title: "采购入库生成条码",
  6949. url: "/JinHuaWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6950. width: "550px",
  6951. height: "1000px",
  6952. callBack: function (iframeId) {
  6953. top.frames[iframeId].submitForm();
  6954. }
  6955. });
  6956. }
  6957. }
  6958. else if (Type == '23') {
  6959. for (var i in ids) {
  6960. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6961. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6962. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6963. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6964. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6965. }
  6966. $.modalOpen({
  6967. id: "FormAddItemLot",
  6968. title: "委外采购入库生成条码",
  6969. url: "/JinHuaWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6970. width: "550px",
  6971. height: "1000px",
  6972. callBack: function (iframeId) {
  6973. top.frames[iframeId].submitForm();
  6974. }
  6975. });
  6976. }
  6977. else if (Type == '24') {
  6978. for (var i in ids) {
  6979. SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  6980. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6981. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6982. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6983. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6984. }
  6985. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6986. $.modalOpen({
  6987. id: "FormAddItemLot",
  6988. title: "红字销售出库单生成条码",
  6989. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6990. width: "550px",
  6991. height: "1000px",
  6992. callBack: function (iframeId) {
  6993. top.frames[iframeId].submitForm();
  6994. }
  6995. });
  6996. }
  6997. else {
  6998. $.modalOpen({
  6999. id: "FormAddItemLot",
  7000. title: "红字销售出库单生成条码",
  7001. url: "/JinHuaWMS/WMSCreateItemLot/From?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  7002. width: "550px",
  7003. height: "1000px",
  7004. callBack: function (iframeId) {
  7005. top.frames[iframeId].submitForm();
  7006. }
  7007. });
  7008. }
  7009. }
  7010. else if (Type == '201') {
  7011. for (var i in ids) {
  7012. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  7013. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  7014. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  7015. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  7016. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  7017. }
  7018. if ($(event.target).attr('id') == 'NF-CreateNew') {
  7019. $.modalOpen({
  7020. id: "FormAddItemLot",
  7021. title: "调拨申请单生成条码",
  7022. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  7023. width: "550px",
  7024. height: "1000px",
  7025. callBack: function (iframeId) {
  7026. top.frames[iframeId].submitForm();
  7027. }
  7028. });
  7029. }
  7030. else {
  7031. $.modalOpen({
  7032. id: "FormAddItemLot",
  7033. title: "调拨申请单生成条码",
  7034. url: "/JinHuaWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  7035. width: "550px",
  7036. height: "1000px",
  7037. callBack: function (iframeId) {
  7038. top.frames[iframeId].submitForm();
  7039. }
  7040. });
  7041. }
  7042. }
  7043. else if (Type == '202') {
  7044. for (var i in ids) {
  7045. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  7046. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  7047. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  7048. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  7049. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  7050. }
  7051. if ($(event.target).attr('id') == 'NF-CreateNew') {
  7052. $.modalOpen({
  7053. id: "FormAddItemLot",
  7054. title: "调拨申请单生成条码",
  7055. url: "/JinHuaWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  7056. width: "550px",
  7057. height: "1000px",
  7058. callBack: function (iframeId) {
  7059. top.frames[iframeId].submitForm();
  7060. }
  7061. });
  7062. }
  7063. else {
  7064. $.modalOpen({
  7065. id: "FormAddItemLot",
  7066. title: "调拨申请单生成条码",
  7067. url: "/JinHuaWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  7068. width: "550px",
  7069. height: "1000px",
  7070. callBack: function (iframeId) {
  7071. top.frames[iframeId].submitForm();
  7072. }
  7073. });
  7074. }
  7075. }
  7076. }
  7077. function SendLiKu()
  7078. {
  7079. debugger;
  7080. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  7081. if (ids.length != 1) {
  7082. $.modalAlertNew("WMS00100");
  7083. return;
  7084. }
  7085. var selectData = $("#gridList").jqGrid('getRowData',ids[0]);
  7086. //采购到货生成条码 调用立库接口
  7087. if (type == '7')
  7088. {
  7089. var DNCode = selectData.DNCode; //采购单号
  7090. //判断该采购单号是否已整单生成
  7091. $.ajax({
  7092. url: "/WMSCreateItemLot/IsALLCreate?" + Math.random(),
  7093. dataType: "json",
  7094. async: false,
  7095. success: function (data) {
  7096. if (data != null && data.length > 0) {
  7097. DateList = data;
  7098. for (var i = 0; i < data.length; i++) {
  7099. var TableCode = data[i].TableCode;
  7100. if (TableCode == "ICSTransferApplication") {
  7101. var Code = data[i].Code;
  7102. var Name = data[i].Name;
  7103. var obj = new Array();
  7104. obj = {
  7105. label: Name,
  7106. name: Code,
  7107. width: 80,
  7108. align: "left"
  7109. }
  7110. cols.push(obj);
  7111. }
  7112. if (TableCode == "ICSInventory") {
  7113. var Code = "ICSInventory" + data[i].Code;
  7114. var Name = data[i].Name;
  7115. var obj = new Array();
  7116. obj = {
  7117. label: Name,
  7118. name: Code,
  7119. width: 80,
  7120. align: "left"
  7121. }
  7122. cols.push(obj);
  7123. //cols1.push(obj);
  7124. }
  7125. }
  7126. }
  7127. _Clos = cols;
  7128. //_Clos1 = cols1;
  7129. }
  7130. });
  7131. }
  7132. }
  7133. function fullscreen() {
  7134. var docElm = document.documentElement;
  7135. if (docElm.requestFullscreen) {
  7136. docElm.requestFullscreen();
  7137. } else if (docElm.mozRequestFullScreen) {
  7138. docElm.mozRequestFullScreen();
  7139. } else if (docElm.webkitRequestFullScreen) {
  7140. docElm.webkitRequestFullScreen();
  7141. } else if (docElm.msRequestFullscreen) {
  7142. docElm.msRequestFullscreen();
  7143. }
  7144. $(window).bind('resize', function () {
  7145. $("#gridList").setGridWidth($(window).width());
  7146. }).trigger('resize');
  7147. $(window).bind('resize', function () {
  7148. $("#gridList").setGridHeight($(window).height());
  7149. }).trigger('resize');
  7150. }
  7151. function btnPrint() {
  7152. debugger;
  7153. if (mold == '')
  7154. {
  7155. if (Type == '1') { mold = '00001'; }//生产退料生成条码
  7156. if (Type == '2') { mold = '00002'; }//委外退料生成条码
  7157. if (Type == '3') { mold = '00003'; }//工单成品生成条码
  7158. if (Type == '4') { mold = '00004'; }//销售退货生成条码
  7159. if (Type == '5') { mold = '00005'; }//其他入库生成条码
  7160. if (Type == '6') { mold = '00006'; }//归还单生成条码
  7161. if (Type == '7') { mold = '00007'; }//普通到货单生成条码
  7162. if (Type == '8') { mold = '00008'; }//委外到货单生成条码
  7163. if (Type == '9') { mold = '00009'; }//成品入库单生成条码
  7164. if (Type == '10') { mold = '00010'; }//拒收单生成条码
  7165. if (Type == '11') { mold = '00011'; }//委外拒收单生成条码
  7166. if (Type == '12') { mold = '00012'; }//领料申请退料
  7167. if (Type == '13') { mold = '00013'; }//材料出库退料
  7168. if (Type == '14') { mold = '00014'; }//委外领料申请退料
  7169. if (Type == '15') { mold = '00015'; }//委外材料出库退料
  7170. if (Type == '16') { mold = '00016'; }//返工工单
  7171. if (Type == '17') { mold = 'BHG00001'; }//不合格条码入库
  7172. if (Type == '18') { mold = 'FCP00001'; }//副产品生成条码
  7173. if (Type == '22') { mold = '00018'; }//采购入库生成条码
  7174. if (Type == '23') { mold = '00019'; }//委外采购入库生成条码
  7175. if (Type == '201') { mold = '00020'; }//委外采购入库生成条码
  7176. if (Type == '202') { mold = '00020'; }//委外采购入库生成条码
  7177. }
  7178. var objArr = '';
  7179. var arr = [];
  7180. var obj = $("#gridList").jqGrid("getRowData");
  7181. for (var i = 0; i < obj.length; i++) {
  7182. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  7183. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  7184. if (rowData != "undefined" && rowData != null && rowData.length != 0) {
  7185. for (var j = 0; j < rowData.length; j++) {
  7186. objArr += "'" + rowData[j] + "',";
  7187. }
  7188. }
  7189. }
  7190. objArr = objArr.slice(0, objArr.length - 1);
  7191. if (objArr == "") {
  7192. $.modalAlertNew("WMS00101");
  7193. return;
  7194. }
  7195. objArr = "" + objArr + "|";
  7196. arr.push(objArr);
  7197. $.modalOpen({
  7198. id: "PrintLot",
  7199. title: "打印",
  7200. url: "/WMS/Print/PrintViewByLot?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  7201. width: "550px",
  7202. height: "1000px",
  7203. callBack: function (iframeId) {
  7204. top.frames[iframeId].submitForm();
  7205. }
  7206. });
  7207. }
  7208. function btnBatchPrint() {
  7209. debugger;
  7210. if (mold == '')
  7211. {
  7212. if (Type == '7') { mold = '00056'; }//普通到货单生成条码
  7213. if (Type == '8') { mold = '00057'; }//委外到货单生成条码
  7214. }
  7215. var objArr = '';
  7216. var arr = [];
  7217. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  7218. if (ids.length == 0) {
  7219. $.modalAlertNew("WMS00100");
  7220. return;
  7221. }
  7222. var ID = '';
  7223. for (var i in ids) {
  7224. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  7225. objArr += "'" + ID + "',";
  7226. }
  7227. objArr = objArr.slice(0, objArr.length - 1);
  7228. objArr = "" + objArr + "|";
  7229. arr.push(objArr);
  7230. var xxx = "";
  7231. $.modalOpen({
  7232. id: "PrintLot",
  7233. title: "打印",
  7234. url: "/WMS/Print/PrintView?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  7235. width: "550px",
  7236. height: "1000px",
  7237. callBack: function (iframeId) {
  7238. top.frames[iframeId].submitForm();
  7239. }
  7240. });
  7241. }
  7242. function btn_ExportAll() {
  7243. debugger;
  7244. var objArr = '';
  7245. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7246. for (var i in ids) {
  7247. objArr += "'" + $("#gridList").jqGrid('getRowData', ids[i]).ID + "',";
  7248. }
  7249. if (objArr=="") {
  7250. $.modalAlert("请选择单据后导出!");
  7251. return;
  7252. }
  7253. var postData = "&Type=" + Type + "";
  7254. //postData += "&ID=" + ID
  7255. postData += "&ID=" + objArr;
  7256. $.download("/JinHuaWMS/WMSCreateItemLot/StatementExportAll" + "?" + Math.random(), postData, 'post');
  7257. }
  7258. function Select_SelGDLX() {
  7259. $("#SelGDLX").find("option").remove();
  7260. var DeptName = $("#SelGDLX option:checked").text();
  7261. $("#SelGDLX").append("<option value=''>--请选择--</option>");
  7262. $.ajax({
  7263. url: "/JinHuaWMS/WMSCreateItemLot/SelGDLX" + "?" + Math.random(),
  7264. dataType: "json",
  7265. async: false,
  7266. success: function (data) {
  7267. if (data != null && data.length > 0) {
  7268. for (var i = 0; i < data.length; i++) {
  7269. $("#SelGDLX").append("<option value='" + data[i].Code + "'>" + data[i].Name + "</option>");
  7270. }
  7271. }
  7272. }
  7273. });
  7274. $("#SelGDLX option:checked").val('');
  7275. }
  7276. function btnCreateLook() {
  7277. var MODetailID = '';
  7278. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7279. for (var i = 0; i < objList.length; i++) {
  7280. var rowId = objList[i];
  7281. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  7282. MODetailID = rowData.MODetailID;
  7283. }
  7284. $.modalOpenClean({
  7285. id: "FormMoPick",
  7286. title: "工单子件信息",
  7287. url: "/JinHuaWMS/WMSCreateItemLot/FormMoPick" + "?" + Math.random() + "&MODetailID=" + MODetailID,
  7288. width: "90%",
  7289. height: "90%",
  7290. callBack: function (iframeId) {
  7291. top.frames[iframeId].submitForm();
  7292. }
  7293. });
  7294. }
  7295. function btn_Import() {
  7296. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  7297. if (objList.length != 1) {
  7298. $.modalAlertNew("WMS00100");
  7299. return;
  7300. }
  7301. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7302. for (var i = 0; i < objList.length; i++) {
  7303. var rowId = objList[i];
  7304. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  7305. var Code = rowData.MOCode;
  7306. var Sequence = rowData.Sequence;
  7307. $.modalOpen({
  7308. id: "Upload",
  7309. title: "导入",
  7310. url: "/JinHuaWMS/WMSCreateItemLot/ImportLot?Code=" + Code + "&Sequence=" + Sequence + "&" + Math.random(),
  7311. width: "400px",
  7312. height: "200px",
  7313. btn: null,
  7314. });
  7315. }
  7316. }
  7317. function btnPrints() {
  7318. debugger;
  7319. // var mold = '';
  7320. if (mold == '') {
  7321. if (Type == '1') { mold = '00001'; }//生产退料生成条码
  7322. if (Type == '2') { mold = '00002'; }//委外退料生成条码
  7323. if (Type == '3') { mold = '00003'; }//工单成品生成条码
  7324. if (Type == '4') { mold = '00004'; }//销售退货生成条码
  7325. if (Type == '5') { mold = '00005'; }//其他入库生成条码
  7326. if (Type == '6') { mold = '00006'; }//归还单生成条码
  7327. if (Type == '7') { mold = '00007'; }//普通到货单生成条码
  7328. if (Type == '8') { mold = '00008'; }//委外到货单生成条码
  7329. if (Type == '9') { mold = '00009'; }//成品入库单生成条码
  7330. if (Type == '10') { mold = '00010'; }//拒收单生成条码
  7331. if (Type == '11') { mold = '00011'; }//委外拒收单生成条码
  7332. if (Type == '12') { mold = '00012'; }//领料申请退料
  7333. if (Type == '13') { mold = '00013'; }//材料出库退料
  7334. if (Type == '14') { mold = '00014'; }//委外领料申请退料
  7335. if (Type == '15') { mold = '00015'; }//委外材料出库退料
  7336. if (Type == '16') { mold = '00016'; }//返工工单
  7337. if (Type == '17') { mold = 'BHG00001'; }//不合格条码入库
  7338. if (Type == '18') { mold = 'FCP00001'; }//副产品生成条码
  7339. }
  7340. var objArr = '';
  7341. var arr = [];
  7342. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7343. for (var i = 0; i < objList.length; i++) {
  7344. var rowId = objList[i];
  7345. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  7346. objArr += "'" + rowData.ID + "',";
  7347. }
  7348. objArr = objArr.slice(0, objArr.length - 1);
  7349. if (objArr == "") {
  7350. $.modalAlertNew("WMS00110");
  7351. return;
  7352. }
  7353. objArr = "" + objArr + "|";
  7354. arr.push(objArr);
  7355. $.modalOpen({
  7356. id: "PrintLot",
  7357. title: "打印",
  7358. url: "/WMS/Print/PrintViewByLot?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  7359. width: "550px",
  7360. height: "1000px",
  7361. callBack: function (iframeId) {
  7362. top.frames[iframeId].submitForm();
  7363. }
  7364. });
  7365. }
  7366. function btnInWareHouse() {
  7367. debugger;
  7368. var objArr = '';
  7369. var arr = [];
  7370. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7371. for (var i = 0; i < objList.length; i++) {
  7372. var rowId = objList[i];
  7373. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  7374. objArr += "'" + rowData.ID + "',";
  7375. }
  7376. objArr = objArr.slice(0, objArr.length - 1);
  7377. if (objArr == "") {
  7378. $.modalAlertNew("WMS00110");
  7379. return;
  7380. }
  7381. arr.push(objArr);
  7382. $.submitForm({
  7383. url: "/JinHuaWMS/WMSCreateItemLot/PostInWareHouse" ,
  7384. param: {
  7385. IDs: JSON.stringify(objArr)
  7386. },
  7387. success: function () {
  7388. $.currentWindow().$("#gridList").trigger("reloadGrid");
  7389. }
  7390. })
  7391. }
  7392. function btn_Rebind() {
  7393. var objArr = '';
  7394. var obj = $("#gridList").jqGrid("getRowData");
  7395. for (var i = 0; i < obj.length; i++) {
  7396. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  7397. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  7398. if (rowData != "undefined" && rowData != null && rowData.length != 0) {
  7399. for (var j = 0; j < rowData.length; j++) {
  7400. var rowDataZ = $SubGird.jqGrid('getRowData', rowData[j]);
  7401. objArr += "'" + rowDataZ.LotNo + "',";
  7402. }
  7403. objArr = objArr.slice(0, objArr.length - 1);
  7404. }
  7405. }
  7406. if (objArr == "") {
  7407. $.modalAlert("请选择条码信息后,进行重新绑定!");
  7408. return;
  7409. }
  7410. $.modalOpen({
  7411. id: "ICSLotRebind",
  7412. title: "条码重新绑定",
  7413. url: "/JinHuaWMS/WMSCreateItemLot/ICSLotRebind?LotNo=" + encodeURI(encodeURI(objArr)) + "&" + Math.random(),
  7414. width: "500px",
  7415. height: "350px",
  7416. callBack: function (iframeId) {
  7417. top.frames[iframeId].submitForm();
  7418. }
  7419. });
  7420. }
  7421. function btn_JinHuaLiKu()
  7422. {
  7423. var objArr = [];
  7424. var obj = $("#gridList").jqGrid("getRowData");
  7425. for (var i = 0; i < obj.length; i++) {
  7426. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  7427. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  7428. if (rowData != "undefined" && rowData != null) {
  7429. for (var j = 0; j < rowData.length; j++) {
  7430. debugger;
  7431. var subData = $SubGird.jqGrid('getRowData', rowData[j]);
  7432. objArr.push(subData);
  7433. }
  7434. }
  7435. }
  7436. //var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  7437. debugger;
  7438. if (objArr.length <= 0) {
  7439. $.modalAlertNew("WMS00077");
  7440. return;
  7441. }
  7442. var Pos = [];
  7443. for (var i = 0; i < objArr.length; i++)
  7444. {
  7445. //var objList = $("#gridList").jqGrid('getRowData', ids[i]);
  7446. debugger;
  7447. var POCode = objArr[i].TransCode;
  7448. if (Pos.length != 0)
  7449. {
  7450. if (Pos[0].PoCode != POCode) {
  7451. $.modalAlert("请选择相同采购订单的数据!", "error");
  7452. return;
  7453. }
  7454. }
  7455. var Sequence = objArr[i].TransSequence;
  7456. Pos.push({ PoCode: POCode, Sequence: Sequence, LotNo: objArr[i].LotNo });
  7457. }
  7458. var wareHouseCode = "";
  7459. var workPoint = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location';
  7460. $.modalOpen({
  7461. id: "FormWareHouseChoose",
  7462. title: "立库仓库选择",
  7463. url: "/JinHuaWMS/WMSCreateItemLot/FormWareHouseChoose?type=" + Type + "&" + Math.random(),
  7464. width: "400px",
  7465. height: "200px",
  7466. callBack: function (iframeId) {
  7467. if (!top.frames[iframeId].submitForm())
  7468. return;
  7469. debugger;
  7470. wareHouseCode = top.frames[iframeId].$("#wareHouseCode").val();
  7471. $.submitForm({
  7472. url: "/JinHuaWMS/WMSCreateItemLot/JinHuaLiKuPoMainIn?wareHouseCode=" + wareHouseCode + "&workPoint=" + workPoint + "&type=" + Type + "&" + Math.random(),
  7473. param: { poDatas: JSON.stringify(Pos) },
  7474. success: function () {
  7475. $.modalCloseByName(top.frames[iframeId].window.name);
  7476. $.currentWindow().$("#gridList").trigger("reloadGrid");
  7477. }
  7478. })
  7479. }
  7480. });
  7481. }
  7482. </script>
  7483. <iframe id="ifrm" src="" width="0" height="0"></iframe>
  7484. <script>
  7485. </script>
  7486. <div class="topPanel" style="height:149px;">
  7487. <div class="toolbar">
  7488. <div class="btn-group">
  7489. <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>
  7490. <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>
  7491. <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>
  7492. <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>
  7493. <a id="NF-CreateHG" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnCreateHG()"><i class="fa fa-pencil-square-o"></i>生成条码</a>
  7494. <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>
  7495. <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>
  7496. <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>
  7497. <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>
  7498. <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>
  7499. <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>
  7500. <a id="NF-JinHuaLiKu" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_JinHuaLiKu()"><i class="fa fa-pencil-square-o"></i>立库数据传输</a>
  7501. @*<a id="NF-ExportAll" authorize="yes" class="btn btn-default" onclick="btn_ExportAll()"><i class="fa fa-download"></i>导出</a>*@
  7502. <a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
  7503. </div>
  7504. <div class="btn-group" style="display:block;padding-left:2px;">
  7505. <a class="btn btn-primary" id="downPrintControl" href="~/PrintActivex.exe" style="display:none">点击下载打印组件</a>
  7506. <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>
  7507. <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>
  7508. <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>
  7509. </div>
  7510. <script>$('.toolbar').authorizeButton()</script>
  7511. </div>
  7512. <div class="search">
  7513. <table>
  7514. <tr>
  7515. <td class="POCodeShow" style="text-align:right;"><label class="lglabel " id="POCodeShowLable" for="txt_POCode">&nbsp;&nbsp;&nbsp;&nbsp;</label>:</td>
  7516. <td class="POCodeShow">
  7517. <div class="input-group">
  7518. <input id="txt_POCode" type="text" class="form-control" style="width: 130px;">
  7519. </div>
  7520. </td>
  7521. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenCode">&nbsp;&nbsp;&nbsp;&nbsp;供应商代码</label>:</td>
  7522. <td class="HideItems">
  7523. <div class="input-group HideItems">
  7524. <input id="txt_VenCode" type="text" class="form-control HideItems" style="width: 130px;">
  7525. </div>
  7526. </td>
  7527. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;供应商名称</label>:</td>
  7528. <td class="HideItems">
  7529. <div class="input-group HideItems">
  7530. <input id="txt_VenName" type="text" class="form-control HideItems" style="width: 130px;">
  7531. </div>
  7532. </td>
  7533. <td class="HideItemStauts" style="text-align:right">
  7534. <label>&nbsp;&nbsp;&nbsp;单据行状态:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7535. </td>
  7536. <td class="HideItemStauts">
  7537. <div class="input-group HideItemStauts">
  7538. <select id="selU9Status" name="selU9Status" class="form-control HideItemStauts" style="width: 130px;">
  7539. <option value="0" selected="selected">显示全部</option>
  7540. <option value="开立">开立</option>
  7541. <option value="审核中">审核中</option>
  7542. <option value="已核准">已核准</option>
  7543. <option value="自然关闭">自然关闭</option>
  7544. <option value="短缺关闭">短缺关闭</option>
  7545. <option value="超额关闭">超额关闭</option>
  7546. </select>
  7547. </div>
  7548. </td>
  7549. <td class="HideItems2" style="text-align:right;"><label class="lglabel HideItems2" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;源头单据号</label>:</td>
  7550. <td class="HideItems2">
  7551. <div class="input-group HideItems2">
  7552. <input id="txt_SCode" type="text" class="form-control HideItems2" style="width: 130px;">
  7553. </div>
  7554. </td>
  7555. <td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;日期(从)</label>:</td>
  7556. <td class="HideItemsTime">
  7557. <div class="input-group HideItemsTime">
  7558. <input id="FromTime" name="FromTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(从)" />
  7559. </div>
  7560. </td>
  7561. <td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;日期(到)</label>:</td>
  7562. <td class="HideItemsTime">
  7563. <div class="input-group HideItemsTime">
  7564. <input id="ToTime" name="ToTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(到)" />
  7565. </div>
  7566. </td>
  7567. </tr>
  7568. <tr>
  7569. <td style="text-align:right;"><label class="lglabel" for="txt_InvCode">&nbsp;&nbsp;&nbsp;&nbsp;料品编码</label>:</td>
  7570. <td>
  7571. <div class="input-group">
  7572. <input id="txt_InvCode" type="text" class="form-control" style="width: 130px;">
  7573. </div>
  7574. </td>
  7575. <td style="text-align:right;"><label class="lglabel" for="txt_InvName">&nbsp;&nbsp;&nbsp;&nbsp;料品名称</label>:</td>
  7576. <td>
  7577. <div class="input-group">
  7578. <input id="txt_InvName" type="text" class="form-control" style="width: 130px;">
  7579. </div>
  7580. </td>
  7581. <td class="HideItems3" style="text-align:right;"><label class="lglabel HideItems3" for="txt_InvStd">&nbsp;&nbsp;&nbsp;&nbsp;规格型号</label>:</td>
  7582. <td class="HideItems3">
  7583. <div class="input-group HideItems3">
  7584. <input id="txt_InvStd" type="text" class="form-control" style="width: 130px;">
  7585. </div>
  7586. </td>
  7587. <td style="text-align:right;"><label class="lglabel" for="txt_BatchCode">&nbsp;&nbsp;&nbsp;&nbsp;批次号</label>:</td>
  7588. <td>
  7589. <div class="input-group">
  7590. <input id="txt_BatchCode" type="text" class="form-control" style="width: 130px;">
  7591. </div>
  7592. </td>
  7593. <td id="GDLX">
  7594. <label>&nbsp;&nbsp;&nbsp;工单类型:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7595. </td>
  7596. <td id="GDLX2">
  7597. <div class="input-group">
  7598. <select id="SelGDLX" name="SelShow" class="form-control" style="width: 130px;">
  7599. </select>
  7600. </div>
  7601. </td>
  7602. </tr>
  7603. <tr>
  7604. <td class="HideWH" style="text-align:right;">
  7605. <label>&nbsp;&nbsp;&nbsp;仓库编码:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7606. </td>
  7607. <td class="HideWH">
  7608. <div class="input-group HideWH">
  7609. <input id="txt_WHCode" type="text" class="form-control HideWH" style="width: 130px;">
  7610. </div>
  7611. </td>
  7612. <td>
  7613. <label>&nbsp;&nbsp;&nbsp;是否全部生成:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7614. </td>
  7615. <td>
  7616. <div class="input-group">
  7617. <select id="selShow" name="F_Target" class="form-control" style="width: 130px;">
  7618. <option value="0" selected="selected">显示全部</option>
  7619. <option value="1">已全部生成</option>
  7620. <option value="2">未全部生成</option>
  7621. </select>
  7622. </div>
  7623. </td>
  7624. <td class="Status">
  7625. <label>&nbsp;&nbsp;&nbsp;是否全部入库:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7626. </td>
  7627. <td class="Status">
  7628. <div class="input-group">
  7629. <select id="selStatus" name="F_Target" class="form-control" style="width: 130px;">
  7630. <option value="0" selected="selected">全部</option>
  7631. <option value="1">未全部入库</option>
  7632. <option value="2">已全部入库</option>
  7633. </select>
  7634. </div>
  7635. </td>
  7636. <td class="HideItems3">
  7637. <label>&nbsp;&nbsp;&nbsp;条码是否打印:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7638. </td>
  7639. <td class="HideItems3">
  7640. <div class="input-group HideItems3">
  7641. <select id="selPrint" name="selPrint" class="form-control HideItems3" style="width: 130px;">
  7642. <option value="0" selected="selected">显示全部</option>
  7643. <option value="1">已打印</option>
  7644. <option value="2">未打印</option>
  7645. </select>
  7646. </div>
  7647. </td>
  7648. <td class="HideIsUpload">
  7649. <label>&nbsp;&nbsp;&nbsp;条码是否上传立库:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7650. </td>
  7651. <td class="HideIsUpload">
  7652. <div class="input-group">
  7653. <select id="selIsUpLoad" name="selIsUpLoad" class="form-control" style="width: 130px;">
  7654. <option value="0" selected="selected">显示全部</option>
  7655. <option value="1">已上传</option>
  7656. <option value="2">未上传</option>
  7657. </select>
  7658. </div>
  7659. </td>
  7660. <td>
  7661. <span class="input-group-btn">
  7662. <button id="btn_search" type="button" class="btn btn-primary"><i class="fa fa-search"></i></button>
  7663. </span>
  7664. </td>
  7665. </tr>
  7666. </table>
  7667. </div>
  7668. </div>
  7669. <div class="gridPanel">
  7670. <table id="gridList"></table>
  7671. <div id="gridPager"></div>
  7672. </div>