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.

7884 lines
408 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 != '7' && 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. $(".HideInvSTD").css('display', 'none');
  36. $(".HideItems3").css('display', 'none');
  37. }
  38. if (Type != '7' && Type!='3') {
  39. $(".HideItemsSupprotCode").css('display', 'none');
  40. }
  41. if (Type != '7') {
  42. $(".HideCreater").css('display', 'none');
  43. $(".HideIsUpload").css('display', 'none');
  44. }
  45. if (Type == '17') {
  46. Name = "条码号";
  47. $("#POCodeShowLable").text(Name);
  48. } else {
  49. $("#POCodeShowLable").text(Name);
  50. }
  51. if (Type!='3') {
  52. $("#GDLX").css('display', 'none');
  53. $("#GDLX2").css('display', 'none');
  54. $("#NF-Rebind").css('display', 'none');
  55. }
  56. if (Type == '1' || Type == '2' || Type == '3' || Type == '4' || Type == '5' || Type == '6' || Type == '9' || Type == '17') {
  57. $(".HideItems").css('display', 'none');
  58. }
  59. if (Type == '1') {
  60. gridList();
  61. }
  62. if (Type == '2') {
  63. gridList2();
  64. }
  65. if (Type == '3') {
  66. $(".GDLX").css('display', 'block');
  67. Select_SelGDLX();
  68. gridList3();
  69. }
  70. if (Type == '4') {
  71. gridList4();
  72. }
  73. if (Type == '5') {
  74. gridList5();
  75. }
  76. if (Type == '6') {
  77. gridList6();
  78. }
  79. //审核到货单生成条码
  80. if (Type == '7') {
  81. $(".HideInvSTD").css('display', 'none');
  82. gridList7();
  83. }
  84. //审核委外到货单生成条码
  85. if (Type == '8') {
  86. gridList8();
  87. }
  88. //开立成品入库单生成条码
  89. if (Type == '9') {
  90. gridList9();
  91. }
  92. //审核拒收单生成条码
  93. if (Type == '10') {
  94. gridList10();
  95. }
  96. //审核委外拒收单生成条码
  97. if (Type == '11') {
  98. gridList11();
  99. }
  100. //领料申请退料生成条码
  101. if (Type == '12') {
  102. gridList12();
  103. }
  104. //材料出库退料生成条码
  105. if (Type == '13') {
  106. gridList13();
  107. }
  108. //委外领料申请退料生成条码
  109. if (Type == '14') {
  110. gridList14();
  111. }
  112. //委外材料出库退料生成条码
  113. if (Type == '15') {
  114. gridList15();
  115. }
  116. //返工工单
  117. if (Type == '16') {
  118. gridList16();
  119. }
  120. //不合格条码入库
  121. if (Type == '17') {
  122. gridList17();
  123. }
  124. //副产品
  125. if (Type == '18') {
  126. gridList18();
  127. }
  128. //锐腾两步调入生成条码
  129. if (Type == '20') {
  130. gridList20();
  131. }
  132. //采购入库生成条码
  133. if (Type == '22') {
  134. gridList22();
  135. }
  136. //委外采购入库生成条码
  137. if (Type == '23') {
  138. gridList23();
  139. }
  140. //红字销售出库单
  141. if (Type == '24') {
  142. gridList24();
  143. }
  144. //线边仓调拨申请单生成条码(派纳)
  145. if (Type == '201') {
  146. gridList201();
  147. }
  148. //调拨申请单生成条码
  149. if (Type == '202') {
  150. gridList202();
  151. }
  152. if (Type == '203') {
  153. gridList203();
  154. }
  155. })
  156. function SetCols() {
  157. $.ajax({
  158. url: "/Print/SelectColumnName?" + Math.random(),
  159. dataType: "json",
  160. async: false,
  161. success: function (data) {
  162. var cols = new Array();
  163. var cols1 = new Array();
  164. if (Type == '1') {
  165. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  166. cols.push(collast);
  167. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  168. cols.push(collast);
  169. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  170. cols.push(collast);
  171. var collast = { label: '工单子件', name: 'SourceDetailID', hidden: true, };
  172. cols.push(collast);
  173. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  174. cols.push(collast);
  175. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  176. cols.push(collast);
  177. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  178. cols.push(collast);
  179. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  180. cols.push(collast);
  181. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  182. cols.push(collast);
  183. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  184. cols.push(collast);
  185. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  186. cols.push(collast);
  187. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  188. //cols.push(collast);
  189. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  190. cols.push(collast);
  191. var collast = { label: '工单号', name: 'MOCode', width: 60, align: 'left', };
  192. cols.push(collast);
  193. var collast = { label: '创建日期', name: 'MTIME', width: 60, align: 'left', };
  194. cols.push(collast);
  195. $.ajax({
  196. url: "/Print/SelectTableColumnName?" + Math.random(),
  197. dataType: "json",
  198. async: false,
  199. success: function (data) {
  200. if (data != null && data.length > 0) {
  201. DateList = data;
  202. for (var i = 0; i < data.length; i++) {
  203. var TableCode = data[i].TableCode;
  204. if (TableCode == "ICSMOPick") {
  205. var Code = data[i].Code;
  206. var Name = data[i].Name;
  207. var obj = new Array();
  208. obj = {
  209. label: Name,
  210. name: Code,
  211. width: 80,
  212. align: "left"
  213. }
  214. cols.push(obj);
  215. }
  216. if (TableCode == "ICSInventory") {
  217. var Code = "ICSInventory"+data[i].Code;
  218. var Name = data[i].Name;
  219. var obj = new Array();
  220. obj = {
  221. label: Name,
  222. name: Code,
  223. width: 80,
  224. align: "left"
  225. }
  226. cols.push(obj);
  227. //cols1.push(obj);
  228. }
  229. }
  230. }
  231. _Clos = cols;
  232. //_Clos1 = cols1;
  233. }
  234. });
  235. }
  236. if (Type == '2') {
  237. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  238. cols.push(collast);
  239. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  240. cols.push(collast);
  241. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  242. cols.push(collast);
  243. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  244. cols.push(collast);
  245. var collast = { label: '供应商', name: 'VenName', width: 150, align: 'left' };
  246. cols.push(collast);
  247. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  248. cols.push(collast);
  249. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  250. cols.push(collast);
  251. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  252. cols.push(collast);
  253. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  254. cols.push(collast);
  255. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  256. cols.push(collast);
  257. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  258. cols.push(collast);
  259. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  260. cols.push(collast);
  261. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  262. //cols.push(collast);
  263. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  264. cols.push(collast);
  265. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  266. //cols.push(collast);
  267. $.ajax({
  268. url: "/Print/SelectTableColumnName?" + Math.random(),
  269. dataType: "json",
  270. async: false,
  271. success: function (data) {
  272. if (data != null && data.length > 0) {
  273. DateList = data;
  274. for (var i = 0; i < data.length; i++) {
  275. var TableCode = data[i].TableCode;
  276. if (TableCode == "ICSOApplyNegDetail") {
  277. var Code = data[i].Code;
  278. var Name = data[i].Name;
  279. var obj = new Array();
  280. obj = {
  281. label: Name,
  282. name: Code,
  283. width: 80,
  284. align: "left"
  285. }
  286. cols.push(obj);
  287. }
  288. if (TableCode == "ICSInventory") {
  289. var Code = "ICSInventory" + data[i].Code;
  290. var Name = data[i].Name;
  291. var obj = new Array();
  292. obj = {
  293. label: Name,
  294. name: Code,
  295. width: 80,
  296. align: "left"
  297. }
  298. cols.push(obj);
  299. //cols1.push(obj);
  300. }
  301. }
  302. }
  303. _Clos = cols;
  304. //_Clos1 = cols1;
  305. }
  306. });
  307. }
  308. if (Type == '3') {
  309. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  310. cols.push(collast);
  311. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  312. cols.push(collast);
  313. var collast = { label: '工单行号', name: 'Sequence', width: 50, align: 'left' };
  314. cols.push(collast);
  315. var collast = { label: 'ERP工单行ID', name: 'MODetailID', hidden: true };
  316. cols.push(collast);
  317. var collast = { label: '已入库数量', name: 'RCVQuantity', hidden: true, };
  318. cols.push(collast);
  319. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  320. cols.push(collast);
  321. var collast = { label: '助记码', name: 'SupportCode', width: 120, align: 'left' };
  322. cols.push(collast);
  323. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  324. cols.push(collast);
  325. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  326. cols.push(collast);
  327. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  328. cols.push(collast);
  329. var collast = { label: '已入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  330. cols.push(collast);
  331. var collast = { label: '可入库数量', name: 'ERPNum', width: 100, align: 'left' };
  332. cols.push(collast);
  333. var collast = { label: '合格数量', name: 'OKQuantity', width: 100, align: 'left' };
  334. cols.push(collast);
  335. var collast = { label: 'NG数量', name: 'NGQuantity', width: 100, align: 'left' };
  336. cols.push(collast);
  337. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  338. cols.push(collast);
  339. var collast = { label: '仓库编码', name: 'WHCode', width: 150, align: 'left' };
  340. cols.push(collast);
  341. var collast = { label: '仓库名称', name: 'WHName', width: 150, align: 'left' };
  342. cols.push(collast);
  343. var collast = { label: '工单部门', name: 'DepName', width: 100, align: 'left' };
  344. cols.push(collast);
  345. var collast = { label: '工单创建日期', name: 'CreateDateTime', width: 60, align: 'left', };
  346. cols.push(collast);
  347. var collast = {
  348. label: "状态", name: "MOStatus", width: 60, align: "left",
  349. formatter: function (cellvalue) {
  350. if (cellvalue == "1") {
  351. return "初始";
  352. } else if (cellvalue == "2") {
  353. return "下发";
  354. }
  355. else if (cellvalue == "3") {
  356. return "关单";
  357. }
  358. else { return ""; }
  359. }
  360. };
  361. cols.push(collast);
  362. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  363. cols.push(collast);
  364. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  365. cols.push(collast);
  366. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  367. //cols.push(collast);
  368. var collast = { label: '工单备注', name: 'MOMemo', width: 100, align: 'left' };
  369. cols.push(collast);
  370. $.ajax({
  371. url: "/Print/SelectTableColumnName?" + Math.random(),
  372. dataType: "json",
  373. async: false,
  374. success: function (data) {
  375. if (data != null && data.length > 0) {
  376. DateList = data;
  377. for (var i = 0; i < data.length; i++) {
  378. var TableCode = data[i].TableCode;
  379. if (TableCode == "ICSMO") {
  380. var Code = data[i].Code;
  381. var Name = data[i].Name;
  382. var obj = new Array();
  383. obj = {
  384. label: Name,
  385. name: Code,
  386. width: 80,
  387. align: "left"
  388. }
  389. cols.push(obj);
  390. }
  391. }
  392. }
  393. _Clos = cols;
  394. //_Clos1 = cols1;
  395. }
  396. });
  397. }
  398. if (Type == '4') {
  399. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  400. cols.push(collast);
  401. var collast = { label: '单据号', name: 'SDNCode', width: 120, align: 'left' };
  402. cols.push(collast);
  403. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  404. cols.push(collast);
  405. var collast = { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' };
  406. cols.push(collast);
  407. var collast = { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' };
  408. cols.push(collast);
  409. var collast = { label: '客户代码', name: 'CusCode', width: 120, align: 'left' };
  410. cols.push(collast);
  411. var collast = { label: '客户名称', name: 'CusName', width: 50, align: 'left' };
  412. cols.push(collast);
  413. var collast = { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' };
  414. cols.push(collast);
  415. var collast = { label: '已发数量', name: 'SDNQuantity', width: 50, align: 'left' };
  416. cols.push(collast);
  417. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  418. cols.push(collast);
  419. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  420. cols.push(collast);
  421. var collast = { label: '退货数量', name: 'RQuantity', width: 100, 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: 'NGQuantity', width: 100, align: 'left' };
  426. cols.push(collast);
  427. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  428. cols.push(collast);
  429. var collast = {
  430. label: "状态", name: "Status", width: 60, align: "left",
  431. formatter: function (cellvalue) {
  432. if (cellvalue == "1") {
  433. return "开立";
  434. } else if (cellvalue == "2") {
  435. return "审核";
  436. }
  437. else if (cellvalue == "3") {
  438. return "关闭";
  439. }
  440. else { return ""; }
  441. }
  442. };
  443. cols.push(collast);
  444. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  445. cols.push(collast);
  446. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  447. cols.push(collast);
  448. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  449. //cols.push(collast);
  450. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  451. cols.push(collast);
  452. $.ajax({
  453. url: "/Print/SelectTableColumnName?" + Math.random(),
  454. dataType: "json",
  455. async: false,
  456. success: function (data) {
  457. if (data != null && data.length > 0) {
  458. DateList = data;
  459. for (var i = 0; i < data.length; i++) {
  460. var TableCode = data[i].TableCode;
  461. if (TableCode == "ICSSDN") {
  462. var Code = data[i].Code;
  463. var Name = data[i].Name;
  464. var obj = new Array();
  465. obj = {
  466. label: Name,
  467. name: Code,
  468. width: 80,
  469. align: "left"
  470. }
  471. cols.push(obj);
  472. }
  473. if (TableCode == "ICSInventory") {
  474. var Code = "ICSInventory" + data[i].Code;
  475. var Name = data[i].Name;
  476. var obj = new Array();
  477. obj = {
  478. label: Name,
  479. name: Code,
  480. width: 80,
  481. align: "left"
  482. }
  483. cols.push(obj);
  484. //cols1.push(obj);
  485. }
  486. }
  487. }
  488. _Clos = cols;
  489. //_Clos1 = cols1;
  490. }
  491. });
  492. }
  493. if (Type == '5') {
  494. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  495. cols.push(collast);
  496. var collast = { label: '单据号', name: 'InCode', width: 120, align: 'left' };
  497. cols.push(collast);
  498. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  499. cols.push(collast);
  500. var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' };
  501. cols.push(collast);
  502. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  503. cols.push(collast);
  504. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  505. cols.push(collast);
  506. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  507. cols.push(collast);
  508. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left' };
  509. cols.push(collast);
  510. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  511. cols.push(collast);
  512. var collast = { label: '收益部门', name: 'EATTRIBUTE4', width: 50, align: 'left' };
  513. cols.push(collast);
  514. var collast = { label: '供应商', name: 'EATTRIBUTE3', width: 50, align: 'left' };
  515. cols.push(collast);
  516. var collast = { label: '项目名称', name: 'EATTRIBUTE8', width: 50, align: 'left' };
  517. cols.push(collast);
  518. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  519. cols.push(collast);
  520. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  521. cols.push(collast);
  522. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  523. cols.push(collast);
  524. var collast = { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', };
  525. cols.push(collast);
  526. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  527. cols.push(collast);
  528. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  529. cols.push(collast);
  530. var collast = { label: '料品失效天数', name: 'EffectiveDays', hidden: true };
  531. cols.push(collast);
  532. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', hidden: true };
  533. cols.push(collast);
  534. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  535. //cols.push(collast);
  536. $.ajax({
  537. url: "/Print/SelectTableColumnName?" + Math.random(),
  538. dataType: "json",
  539. async: false,
  540. success: function (data) {
  541. if (data != null && data.length > 0) {
  542. DateList = data;
  543. for (var i = 0; i < data.length; i++) {
  544. var TableCode = data[i].TableCode;
  545. if (TableCode == "ICSOtherIn") {
  546. var Code = data[i].Code;
  547. var Name = data[i].Name;
  548. var obj = new Array();
  549. obj = {
  550. label: Name,
  551. name: Code,
  552. width: 80,
  553. align: "left"
  554. }
  555. cols.push(obj);
  556. }
  557. if (TableCode == "ICSInventory") {
  558. var Code = "ICSInventory" + data[i].Code;
  559. var Name = data[i].Name;
  560. var obj = new Array();
  561. obj = {
  562. label: Name,
  563. name: Code,
  564. width: 80,
  565. align: "left"
  566. }
  567. cols.push(obj);
  568. //cols1.push(obj);
  569. }
  570. }
  571. }
  572. _Clos = cols;
  573. //_Clos1 = cols1;
  574. }
  575. });
  576. }
  577. if (Type == '6') {
  578. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  579. cols.push(collast);
  580. var collast = { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' };
  581. cols.push(collast);
  582. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  583. cols.push(collast);
  584. var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' };
  585. cols.push(collast);
  586. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  587. cols.push(collast);
  588. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  589. cols.push(collast);
  590. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  591. cols.push(collast);
  592. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  593. cols.push(collast);
  594. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  595. cols.push(collast);
  596. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  597. cols.push(collast);
  598. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  599. cols.push(collast);
  600. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  601. cols.push(collast);
  602. var collast = { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', };
  603. cols.push(collast);
  604. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  605. cols.push(collast);
  606. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  607. cols.push(collast);
  608. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  609. //cols.push(collast);
  610. $.ajax({
  611. url: "/Print/SelectTableColumnName?" + Math.random(),
  612. dataType: "json",
  613. async: false,
  614. success: function (data) {
  615. if (data != null && data.length > 0) {
  616. DateList = data;
  617. for (var i = 0; i < data.length; i++) {
  618. var TableCode = data[i].TableCode;
  619. if (TableCode == "ICSReturn") {
  620. var Code = data[i].Code;
  621. var Name = data[i].Name;
  622. var obj = new Array();
  623. obj = {
  624. label: Name,
  625. name: Code,
  626. width: 80,
  627. align: "left"
  628. }
  629. cols.push(obj);
  630. }
  631. if (TableCode == "ICSInventory") {
  632. var Code = "ICSInventory" + data[i].Code;
  633. var Name = data[i].Name;
  634. var obj = new Array();
  635. obj = {
  636. label: Name,
  637. name: Code,
  638. width: 80,
  639. align: "left"
  640. }
  641. cols.push(obj);
  642. //cols1.push(obj);
  643. }
  644. }
  645. }
  646. _Clos = cols;
  647. //_Clos1 = cols1;
  648. }
  649. });
  650. }
  651. //审核到货单生成条码
  652. if (Type == '7') {
  653. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  654. cols.push(collast);
  655. var collast = { label: '单据号', name: 'DNCode', 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: 'VenCode', 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: 'SupprotCode', width: 120, align: 'left' };
  670. cols.push(collast);
  671. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  672. cols.push(collast);
  673. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  674. cols.push(collast);
  675. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  676. cols.push(collast);
  677. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  678. cols.push(collast);
  679. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  680. cols.push(collast);
  681. var collast = { label: '采购数量', name: 'POQuantity', width: 100, align: 'left' };
  682. cols.push(collast);
  683. var collast = { label: '合格数量', name: 'Quantity', width: 100, align: 'left' };
  684. cols.push(collast);
  685. var collast = { label: '不合格数量', name: 'NGQuantity', width: 100, align: 'left' };
  686. cols.push(collast);
  687. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  688. //cols.push(collast);
  689. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  690. cols.push(collast);
  691. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  692. cols.push(collast);
  693. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  694. cols.push(collast);
  695. var collast = { label: '未入库数量', name: 'NRCVQuantity', width: 60, align: 'left', };
  696. cols.push(collast);
  697. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  698. cols.push(collast);
  699. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  700. cols.push(collast);
  701. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  702. cols.push(collast);
  703. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  704. cols.push(collast);
  705. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  706. cols.push(collast);
  707. var collast = { label: '操作日期', name: 'MTIME', width: 100, align: 'left' };
  708. cols.push(collast);
  709. $.ajax({
  710. url: "/Print/SelectTableColumnName?" + Math.random(),
  711. dataType: "json",
  712. async: false,
  713. success: function (data) {
  714. if (data != null && data.length > 0) {
  715. DateList = data;
  716. for (var i = 0; i < data.length; i++) {
  717. var TableCode = data[i].TableCode;
  718. if (TableCode == "ICSDeliveryNotice") {
  719. debugger;
  720. var Code = data[i].Code;
  721. var Name = data[i].Name;
  722. var obj = new Array();
  723. obj = {
  724. label: Name,
  725. name: Code,
  726. width: 80,
  727. align: "left"
  728. }
  729. cols.push(obj);
  730. }
  731. if (TableCode == "ICSInventory") {
  732. var Code = "ICSInventory" + data[i].Code;
  733. var Name = data[i].Name;
  734. var obj = new Array();
  735. obj = {
  736. label: Name,
  737. name: Code,
  738. width: 80,
  739. align: "left"
  740. }
  741. cols.push(obj);
  742. //cols1.push(obj);
  743. }
  744. }
  745. }
  746. _Clos = cols;
  747. //_Clos1 = cols1;
  748. }
  749. });
  750. }
  751. //审核委外到货单生成条码
  752. if (Type == '8') {
  753. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  754. cols.push(collast);
  755. var collast = { label: '单据号', name: 'ODNCode', width: 120, align: 'left' };
  756. cols.push(collast);
  757. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  758. cols.push(collast);
  759. var collast = { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' };
  760. cols.push(collast);
  761. var collast = { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' };
  762. cols.push(collast);
  763. var collast = { label: '委外订单表体ID', name: 'OODetailID', hidden: true };
  764. cols.push(collast);
  765. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  766. cols.push(collast);
  767. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  768. cols.push(collast);
  769. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  770. cols.push(collast);
  771. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  772. cols.push(collast);
  773. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  774. cols.push(collast);
  775. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  776. cols.push(collast);
  777. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  778. cols.push(collast);
  779. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  780. cols.push(collast);
  781. var collast = { label: '到货数量', name: 'POQuantity', width: 100, align: 'left' };
  782. cols.push(collast);
  783. var collast = { label: '合格数量', name: 'Quantity', width: 100, align: 'left' };
  784. cols.push(collast);
  785. var collast = { label: '不合格数量', name: 'NGQuantity', width: 100, align: 'left' };
  786. cols.push(collast);
  787. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  788. //cols.push(collast);
  789. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  790. cols.push(collast);
  791. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  792. cols.push(collast);
  793. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  794. cols.push(collast);
  795. var collast = { label: '未入库数量', name: 'NRCVQuantity', width: 60, align: 'left', };
  796. cols.push(collast);
  797. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  798. cols.push(collast);
  799. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  800. cols.push(collast);
  801. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  802. cols.push(collast);
  803. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  804. cols.push(collast);
  805. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  806. cols.push(collast);
  807. $.ajax({
  808. url: "/Print/SelectTableColumnName?" + Math.random(),
  809. dataType: "json",
  810. async: false,
  811. success: function (data) {
  812. if (data != null && data.length > 0) {
  813. DateList = data;
  814. for (var i = 0; i < data.length; i++) {
  815. var TableCode = data[i].TableCode;
  816. if (TableCode == "ICSODeliveryNotice") {
  817. var Code = data[i].Code;
  818. var Name = data[i].Name;
  819. var obj = new Array();
  820. obj = {
  821. label: Name,
  822. name: Code,
  823. width: 80,
  824. align: "left"
  825. }
  826. cols.push(obj);
  827. }
  828. if (TableCode == "ICSInventory") {
  829. var Code = "ICSInventory" + data[i].Code;
  830. var Name = data[i].Name;
  831. var obj = new Array();
  832. obj = {
  833. label: Name,
  834. name: Code,
  835. width: 80,
  836. align: "left"
  837. }
  838. cols.push(obj);
  839. //cols1.push(obj);
  840. }
  841. }
  842. }
  843. _Clos = cols;
  844. //_Clos1 = cols1;
  845. }
  846. });
  847. }
  848. //开立成品入库单生成条码
  849. if (Type == '9') {
  850. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  851. cols.push(collast);
  852. var collast = { label: '单据号', name: 'RCVCode', width: 120, align: 'left' };
  853. cols.push(collast);
  854. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  855. cols.push(collast);
  856. var collast = { label: '源头单据号', name: 'MOCode', width: 50, align: 'left' };
  857. cols.push(collast);
  858. var collast = { label: '仓库号', name: 'WHCode', width: 120, align: 'left' };
  859. cols.push(collast);
  860. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  861. cols.push(collast);
  862. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  863. cols.push(collast);
  864. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  865. cols.push(collast);
  866. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  867. cols.push(collast);
  868. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  869. cols.push(collast);
  870. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  871. cols.push(collast);
  872. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  873. //cols.push(collast);
  874. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  875. cols.push(collast);
  876. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  877. cols.push(collast);
  878. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  879. cols.push(collast);
  880. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  881. cols.push(collast);
  882. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  883. cols.push(collast);
  884. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  885. cols.push(collast);
  886. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  887. cols.push(collast);
  888. $.ajax({
  889. url: "/Print/SelectTableColumnName?" + Math.random(),
  890. dataType: "json",
  891. async: false,
  892. success: function (data) {
  893. if (data != null && data.length > 0) {
  894. DateList = data;
  895. for (var i = 0; i < data.length; i++) {
  896. var TableCode = data[i].TableCode;
  897. if (TableCode == "ICSMO") {
  898. var Code = data[i].Code;
  899. var Name = data[i].Name;
  900. var obj = new Array();
  901. obj = {
  902. label: Name,
  903. name: Code,
  904. width: 80,
  905. align: "left"
  906. }
  907. cols.push(obj);
  908. }
  909. if (TableCode == "ICSInventory") {
  910. var Code = "ICSInventory" + data[i].Code;
  911. var Name = data[i].Name;
  912. var obj = new Array();
  913. obj = {
  914. label: Name,
  915. name: Code,
  916. width: 80,
  917. align: "left"
  918. }
  919. cols.push(obj);
  920. //cols1.push(obj);
  921. }
  922. }
  923. }
  924. _Clos = cols;
  925. //_Clos1 = cols1;
  926. }
  927. });
  928. }
  929. //审核拒收单生成条码
  930. if (Type == '10') {
  931. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  932. cols.push(collast);
  933. var collast = { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' };
  934. cols.push(collast);
  935. var collast = { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' };
  936. cols.push(collast);
  937. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  938. cols.push(collast);
  939. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  940. cols.push(collast);
  941. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  942. cols.push(collast);
  943. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  944. cols.push(collast);
  945. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  946. cols.push(collast);
  947. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  948. cols.push(collast);
  949. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  950. cols.push(collast);
  951. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  952. cols.push(collast);
  953. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  954. cols.push(collast);
  955. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  956. cols.push(collast);
  957. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  958. cols.push(collast);
  959. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  960. cols.push(collast);
  961. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  962. cols.push(collast);
  963. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  964. cols.push(collast);
  965. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  966. cols.push(collast);
  967. $.ajax({
  968. url: "/Print/SelectTableColumnName?" + Math.random(),
  969. dataType: "json",
  970. async: false,
  971. success: function (data) {
  972. if (data != null && data.length > 0) {
  973. DateList = data;
  974. for (var i = 0; i < data.length; i++) {
  975. var TableCode = data[i].TableCode;
  976. if (TableCode == "ICSDeliveryNotice") {
  977. var Code = data[i].Code;
  978. var Name = data[i].Name;
  979. var obj = new Array();
  980. obj = {
  981. label: Name,
  982. name: Code,
  983. width: 80,
  984. align: "left"
  985. }
  986. cols.push(obj);
  987. }
  988. if (TableCode == "ICSInventory") {
  989. var Code = "ICSInventory" + data[i].Code;
  990. var Name = data[i].Name;
  991. var obj = new Array();
  992. obj = {
  993. label: Name,
  994. name: Code,
  995. width: 80,
  996. align: "left"
  997. }
  998. cols.push(obj);
  999. //cols1.push(obj);
  1000. }
  1001. }
  1002. }
  1003. _Clos = cols;
  1004. //_Clos1 = cols1;
  1005. }
  1006. });
  1007. }
  1008. //审核委外拒收单生成条码
  1009. if (Type == '11') {
  1010. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1011. cols.push(collast);
  1012. var collast = { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' };
  1013. cols.push(collast);
  1014. var collast = { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' };
  1015. cols.push(collast);
  1016. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  1017. cols.push(collast);
  1018. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  1019. cols.push(collast);
  1020. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1021. cols.push(collast);
  1022. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  1023. cols.push(collast);
  1024. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  1025. cols.push(collast);
  1026. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  1027. cols.push(collast);
  1028. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  1029. cols.push(collast);
  1030. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1031. cols.push(collast);
  1032. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1033. cols.push(collast);
  1034. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  1035. cols.push(collast);
  1036. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1037. cols.push(collast);
  1038. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  1039. cols.push(collast);
  1040. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  1041. cols.push(collast);
  1042. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  1043. cols.push(collast);
  1044. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  1045. cols.push(collast);
  1046. $.ajax({
  1047. url: "/Print/SelectTableColumnName?" + Math.random(),
  1048. dataType: "json",
  1049. async: false,
  1050. success: function (data) {
  1051. if (data != null && data.length > 0) {
  1052. DateList = data;
  1053. for (var i = 0; i < data.length; i++) {
  1054. var TableCode = data[i].TableCode;
  1055. if (TableCode == "ICSODeliveryNotice") {
  1056. var Code = data[i].Code;
  1057. var Name = data[i].Name;
  1058. var obj = new Array();
  1059. obj = {
  1060. label: Name,
  1061. name: Code,
  1062. width: 80,
  1063. align: "left"
  1064. }
  1065. cols.push(obj);
  1066. }
  1067. if (TableCode == "ICSInventory") {
  1068. var Code = "ICSInventory" + data[i].Code;
  1069. var Name = data[i].Name;
  1070. var obj = new Array();
  1071. obj = {
  1072. label: Name,
  1073. name: Code,
  1074. width: 80,
  1075. align: "left"
  1076. }
  1077. cols.push(obj);
  1078. //cols1.push(obj);
  1079. }
  1080. }
  1081. }
  1082. _Clos = cols;
  1083. //_Clos1 = cols1;
  1084. }
  1085. });
  1086. }
  1087. //领料申请退料生成条码
  1088. if (Type == '12') {
  1089. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1090. cols.push(collast);
  1091. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  1092. cols.push(collast);
  1093. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1094. cols.push(collast);
  1095. var collast = { label: '来源单据号', name: 'SourceCodea', width: 120, align: 'left' };
  1096. cols.push(collast);
  1097. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  1098. cols.push(collast);
  1099. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1100. cols.push(collast);
  1101. var collast = { label: '料品编码', name: 'InvName', width: 150, align: 'left', };
  1102. cols.push(collast);
  1103. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1104. cols.push(collast);
  1105. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1106. cols.push(collast);
  1107. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1108. cols.push(collast);
  1109. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1110. cols.push(collast);
  1111. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1112. cols.push(collast);
  1113. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1114. //cols.push(collast);
  1115. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1116. cols.push(collast);
  1117. $.ajax({
  1118. url: "/Print/SelectTableColumnName?" + Math.random(),
  1119. dataType: "json",
  1120. async: false,
  1121. success: function (data) {
  1122. if (data != null && data.length > 0) {
  1123. DateList = data;
  1124. for (var i = 0; i < data.length; i++) {
  1125. var TableCode = data[i].TableCode;
  1126. if (TableCode == "ICSMOApplyNegDetail") {
  1127. var Code = data[i].Code;
  1128. var Name = data[i].Name;
  1129. var obj = new Array();
  1130. obj = {
  1131. label: Name,
  1132. name: Code,
  1133. width: 80,
  1134. align: "left"
  1135. }
  1136. cols.push(obj);
  1137. }
  1138. if (TableCode == "ICSInventory") {
  1139. var Code = "ICSInventory" + data[i].Code;
  1140. var Name = data[i].Name;
  1141. var obj = new Array();
  1142. obj = {
  1143. label: Name,
  1144. name: Code,
  1145. width: 80,
  1146. align: "left"
  1147. }
  1148. cols.push(obj);
  1149. //cols1.push(obj);
  1150. }
  1151. }
  1152. }
  1153. _Clos = cols;
  1154. //_Clos1 = cols1;
  1155. }
  1156. });
  1157. }
  1158. //材料出库退料生成条码
  1159. if (Type == '13') {
  1160. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1161. cols.push(collast);
  1162. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  1163. cols.push(collast);
  1164. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1165. cols.push(collast);
  1166. var collast = { label: '源头单据号', name: 'SCode', width: 120, align: 'left' };
  1167. cols.push(collast);
  1168. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  1169. cols.push(collast);
  1170. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1171. cols.push(collast);
  1172. var collast = { label: '料品编码', name: 'InvName', width: 150, align: 'left', };
  1173. cols.push(collast);
  1174. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1175. cols.push(collast);
  1176. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1177. cols.push(collast);
  1178. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1179. cols.push(collast);
  1180. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1181. cols.push(collast);
  1182. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1183. cols.push(collast);
  1184. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1185. //cols.push(collast);
  1186. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1187. cols.push(collast);
  1188. var collast = { label: '料品失效天数', name: 'EffectiveDays', hidden: true };
  1189. cols.push(collast);
  1190. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', hidden: true };
  1191. cols.push(collast);
  1192. }
  1193. //委外领料申请退料生成条码
  1194. if (Type == '14') {
  1195. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1196. cols.push(collast);
  1197. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  1198. cols.push(collast);
  1199. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1200. cols.push(collast);
  1201. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  1202. cols.push(collast);
  1203. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1204. cols.push(collast);
  1205. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1206. cols.push(collast);
  1207. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1208. cols.push(collast);
  1209. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1210. cols.push(collast);
  1211. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1212. cols.push(collast);
  1213. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1214. cols.push(collast);
  1215. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1216. cols.push(collast);
  1217. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1218. //cols.push(collast);
  1219. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1220. cols.push(collast);
  1221. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1222. //cols.push(collast);
  1223. $.ajax({
  1224. url: "/Print/SelectTableColumnName?" + Math.random(),
  1225. dataType: "json",
  1226. async: false,
  1227. success: function (data) {
  1228. if (data != null && data.length > 0) {
  1229. DateList = data;
  1230. for (var i = 0; i < data.length; i++) {
  1231. var TableCode = data[i].TableCode;
  1232. if (TableCode == "ICSOApplyNegDetail") {
  1233. var Code = data[i].Code;
  1234. var Name = data[i].Name;
  1235. var obj = new Array();
  1236. obj = {
  1237. label: Name,
  1238. name: Code,
  1239. width: 80,
  1240. align: "left"
  1241. }
  1242. cols.push(obj);
  1243. }
  1244. if (TableCode == "ICSInventory") {
  1245. var Code = "ICSInventory" + data[i].Code;
  1246. var Name = data[i].Name;
  1247. var obj = new Array();
  1248. obj = {
  1249. label: Name,
  1250. name: Code,
  1251. width: 80,
  1252. align: "left"
  1253. }
  1254. cols.push(obj);
  1255. //cols1.push(obj);
  1256. }
  1257. }
  1258. }
  1259. _Clos = cols;
  1260. //_Clos1 = cols1;
  1261. }
  1262. });
  1263. }
  1264. //委外材料出库退料生成条码
  1265. if (Type == '15') {
  1266. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1267. cols.push(collast);
  1268. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  1269. cols.push(collast);
  1270. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1271. cols.push(collast);
  1272. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  1273. cols.push(collast);
  1274. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1275. cols.push(collast);
  1276. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1277. cols.push(collast);
  1278. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1279. cols.push(collast);
  1280. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1281. cols.push(collast);
  1282. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1283. cols.push(collast);
  1284. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1285. cols.push(collast);
  1286. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1287. cols.push(collast);
  1288. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1289. //cols.push(collast);
  1290. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1291. cols.push(collast);
  1292. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1293. //cols.push(collast);
  1294. $.ajax({
  1295. url: "/Print/SelectTableColumnName?" + Math.random(),
  1296. dataType: "json",
  1297. async: false,
  1298. success: function (data) {
  1299. if (data != null && data.length > 0) {
  1300. DateList = data;
  1301. for (var i = 0; i < data.length; i++) {
  1302. var TableCode = data[i].TableCode;
  1303. if (TableCode == "ICSOApplyNegDetail") {
  1304. var Code = data[i].Code;
  1305. var Name = data[i].Name;
  1306. var obj = new Array();
  1307. obj = {
  1308. label: Name,
  1309. name: Code,
  1310. width: 80,
  1311. align: "left"
  1312. }
  1313. cols.push(obj);
  1314. }
  1315. if (TableCode == "ICSInventory") {
  1316. var Code = "ICSInventory" + data[i].Code;
  1317. var Name = data[i].Name;
  1318. var obj = new Array();
  1319. obj = {
  1320. label: Name,
  1321. name: Code,
  1322. width: 80,
  1323. align: "left"
  1324. }
  1325. cols.push(obj);
  1326. //cols1.push(obj);
  1327. }
  1328. }
  1329. }
  1330. _Clos = cols;
  1331. //_Clos1 = cols1;
  1332. }
  1333. });
  1334. }
  1335. //返工工单生成条码
  1336. if (Type == '16') {
  1337. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1338. cols.push(collast);
  1339. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  1340. cols.push(collast);
  1341. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  1342. cols.push(collast);
  1343. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  1344. cols.push(collast);
  1345. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1346. cols.push(collast);
  1347. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1348. cols.push(collast);
  1349. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1350. cols.push(collast);
  1351. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1352. cols.push(collast);
  1353. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  1354. cols.push(collast);
  1355. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1356. cols.push(collast);
  1357. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1358. cols.push(collast);
  1359. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1360. //cols.push(collast);
  1361. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1362. cols.push(collast);
  1363. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1364. //cols.push(collast);
  1365. $.ajax({
  1366. url: "/Print/SelectTableColumnName?" + Math.random(),
  1367. dataType: "json",
  1368. async: false,
  1369. success: function (data) {
  1370. if (data != null && data.length > 0) {
  1371. DateList = data;
  1372. for (var i = 0; i < data.length; i++) {
  1373. var TableCode = data[i].TableCode;
  1374. if (TableCode == "ICSMOPick") {
  1375. var Code = data[i].Code;
  1376. var Name = data[i].Name;
  1377. var obj = new Array();
  1378. obj = {
  1379. label: Name,
  1380. name: Code,
  1381. width: 80,
  1382. align: "left"
  1383. }
  1384. cols.push(obj);
  1385. }
  1386. if (TableCode == "ICSInventory") {
  1387. var Code = "ICSInventory" + data[i].Code;
  1388. var Name = data[i].Name;
  1389. var obj = new Array();
  1390. obj = {
  1391. label: Name,
  1392. name: Code,
  1393. width: 80,
  1394. align: "left"
  1395. }
  1396. cols.push(obj);
  1397. //cols1.push(obj);
  1398. }
  1399. }
  1400. }
  1401. _Clos = cols;
  1402. //_Clos1 = cols1;
  1403. }
  1404. });
  1405. }
  1406. //不合格条码生成条码
  1407. if (Type == '17') {
  1408. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1409. cols.push(collast);
  1410. var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' };
  1411. cols.push(collast);
  1412. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1413. cols.push(collast);
  1414. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1415. cols.push(collast);
  1416. var collast = { label: '不合格数量', name: 'Quantity', width: 100, align: 'left' };
  1417. cols.push(collast);
  1418. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1419. cols.push(collast);
  1420. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1421. cols.push(collast);
  1422. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1423. cols.push(collast);
  1424. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1425. //cols.push(collast);
  1426. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1427. cols.push(collast);
  1428. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1429. //cols.push(collast);
  1430. $.ajax({
  1431. url: "/Print/SelectTableColumnName?" + Math.random(),
  1432. dataType: "json",
  1433. async: false,
  1434. success: function (data) {
  1435. if (data != null && data.length > 0) {
  1436. DateList = data;
  1437. for (var i = 0; i < data.length; i++) {
  1438. var TableCode = data[i].TableCode;
  1439. if (TableCode == "ICSInspection") {
  1440. var Code = data[i].Code;
  1441. var Name = data[i].Name;
  1442. var obj = new Array();
  1443. obj = {
  1444. label: Name,
  1445. name: Code,
  1446. width: 80,
  1447. align: "left"
  1448. }
  1449. cols.push(obj);
  1450. }
  1451. if (TableCode == "ICSInventory") {
  1452. var Code = "ICSInventory" + data[i].Code;
  1453. var Name = data[i].Name;
  1454. var obj = new Array();
  1455. obj = {
  1456. label: Name,
  1457. name: Code,
  1458. width: 80,
  1459. align: "left"
  1460. }
  1461. cols.push(obj);
  1462. //cols1.push(obj);
  1463. }
  1464. }
  1465. }
  1466. _Clos = cols;
  1467. //_Clos1 = cols1;
  1468. }
  1469. });
  1470. }
  1471. //副产品生成条码
  1472. if (Type == '18') {
  1473. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1474. cols.push(collast);
  1475. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  1476. cols.push(collast);
  1477. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  1478. cols.push(collast);
  1479. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  1480. cols.push(collast);
  1481. var collast = { label: '料品编码(子)', name: 'ZInvCode', width: 120, align: 'left' };
  1482. cols.push(collast);
  1483. var collast = { label: '料品编码(母)', name: 'MInvCode', width: 120, align: 'left' };
  1484. cols.push(collast);
  1485. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1486. cols.push(collast);
  1487. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1488. cols.push(collast);
  1489. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1490. cols.push(collast);
  1491. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  1492. cols.push(collast);
  1493. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1494. cols.push(collast);
  1495. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1496. cols.push(collast);
  1497. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1498. //cols.push(collast);
  1499. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1500. cols.push(collast);
  1501. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1502. //cols.push(collast);
  1503. $.ajax({
  1504. url: "/Print/SelectTableColumnName?" + Math.random(),
  1505. dataType: "json",
  1506. async: false,
  1507. success: function (data) {
  1508. if (data != null && data.length > 0) {
  1509. DateList = data;
  1510. for (var i = 0; i < data.length; i++) {
  1511. var TableCode = data[i].TableCode;
  1512. if (TableCode == "ICSMOPick") {
  1513. var Code = data[i].Code;
  1514. var Name = data[i].Name;
  1515. var obj = new Array();
  1516. obj = {
  1517. label: Name,
  1518. name: Code,
  1519. width: 80,
  1520. align: "left"
  1521. }
  1522. cols.push(obj);
  1523. }
  1524. if (TableCode == "ICSInventory") {
  1525. var Code = "ICSInventory" + data[i].Code;
  1526. var Name = data[i].Name;
  1527. var obj = new Array();
  1528. obj = {
  1529. label: Name,
  1530. name: Code,
  1531. width: 80,
  1532. align: "left"
  1533. }
  1534. cols.push(obj);
  1535. //cols1.push(obj);
  1536. }
  1537. }
  1538. }
  1539. _Clos = cols;
  1540. //_Clos1 = cols1;
  1541. }
  1542. });
  1543. }
  1544. //锐腾两步调入生成条码
  1545. if (Type == '20') {
  1546. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1547. cols.push(collast);
  1548. var collast = { label: '调拨单号', name: 'TransferNO', width: 120, align: 'left' };
  1549. cols.push(collast);
  1550. var collast = { label: '调拨单行号', name: 'Sequence', width: 50, align: 'left' };
  1551. cols.push(collast);
  1552. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1553. cols.push(collast);
  1554. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1555. cols.push(collast);
  1556. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1557. cols.push(collast);
  1558. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1559. cols.push(collast);
  1560. var collast = { label: '已调入数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1561. cols.push(collast);
  1562. var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', };
  1563. cols.push(collast);
  1564. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1565. cols.push(collast);
  1566. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1567. //cols.push(collast);
  1568. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1569. cols.push(collast);
  1570. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1571. //cols.push(collast);
  1572. $.ajax({
  1573. url: "/Print/SelectTableColumnName?" + Math.random(),
  1574. dataType: "json",
  1575. async: false,
  1576. success: function (data) {
  1577. if (data != null && data.length > 0) {
  1578. DateList = data;
  1579. for (var i = 0; i < data.length; i++) {
  1580. var TableCode = data[i].TableCode;
  1581. if (TableCode == "ICSMOPick") {
  1582. var Code = data[i].Code;
  1583. var Name = data[i].Name;
  1584. var obj = new Array();
  1585. obj = {
  1586. label: Name,
  1587. name: Code,
  1588. width: 80,
  1589. align: "left"
  1590. }
  1591. cols.push(obj);
  1592. }
  1593. if (TableCode == "ICSInventory") {
  1594. var Code = "ICSInventory" + data[i].Code;
  1595. var Name = data[i].Name;
  1596. var obj = new Array();
  1597. obj = {
  1598. label: Name,
  1599. name: Code,
  1600. width: 80,
  1601. align: "left"
  1602. }
  1603. cols.push(obj);
  1604. //cols1.push(obj);
  1605. }
  1606. }
  1607. }
  1608. _Clos = cols;
  1609. //_Clos1 = cols1;
  1610. }
  1611. });
  1612. }
  1613. //采购入库生成条码
  1614. if (Type == '22') {
  1615. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1616. cols.push(collast);
  1617. var collast = { label: '入库单号', name: 'RCVCode', width: 120, align: 'left' };
  1618. cols.push(collast);
  1619. var collast = { label: '入库单行号', name: 'Sequence', width: 50, align: 'left' };
  1620. cols.push(collast);
  1621. var collast = { label: '采购订单号', name: 'SourceCode', width: 50, align: 'left' };
  1622. cols.push(collast);
  1623. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1624. cols.push(collast);
  1625. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1626. cols.push(collast);
  1627. var collast = { label: '规格型号', name: 'InvStd', width: 150, align: 'left', };
  1628. cols.push(collast);
  1629. var collast = { label: '供应商', name: 'VenName', width: 150, align: 'left', };
  1630. cols.push(collast);
  1631. var collast = { label: '采购员', name: 'F_RealName', width: 150, align: 'left', };
  1632. cols.push(collast);
  1633. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1634. cols.push(collast);
  1635. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1636. cols.push(collast);
  1637. var collast = { label: '已入数量', name: 'RCVQuantity', width: 100, align: 'left' };
  1638. cols.push(collast);
  1639. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1640. //cols.push(collast);
  1641. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1642. cols.push(collast);
  1643. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1644. //cols.push(collast);
  1645. $.ajax({
  1646. url: "/Print/SelectTableColumnName?" + Math.random(),
  1647. dataType: "json",
  1648. async: false,
  1649. success: function (data) {
  1650. if (data != null && data.length > 0) {
  1651. DateList = data;
  1652. for (var i = 0; i < data.length; i++) {
  1653. var TableCode = data[i].TableCode;
  1654. if (TableCode == "ICSPurchaseReceive") {
  1655. var Code = data[i].Code;
  1656. var Name = data[i].Name;
  1657. var obj = new Array();
  1658. obj = {
  1659. label: Name,
  1660. name: Code,
  1661. width: 80,
  1662. align: "left"
  1663. }
  1664. cols.push(obj);
  1665. }
  1666. if (TableCode == "ICSInventory") {
  1667. var Code = "ICSInventory" + data[i].Code;
  1668. var Name = data[i].Name;
  1669. var obj = new Array();
  1670. obj = {
  1671. label: Name,
  1672. name: Code,
  1673. width: 80,
  1674. align: "left"
  1675. }
  1676. cols.push(obj);
  1677. //cols1.push(obj);
  1678. }
  1679. }
  1680. }
  1681. _Clos = cols;
  1682. //_Clos1 = cols1;
  1683. }
  1684. });
  1685. }
  1686. //采购入库生成条码
  1687. if (Type == '23') {
  1688. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1689. cols.push(collast);
  1690. var collast = { label: '委外入库单号', name: 'RCVCode', width: 120, align: 'left' };
  1691. cols.push(collast);
  1692. var collast = { label: '委外入库单行号', name: 'Sequence', width: 50, align: 'left' };
  1693. cols.push(collast);
  1694. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1695. cols.push(collast);
  1696. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1697. cols.push(collast);
  1698. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1699. cols.push(collast);
  1700. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1701. cols.push(collast);
  1702. var collast = { label: '已入数量', name: 'RCVQuantity', width: 100, align: 'left' };
  1703. cols.push(collast);
  1704. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1705. //cols.push(collast);
  1706. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1707. cols.push(collast);
  1708. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1709. //cols.push(collast);
  1710. $.ajax({
  1711. url: "/Print/SelectTableColumnName?" + Math.random(),
  1712. dataType: "json",
  1713. async: false,
  1714. success: function (data) {
  1715. if (data != null && data.length > 0) {
  1716. DateList = data;
  1717. for (var i = 0; i < data.length; i++) {
  1718. var TableCode = data[i].TableCode;
  1719. if (TableCode == "ICSOutsourcingReceive") {
  1720. var Code = data[i].Code;
  1721. var Name = data[i].Name;
  1722. var obj = new Array();
  1723. obj = {
  1724. label: Name,
  1725. name: Code,
  1726. width: 80,
  1727. align: "left"
  1728. }
  1729. cols.push(obj);
  1730. }
  1731. if (TableCode == "ICSInventory") {
  1732. var Code = "ICSInventory" + data[i].Code;
  1733. var Name = data[i].Name;
  1734. var obj = new Array();
  1735. obj = {
  1736. label: Name,
  1737. name: Code,
  1738. width: 80,
  1739. align: "left"
  1740. }
  1741. cols.push(obj);
  1742. //cols1.push(obj);
  1743. }
  1744. }
  1745. }
  1746. _Clos = cols;
  1747. //_Clos1 = cols1;
  1748. }
  1749. });
  1750. }
  1751. //红字销售单出库生成条码
  1752. if (Type == '24') {
  1753. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1754. cols.push(collast);
  1755. var collast = { label: '单据号', name: 'SSDCode', width: 120, align: 'left' };
  1756. cols.push(collast);
  1757. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  1758. cols.push(collast);
  1759. var collast = { label: '客户编码', name: 'CusCode', width: 120, align: 'left' };
  1760. cols.push(collast);
  1761. var collast = { label: '客户名称', name: 'CusName', width: 120, align: 'left' };
  1762. cols.push(collast);
  1763. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1764. cols.push(collast);
  1765. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' };
  1766. cols.push(collast);
  1767. var collast = { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' };
  1768. cols.push(collast);
  1769. var collast = { label: '退货日期', name: 'CreateDateTime', width: 150, align: 'left' };
  1770. cols.push(collast);
  1771. var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' };
  1772. cols.push(collast);
  1773. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  1774. cols.push(collast);
  1775. var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' };
  1776. cols.push(collast);
  1777. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  1778. cols.push(collast);
  1779. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1780. cols.push(collast);
  1781. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1782. //cols.push(collast);
  1783. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  1784. cols.push(collast);
  1785. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1786. cols.push(collast);
  1787. var collast = { label: '入库数量', name: 'SSDQuantity', width: 60, align: 'left', };
  1788. cols.push(collast);
  1789. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  1790. cols.push(collast);
  1791. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  1792. cols.push(collast);
  1793. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  1794. cols.push(collast);
  1795. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  1796. cols.push(collast);
  1797. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  1798. cols.push(collast);
  1799. $.ajax({
  1800. url: "/Print/SelectTableColumnName?" + Math.random(),
  1801. dataType: "json",
  1802. async: false,
  1803. success: function (data) {
  1804. if (data != null && data.length > 0) {
  1805. DateList = data;
  1806. for (var i = 0; i < data.length; i++) {
  1807. var TableCode = data[i].TableCode;
  1808. if (TableCode == "ICSSSD") {
  1809. debugger;
  1810. var Code = data[i].Code;
  1811. var Name = data[i].Name;
  1812. var obj = new Array();
  1813. obj = {
  1814. label: Name,
  1815. name: Code,
  1816. width: 80,
  1817. align: "left"
  1818. }
  1819. cols.push(obj);
  1820. }
  1821. if (TableCode == "ICSInventory") {
  1822. var Code = "ICSInventory" + data[i].Code;
  1823. var Name = data[i].Name;
  1824. var obj = new Array();
  1825. obj = {
  1826. label: Name,
  1827. name: Code,
  1828. width: 80,
  1829. align: "left"
  1830. }
  1831. cols.push(obj);
  1832. //cols1.push(obj);
  1833. }
  1834. }
  1835. }
  1836. _Clos = cols;
  1837. //_Clos1 = cols1;
  1838. }
  1839. });
  1840. }
  1841. //派纳线边仓调拨申请单生成条码
  1842. if (Type == '201') {
  1843. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1844. cols.push(collast);
  1845. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1846. cols.push(collast);
  1847. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1848. cols.push(collast);
  1849. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  1850. cols.push(collast);
  1851. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  1852. cols.push(collast);
  1853. var collast = { label: '调出仓库', name: 'FromWHName', width: 100, align: 'left', };
  1854. cols.push(collast);
  1855. var collast = { label: '调入仓库', name: 'ToWHName', width: 100, align: 'left', };
  1856. cols.push(collast);
  1857. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1858. cols.push(collast);
  1859. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1860. cols.push(collast);
  1861. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1862. cols.push(collast);
  1863. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1864. //cols.push(collast);
  1865. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1866. cols.push(collast);
  1867. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1868. //cols.push(collast);
  1869. $.ajax({
  1870. url: "/Print/SelectTableColumnName?" + Math.random(),
  1871. dataType: "json",
  1872. async: false,
  1873. success: function (data) {
  1874. if (data != null && data.length > 0) {
  1875. DateList = data;
  1876. for (var i = 0; i < data.length; i++) {
  1877. var TableCode = data[i].TableCode;
  1878. if (TableCode == "ICSTransferApplication") {
  1879. var Code = data[i].Code;
  1880. var Name = data[i].Name;
  1881. var obj = new Array();
  1882. obj = {
  1883. label: Name,
  1884. name: Code,
  1885. width: 80,
  1886. align: "left"
  1887. }
  1888. cols.push(obj);
  1889. }
  1890. if (TableCode == "ICSInventory") {
  1891. var Code = "ICSInventory" + data[i].Code;
  1892. var Name = data[i].Name;
  1893. var obj = new Array();
  1894. obj = {
  1895. label: Name,
  1896. name: Code,
  1897. width: 80,
  1898. align: "left"
  1899. }
  1900. cols.push(obj);
  1901. //cols1.push(obj);
  1902. }
  1903. }
  1904. }
  1905. _Clos = cols;
  1906. //_Clos1 = cols1;
  1907. }
  1908. });
  1909. }
  1910. //调拨申请单生成条码
  1911. if (Type == '202') {
  1912. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1913. cols.push(collast);
  1914. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1915. cols.push(collast);
  1916. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1917. cols.push(collast);
  1918. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1919. cols.push(collast);
  1920. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1921. cols.push(collast);
  1922. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1923. cols.push(collast);
  1924. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1925. cols.push(collast);
  1926. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1927. cols.push(collast);
  1928. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1929. //cols.push(collast);
  1930. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1931. cols.push(collast);
  1932. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1933. //cols.push(collast);
  1934. $.ajax({
  1935. url: "/Print/SelectTableColumnName?" + Math.random(),
  1936. dataType: "json",
  1937. async: false,
  1938. success: function (data) {
  1939. if (data != null && data.length > 0) {
  1940. DateList = data;
  1941. for (var i = 0; i < data.length; i++) {
  1942. var TableCode = data[i].TableCode;
  1943. if (TableCode == "ICSTransferApplication") {
  1944. var Code = data[i].Code;
  1945. var Name = data[i].Name;
  1946. var obj = new Array();
  1947. obj = {
  1948. label: Name,
  1949. name: Code,
  1950. width: 80,
  1951. align: "left"
  1952. }
  1953. cols.push(obj);
  1954. }
  1955. if (TableCode == "ICSInventory") {
  1956. var Code = "ICSInventory" + data[i].Code;
  1957. var Name = data[i].Name;
  1958. var obj = new Array();
  1959. obj = {
  1960. label: Name,
  1961. name: Code,
  1962. width: 80,
  1963. align: "left"
  1964. }
  1965. cols.push(obj);
  1966. //cols1.push(obj);
  1967. }
  1968. }
  1969. }
  1970. _Clos = cols;
  1971. //_Clos1 = cols1;
  1972. }
  1973. });
  1974. }
  1975. //一步调入单生成条码
  1976. if (Type == '203') {
  1977. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1978. cols.push(collast);
  1979. var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' };
  1980. cols.push(collast);
  1981. var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' };
  1982. cols.push(collast);
  1983. var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' };
  1984. cols.push(collast);
  1985. var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', };
  1986. cols.push(collast);
  1987. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1988. cols.push(collast);
  1989. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1990. cols.push(collast);
  1991. var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' };
  1992. cols.push(collast);
  1993. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1994. //cols.push(collast);
  1995. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1996. cols.push(collast);
  1997. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1998. //cols.push(collast);
  1999. $.ajax({
  2000. url: "/Print/SelectTableColumnName?" + Math.random(),
  2001. dataType: "json",
  2002. async: false,
  2003. success: function (data) {
  2004. if (data != null && data.length > 0) {
  2005. DateList = data;
  2006. for (var i = 0; i < data.length; i++) {
  2007. var TableCode = data[i].TableCode;
  2008. if (TableCode == "ICSTransferApplication") {
  2009. var Code = data[i].Code;
  2010. var Name = data[i].Name;
  2011. var obj = new Array();
  2012. obj = {
  2013. label: Name,
  2014. name: Code,
  2015. width: 80,
  2016. align: "left"
  2017. }
  2018. cols.push(obj);
  2019. }
  2020. if (TableCode == "ICSInventory") {
  2021. var Code = "ICSInventory" + data[i].Code;
  2022. var Name = data[i].Name;
  2023. var obj = new Array();
  2024. obj = {
  2025. label: Name,
  2026. name: Code,
  2027. width: 80,
  2028. align: "left"
  2029. }
  2030. cols.push(obj);
  2031. //cols1.push(obj);
  2032. }
  2033. }
  2034. }
  2035. _Clos = cols;
  2036. //_Clos1 = cols1;
  2037. }
  2038. });
  2039. }
  2040. if (Type=='17') {
  2041. var cols1 = new Array();
  2042. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  2043. cols1.push(collast1);
  2044. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  2045. cols1.push(collast1);
  2046. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  2047. cols1.push(collast1);
  2048. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  2049. cols1.push(collast1);
  2050. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  2051. cols1.push(collast1);
  2052. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  2053. cols1.push(collast1);
  2054. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  2055. cols1.push(collast1);
  2056. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  2057. cols1.push(collast1);
  2058. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  2059. cols1.push(collast1);
  2060. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  2061. cols1.push(collast1);
  2062. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  2063. cols1.push(collast1);
  2064. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  2065. cols1.push(collast1);
  2066. var collast1 = { label: '是否打印', name: 'isPrint', width: 150, align: 'left' };
  2067. cols1.push(collast1);
  2068. } else {
  2069. var cols1 = new Array();
  2070. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  2071. cols1.push(collast1);
  2072. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  2073. cols1.push(collast1);
  2074. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  2075. cols1.push(collast1);
  2076. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  2077. cols1.push(collast1);
  2078. var collast1 = { label: '条码数量', name: 'Quantity', 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. }
  2105. if (data != null && data.length > 0) {
  2106. DateList = data;
  2107. for (var i = 0; i < data.length; i++) {
  2108. var ColName = data[i].ColName;
  2109. var ColCode = data[i].ColCode;
  2110. var obj = new Array();
  2111. obj = {
  2112. label: ColName,
  2113. name: ColCode,
  2114. width: 80,
  2115. align: "left"
  2116. }
  2117. cols.push(obj);
  2118. cols1.push(obj);
  2119. }
  2120. }
  2121. _Clos = cols;
  2122. _Clos1 = cols1;
  2123. }
  2124. });
  2125. }
  2126. //生产退料
  2127. function gridList() {
  2128. var $gridList = $("#gridList");
  2129. var queryJson = {
  2130. POCode: $("#txt_POCode").val(),
  2131. InvCode: $("#txt_InvCode").val(),
  2132. InvName: $("#txt_InvName").val(),
  2133. BatchCode: $("#txt_BatchCode").val(),
  2134. FromTime: $("#FromTime").val(),
  2135. ToTime: $("#ToTime").val(),
  2136. POStatus: $("#selShow").val()
  2137. }
  2138. $gridList.dataGrid({
  2139. url: "/MHWMS/WMSCreateItemLot/GetGridJson" + "?" + Math.random(),
  2140. postData: { queryJson: JSON.stringify(queryJson) },
  2141. height: $(window).height() - 200,
  2142. width: $(window).width() - 300,
  2143. colModel: _Clos,
  2144. //colModel: [
  2145. // { label: "主键", name: "ID", hidden: true, key: true },
  2146. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  2147. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2148. // { label: '工单子件', name: 'SourceDetailID', hidden: true, },
  2149. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2150. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  2151. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2152. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2153. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2154. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2155. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2156. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2157. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2158. //],
  2159. //colModel: ColModelMain,
  2160. width: "100%",
  2161. autowidth: true,
  2162. //shrinkToFit: true,
  2163. gridComplete: function () {
  2164. },
  2165. pager: "#gridPager",
  2166. sortname: " MTIME desc ,ApplyNegCode asc,REPLICATE('0',10-len(Sequence))+Sequence  ",
  2167. // sortname: 'ApplyNegCode ',
  2168. //let str = `He said, "It's a 'beautiful' day."`,
  2169. //sortorder: "asc",
  2170. viewrecords: true,
  2171. multiselect: true,
  2172. //beforeSelectRow: function (rowid, e) {
  2173. // $("#gridList").jqGrid('resetSelection');
  2174. // return (true);
  2175. //},
  2176. subGrid: true, // (1)开启子表格支持
  2177. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2178. $("#gridList").jqGrid("setSelection", rowid, false);
  2179. bindSubGrid(subgrid_id, rowid)
  2180. }
  2181. });
  2182. $("#warehouse a.btn-default").click(function () {
  2183. $("#warehouse a.btn-default").removeClass("active");
  2184. $(this).addClass("active");
  2185. $('#btn_search').trigger("click");
  2186. });
  2187. $("#btn_search").click(function () {
  2188. var warehouse = $("#warehouse a.active").attr('data-value');
  2189. var queryJson = {
  2190. POCode: $("#txt_POCode").val(),
  2191. InvCode: $("#txt_InvCode").val(),
  2192. InvName: $("#txt_InvName").val(),
  2193. BatchCode: $("#txt_BatchCode").val(),
  2194. FromTime: $("#FromTime").val(),
  2195. ToTime: $("#ToTime").val(),
  2196. POStatus: $("#selShow").val()
  2197. }
  2198. $gridList.jqGrid('setGridParam', {
  2199. postData: { queryJson: JSON.stringify(queryJson) },
  2200. }).trigger('reloadGrid');
  2201. });
  2202. }
  2203. function bindSubGrid(subgrid_id, rowid) {
  2204. $("#gridList").jqGrid("setSelection", rowid, false);
  2205. var subgrid_table_id;
  2206. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2207. var subgrid_pager_id;
  2208. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2209. // (5)动态添加子报表的table和pager
  2210. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2211. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  2212. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2213. // (6)创建jqGrid对象
  2214. $("#" + subgrid_table_id).dataGrid({
  2215. cellEdit: true,
  2216. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2217. //colModel: [
  2218. // { label: "主键", name: "ID", hidden: true, key: true },
  2219. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2220. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2221. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2222. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2223. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2224. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2225. //],
  2226. colModel: _Clos1,
  2227. //colModel: ColModelSub,
  2228. shrinkToFit: true,//宽度自适应
  2229. multiselect: true,
  2230. prmNames: { search: "search" },
  2231. viewrecords: true,
  2232. height: "100%",
  2233. rowNum: 20,
  2234. pager: subgrid_pager_id,
  2235. });
  2236. }
  2237. //委外退料
  2238. function gridList2() {
  2239. var $gridList = $("#gridList");
  2240. var queryJson = {
  2241. POCode: $("#txt_POCode").val(),
  2242. InvCode: $("#txt_InvCode").val(),
  2243. InvName: $("#txt_InvName").val(),
  2244. BatchCode: $("#txt_BatchCode").val(),
  2245. FromTime: $("#FromTime").val(),
  2246. ToTime: $("#ToTime").val(),
  2247. WHCode: $("#txt_WHCode").val(),
  2248. POStatus: $("#selShow").val()
  2249. }
  2250. $gridList.dataGrid({
  2251. url: "/MHWMS/WMSCreateItemLot/GetGridJsonWeiWai" + "?" + Math.random(),
  2252. postData: { queryJson: JSON.stringify(queryJson) },
  2253. height: $(window).height() - 200,
  2254. width: $(window).width() - 300,
  2255. colModel: _Clos,
  2256. //colModel: [
  2257. // { label: "主键", name: "ID", hidden: true, key: true },
  2258. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  2259. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2260. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  2261. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2262. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  2263. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2264. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2265. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2266. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2267. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2268. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2269. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2270. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2271. //],
  2272. //colModel: ColModelMain,
  2273. width: "100%",
  2274. autowidth: true,
  2275. //shrinkToFit: true,
  2276. gridComplete: function () {
  2277. },
  2278. pager: "#gridPager",
  2279. // sortname: 'OApplyNegCode,cast(Sequence as int)',
  2280. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2281. sortorder: "asc",
  2282. viewrecords: true,
  2283. multiselect: true,
  2284. //beforeSelectRow: function (rowid, e) {
  2285. // $("#gridList").jqGrid('resetSelection');
  2286. // return (true);
  2287. //},
  2288. subGrid: true, // (1)开启子表格支持
  2289. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2290. $("#gridList").jqGrid("setSelection", rowid, false);
  2291. bindSubGrid2(subgrid_id, rowid)
  2292. }
  2293. });
  2294. $("#warehouse a.btn-default").click(function () {
  2295. $("#warehouse a.btn-default").removeClass("active");
  2296. $(this).addClass("active");
  2297. $('#btn_search').trigger("click");
  2298. });
  2299. $("#btn_search").click(function () {
  2300. var warehouse = $("#warehouse a.active").attr('data-value');
  2301. var queryJson = {
  2302. POCode: $("#txt_POCode").val(),
  2303. InvCode: $("#txt_InvCode").val(),
  2304. InvName: $("#txt_InvName").val(),
  2305. BatchCode: $("#txt_BatchCode").val(),
  2306. FromTime: $("#FromTime").val(),
  2307. ToTime: $("#ToTime").val(),
  2308. WHCode: $("#txt_WHCode").val(),
  2309. POStatus: $("#selShow").val()
  2310. }
  2311. $gridList.jqGrid('setGridParam', {
  2312. postData: { queryJson: JSON.stringify(queryJson) },
  2313. }).trigger('reloadGrid');
  2314. });
  2315. }
  2316. function bindSubGrid2(subgrid_id, rowid) {
  2317. $("#gridList").jqGrid("setSelection", rowid, false);
  2318. var subgrid_table_id;
  2319. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2320. var subgrid_pager_id;
  2321. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2322. // (5)动态添加子报表的table和pager
  2323. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2324. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  2325. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2326. // (6)创建jqGrid对象
  2327. $("#" + subgrid_table_id).dataGrid({
  2328. cellEdit: true,
  2329. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2330. //colModel: [
  2331. // { label: "主键", name: "ID", hidden: true, key: true },
  2332. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2333. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2334. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2335. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2336. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2337. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2338. //],
  2339. colModel: _Clos1,
  2340. //colModel: ColModelSub,
  2341. shrinkToFit: true,//宽度自适应
  2342. multiselect: true,
  2343. prmNames: { search: "search" },
  2344. viewrecords: true,
  2345. height: "100%",
  2346. rowNum: 20,
  2347. pager: subgrid_pager_id,
  2348. });
  2349. }
  2350. //成品
  2351. function gridList3() {
  2352. var $gridList = $("#gridList");
  2353. var queryJson = {
  2354. POCode: $("#txt_POCode").val(),
  2355. InvCode: $("#txt_InvCode").val(),
  2356. InvName: $("#txt_InvName").val(),
  2357. BatchCode: $("#txt_BatchCode").val(),
  2358. FromTime: $("#FromTime").val(),
  2359. ToTime: $("#ToTime").val(),
  2360. WHCode: $("#txt_WHCode").val(),
  2361. POStatus: $("#selShow").val(),
  2362. SelGDLX: $("#SelGDLX option:checked").val(),
  2363. WHStatus: $("#selStatus").val(),
  2364. InvStd: $("#txt_InvStd").val(),
  2365. SupportCode: $("#txt_SupportCode").val()
  2366. }
  2367. $gridList.dataGrid({
  2368. url: "/MHWMS/WMSCreateItemLot/GetGridJsonChengPing" + "?" + Math.random(),
  2369. postData: { queryJson: JSON.stringify(queryJson) },
  2370. height: $(window).height() - 200,
  2371. width: $(window).width() - 300,
  2372. colModel: _Clos,
  2373. //colModel: [
  2374. // { label: "主键", name: "ID", hidden: true, key: true },
  2375. // { label: '工单号', name: 'MOCode', width: 120, align: 'left' },
  2376. // { label: '工单行号', name: 'Sequence', width: 50, align: 'left' },
  2377. // { label: '已入库数量', name: 'RCVQuantity', hidden: true, },
  2378. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2379. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  2380. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2381. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2382. // {
  2383. // label: "状态", name: "MOStatus", width: 60, align: "left",
  2384. // formatter: function (cellvalue) {
  2385. // if (cellvalue == "1") {
  2386. // return "初始";
  2387. // } else if (cellvalue == "2") {
  2388. // return "下发";
  2389. // }
  2390. // else if (cellvalue == "3") {
  2391. // return "关单";
  2392. // }
  2393. // else { return ""; }
  2394. // }
  2395. // },
  2396. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2397. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2398. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2399. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2400. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2401. // { label: '可入库数量', name: 'ERPNum', width: 100, align: 'left' },
  2402. //],
  2403. //colModel: ColModelMain,
  2404. width: "100%",
  2405. autowidth: true,
  2406. //shrinkToFit: true,
  2407. gridComplete: function () {
  2408. },
  2409. pager: "#gridPager",
  2410. //sortname: 'MOCode,cast(Sequence as int)',
  2411. sortname: "MOCode ",
  2412. sortorder: "asc",
  2413. viewrecords: true,
  2414. multiselect: true,
  2415. //beforeSelectRow: function (rowid, e) {
  2416. // $("#gridList").jqGrid('resetSelection');
  2417. // return (true);
  2418. //},
  2419. subGrid: true, // (1)开启子表格支持
  2420. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2421. $("#gridList").jqGrid("setSelection", rowid, false);
  2422. bindSubGrid3(subgrid_id, rowid)
  2423. }
  2424. });
  2425. $("#warehouse a.btn-default").click(function () {
  2426. $("#warehouse a.btn-default").removeClass("active");
  2427. $(this).addClass("active");
  2428. $('#btn_search').trigger("click");
  2429. });
  2430. $("#btn_search").click(function () {
  2431. var warehouse = $("#warehouse a.active").attr('data-value');
  2432. var queryJson = {
  2433. POCode: $("#txt_POCode").val(),
  2434. InvCode: $("#txt_InvCode").val(),
  2435. InvName: $("#txt_InvName").val(),
  2436. BatchCode: $("#txt_BatchCode").val(),
  2437. FromTime: $("#FromTime").val(),
  2438. ToTime: $("#ToTime").val(),
  2439. WHCode: $("#txt_WHCode").val(),
  2440. POStatus: $("#selShow").val(),
  2441. SelGDLX: $("#SelGDLX option:checked").val(),
  2442. WHStatus: $("#selStatus").val(),
  2443. InvStd: $("#txt_InvStd").val(),
  2444. SupportCode: $("#txt_SupportCode").val()
  2445. }
  2446. $gridList.jqGrid('setGridParam', {
  2447. postData: { queryJson: JSON.stringify(queryJson) },
  2448. }).trigger('reloadGrid');
  2449. });
  2450. }
  2451. function bindSubGrid3(subgrid_id, rowid) {
  2452. $("#gridList").jqGrid("setSelection", rowid, false);
  2453. var subgrid_table_id;
  2454. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2455. var subgrid_pager_id;
  2456. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2457. // (5)动态添加子报表的table和pager
  2458. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2459. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  2460. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2461. var isPrint = $("#selPrint").val();
  2462. // (6)创建jqGrid对象
  2463. $("#" + subgrid_table_id).dataGrid({
  2464. cellEdit: true,
  2465. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2466. //colModel: [
  2467. // { label: "主键", name: "ID", hidden: true, key: true },
  2468. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2469. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2470. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2471. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2472. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2473. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2474. //],
  2475. colModel: _Clos1,
  2476. sortname: "LotNo ",
  2477. sortorder: "desc",
  2478. //colModel: ColModelSub,
  2479. shrinkToFit: true,//宽度自适应
  2480. multiselect: true,
  2481. prmNames: { search: "search" },
  2482. viewrecords: true,
  2483. height: "100%",
  2484. rowNum: 20,
  2485. pager: subgrid_pager_id,
  2486. });
  2487. }
  2488. //销售退货
  2489. function gridList4() {
  2490. var $gridList = $("#gridList");
  2491. var queryJson = {
  2492. POCode: $("#txt_POCode").val(),
  2493. InvCode: $("#txt_InvCode").val(),
  2494. InvName: $("#txt_InvName").val(),
  2495. BatchCode: $("#txt_BatchCode").val(),
  2496. POStatus: $("#selShow").val()
  2497. }
  2498. $gridList.dataGrid({
  2499. url: "/MHWMS/WMSCreateItemLot/GetGridJsonXiaoShou" + "?" + Math.random(),
  2500. postData: { queryJson: JSON.stringify(queryJson) },
  2501. height: $(window).height() - 200,
  2502. width: $(window).width() - 300,
  2503. colModel: _Clos,
  2504. //colModel: [
  2505. // { label: "主键", name: "ID", hidden: true, key: true },
  2506. // { label: '单据号', name: 'SDNCode', width: 120, align: 'left' },
  2507. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2508. // { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' },
  2509. // { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' },
  2510. // { label: '客户代码', name: 'CusCode', width: 120, align: 'left' },
  2511. // { label: '客户名称', name: 'CusName', width: 50, align: 'left' },
  2512. // { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' },
  2513. // { label: '已发数量', name: 'SDNQuantity', width: 50, align: 'left' },
  2514. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2515. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  2516. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2517. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2518. // {
  2519. // label: "状态", name: "Status", width: 60, align: "left",
  2520. // formatter: function (cellvalue) {
  2521. // if (cellvalue == "1") {
  2522. // return "开立";
  2523. // } else if (cellvalue == "2") {
  2524. // return "审核";
  2525. // }
  2526. // else if (cellvalue == "3") {
  2527. // return "关闭";
  2528. // }
  2529. // else { return ""; }
  2530. // }
  2531. // },
  2532. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2533. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2534. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2535. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2536. //],
  2537. //colModel: ColModelMain,
  2538. width: "100%",
  2539. autowidth: true,
  2540. //shrinkToFit: true,
  2541. gridComplete: function () {
  2542. },
  2543. pager: "#gridPager",
  2544. // sortname: 'SDNCode,cast(Sequence as int)',
  2545. sortname: "SDNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2546. sortorder: "asc",
  2547. viewrecords: true,
  2548. multiselect: true,
  2549. //beforeSelectRow: function (rowid, e) {
  2550. // $("#gridList").jqGrid('resetSelection');
  2551. // return (true);
  2552. //},
  2553. subGrid: true, // (1)开启子表格支持
  2554. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2555. $("#gridList").jqGrid("setSelection", rowid, false);
  2556. bindSubGrid4(subgrid_id, rowid)
  2557. }
  2558. });
  2559. $("#warehouse a.btn-default").click(function () {
  2560. $("#warehouse a.btn-default").removeClass("active");
  2561. $(this).addClass("active");
  2562. $('#btn_search').trigger("click");
  2563. });
  2564. $("#btn_search").click(function () {
  2565. var warehouse = $("#warehouse a.active").attr('data-value');
  2566. var queryJson = {
  2567. POCode: $("#txt_POCode").val(),
  2568. InvCode: $("#txt_InvCode").val(),
  2569. InvName: $("#txt_InvName").val(),
  2570. BatchCode: $("#txt_BatchCode").val(),
  2571. POStatus: $("#selShow").val()
  2572. }
  2573. $gridList.jqGrid('setGridParam', {
  2574. postData: { queryJson: JSON.stringify(queryJson) },
  2575. }).trigger('reloadGrid');
  2576. });
  2577. }
  2578. function bindSubGrid4(subgrid_id, rowid) {
  2579. $("#gridList").jqGrid("setSelection", rowid, false);
  2580. var subgrid_table_id;
  2581. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2582. var subgrid_pager_id;
  2583. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2584. // (5)动态添加子报表的table和pager
  2585. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2586. var SDNCode = $("#gridList").jqGrid('getRowData', rowid).SDNCode;
  2587. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2588. var isPrint = $("#selPrint").val();
  2589. // (6)创建jqGrid对象
  2590. $("#" + subgrid_table_id).dataGrid({
  2591. cellEdit: true,
  2592. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SDNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2593. //colModel: [
  2594. // { label: "主键", name: "ID", hidden: true, key: true },
  2595. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2596. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2597. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2598. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2599. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2600. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2601. //],
  2602. colModel: _Clos1,
  2603. //colModel: ColModelSub,
  2604. shrinkToFit: true,//宽度自适应
  2605. multiselect: true,
  2606. prmNames: { search: "search" },
  2607. viewrecords: true,
  2608. height: "100%",
  2609. rowNum: 20,
  2610. pager: subgrid_pager_id,
  2611. });
  2612. }
  2613. //其它入库生成条码
  2614. function gridList5() {
  2615. var $gridList = $("#gridList");
  2616. var queryJson = {
  2617. POCode: $("#txt_POCode").val(),
  2618. InvCode: $("#txt_InvCode").val(),
  2619. InvName: $("#txt_InvName").val(),
  2620. BatchCode: $("#txt_BatchCode").val(),
  2621. FromTime: $("#FromTime").val(),
  2622. ToTime: $("#ToTime").val(),
  2623. WHCode: $("#txt_WHCode").val(),
  2624. POStatus: $("#selShow").val(),
  2625. InvStd: $("#txt_InvStd").val(),
  2626. }
  2627. $gridList.dataGrid({
  2628. url: "/MHWMS/WMSCreateItemLot/GetGridJsonQiTa" + "?" + Math.random(),
  2629. postData: { queryJson: JSON.stringify(queryJson) },
  2630. height: $(window).height() - 200,
  2631. width: $(window).width() - 300,
  2632. colModel: _Clos,
  2633. //colModel: [
  2634. // { label: "主键", name: "ID", hidden: true, key: true },
  2635. // { label: '单据号', name: 'InCode', width: 120, align: 'left' },
  2636. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2637. // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' },
  2638. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2639. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2640. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2641. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2642. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2643. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2644. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2645. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2646. // { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', },
  2647. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2648. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2649. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2650. //],
  2651. //colModel: ColModelMain,
  2652. width: "100%",
  2653. autowidth: true,
  2654. //shrinkToFit: true,
  2655. gridComplete: function () {
  2656. },
  2657. pager: "#gridPager",
  2658. sortname: 'InCode',
  2659. sortorder: "asc",
  2660. viewrecords: true,
  2661. multiselect: true,
  2662. //beforeSelectRow: function (rowid, e) {
  2663. // $("#gridList").jqGrid('resetSelection');
  2664. // return (true);
  2665. //},
  2666. subGrid: true, // (1)开启子表格支持
  2667. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2668. $("#gridList").jqGrid("setSelection", rowid, false);
  2669. bindSubGrid5(subgrid_id, rowid)
  2670. }
  2671. });
  2672. $("#warehouse a.btn-default").click(function () {
  2673. $("#warehouse a.btn-default").removeClass("active");
  2674. $(this).addClass("active");
  2675. $('#btn_search').trigger("click");
  2676. });
  2677. $("#btn_search").click(function () {
  2678. var warehouse = $("#warehouse a.active").attr('data-value');
  2679. var queryJson = {
  2680. POCode: $("#txt_POCode").val(),
  2681. InvCode: $("#txt_InvCode").val(),
  2682. InvName: $("#txt_InvName").val(),
  2683. BatchCode: $("#txt_BatchCode").val(),
  2684. FromTime: $("#FromTime").val(),
  2685. ToTime: $("#ToTime").val(),
  2686. WHCode: $("#txt_WHCode").val(),
  2687. POStatus: $("#selShow").val(),
  2688. InvStd: $("#txt_InvStd").val(),
  2689. }
  2690. $gridList.jqGrid('setGridParam', {
  2691. postData: { queryJson: JSON.stringify(queryJson) },
  2692. }).trigger('reloadGrid');
  2693. });
  2694. }
  2695. function bindSubGrid5(subgrid_id, rowid) {
  2696. $("#gridList").jqGrid("setSelection", rowid, false);
  2697. var subgrid_table_id;
  2698. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2699. var subgrid_pager_id;
  2700. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2701. // (5)动态添加子报表的table和pager
  2702. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2703. var InCode = $("#gridList").jqGrid('getRowData', rowid).InCode;
  2704. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2705. var isPrint = $("#selPrint").val();
  2706. // (6)创建jqGrid对象
  2707. $("#" + subgrid_table_id).dataGrid({
  2708. cellEdit: true,
  2709. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + InCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2710. //colModel: [
  2711. // { label: "主键", name: "ID", hidden: true, key: true },
  2712. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2713. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2714. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2715. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2716. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2717. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2718. //],
  2719. colModel: _Clos1,
  2720. //colModel: ColModelSub,
  2721. shrinkToFit: true,//宽度自适应
  2722. multiselect: true,
  2723. prmNames: { search: "search" },
  2724. viewrecords: true,
  2725. height: "100%",
  2726. rowNum: 20,
  2727. pager: subgrid_pager_id,
  2728. });
  2729. }
  2730. //归还单生成条码
  2731. function gridList6() {
  2732. var $gridList = $("#gridList");
  2733. var queryJson = {
  2734. POCode: $("#txt_POCode").val(),
  2735. InvCode: $("#txt_InvCode").val(),
  2736. InvName: $("#txt_InvName").val(),
  2737. BatchCode: $("#txt_BatchCode").val(),
  2738. POStatus: $("#selShow").val()
  2739. }
  2740. $gridList.dataGrid({
  2741. url: "/MHWMS/WMSCreateItemLot/GetGridJsonGuiHuan" + "?" + Math.random(),
  2742. postData: { queryJson: JSON.stringify(queryJson) },
  2743. height: $(window).height() - 200,
  2744. width: $(window).width() - 300,
  2745. colModel: _Clos,
  2746. //colModel: [
  2747. // { label: "主键", name: "ID", hidden: true, key: true },
  2748. // { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' },
  2749. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2750. // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' },
  2751. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2752. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2753. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2754. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2755. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2756. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2757. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2758. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2759. // { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', },
  2760. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2761. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2762. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2763. //],
  2764. //colModel: ColModelMain,
  2765. width: "100%",
  2766. autowidth: true,
  2767. //shrinkToFit: true,
  2768. gridComplete: function () {
  2769. },
  2770. pager: "#gridPager",
  2771. /// sortname: 'ReturnCode,cast(Sequence as int)',
  2772. sortname: "ReturnCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2773. sortorder: "asc",
  2774. viewrecords: true,
  2775. multiselect: true,
  2776. //beforeSelectRow: function (rowid, e) {
  2777. // $("#gridList").jqGrid('resetSelection');
  2778. // return (true);
  2779. //},
  2780. subGrid: true, // (1)开启子表格支持
  2781. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2782. $("#gridList").jqGrid("setSelection", rowid, false);
  2783. bindSubGrid6(subgrid_id, rowid)
  2784. }
  2785. });
  2786. $("#warehouse a.btn-default").click(function () {
  2787. $("#warehouse a.btn-default").removeClass("active");
  2788. $(this).addClass("active");
  2789. $('#btn_search').trigger("click");
  2790. });
  2791. $("#btn_search").click(function () {
  2792. var warehouse = $("#warehouse a.active").attr('data-value');
  2793. var queryJson = {
  2794. POCode: $("#txt_POCode").val(),
  2795. InvCode: $("#txt_InvCode").val(),
  2796. InvName: $("#txt_InvName").val(),
  2797. BatchCode: $("#txt_BatchCode").val(),
  2798. POStatus: $("#selShow").val()
  2799. }
  2800. $gridList.jqGrid('setGridParam', {
  2801. postData: { queryJson: JSON.stringify(queryJson) },
  2802. }).trigger('reloadGrid');
  2803. });
  2804. }
  2805. function bindSubGrid6(subgrid_id, rowid) {
  2806. $("#gridList").jqGrid("setSelection", rowid, false);
  2807. var subgrid_table_id;
  2808. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2809. var subgrid_pager_id;
  2810. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2811. // (5)动态添加子报表的table和pager
  2812. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2813. var ReturnCode = $("#gridList").jqGrid('getRowData', rowid).ReturnCode;
  2814. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2815. // (6)创建jqGrid对象
  2816. $("#" + subgrid_table_id).dataGrid({
  2817. cellEdit: true,
  2818. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ReturnCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2819. //colModel: [
  2820. // { label: "主键", name: "ID", hidden: true, key: true },
  2821. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2822. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2823. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2824. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2825. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2826. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2827. //],
  2828. colModel: _Clos1,
  2829. //colModel: ColModelSub,
  2830. shrinkToFit: true,//宽度自适应
  2831. multiselect: true,
  2832. prmNames: { search: "search" },
  2833. viewrecords: true,
  2834. height: "100%",
  2835. rowNum: 20,
  2836. pager: subgrid_pager_id,
  2837. });
  2838. }
  2839. //*审核到货单生成条码
  2840. function gridList7() {
  2841. var $gridList = $("#gridList");
  2842. var queryJson = {
  2843. POCode: $("#txt_POCode").val(),
  2844. VenCode: $("#txt_VenCode").val(),
  2845. VenName: $("#txt_VenName").val(),
  2846. InvCode: $("#txt_InvCode").val(),
  2847. InvName: $("#txt_InvName").val(),
  2848. BatchCode: $("#txt_BatchCode").val(),
  2849. FromTime: $("#FromTime").val(),
  2850. ToTime: $("#ToTime").val(),
  2851. POStatus: $("#selShow").val(),
  2852. WHStatus: $("#selStatus").val(),
  2853. Support: $("#txt_SupportCode").val(),
  2854. Creater: $("#txt_Creater").val()
  2855. }
  2856. $gridList.dataGrid({
  2857. url: "/MHWMS/WMSCreateItemLot/GetGridJsonSHDH" + "?" + Math.random(),
  2858. postData: { queryJson: JSON.stringify(queryJson) },
  2859. height: $(window).height() - 200,
  2860. width: $(window).width() - 300,
  2861. colModel: _Clos,
  2862. //colModel: [
  2863. // { label: "主键", name: "ID", hidden: true, key: true },
  2864. // { label: '单据号', name: 'DNCode', width: 120, align: 'left' },
  2865. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2866. // { label: '采购订单号', name: 'POCode', width: 50, align: 'left' },
  2867. // { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' },
  2868. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  2869. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  2870. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2871. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2872. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2873. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2874. // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' },
  2875. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2876. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2877. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2878. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2879. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  2880. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  2881. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2882. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2883. //],
  2884. //colModel: ColModelMain,
  2885. width: "100%",
  2886. autowidth: true,
  2887. //shrinkToFit: true,
  2888. gridComplete: function () {
  2889. },
  2890. pager: "#gridPager",
  2891. //sortname: 'DNCode,cast(Sequence as int)',
  2892. sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2893. sortorder: "asc",
  2894. viewrecords: true,
  2895. multiselect: true,
  2896. //beforeSelectRow: function (rowid, e) {
  2897. // $("#gridList").jqGrid('resetSelection');
  2898. // return (true);
  2899. //},
  2900. subGrid: true, // (1)开启子表格支持
  2901. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2902. $("#gridList").jqGrid("setSelection", rowid, false);
  2903. bindSubGrid7(subgrid_id, rowid)
  2904. }
  2905. });
  2906. $("#warehouse a.btn-default").click(function () {
  2907. $("#warehouse a.btn-default").removeClass("active");
  2908. $(this).addClass("active");
  2909. $('#btn_search').trigger("click");
  2910. });
  2911. $("#btn_search").click(function () {
  2912. var warehouse = $("#warehouse a.active").attr('data-value');
  2913. var queryJson = {
  2914. POCode: $("#txt_POCode").val(),
  2915. VenCode: $("#txt_VenCode").val(),
  2916. VenName: $("#txt_VenName").val(),
  2917. InvCode: $("#txt_InvCode").val(),
  2918. InvName: $("#txt_InvName").val(),
  2919. BatchCode: $("#txt_BatchCode").val(),
  2920. FromTime: $("#FromTime").val(),
  2921. ToTime: $("#ToTime").val(),
  2922. POStatus: $("#selShow").val(),
  2923. WHStatus: $("#selStatus").val(),
  2924. Support: $("#txt_SupportCode").val(),
  2925. Creater: $("#txt_Creater").val()
  2926. }
  2927. $gridList.jqGrid('setGridParam', {
  2928. postData: { queryJson: JSON.stringify(queryJson) },
  2929. }).trigger('reloadGrid');
  2930. });
  2931. }
  2932. function bindSubGrid7(subgrid_id, rowid) {
  2933. $("#gridList").jqGrid("setSelection", rowid, false);
  2934. var subgrid_table_id;
  2935. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2936. var subgrid_pager_id;
  2937. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2938. // (5)动态添加子报表的table和pager
  2939. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2940. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  2941. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2942. var isPrint = $("#selPrint").val();
  2943. // (6)创建jqGrid对象
  2944. $("#" + subgrid_table_id).dataGrid({
  2945. cellEdit: true,
  2946. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2947. //colModel: [
  2948. // { label: "主键", name: "ID", hidden: true, key: true },
  2949. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2950. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2951. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2952. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2953. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2954. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2955. //],
  2956. colModel: _Clos1,
  2957. //colModel: ColModelSub,
  2958. sortname: "LotNo ",
  2959. sortorder: "desc",
  2960. shrinkToFit: true,//宽度自适应
  2961. multiselect: true,
  2962. prmNames: { search: "search" },
  2963. viewrecords: true,
  2964. height: "100%",
  2965. rowNum: 20,
  2966. pager: subgrid_pager_id,
  2967. });
  2968. }
  2969. //审核委外到货单生成条码
  2970. function gridList8() {
  2971. var $gridList = $("#gridList");
  2972. var queryJson = {
  2973. POCode: $("#txt_POCode").val(),
  2974. VenCode: $("#txt_VenCode").val(),
  2975. VenName: $("#txt_VenName").val(),
  2976. InvCode: $("#txt_InvCode").val(),
  2977. InvName: $("#txt_InvName").val(),
  2978. BatchCode: $("#txt_BatchCode").val(),
  2979. POStatus: $("#selShow").val(),
  2980. WHStatus: $("#selStatus").val(),
  2981. InvStd: $("#txt_InvStd").val(),
  2982. }
  2983. $gridList.dataGrid({
  2984. url: "/MHWMS/WMSCreateItemLot/GetGridJsonWWSHDH" + "?" + Math.random(),
  2985. postData: { queryJson: JSON.stringify(queryJson) },
  2986. height: $(window).height() - 200,
  2987. width: $(window).width() - 300,
  2988. colModel: _Clos,
  2989. //colModel: [
  2990. // { label: "主键", name: "ID", hidden: true, key: true },
  2991. // { label: '单据号', name: 'ODNCode', width: 120, align: 'left' },
  2992. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2993. // { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' },
  2994. // { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' },
  2995. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  2996. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  2997. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2998. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2999. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3000. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3001. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  3002. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3003. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3004. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3005. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3006. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3007. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  3008. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3009. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3010. //],
  3011. //colModel: ColModelMain,
  3012. width: "100%",
  3013. autowidth: true,
  3014. //shrinkToFit: true,
  3015. gridComplete: function () {
  3016. },
  3017. pager: "#gridPager",
  3018. //sortname: 'ODNCode,cast(Sequence as int)',
  3019. sortname: "ODNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3020. sortorder: "asc",
  3021. viewrecords: true,
  3022. multiselect: true,
  3023. //beforeSelectRow: function (rowid, e) {
  3024. // $("#gridList").jqGrid('resetSelection');
  3025. // return (true);
  3026. //},
  3027. subGrid: true, // (1)开启子表格支持
  3028. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3029. $("#gridList").jqGrid("setSelection", rowid, false);
  3030. bindSubGrid8(subgrid_id, rowid)
  3031. }
  3032. });
  3033. $("#warehouse a.btn-default").click(function () {
  3034. $("#warehouse a.btn-default").removeClass("active");
  3035. $(this).addClass("active");
  3036. $('#btn_search').trigger("click");
  3037. });
  3038. $("#btn_search").click(function () {
  3039. var warehouse = $("#warehouse a.active").attr('data-value');
  3040. var queryJson = {
  3041. POCode: $("#txt_POCode").val(),
  3042. VenCode: $("#txt_VenCode").val(),
  3043. VenName: $("#txt_VenName").val(),
  3044. InvCode: $("#txt_InvCode").val(),
  3045. InvName: $("#txt_InvName").val(),
  3046. BatchCode: $("#txt_BatchCode").val(),
  3047. POStatus: $("#selShow").val(),
  3048. WHStatus: $("#selStatus").val(),
  3049. InvStd: $("#txt_InvStd").val(),
  3050. }
  3051. $gridList.jqGrid('setGridParam', {
  3052. postData: { queryJson: JSON.stringify(queryJson) },
  3053. }).trigger('reloadGrid');
  3054. });
  3055. }
  3056. function bindSubGrid8(subgrid_id, rowid) {
  3057. $("#gridList").jqGrid("setSelection", rowid, false);
  3058. var subgrid_table_id;
  3059. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3060. var subgrid_pager_id;
  3061. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3062. // (5)动态添加子报表的table和pager
  3063. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3064. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).ODNCode;
  3065. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3066. var isPrint = $("#selPrint").val();
  3067. // (6)创建jqGrid对象
  3068. $("#" + subgrid_table_id).dataGrid({
  3069. cellEdit: true,
  3070. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3071. //colModel: [
  3072. // { label: "主键", name: "ID", hidden: true, key: true },
  3073. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3074. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3075. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3076. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3077. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3078. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3079. //],
  3080. colModel: _Clos1,
  3081. //colModel: ColModelSub,
  3082. sortname: "LotNo ",
  3083. sortorder: "desc",
  3084. shrinkToFit: true,//宽度自适应
  3085. multiselect: true,
  3086. prmNames: { search: "search" },
  3087. viewrecords: true,
  3088. height: "100%",
  3089. rowNum: 20,
  3090. pager: subgrid_pager_id,
  3091. });
  3092. }
  3093. //开立得成品入库单 生成条码
  3094. function gridList9() {
  3095. var $gridList = $("#gridList");
  3096. var queryJson = {
  3097. POCode: $("#txt_POCode").val(),
  3098. InvCode: $("#txt_InvCode").val(),
  3099. InvName: $("#txt_InvName").val(),
  3100. BatchCode: $("#txt_BatchCode").val(),
  3101. POStatus: $("#selShow").val(),
  3102. SCode: $("#txt_SCode").val(),
  3103. }
  3104. $gridList.dataGrid({
  3105. url: "/MHWMS/WMSCreateItemLot/GetGridJsonKLCPRK" + "?" + Math.random(),
  3106. postData: { queryJson: JSON.stringify(queryJson) },
  3107. height: $(window).height() - 200,
  3108. width: $(window).width() - 300,
  3109. colModel: _Clos,
  3110. //colModel: [
  3111. // { label: "主键", name: "ID", hidden: true, key: true },
  3112. // { label: '单据号', name: 'RCVCode', width: 120, align: 'left' },
  3113. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  3114. // { label: '仓库号', name: 'WHCode', width: 120, align: 'left' },
  3115. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  3116. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  3117. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3118. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3119. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  3120. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3121. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3122. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3123. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3124. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3125. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3126. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3127. //],
  3128. //colModel: ColModelMain,
  3129. width: "100%",
  3130. autowidth: true,
  3131. //shrinkToFit: true,
  3132. gridComplete: function () {
  3133. },
  3134. pager: "#gridPager",
  3135. //sortname: 'RCVCode,cast(Sequence as int)',
  3136. sortname: "RCVCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3137. sortorder: "asc",
  3138. viewrecords: true,
  3139. multiselect: true,
  3140. //beforeSelectRow: function (rowid, e) {
  3141. // $("#gridList").jqGrid('resetSelection');
  3142. // return (true);
  3143. //},
  3144. subGrid: true, // (1)开启子表格支持
  3145. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3146. $("#gridList").jqGrid("setSelection", rowid, false);
  3147. bindSubGrid9(subgrid_id, rowid)
  3148. }
  3149. });
  3150. $("#warehouse a.btn-default").click(function () {
  3151. $("#warehouse a.btn-default").removeClass("active");
  3152. $(this).addClass("active");
  3153. $('#btn_search').trigger("click");
  3154. });
  3155. $("#btn_search").click(function () {
  3156. var warehouse = $("#warehouse a.active").attr('data-value');
  3157. var queryJson = {
  3158. POCode: $("#txt_POCode").val(),
  3159. InvCode: $("#txt_InvCode").val(),
  3160. InvName: $("#txt_InvName").val(),
  3161. BatchCode: $("#txt_BatchCode").val(),
  3162. POStatus: $("#selShow").val(),
  3163. SCode: $("#txt_SCode").val(),
  3164. }
  3165. $gridList.jqGrid('setGridParam', {
  3166. postData: { queryJson: JSON.stringify(queryJson) },
  3167. }).trigger('reloadGrid');
  3168. });
  3169. }
  3170. function bindSubGrid9(subgrid_id, rowid) {
  3171. $("#gridList").jqGrid("setSelection", rowid, false);
  3172. var subgrid_table_id;
  3173. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3174. var subgrid_pager_id;
  3175. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3176. // (5)动态添加子报表的table和pager
  3177. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3178. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  3179. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3180. // (6)创建jqGrid对象
  3181. $("#" + subgrid_table_id).dataGrid({
  3182. cellEdit: true,
  3183. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3184. //colModel: [
  3185. // { label: "主键", name: "ID", hidden: true, key: true },
  3186. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3187. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3188. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3189. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3190. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3191. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3192. //],
  3193. colModel: _Clos1,
  3194. //colModel: ColModelSub,
  3195. shrinkToFit: true,//宽度自适应
  3196. multiselect: true,
  3197. prmNames: { search: "search" },
  3198. viewrecords: true,
  3199. height: "100%",
  3200. rowNum: 20,
  3201. pager: subgrid_pager_id,
  3202. });
  3203. }
  3204. //采购拒收单
  3205. function gridList10() {
  3206. var $gridList = $("#gridList");
  3207. var queryJson = {
  3208. POCode: $("#txt_POCode").val(),
  3209. VenCode: $("#txt_VenCode").val(),
  3210. VenName: $("#txt_VenName").val(),
  3211. InvCode: $("#txt_InvCode").val(),
  3212. InvName: $("#txt_InvName").val(),
  3213. BatchCode: $("#txt_BatchCode").val(),
  3214. POStatus: $("#selShow").val()
  3215. }
  3216. $gridList.dataGrid({
  3217. url: "/MHWMS/WMSCreateItemLot/GetGridJsonJSD" + "?" + Math.random(),
  3218. postData: { queryJson: JSON.stringify(queryJson) },
  3219. height: $(window).height() - 200,
  3220. width: $(window).width() - 300,
  3221. colModel: _Clos,
  3222. //colModel: [
  3223. // { label: "主键", name: "ID", hidden: true, key: true },
  3224. // { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' },
  3225. // { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' },
  3226. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  3227. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  3228. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  3229. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  3230. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3231. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3232. // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' },
  3233. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3234. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3235. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3236. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3237. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3238. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  3239. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3240. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3241. //],
  3242. //colModel: ColModelMain,
  3243. width: "100%",
  3244. autowidth: true,
  3245. //shrinkToFit: true,
  3246. gridComplete: function () {
  3247. },
  3248. pager: "#gridPager",
  3249. //sortname: 'DNCode,cast(Sequence as int)',
  3250. sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3251. sortorder: "asc",
  3252. viewrecords: true,
  3253. multiselect: true,
  3254. //beforeSelectRow: function (rowid, e) {
  3255. // $("#gridList").jqGrid('resetSelection');
  3256. // return (true);
  3257. //},
  3258. subGrid: true, // (1)开启子表格支持
  3259. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3260. $("#gridList").jqGrid("setSelection", rowid, false);
  3261. bindSubGrid10(subgrid_id, rowid)
  3262. }
  3263. });
  3264. $("#warehouse a.btn-default").click(function () {
  3265. $("#warehouse a.btn-default").removeClass("active");
  3266. $(this).addClass("active");
  3267. $('#btn_search').trigger("click");
  3268. });
  3269. $("#btn_search").click(function () {
  3270. var warehouse = $("#warehouse a.active").attr('data-value');
  3271. var queryJson = {
  3272. POCode: $("#txt_POCode").val(),
  3273. VenCode: $("#txt_VenCode").val(),
  3274. VenName: $("#txt_VenName").val(),
  3275. InvCode: $("#txt_InvCode").val(),
  3276. InvName: $("#txt_InvName").val(),
  3277. BatchCode: $("#txt_BatchCode").val(),
  3278. POStatus: $("#selShow").val()
  3279. }
  3280. $gridList.jqGrid('setGridParam', {
  3281. postData: { queryJson: JSON.stringify(queryJson) },
  3282. }).trigger('reloadGrid');
  3283. });
  3284. }
  3285. function bindSubGrid10(subgrid_id, rowid) {
  3286. $("#gridList").jqGrid("setSelection", rowid, false);
  3287. var subgrid_table_id;
  3288. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3289. var subgrid_pager_id;
  3290. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3291. // (5)动态添加子报表的table和pager
  3292. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3293. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  3294. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3295. // (6)创建jqGrid对象
  3296. $("#" + subgrid_table_id).dataGrid({
  3297. cellEdit: true,
  3298. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3299. //colModel: [
  3300. // { label: "主键", name: "ID", hidden: true, key: true },
  3301. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3302. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3303. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3304. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3305. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3306. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3307. //],
  3308. colModel: _Clos1,
  3309. //colModel: ColModelSub,
  3310. shrinkToFit: true,//宽度自适应
  3311. multiselect: true,
  3312. prmNames: { search: "search" },
  3313. viewrecords: true,
  3314. height: "100%",
  3315. rowNum: 20,
  3316. pager: subgrid_pager_id,
  3317. });
  3318. }
  3319. //委外拒收单生成条码
  3320. function gridList11() {
  3321. var $gridList = $("#gridList");
  3322. var queryJson = {
  3323. POCode: $("#txt_POCode").val(),
  3324. VenCode: $("#txt_VenCode").val(),
  3325. VenName: $("#txt_VenName").val(),
  3326. InvCode: $("#txt_InvCode").val(),
  3327. InvName: $("#txt_InvName").val(),
  3328. BatchCode: $("#txt_BatchCode").val(),
  3329. POStatus: $("#selShow").val()
  3330. }
  3331. $gridList.dataGrid({
  3332. url: "/MHWMS/WMSCreateItemLot/GetGridJsonWWJSD" + "?" + Math.random(),
  3333. postData: { queryJson: JSON.stringify(queryJson) },
  3334. height: $(window).height() - 200,
  3335. width: $(window).width() - 300,
  3336. colModel: _Clos,
  3337. //colModel: [
  3338. // { label: "主键", name: "ID", hidden: true, key: true },
  3339. // { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' },
  3340. // { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' },
  3341. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  3342. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  3343. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  3344. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  3345. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  3346. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  3347. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  3348. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3349. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3350. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  3351. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3352. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  3353. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  3354. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  3355. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  3356. //],
  3357. //colModel: ColModelMain,
  3358. width: "100%",
  3359. autowidth: true,
  3360. //shrinkToFit: true,
  3361. gridComplete: function () {
  3362. },
  3363. pager: "#gridPager",
  3364. // sortname: 'OOCode,cast(Sequence as int)',
  3365. sortname: "OOCode,REPLICATE('0',10-len(OOSequence))+OOSequence ",
  3366. sortorder: "asc",
  3367. viewrecords: true,
  3368. multiselect: true,
  3369. //beforeSelectRow: function (rowid, e) {
  3370. // $("#gridList").jqGrid('resetSelection');
  3371. // return (true);
  3372. //},
  3373. subGrid: true, // (1)开启子表格支持
  3374. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3375. $("#gridList").jqGrid("setSelection", rowid, false);
  3376. bindSubGrid11(subgrid_id, rowid)
  3377. }
  3378. });
  3379. $("#warehouse a.btn-default").click(function () {
  3380. $("#warehouse a.btn-default").removeClass("active");
  3381. $(this).addClass("active");
  3382. $('#btn_search').trigger("click");
  3383. });
  3384. $("#btn_search").click(function () {
  3385. var warehouse = $("#warehouse a.active").attr('data-value');
  3386. var queryJson = {
  3387. POCode: $("#txt_POCode").val(),
  3388. VenCode: $("#txt_VenCode").val(),
  3389. VenName: $("#txt_VenName").val(),
  3390. InvCode: $("#txt_InvCode").val(),
  3391. InvName: $("#txt_InvName").val(),
  3392. BatchCode: $("#txt_BatchCode").val(),
  3393. POStatus: $("#selShow").val()
  3394. }
  3395. $gridList.jqGrid('setGridParam', {
  3396. postData: { queryJson: JSON.stringify(queryJson) },
  3397. }).trigger('reloadGrid');
  3398. });
  3399. }
  3400. function bindSubGrid11(subgrid_id, rowid) {
  3401. $("#gridList").jqGrid("setSelection", rowid, false);
  3402. var subgrid_table_id;
  3403. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3404. var subgrid_pager_id;
  3405. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3406. // (5)动态添加子报表的table和pager
  3407. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3408. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).OOCode;
  3409. var Sequence = $("#gridList").jqGrid('getRowData', rowid).OOSequence;
  3410. // (6)创建jqGrid对象
  3411. $("#" + subgrid_table_id).dataGrid({
  3412. cellEdit: true,
  3413. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3414. //colModel: [
  3415. // { label: "主键", name: "ID", hidden: true, key: true },
  3416. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3417. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3418. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3419. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3420. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3421. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3422. //],
  3423. colModel: _Clos1,
  3424. //colModel: ColModelSub,
  3425. shrinkToFit: true,//宽度自适应
  3426. multiselect: true,
  3427. prmNames: { search: "search" },
  3428. viewrecords: true,
  3429. height: "100%",
  3430. rowNum: 20,
  3431. pager: subgrid_pager_id,
  3432. });
  3433. }
  3434. //领料申请退料生成条码
  3435. function gridList12() {
  3436. var $gridList = $("#gridList");
  3437. var queryJson = {
  3438. POCode: $("#txt_POCode").val(),
  3439. InvCode: $("#txt_InvCode").val(),
  3440. InvName: $("#txt_InvName").val(),
  3441. BatchCode: $("#txt_BatchCode").val(),
  3442. FromTime: $("#FromTime").val(),
  3443. ToTime: $("#ToTime").val(),
  3444. POStatus: $("#selShow").val()
  3445. }
  3446. $gridList.dataGrid({
  3447. url: "/MHWMS/WMSCreateItemLot/GetGridJsonLLSQTL" + "?" + Math.random(),
  3448. postData: { queryJson: JSON.stringify(queryJson) },
  3449. height: $(window).height() - 200,
  3450. width: $(window).width() - 300,
  3451. colModel: _Clos,
  3452. //colModel: [
  3453. // { label: "主键", name: "ID", hidden: true, key: true },
  3454. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  3455. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3456. // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, },
  3457. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3458. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  3459. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3460. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3461. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3462. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3463. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3464. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3465. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3466. //],
  3467. //colModel: ColModelMain,
  3468. width: "100%",
  3469. autowidth: true,
  3470. //shrinkToFit: true,
  3471. gridComplete: function () {
  3472. },
  3473. pager: "#gridPager",
  3474. // sortname: 'ApplyNegCode,cast(Sequence as int)',
  3475. sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3476. sortorder: "asc",
  3477. viewrecords: true,
  3478. multiselect: true,
  3479. //beforeSelectRow: function (rowid, e) {
  3480. // $("#gridList").jqGrid('resetSelection');
  3481. // return (true);
  3482. //},
  3483. subGrid: true, // (1)开启子表格支持
  3484. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3485. $("#gridList").jqGrid("setSelection", rowid, false);
  3486. bindSubGrid12(subgrid_id, rowid)
  3487. }
  3488. });
  3489. $("#warehouse a.btn-default").click(function () {
  3490. $("#warehouse a.btn-default").removeClass("active");
  3491. $(this).addClass("active");
  3492. $('#btn_search').trigger("click");
  3493. });
  3494. $("#btn_search").click(function () {
  3495. var warehouse = $("#warehouse a.active").attr('data-value');
  3496. var queryJson = {
  3497. POCode: $("#txt_POCode").val(),
  3498. InvCode: $("#txt_InvCode").val(),
  3499. InvName: $("#txt_InvName").val(),
  3500. BatchCode: $("#txt_BatchCode").val(),
  3501. FromTime: $("#FromTime").val(),
  3502. ToTime: $("#ToTime").val(),
  3503. POStatus: $("#selShow").val()
  3504. }
  3505. $gridList.jqGrid('setGridParam', {
  3506. postData: { queryJson: JSON.stringify(queryJson) },
  3507. }).trigger('reloadGrid');
  3508. });
  3509. }
  3510. function bindSubGrid12(subgrid_id, rowid) {
  3511. $("#gridList").jqGrid("setSelection", rowid, false);
  3512. var subgrid_table_id;
  3513. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3514. var subgrid_pager_id;
  3515. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3516. // (5)动态添加子报表的table和pager
  3517. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3518. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  3519. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3520. // (6)创建jqGrid对象
  3521. $("#" + subgrid_table_id).dataGrid({
  3522. cellEdit: true,
  3523. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3524. //colModel: [
  3525. // { label: "主键", name: "ID", hidden: true, key: true },
  3526. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3527. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3528. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3529. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3530. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3531. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3532. //],
  3533. colModel: _Clos1,
  3534. //colModel: ColModelSub,
  3535. shrinkToFit: true,//宽度自适应
  3536. multiselect: true,
  3537. prmNames: { search: "search" },
  3538. viewrecords: true,
  3539. height: "100%",
  3540. rowNum: 20,
  3541. pager: subgrid_pager_id,
  3542. });
  3543. }
  3544. //材料出库退料
  3545. function gridList13() {
  3546. var $gridList = $("#gridList");
  3547. var queryJson = {
  3548. POCode: $("#txt_POCode").val(),
  3549. InvCode: $("#txt_InvCode").val(),
  3550. InvName: $("#txt_InvName").val(),
  3551. BatchCode: $("#txt_BatchCode").val(),
  3552. POStatus: $("#selShow").val(),
  3553. SCode: $("#txt_SCode").val(),
  3554. }
  3555. $gridList.dataGrid({
  3556. url: "/MHWMS/WMSCreateItemLot/GetGridJsonCLCK" + "?" + Math.random(),
  3557. postData: { queryJson: JSON.stringify(queryJson) },
  3558. height: $(window).height() - 200,
  3559. width: $(window).width() - 300,
  3560. colModel: _Clos,
  3561. //colModel: [
  3562. // { label: "主键", name: "ID", hidden: true, key: true },
  3563. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  3564. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3565. // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, },
  3566. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3567. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  3568. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3569. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3570. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3571. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3572. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3573. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3574. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3575. //],
  3576. //colModel: ColModelMain,
  3577. width: "100%",
  3578. autowidth: true,
  3579. //shrinkToFit: true,
  3580. gridComplete: function () {
  3581. },
  3582. pager: "#gridPager",
  3583. // sortname: 'ApplyNegCode,cast(Sequence as int)',
  3584. sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3585. sortorder: "asc",
  3586. viewrecords: true,
  3587. multiselect: true,
  3588. //beforeSelectRow: function (rowid, e) {
  3589. // $("#gridList").jqGrid('resetSelection');
  3590. // return (true);
  3591. //},
  3592. subGrid: true, // (1)开启子表格支持
  3593. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3594. $("#gridList").jqGrid("setSelection", rowid, false);
  3595. bindSubGrid13(subgrid_id, rowid)
  3596. }
  3597. });
  3598. $("#warehouse a.btn-default").click(function () {
  3599. $("#warehouse a.btn-default").removeClass("active");
  3600. $(this).addClass("active");
  3601. $('#btn_search').trigger("click");
  3602. });
  3603. $("#btn_search").click(function () {
  3604. var warehouse = $("#warehouse a.active").attr('data-value');
  3605. var queryJson = {
  3606. POCode: $("#txt_POCode").val(),
  3607. InvCode: $("#txt_InvCode").val(),
  3608. InvName: $("#txt_InvName").val(),
  3609. BatchCode: $("#txt_BatchCode").val(),
  3610. POStatus: $("#selShow").val(),
  3611. SCode: $("#txt_SCode").val(),
  3612. }
  3613. $gridList.jqGrid('setGridParam', {
  3614. postData: { queryJson: JSON.stringify(queryJson) },
  3615. }).trigger('reloadGrid');
  3616. });
  3617. }
  3618. function bindSubGrid13(subgrid_id, rowid) {
  3619. $("#gridList").jqGrid("setSelection", rowid, false);
  3620. var subgrid_table_id;
  3621. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3622. var subgrid_pager_id;
  3623. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3624. // (5)动态添加子报表的table和pager
  3625. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3626. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  3627. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3628. // (6)创建jqGrid对象
  3629. $("#" + subgrid_table_id).dataGrid({
  3630. cellEdit: true,
  3631. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3632. //colModel: [
  3633. // { label: "主键", name: "ID", hidden: true, key: true },
  3634. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3635. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3636. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3637. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3638. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3639. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3640. //],
  3641. colModel: _Clos1,
  3642. //colModel: ColModelSub,
  3643. shrinkToFit: true,//宽度自适应
  3644. multiselect: true,
  3645. prmNames: { search: "search" },
  3646. viewrecords: true,
  3647. height: "100%",
  3648. rowNum: 20,
  3649. pager: subgrid_pager_id,
  3650. });
  3651. }
  3652. //委外领料申请退料
  3653. function gridList14() {
  3654. var $gridList = $("#gridList");
  3655. var queryJson = {
  3656. POCode: $("#txt_POCode").val(),
  3657. InvCode: $("#txt_InvCode").val(),
  3658. InvName: $("#txt_InvName").val(),
  3659. BatchCode: $("#txt_BatchCode").val(),
  3660. POStatus: $("#selShow").val()
  3661. }
  3662. $gridList.dataGrid({
  3663. url: "/MHWMS/WMSCreateItemLot/GetGridJsonWWLLTL" + "?" + Math.random(),
  3664. postData: { queryJson: JSON.stringify(queryJson) },
  3665. height: $(window).height() - 200,
  3666. width: $(window).width() - 300,
  3667. colModel: _Clos,
  3668. //colModel: [
  3669. // { label: "主键", name: "ID", hidden: true, key: true },
  3670. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3671. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3672. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3673. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3674. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3675. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3676. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3677. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3678. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3679. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3680. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3681. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3682. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3683. //],
  3684. //colModel: ColModelMain,
  3685. width: "100%",
  3686. autowidth: true,
  3687. //shrinkToFit: true,
  3688. gridComplete: function () {
  3689. },
  3690. pager: "#gridPager",
  3691. //sortname: 'OApplyNegCode,cast(Sequence as int)',
  3692. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3693. sortorder: "asc",
  3694. viewrecords: true,
  3695. multiselect: true,
  3696. //beforeSelectRow: function (rowid, e) {
  3697. // $("#gridList").jqGrid('resetSelection');
  3698. // return (true);
  3699. //},
  3700. subGrid: true, // (1)开启子表格支持
  3701. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3702. $("#gridList").jqGrid("setSelection", rowid, false);
  3703. bindSubGrid14(subgrid_id, rowid)
  3704. }
  3705. });
  3706. $("#warehouse a.btn-default").click(function () {
  3707. $("#warehouse a.btn-default").removeClass("active");
  3708. $(this).addClass("active");
  3709. $('#btn_search').trigger("click");
  3710. });
  3711. $("#btn_search").click(function () {
  3712. var warehouse = $("#warehouse a.active").attr('data-value');
  3713. var queryJson = {
  3714. POCode: $("#txt_POCode").val(),
  3715. InvCode: $("#txt_InvCode").val(),
  3716. InvName: $("#txt_InvName").val(),
  3717. BatchCode: $("#txt_BatchCode").val(),
  3718. POStatus: $("#selShow").val()
  3719. }
  3720. $gridList.jqGrid('setGridParam', {
  3721. postData: { queryJson: JSON.stringify(queryJson) },
  3722. }).trigger('reloadGrid');
  3723. });
  3724. }
  3725. function bindSubGrid14(subgrid_id, rowid) {
  3726. $("#gridList").jqGrid("setSelection", rowid, false);
  3727. var subgrid_table_id;
  3728. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3729. var subgrid_pager_id;
  3730. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3731. // (5)动态添加子报表的table和pager
  3732. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3733. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  3734. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3735. // (6)创建jqGrid对象
  3736. $("#" + subgrid_table_id).dataGrid({
  3737. cellEdit: true,
  3738. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3739. //colModel: [
  3740. // { label: "主键", name: "ID", hidden: true, key: true },
  3741. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3742. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3743. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3744. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3745. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3746. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3747. //],
  3748. colModel: _Clos1,
  3749. //colModel: ColModelSub,
  3750. shrinkToFit: true,//宽度自适应
  3751. multiselect: true,
  3752. prmNames: { search: "search" },
  3753. viewrecords: true,
  3754. height: "100%",
  3755. rowNum: 20,
  3756. pager: subgrid_pager_id,
  3757. });
  3758. }
  3759. //委外材料出库
  3760. function gridList15() {
  3761. var $gridList = $("#gridList");
  3762. var queryJson = {
  3763. POCode: $("#txt_POCode").val(),
  3764. InvCode: $("#txt_InvCode").val(),
  3765. InvName: $("#txt_InvName").val(),
  3766. BatchCode: $("#txt_BatchCode").val(),
  3767. POStatus: $("#selShow").val()
  3768. }
  3769. $gridList.dataGrid({
  3770. url: "/MHWMS/WMSCreateItemLot/GetGridJsonWWCLCK" + "?" + Math.random(),
  3771. postData: { queryJson: JSON.stringify(queryJson) },
  3772. height: $(window).height() - 200,
  3773. width: $(window).width() - 300,
  3774. colModel: _Clos,
  3775. //colModel: [
  3776. // { label: "主键", name: "ID", hidden: true, key: true },
  3777. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3778. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3779. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3780. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3781. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3782. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3783. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3784. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3785. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3786. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3787. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3788. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3789. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3790. //],
  3791. //colModel: ColModelMain,
  3792. width: "100%",
  3793. autowidth: true,
  3794. //shrinkToFit: true,
  3795. gridComplete: function () {
  3796. },
  3797. pager: "#gridPager",
  3798. //sortname: 'OApplyNegCode,cast(Sequence as int)',
  3799. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3800. sortorder: "asc",
  3801. viewrecords: true,
  3802. multiselect: true,
  3803. //beforeSelectRow: function (rowid, e) {
  3804. // $("#gridList").jqGrid('resetSelection');
  3805. // return (true);
  3806. //},
  3807. subGrid: true, // (1)开启子表格支持
  3808. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3809. $("#gridList").jqGrid("setSelection", rowid, false);
  3810. bindSubGrid15(subgrid_id, rowid)
  3811. }
  3812. });
  3813. $("#warehouse a.btn-default").click(function () {
  3814. $("#warehouse a.btn-default").removeClass("active");
  3815. $(this).addClass("active");
  3816. $('#btn_search').trigger("click");
  3817. });
  3818. $("#btn_search").click(function () {
  3819. var warehouse = $("#warehouse a.active").attr('data-value');
  3820. var queryJson = {
  3821. POCode: $("#txt_POCode").val(),
  3822. InvCode: $("#txt_InvCode").val(),
  3823. InvName: $("#txt_InvName").val(),
  3824. BatchCode: $("#txt_BatchCode").val(),
  3825. POStatus: $("#selShow").val()
  3826. }
  3827. $gridList.jqGrid('setGridParam', {
  3828. postData: { queryJson: JSON.stringify(queryJson) },
  3829. }).trigger('reloadGrid');
  3830. });
  3831. }
  3832. function bindSubGrid15(subgrid_id, rowid) {
  3833. $("#gridList").jqGrid("setSelection", rowid, false);
  3834. var subgrid_table_id;
  3835. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3836. var subgrid_pager_id;
  3837. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3838. // (5)动态添加子报表的table和pager
  3839. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3840. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  3841. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3842. // (6)创建jqGrid对象
  3843. $("#" + subgrid_table_id).dataGrid({
  3844. cellEdit: true,
  3845. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3846. //colModel: [
  3847. // { label: "主键", name: "ID", hidden: true, key: true },
  3848. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3849. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3850. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3851. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3852. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3853. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3854. //],
  3855. colModel: _Clos1,
  3856. //colModel: ColModelSub,
  3857. shrinkToFit: true,//宽度自适应
  3858. //multiselect: true,
  3859. prmNames: { search: "search" },
  3860. multiselect: true,
  3861. viewrecords: true,
  3862. height: "100%",
  3863. rowNum: 20,
  3864. pager: subgrid_pager_id,
  3865. });
  3866. }
  3867. function gridList16() {
  3868. var $gridList = $("#gridList");
  3869. var queryJson = {
  3870. POCode: $("#txt_POCode").val(),
  3871. InvCode: $("#txt_InvCode").val(),
  3872. InvName: $("#txt_InvName").val(),
  3873. BatchCode: $("#txt_BatchCode").val(),
  3874. POStatus: $("#selShow").val()
  3875. }
  3876. $gridList.dataGrid({
  3877. url: "/MHWMS/WMSCreateItemLot/GetGridJsonFGGD" + "?" + Math.random(),
  3878. postData: { queryJson: JSON.stringify(queryJson) },
  3879. height: $(window).height() - 200,
  3880. width: $(window).width() - 300,
  3881. colModel: _Clos,
  3882. //colModel: [
  3883. // { label: "主键", name: "ID", hidden: true, key: true },
  3884. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3885. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3886. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3887. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3888. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3889. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3890. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3891. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3892. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3893. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3894. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3895. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3896. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3897. //],
  3898. //colModel: ColModelMain,
  3899. width: "100%",
  3900. autowidth: true,
  3901. //shrinkToFit: true,
  3902. gridComplete: function () {
  3903. },
  3904. pager: "#gridPager",
  3905. // sortname: 'MOCode,cast(Sequence as int)',
  3906. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3907. sortorder: "asc",
  3908. viewrecords: true,
  3909. multiselect: true,
  3910. //beforeSelectRow: function (rowid, e) {
  3911. // $("#gridList").jqGrid('resetSelection');
  3912. // return (true);
  3913. //},
  3914. subGrid: true, // (1)开启子表格支持
  3915. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3916. $("#gridList").jqGrid("setSelection", rowid, false);
  3917. bindSubGrid16(subgrid_id, rowid)
  3918. }
  3919. });
  3920. $("#warehouse a.btn-default").click(function () {
  3921. $("#warehouse a.btn-default").removeClass("active");
  3922. $(this).addClass("active");
  3923. $('#btn_search').trigger("click");
  3924. });
  3925. $("#btn_search").click(function () {
  3926. var warehouse = $("#warehouse a.active").attr('data-value');
  3927. var queryJson = {
  3928. POCode: $("#txt_POCode").val(),
  3929. InvCode: $("#txt_InvCode").val(),
  3930. InvName: $("#txt_InvName").val(),
  3931. BatchCode: $("#txt_BatchCode").val(),
  3932. POStatus: $("#selShow").val()
  3933. }
  3934. $gridList.jqGrid('setGridParam', {
  3935. postData: { queryJson: JSON.stringify(queryJson) },
  3936. }).trigger('reloadGrid');
  3937. });
  3938. }
  3939. function bindSubGrid16(subgrid_id, rowid) {
  3940. $("#gridList").jqGrid("setSelection", rowid, false);
  3941. var subgrid_table_id;
  3942. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3943. var subgrid_pager_id;
  3944. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3945. // (5)动态添加子报表的table和pager
  3946. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3947. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  3948. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3949. // (6)创建jqGrid对象
  3950. $("#" + subgrid_table_id).dataGrid({
  3951. cellEdit: true,
  3952. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3953. //colModel: [
  3954. // { label: "主键", name: "ID", hidden: true, key: true },
  3955. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3956. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3957. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3958. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3959. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3960. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3961. //],
  3962. colModel: _Clos1,
  3963. //colModel: ColModelSub,
  3964. shrinkToFit: true,//宽度自适应
  3965. multiselect: true,
  3966. prmNames: { search: "search" },
  3967. viewrecords: true,
  3968. height: "100%",
  3969. rowNum: 20,
  3970. pager: subgrid_pager_id,
  3971. });
  3972. }
  3973. //检验不合格
  3974. function gridList17() {
  3975. var $gridList = $("#gridList");
  3976. var queryJson = {
  3977. POCode: $("#txt_POCode").val(),
  3978. InvCode: $("#txt_InvCode").val(),
  3979. InvName: $("#txt_InvName").val(),
  3980. BatchCode: $("#txt_BatchCode").val(),
  3981. POStatus: $("#selShow").val()
  3982. }
  3983. $gridList.dataGrid({
  3984. url: "/MHWMS/WMSCreateItemLot/GetGridJsonBHGTM" + "?" + Math.random(),
  3985. postData: { queryJson: JSON.stringify(queryJson) },
  3986. height: $(window).height() - 200,
  3987. width: $(window).width() - 300,
  3988. colModel: _Clos,
  3989. //colModel: [
  3990. // { label: "主键", name: "ID", hidden: true, key: true },
  3991. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3992. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3993. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3994. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3995. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3996. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3997. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3998. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3999. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  4000. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  4001. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  4002. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  4003. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  4004. //],
  4005. //colModel: ColModelMain,
  4006. width: "100%",
  4007. autowidth: true,
  4008. //shrinkToFit: true,
  4009. gridComplete: function () {
  4010. },
  4011. pager: "#gridPager",
  4012. sortname: 'LotNo',
  4013. sortorder: "asc",
  4014. viewrecords: true,
  4015. multiselect: true,
  4016. //beforeSelectRow: function (rowid, e) {
  4017. // $("#gridList").jqGrid('resetSelection');
  4018. // return (true);
  4019. //},
  4020. subGrid: true, // (1)开启子表格支持
  4021. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4022. $("#gridList").jqGrid("setSelection", rowid, false);
  4023. bindSubGrid17(subgrid_id, rowid)
  4024. }
  4025. });
  4026. $("#warehouse a.btn-default").click(function () {
  4027. $("#warehouse a.btn-default").removeClass("active");
  4028. $(this).addClass("active");
  4029. $('#btn_search').trigger("click");
  4030. });
  4031. $("#btn_search").click(function () {
  4032. var warehouse = $("#warehouse a.active").attr('data-value');
  4033. var queryJson = {
  4034. POCode: $("#txt_POCode").val(),
  4035. InvCode: $("#txt_InvCode").val(),
  4036. InvName: $("#txt_InvName").val(),
  4037. BatchCode: $("#txt_BatchCode").val(),
  4038. POStatus: $("#selShow").val()
  4039. }
  4040. $gridList.jqGrid('setGridParam', {
  4041. postData: { queryJson: JSON.stringify(queryJson) },
  4042. }).trigger('reloadGrid');
  4043. });
  4044. }
  4045. function bindSubGrid17(subgrid_id, rowid) {
  4046. $("#gridList").jqGrid("setSelection", rowid, false);
  4047. var subgrid_table_id;
  4048. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4049. var subgrid_pager_id;
  4050. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4051. // (5)动态添加子报表的table和pager
  4052. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4053. var LotNo = $("#gridList").jqGrid('getRowData', rowid).LotNo;
  4054. // var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4055. // (6)创建jqGrid对象
  4056. $("#" + subgrid_table_id).dataGrid({
  4057. cellEdit: true,
  4058. url: "/MHWMS/WMSCreateItemLot/GetSubGridJsonBHGTM?LotNo=" + LotNo + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4059. //colModel: [
  4060. // { label: "主键", name: "ID", hidden: true, key: true },
  4061. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  4062. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  4063. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  4064. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  4065. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  4066. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  4067. //],
  4068. colModel: _Clos1,
  4069. //colModel: ColModelSub,
  4070. shrinkToFit: true,//宽度自适应
  4071. multiselect: true,
  4072. prmNames: { search: "search" },
  4073. viewrecords: true,
  4074. height: "100%",
  4075. rowNum: 20,
  4076. pager: subgrid_pager_id,
  4077. });
  4078. }
  4079. function gridList18() {
  4080. var $gridList = $("#gridList");
  4081. var queryJson = {
  4082. POCode: $("#txt_POCode").val(),
  4083. InvCode: $("#txt_InvCode").val(),
  4084. InvName: $("#txt_InvName").val(),
  4085. BatchCode: $("#txt_BatchCode").val(),
  4086. POStatus: $("#selShow").val()
  4087. }
  4088. $gridList.dataGrid({
  4089. url: "/MHWMS/WMSCreateItemLot/GetGridJsonFCP" + "?" + Math.random(),
  4090. postData: { queryJson: JSON.stringify(queryJson) },
  4091. height: $(window).height() - 200,
  4092. width: $(window).width() - 300,
  4093. colModel: _Clos,
  4094. //colModel: [
  4095. // { label: "主键", name: "ID", hidden: true, key: true },
  4096. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  4097. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  4098. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  4099. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  4100. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  4101. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  4102. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  4103. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  4104. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  4105. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  4106. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  4107. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  4108. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  4109. //],
  4110. //colModel: ColModelMain,
  4111. width: "100%",
  4112. autowidth: true,
  4113. //shrinkToFit: true,
  4114. gridComplete: function () {
  4115. },
  4116. pager: "#gridPager",
  4117. // sortname: 'MOCode,cast(Sequence as int)',
  4118. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  4119. sortorder: "asc",
  4120. viewrecords: true,
  4121. multiselect: true,
  4122. //beforeSelectRow: function (rowid, e) {
  4123. // $("#gridList").jqGrid('resetSelection');
  4124. // return (true);
  4125. //},
  4126. subGrid: true, // (1)开启子表格支持
  4127. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4128. $("#gridList").jqGrid("setSelection", rowid, false);
  4129. bindSubGrid18(subgrid_id, rowid)
  4130. }
  4131. });
  4132. $("#warehouse a.btn-default").click(function () {
  4133. $("#warehouse a.btn-default").removeClass("active");
  4134. $(this).addClass("active");
  4135. $('#btn_search').trigger("click");
  4136. });
  4137. $("#btn_search").click(function () {
  4138. var warehouse = $("#warehouse a.active").attr('data-value');
  4139. var queryJson = {
  4140. POCode: $("#txt_POCode").val(),
  4141. InvCode: $("#txt_InvCode").val(),
  4142. InvName: $("#txt_InvName").val(),
  4143. BatchCode: $("#txt_BatchCode").val(),
  4144. POStatus: $("#selShow").val()
  4145. }
  4146. $gridList.jqGrid('setGridParam', {
  4147. postData: { queryJson: JSON.stringify(queryJson) },
  4148. }).trigger('reloadGrid');
  4149. });
  4150. }
  4151. function bindSubGrid18(subgrid_id, rowid) {
  4152. $("#gridList").jqGrid("setSelection", rowid, false);
  4153. var subgrid_table_id;
  4154. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4155. var subgrid_pager_id;
  4156. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4157. // (5)动态添加子报表的table和pager
  4158. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4159. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  4160. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4161. // (6)创建jqGrid对象
  4162. $("#" + subgrid_table_id).dataGrid({
  4163. cellEdit: true,
  4164. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4165. //colModel: [
  4166. // { label: "主键", name: "ID", hidden: true, key: true },
  4167. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  4168. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  4169. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  4170. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  4171. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  4172. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  4173. //],
  4174. colModel: _Clos1,
  4175. //colModel: ColModelSub,
  4176. shrinkToFit: true,//宽度自适应
  4177. multiselect: true,
  4178. prmNames: { search: "search" },
  4179. viewrecords: true,
  4180. height: "100%",
  4181. rowNum: 20,
  4182. pager: subgrid_pager_id,
  4183. });
  4184. }
  4185. function gridList20() {
  4186. var $gridList = $("#gridList");
  4187. var queryJson = {
  4188. POCode: $("#txt_POCode").val(),
  4189. InvCode: $("#txt_InvCode").val(),
  4190. InvName: $("#txt_InvName").val(),
  4191. BatchCode: $("#txt_BatchCode").val(),
  4192. POStatus: $("#selShow").val()
  4193. }
  4194. $gridList.dataGrid({
  4195. url: "/MHWMS/WMSCreateItemLot/GetGridJsonTransfer" + "?" + Math.random(),
  4196. postData: { queryJson: JSON.stringify(queryJson) },
  4197. height: $(window).height() - 200,
  4198. width: $(window).width() - 300,
  4199. colModel: _Clos,
  4200. width: "100%",
  4201. autowidth: true,
  4202. //shrinkToFit: true,
  4203. gridComplete: function () {
  4204. },
  4205. pager: "#gridPager",
  4206. // sortname: 'MOCode,cast(Sequence as int)',
  4207. sortname: "TransferNO,Cast(Sequence as int) ",
  4208. sortorder: "asc",
  4209. viewrecords: true,
  4210. multiselect: true,
  4211. //beforeSelectRow: function (rowid, e) {
  4212. // $("#gridList").jqGrid('resetSelection');
  4213. // return (true);
  4214. //},
  4215. subGrid: true, // (1)开启子表格支持
  4216. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4217. $("#gridList").jqGrid("setSelection", rowid, false);
  4218. bindSubGrid20(subgrid_id, rowid)
  4219. }
  4220. });
  4221. $("#warehouse a.btn-default").click(function () {
  4222. $("#warehouse a.btn-default").removeClass("active");
  4223. $(this).addClass("active");
  4224. $('#btn_search').trigger("click");
  4225. });
  4226. $("#btn_search").click(function () {
  4227. var warehouse = $("#warehouse a.active").attr('data-value');
  4228. var queryJson = {
  4229. POCode: $("#txt_POCode").val(),
  4230. InvCode: $("#txt_InvCode").val(),
  4231. InvName: $("#txt_InvName").val(),
  4232. BatchCode: $("#txt_BatchCode").val(),
  4233. POStatus: $("#selShow").val()
  4234. }
  4235. $gridList.jqGrid('setGridParam', {
  4236. postData: { queryJson: JSON.stringify(queryJson) },
  4237. }).trigger('reloadGrid');
  4238. });
  4239. }
  4240. function bindSubGrid20(subgrid_id, rowid) {
  4241. debugger;
  4242. $("#gridList").jqGrid("setSelection", rowid, false);
  4243. var subgrid_table_id;
  4244. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4245. var subgrid_pager_id;
  4246. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4247. // (5)动态添加子报表的table和pager
  4248. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4249. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4250. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4251. // (6)创建jqGrid对象
  4252. $("#" + subgrid_table_id).dataGrid({
  4253. cellEdit: true,
  4254. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4255. colModel: _Clos1,
  4256. //colModel: ColModelSub,
  4257. shrinkToFit: true,//宽度自适应
  4258. multiselect: true,
  4259. prmNames: { search: "search" },
  4260. viewrecords: true,
  4261. height: "100%",
  4262. rowNum: 20,
  4263. pager: subgrid_pager_id,
  4264. });
  4265. }
  4266. //采购入库 ICSPurchaseReceive
  4267. function gridList22() {
  4268. var $gridList = $("#gridList");
  4269. var queryJson = {
  4270. POCode: $("#txt_POCode").val(),
  4271. InvCode: $("#txt_InvCode").val(),
  4272. InvName: $("#txt_InvName").val(),
  4273. BatchCode: $("#txt_BatchCode").val(),
  4274. FromTime: $("#FromTime").val(),
  4275. ToTime: $("#ToTime").val(),
  4276. WHCode: $("#txt_WHCode").val(),
  4277. POStatus: $("#selShow").val()
  4278. }
  4279. $gridList.dataGrid({
  4280. url: "/MHWMS/WMSCreateItemLot/GetGridJsonPurchaseReceive" + "?" + Math.random(),
  4281. postData: { queryJson: JSON.stringify(queryJson) },
  4282. height: $(window).height() - 200,
  4283. width: $(window).width() - 300,
  4284. colModel: _Clos,
  4285. width: "100%",
  4286. autowidth: true,
  4287. //shrinkToFit: true,
  4288. gridComplete: function () {
  4289. },
  4290. pager: "#gridPager",
  4291. // sortname: 'MOCode,cast(Sequence as int)',
  4292. sortname: "RCVCode,Cast(Sequence as int) ",
  4293. sortorder: "asc",
  4294. viewrecords: true,
  4295. multiselect: true,
  4296. //beforeSelectRow: function (rowid, e) {
  4297. // $("#gridList").jqGrid('resetSelection');
  4298. // return (true);
  4299. //},
  4300. subGrid: true, // (1)开启子表格支持
  4301. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4302. $("#gridList").jqGrid("setSelection", rowid, false);
  4303. bindSubGrid22(subgrid_id, rowid)
  4304. }
  4305. });
  4306. $("#warehouse a.btn-default").click(function () {
  4307. $("#warehouse a.btn-default").removeClass("active");
  4308. $(this).addClass("active");
  4309. $('#btn_search').trigger("click");
  4310. });
  4311. $("#btn_search").click(function () {
  4312. var warehouse = $("#warehouse a.active").attr('data-value');
  4313. var queryJson = {
  4314. POCode: $("#txt_POCode").val(),
  4315. InvCode: $("#txt_InvCode").val(),
  4316. InvName: $("#txt_InvName").val(),
  4317. BatchCode: $("#txt_BatchCode").val(),
  4318. FromTime: $("#FromTime").val(),
  4319. ToTime: $("#ToTime").val(),
  4320. WHCode: $("#txt_WHCode").val(),
  4321. POStatus: $("#selShow").val()
  4322. }
  4323. $gridList.jqGrid('setGridParam', {
  4324. postData: { queryJson: JSON.stringify(queryJson) },
  4325. }).trigger('reloadGrid');
  4326. });
  4327. }
  4328. function bindSubGrid22(subgrid_id, rowid) {
  4329. debugger;
  4330. $("#gridList").jqGrid("setSelection", rowid, false);
  4331. var subgrid_table_id;
  4332. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4333. var subgrid_pager_id;
  4334. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4335. // (5)动态添加子报表的table和pager
  4336. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4337. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  4338. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4339. // (6)创建jqGrid对象
  4340. $("#" + subgrid_table_id).dataGrid({
  4341. cellEdit: true,
  4342. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4343. colModel: _Clos1,
  4344. //colModel: ColModelSub,
  4345. shrinkToFit: true,//宽度自适应
  4346. multiselect: true,
  4347. prmNames: { search: "search" },
  4348. viewrecords: true,
  4349. height: "100%",
  4350. rowNum: 20,
  4351. pager: subgrid_pager_id,
  4352. });
  4353. }
  4354. //委外采购入库 ICSOutPurchaseReceive
  4355. function gridList23() {
  4356. var $gridList = $("#gridList");
  4357. var queryJson = {
  4358. POCode: $("#txt_POCode").val(),
  4359. InvCode: $("#txt_InvCode").val(),
  4360. InvName: $("#txt_InvName").val(),
  4361. BatchCode: $("#txt_BatchCode").val(),
  4362. FromTime: $("#FromTime").val(),
  4363. ToTime: $("#ToTime").val(),
  4364. WHCode: $("#txt_WHCode").val(),
  4365. POStatus: $("#selShow").val()
  4366. }
  4367. $gridList.dataGrid({
  4368. url: "/MHWMS/WMSCreateItemLot/GetGridJsonOutPurchaseReceive" + "?" + Math.random(),
  4369. postData: { queryJson: JSON.stringify(queryJson) },
  4370. height: $(window).height() - 200,
  4371. width: $(window).width() - 300,
  4372. colModel: _Clos,
  4373. width: "100%",
  4374. autowidth: true,
  4375. //shrinkToFit: true,
  4376. gridComplete: function () {
  4377. },
  4378. pager: "#gridPager",
  4379. // sortname: 'MOCode,cast(Sequence as int)',
  4380. sortname: "RCVCode,Cast(Sequence as int) ",
  4381. sortorder: "asc",
  4382. viewrecords: true,
  4383. multiselect: true,
  4384. //beforeSelectRow: function (rowid, e) {
  4385. // $("#gridList").jqGrid('resetSelection');
  4386. // return (true);
  4387. //},
  4388. subGrid: true, // (1)开启子表格支持
  4389. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4390. $("#gridList").jqGrid("setSelection", rowid, false);
  4391. bindSubGrid23(subgrid_id, rowid)
  4392. }
  4393. });
  4394. $("#warehouse a.btn-default").click(function () {
  4395. $("#warehouse a.btn-default").removeClass("active");
  4396. $(this).addClass("active");
  4397. $('#btn_search').trigger("click");
  4398. });
  4399. $("#btn_search").click(function () {
  4400. var warehouse = $("#warehouse a.active").attr('data-value');
  4401. var queryJson = {
  4402. POCode: $("#txt_POCode").val(),
  4403. InvCode: $("#txt_InvCode").val(),
  4404. InvName: $("#txt_InvName").val(),
  4405. BatchCode: $("#txt_BatchCode").val(),
  4406. FromTime: $("#FromTime").val(),
  4407. ToTime: $("#ToTime").val(),
  4408. WHCode: $("#txt_WHCode").val(),
  4409. POStatus: $("#selShow").val()
  4410. }
  4411. $gridList.jqGrid('setGridParam', {
  4412. postData: { queryJson: JSON.stringify(queryJson) },
  4413. }).trigger('reloadGrid');
  4414. });
  4415. }
  4416. function bindSubGrid23(subgrid_id, rowid) {
  4417. debugger;
  4418. $("#gridList").jqGrid("setSelection", rowid, false);
  4419. var subgrid_table_id;
  4420. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4421. var subgrid_pager_id;
  4422. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4423. // (5)动态添加子报表的table和pager
  4424. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4425. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  4426. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4427. // (6)创建jqGrid对象
  4428. $("#" + subgrid_table_id).dataGrid({
  4429. cellEdit: true,
  4430. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4431. colModel: _Clos1,
  4432. //colModel: ColModelSub,
  4433. shrinkToFit: true,//宽度自适应
  4434. multiselect: true,
  4435. prmNames: { search: "search" },
  4436. viewrecords: true,
  4437. height: "100%",
  4438. rowNum: 20,
  4439. pager: subgrid_pager_id,
  4440. });
  4441. }
  4442. //线边仓调拨申请单生成条码(派纳)
  4443. function gridList201() {
  4444. var $gridList = $("#gridList");
  4445. var queryJson = {
  4446. POCode: $("#txt_POCode").val(),
  4447. InvCode: $("#txt_InvCode").val(),
  4448. InvName: $("#txt_InvName").val(),
  4449. BatchCode: $("#txt_BatchCode").val(),
  4450. POStatus: $("#selShow").val()
  4451. }
  4452. $gridList.dataGrid({
  4453. url: "/MHWMS/WMSCreateItemLot/GetGridJsonTransferApplicationPN" + "?" + Math.random(),
  4454. postData: { queryJson: JSON.stringify(queryJson) },
  4455. height: $(window).height() - 200,
  4456. width: $(window).width() - 300,
  4457. colModel: _Clos,
  4458. width: "100%",
  4459. autowidth: true,
  4460. //shrinkToFit: true,
  4461. gridComplete: function () {
  4462. },
  4463. pager: "#gridPager",
  4464. // sortname: 'MOCode,cast(Sequence as int)',
  4465. sortname: "TransferNO,Cast(Sequence as int) ",
  4466. sortorder: "asc",
  4467. viewrecords: true,
  4468. multiselect: true,
  4469. //beforeSelectRow: function (rowid, e) {
  4470. // $("#gridList").jqGrid('resetSelection');
  4471. // return (true);
  4472. //},
  4473. subGrid: true, // (1)开启子表格支持
  4474. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4475. $("#gridList").jqGrid("setSelection", rowid, false);
  4476. bindSubGrid201(subgrid_id, rowid)
  4477. }
  4478. });
  4479. $("#warehouse a.btn-default").click(function () {
  4480. $("#warehouse a.btn-default").removeClass("active");
  4481. $(this).addClass("active");
  4482. $('#btn_search').trigger("click");
  4483. });
  4484. $("#btn_search").click(function () {
  4485. var warehouse = $("#warehouse a.active").attr('data-value');
  4486. var queryJson = {
  4487. POCode: $("#txt_POCode").val(),
  4488. InvCode: $("#txt_InvCode").val(),
  4489. InvName: $("#txt_InvName").val(),
  4490. BatchCode: $("#txt_BatchCode").val(),
  4491. POStatus: $("#selShow").val()
  4492. }
  4493. $gridList.jqGrid('setGridParam', {
  4494. postData: { queryJson: JSON.stringify(queryJson) },
  4495. }).trigger('reloadGrid');
  4496. });
  4497. }
  4498. //调拨申请单生成条码
  4499. function gridList202() {
  4500. var $gridList = $("#gridList");
  4501. var queryJson = {
  4502. POCode: $("#txt_POCode").val(),
  4503. InvCode: $("#txt_InvCode").val(),
  4504. InvName: $("#txt_InvName").val(),
  4505. BatchCode: $("#txt_BatchCode").val(),
  4506. POStatus: $("#selShow").val()
  4507. }
  4508. $gridList.dataGrid({
  4509. url: "/MHWMS/WMSCreateItemLot/GetGridJsonTransferApplication" + "?" + Math.random(),
  4510. postData: { queryJson: JSON.stringify(queryJson) },
  4511. height: $(window).height() - 200,
  4512. width: $(window).width() - 300,
  4513. colModel: _Clos,
  4514. width: "100%",
  4515. autowidth: true,
  4516. //shrinkToFit: true,
  4517. gridComplete: function () {
  4518. },
  4519. pager: "#gridPager",
  4520. // sortname: 'MOCode,cast(Sequence as int)',
  4521. sortname: "TransferNO,Cast(Sequence as int) ",
  4522. sortorder: "asc",
  4523. viewrecords: true,
  4524. multiselect: true,
  4525. //beforeSelectRow: function (rowid, e) {
  4526. // $("#gridList").jqGrid('resetSelection');
  4527. // return (true);
  4528. //},
  4529. subGrid: true, // (1)开启子表格支持
  4530. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4531. $("#gridList").jqGrid("setSelection", rowid, false);
  4532. bindSubGrid202(subgrid_id, rowid)
  4533. }
  4534. });
  4535. $("#warehouse a.btn-default").click(function () {
  4536. $("#warehouse a.btn-default").removeClass("active");
  4537. $(this).addClass("active");
  4538. $('#btn_search').trigger("click");
  4539. });
  4540. $("#btn_search").click(function () {
  4541. var warehouse = $("#warehouse a.active").attr('data-value');
  4542. var queryJson = {
  4543. POCode: $("#txt_POCode").val(),
  4544. InvCode: $("#txt_InvCode").val(),
  4545. InvName: $("#txt_InvName").val(),
  4546. BatchCode: $("#txt_BatchCode").val(),
  4547. POStatus: $("#selShow").val()
  4548. }
  4549. $gridList.jqGrid('setGridParam', {
  4550. postData: { queryJson: JSON.stringify(queryJson) },
  4551. }).trigger('reloadGrid');
  4552. });
  4553. }
  4554. function bindSubGrid201(subgrid_id, rowid) {
  4555. debugger;
  4556. $("#gridList").jqGrid("setSelection", rowid, false);
  4557. var subgrid_table_id;
  4558. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4559. var subgrid_pager_id;
  4560. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4561. // (5)动态添加子报表的table和pager
  4562. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4563. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4564. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4565. // (6)创建jqGrid对象
  4566. $("#" + subgrid_table_id).dataGrid({
  4567. cellEdit: true,
  4568. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4569. colModel: _Clos1,
  4570. //colModel: ColModelSub,
  4571. shrinkToFit: true,//宽度自适应
  4572. multiselect: true,
  4573. prmNames: { search: "search" },
  4574. viewrecords: true,
  4575. height: "100%",
  4576. rowNum: 20,
  4577. pager: subgrid_pager_id,
  4578. });
  4579. }
  4580. function bindSubGrid202(subgrid_id, rowid) {
  4581. debugger;
  4582. $("#gridList").jqGrid("setSelection", rowid, false);
  4583. var subgrid_table_id;
  4584. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4585. var subgrid_pager_id;
  4586. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4587. // (5)动态添加子报表的table和pager
  4588. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4589. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4590. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4591. // (6)创建jqGrid对象
  4592. $("#" + subgrid_table_id).dataGrid({
  4593. cellEdit: true,
  4594. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4595. colModel: _Clos1,
  4596. //colModel: ColModelSub,
  4597. shrinkToFit: true,//宽度自适应
  4598. multiselect: true,
  4599. prmNames: { search: "search" },
  4600. viewrecords: true,
  4601. height: "100%",
  4602. rowNum: 20,
  4603. pager: subgrid_pager_id,
  4604. });
  4605. }
  4606. //线边仓一步调入单生成条码(派纳)
  4607. function gridList203() {
  4608. var $gridList = $("#gridList");
  4609. var queryJson = {
  4610. POCode: $("#txt_POCode").val(),
  4611. InvCode: $("#txt_InvCode").val(),
  4612. InvName: $("#txt_InvName").val(),
  4613. BatchCode: $("#txt_BatchCode").val(),
  4614. FromTime: $("#FromTime").val(),
  4615. ToTime: $("#ToTime").val(),
  4616. WHCode: $("#txt_WHCode").val(),
  4617. POStatus: $("#selShow").val()
  4618. }
  4619. $gridList.dataGrid({
  4620. url: "/MHWMS/WMSCreateItemLot/GetGridJsonOneSetpTransPN" + "?" + Math.random(),
  4621. postData: { queryJson: JSON.stringify(queryJson) },
  4622. height: $(window).height() - 200,
  4623. width: $(window).width() - 300,
  4624. colModel: _Clos,
  4625. width: "100%",
  4626. autowidth: true,
  4627. //shrinkToFit: true,
  4628. gridComplete: function () {
  4629. },
  4630. pager: "#gridPager",
  4631. // sortname: 'MOCode,cast(Sequence as int)',
  4632. sortname: "TransferNO,Cast(Sequence as int) ",
  4633. sortorder: "asc",
  4634. viewrecords: true,
  4635. multiselect: true,
  4636. //beforeSelectRow: function (rowid, e) {
  4637. // $("#gridList").jqGrid('resetSelection');
  4638. // return (true);
  4639. //},
  4640. subGrid: true, // (1)开启子表格支持
  4641. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4642. $("#gridList").jqGrid("setSelection", rowid, false);
  4643. bindSubGrid203(subgrid_id, rowid)
  4644. }
  4645. });
  4646. $("#warehouse a.btn-default").click(function () {
  4647. $("#warehouse a.btn-default").removeClass("active");
  4648. $(this).addClass("active");
  4649. $('#btn_search').trigger("click");
  4650. });
  4651. $("#btn_search").click(function () {
  4652. var warehouse = $("#warehouse a.active").attr('data-value');
  4653. var queryJson = {
  4654. POCode: $("#txt_POCode").val(),
  4655. InvCode: $("#txt_InvCode").val(),
  4656. InvName: $("#txt_InvName").val(),
  4657. BatchCode: $("#txt_BatchCode").val(),
  4658. FromTime: $("#FromTime").val(),
  4659. ToTime: $("#ToTime").val(),
  4660. WHCode: $("#txt_WHCode").val(),
  4661. POStatus: $("#selShow").val()
  4662. }
  4663. $gridList.jqGrid('setGridParam', {
  4664. postData: { queryJson: JSON.stringify(queryJson) },
  4665. }).trigger('reloadGrid');
  4666. });
  4667. }
  4668. function bindSubGrid203(subgrid_id, rowid) {
  4669. debugger;
  4670. $("#gridList").jqGrid("setSelection", rowid, false);
  4671. var subgrid_table_id;
  4672. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4673. var subgrid_pager_id;
  4674. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4675. // (5)动态添加子报表的table和pager
  4676. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4677. var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO;
  4678. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4679. // (6)创建jqGrid对象
  4680. $("#" + subgrid_table_id).dataGrid({
  4681. cellEdit: true,
  4682. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4683. colModel: _Clos1,
  4684. //colModel: ColModelSub,
  4685. shrinkToFit: true,//宽度自适应
  4686. multiselect: true,
  4687. prmNames: { search: "search" },
  4688. viewrecords: true,
  4689. height: "100%",
  4690. rowNum: 20,
  4691. pager: subgrid_pager_id,
  4692. });
  4693. }
  4694. //红字销售出库单
  4695. function gridList24() {
  4696. var $gridList = $("#gridList");
  4697. var queryJson = {
  4698. POCode: $("#txt_POCode").val(),
  4699. VenCode: $("#txt_VenCode").val(),
  4700. VenName: $("#txt_VenName").val(),
  4701. InvCode: $("#txt_InvCode").val(),
  4702. InvName: $("#txt_InvName").val(),
  4703. BatchCode: $("#txt_BatchCode").val(),
  4704. FromTime: $("#FromTime").val(),
  4705. ToTime: $("#ToTime").val(),
  4706. WHCode: $("#txt_WHCode").val(),
  4707. POStatus: $("#selShow").val(),
  4708. WHStatus: $("#selStatus").val()
  4709. }
  4710. $gridList.dataGrid({
  4711. url: "/MHWMS/WMSCreateItemLot/GetGridJsonWMSSSD" + "?" + Math.random(),
  4712. postData: { queryJson: JSON.stringify(queryJson) },
  4713. height: $(window).height() - 200,
  4714. width: $(window).width() - 300,
  4715. colModel: _Clos,
  4716. //colModel: ColModelMain,
  4717. width: "100%",
  4718. autowidth: true,
  4719. //shrinkToFit: true,
  4720. gridComplete: function () {
  4721. },
  4722. pager: "#gridPager",
  4723. //sortname: 'ODNCode,cast(Sequence as int)',
  4724. sortname: "SSDCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  4725. sortorder: "asc",
  4726. viewrecords: true,
  4727. multiselect: true,
  4728. //beforeSelectRow: function (rowid, e) {
  4729. // $("#gridList").jqGrid('resetSelection');
  4730. // return (true);
  4731. //},
  4732. subGrid: true, // (1)开启子表格支持
  4733. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  4734. $("#gridList").jqGrid("setSelection", rowid, false);
  4735. bindSubGrid24(subgrid_id, rowid)
  4736. }
  4737. });
  4738. $("#warehouse a.btn-default").click(function () {
  4739. $("#warehouse a.btn-default").removeClass("active");
  4740. $(this).addClass("active");
  4741. $('#btn_search').trigger("click");
  4742. });
  4743. $("#btn_search").click(function () {
  4744. var warehouse = $("#warehouse a.active").attr('data-value');
  4745. var queryJson = {
  4746. POCode: $("#txt_POCode").val(),
  4747. VenCode: $("#txt_VenCode").val(),
  4748. VenName: $("#txt_VenName").val(),
  4749. InvCode: $("#txt_InvCode").val(),
  4750. InvName: $("#txt_InvName").val(),
  4751. BatchCode: $("#txt_BatchCode").val(),
  4752. FromTime: $("#FromTime").val(),
  4753. ToTime: $("#ToTime").val(),
  4754. WHCode: $("#txt_WHCode").val(),
  4755. POStatus: $("#selShow").val(),
  4756. WHStatus: $("#selStatus").val()
  4757. }
  4758. $gridList.jqGrid('setGridParam', {
  4759. postData: { queryJson: JSON.stringify(queryJson) },
  4760. }).trigger('reloadGrid');
  4761. });
  4762. }
  4763. function bindSubGrid24(subgrid_id, rowid) {
  4764. $("#gridList").jqGrid("setSelection", rowid, false);
  4765. var subgrid_table_id;
  4766. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  4767. var subgrid_pager_id;
  4768. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  4769. // (5)动态添加子报表的table和pager
  4770. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  4771. var SSDCode = $("#gridList").jqGrid('getRowData', rowid).SSDCode;
  4772. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  4773. // (6)创建jqGrid对象
  4774. $("#" + subgrid_table_id).dataGrid({
  4775. cellEdit: true,
  4776. url: "/MHWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SSDCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  4777. //colModel: [
  4778. // { label: "主键", name: "ID", hidden: true, key: true },
  4779. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  4780. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  4781. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  4782. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  4783. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  4784. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  4785. //],
  4786. colModel: _Clos1,
  4787. //colModel: ColModelSub,
  4788. shrinkToFit: true,//宽度自适应
  4789. multiselect: true,
  4790. prmNames: { search: "search" },
  4791. viewrecords: true,
  4792. height: "100%",
  4793. rowNum: 20,
  4794. pager: subgrid_pager_id,
  4795. });
  4796. }
  4797. function btnDelete() {
  4798. var objArr = '';
  4799. var obj = $("#gridList").jqGrid("getRowData");
  4800. for (var i = 0; i < obj.length; i++) {
  4801. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  4802. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  4803. if (rowData != "undefined" && rowData != null) {
  4804. for (var j = 0; j < rowData.length; j++) {
  4805. objArr += "'" + rowData[j] + "',";
  4806. }
  4807. }
  4808. }
  4809. if (objArr == "") {
  4810. $.modalAlertNew("WMS00099");
  4811. return;
  4812. }
  4813. $.deleteForm({
  4814. url: "/MHWMS/WMSCreateItemLot/DeleteItemLot",
  4815. param: { keyValue: JSON.stringify(objArr) },
  4816. success: function () {
  4817. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4818. }
  4819. })
  4820. }
  4821. function btnAllCreate() {
  4822. debugger;
  4823. var PoStatus;
  4824. var jsonData = '';
  4825. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  4826. //if (ids.length != 1) {
  4827. // $.modalAlertNew("WMS00100");
  4828. // return;
  4829. //}
  4830. var POCode = "";
  4831. var PORow = "";
  4832. var VenCode = "";
  4833. var WorkPoint = "";
  4834. var VendorLot = "";
  4835. //生产退料
  4836. if (Type == '1') {
  4837. debugger;
  4838. var ARR = [];
  4839. for (var i in ids) {
  4840. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4841. Code = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  4842. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4843. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  4844. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  4845. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  4846. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  4847. if (thisCreateQty == 0) {
  4848. $.modalAlert("该单据条码已全部生成完毕!");
  4849. return;
  4850. }
  4851. thisCreateQty = thisCreateQty.toFixed(4);
  4852. var minPackQty = thisCreateQty;//最小包装量
  4853. //minPackQty = minPackQty.toFixed(4);
  4854. var createPageCount = 1;//本次生成张数
  4855. createPageCount = createPageCount.toFixed(0);
  4856. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  4857. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  4858. Quantity = Quantity.toFixed(2);
  4859. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  4860. CreatedQty = CreatedQty.toFixed(2);
  4861. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  4862. if (Quantity == CreatedQty) {
  4863. return false;
  4864. }
  4865. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  4866. if (EffectiveEnable == 'true') {
  4867. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  4868. } else {
  4869. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  4870. }
  4871. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  4872. var obj = {
  4873. ID:ID,
  4874. Code: Code,
  4875. Sequence: Sequence,
  4876. thisCreateQty: thisCreateQty,
  4877. minPackQty: minPackQty,
  4878. createPageCount: createPageCount,
  4879. //VendorLot: VendorLot,
  4880. PRODUCTDATE: PRODUCTDATE,
  4881. ExpirationDate: ExpirationDate,
  4882. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  4883. //自由项
  4884. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  4885. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  4886. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  4887. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  4888. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  4889. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  4890. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  4891. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  4892. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  4893. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  4894. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  4895. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  4896. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  4897. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  4898. }
  4899. ARR.push(obj);
  4900. }
  4901. $.submitForm({
  4902. url: "/MHWMS/WMSCreateItemLot/SubmitFormGDTLALL" + "?" + Math.random(),
  4903. param: {
  4904. keyValue: JSON.stringify(ARR)
  4905. },
  4906. success: function () {
  4907. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4908. }
  4909. })
  4910. }
  4911. //销售退货
  4912. if (Type == '4') {
  4913. debugger;
  4914. var ARR = [];
  4915. for (var i in ids) {
  4916. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4917. Code = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  4918. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4919. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  4920. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  4921. //console.log("单号:" + DNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  4922. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  4923. if (thisCreateQty == 0) {
  4924. $.modalAlert("该单据条码已全部生成完毕!");
  4925. return;
  4926. }
  4927. thisCreateQty = thisCreateQty.toFixed(4);
  4928. var minPackQty = thisCreateQty;//最小包装量
  4929. //minPackQty = minPackQty.toFixed(4);
  4930. var createPageCount = 1;//本次生成张数
  4931. createPageCount = createPageCount.toFixed(0);
  4932. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  4933. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  4934. Quantity = Quantity.toFixed(2);
  4935. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  4936. CreatedQty = CreatedQty.toFixed(2);
  4937. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  4938. if (Quantity == CreatedQty) {
  4939. return false;
  4940. }
  4941. if (EffectiveEnable == 'true') {
  4942. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  4943. } else {
  4944. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  4945. }
  4946. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  4947. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  4948. var obj = {
  4949. ID: ID,
  4950. Code: Code,
  4951. Sequence: Sequence,
  4952. thisCreateQty: thisCreateQty,
  4953. minPackQty: minPackQty,
  4954. createPageCount: createPageCount,
  4955. //VendorLot: VendorLot,
  4956. PRODUCTDATE: PRODUCTDATE,
  4957. ExpirationDate: ExpirationDate,
  4958. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  4959. //自由项
  4960. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  4961. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  4962. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  4963. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  4964. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  4965. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  4966. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  4967. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  4968. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  4969. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  4970. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  4971. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  4972. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  4973. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  4974. }
  4975. ARR.push(obj);
  4976. }
  4977. $.submitForm({
  4978. url: "/MHWMS/WMSCreateItemLot/SubmitFormXSTHALL" + "?" + Math.random(),
  4979. param: {
  4980. keyValue: JSON.stringify(ARR)
  4981. },
  4982. success: function () {
  4983. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4984. }
  4985. })
  4986. }
  4987. //销售退货
  4988. if (Type == '5') {
  4989. debugger;
  4990. var ARR = [];
  4991. for (var i in ids) {
  4992. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  4993. Code = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  4994. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4995. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  4996. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  4997. //console.log("单号:" + DNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  4998. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  4999. if (thisCreateQty == 0) {
  5000. $.modalAlert("该单据条码已全部生成完毕!");
  5001. return;
  5002. }
  5003. thisCreateQty = thisCreateQty.toFixed(4);
  5004. var minPackQty = thisCreateQty;//最小包装量
  5005. //minPackQty = minPackQty.toFixed(4);
  5006. var createPageCount = 1;//本次生成张数
  5007. createPageCount = createPageCount.toFixed(0);
  5008. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5009. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5010. Quantity = Quantity.toFixed(2);
  5011. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5012. CreatedQty = CreatedQty.toFixed(2);
  5013. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5014. if (Quantity == CreatedQty) {
  5015. return false;
  5016. }
  5017. if (EffectiveEnable == 'true') {
  5018. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5019. } else {
  5020. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5021. }
  5022. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5023. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5024. var obj = {
  5025. ID: ID,
  5026. Code: Code,
  5027. Sequence: Sequence,
  5028. thisCreateQty: thisCreateQty,
  5029. minPackQty: minPackQty,
  5030. createPageCount: createPageCount,
  5031. //VendorLot: VendorLot,
  5032. PRODUCTDATE: PRODUCTDATE,
  5033. ExpirationDate: ExpirationDate,
  5034. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5035. //自由项
  5036. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5037. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5038. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5039. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5040. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5041. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5042. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5043. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5044. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5045. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5046. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5047. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5048. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5049. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5050. }
  5051. ARR.push(obj);
  5052. }
  5053. $.submitForm({
  5054. url: "/MHWMS/WMSCreateItemLot/SubmitFormQiTaALL" + "?" + Math.random(),
  5055. param: {
  5056. keyValue: JSON.stringify(ARR)
  5057. },
  5058. success: function () {
  5059. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5060. }
  5061. })
  5062. }
  5063. //普通到货单
  5064. if (Type == '7') {
  5065. debugger;
  5066. var ARR = [];
  5067. for (var i in ids) {
  5068. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5069. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  5070. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5071. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5072. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5073. //console.log("单号:" + DNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5074. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5075. if (thisCreateQty == 0) {
  5076. $.modalAlert("该单据条码已全部生成完毕!");
  5077. return;
  5078. }
  5079. thisCreateQty = thisCreateQty.toFixed(4);
  5080. var minPackQty = thisCreateQty;//最小包装量
  5081. //minPackQty = minPackQty.toFixed(4);
  5082. var createPageCount = 1;//本次生成张数
  5083. createPageCount = createPageCount.toFixed(0);
  5084. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5085. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5086. Quantity = Quantity.toFixed(2);
  5087. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5088. CreatedQty = CreatedQty.toFixed(2);
  5089. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5090. if (Quantity == CreatedQty) {
  5091. return false;
  5092. }
  5093. if (EffectiveEnable == 'true') {
  5094. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5095. } else {
  5096. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5097. }
  5098. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5099. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5100. var obj = {
  5101. ID:ID,
  5102. Code: DNCode,
  5103. Sequence: Sequence,
  5104. thisCreateQty: thisCreateQty,
  5105. minPackQty: minPackQty,
  5106. createPageCount: createPageCount,
  5107. //VendorLot: VendorLot,
  5108. PRODUCTDATE: PRODUCTDATE,
  5109. ExpirationDate: ExpirationDate,
  5110. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5111. //自由项
  5112. ProjectCode : $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5113. BatchCode : $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5114. Version : $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5115. Brand : $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5116. cFree1 : $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5117. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5118. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5119. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5120. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5121. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5122. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5123. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5124. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5125. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5126. }
  5127. ARR.push(obj);
  5128. }
  5129. $.submitForm({
  5130. url: "/MHWMS/WMSCreateItemLot/SubmitFormSHDHALL" + "?" + Math.random(),
  5131. param: {
  5132. keyValue: JSON.stringify(ARR)
  5133. },
  5134. success: function () {
  5135. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5136. }
  5137. })
  5138. }
  5139. //委外到货单
  5140. if (Type == '8') {
  5141. debugger;
  5142. var ARR = [];
  5143. for (var i in ids) {
  5144. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5145. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  5146. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5147. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5148. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5149. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5150. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5151. if (thisCreateQty == 0) {
  5152. $.modalAlert("该单据条码已全部生成完毕!");
  5153. return;
  5154. }
  5155. thisCreateQty = thisCreateQty.toFixed(4);
  5156. var minPackQty = thisCreateQty;//最小包装量
  5157. //minPackQty = minPackQty.toFixed(4);
  5158. var createPageCount = 1;//本次生成张数
  5159. createPageCount = createPageCount.toFixed(0);
  5160. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5161. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5162. Quantity = Quantity.toFixed(2);
  5163. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5164. CreatedQty = CreatedQty.toFixed(2);
  5165. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5166. if (Quantity == CreatedQty) {
  5167. return false;
  5168. }
  5169. if (EffectiveEnable == 'true') {
  5170. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5171. } else {
  5172. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5173. }
  5174. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5175. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5176. var obj = {
  5177. ID:ID,
  5178. Code: ODNCode,
  5179. Sequence: Sequence,
  5180. thisCreateQty: thisCreateQty,
  5181. minPackQty: minPackQty,
  5182. createPageCount: createPageCount,
  5183. //VendorLot: VendorLot,
  5184. PRODUCTDATE: PRODUCTDATE,
  5185. ExpirationDate: ExpirationDate,
  5186. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5187. //自由项
  5188. ProjectCode : $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5189. BatchCode : $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5190. Version : $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5191. Brand : $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5192. cFree1 : $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5193. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5194. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5195. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5196. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5197. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5198. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5199. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5200. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5201. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5202. }
  5203. ARR.push(obj);
  5204. }
  5205. $.submitForm({
  5206. url: "/MHWMS/WMSCreateItemLot/SubmitFormWWSHDHALL" + "?" + Math.random(),
  5207. param: {
  5208. keyValue: JSON.stringify(obj)
  5209. },
  5210. success: function () {
  5211. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5212. }
  5213. })
  5214. }
  5215. //成品入库单条码生成
  5216. if (Type == '9') {
  5217. debugger;
  5218. var ARR = [];
  5219. for (var i in ids) {
  5220. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5221. Code = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5222. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5223. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5224. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5225. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5226. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5227. if (thisCreateQty == 0) {
  5228. $.modalAlert("该单据条码已全部生成完毕!");
  5229. return;
  5230. }
  5231. thisCreateQty = thisCreateQty.toFixed(4);
  5232. var minPackQty = thisCreateQty;//最小包装量
  5233. //minPackQty = minPackQty.toFixed(4);
  5234. var createPageCount = 1;//本次生成张数
  5235. createPageCount = createPageCount.toFixed(0);
  5236. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5237. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5238. Quantity = Quantity.toFixed(2);
  5239. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5240. CreatedQty = CreatedQty.toFixed(2);
  5241. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5242. if (Quantity == CreatedQty) {
  5243. return false;
  5244. }
  5245. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5246. if (EffectiveEnable=='true') {
  5247. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5248. } else {
  5249. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5250. }
  5251. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5252. var obj = {
  5253. ID:ID,
  5254. Code: Code,
  5255. Sequence:Sequence,
  5256. thisCreateQty: thisCreateQty,
  5257. minPackQty: minPackQty,
  5258. createPageCount: createPageCount,
  5259. //VendorLot: VendorLot,
  5260. PRODUCTDATE: PRODUCTDATE,
  5261. ExpirationDate: ExpirationDate,
  5262. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5263. //自由项
  5264. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5265. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5266. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5267. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5268. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5269. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5270. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5271. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5272. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5273. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5274. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5275. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5276. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5277. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5278. }
  5279. ARR.push(obj);
  5280. }
  5281. $.submitForm({
  5282. url: "/MHWMS/WMSCreateItemLot/SubmitFormKLCPRKALL" + "?" + Math.random(),
  5283. param: {
  5284. keyValue: JSON.stringify(ARR)
  5285. },
  5286. success: function () {
  5287. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5288. }
  5289. })
  5290. }
  5291. if (Type == '13') {
  5292. debugger;
  5293. var ARR = [];
  5294. for (var i in ids) {
  5295. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5296. Code = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5297. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5298. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  5299. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  5300. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  5301. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5302. if (thisCreateQty == 0) {
  5303. $.modalAlert("该单据条码已全部生成完毕!");
  5304. return;
  5305. }
  5306. thisCreateQty = thisCreateQty.toFixed(4);
  5307. var minPackQty = thisCreateQty;//最小包装量
  5308. //minPackQty = minPackQty.toFixed(4);
  5309. var createPageCount = 1;//本次生成张数
  5310. createPageCount = createPageCount.toFixed(0);
  5311. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  5312. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5313. Quantity = Quantity.toFixed(2);
  5314. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5315. CreatedQty = CreatedQty.toFixed(2);
  5316. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  5317. if (Quantity == CreatedQty) {
  5318. return false;
  5319. }
  5320. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5321. if (EffectiveEnable == 'true') {
  5322. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  5323. } else {
  5324. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5325. }
  5326. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  5327. var obj = {
  5328. ID: ID,
  5329. Code: Code,
  5330. Sequence: Sequence,
  5331. thisCreateQty: thisCreateQty,
  5332. minPackQty: minPackQty,
  5333. createPageCount: createPageCount,
  5334. //VendorLot: VendorLot,
  5335. PRODUCTDATE: PRODUCTDATE,
  5336. ExpirationDate: ExpirationDate,
  5337. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5338. //自由项
  5339. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  5340. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  5341. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  5342. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  5343. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  5344. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  5345. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  5346. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  5347. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  5348. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  5349. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  5350. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  5351. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  5352. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  5353. }
  5354. ARR.push(obj);
  5355. }
  5356. $.submitForm({
  5357. url: "/MHWMS/WMSCreateItemLot/SubmitFormCLCKTLALL" + "?" + Math.random(),
  5358. param: {
  5359. keyValue: JSON.stringify(ARR)
  5360. },
  5361. success: function () {
  5362. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5363. }
  5364. })
  5365. }
  5366. if (Type == '17') {
  5367. for (var i in ids) {
  5368. LotNo = $("#gridList").jqGrid('getRowData', ids[i]).LotNo;
  5369. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  5370. if (thisCreateQty==0) {
  5371. $.modalAlert("该条码已全部生成完毕!");
  5372. return;
  5373. }
  5374. thisCreateQty = thisCreateQty.toFixed(4);
  5375. var minPackQty = thisCreateQty;//最小包装量
  5376. var createPageCount = 1;//本次生成张数
  5377. createPageCount = createPageCount.toFixed(0);
  5378. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  5379. Quantity = Quantity.toFixed(2);
  5380. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  5381. CreatedQty = CreatedQty.toFixed(2);
  5382. if (Quantity == CreatedQty) {
  5383. return false;
  5384. }
  5385. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  5386. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  5387. var obj = {
  5388. thisCreateQty: thisCreateQty,
  5389. minPackQty: minPackQty,
  5390. createPageCount: createPageCount,
  5391. //VendorLot: VendorLot,
  5392. PRODUCTDATE: PRODUCTDATE,
  5393. ExpirationDate: ExpirationDate,
  5394. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  5395. }
  5396. $.submitForm({
  5397. url: "/MHWMS/WMSCreateItemLot/SubmitFormBHGTM?LotNo=" + LotNo + "&WorkPoint=" + WorkPoints,
  5398. param: {
  5399. keyValue: JSON.stringify(obj)
  5400. },
  5401. success: function () {
  5402. $.currentWindow().$("#gridList").trigger("reloadGrid");
  5403. }
  5404. })
  5405. }
  5406. }
  5407. }
  5408. function dateChange(num, date) {
  5409. if (!date) {
  5410. date = new Date();//没有传入值时,默认是当前日期
  5411. date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
  5412. }
  5413. date += " 00:00:00";//设置为当天凌晨12点
  5414. date = Date.parse(new Date(date)) / 1000;//转换为时间戳
  5415. date += (86400) * num;//修改后的时间戳
  5416. var newDate = new Date(parseInt(date) * 1000);//转换为时间
  5417. return newDate.getFullYear() + '-' + (newDate.getMonth() + 1) + '-' + newDate.getDate();
  5418. }
  5419. function btnCreate() {
  5420. debugger;
  5421. var PoStatus;
  5422. var jsonData = '';
  5423. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  5424. if (ids.length != 1) {
  5425. $.modalAlertNew("WMS00100");
  5426. return;
  5427. }
  5428. var POCode = "";
  5429. var PORow = "";
  5430. if (Type == '1') {
  5431. for (var i in ids) {
  5432. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5433. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5434. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5435. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5436. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5437. }
  5438. $.modalOpen({
  5439. id: "FormAddItemLot",
  5440. title: "生产退料条码生成",
  5441. url: "/MHWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5442. width: "550px",
  5443. height: "1000px",
  5444. callBack: function (iframeId) {
  5445. top.frames[iframeId].submitForm();
  5446. }
  5447. });
  5448. } else if (Type == '2') {
  5449. for (var i in ids) {
  5450. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  5451. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5452. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5453. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5454. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5455. }
  5456. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5457. $.modalOpen({
  5458. id: "FormAddItemLot",
  5459. title: "委外退料条码生成",
  5460. url: "/MHWMS/WMSCreateItemLot/FromNew?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5461. width: "550px",
  5462. height: "1000px",
  5463. callBack: function (iframeId) {
  5464. top.frames[iframeId].submitForm();
  5465. }
  5466. });
  5467. }
  5468. else {
  5469. $.modalOpen({
  5470. id: "FormAddItemLot",
  5471. title: "委外退料条码生成",
  5472. url: "/MHWMS/WMSCreateItemLot/From?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5473. width: "550px",
  5474. height: "1000px",
  5475. callBack: function (iframeId) {
  5476. top.frames[iframeId].submitForm();
  5477. }
  5478. });
  5479. }
  5480. } else if (Type == '3') {
  5481. for (var i in ids) {
  5482. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  5483. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  5484. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5485. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5486. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5487. OKQuantity = $("#gridList").jqGrid('getRowData', ids[i]).OKQuantity;
  5488. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5489. }
  5490. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5491. $.modalOpen({
  5492. id: "FormAddItemLot",
  5493. title: "成品条码产生",
  5494. url: "/MHWMS/WMSCreateItemLot/FromNew?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  5495. width: "550px",
  5496. height: "1000px",
  5497. callBack: function (iframeId) {
  5498. top.frames[iframeId].submitForm();
  5499. }
  5500. });
  5501. }
  5502. else {
  5503. $.modalOpen({
  5504. id: "FormAddItemLot",
  5505. title: "成品条码产生",
  5506. url: "/MHWMS/WMSCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + OKQuantity + "&ID=" + ID + "&" + Math.random(),
  5507. width: "550px",
  5508. height: "1000px",
  5509. callBack: function (iframeId) {
  5510. top.frames[iframeId].submitForm();
  5511. }
  5512. });
  5513. }
  5514. } else if (Type == '4') {
  5515. for (var i in ids) {
  5516. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  5517. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5518. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5519. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5520. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5521. }
  5522. $.modalOpen({
  5523. id: "FormAddItemLot",
  5524. title: "销售退货条码产生",
  5525. url: "/MHWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5526. width: "550px",
  5527. height: "1000px",
  5528. callBack: function (iframeId) {
  5529. top.frames[iframeId].submitForm();
  5530. }
  5531. });
  5532. } else if (Type == '5') {
  5533. for (var i in ids) {
  5534. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  5535. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5536. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5537. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5538. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5539. }
  5540. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5541. $.modalOpen({
  5542. id: "FormAddItemLot",
  5543. title: "其他入库条码产生",
  5544. url: "/MHWMS/WMSCreateItemLot/FromNew?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5545. width: "550px",
  5546. height: "1000px",
  5547. callBack: function (iframeId) {
  5548. top.frames[iframeId].submitForm();
  5549. }
  5550. });
  5551. }
  5552. else {
  5553. $.modalOpen({
  5554. id: "FormAddItemLot",
  5555. title: "其他入库条码产生",
  5556. url: "/MHWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5557. width: "550px",
  5558. height: "1000px",
  5559. callBack: function (iframeId) {
  5560. top.frames[iframeId].submitForm();
  5561. }
  5562. });
  5563. }
  5564. } else if (Type == '6') {
  5565. for (var i in ids) {
  5566. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  5567. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5568. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5569. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5570. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5571. }
  5572. $.modalOpen({
  5573. id: "FormAddItemLot",
  5574. title: "归还单条码产生",
  5575. url: "/MHWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5576. width: "550px",
  5577. height: "1000px",
  5578. callBack: function (iframeId) {
  5579. top.frames[iframeId].submitForm();
  5580. }
  5581. });
  5582. } else if (Type == '7') {
  5583. for (var i in ids) {
  5584. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  5585. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5586. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5587. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5588. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5589. }
  5590. $.modalOpen({
  5591. id: "FormAddItemLot",
  5592. title: "审核到货单生成条码",
  5593. url: "/MHWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5594. width: "550px",
  5595. height: "1000px",
  5596. callBack: function (iframeId) {
  5597. top.frames[iframeId].submitForm();
  5598. }
  5599. });
  5600. } else if (Type == '8') {
  5601. for (var i in ids) {
  5602. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  5603. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5604. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  5605. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5606. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5607. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5608. }
  5609. $.modalOpen({
  5610. id: "FormAddItemLot",
  5611. title: "审核委外到货单生成条码",
  5612. url: "/MHWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(),
  5613. width: "550px",
  5614. height: "1000px",
  5615. callBack: function (iframeId) {
  5616. top.frames[iframeId].submitForm();
  5617. }
  5618. });
  5619. } else if (Type == '9') {
  5620. for (var i in ids) {
  5621. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5622. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5623. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5624. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5625. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5626. }
  5627. $.modalOpen({
  5628. id: "FormAddItemLot",
  5629. title: "开立成品入库单生成条码",
  5630. url: "/MHWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5631. width: "550px",
  5632. height: "1000px",
  5633. callBack: function (iframeId) {
  5634. top.frames[iframeId].submitForm();
  5635. }
  5636. });
  5637. } else if (Type == '10') {
  5638. for (var i in ids) {
  5639. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  5640. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5641. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5642. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5643. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5644. }
  5645. $.modalOpen({
  5646. id: "FormAddItemLot",
  5647. title: "审核拒收单生成条码",
  5648. url: "/MHWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5649. width: "550px",
  5650. height: "1000px",
  5651. callBack: function (iframeId) {
  5652. top.frames[iframeId].submitForm();
  5653. }
  5654. });
  5655. } else if (Type == '11') {
  5656. for (var i in ids) {
  5657. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  5658. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  5659. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5660. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5661. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5662. }
  5663. $.modalOpen({
  5664. id: "FormAddItemLot",
  5665. title: "审核委外拒收单生成条码",
  5666. url: "/MHWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5667. width: "550px",
  5668. height: "1000px",
  5669. callBack: function (iframeId) {
  5670. top.frames[iframeId].submitForm();
  5671. }
  5672. });
  5673. } else if (Type == '12') {
  5674. for (var i in ids) {
  5675. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5676. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5677. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5678. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5679. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5680. }
  5681. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5682. $.modalOpen({
  5683. id: "FormAddItemLot",
  5684. title: "审核领料申请退料生成条码",
  5685. url: "/MHWMS/WMSCreateItemLot/FromNew?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5686. width: "550px",
  5687. height: "1000px",
  5688. callBack: function (iframeId) {
  5689. top.frames[iframeId].submitForm();
  5690. }
  5691. });
  5692. }
  5693. else {
  5694. $.modalOpen({
  5695. id: "FormAddItemLot",
  5696. title: "审核领料申请退料生成条码",
  5697. url: "/MHWMS/WMSCreateItemLot/From?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5698. width: "550px",
  5699. height: "1000px",
  5700. callBack: function (iframeId) {
  5701. top.frames[iframeId].submitForm();
  5702. }
  5703. });
  5704. }
  5705. } else if (Type == '13') {
  5706. for (var i in ids) {
  5707. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  5708. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5709. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5710. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5711. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5712. }
  5713. $.modalOpen({
  5714. id: "FormAddItemLot",
  5715. title: "材料出库退料生成条码",
  5716. url: "/MHWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5717. width: "550px",
  5718. height: "1000px",
  5719. callBack: function (iframeId) {
  5720. top.frames[iframeId].submitForm();
  5721. }
  5722. });
  5723. } else if (Type == '14') {
  5724. for (var i in ids) {
  5725. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  5726. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5727. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5728. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5729. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5730. }
  5731. $.modalOpen({
  5732. id: "FormAddItemLot",
  5733. title: "委外领料退料条码生成",
  5734. url: "/MHWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5735. width: "550px",
  5736. height: "1000px",
  5737. callBack: function (iframeId) {
  5738. top.frames[iframeId].submitForm();
  5739. }
  5740. });
  5741. }
  5742. else if (Type == '15') {
  5743. for (var i in ids) {
  5744. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  5745. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5746. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5747. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5748. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5749. }
  5750. $.modalOpen({
  5751. id: "FormAddItemLot",
  5752. title: "委外材料出库退料生成条码",
  5753. url: "/MHWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&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 == '16') {
  5762. for (var i in ids) {
  5763. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  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: "/MHWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5773. width: "550px",
  5774. height: "1000px",
  5775. callBack: function (iframeId) {
  5776. top.frames[iframeId].submitForm();
  5777. }
  5778. });
  5779. }
  5780. else if (Type == '18') {
  5781. for (var i in ids) {
  5782. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  5783. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5784. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  5785. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5786. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5787. }
  5788. $.modalOpen({
  5789. id: "FormAddItemLot",
  5790. title: "副产品生成条码",
  5791. url: "/MHWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5792. width: "550px",
  5793. height: "1000px",
  5794. callBack: function (iframeId) {
  5795. top.frames[iframeId].submitForm();
  5796. }
  5797. });
  5798. }
  5799. else if (Type == '20') {
  5800. for (var i in ids) {
  5801. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5802. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5803. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5804. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5805. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5806. }
  5807. $.modalOpen({
  5808. id: "FormAddItemLot",
  5809. title: "两步调入生成条码",
  5810. url: "/MHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5811. width: "550px",
  5812. height: "1000px",
  5813. callBack: function (iframeId) {
  5814. top.frames[iframeId].submitForm();
  5815. }
  5816. });
  5817. }
  5818. else if (Type == '22') {
  5819. for (var i in ids) {
  5820. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5821. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5822. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5823. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5824. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5825. }
  5826. console.log($(event.target).attr('id'));
  5827. if ($(event.target).attr('id') == 'NF-CreateNew')
  5828. {
  5829. $.modalOpen({
  5830. id: "FormAddItemLot",
  5831. title: "采购入库生成条码",
  5832. url: "/MHWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5833. width: "550px",
  5834. height: "1000px",
  5835. callBack: function (iframeId) {
  5836. top.frames[iframeId].submitForm();
  5837. }
  5838. });
  5839. }
  5840. else {
  5841. $.modalOpen({
  5842. id: "FormAddItemLot",
  5843. title: "采购入库生成条码",
  5844. url: "/MHWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5845. width: "550px",
  5846. height: "1000px",
  5847. callBack: function (iframeId) {
  5848. top.frames[iframeId].submitForm();
  5849. }
  5850. });
  5851. }
  5852. }
  5853. else if (Type == '23') {
  5854. for (var i in ids) {
  5855. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  5856. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5857. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5858. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5859. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5860. }
  5861. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5862. $.modalOpen({
  5863. id: "FormAddItemLot",
  5864. title: "委外采购入库生成条码",
  5865. url: "/MHWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5866. width: "550px",
  5867. height: "1000px",
  5868. callBack: function (iframeId) {
  5869. top.frames[iframeId].submitForm();
  5870. }
  5871. });
  5872. }
  5873. else {
  5874. $.modalOpen({
  5875. id: "FormAddItemLot",
  5876. title: "委外采购入库生成条码",
  5877. url: "/MHWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5878. width: "550px",
  5879. height: "1000px",
  5880. callBack: function (iframeId) {
  5881. top.frames[iframeId].submitForm();
  5882. }
  5883. });
  5884. }
  5885. }
  5886. else if (Type == '24') {
  5887. for (var i in ids) {
  5888. SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  5889. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5890. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5891. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5892. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5893. }
  5894. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5895. $.modalOpen({
  5896. id: "FormAddItemLot",
  5897. title: "红字销售出库单生成条码",
  5898. url: "/MHWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5899. width: "550px",
  5900. height: "1000px",
  5901. callBack: function (iframeId) {
  5902. top.frames[iframeId].submitForm();
  5903. }
  5904. });
  5905. }
  5906. else {
  5907. $.modalOpen({
  5908. id: "FormAddItemLot",
  5909. title: "红字销售出库单生成条码",
  5910. url: "/MHWMS/WMSCreateItemLot/FromPN?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5911. width: "550px",
  5912. height: "1000px",
  5913. callBack: function (iframeId) {
  5914. top.frames[iframeId].submitForm();
  5915. }
  5916. });
  5917. }
  5918. }
  5919. else if (Type == '201') {
  5920. for (var i in ids) {
  5921. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5922. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5923. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5924. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5925. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5926. }
  5927. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5928. $.modalOpen({
  5929. id: "FormAddItemLot",
  5930. title: "调拨申请单生成条码",
  5931. url: "/MHWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5932. width: "550px",
  5933. height: "1000px",
  5934. callBack: function (iframeId) {
  5935. top.frames[iframeId].submitForm();
  5936. }
  5937. });
  5938. }
  5939. else {
  5940. $.modalOpen({
  5941. id: "FormAddItemLot",
  5942. title: "调拨申请单生成条码",
  5943. url: "/MHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5944. width: "550px",
  5945. height: "1000px",
  5946. callBack: function (iframeId) {
  5947. top.frames[iframeId].submitForm();
  5948. }
  5949. });
  5950. }
  5951. }
  5952. else if (Type == '202') {
  5953. for (var i in ids) {
  5954. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5955. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5956. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5957. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5958. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5959. }
  5960. $.modalOpen({
  5961. id: "FormAddItemLot",
  5962. title: "调拨申请单生成条码",
  5963. url: "/MHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5964. width: "550px",
  5965. height: "1000px",
  5966. callBack: function (iframeId) {
  5967. top.frames[iframeId].submitForm();
  5968. }
  5969. });
  5970. }
  5971. else if (Type == '203') {
  5972. for (var i in ids) {
  5973. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  5974. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  5975. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  5976. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  5977. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  5978. }
  5979. if ($(event.target).attr('id') == 'NF-CreateNew') {
  5980. $.modalOpen({
  5981. id: "FormAddItemLot",
  5982. title: "调拨申请单生成条码",
  5983. url: "/MHWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 203 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5984. width: "550px",
  5985. height: "1000px",
  5986. callBack: function (iframeId) {
  5987. top.frames[iframeId].submitForm();
  5988. }
  5989. });
  5990. }
  5991. else {
  5992. $.modalOpen({
  5993. id: "FormAddItemLot",
  5994. title: "调拨申请单生成条码",
  5995. url: "/MHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 203 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  5996. width: "550px",
  5997. height: "1000px",
  5998. callBack: function (iframeId) {
  5999. top.frames[iframeId].submitForm();
  6000. }
  6001. });
  6002. }
  6003. }
  6004. }
  6005. function btnCreatePN() {
  6006. debugger;
  6007. var PoStatus;
  6008. var jsonData = '';
  6009. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  6010. if (ids.length != 1) {
  6011. $.modalAlertNew("WMS00100");
  6012. return;
  6013. }
  6014. var POCode = "";
  6015. var PORow = "";
  6016. if (Type == '1') {
  6017. for (var i in ids) {
  6018. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6019. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6020. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6021. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6022. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6023. }
  6024. $.modalOpen({
  6025. id: "FormAddItemLot",
  6026. title: "生产退料条码生成",
  6027. url: "/MHWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6028. width: "550px",
  6029. height: "1000px",
  6030. callBack: function (iframeId) {
  6031. top.frames[iframeId].submitForm();
  6032. }
  6033. });
  6034. } else if (Type == '2') {
  6035. for (var i in ids) {
  6036. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6037. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6038. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6039. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6040. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6041. }
  6042. $.modalOpen({
  6043. id: "FormAddItemLot",
  6044. title: "委外退料条码生成",
  6045. url: "/MHWMS/WMSCreateItemLot/FromPN?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6046. width: "550px",
  6047. height: "1000px",
  6048. callBack: function (iframeId) {
  6049. top.frames[iframeId].submitForm();
  6050. }
  6051. });
  6052. } else if (Type == '3') {
  6053. for (var i in ids) {
  6054. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  6055. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6056. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6057. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6058. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6059. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6060. }
  6061. $.modalOpen({
  6062. id: "FormAddItemLot",
  6063. title: "成品条码产生",
  6064. url: "/MHWMS/WMSCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  6065. width: "550px",
  6066. height: "1000px",
  6067. callBack: function (iframeId) {
  6068. top.frames[iframeId].submitForm();
  6069. }
  6070. });
  6071. } else if (Type == '4') {
  6072. for (var i in ids) {
  6073. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  6074. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6075. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6076. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6077. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6078. }
  6079. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6080. $.modalOpen({
  6081. id: "FormAddItemLot",
  6082. title: "销售退货条码产生",
  6083. url: "/MHWMS/WMSCreateItemLot/FromNew?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6084. width: "550px",
  6085. height: "1000px",
  6086. callBack: function (iframeId) {
  6087. top.frames[iframeId].submitForm();
  6088. }
  6089. });
  6090. }
  6091. else {
  6092. $.modalOpen({
  6093. id: "FormAddItemLot",
  6094. title: "销售退货条码产生",
  6095. url: "/MHWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6096. width: "550px",
  6097. height: "1000px",
  6098. callBack: function (iframeId) {
  6099. top.frames[iframeId].submitForm();
  6100. }
  6101. });
  6102. }
  6103. } else if (Type == '5') {
  6104. for (var i in ids) {
  6105. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  6106. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6107. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6108. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6109. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6110. }
  6111. $.modalOpen({
  6112. id: "FormAddItemLot",
  6113. title: "其他入库条码产生",
  6114. url: "/MHWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6115. width: "550px",
  6116. height: "1000px",
  6117. callBack: function (iframeId) {
  6118. top.frames[iframeId].submitForm();
  6119. }
  6120. });
  6121. } else if (Type == '6') {
  6122. for (var i in ids) {
  6123. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  6124. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6125. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6126. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6127. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6128. }
  6129. $.modalOpen({
  6130. id: "FormAddItemLot",
  6131. title: "归还单条码产生",
  6132. url: "/MHWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6133. width: "550px",
  6134. height: "1000px",
  6135. callBack: function (iframeId) {
  6136. top.frames[iframeId].submitForm();
  6137. }
  6138. });
  6139. } else if (Type == '7') {
  6140. for (var i in ids) {
  6141. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  6142. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6143. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6144. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6145. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6146. }
  6147. $.modalOpen({
  6148. id: "FormAddItemLot",
  6149. title: "审核到货单生成条码",
  6150. url: "/MHWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6151. width: "550px",
  6152. height: "1000px",
  6153. callBack: function (iframeId) {
  6154. top.frames[iframeId].submitForm();
  6155. }
  6156. });
  6157. } else if (Type == '8') {
  6158. for (var i in ids) {
  6159. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  6160. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6161. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  6162. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6163. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6164. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6165. }
  6166. $.modalOpen({
  6167. id: "FormAddItemLot",
  6168. title: "审核委外到货单生成条码",
  6169. url: "/MHWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(),
  6170. width: "550px",
  6171. height: "1000px",
  6172. callBack: function (iframeId) {
  6173. top.frames[iframeId].submitForm();
  6174. }
  6175. });
  6176. } else if (Type == '9') {
  6177. for (var i in ids) {
  6178. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6179. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6180. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6181. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6182. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6183. }
  6184. $.modalOpen({
  6185. id: "FormAddItemLot",
  6186. title: "开立成品入库单生成条码",
  6187. url: "/MHWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6188. width: "550px",
  6189. height: "1000px",
  6190. callBack: function (iframeId) {
  6191. top.frames[iframeId].submitForm();
  6192. }
  6193. });
  6194. } else if (Type == '10') {
  6195. for (var i in ids) {
  6196. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  6197. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6198. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6199. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6200. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6201. }
  6202. $.modalOpen({
  6203. id: "FormAddItemLot",
  6204. title: "审核拒收单生成条码",
  6205. url: "/MHWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6206. width: "550px",
  6207. height: "1000px",
  6208. callBack: function (iframeId) {
  6209. top.frames[iframeId].submitForm();
  6210. }
  6211. });
  6212. } else if (Type == '11') {
  6213. for (var i in ids) {
  6214. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  6215. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  6216. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6217. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6218. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6219. }
  6220. $.modalOpen({
  6221. id: "FormAddItemLot",
  6222. title: "审核委外拒收单生成条码",
  6223. url: "/MHWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6224. width: "550px",
  6225. height: "1000px",
  6226. callBack: function (iframeId) {
  6227. top.frames[iframeId].submitForm();
  6228. }
  6229. });
  6230. } else if (Type == '12') {
  6231. for (var i in ids) {
  6232. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6233. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6234. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6235. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6236. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6237. }
  6238. $.modalOpen({
  6239. id: "FormAddItemLot",
  6240. title: "审核领料申请退料生成条码",
  6241. url: "/MHWMS/WMSCreateItemLot/FromPN?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6242. width: "550px",
  6243. height: "1000px",
  6244. callBack: function (iframeId) {
  6245. top.frames[iframeId].submitForm();
  6246. }
  6247. });
  6248. } else if (Type == '13') {
  6249. for (var i in ids) {
  6250. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6251. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6252. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6253. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6254. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6255. }
  6256. $.modalOpen({
  6257. id: "FormAddItemLot",
  6258. title: "材料出库退料生成条码",
  6259. url: "/MHWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6260. width: "550px",
  6261. height: "1000px",
  6262. callBack: function (iframeId) {
  6263. top.frames[iframeId].submitForm();
  6264. }
  6265. });
  6266. } else if (Type == '14') {
  6267. for (var i in ids) {
  6268. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6269. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6270. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6271. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6272. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6273. }
  6274. $.modalOpen({
  6275. id: "FormAddItemLot",
  6276. title: "委外领料退料条码生成",
  6277. url: "/MHWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6278. width: "550px",
  6279. height: "1000px",
  6280. callBack: function (iframeId) {
  6281. top.frames[iframeId].submitForm();
  6282. }
  6283. });
  6284. }
  6285. else if (Type == '15') {
  6286. for (var i in ids) {
  6287. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6288. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6289. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6290. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6291. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6292. }
  6293. $.modalOpen({
  6294. id: "FormAddItemLot",
  6295. title: "委外材料出库退料生成条码",
  6296. url: "/MHWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6297. width: "550px",
  6298. height: "1000px",
  6299. callBack: function (iframeId) {
  6300. top.frames[iframeId].submitForm();
  6301. }
  6302. });
  6303. }
  6304. else if (Type == '16') {
  6305. for (var i in ids) {
  6306. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  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: "/MHWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6316. width: "550px",
  6317. height: "1000px",
  6318. callBack: function (iframeId) {
  6319. top.frames[iframeId].submitForm();
  6320. }
  6321. });
  6322. }
  6323. else if (Type == '18') {
  6324. for (var i in ids) {
  6325. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6326. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6327. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  6328. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6329. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6330. }
  6331. $.modalOpen({
  6332. id: "FormAddItemLot",
  6333. title: "副产品生成条码",
  6334. url: "/MHWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6335. width: "550px",
  6336. height: "1000px",
  6337. callBack: function (iframeId) {
  6338. top.frames[iframeId].submitForm();
  6339. }
  6340. });
  6341. }
  6342. else if (Type == '20') {
  6343. for (var i in ids) {
  6344. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6345. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6346. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6347. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6348. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6349. }
  6350. $.modalOpen({
  6351. id: "FormAddItemLot",
  6352. title: "两步调入生成条码",
  6353. url: "/MHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6354. width: "550px",
  6355. height: "1000px",
  6356. callBack: function (iframeId) {
  6357. top.frames[iframeId].submitForm();
  6358. }
  6359. });
  6360. }
  6361. else if (Type == '22') {
  6362. for (var i in ids) {
  6363. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6364. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6365. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6366. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6367. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6368. }
  6369. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6370. $.modalOpen({
  6371. id: "FormAddItemLot",
  6372. title: "采购入库生成条码",
  6373. url: "/MHWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6374. width: "550px",
  6375. height: "1000px",
  6376. callBack: function (iframeId) {
  6377. top.frames[iframeId].submitForm();
  6378. }
  6379. });
  6380. }
  6381. else {
  6382. $.modalOpen({
  6383. id: "FormAddItemLot",
  6384. title: "采购入库生成条码",
  6385. url: "/MHWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6386. width: "550px",
  6387. height: "1000px",
  6388. callBack: function (iframeId) {
  6389. top.frames[iframeId].submitForm();
  6390. }
  6391. });
  6392. }
  6393. }
  6394. else if (Type == '23') {
  6395. for (var i in ids) {
  6396. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6397. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6398. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6399. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6400. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6401. }
  6402. $.modalOpen({
  6403. id: "FormAddItemLot",
  6404. title: "委外采购入库生成条码",
  6405. url: "/MHWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6406. width: "550px",
  6407. height: "1000px",
  6408. callBack: function (iframeId) {
  6409. top.frames[iframeId].submitForm();
  6410. }
  6411. });
  6412. }
  6413. else if (Type == '24') {
  6414. for (var i in ids) {
  6415. SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  6416. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6417. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6418. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6419. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6420. }
  6421. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6422. $.modalOpen({
  6423. id: "FormAddItemLot",
  6424. title: "红字销售出库单生成条码",
  6425. url: "/MHWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6426. width: "550px",
  6427. height: "1000px",
  6428. callBack: function (iframeId) {
  6429. top.frames[iframeId].submitForm();
  6430. }
  6431. });
  6432. }
  6433. else {
  6434. $.modalOpen({
  6435. id: "FormAddItemLot",
  6436. title: "红字销售出库单生成条码",
  6437. url: "/MHWMS/WMSCreateItemLot/From?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6438. width: "550px",
  6439. height: "1000px",
  6440. callBack: function (iframeId) {
  6441. top.frames[iframeId].submitForm();
  6442. }
  6443. });
  6444. }
  6445. }
  6446. else if (Type == '201') {
  6447. for (var i in ids) {
  6448. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6449. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6450. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6451. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6452. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6453. }
  6454. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6455. $.modalOpen({
  6456. id: "FormAddItemLot",
  6457. title: "调拨申请单生成条码",
  6458. url: "/MHWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6459. width: "550px",
  6460. height: "1000px",
  6461. callBack: function (iframeId) {
  6462. top.frames[iframeId].submitForm();
  6463. }
  6464. });
  6465. }
  6466. else {
  6467. $.modalOpen({
  6468. id: "FormAddItemLot",
  6469. title: "调拨申请单生成条码",
  6470. url: "/MHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6471. width: "550px",
  6472. height: "1000px",
  6473. callBack: function (iframeId) {
  6474. top.frames[iframeId].submitForm();
  6475. }
  6476. });
  6477. }
  6478. }
  6479. else if (Type == '202') {
  6480. for (var i in ids) {
  6481. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6482. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6483. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6484. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6485. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6486. }
  6487. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6488. $.modalOpen({
  6489. id: "FormAddItemLot",
  6490. title: "调拨申请单生成条码",
  6491. url: "/MHWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6492. width: "550px",
  6493. height: "1000px",
  6494. callBack: function (iframeId) {
  6495. top.frames[iframeId].submitForm();
  6496. }
  6497. });
  6498. }
  6499. else {
  6500. $.modalOpen({
  6501. id: "FormAddItemLot",
  6502. title: "调拨申请单生成条码",
  6503. url: "/MHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6504. width: "550px",
  6505. height: "1000px",
  6506. callBack: function (iframeId) {
  6507. top.frames[iframeId].submitForm();
  6508. }
  6509. });
  6510. }
  6511. }
  6512. }
  6513. function btnCreateHG() {
  6514. debugger;
  6515. var PoStatus;
  6516. var jsonData = '';
  6517. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  6518. if (ids.length != 1) {
  6519. $.modalAlertNew("WMS00100");
  6520. return;
  6521. }
  6522. var POCode = "";
  6523. var PORow = "";
  6524. if (Type == '1') {
  6525. for (var i in ids) {
  6526. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6527. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6528. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6529. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6530. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6531. }
  6532. $.modalOpen({
  6533. id: "FormAddItemLot",
  6534. title: "生产退料条码生成",
  6535. url: "/MHWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6536. width: "550px",
  6537. height: "1000px",
  6538. callBack: function (iframeId) {
  6539. top.frames[iframeId].submitForm();
  6540. }
  6541. });
  6542. } else if (Type == '2') {
  6543. for (var i in ids) {
  6544. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6545. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6546. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6547. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6548. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6549. }
  6550. $.modalOpen({
  6551. id: "FormAddItemLot",
  6552. title: "委外退料条码生成",
  6553. url: "/MHWMS/WMSCreateItemLot/From?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6554. width: "550px",
  6555. height: "1000px",
  6556. callBack: function (iframeId) {
  6557. top.frames[iframeId].submitForm();
  6558. }
  6559. });
  6560. } else if (Type == '3') {
  6561. for (var i in ids) {
  6562. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  6563. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6564. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6565. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6566. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6567. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6568. }
  6569. $.modalOpen({
  6570. id: "FormAddItemLot",
  6571. title: "成品条码产生",
  6572. url: "/MHWMS/WMSCreateItemLot/FromHG?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(),
  6573. width: "550px",
  6574. height: "1000px",
  6575. callBack: function (iframeId) {
  6576. top.frames[iframeId].submitForm();
  6577. }
  6578. });
  6579. } else if (Type == '4') {
  6580. for (var i in ids) {
  6581. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  6582. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6583. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6584. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6585. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6586. }
  6587. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6588. $.modalOpen({
  6589. id: "FormAddItemLot",
  6590. title: "销售退货条码产生",
  6591. url: "/MHWMS/WMSCreateItemLot/FromNew?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6592. width: "550px",
  6593. height: "1000px",
  6594. callBack: function (iframeId) {
  6595. top.frames[iframeId].submitForm();
  6596. }
  6597. });
  6598. }
  6599. else {
  6600. $.modalOpen({
  6601. id: "FormAddItemLot",
  6602. title: "销售退货条码产生",
  6603. url: "/MHWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6604. width: "550px",
  6605. height: "1000px",
  6606. callBack: function (iframeId) {
  6607. top.frames[iframeId].submitForm();
  6608. }
  6609. });
  6610. }
  6611. } else if (Type == '5') {
  6612. for (var i in ids) {
  6613. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  6614. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6615. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6616. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6617. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6618. }
  6619. $.modalOpen({
  6620. id: "FormAddItemLot",
  6621. title: "其他入库条码产生",
  6622. url: "/MHWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6623. width: "550px",
  6624. height: "1000px",
  6625. callBack: function (iframeId) {
  6626. top.frames[iframeId].submitForm();
  6627. }
  6628. });
  6629. } else if (Type == '6') {
  6630. for (var i in ids) {
  6631. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  6632. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6633. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6634. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6635. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6636. }
  6637. $.modalOpen({
  6638. id: "FormAddItemLot",
  6639. title: "归还单条码产生",
  6640. url: "/MHWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6641. width: "550px",
  6642. height: "1000px",
  6643. callBack: function (iframeId) {
  6644. top.frames[iframeId].submitForm();
  6645. }
  6646. });
  6647. } else if (Type == '7') {
  6648. for (var i in ids) {
  6649. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  6650. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6651. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6652. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6653. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6654. }
  6655. $.modalOpen({
  6656. id: "FormAddItemLot",
  6657. title: "审核到货单生成条码",
  6658. url: "/MHWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6659. width: "550px",
  6660. height: "1000px",
  6661. callBack: function (iframeId) {
  6662. top.frames[iframeId].submitForm();
  6663. }
  6664. });
  6665. } else if (Type == '8') {
  6666. for (var i in ids) {
  6667. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  6668. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6669. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  6670. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6671. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6672. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6673. }
  6674. $.modalOpen({
  6675. id: "FormAddItemLot",
  6676. title: "审核委外到货单生成条码",
  6677. url: "/MHWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(),
  6678. width: "550px",
  6679. height: "1000px",
  6680. callBack: function (iframeId) {
  6681. top.frames[iframeId].submitForm();
  6682. }
  6683. });
  6684. } else if (Type == '9') {
  6685. for (var i in ids) {
  6686. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6687. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6688. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6689. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6690. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6691. }
  6692. $.modalOpen({
  6693. id: "FormAddItemLot",
  6694. title: "开立成品入库单生成条码",
  6695. url: "/MHWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6696. width: "550px",
  6697. height: "1000px",
  6698. callBack: function (iframeId) {
  6699. top.frames[iframeId].submitForm();
  6700. }
  6701. });
  6702. } else if (Type == '10') {
  6703. for (var i in ids) {
  6704. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  6705. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6706. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6707. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6708. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6709. }
  6710. $.modalOpen({
  6711. id: "FormAddItemLot",
  6712. title: "审核拒收单生成条码",
  6713. url: "/MHWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6714. width: "550px",
  6715. height: "1000px",
  6716. callBack: function (iframeId) {
  6717. top.frames[iframeId].submitForm();
  6718. }
  6719. });
  6720. } else if (Type == '11') {
  6721. for (var i in ids) {
  6722. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  6723. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  6724. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6725. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6726. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6727. }
  6728. $.modalOpen({
  6729. id: "FormAddItemLot",
  6730. title: "审核委外拒收单生成条码",
  6731. url: "/MHWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6732. width: "550px",
  6733. height: "1000px",
  6734. callBack: function (iframeId) {
  6735. top.frames[iframeId].submitForm();
  6736. }
  6737. });
  6738. } else if (Type == '12') {
  6739. for (var i in ids) {
  6740. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6741. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6742. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6743. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6744. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6745. }
  6746. $.modalOpen({
  6747. id: "FormAddItemLot",
  6748. title: "审核领料申请退料生成条码",
  6749. url: "/MHWMS/WMSCreateItemLot/FromPN?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6750. width: "550px",
  6751. height: "1000px",
  6752. callBack: function (iframeId) {
  6753. top.frames[iframeId].submitForm();
  6754. }
  6755. });
  6756. } else if (Type == '13') {
  6757. for (var i in ids) {
  6758. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  6759. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6760. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6761. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6762. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6763. }
  6764. $.modalOpen({
  6765. id: "FormAddItemLot",
  6766. title: "材料出库退料生成条码",
  6767. url: "/MHWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6768. width: "550px",
  6769. height: "1000px",
  6770. callBack: function (iframeId) {
  6771. top.frames[iframeId].submitForm();
  6772. }
  6773. });
  6774. } else if (Type == '14') {
  6775. for (var i in ids) {
  6776. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6777. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6778. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6779. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6780. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6781. }
  6782. $.modalOpen({
  6783. id: "FormAddItemLot",
  6784. title: "委外领料退料条码生成",
  6785. url: "/MHWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6786. width: "550px",
  6787. height: "1000px",
  6788. callBack: function (iframeId) {
  6789. top.frames[iframeId].submitForm();
  6790. }
  6791. });
  6792. }
  6793. else if (Type == '15') {
  6794. for (var i in ids) {
  6795. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  6796. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6797. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6798. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6799. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6800. }
  6801. $.modalOpen({
  6802. id: "FormAddItemLot",
  6803. title: "委外材料出库退料生成条码",
  6804. url: "/MHWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6805. width: "550px",
  6806. height: "1000px",
  6807. callBack: function (iframeId) {
  6808. top.frames[iframeId].submitForm();
  6809. }
  6810. });
  6811. }
  6812. else if (Type == '16') {
  6813. for (var i in ids) {
  6814. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  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: "/MHWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6824. width: "550px",
  6825. height: "1000px",
  6826. callBack: function (iframeId) {
  6827. top.frames[iframeId].submitForm();
  6828. }
  6829. });
  6830. }
  6831. else if (Type == '18') {
  6832. for (var i in ids) {
  6833. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  6834. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6835. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  6836. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6837. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6838. }
  6839. $.modalOpen({
  6840. id: "FormAddItemLot",
  6841. title: "副产品生成条码",
  6842. url: "/MHWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6843. width: "550px",
  6844. height: "1000px",
  6845. callBack: function (iframeId) {
  6846. top.frames[iframeId].submitForm();
  6847. }
  6848. });
  6849. }
  6850. else if (Type == '20') {
  6851. for (var i in ids) {
  6852. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6853. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6854. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6855. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6856. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6857. }
  6858. $.modalOpen({
  6859. id: "FormAddItemLot",
  6860. title: "两步调入生成条码",
  6861. url: "/MHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6862. width: "550px",
  6863. height: "1000px",
  6864. callBack: function (iframeId) {
  6865. top.frames[iframeId].submitForm();
  6866. }
  6867. });
  6868. }
  6869. else if (Type == '22') {
  6870. for (var i in ids) {
  6871. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6872. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6873. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6874. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6875. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6876. }
  6877. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6878. $.modalOpen({
  6879. id: "FormAddItemLot",
  6880. title: "采购入库生成条码",
  6881. url: "/MHWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6882. width: "550px",
  6883. height: "1000px",
  6884. callBack: function (iframeId) {
  6885. top.frames[iframeId].submitForm();
  6886. }
  6887. });
  6888. }
  6889. else {
  6890. $.modalOpen({
  6891. id: "FormAddItemLot",
  6892. title: "采购入库生成条码",
  6893. url: "/MHWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6894. width: "550px",
  6895. height: "1000px",
  6896. callBack: function (iframeId) {
  6897. top.frames[iframeId].submitForm();
  6898. }
  6899. });
  6900. }
  6901. }
  6902. else if (Type == '23') {
  6903. for (var i in ids) {
  6904. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  6905. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6906. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6907. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6908. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6909. }
  6910. $.modalOpen({
  6911. id: "FormAddItemLot",
  6912. title: "委外采购入库生成条码",
  6913. url: "/MHWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6914. width: "550px",
  6915. height: "1000px",
  6916. callBack: function (iframeId) {
  6917. top.frames[iframeId].submitForm();
  6918. }
  6919. });
  6920. }
  6921. else if (Type == '24') {
  6922. for (var i in ids) {
  6923. SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode;
  6924. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6925. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6926. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6927. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6928. }
  6929. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6930. $.modalOpen({
  6931. id: "FormAddItemLot",
  6932. title: "红字销售出库单生成条码",
  6933. url: "/MHWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6934. width: "550px",
  6935. height: "1000px",
  6936. callBack: function (iframeId) {
  6937. top.frames[iframeId].submitForm();
  6938. }
  6939. });
  6940. }
  6941. else {
  6942. $.modalOpen({
  6943. id: "FormAddItemLot",
  6944. title: "红字销售出库单生成条码",
  6945. url: "/MHWMS/WMSCreateItemLot/From?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6946. width: "550px",
  6947. height: "1000px",
  6948. callBack: function (iframeId) {
  6949. top.frames[iframeId].submitForm();
  6950. }
  6951. });
  6952. }
  6953. }
  6954. else if (Type == '201') {
  6955. for (var i in ids) {
  6956. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6957. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6958. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6959. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6960. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6961. }
  6962. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6963. $.modalOpen({
  6964. id: "FormAddItemLot",
  6965. title: "调拨申请单生成条码",
  6966. url: "/MHWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6967. width: "550px",
  6968. height: "1000px",
  6969. callBack: function (iframeId) {
  6970. top.frames[iframeId].submitForm();
  6971. }
  6972. });
  6973. }
  6974. else {
  6975. $.modalOpen({
  6976. id: "FormAddItemLot",
  6977. title: "调拨申请单生成条码",
  6978. url: "/MHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  6979. width: "550px",
  6980. height: "1000px",
  6981. callBack: function (iframeId) {
  6982. top.frames[iframeId].submitForm();
  6983. }
  6984. });
  6985. }
  6986. }
  6987. else if (Type == '202') {
  6988. for (var i in ids) {
  6989. TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO;
  6990. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  6991. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  6992. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  6993. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  6994. }
  6995. if ($(event.target).attr('id') == 'NF-CreateNew') {
  6996. $.modalOpen({
  6997. id: "FormAddItemLot",
  6998. title: "调拨申请单生成条码",
  6999. url: "/MHWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  7000. width: "550px",
  7001. height: "1000px",
  7002. callBack: function (iframeId) {
  7003. top.frames[iframeId].submitForm();
  7004. }
  7005. });
  7006. }
  7007. else {
  7008. $.modalOpen({
  7009. id: "FormAddItemLot",
  7010. title: "调拨申请单生成条码",
  7011. url: "/MHWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(),
  7012. width: "550px",
  7013. height: "1000px",
  7014. callBack: function (iframeId) {
  7015. top.frames[iframeId].submitForm();
  7016. }
  7017. });
  7018. }
  7019. }
  7020. }
  7021. function fullscreen() {
  7022. var docElm = document.documentElement;
  7023. if (docElm.requestFullscreen) {
  7024. docElm.requestFullscreen();
  7025. } else if (docElm.mozRequestFullScreen) {
  7026. docElm.mozRequestFullScreen();
  7027. } else if (docElm.webkitRequestFullScreen) {
  7028. docElm.webkitRequestFullScreen();
  7029. } else if (docElm.msRequestFullscreen) {
  7030. docElm.msRequestFullscreen();
  7031. }
  7032. $(window).bind('resize', function () {
  7033. $("#gridList").setGridWidth($(window).width());
  7034. }).trigger('resize');
  7035. $(window).bind('resize', function () {
  7036. $("#gridList").setGridHeight($(window).height());
  7037. }).trigger('resize');
  7038. }
  7039. function btnPrint() {
  7040. debugger;
  7041. if (mold == '')
  7042. {
  7043. if (Type == '1') { mold = '00001'; }//生产退料生成条码
  7044. if (Type == '2') { mold = '00002'; }//委外退料生成条码
  7045. if (Type == '3') { mold = '00003'; }//工单成品生成条码
  7046. if (Type == '4') { mold = '00004'; }//销售退货生成条码
  7047. if (Type == '5') { mold = '00005'; }//其他入库生成条码
  7048. if (Type == '6') { mold = '00006'; }//归还单生成条码
  7049. if (Type == '7') { mold = '00007'; }//普通到货单生成条码
  7050. if (Type == '8') { mold = '00008'; }//委外到货单生成条码
  7051. if (Type == '9') { mold = '00009'; }//成品入库单生成条码
  7052. if (Type == '10') { mold = '00010'; }//拒收单生成条码
  7053. if (Type == '11') { mold = '00011'; }//委外拒收单生成条码
  7054. if (Type == '12') { mold = '00012'; }//领料申请退料
  7055. if (Type == '13') { mold = '00013'; }//材料出库退料
  7056. if (Type == '14') { mold = '00014'; }//委外领料申请退料
  7057. if (Type == '15') { mold = '00015'; }//委外材料出库退料
  7058. if (Type == '16') { mold = '00016'; }//返工工单
  7059. if (Type == '17') { mold = 'BHG00001'; }//不合格条码入库
  7060. if (Type == '18') { mold = 'FCP00001'; }//副产品生成条码
  7061. if (Type == '22') { mold = '00018'; }//采购入库生成条码
  7062. if (Type == '23') { mold = '00019'; }//委外采购入库生成条码
  7063. if (Type == '201') { mold = '00020'; }//委外采购入库生成条码
  7064. if (Type == '202') { mold = '00020'; }//委外采购入库生成条码
  7065. }
  7066. var objArr = '';
  7067. var arr = [];
  7068. var obj = $("#gridList").jqGrid("getRowData");
  7069. for (var i = 0; i < obj.length; i++) {
  7070. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  7071. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  7072. if (rowData != "undefined" && rowData != null && rowData.length != 0) {
  7073. for (var j = 0; j < rowData.length; j++) {
  7074. objArr += "'" + rowData[j] + "',";
  7075. }
  7076. }
  7077. }
  7078. objArr = objArr.slice(0, objArr.length - 1);
  7079. if (objArr == "") {
  7080. $.modalAlertNew("WMS00101");
  7081. return;
  7082. }
  7083. objArr = "" + objArr + "|";
  7084. arr.push(objArr);
  7085. $.modalOpen({
  7086. id: "PrintLot",
  7087. title: "打印",
  7088. url: "/WMS/Print/PrintViewByLot?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  7089. width: "550px",
  7090. height: "1000px",
  7091. callBack: function (iframeId) {
  7092. top.frames[iframeId].submitForm();
  7093. }
  7094. });
  7095. }
  7096. function btnBatchPrint() {
  7097. debugger;
  7098. if (mold == '')
  7099. {
  7100. if (Type == '7') { mold = '00056'; }//普通到货单生成条码
  7101. if (Type == '8') { mold = '00057'; }//委外到货单生成条码
  7102. }
  7103. var objArr = '';
  7104. var arr = [];
  7105. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  7106. if (ids.length == 0) {
  7107. $.modalAlertNew("WMS00100");
  7108. return;
  7109. }
  7110. var ID = '';
  7111. for (var i in ids) {
  7112. ID = $("#gridList").jqGrid('getRowData', ids[i]).ID;
  7113. objArr += "'" + ID + "',";
  7114. }
  7115. objArr = objArr.slice(0, objArr.length - 1);
  7116. objArr = "" + objArr + "|";
  7117. arr.push(objArr);
  7118. var xxx = "";
  7119. $.modalOpen({
  7120. id: "PrintLot",
  7121. title: "打印",
  7122. url: "/WMS/Print/PrintView?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  7123. width: "550px",
  7124. height: "1000px",
  7125. callBack: function (iframeId) {
  7126. top.frames[iframeId].submitForm();
  7127. }
  7128. });
  7129. }
  7130. function btn_ExportAll() {
  7131. debugger;
  7132. var objArr = '';
  7133. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7134. for (var i in ids) {
  7135. objArr += "'" + $("#gridList").jqGrid('getRowData', ids[i]).ID + "',";
  7136. }
  7137. if (objArr=="") {
  7138. $.modalAlert("请选择单据后导出!");
  7139. return;
  7140. }
  7141. var postData = "&Type=" + Type + "";
  7142. //postData += "&ID=" + ID
  7143. postData += "&ID=" + objArr;
  7144. $.download("/MHWMS/WMSCreateItemLot/StatementExportAll" + "?" + Math.random(), postData, 'post');
  7145. }
  7146. function Select_SelGDLX() {
  7147. $("#SelGDLX").find("option").remove();
  7148. var DeptName = $("#SelGDLX option:checked").text();
  7149. $("#SelGDLX").append("<option value=''>--请选择--</option>");
  7150. $.ajax({
  7151. url: "/MHWMS/WMSCreateItemLot/SelGDLX" + "?" + Math.random(),
  7152. dataType: "json",
  7153. async: false,
  7154. success: function (data) {
  7155. if (data != null && data.length > 0) {
  7156. for (var i = 0; i < data.length; i++) {
  7157. $("#SelGDLX").append("<option value='" + data[i].Code + "'>" + data[i].Name + "</option>");
  7158. }
  7159. }
  7160. }
  7161. });
  7162. $("#SelGDLX option:checked").val('');
  7163. }
  7164. function btnCreateLook() {
  7165. var MODetailID = '';
  7166. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7167. for (var i = 0; i < objList.length; i++) {
  7168. var rowId = objList[i];
  7169. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  7170. MODetailID = rowData.MODetailID;
  7171. }
  7172. $.modalOpenClean({
  7173. id: "FormMoPick",
  7174. title: "工单子件信息",
  7175. url: "/MHWMS/WMSCreateItemLot/FormMoPick" + "?" + Math.random() + "&MODetailID=" + MODetailID,
  7176. width: "90%",
  7177. height: "90%",
  7178. callBack: function (iframeId) {
  7179. top.frames[iframeId].submitForm();
  7180. }
  7181. });
  7182. }
  7183. function btn_Import() {
  7184. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  7185. if (objList.length != 1) {
  7186. $.modalAlertNew("WMS00100");
  7187. return;
  7188. }
  7189. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7190. for (var i = 0; i < objList.length; i++) {
  7191. var rowId = objList[i];
  7192. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  7193. var Code = rowData.MOCode;
  7194. var Sequence = rowData.Sequence;
  7195. $.modalOpen({
  7196. id: "Upload",
  7197. title: "导入",
  7198. url: "/MHWMS/WMSCreateItemLot/ImportLot?Code=" + Code + "&Sequence=" + Sequence + "&" + Math.random(),
  7199. width: "400px",
  7200. height: "200px",
  7201. btn: null,
  7202. });
  7203. }
  7204. }
  7205. function btnPrints() {
  7206. debugger;
  7207. // var mold = '';
  7208. if (mold == '') {
  7209. if (Type == '1') { mold = '00001'; }//生产退料生成条码
  7210. if (Type == '2') { mold = '00002'; }//委外退料生成条码
  7211. if (Type == '3') { mold = '00003'; }//工单成品生成条码
  7212. if (Type == '4') { mold = '00004'; }//销售退货生成条码
  7213. if (Type == '5') { mold = '00005'; }//其他入库生成条码
  7214. if (Type == '6') { mold = '00006'; }//归还单生成条码
  7215. if (Type == '7') { mold = '00007'; }//普通到货单生成条码
  7216. if (Type == '8') { mold = '00008'; }//委外到货单生成条码
  7217. if (Type == '9') { mold = '00009'; }//成品入库单生成条码
  7218. if (Type == '10') { mold = '00010'; }//拒收单生成条码
  7219. if (Type == '11') { mold = '00011'; }//委外拒收单生成条码
  7220. if (Type == '12') { mold = '00012'; }//领料申请退料
  7221. if (Type == '13') { mold = '00013'; }//材料出库退料
  7222. if (Type == '14') { mold = '00014'; }//委外领料申请退料
  7223. if (Type == '15') { mold = '00015'; }//委外材料出库退料
  7224. if (Type == '16') { mold = '00016'; }//返工工单
  7225. if (Type == '17') { mold = 'BHG00001'; }//不合格条码入库
  7226. if (Type == '18') { mold = 'FCP00001'; }//副产品生成条码
  7227. }
  7228. var objArr = '';
  7229. var arr = [];
  7230. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7231. for (var i = 0; i < objList.length; i++) {
  7232. var rowId = objList[i];
  7233. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  7234. objArr += "'" + rowData.ID + "',";
  7235. }
  7236. objArr = objArr.slice(0, objArr.length - 1);
  7237. if (objArr == "") {
  7238. $.modalAlertNew("WMS00110");
  7239. return;
  7240. }
  7241. objArr = "" + objArr + "|";
  7242. arr.push(objArr);
  7243. $.modalOpen({
  7244. id: "PrintLot",
  7245. title: "打印",
  7246. url: "/WMS/Print/PrintViewByLot?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  7247. width: "550px",
  7248. height: "1000px",
  7249. callBack: function (iframeId) {
  7250. top.frames[iframeId].submitForm();
  7251. }
  7252. });
  7253. }
  7254. function btnInWareHouse() {
  7255. debugger;
  7256. var objArr = '';
  7257. var arr = [];
  7258. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  7259. for (var i = 0; i < objList.length; i++) {
  7260. var rowId = objList[i];
  7261. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  7262. objArr += "'" + rowData.ID + "',";
  7263. }
  7264. objArr = objArr.slice(0, objArr.length - 1);
  7265. if (objArr == "") {
  7266. $.modalAlertNew("WMS00110");
  7267. return;
  7268. }
  7269. arr.push(objArr);
  7270. $.submitForm({
  7271. url: "/MHWMS/WMSCreateItemLot/PostInWareHouse" ,
  7272. param: {
  7273. IDs: JSON.stringify(objArr)
  7274. },
  7275. success: function () {
  7276. $.currentWindow().$("#gridList").trigger("reloadGrid");
  7277. }
  7278. })
  7279. }
  7280. function btn_Rebind() {
  7281. var objArr = '';
  7282. var obj = $("#gridList").jqGrid("getRowData");
  7283. for (var i = 0; i < obj.length; i++) {
  7284. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  7285. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  7286. if (rowData != "undefined" && rowData != null && rowData.length != 0) {
  7287. for (var j = 0; j < rowData.length; j++) {
  7288. var rowDataZ = $SubGird.jqGrid('getRowData', rowData[j]);
  7289. objArr += "'" + rowDataZ.LotNo + "',";
  7290. }
  7291. objArr = objArr.slice(0, objArr.length - 1);
  7292. }
  7293. }
  7294. if (objArr == "") {
  7295. $.modalAlert("请选择条码信息后,进行重新绑定!");
  7296. return;
  7297. }
  7298. $.modalOpen({
  7299. id: "ICSLotRebind",
  7300. title: "条码重新绑定",
  7301. url: "/MHWMS/WMSCreateItemLot/ICSLotRebind?LotNo=" + encodeURI(encodeURI(objArr)) + "&" + Math.random(),
  7302. width: "500px",
  7303. height: "350px",
  7304. callBack: function (iframeId) {
  7305. top.frames[iframeId].submitForm();
  7306. }
  7307. });
  7308. }
  7309. </script>
  7310. <iframe id="ifrm" src="" width="0" height="0"></iframe>
  7311. <script>
  7312. </script>
  7313. <div class="topPanel" style="height:149px;">
  7314. <div class="toolbar">
  7315. <div class="btn-group">
  7316. <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>
  7317. <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>
  7318. <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>
  7319. <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>
  7320. <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>
  7321. <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>
  7322. <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>
  7323. <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>
  7324. <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>
  7325. <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>
  7326. <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>
  7327. @*<a id="NF-ExportAll" authorize="yes" class="btn btn-default" onclick="btn_ExportAll()"><i class="fa fa-download"></i>导出</a>*@
  7328. <a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
  7329. </div>
  7330. <div class="btn-group" style="display:block;padding-left:2px;">
  7331. <a class="btn btn-primary" id="downPrintControl" href="~/PrintActivex.exe" style="display:none">点击下载打印组件</a>
  7332. <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>
  7333. <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>
  7334. <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>
  7335. </div>
  7336. <script>$('.toolbar').authorizeButton()</script>
  7337. </div>
  7338. <div class="search">
  7339. <table>
  7340. <tr>
  7341. <td class="POCodeShow" style="text-align:right;"><label class="lglabel " id="POCodeShowLable" for="txt_POCode">&nbsp;&nbsp;&nbsp;&nbsp;</label>:</td>
  7342. <td class="POCodeShow">
  7343. <div class="input-group">
  7344. <input id="txt_POCode" type="text" class="form-control" style="width: 130px;">
  7345. </div>
  7346. </td>
  7347. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenCode">&nbsp;&nbsp;&nbsp;&nbsp;供应商代码</label>:</td>
  7348. <td class="HideItems">
  7349. <div class="input-group HideItems">
  7350. <input id="txt_VenCode" type="text" class="form-control HideItems" style="width: 130px;">
  7351. </div>
  7352. </td>
  7353. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;供应商名称</label>:</td>
  7354. <td class="HideItems">
  7355. <div class="input-group HideItems">
  7356. <input id="txt_VenName" type="text" class="form-control HideItems" style="width: 130px;">
  7357. </div>
  7358. </td>
  7359. <td class="HideItems2" style="text-align:right;"><label class="lglabel HideItems2" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;源头单据号</label>:</td>
  7360. <td class="HideItems2">
  7361. <div class="input-group HideItems2">
  7362. <input id="txt_SCode" type="text" class="form-control HideItems2" style="width: 130px;">
  7363. </div>
  7364. </td>
  7365. <td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;日期(从)</label>:</td>
  7366. <td class="HideItemsTime">
  7367. <div class="input-group HideItemsTime">
  7368. <input id="FromTime" name="FromTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(从)" />
  7369. </div>
  7370. </td>
  7371. <td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;日期(到)</label>:</td>
  7372. <td class="HideItemsTime">
  7373. <div class="input-group HideItemsTime">
  7374. <input id="ToTime" name="ToTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(到)" />
  7375. </div>
  7376. </td>
  7377. </tr>
  7378. <tr>
  7379. <td style="text-align:right;"><label class="lglabel" for="txt_InvCode">&nbsp;&nbsp;&nbsp;&nbsp;料品编码</label>:</td>
  7380. <td>
  7381. <div class="input-group">
  7382. <input id="txt_InvCode" type="text" class="form-control" style="width: 130px;">
  7383. </div>
  7384. </td>
  7385. <td style="text-align:right;"><label class="lglabel" for="txt_InvName">&nbsp;&nbsp;&nbsp;&nbsp;料品名称</label>:</td>
  7386. <td>
  7387. <div class="input-group">
  7388. <input id="txt_InvName" type="text" class="form-control" style="width: 130px;">
  7389. </div>
  7390. </td>
  7391. <td class="HideItemsSupprotCode" style="text-align:right;"><label class="lglabel HideItemsSupprotCode" for="txt_SupportCode">&nbsp;&nbsp;&nbsp;&nbsp;助记码</label>:</td>
  7392. <td class="HideItemsSupprotCode">
  7393. <div class="input-group HideItemsSupprotCode">
  7394. <input id="txt_SupportCode" type="text" class="form-control HideItemsSupprotCode" style="width: 130px;">
  7395. </div>
  7396. </td>
  7397. <td class="HideInvSTD" style="text-align:right;"><label class="lglabel HideInvSTD" for="txt_InvStd">&nbsp;&nbsp;&nbsp;&nbsp;规格型号</label>:</td>
  7398. <td class="HideInvSTD">
  7399. <div class="input-group HideInvSTD">
  7400. <input id="txt_InvStd" type="text" class="form-control" style="width: 130px;">
  7401. </div>
  7402. </td>
  7403. <td style="text-align:right;"><label class="lglabel" for="txt_BatchCode">&nbsp;&nbsp;&nbsp;&nbsp;批次号</label>:</td>
  7404. <td>
  7405. <div class="input-group">
  7406. <input id="txt_BatchCode" type="text" class="form-control" style="width: 130px;">
  7407. </div>
  7408. </td>
  7409. <td class="HideCreater" style="text-align:right;"><label class="lglabel HideCreater" for="txt_Creater">&nbsp;&nbsp;&nbsp;&nbsp;创建人</label>:</td>
  7410. <td class="HideCreater">
  7411. <div class="input-group HideCreater">
  7412. <input id="txt_Creater" type="text" class="form-control" style="width: 130px;">
  7413. </div>
  7414. </td>
  7415. <td id="GDLX">
  7416. <label>&nbsp;&nbsp;&nbsp;工单类型:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7417. </td>
  7418. <td id="GDLX2">
  7419. <div class="input-group">
  7420. <select id="SelGDLX" name="SelShow" class="form-control" style="width: 130px;">
  7421. </select>
  7422. </div>
  7423. </td>
  7424. </tr>
  7425. <tr>
  7426. <td class="HideWH" style="text-align:right;">
  7427. <label>&nbsp;&nbsp;&nbsp;仓库编码:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7428. </td>
  7429. <td class="HideWH">
  7430. <div class="input-group HideWH">
  7431. <input id="txt_WHCode" type="text" class="form-control HideWH" style="width: 130px;">
  7432. </div>
  7433. </td>
  7434. <td>
  7435. <label>&nbsp;&nbsp;&nbsp;是否全部生成:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7436. </td>
  7437. <td>
  7438. <div class="input-group">
  7439. <select id="selShow" name="F_Target" class="form-control" style="width: 130px;">
  7440. <option value="0">显示全部</option>
  7441. <option value="1">已全部生成</option>
  7442. <option value="2" selected="selected">未全部生成</option>
  7443. </select>
  7444. </div>
  7445. </td>
  7446. <td clsaa="Status">
  7447. <label>&nbsp;&nbsp;&nbsp;是否全部入库:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7448. </td>
  7449. <td clsaa="Status">
  7450. <div class="input-group">
  7451. <select id="selStatus" name="F_Target" class="form-control" style="width: 130px;">
  7452. <option value="0">全部</option>
  7453. <option value="1" selected="selected">未全部入库</option>
  7454. <option value="2">已全部入库</option>
  7455. </select>
  7456. </div>
  7457. </td>
  7458. <td class="HideItems3">
  7459. <label>&nbsp;&nbsp;&nbsp;条码是否打印:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  7460. </td>
  7461. <td class="HideItems3">
  7462. <div class="input-group HideItems3">
  7463. <select id="selPrint" name="selPrint" class="form-control HideItems3" style="width: 130px;">
  7464. <option value="0">显示全部</option>
  7465. <option value="1">已打印</option>
  7466. <option value="2" selected="selected">未打印</option>
  7467. </select>
  7468. </div>
  7469. </td>
  7470. <td>
  7471. <span class="input-group-btn">
  7472. <button id="btn_search" type="button" class="btn btn-primary"><i class="fa fa-search"></i></button>
  7473. </span>
  7474. </td>
  7475. </tr>
  7476. </table>
  7477. </div>
  7478. </div>
  7479. <div class="gridPanel">
  7480. <table id="gridList"></table>
  7481. <div id="gridPager"></div>
  7482. </div>