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.

5047 lines
261 KiB

3 weeks ago
  1. @{
  2. ViewBag.Title = "Index";
  3. Layout = "~/Views/Shared/_Index.cshtml";
  4. }
  5. <link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
  6. <link href="~/Content/css/bootstrap/bootstrap-select.css" rel="stylesheet" />
  7. <script src="~/Content/js/datepicker/WdatePicker.js"></script>
  8. <script src="~/Content/js/bootstrap/bootstrap-select.js"></script>
  9. <script src="~/Content/js/select2/select2.min.js"></script>
  10. <script src="~/Content/js/layer/layer.js"></script>
  11. <script>
  12. debugger;
  13. var _Clos = new Array();
  14. var _MenuID = "";//菜单ID
  15. var Type = $.request("Type");
  16. var mold= $.request("mold");
  17. var Name = "单据号";
  18. var ColModelMain = [];
  19. var ColModelSub = [];
  20. var Mtime = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();
  21. $(function () {
  22. GetMenuID();
  23. SetCols();
  24. $("#TimeFrom").val(Mtime);
  25. if (Type != '13' && Type != '9') {
  26. $(".HideItems2").css('display', 'none');
  27. }
  28. if (Type != '13') {
  29. $(".HideItems4").css('display', 'none');
  30. $(".HideItems5").css('display', 'none');
  31. $(".HideTxt2").css('display', 'none');
  32. }
  33. if (Type == '17') {
  34. Name = "条码号";
  35. $("#POCodeShowLable").text(Name);
  36. } else {
  37. $("#POCodeShowLable").text(Name);
  38. }
  39. if (Type!='3') {
  40. $("#GDLX").css('display', 'none');
  41. $("#GDLX2").css('display', 'none');
  42. }
  43. if (Type != '4')
  44. {
  45. $(".HideTxt").css('display', 'none');
  46. $(".HideItems6").css('display', 'none');
  47. }
  48. if (Type == '1' || Type == '2' || Type == '3' || Type == '4' || Type == '5' || Type == '6' || Type == '9' || Type == '17') {
  49. $(".HideItems").css('display', 'none');
  50. }
  51. if ( Type != '5') {
  52. $(".HideItems3").css('display', 'none');
  53. }
  54. if (Type == '1') {
  55. gridList();
  56. }
  57. if (Type == '2') {
  58. gridList2();
  59. }
  60. if (Type == '3') {
  61. $(".GDLX").css('display', 'block');
  62. Select_SelGDLX();
  63. gridList3();
  64. }
  65. if (Type == '4') {
  66. gridList4();
  67. }
  68. if (Type == '5') {
  69. gridList5();
  70. }
  71. if (Type == '6') {
  72. gridList6();
  73. }
  74. //审核到货单生成条码
  75. if (Type == '7') {
  76. gridList7();
  77. }
  78. //审核委外到货单生成条码
  79. if (Type == '8') {
  80. gridList8();
  81. }
  82. //开立成品入库单生成条码
  83. if (Type == '9') {
  84. gridList9();
  85. }
  86. //审核拒收单生成条码
  87. if (Type == '10') {
  88. gridList10();
  89. }
  90. //审核委外拒收单生成条码
  91. if (Type == '11') {
  92. gridList11();
  93. }
  94. //领料申请退料生成条码
  95. if (Type == '12') {
  96. gridList12();
  97. }
  98. //材料出库退料生成条码
  99. if (Type == '13') {
  100. gridList13();
  101. }
  102. //委外领料申请退料生成条码
  103. if (Type == '14') {
  104. gridList14();
  105. }
  106. //委外材料出库退料生成条码
  107. if (Type == '15') {
  108. gridList15();
  109. }
  110. //返工工单
  111. if (Type == '16') {
  112. gridList16();
  113. }
  114. //不合格条码入库
  115. if (Type == '17') {
  116. gridList17();
  117. }
  118. //副产品
  119. if (Type == '18') {
  120. gridList18();
  121. }
  122. //生产订单
  123. if (Type == '19') {
  124. gridList19();
  125. }
  126. })
  127. //1、获取当前页菜单ID
  128. function GetMenuID() {
  129. var cc = self.frameElement.getAttribute('id');
  130. _MenuID = cc.replace("iframe", "");
  131. }
  132. function SetCols() {
  133. $.ajax({
  134. url: "/Print/SelectColumnName?" + Math.random(),
  135. dataType: "json",
  136. async: false,
  137. success: function (data) {
  138. var cols = new Array();
  139. var cols1 = new Array();
  140. if (Type == '1') {
  141. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  142. cols.push(collast);
  143. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  144. cols.push(collast);
  145. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  146. cols.push(collast);
  147. var collast = { label: '工单子件', name: 'SourceDetailID', hidden: true, };
  148. cols.push(collast);
  149. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  150. cols.push(collast);
  151. var collast = { label: '料品编码', name: 'InvName', width: 60, align: 'left', };
  152. cols.push(collast);
  153. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  154. cols.push(collast);
  155. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  156. cols.push(collast);
  157. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  158. cols.push(collast);
  159. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  160. cols.push(collast);
  161. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  162. cols.push(collast);
  163. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  164. //cols.push(collast);
  165. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  166. cols.push(collast);
  167. var collast = { label: '工单号', name: 'MOCode', width: 60, align: 'left', };
  168. cols.push(collast);
  169. var collast = { label: '创建日期', name: 'MTIME', width: 60, align: 'left', };
  170. cols.push(collast);
  171. $.ajax({
  172. url: "/Print/SelectTableColumnName?" + Math.random(),
  173. dataType: "json",
  174. async: false,
  175. success: function (data) {
  176. if (data != null && data.length > 0) {
  177. DateList = data;
  178. for (var i = 0; i < data.length; i++) {
  179. var TableCode = data[i].TableCode;
  180. if (TableCode == "ICSMOPick") {
  181. var Code = data[i].Code;
  182. var Name = data[i].Name;
  183. var obj = new Array();
  184. obj = {
  185. label: Name,
  186. name: Code,
  187. width: 80,
  188. align: "left"
  189. }
  190. cols.push(obj);
  191. }
  192. if (TableCode == "ICSInventory") {
  193. var Code = data[i].Code;
  194. var Name = data[i].Name;
  195. var obj = new Array();
  196. obj = {
  197. label: Name,
  198. name: Code,
  199. width: 80,
  200. align: "left"
  201. }
  202. cols.push(obj);
  203. //cols1.push(obj);
  204. }
  205. }
  206. }
  207. _Clos = cols;
  208. //_Clos1 = cols1;
  209. }
  210. });
  211. }
  212. if (Type == '2') {
  213. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  214. cols.push(collast);
  215. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  216. cols.push(collast);
  217. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  218. cols.push(collast);
  219. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  220. cols.push(collast);
  221. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  222. cols.push(collast);
  223. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  224. cols.push(collast);
  225. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  226. cols.push(collast);
  227. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  228. cols.push(collast);
  229. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  230. cols.push(collast);
  231. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  232. cols.push(collast);
  233. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  234. cols.push(collast);
  235. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  236. //cols.push(collast);
  237. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  238. cols.push(collast);
  239. var collast = { label: '来源单据', name: 'SourceCode', width: 60, align: 'left', hidden: true };
  240. cols.push(collast);
  241. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  242. //cols.push(collast);
  243. $.ajax({
  244. url: "/Print/SelectTableColumnName?" + Math.random(),
  245. dataType: "json",
  246. async: false,
  247. success: function (data) {
  248. if (data != null && data.length > 0) {
  249. DateList = data;
  250. for (var i = 0; i < data.length; i++) {
  251. var TableCode = data[i].TableCode;
  252. if (TableCode == "ICSOApplyNegDetail") {
  253. var Code = data[i].Code;
  254. var Name = data[i].Name;
  255. var obj = new Array();
  256. obj = {
  257. label: Name,
  258. name: Code,
  259. width: 80,
  260. align: "left"
  261. }
  262. cols.push(obj);
  263. }
  264. if (TableCode == "ICSInventory") {
  265. var Code = data[i].Code;
  266. var Name = data[i].Name;
  267. var obj = new Array();
  268. obj = {
  269. label: Name,
  270. name: Code,
  271. width: 80,
  272. align: "left"
  273. }
  274. cols.push(obj);
  275. //cols1.push(obj);
  276. }
  277. }
  278. }
  279. _Clos = cols;
  280. //_Clos1 = cols1;
  281. }
  282. });
  283. }
  284. if (Type == '3') {
  285. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  286. cols.push(collast);
  287. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  288. cols.push(collast);
  289. var collast = { label: '工单行号', name: 'Sequence', width: 50, align: 'left' };
  290. cols.push(collast);
  291. var collast = { label: 'ERP工单行ID', name: 'MODetailID', hidden: true };
  292. cols.push(collast);
  293. var collast = { label: '已入库数量', name: 'RCVQuantity', hidden: true, };
  294. cols.push(collast);
  295. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  296. cols.push(collast);
  297. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  298. cols.push(collast);
  299. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  300. cols.push(collast);
  301. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  302. cols.push(collast);
  303. var collast = { label: '工单部门', name: 'DepName', width: 100, align: 'left' };
  304. cols.push(collast);
  305. var collast = { label: '工单创建日期', name: 'CreateDateTime', width: 60, align: 'left', };
  306. cols.push(collast);
  307. var collast = {
  308. label: "状态", name: "MOStatus", width: 60, align: "left",
  309. formatter: function (cellvalue) {
  310. if (cellvalue == "1") {
  311. return "初始";
  312. } else if (cellvalue == "2") {
  313. return "下发";
  314. }
  315. else if (cellvalue == "3") {
  316. return "关单";
  317. }
  318. else { return ""; }
  319. }
  320. };
  321. cols.push(collast);
  322. var collast = { label: 'erp状态', name: 'ERPStatus', width: 60, align: 'left', };
  323. cols.push(collast);
  324. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  325. cols.push(collast);
  326. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  327. cols.push(collast);
  328. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  329. //cols.push(collast);
  330. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  331. cols.push(collast);
  332. var collast = { label: '可入库数量', name: 'ERPNum', width: 100, align: 'left' };
  333. cols.push(collast);
  334. var collast = { label: '工单备注', name: 'MOMemo', width: 100, align: 'left' };
  335. cols.push(collast);
  336. $.ajax({
  337. url: "/Print/SelectTableColumnName?" + Math.random(),
  338. dataType: "json",
  339. async: false,
  340. success: function (data) {
  341. if (data != null && data.length > 0) {
  342. DateList = data;
  343. for (var i = 0; i < data.length; i++) {
  344. var TableCode = data[i].TableCode;
  345. if (TableCode == "ICSMO") {
  346. var Code = data[i].Code;
  347. var Name = data[i].Name;
  348. var obj = new Array();
  349. obj = {
  350. label: Name,
  351. name: Code,
  352. width: 80,
  353. align: "left"
  354. }
  355. cols.push(obj);
  356. }
  357. if (TableCode == "ICSInventory") {
  358. var Code = data[i].Code;
  359. var Name = data[i].Name;
  360. var obj = new Array();
  361. obj = {
  362. label: Name,
  363. name: Code,
  364. width: 80,
  365. align: "left"
  366. }
  367. cols.push(obj);
  368. //cols1.push(obj);
  369. }
  370. }
  371. }
  372. _Clos = cols;
  373. //_Clos1 = cols1;
  374. }
  375. });
  376. }
  377. if (Type == '4') {
  378. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  379. cols.push(collast);
  380. var collast = { label: '单据号', name: 'SDNCode', width: 120, align: 'left' };
  381. cols.push(collast);
  382. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  383. cols.push(collast);
  384. var collast = { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' };
  385. cols.push(collast);
  386. var collast = { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' };
  387. cols.push(collast);
  388. var collast = { label: '客户代码', name: 'CusCode', width: 120, align: 'left' };
  389. cols.push(collast);
  390. var collast = { label: '客户名称', name: 'CusName', width: 50, align: 'left' };
  391. cols.push(collast);
  392. var collast = { label: '退货日期', name: 'ArriveDate', width: 150, align: 'left' };
  393. cols.push(collast);
  394. var collast = { label: '已入数量', name: 'SDNQuantity', width: 50, align: 'left' };
  395. cols.push(collast);
  396. var collast = { label: '仓库编码', name: 'WHCode', width: 100, align: 'left' };
  397. cols.push(collast);
  398. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  399. cols.push(collast);
  400. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  401. cols.push(collast);
  402. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  403. cols.push(collast);
  404. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  405. cols.push(collast);
  406. var collast = {
  407. label: "状态", name: "Status", width: 60, align: "left",
  408. formatter: function (cellvalue) {
  409. if (cellvalue == "1") {
  410. return "开立";
  411. } else if (cellvalue == "2") {
  412. return "审核";
  413. }
  414. else if (cellvalue == "3") {
  415. return "关闭";
  416. }
  417. else { return ""; }
  418. }
  419. };
  420. cols.push(collast);
  421. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  422. cols.push(collast);
  423. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  424. cols.push(collast);
  425. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  426. //cols.push(collast);
  427. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  428. cols.push(collast);
  429. $.ajax({
  430. url: "/Print/SelectTableColumnName?" + Math.random(),
  431. dataType: "json",
  432. async: false,
  433. success: function (data) {
  434. if (data != null && data.length > 0) {
  435. DateList = data;
  436. for (var i = 0; i < data.length; i++) {
  437. var TableCode = data[i].TableCode;
  438. if (TableCode == "ICSSDN") {
  439. var Code = data[i].Code;
  440. var Name = data[i].Name;
  441. var obj = new Array();
  442. obj = {
  443. label: Name,
  444. name: Code,
  445. width: 80,
  446. align: "left"
  447. }
  448. cols.push(obj);
  449. }
  450. if (TableCode == "ICSInventory") {
  451. var Code = data[i].Code;
  452. var Name = data[i].Name;
  453. var obj = new Array();
  454. obj = {
  455. label: Name,
  456. name: Code,
  457. width: 80,
  458. align: "left"
  459. }
  460. cols.push(obj);
  461. //cols1.push(obj);
  462. }
  463. }
  464. }
  465. _Clos = cols;
  466. //_Clos1 = cols1;
  467. }
  468. });
  469. }
  470. if (Type == '5') {
  471. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  472. cols.push(collast);
  473. var collast = { label: '单据号', name: 'InCode', width: 120, align: 'left' };
  474. cols.push(collast);
  475. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  476. cols.push(collast);
  477. var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' };
  478. cols.push(collast);
  479. var collast = { label: '料品编码', name: 'InvCode', width: 50, align: 'left' };
  480. cols.push(collast);
  481. var collast = { label: '料品名称', name: 'InvName', width: 120, align: 'left' };
  482. cols.push(collast);
  483. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  484. cols.push(collast);
  485. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left' };
  486. cols.push(collast);
  487. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  488. cols.push(collast);
  489. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  490. cols.push(collast);
  491. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  492. cols.push(collast);
  493. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  494. cols.push(collast);
  495. var collast = { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', };
  496. cols.push(collast);
  497. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  498. cols.push(collast);
  499. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  500. cols.push(collast);
  501. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  502. //cols.push(collast);
  503. $.ajax({
  504. url: "/Print/SelectTableColumnName?" + Math.random(),
  505. dataType: "json",
  506. async: false,
  507. success: function (data) {
  508. if (data != null && data.length > 0) {
  509. DateList = data;
  510. for (var i = 0; i < data.length; i++) {
  511. var TableCode = data[i].TableCode;
  512. if (TableCode == "ICSOtherIn") {
  513. var Code = data[i].Code;
  514. var Name = data[i].Name;
  515. var obj = new Array();
  516. obj = {
  517. label: Name,
  518. name: Code,
  519. width: 80,
  520. align: "left"
  521. }
  522. cols.push(obj);
  523. }
  524. if (TableCode == "ICSInventory") {
  525. var Code = data[i].Code;
  526. var Name = data[i].Name;
  527. var obj = new Array();
  528. obj = {
  529. label: Name,
  530. name: Code,
  531. width: 80,
  532. align: "left"
  533. }
  534. cols.push(obj);
  535. //cols1.push(obj);
  536. }
  537. }
  538. }
  539. _Clos = cols;
  540. //_Clos1 = cols1;
  541. }
  542. });
  543. }
  544. if (Type == '6') {
  545. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  546. cols.push(collast);
  547. var collast = { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' };
  548. cols.push(collast);
  549. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  550. cols.push(collast);
  551. var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' };
  552. cols.push(collast);
  553. var collast = { label: '料品编码', name: 'InvCode', width: 50, align: 'left' };
  554. cols.push(collast);
  555. var collast = { label: '料品名称', name: 'InvName', width: 120, align: 'left' };
  556. cols.push(collast);
  557. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  558. cols.push(collast);
  559. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left' };
  560. cols.push(collast);
  561. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  562. cols.push(collast);
  563. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  564. cols.push(collast);
  565. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  566. cols.push(collast);
  567. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  568. cols.push(collast);
  569. var collast = { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', };
  570. cols.push(collast);
  571. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  572. cols.push(collast);
  573. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  574. cols.push(collast);
  575. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  576. //cols.push(collast);
  577. $.ajax({
  578. url: "/Print/SelectTableColumnName?" + Math.random(),
  579. dataType: "json",
  580. async: false,
  581. success: function (data) {
  582. if (data != null && data.length > 0) {
  583. DateList = data;
  584. for (var i = 0; i < data.length; i++) {
  585. var TableCode = data[i].TableCode;
  586. if (TableCode == "ICSReturn") {
  587. var Code = data[i].Code;
  588. var Name = data[i].Name;
  589. var obj = new Array();
  590. obj = {
  591. label: Name,
  592. name: Code,
  593. width: 80,
  594. align: "left"
  595. }
  596. cols.push(obj);
  597. }
  598. if (TableCode == "ICSInventory") {
  599. var Code = data[i].Code;
  600. var Name = data[i].Name;
  601. var obj = new Array();
  602. obj = {
  603. label: Name,
  604. name: Code,
  605. width: 80,
  606. align: "left"
  607. }
  608. cols.push(obj);
  609. //cols1.push(obj);
  610. }
  611. }
  612. }
  613. _Clos = cols;
  614. //_Clos1 = cols1;
  615. }
  616. });
  617. }
  618. //审核到货单生成条码
  619. if (Type == '7') {
  620. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  621. cols.push(collast);
  622. var collast = { label: '单据号', name: 'DNCode', width: 120, align: 'left' };
  623. cols.push(collast);
  624. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  625. cols.push(collast);
  626. var collast = { label: '采购订单号', name: 'POCode', width: 50, align: 'left' };
  627. cols.push(collast);
  628. var collast = { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' };
  629. cols.push(collast);
  630. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  631. cols.push(collast);
  632. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  633. cols.push(collast);
  634. var collast = { label: '料品编码', name: 'InvCode', width: 50, align: 'left' };
  635. cols.push(collast);
  636. var collast = { label: '料品名称', name: 'InvName', width: 120, align: 'left' };
  637. cols.push(collast);
  638. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  639. cols.push(collast);
  640. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left' };
  641. cols.push(collast);
  642. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  643. cols.push(collast);
  644. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  645. cols.push(collast);
  646. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  647. //cols.push(collast);
  648. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  649. cols.push(collast);
  650. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  651. cols.push(collast);
  652. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  653. cols.push(collast);
  654. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  655. cols.push(collast);
  656. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  657. cols.push(collast);
  658. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  659. cols.push(collast);
  660. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  661. cols.push(collast);
  662. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  663. cols.push(collast);
  664. $.ajax({
  665. url: "/Print/SelectTableColumnName?" + Math.random(),
  666. dataType: "json",
  667. async: false,
  668. success: function (data) {
  669. if (data != null && data.length > 0) {
  670. DateList = data;
  671. for (var i = 0; i < data.length; i++) {
  672. var TableCode = data[i].TableCode;
  673. if (TableCode == "ICSDeliveryNotice") {
  674. debugger;
  675. var Code = data[i].Code;
  676. var Name = data[i].Name;
  677. var obj = new Array();
  678. obj = {
  679. label: Name,
  680. name: Code,
  681. width: 80,
  682. align: "left"
  683. }
  684. cols.push(obj);
  685. }
  686. if (TableCode == "ICSInventory") {
  687. var Code = data[i].Code;
  688. var Name = data[i].Name;
  689. var obj = new Array();
  690. obj = {
  691. label: Name,
  692. name: Code,
  693. width: 80,
  694. align: "left"
  695. }
  696. cols.push(obj);
  697. //cols1.push(obj);
  698. }
  699. }
  700. }
  701. _Clos = cols;
  702. //_Clos1 = cols1;
  703. }
  704. });
  705. }
  706. //审核委外到货单生成条码
  707. if (Type == '8') {
  708. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  709. cols.push(collast);
  710. var collast = { label: '单据号', name: 'ODNCode', width: 120, align: 'left' };
  711. cols.push(collast);
  712. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  713. cols.push(collast);
  714. var collast = { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' };
  715. cols.push(collast);
  716. var collast = { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' };
  717. cols.push(collast);
  718. var collast = { label: '委外订单表体ID', name: 'OODetailID', hidden: true };
  719. cols.push(collast);
  720. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  721. cols.push(collast);
  722. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  723. cols.push(collast);
  724. var collast = { label: '料品编码', name: 'InvCode', width: 50, align: 'left' };
  725. cols.push(collast);
  726. var collast = { label: '料品名称', name: 'InvName', width: 120, align: 'left' };
  727. cols.push(collast);
  728. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  729. cols.push(collast);
  730. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left' };
  731. cols.push(collast);
  732. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  733. cols.push(collast);
  734. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  735. cols.push(collast);
  736. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  737. //cols.push(collast);
  738. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  739. cols.push(collast);
  740. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  741. cols.push(collast);
  742. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  743. cols.push(collast);
  744. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  745. cols.push(collast);
  746. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  747. cols.push(collast);
  748. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  749. cols.push(collast);
  750. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  751. cols.push(collast);
  752. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  753. cols.push(collast);
  754. $.ajax({
  755. url: "/Print/SelectTableColumnName?" + Math.random(),
  756. dataType: "json",
  757. async: false,
  758. success: function (data) {
  759. if (data != null && data.length > 0) {
  760. DateList = data;
  761. for (var i = 0; i < data.length; i++) {
  762. var TableCode = data[i].TableCode;
  763. if (TableCode == "ICSODeliveryNotice") {
  764. var Code = data[i].Code;
  765. var Name = data[i].Name;
  766. var obj = new Array();
  767. obj = {
  768. label: Name,
  769. name: Code,
  770. width: 80,
  771. align: "left"
  772. }
  773. cols.push(obj);
  774. }
  775. if (TableCode == "ICSInventory") {
  776. var Code = data[i].Code;
  777. var Name = data[i].Name;
  778. var obj = new Array();
  779. obj = {
  780. label: Name,
  781. name: Code,
  782. width: 80,
  783. align: "left"
  784. }
  785. cols.push(obj);
  786. //cols1.push(obj);
  787. }
  788. }
  789. }
  790. _Clos = cols;
  791. //_Clos1 = cols1;
  792. }
  793. });
  794. }
  795. //开立成品入库单生成条码
  796. if (Type == '9') {
  797. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  798. cols.push(collast);
  799. var collast = { label: '单据号', name: 'RCVCode', width: 120, align: 'left' };
  800. cols.push(collast);
  801. var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' };
  802. cols.push(collast);
  803. var collast = { label: '源头单据号', name: 'MOCode', width: 50, align: 'left' };
  804. cols.push(collast);
  805. var collast = { label: '仓库号', name: 'WHCode', width: 120, align: 'left' };
  806. cols.push(collast);
  807. var collast = { label: '料品编码', name: 'InvCode', width: 50, align: 'left' };
  808. cols.push(collast);
  809. var collast = { label: '料品名称', name: 'InvName', width: 120, align: 'left' };
  810. cols.push(collast);
  811. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  812. cols.push(collast);
  813. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left' };
  814. cols.push(collast);
  815. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  816. cols.push(collast);
  817. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  818. cols.push(collast);
  819. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  820. //cols.push(collast);
  821. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  822. cols.push(collast);
  823. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  824. cols.push(collast);
  825. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  826. cols.push(collast);
  827. var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', };
  828. cols.push(collast);
  829. var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', };
  830. cols.push(collast);
  831. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  832. cols.push(collast);
  833. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  834. cols.push(collast);
  835. $.ajax({
  836. url: "/Print/SelectTableColumnName?" + Math.random(),
  837. dataType: "json",
  838. async: false,
  839. success: function (data) {
  840. if (data != null && data.length > 0) {
  841. DateList = data;
  842. for (var i = 0; i < data.length; i++) {
  843. var TableCode = data[i].TableCode;
  844. if (TableCode == "ICSMO") {
  845. var Code = data[i].Code;
  846. var Name = data[i].Name;
  847. var obj = new Array();
  848. obj = {
  849. label: Name,
  850. name: Code,
  851. width: 80,
  852. align: "left"
  853. }
  854. cols.push(obj);
  855. }
  856. if (TableCode == "ICSInventory") {
  857. var Code = data[i].Code;
  858. var Name = data[i].Name;
  859. var obj = new Array();
  860. obj = {
  861. label: Name,
  862. name: Code,
  863. width: 80,
  864. align: "left"
  865. }
  866. cols.push(obj);
  867. //cols1.push(obj);
  868. }
  869. }
  870. }
  871. _Clos = cols;
  872. //_Clos1 = cols1;
  873. }
  874. });
  875. }
  876. //审核拒收单生成条码
  877. if (Type == '10') {
  878. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  879. cols.push(collast);
  880. var collast = { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' };
  881. cols.push(collast);
  882. var collast = { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' };
  883. cols.push(collast);
  884. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  885. cols.push(collast);
  886. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  887. cols.push(collast);
  888. var collast = { label: '料品编码', name: 'InvCode', width: 50, align: 'left' };
  889. cols.push(collast);
  890. var collast = { label: '料品名称', name: 'InvName', width: 120, align: 'left' };
  891. cols.push(collast);
  892. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  893. cols.push(collast);
  894. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left' };
  895. cols.push(collast);
  896. var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' };
  897. cols.push(collast);
  898. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  899. cols.push(collast);
  900. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  901. cols.push(collast);
  902. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  903. cols.push(collast);
  904. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  905. cols.push(collast);
  906. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  907. cols.push(collast);
  908. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  909. cols.push(collast);
  910. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  911. cols.push(collast);
  912. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  913. cols.push(collast);
  914. $.ajax({
  915. url: "/Print/SelectTableColumnName?" + Math.random(),
  916. dataType: "json",
  917. async: false,
  918. success: function (data) {
  919. if (data != null && data.length > 0) {
  920. DateList = data;
  921. for (var i = 0; i < data.length; i++) {
  922. var TableCode = data[i].TableCode;
  923. if (TableCode == "ICSDeliveryNotice") {
  924. var Code = data[i].Code;
  925. var Name = data[i].Name;
  926. var obj = new Array();
  927. obj = {
  928. label: Name,
  929. name: Code,
  930. width: 80,
  931. align: "left"
  932. }
  933. cols.push(obj);
  934. }
  935. if (TableCode == "ICSInventory") {
  936. var Code = data[i].Code;
  937. var Name = data[i].Name;
  938. var obj = new Array();
  939. obj = {
  940. label: Name,
  941. name: Code,
  942. width: 80,
  943. align: "left"
  944. }
  945. cols.push(obj);
  946. //cols1.push(obj);
  947. }
  948. }
  949. }
  950. _Clos = cols;
  951. //_Clos1 = cols1;
  952. }
  953. });
  954. }
  955. //审核委外拒收单生成条码
  956. if (Type == '11') {
  957. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  958. cols.push(collast);
  959. var collast = { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' };
  960. cols.push(collast);
  961. var collast = { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' };
  962. cols.push(collast);
  963. var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' };
  964. cols.push(collast);
  965. var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' };
  966. cols.push(collast);
  967. var collast = { label: '料品编码', name: 'InvCode', width: 50, align: 'left' };
  968. cols.push(collast);
  969. var collast = { label: '料品名称', name: 'InvName', width: 120, align: 'left' };
  970. cols.push(collast);
  971. var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' };
  972. cols.push(collast);
  973. var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left' };
  974. cols.push(collast);
  975. var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' };
  976. cols.push(collast);
  977. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  978. cols.push(collast);
  979. var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  980. cols.push(collast);
  981. var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' };
  982. cols.push(collast);
  983. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  984. cols.push(collast);
  985. var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', };
  986. cols.push(collast);
  987. var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', };
  988. cols.push(collast);
  989. var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', };
  990. cols.push(collast);
  991. var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
  992. cols.push(collast);
  993. $.ajax({
  994. url: "/Print/SelectTableColumnName?" + Math.random(),
  995. dataType: "json",
  996. async: false,
  997. success: function (data) {
  998. if (data != null && data.length > 0) {
  999. DateList = data;
  1000. for (var i = 0; i < data.length; i++) {
  1001. var TableCode = data[i].TableCode;
  1002. if (TableCode == "ICSODeliveryNotice") {
  1003. var Code = data[i].Code;
  1004. var Name = data[i].Name;
  1005. var obj = new Array();
  1006. obj = {
  1007. label: Name,
  1008. name: Code,
  1009. width: 80,
  1010. align: "left"
  1011. }
  1012. cols.push(obj);
  1013. }
  1014. if (TableCode == "ICSInventory") {
  1015. var Code = data[i].Code;
  1016. var Name = data[i].Name;
  1017. var obj = new Array();
  1018. obj = {
  1019. label: Name,
  1020. name: Code,
  1021. width: 80,
  1022. align: "left"
  1023. }
  1024. cols.push(obj);
  1025. //cols1.push(obj);
  1026. }
  1027. }
  1028. }
  1029. _Clos = cols;
  1030. //_Clos1 = cols1;
  1031. }
  1032. });
  1033. }
  1034. //领料申请退料生成条码
  1035. if (Type == '12') {
  1036. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1037. cols.push(collast);
  1038. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  1039. cols.push(collast);
  1040. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1041. cols.push(collast);
  1042. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  1043. cols.push(collast);
  1044. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  1045. cols.push(collast);
  1046. var collast = { label: '料品编码', name: 'InvName', width: 60, align: 'left', };
  1047. cols.push(collast);
  1048. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1049. cols.push(collast);
  1050. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1051. cols.push(collast);
  1052. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1053. cols.push(collast);
  1054. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  1055. cols.push(collast);
  1056. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1057. cols.push(collast);
  1058. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1059. //cols.push(collast);
  1060. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1061. cols.push(collast);
  1062. $.ajax({
  1063. url: "/Print/SelectTableColumnName?" + Math.random(),
  1064. dataType: "json",
  1065. async: false,
  1066. success: function (data) {
  1067. if (data != null && data.length > 0) {
  1068. DateList = data;
  1069. for (var i = 0; i < data.length; i++) {
  1070. var TableCode = data[i].TableCode;
  1071. if (TableCode == "ICSMOApplyNegDetail") {
  1072. var Code = data[i].Code;
  1073. var Name = data[i].Name;
  1074. var obj = new Array();
  1075. obj = {
  1076. label: Name,
  1077. name: Code,
  1078. width: 80,
  1079. align: "left"
  1080. }
  1081. cols.push(obj);
  1082. }
  1083. if (TableCode == "ICSInventory") {
  1084. var Code = data[i].Code;
  1085. var Name = data[i].Name;
  1086. var obj = new Array();
  1087. obj = {
  1088. label: Name,
  1089. name: Code,
  1090. width: 80,
  1091. align: "left"
  1092. }
  1093. cols.push(obj);
  1094. //cols1.push(obj);
  1095. }
  1096. }
  1097. }
  1098. _Clos = cols;
  1099. //_Clos1 = cols1;
  1100. }
  1101. });
  1102. }
  1103. //材料出库退料生成条码
  1104. if (Type == '13') {
  1105. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1106. cols.push(collast);
  1107. var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' };
  1108. cols.push(collast);
  1109. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1110. cols.push(collast);
  1111. var collast = { label: '源头单据号', name: 'SCode', width: 120, align: 'left' };
  1112. cols.push(collast);
  1113. var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
  1114. cols.push(collast);
  1115. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  1116. cols.push(collast);
  1117. var collast = { label: '料品编码', name: 'InvName', width: 60, align: 'left', };
  1118. cols.push(collast);
  1119. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1120. cols.push(collast);
  1121. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1122. cols.push(collast);
  1123. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1124. cols.push(collast);
  1125. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  1126. cols.push(collast);
  1127. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1128. cols.push(collast);
  1129. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1130. //cols.push(collast);
  1131. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1132. cols.push(collast);
  1133. var collast = { label: '工单号', name: 'SourceCode', width: 60, align: 'left', };
  1134. cols.push(collast);
  1135. }
  1136. //委外领料申请退料生成条码
  1137. if (Type == '14') {
  1138. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1139. cols.push(collast);
  1140. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  1141. cols.push(collast);
  1142. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1143. cols.push(collast);
  1144. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  1145. cols.push(collast);
  1146. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  1147. cols.push(collast);
  1148. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  1149. cols.push(collast);
  1150. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1151. cols.push(collast);
  1152. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1153. cols.push(collast);
  1154. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1155. cols.push(collast);
  1156. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  1157. cols.push(collast);
  1158. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1159. cols.push(collast);
  1160. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1161. //cols.push(collast);
  1162. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1163. cols.push(collast);
  1164. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1165. //cols.push(collast);
  1166. $.ajax({
  1167. url: "/Print/SelectTableColumnName?" + Math.random(),
  1168. dataType: "json",
  1169. async: false,
  1170. success: function (data) {
  1171. if (data != null && data.length > 0) {
  1172. DateList = data;
  1173. for (var i = 0; i < data.length; i++) {
  1174. var TableCode = data[i].TableCode;
  1175. if (TableCode == "ICSOApplyNegDetail") {
  1176. var Code = data[i].Code;
  1177. var Name = data[i].Name;
  1178. var obj = new Array();
  1179. obj = {
  1180. label: Name,
  1181. name: Code,
  1182. width: 80,
  1183. align: "left"
  1184. }
  1185. cols.push(obj);
  1186. }
  1187. if (TableCode == "ICSInventory") {
  1188. var Code = data[i].Code;
  1189. var Name = data[i].Name;
  1190. var obj = new Array();
  1191. obj = {
  1192. label: Name,
  1193. name: Code,
  1194. width: 80,
  1195. align: "left"
  1196. }
  1197. cols.push(obj);
  1198. //cols1.push(obj);
  1199. }
  1200. }
  1201. }
  1202. _Clos = cols;
  1203. //_Clos1 = cols1;
  1204. }
  1205. });
  1206. }
  1207. //委外材料出库退料生成条码
  1208. if (Type == '15') {
  1209. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1210. cols.push(collast);
  1211. var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' };
  1212. cols.push(collast);
  1213. var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' };
  1214. cols.push(collast);
  1215. var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, };
  1216. cols.push(collast);
  1217. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  1218. cols.push(collast);
  1219. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  1220. cols.push(collast);
  1221. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1222. cols.push(collast);
  1223. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1224. cols.push(collast);
  1225. var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
  1226. cols.push(collast);
  1227. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  1228. cols.push(collast);
  1229. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1230. cols.push(collast);
  1231. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1232. //cols.push(collast);
  1233. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1234. cols.push(collast);
  1235. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1236. //cols.push(collast);
  1237. $.ajax({
  1238. url: "/Print/SelectTableColumnName?" + Math.random(),
  1239. dataType: "json",
  1240. async: false,
  1241. success: function (data) {
  1242. if (data != null && data.length > 0) {
  1243. DateList = data;
  1244. for (var i = 0; i < data.length; i++) {
  1245. var TableCode = data[i].TableCode;
  1246. if (TableCode == "ICSOApplyNegDetail") {
  1247. var Code = data[i].Code;
  1248. var Name = data[i].Name;
  1249. var obj = new Array();
  1250. obj = {
  1251. label: Name,
  1252. name: Code,
  1253. width: 80,
  1254. align: "left"
  1255. }
  1256. cols.push(obj);
  1257. }
  1258. if (TableCode == "ICSInventory") {
  1259. var Code = data[i].Code;
  1260. var Name = data[i].Name;
  1261. var obj = new Array();
  1262. obj = {
  1263. label: Name,
  1264. name: Code,
  1265. width: 80,
  1266. align: "left"
  1267. }
  1268. cols.push(obj);
  1269. //cols1.push(obj);
  1270. }
  1271. }
  1272. }
  1273. _Clos = cols;
  1274. //_Clos1 = cols1;
  1275. }
  1276. });
  1277. }
  1278. //返工工单生成条码
  1279. if (Type == '16') {
  1280. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1281. cols.push(collast);
  1282. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  1283. cols.push(collast);
  1284. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  1285. cols.push(collast);
  1286. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  1287. cols.push(collast);
  1288. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  1289. cols.push(collast);
  1290. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  1291. cols.push(collast);
  1292. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1293. cols.push(collast);
  1294. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1295. cols.push(collast);
  1296. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  1297. cols.push(collast);
  1298. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  1299. cols.push(collast);
  1300. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1301. cols.push(collast);
  1302. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1303. //cols.push(collast);
  1304. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1305. cols.push(collast);
  1306. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1307. //cols.push(collast);
  1308. $.ajax({
  1309. url: "/Print/SelectTableColumnName?" + Math.random(),
  1310. dataType: "json",
  1311. async: false,
  1312. success: function (data) {
  1313. if (data != null && data.length > 0) {
  1314. DateList = data;
  1315. for (var i = 0; i < data.length; i++) {
  1316. var TableCode = data[i].TableCode;
  1317. if (TableCode == "ICSMOPick") {
  1318. var Code = data[i].Code;
  1319. var Name = data[i].Name;
  1320. var obj = new Array();
  1321. obj = {
  1322. label: Name,
  1323. name: Code,
  1324. width: 80,
  1325. align: "left"
  1326. }
  1327. cols.push(obj);
  1328. }
  1329. if (TableCode == "ICSInventory") {
  1330. var Code = data[i].Code;
  1331. var Name = data[i].Name;
  1332. var obj = new Array();
  1333. obj = {
  1334. label: Name,
  1335. name: Code,
  1336. width: 80,
  1337. align: "left"
  1338. }
  1339. cols.push(obj);
  1340. //cols1.push(obj);
  1341. }
  1342. }
  1343. }
  1344. _Clos = cols;
  1345. //_Clos1 = cols1;
  1346. }
  1347. });
  1348. }
  1349. //不合格条码生成条码
  1350. if (Type == '17') {
  1351. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1352. cols.push(collast);
  1353. var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' };
  1354. cols.push(collast);
  1355. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  1356. cols.push(collast);
  1357. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  1358. cols.push(collast);
  1359. var collast = { label: '不合格数量', name: 'Quantity', width: 100, align: 'left' };
  1360. cols.push(collast);
  1361. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1362. cols.push(collast);
  1363. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  1364. cols.push(collast);
  1365. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1366. cols.push(collast);
  1367. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1368. //cols.push(collast);
  1369. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1370. cols.push(collast);
  1371. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1372. //cols.push(collast);
  1373. $.ajax({
  1374. url: "/Print/SelectTableColumnName?" + Math.random(),
  1375. dataType: "json",
  1376. async: false,
  1377. success: function (data) {
  1378. if (data != null && data.length > 0) {
  1379. DateList = data;
  1380. for (var i = 0; i < data.length; i++) {
  1381. var TableCode = data[i].TableCode;
  1382. if (TableCode == "ICSInspection") {
  1383. var Code = data[i].Code;
  1384. var Name = data[i].Name;
  1385. var obj = new Array();
  1386. obj = {
  1387. label: Name,
  1388. name: Code,
  1389. width: 80,
  1390. align: "left"
  1391. }
  1392. cols.push(obj);
  1393. }
  1394. if (TableCode == "ICSInventory") {
  1395. var Code = data[i].Code;
  1396. var Name = data[i].Name;
  1397. var obj = new Array();
  1398. obj = {
  1399. label: Name,
  1400. name: Code,
  1401. width: 80,
  1402. align: "left"
  1403. }
  1404. cols.push(obj);
  1405. //cols1.push(obj);
  1406. }
  1407. }
  1408. }
  1409. _Clos = cols;
  1410. //_Clos1 = cols1;
  1411. }
  1412. });
  1413. }
  1414. //副产品生成条码
  1415. if (Type == '18') {
  1416. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1417. cols.push(collast);
  1418. var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' };
  1419. cols.push(collast);
  1420. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  1421. cols.push(collast);
  1422. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  1423. cols.push(collast);
  1424. var collast = { label: '料品编码(子)', name: 'ZInvCode', width: 100, align: 'left' };
  1425. cols.push(collast);
  1426. var collast = { label: '料品编码(母)', name: 'MInvCode', width: 100, align: 'left' };
  1427. cols.push(collast);
  1428. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  1429. cols.push(collast);
  1430. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1431. cols.push(collast);
  1432. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1433. cols.push(collast);
  1434. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  1435. cols.push(collast);
  1436. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  1437. cols.push(collast);
  1438. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1439. cols.push(collast);
  1440. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1441. //cols.push(collast);
  1442. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1443. cols.push(collast);
  1444. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  1445. //cols.push(collast);
  1446. $.ajax({
  1447. url: "/Print/SelectTableColumnName?" + Math.random(),
  1448. dataType: "json",
  1449. async: false,
  1450. success: function (data) {
  1451. if (data != null && data.length > 0) {
  1452. DateList = data;
  1453. for (var i = 0; i < data.length; i++) {
  1454. var TableCode = data[i].TableCode;
  1455. if (TableCode == "ICSMOPick") {
  1456. var Code = data[i].Code;
  1457. var Name = data[i].Name;
  1458. var obj = new Array();
  1459. obj = {
  1460. label: Name,
  1461. name: Code,
  1462. width: 80,
  1463. align: "left"
  1464. }
  1465. cols.push(obj);
  1466. }
  1467. if (TableCode == "ICSInventory") {
  1468. var Code = data[i].Code;
  1469. var Name = data[i].Name;
  1470. var obj = new Array();
  1471. obj = {
  1472. label: Name,
  1473. name: Code,
  1474. width: 80,
  1475. align: "left"
  1476. }
  1477. cols.push(obj);
  1478. //cols1.push(obj);
  1479. }
  1480. }
  1481. }
  1482. _Clos = cols;
  1483. //_Clos1 = cols1;
  1484. }
  1485. });
  1486. }
  1487. if (Type=='17') {
  1488. var cols1 = new Array();
  1489. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  1490. cols1.push(collast1);
  1491. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  1492. cols1.push(collast1);
  1493. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  1494. cols1.push(collast1);
  1495. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  1496. cols1.push(collast1);
  1497. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  1498. cols1.push(collast1);
  1499. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  1500. cols1.push(collast1);
  1501. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  1502. cols1.push(collast1);
  1503. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  1504. cols1.push(collast1);
  1505. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  1506. cols1.push(collast1);
  1507. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  1508. cols1.push(collast1);
  1509. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  1510. cols1.push(collast1);
  1511. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  1512. cols1.push(collast1);
  1513. }
  1514. //生产订单
  1515. if (Type == '19') {
  1516. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  1517. cols.push(collast);
  1518. var collast = { label: '生产订单号', name: 'MOCode', width: 120, align: 'left' };
  1519. cols.push(collast);
  1520. var collast = { label: '生产订单行号', name: 'Sequence', width: 100, align: 'left' };
  1521. cols.push(collast);
  1522. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  1523. cols.push(collast);
  1524. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  1525. cols.push(collast);
  1526. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  1527. cols.push(collast);
  1528. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  1529. cols.push(collast);
  1530. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  1531. cols.push(collast);
  1532. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  1533. cols.push(collast);
  1534. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  1535. cols.push(collast);
  1536. $.ajax({
  1537. url: "/Print/SelectTableColumnName?" + Math.random(),
  1538. dataType: "json",
  1539. async: false,
  1540. success: function (data) {
  1541. if (data != null && data.length > 0) {
  1542. DateList = data;
  1543. for (var i = 0; i < data.length; i++) {
  1544. var TableCode = data[i].TableCode;
  1545. if (TableCode == "ICSMO") {
  1546. var Code = data[i].Code;
  1547. var Name = data[i].Name;
  1548. var obj = new Array();
  1549. obj = {
  1550. label: Name,
  1551. name: Code,
  1552. width: 80,
  1553. align: "left"
  1554. }
  1555. cols.push(obj);
  1556. }
  1557. if (TableCode == "ICSInventory") {
  1558. var Code = data[i].Code;
  1559. var Name = data[i].Name;
  1560. var obj = new Array();
  1561. obj = {
  1562. label: Name,
  1563. name: Code,
  1564. width: 80,
  1565. align: "left"
  1566. }
  1567. cols.push(obj);
  1568. //cols1.push(obj);
  1569. }
  1570. }
  1571. }
  1572. _Clos = cols;
  1573. //_Clos1 = cols1;
  1574. }
  1575. });
  1576. }
  1577. else {
  1578. var cols1 = new Array();
  1579. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  1580. cols1.push(collast1);
  1581. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  1582. cols1.push(collast1);
  1583. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  1584. cols1.push(collast1);
  1585. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  1586. cols1.push(collast1);
  1587. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  1588. cols1.push(collast1);
  1589. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  1590. cols1.push(collast1);
  1591. var collast1 = { label: '炉批号', name: 'EATTRIBUTE4', width: 100, align: 'left' };
  1592. cols1.push(collast1);
  1593. var collast1 = { label: '备注', name: 'EATTRIBUTE5', width: 100, align: 'left' };
  1594. cols1.push(collast1);
  1595. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  1596. cols1.push(collast1);
  1597. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  1598. cols1.push(collast1);
  1599. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  1600. cols1.push(collast1);
  1601. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  1602. cols1.push(collast1);
  1603. var collast1 = { label: '是否检验', name: 'isInspection', width: 100, align: 'left' };
  1604. cols1.push(collast1);
  1605. var collast1 = { label: '是否免检', name: 'isExemption', width: 100, align: 'left' };
  1606. cols1.push(collast1);
  1607. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  1608. cols1.push(collast1);
  1609. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  1610. cols1.push(collast1);
  1611. }
  1612. if (data != null && data.length > 0) {
  1613. DateList = data;
  1614. for (var i = 0; i < data.length; i++) {
  1615. var ColName = data[i].ColName;
  1616. var ColCode = data[i].ColCode;
  1617. var obj = new Array();
  1618. obj = {
  1619. label: ColName,
  1620. name: ColCode,
  1621. width: 80,
  1622. align: "left"
  1623. }
  1624. cols.push(obj);
  1625. cols1.push(obj);
  1626. }
  1627. }
  1628. _Clos = cols;
  1629. _Clos1 = cols1;
  1630. }
  1631. });
  1632. }
  1633. //生产退料
  1634. function gridList() {
  1635. var $gridList = $("#gridList");
  1636. var queryJson = {
  1637. POCode: $("#txt_POCode").val(),
  1638. InvCode: $("#txt_InvCode").val(),
  1639. InvName: $("#txt_InvName").val(),
  1640. BatchCode: $("#txt_BatchCode").val(),
  1641. POStatus: $("#selShow").val()
  1642. }
  1643. $gridList.dataGrid({
  1644. url: "/DHAY/DHCreateItemLot/GetGridJson" + "?" + Math.random(),
  1645. postData: { queryJson: JSON.stringify(queryJson) },
  1646. height: $(window).height() - 200,
  1647. width: $(window).width() - 300,
  1648. colModel: _Clos,
  1649. //colModel: [
  1650. // { label: "主键", name: "ID", hidden: true, key: true },
  1651. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  1652. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  1653. // { label: '工单子件', name: 'SourceDetailID', hidden: true, },
  1654. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  1655. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  1656. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  1657. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  1658. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  1659. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  1660. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  1661. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1662. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  1663. //],
  1664. //colModel: ColModelMain,
  1665. width: "100%",
  1666. autowidth: true,
  1667. //shrinkToFit: true,
  1668. gridComplete: function () {
  1669. },
  1670. pager: "#gridPager",
  1671. sortname: " MTIME desc ,ApplyNegCode asc,REPLICATE('0',10-len(Sequence))+Sequence  ",
  1672. // sortname: 'ApplyNegCode ',
  1673. //let str = `He said, "It's a 'beautiful' day."`,
  1674. //sortorder: "asc",
  1675. viewrecords: true,
  1676. multiselect: true,
  1677. //beforeSelectRow: function (rowid, e) {
  1678. // $("#gridList").jqGrid('resetSelection');
  1679. // return (true);
  1680. //},
  1681. subGrid: true, // (1)开启子表格支持
  1682. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  1683. $("#gridList").jqGrid("setSelection", rowid, false);
  1684. bindSubGrid(subgrid_id, rowid)
  1685. }
  1686. });
  1687. $("#warehouse a.btn-default").click(function () {
  1688. $("#warehouse a.btn-default").removeClass("active");
  1689. $(this).addClass("active");
  1690. $('#btn_search').trigger("click");
  1691. });
  1692. $("#btn_search").click(function () {
  1693. var warehouse = $("#warehouse a.active").attr('data-value');
  1694. var queryJson = {
  1695. POCode: $("#txt_POCode").val(),
  1696. InvCode: $("#txt_InvCode").val(),
  1697. InvName: $("#txt_InvName").val(),
  1698. BatchCode: $("#txt_BatchCode").val(),
  1699. POStatus: $("#selShow").val()
  1700. }
  1701. $gridList.jqGrid('setGridParam', {
  1702. postData: { queryJson: JSON.stringify(queryJson) },
  1703. }).trigger('reloadGrid');
  1704. });
  1705. }
  1706. function bindSubGrid(subgrid_id, rowid) {
  1707. $("#gridList").jqGrid("setSelection", rowid, false);
  1708. var subgrid_table_id;
  1709. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  1710. var subgrid_pager_id;
  1711. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  1712. // (5)动态添加子报表的table和pager
  1713. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  1714. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  1715. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  1716. // (6)创建jqGrid对象
  1717. $("#" + subgrid_table_id).dataGrid({
  1718. cellEdit: true,
  1719. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  1720. //colModel: [
  1721. // { label: "主键", name: "ID", hidden: true, key: true },
  1722. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  1723. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  1724. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  1725. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  1726. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  1727. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  1728. //],
  1729. colModel: _Clos1,
  1730. //colModel: ColModelSub,
  1731. shrinkToFit: true,//宽度自适应
  1732. multiselect: true,
  1733. prmNames: { search: "search" },
  1734. viewrecords: true,
  1735. height: "100%",
  1736. rowNum: 20,
  1737. pager: subgrid_pager_id,
  1738. });
  1739. }
  1740. //委外退料
  1741. function gridList2() {
  1742. var $gridList = $("#gridList");
  1743. var queryJson = {
  1744. POCode: $("#txt_POCode").val(),
  1745. InvCode: $("#txt_InvCode").val(),
  1746. InvName: $("#txt_InvName").val(),
  1747. BatchCode: $("#txt_BatchCode").val(),
  1748. POStatus: $("#selShow").val()
  1749. }
  1750. $gridList.dataGrid({
  1751. url: "/DHAY/DHCreateItemLot/GetGridJsonWeiWai" + "?" + Math.random(),
  1752. postData: { queryJson: JSON.stringify(queryJson) },
  1753. height: $(window).height() - 200,
  1754. width: $(window).width() - 300,
  1755. colModel: _Clos,
  1756. //colModel: [
  1757. // { label: "主键", name: "ID", hidden: true, key: true },
  1758. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  1759. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  1760. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  1761. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  1762. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  1763. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  1764. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  1765. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  1766. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  1767. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  1768. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1769. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  1770. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1771. //],
  1772. //colModel: ColModelMain,
  1773. width: "100%",
  1774. autowidth: true,
  1775. //shrinkToFit: true,
  1776. gridComplete: function () {
  1777. },
  1778. pager: "#gridPager",
  1779. // sortname: 'OApplyNegCode,cast(Sequence as int)',
  1780. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  1781. sortorder: "asc",
  1782. viewrecords: true,
  1783. multiselect: true,
  1784. //beforeSelectRow: function (rowid, e) {
  1785. // $("#gridList").jqGrid('resetSelection');
  1786. // return (true);
  1787. //},
  1788. subGrid: true, // (1)开启子表格支持
  1789. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  1790. $("#gridList").jqGrid("setSelection", rowid, false);
  1791. bindSubGrid2(subgrid_id, rowid)
  1792. }
  1793. });
  1794. $("#warehouse a.btn-default").click(function () {
  1795. $("#warehouse a.btn-default").removeClass("active");
  1796. $(this).addClass("active");
  1797. $('#btn_search').trigger("click");
  1798. });
  1799. $("#btn_search").click(function () {
  1800. var warehouse = $("#warehouse a.active").attr('data-value');
  1801. var queryJson = {
  1802. POCode: $("#txt_POCode").val(),
  1803. InvCode: $("#txt_InvCode").val(),
  1804. InvName: $("#txt_InvName").val(),
  1805. BatchCode: $("#txt_BatchCode").val(),
  1806. POStatus: $("#selShow").val()
  1807. }
  1808. $gridList.jqGrid('setGridParam', {
  1809. postData: { queryJson: JSON.stringify(queryJson) },
  1810. }).trigger('reloadGrid');
  1811. });
  1812. }
  1813. function bindSubGrid2(subgrid_id, rowid) {
  1814. $("#gridList").jqGrid("setSelection", rowid, false);
  1815. var subgrid_table_id;
  1816. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  1817. var subgrid_pager_id;
  1818. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  1819. // (5)动态添加子报表的table和pager
  1820. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  1821. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  1822. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  1823. // (6)创建jqGrid对象
  1824. $("#" + subgrid_table_id).dataGrid({
  1825. cellEdit: true,
  1826. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  1827. //colModel: [
  1828. // { label: "主键", name: "ID", hidden: true, key: true },
  1829. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  1830. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  1831. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  1832. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  1833. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  1834. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  1835. //],
  1836. colModel: _Clos1,
  1837. //colModel: ColModelSub,
  1838. shrinkToFit: true,//宽度自适应
  1839. multiselect: true,
  1840. prmNames: { search: "search" },
  1841. viewrecords: true,
  1842. height: "100%",
  1843. rowNum: 20,
  1844. pager: subgrid_pager_id,
  1845. });
  1846. }
  1847. //成品
  1848. function gridList3() {
  1849. var $gridList = $("#gridList");
  1850. var queryJson = {
  1851. POCode: $("#txt_POCode").val(),
  1852. InvCode: $("#txt_InvCode").val(),
  1853. InvName: $("#txt_InvName").val(),
  1854. BatchCode: $("#txt_BatchCode").val(),
  1855. POStatus: $("#selShow").val(),
  1856. SelGDLX: $("#SelGDLX option:checked").val(),
  1857. }
  1858. $gridList.dataGrid({
  1859. url: "/DHAY/DHCreateItemLot/GetGridJsonChengPing" + "?" + Math.random(),
  1860. postData: { MenuID: _MenuID, queryJson: JSON.stringify(queryJson) },
  1861. height: $(window).height() - 200,
  1862. width: $(window).width() - 300,
  1863. colModel: _Clos,
  1864. //colModel: [
  1865. // { label: "主键", name: "ID", hidden: true, key: true },
  1866. // { label: '工单号', name: 'MOCode', width: 120, align: 'left' },
  1867. // { label: '工单行号', name: 'Sequence', width: 50, align: 'left' },
  1868. // { label: '已入库数量', name: 'RCVQuantity', hidden: true, },
  1869. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  1870. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  1871. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  1872. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  1873. // {
  1874. // label: "状态", name: "MOStatus", width: 60, align: "left",
  1875. // formatter: function (cellvalue) {
  1876. // if (cellvalue == "1") {
  1877. // return "初始";
  1878. // } else if (cellvalue == "2") {
  1879. // return "下发";
  1880. // }
  1881. // else if (cellvalue == "3") {
  1882. // return "关单";
  1883. // }
  1884. // else { return ""; }
  1885. // }
  1886. // },
  1887. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  1888. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  1889. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1890. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  1891. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  1892. // { label: '可入库数量', name: 'ERPNum', width: 100, align: 'left' },
  1893. //],
  1894. //colModel: ColModelMain,
  1895. width: "100%",
  1896. autowidth: true,
  1897. //shrinkToFit: true,
  1898. gridComplete: function () {
  1899. },
  1900. pager: "#gridPager",
  1901. //sortname: 'MOCode,cast(Sequence as int)',
  1902. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  1903. sortorder: "asc",
  1904. viewrecords: true,
  1905. multiselect: true,
  1906. //beforeSelectRow: function (rowid, e) {
  1907. // $("#gridList").jqGrid('resetSelection');
  1908. // return (true);
  1909. //},
  1910. subGrid: true, // (1)开启子表格支持
  1911. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  1912. $("#gridList").jqGrid("setSelection", rowid, false);
  1913. bindSubGrid3(subgrid_id, rowid)
  1914. }
  1915. });
  1916. $("#warehouse a.btn-default").click(function () {
  1917. $("#warehouse a.btn-default").removeClass("active");
  1918. $(this).addClass("active");
  1919. $('#btn_search').trigger("click");
  1920. });
  1921. $("#btn_search").click(function () {
  1922. var warehouse = $("#warehouse a.active").attr('data-value');
  1923. var queryJson = {
  1924. POCode: $("#txt_POCode").val(),
  1925. InvCode: $("#txt_InvCode").val(),
  1926. InvName: $("#txt_InvName").val(),
  1927. BatchCode: $("#txt_BatchCode").val(),
  1928. POStatus: $("#selShow").val(),
  1929. SelGDLX: $("#SelGDLX option:checked").val(),
  1930. }
  1931. $gridList.jqGrid('setGridParam', {
  1932. postData: { queryJson: JSON.stringify(queryJson) },
  1933. }).trigger('reloadGrid');
  1934. });
  1935. }
  1936. function bindSubGrid3(subgrid_id, rowid) {
  1937. $("#gridList").jqGrid("setSelection", rowid, false);
  1938. var subgrid_table_id;
  1939. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  1940. var subgrid_pager_id;
  1941. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  1942. // (5)动态添加子报表的table和pager
  1943. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  1944. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  1945. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  1946. // (6)创建jqGrid对象
  1947. $("#" + subgrid_table_id).dataGrid({
  1948. cellEdit: true,
  1949. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  1950. //colModel: [
  1951. // { label: "主键", name: "ID", hidden: true, key: true },
  1952. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  1953. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  1954. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  1955. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  1956. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  1957. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  1958. //],
  1959. colModel: _Clos1,
  1960. //colModel: ColModelSub,
  1961. shrinkToFit: true,//宽度自适应
  1962. multiselect: true,
  1963. prmNames: { search: "search" },
  1964. viewrecords: true,
  1965. sortname: "ProductDate",
  1966. sortorder: "desc",
  1967. height: "100%",
  1968. rowNum: 20,
  1969. pager: subgrid_pager_id,
  1970. });
  1971. }
  1972. //销售退货
  1973. function gridList4() {
  1974. var $gridList = $("#gridList");
  1975. var queryJson = {
  1976. POCode: $("#txt_POCode").val(),
  1977. InvCode: $("#txt_InvCode").val(),
  1978. InvName: $("#txt_InvName").val(),
  1979. BatchCode: $("#txt_BatchCode").val(),
  1980. POStatus: $("#selShow").val(),
  1981. TimeFrom: $("#TimeFrom").val(),
  1982. TimeArrive: $("#TimeArrive").val(),
  1983. CustomerName: $("#txt_CustomerName").val(),
  1984. }
  1985. $gridList.dataGrid({
  1986. url: "/DHAY/DHCreateItemLot/GetGridJsonXiaoShou" + "?" + Math.random(),
  1987. postData: { queryJson: JSON.stringify(queryJson) },
  1988. height: $(window).height() - 200,
  1989. width: $(window).width() - 300,
  1990. colModel: _Clos,
  1991. //colModel: [
  1992. // { label: "主键", name: "ID", hidden: true, key: true },
  1993. // { label: '单据号', name: 'SDNCode', width: 120, align: 'left' },
  1994. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  1995. // { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' },
  1996. // { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' },
  1997. // { label: '客户代码', name: 'CusCode', width: 120, align: 'left' },
  1998. // { label: '客户名称', name: 'CusName', width: 50, align: 'left' },
  1999. // { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' },
  2000. // { label: '已发数量', name: 'SDNQuantity', width: 50, align: 'left' },
  2001. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2002. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  2003. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2004. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2005. // {
  2006. // label: "状态", name: "Status", width: 60, align: "left",
  2007. // formatter: function (cellvalue) {
  2008. // if (cellvalue == "1") {
  2009. // return "开立";
  2010. // } else if (cellvalue == "2") {
  2011. // return "审核";
  2012. // }
  2013. // else if (cellvalue == "3") {
  2014. // return "关闭";
  2015. // }
  2016. // else { return ""; }
  2017. // }
  2018. // },
  2019. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2020. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2021. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2022. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2023. //],
  2024. //colModel: ColModelMain,
  2025. width: "100%",
  2026. autowidth: true,
  2027. //shrinkToFit: true,
  2028. gridComplete: function () {
  2029. },
  2030. pager: "#gridPager",
  2031. // sortname: 'SDNCode,cast(Sequence as int)',
  2032. sortname: "SDNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2033. sortorder: "asc",
  2034. viewrecords: true,
  2035. multiselect: true,
  2036. //beforeSelectRow: function (rowid, e) {
  2037. // $("#gridList").jqGrid('resetSelection');
  2038. // return (true);
  2039. //},
  2040. subGrid: true, // (1)开启子表格支持
  2041. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2042. $("#gridList").jqGrid("setSelection", rowid, false);
  2043. bindSubGrid4(subgrid_id, rowid)
  2044. }
  2045. });
  2046. $("#warehouse a.btn-default").click(function () {
  2047. $("#warehouse a.btn-default").removeClass("active");
  2048. $(this).addClass("active");
  2049. $('#btn_search').trigger("click");
  2050. });
  2051. $("#btn_search").click(function () {
  2052. var warehouse = $("#warehouse a.active").attr('data-value');
  2053. var queryJson = {
  2054. POCode: $("#txt_POCode").val(),
  2055. InvCode: $("#txt_InvCode").val(),
  2056. InvName: $("#txt_InvName").val(),
  2057. BatchCode: $("#txt_BatchCode").val(),
  2058. POStatus: $("#selShow").val(),
  2059. TimeFrom: $("#TimeFrom").val(),
  2060. TimeArrive: $("#TimeArrive").val(),
  2061. CustomerName: $("#txt_CustomerName").val(),
  2062. }
  2063. $gridList.jqGrid('setGridParam', {
  2064. postData: { queryJson: JSON.stringify(queryJson) },
  2065. }).trigger('reloadGrid');
  2066. });
  2067. }
  2068. function bindSubGrid4(subgrid_id, rowid) {
  2069. $("#gridList").jqGrid("setSelection", rowid, false);
  2070. var subgrid_table_id;
  2071. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2072. var subgrid_pager_id;
  2073. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2074. // (5)动态添加子报表的table和pager
  2075. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2076. var SDNCode = $("#gridList").jqGrid('getRowData', rowid).SDNCode;
  2077. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2078. // (6)创建jqGrid对象
  2079. $("#" + subgrid_table_id).dataGrid({
  2080. cellEdit: true,
  2081. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + SDNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2082. //colModel: [
  2083. // { label: "主键", name: "ID", hidden: true, key: true },
  2084. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2085. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2086. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2087. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2088. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2089. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2090. //],
  2091. colModel: _Clos1,
  2092. //colModel: ColModelSub,
  2093. shrinkToFit: true,//宽度自适应
  2094. multiselect: true,
  2095. prmNames: { search: "search" },
  2096. viewrecords: true,
  2097. height: "100%",
  2098. rowNum: 20,
  2099. pager: subgrid_pager_id,
  2100. });
  2101. }
  2102. //其它入库生成条码
  2103. function gridList5() {
  2104. var $gridList = $("#gridList");
  2105. var queryJson = {
  2106. POCode: $("#txt_POCode").val(),
  2107. InvCode: $("#txt_InvCode").val(),
  2108. InvName: $("#txt_InvName").val(),
  2109. BatchCode: $("#txt_BatchCode").val(),
  2110. POStatus: $("#selShow").val(),
  2111. CusInvCode: $("#txt_CusInvCode").val(),
  2112. U8InvCode: $("#txt_U8InvCode").val(),
  2113. CusBatchCode: $("#txt_CusBatch").val(),
  2114. }
  2115. $gridList.dataGrid({
  2116. url: "/DHAY/DHCreateItemLot/GetGridJsonQiTa" + "?" + Math.random(),
  2117. postData: { queryJson: JSON.stringify(queryJson) },
  2118. height: $(window).height() - 200,
  2119. width: $(window).width() - 300,
  2120. colModel: _Clos,
  2121. //colModel: [
  2122. // { label: "主键", name: "ID", hidden: true, key: true },
  2123. // { label: '单据号', name: 'InCode', width: 120, align: 'left' },
  2124. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2125. // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' },
  2126. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2127. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2128. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2129. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2130. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2131. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2132. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2133. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2134. // { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', },
  2135. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2136. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2137. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2138. //],
  2139. //colModel: ColModelMain,
  2140. width: "100%",
  2141. autowidth: true,
  2142. //shrinkToFit: true,
  2143. gridComplete: function () {
  2144. },
  2145. pager: "#gridPager",
  2146. sortname: 'InCode,Sequence',
  2147. sortorder: "asc",
  2148. viewrecords: true,
  2149. multiselect: true,
  2150. //beforeSelectRow: function (rowid, e) {
  2151. // $("#gridList").jqGrid('resetSelection');
  2152. // return (true);
  2153. //},
  2154. subGrid: true, // (1)开启子表格支持
  2155. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2156. $("#gridList").jqGrid("setSelection", rowid, false);
  2157. bindSubGrid5(subgrid_id, rowid)
  2158. }
  2159. });
  2160. $("#warehouse a.btn-default").click(function () {
  2161. $("#warehouse a.btn-default").removeClass("active");
  2162. $(this).addClass("active");
  2163. $('#btn_search').trigger("click");
  2164. });
  2165. $("#btn_search").click(function () {
  2166. var warehouse = $("#warehouse a.active").attr('data-value');
  2167. var queryJson = {
  2168. POCode: $("#txt_POCode").val(),
  2169. InvCode: $("#txt_InvCode").val(),
  2170. InvName: $("#txt_InvName").val(),
  2171. BatchCode: $("#txt_BatchCode").val(),
  2172. POStatus: $("#selShow").val(),
  2173. CusInvCode: $("#txt_CusInvCode").val(),
  2174. U8InvCode: $("#txt_U8InvCode").val(),
  2175. CusBatchCode: $("#txt_CusBatch").val(),
  2176. }
  2177. $gridList.jqGrid('setGridParam', {
  2178. postData: { queryJson: JSON.stringify(queryJson) },
  2179. }).trigger('reloadGrid');
  2180. });
  2181. }
  2182. function bindSubGrid5(subgrid_id, rowid) {
  2183. $("#gridList").jqGrid("setSelection", rowid, false);
  2184. var subgrid_table_id;
  2185. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2186. var subgrid_pager_id;
  2187. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2188. // (5)动态添加子报表的table和pager
  2189. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2190. var InCode = $("#gridList").jqGrid('getRowData', rowid).InCode;
  2191. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2192. // (6)创建jqGrid对象
  2193. $("#" + subgrid_table_id).dataGrid({
  2194. cellEdit: true,
  2195. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + InCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2196. //colModel: [
  2197. // { label: "主键", name: "ID", hidden: true, key: true },
  2198. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2199. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2200. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2201. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2202. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2203. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2204. //],
  2205. colModel: _Clos1,
  2206. //colModel: ColModelSub,
  2207. shrinkToFit: true,//宽度自适应
  2208. multiselect: true,
  2209. prmNames: { search: "search" },
  2210. viewrecords: true,
  2211. height: "100%",
  2212. rowNum: 20,
  2213. pager: subgrid_pager_id,
  2214. });
  2215. }
  2216. //归还单生成条码
  2217. function gridList6() {
  2218. var $gridList = $("#gridList");
  2219. var queryJson = {
  2220. POCode: $("#txt_POCode").val(),
  2221. InvCode: $("#txt_InvCode").val(),
  2222. InvName: $("#txt_InvName").val(),
  2223. BatchCode: $("#txt_BatchCode").val(),
  2224. POStatus: $("#selShow").val()
  2225. }
  2226. $gridList.dataGrid({
  2227. url: "/DHAY/DHCreateItemLot/GetGridJsonGuiHuan" + "?" + Math.random(),
  2228. postData: { queryJson: JSON.stringify(queryJson) },
  2229. height: $(window).height() - 200,
  2230. width: $(window).width() - 300,
  2231. colModel: _Clos,
  2232. //colModel: [
  2233. // { label: "主键", name: "ID", hidden: true, key: true },
  2234. // { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' },
  2235. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2236. // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' },
  2237. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2238. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2239. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2240. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2241. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2242. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2243. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2244. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2245. // { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', },
  2246. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2247. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2248. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2249. //],
  2250. //colModel: ColModelMain,
  2251. width: "100%",
  2252. autowidth: true,
  2253. //shrinkToFit: true,
  2254. gridComplete: function () {
  2255. },
  2256. pager: "#gridPager",
  2257. /// sortname: 'ReturnCode,cast(Sequence as int)',
  2258. sortname: "ReturnCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2259. sortorder: "asc",
  2260. viewrecords: true,
  2261. multiselect: true,
  2262. //beforeSelectRow: function (rowid, e) {
  2263. // $("#gridList").jqGrid('resetSelection');
  2264. // return (true);
  2265. //},
  2266. subGrid: true, // (1)开启子表格支持
  2267. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2268. $("#gridList").jqGrid("setSelection", rowid, false);
  2269. bindSubGrid6(subgrid_id, rowid)
  2270. }
  2271. });
  2272. $("#warehouse a.btn-default").click(function () {
  2273. $("#warehouse a.btn-default").removeClass("active");
  2274. $(this).addClass("active");
  2275. $('#btn_search').trigger("click");
  2276. });
  2277. $("#btn_search").click(function () {
  2278. var warehouse = $("#warehouse a.active").attr('data-value');
  2279. var queryJson = {
  2280. POCode: $("#txt_POCode").val(),
  2281. InvCode: $("#txt_InvCode").val(),
  2282. InvName: $("#txt_InvName").val(),
  2283. BatchCode: $("#txt_BatchCode").val(),
  2284. POStatus: $("#selShow").val()
  2285. }
  2286. $gridList.jqGrid('setGridParam', {
  2287. postData: { queryJson: JSON.stringify(queryJson) },
  2288. }).trigger('reloadGrid');
  2289. });
  2290. }
  2291. function bindSubGrid6(subgrid_id, rowid) {
  2292. $("#gridList").jqGrid("setSelection", rowid, false);
  2293. var subgrid_table_id;
  2294. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2295. var subgrid_pager_id;
  2296. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2297. // (5)动态添加子报表的table和pager
  2298. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2299. var ReturnCode = $("#gridList").jqGrid('getRowData', rowid).ReturnCode;
  2300. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2301. // (6)创建jqGrid对象
  2302. $("#" + subgrid_table_id).dataGrid({
  2303. cellEdit: true,
  2304. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + ReturnCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2305. //colModel: [
  2306. // { label: "主键", name: "ID", hidden: true, key: true },
  2307. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2308. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2309. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2310. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2311. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2312. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2313. //],
  2314. colModel: _Clos1,
  2315. //colModel: ColModelSub,
  2316. shrinkToFit: true,//宽度自适应
  2317. multiselect: true,
  2318. prmNames: { search: "search" },
  2319. viewrecords: true,
  2320. height: "100%",
  2321. rowNum: 20,
  2322. pager: subgrid_pager_id,
  2323. });
  2324. }
  2325. //*审核到货单生成条码
  2326. function gridList7() {
  2327. var $gridList = $("#gridList");
  2328. var queryJson = {
  2329. POCode: $("#txt_POCode").val(),
  2330. VenCode: $("#txt_VenCode").val(),
  2331. VenName: $("#txt_VenName").val(),
  2332. InvCode: $("#txt_InvCode").val(),
  2333. InvName: $("#txt_InvName").val(),
  2334. BatchCode: $("#txt_BatchCode").val(),
  2335. POStatus: $("#selShow").val()
  2336. }
  2337. $gridList.dataGrid({
  2338. url: "/DHAY/DHCreateItemLot/GetGridJsonSHDH" + "?" + Math.random(),
  2339. postData: { queryJson: JSON.stringify(queryJson) },
  2340. height: $(window).height() - 200,
  2341. width: $(window).width() - 300,
  2342. colModel: _Clos,
  2343. //colModel: [
  2344. // { label: "主键", name: "ID", hidden: true, key: true },
  2345. // { label: '单据号', name: 'DNCode', width: 120, align: 'left' },
  2346. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2347. // { label: '采购订单号', name: 'POCode', width: 50, align: 'left' },
  2348. // { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' },
  2349. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  2350. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  2351. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2352. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2353. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2354. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2355. // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' },
  2356. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2357. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2358. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2359. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2360. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  2361. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  2362. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2363. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2364. //],
  2365. //colModel: ColModelMain,
  2366. width: "100%",
  2367. autowidth: true,
  2368. //shrinkToFit: true,
  2369. gridComplete: function () {
  2370. },
  2371. pager: "#gridPager",
  2372. //sortname: 'DNCode,cast(Sequence as int)',
  2373. sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2374. sortorder: "asc",
  2375. viewrecords: true,
  2376. multiselect: true,
  2377. //beforeSelectRow: function (rowid, e) {
  2378. // $("#gridList").jqGrid('resetSelection');
  2379. // return (true);
  2380. //},
  2381. subGrid: true, // (1)开启子表格支持
  2382. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2383. $("#gridList").jqGrid("setSelection", rowid, false);
  2384. bindSubGrid7(subgrid_id, rowid)
  2385. }
  2386. });
  2387. $("#warehouse a.btn-default").click(function () {
  2388. $("#warehouse a.btn-default").removeClass("active");
  2389. $(this).addClass("active");
  2390. $('#btn_search').trigger("click");
  2391. });
  2392. $("#btn_search").click(function () {
  2393. var warehouse = $("#warehouse a.active").attr('data-value');
  2394. var queryJson = {
  2395. POCode: $("#txt_POCode").val(),
  2396. VenCode: $("#txt_VenCode").val(),
  2397. VenName: $("#txt_VenName").val(),
  2398. InvCode: $("#txt_InvCode").val(),
  2399. InvName: $("#txt_InvName").val(),
  2400. BatchCode: $("#txt_BatchCode").val(),
  2401. POStatus: $("#selShow").val()
  2402. }
  2403. $gridList.jqGrid('setGridParam', {
  2404. postData: { queryJson: JSON.stringify(queryJson) },
  2405. }).trigger('reloadGrid');
  2406. });
  2407. }
  2408. function bindSubGrid7(subgrid_id, rowid) {
  2409. $("#gridList").jqGrid("setSelection", rowid, false);
  2410. var subgrid_table_id;
  2411. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2412. var subgrid_pager_id;
  2413. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2414. // (5)动态添加子报表的table和pager
  2415. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2416. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  2417. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2418. // (6)创建jqGrid对象
  2419. $("#" + subgrid_table_id).dataGrid({
  2420. cellEdit: true,
  2421. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2422. //colModel: [
  2423. // { label: "主键", name: "ID", hidden: true, key: true },
  2424. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2425. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2426. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2427. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2428. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2429. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2430. //],
  2431. colModel: _Clos1,
  2432. //colModel: ColModelSub,
  2433. shrinkToFit: true,//宽度自适应
  2434. multiselect: true,
  2435. prmNames: { search: "search" },
  2436. viewrecords: true,
  2437. height: "100%",
  2438. rowNum: 20,
  2439. pager: subgrid_pager_id,
  2440. });
  2441. }
  2442. //审核委外到货单生成条码
  2443. function gridList8() {
  2444. var $gridList = $("#gridList");
  2445. var queryJson = {
  2446. POCode: $("#txt_POCode").val(),
  2447. VenCode: $("#txt_VenCode").val(),
  2448. VenName: $("#txt_VenName").val(),
  2449. InvCode: $("#txt_InvCode").val(),
  2450. InvName: $("#txt_InvName").val(),
  2451. BatchCode: $("#txt_BatchCode").val(),
  2452. POStatus: $("#selShow").val()
  2453. }
  2454. $gridList.dataGrid({
  2455. url: "/DHAY/DHCreateItemLot/GetGridJsonWWSHDH" + "?" + Math.random(),
  2456. postData: { queryJson: JSON.stringify(queryJson) },
  2457. height: $(window).height() - 200,
  2458. width: $(window).width() - 300,
  2459. colModel: _Clos,
  2460. //colModel: [
  2461. // { label: "主键", name: "ID", hidden: true, key: true },
  2462. // { label: '单据号', name: 'ODNCode', width: 120, align: 'left' },
  2463. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2464. // { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' },
  2465. // { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' },
  2466. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  2467. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  2468. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2469. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2470. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2471. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2472. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2473. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2474. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2475. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2476. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2477. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  2478. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  2479. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2480. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2481. //],
  2482. //colModel: ColModelMain,
  2483. width: "100%",
  2484. autowidth: true,
  2485. //shrinkToFit: true,
  2486. gridComplete: function () {
  2487. },
  2488. pager: "#gridPager",
  2489. //sortname: 'ODNCode,cast(Sequence as int)',
  2490. sortname: "ODNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2491. sortorder: "asc",
  2492. viewrecords: true,
  2493. multiselect: true,
  2494. //beforeSelectRow: function (rowid, e) {
  2495. // $("#gridList").jqGrid('resetSelection');
  2496. // return (true);
  2497. //},
  2498. subGrid: true, // (1)开启子表格支持
  2499. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2500. $("#gridList").jqGrid("setSelection", rowid, false);
  2501. bindSubGrid8(subgrid_id, rowid)
  2502. }
  2503. });
  2504. $("#warehouse a.btn-default").click(function () {
  2505. $("#warehouse a.btn-default").removeClass("active");
  2506. $(this).addClass("active");
  2507. $('#btn_search').trigger("click");
  2508. });
  2509. $("#btn_search").click(function () {
  2510. var warehouse = $("#warehouse a.active").attr('data-value');
  2511. var queryJson = {
  2512. POCode: $("#txt_POCode").val(),
  2513. VenCode: $("#txt_VenCode").val(),
  2514. VenName: $("#txt_VenName").val(),
  2515. InvCode: $("#txt_InvCode").val(),
  2516. InvName: $("#txt_InvName").val(),
  2517. BatchCode: $("#txt_BatchCode").val(),
  2518. POStatus: $("#selShow").val()
  2519. }
  2520. $gridList.jqGrid('setGridParam', {
  2521. postData: { queryJson: JSON.stringify(queryJson) },
  2522. }).trigger('reloadGrid');
  2523. });
  2524. }
  2525. function bindSubGrid8(subgrid_id, rowid) {
  2526. $("#gridList").jqGrid("setSelection", rowid, false);
  2527. var subgrid_table_id;
  2528. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2529. var subgrid_pager_id;
  2530. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2531. // (5)动态添加子报表的table和pager
  2532. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2533. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).ODNCode;
  2534. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2535. // (6)创建jqGrid对象
  2536. $("#" + subgrid_table_id).dataGrid({
  2537. cellEdit: true,
  2538. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2539. //colModel: [
  2540. // { label: "主键", name: "ID", hidden: true, key: true },
  2541. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2542. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2543. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2544. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2545. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2546. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2547. //],
  2548. colModel: _Clos1,
  2549. //colModel: ColModelSub,
  2550. shrinkToFit: true,//宽度自适应
  2551. multiselect: true,
  2552. prmNames: { search: "search" },
  2553. viewrecords: true,
  2554. height: "100%",
  2555. rowNum: 20,
  2556. pager: subgrid_pager_id,
  2557. });
  2558. }
  2559. //开立得成品入库单 生成条码
  2560. function gridList9() {
  2561. var $gridList = $("#gridList");
  2562. var queryJson = {
  2563. POCode: $("#txt_POCode").val(),
  2564. InvCode: $("#txt_InvCode").val(),
  2565. InvName: $("#txt_InvName").val(),
  2566. BatchCode: $("#txt_BatchCode").val(),
  2567. POStatus: $("#selShow").val(),
  2568. SCode: $("#txt_SCode").val(),
  2569. }
  2570. $gridList.dataGrid({
  2571. url: "/DHAY/DHCreateItemLot/GetGridJsonKLCPRK" + "?" + Math.random(),
  2572. postData: { queryJson: JSON.stringify(queryJson) },
  2573. height: $(window).height() - 200,
  2574. width: $(window).width() - 300,
  2575. colModel: _Clos,
  2576. //colModel: [
  2577. // { label: "主键", name: "ID", hidden: true, key: true },
  2578. // { label: '单据号', name: 'RCVCode', width: 120, align: 'left' },
  2579. // { label: '行号', name: 'Sequence', width: 50, align: 'left' },
  2580. // { label: '仓库号', name: 'WHCode', width: 120, align: 'left' },
  2581. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2582. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2583. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2584. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2585. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2586. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2587. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2588. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2589. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2590. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  2591. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2592. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2593. //],
  2594. //colModel: ColModelMain,
  2595. width: "100%",
  2596. autowidth: true,
  2597. //shrinkToFit: true,
  2598. gridComplete: function () {
  2599. },
  2600. pager: "#gridPager",
  2601. //sortname: 'RCVCode,cast(Sequence as int)',
  2602. sortname: "RCVCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2603. sortorder: "asc",
  2604. viewrecords: true,
  2605. multiselect: true,
  2606. //beforeSelectRow: function (rowid, e) {
  2607. // $("#gridList").jqGrid('resetSelection');
  2608. // return (true);
  2609. //},
  2610. subGrid: true, // (1)开启子表格支持
  2611. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2612. $("#gridList").jqGrid("setSelection", rowid, false);
  2613. bindSubGrid9(subgrid_id, rowid)
  2614. }
  2615. });
  2616. $("#warehouse a.btn-default").click(function () {
  2617. $("#warehouse a.btn-default").removeClass("active");
  2618. $(this).addClass("active");
  2619. $('#btn_search').trigger("click");
  2620. });
  2621. $("#btn_search").click(function () {
  2622. var warehouse = $("#warehouse a.active").attr('data-value');
  2623. var queryJson = {
  2624. POCode: $("#txt_POCode").val(),
  2625. InvCode: $("#txt_InvCode").val(),
  2626. InvName: $("#txt_InvName").val(),
  2627. BatchCode: $("#txt_BatchCode").val(),
  2628. POStatus: $("#selShow").val(),
  2629. SCode: $("#txt_SCode").val(),
  2630. }
  2631. $gridList.jqGrid('setGridParam', {
  2632. postData: { queryJson: JSON.stringify(queryJson) },
  2633. }).trigger('reloadGrid');
  2634. });
  2635. }
  2636. function bindSubGrid9(subgrid_id, rowid) {
  2637. $("#gridList").jqGrid("setSelection", rowid, false);
  2638. var subgrid_table_id;
  2639. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2640. var subgrid_pager_id;
  2641. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2642. // (5)动态添加子报表的table和pager
  2643. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2644. var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
  2645. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2646. // (6)创建jqGrid对象
  2647. $("#" + subgrid_table_id).dataGrid({
  2648. cellEdit: true,
  2649. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2650. //colModel: [
  2651. // { label: "主键", name: "ID", hidden: true, key: true },
  2652. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2653. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2654. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2655. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2656. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2657. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2658. //],
  2659. colModel: _Clos1,
  2660. //colModel: ColModelSub,
  2661. shrinkToFit: true,//宽度自适应
  2662. multiselect: true,
  2663. prmNames: { search: "search" },
  2664. viewrecords: true,
  2665. height: "100%",
  2666. rowNum: 20,
  2667. pager: subgrid_pager_id,
  2668. });
  2669. }
  2670. //采购拒收单
  2671. function gridList10() {
  2672. var $gridList = $("#gridList");
  2673. var queryJson = {
  2674. POCode: $("#txt_POCode").val(),
  2675. VenCode: $("#txt_VenCode").val(),
  2676. VenName: $("#txt_VenName").val(),
  2677. InvCode: $("#txt_InvCode").val(),
  2678. InvName: $("#txt_InvName").val(),
  2679. BatchCode: $("#txt_BatchCode").val(),
  2680. POStatus: $("#selShow").val()
  2681. }
  2682. $gridList.dataGrid({
  2683. url: "/DHAY/DHCreateItemLot/GetGridJsonJSD" + "?" + Math.random(),
  2684. postData: { queryJson: JSON.stringify(queryJson) },
  2685. height: $(window).height() - 200,
  2686. width: $(window).width() - 300,
  2687. colModel: _Clos,
  2688. //colModel: [
  2689. // { label: "主键", name: "ID", hidden: true, key: true },
  2690. // { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' },
  2691. // { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' },
  2692. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  2693. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  2694. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2695. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2696. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2697. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2698. // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' },
  2699. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2700. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2701. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2702. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2703. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  2704. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  2705. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2706. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2707. //],
  2708. //colModel: ColModelMain,
  2709. width: "100%",
  2710. autowidth: true,
  2711. //shrinkToFit: true,
  2712. gridComplete: function () {
  2713. },
  2714. pager: "#gridPager",
  2715. //sortname: 'DNCode,cast(Sequence as int)',
  2716. sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2717. sortorder: "asc",
  2718. viewrecords: true,
  2719. multiselect: true,
  2720. //beforeSelectRow: function (rowid, e) {
  2721. // $("#gridList").jqGrid('resetSelection');
  2722. // return (true);
  2723. //},
  2724. subGrid: true, // (1)开启子表格支持
  2725. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2726. $("#gridList").jqGrid("setSelection", rowid, false);
  2727. bindSubGrid10(subgrid_id, rowid)
  2728. }
  2729. });
  2730. $("#warehouse a.btn-default").click(function () {
  2731. $("#warehouse a.btn-default").removeClass("active");
  2732. $(this).addClass("active");
  2733. $('#btn_search').trigger("click");
  2734. });
  2735. $("#btn_search").click(function () {
  2736. var warehouse = $("#warehouse a.active").attr('data-value');
  2737. var queryJson = {
  2738. POCode: $("#txt_POCode").val(),
  2739. VenCode: $("#txt_VenCode").val(),
  2740. VenName: $("#txt_VenName").val(),
  2741. InvCode: $("#txt_InvCode").val(),
  2742. InvName: $("#txt_InvName").val(),
  2743. BatchCode: $("#txt_BatchCode").val(),
  2744. POStatus: $("#selShow").val()
  2745. }
  2746. $gridList.jqGrid('setGridParam', {
  2747. postData: { queryJson: JSON.stringify(queryJson) },
  2748. }).trigger('reloadGrid');
  2749. });
  2750. }
  2751. function bindSubGrid10(subgrid_id, rowid) {
  2752. $("#gridList").jqGrid("setSelection", rowid, false);
  2753. var subgrid_table_id;
  2754. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2755. var subgrid_pager_id;
  2756. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2757. // (5)动态添加子报表的table和pager
  2758. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2759. var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode;
  2760. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2761. // (6)创建jqGrid对象
  2762. $("#" + subgrid_table_id).dataGrid({
  2763. cellEdit: true,
  2764. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2765. //colModel: [
  2766. // { label: "主键", name: "ID", hidden: true, key: true },
  2767. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2768. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2769. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2770. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2771. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2772. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2773. //],
  2774. colModel: _Clos1,
  2775. //colModel: ColModelSub,
  2776. shrinkToFit: true,//宽度自适应
  2777. multiselect: true,
  2778. prmNames: { search: "search" },
  2779. viewrecords: true,
  2780. height: "100%",
  2781. rowNum: 20,
  2782. pager: subgrid_pager_id,
  2783. });
  2784. }
  2785. //委外拒收单生成条码
  2786. function gridList11() {
  2787. var $gridList = $("#gridList");
  2788. var queryJson = {
  2789. POCode: $("#txt_POCode").val(),
  2790. VenCode: $("#txt_VenCode").val(),
  2791. VenName: $("#txt_VenName").val(),
  2792. InvCode: $("#txt_InvCode").val(),
  2793. InvName: $("#txt_InvName").val(),
  2794. BatchCode: $("#txt_BatchCode").val(),
  2795. POStatus: $("#selShow").val()
  2796. }
  2797. $gridList.dataGrid({
  2798. url: "/DHAY/DHCreateItemLot/GetGridJsonWWJSD" + "?" + Math.random(),
  2799. postData: { queryJson: JSON.stringify(queryJson) },
  2800. height: $(window).height() - 200,
  2801. width: $(window).width() - 300,
  2802. colModel: _Clos,
  2803. //colModel: [
  2804. // { label: "主键", name: "ID", hidden: true, key: true },
  2805. // { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' },
  2806. // { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' },
  2807. // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' },
  2808. // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' },
  2809. // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' },
  2810. // { label: '料品名称', name: 'InvName', width: 120, align: 'left' },
  2811. // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' },
  2812. // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' },
  2813. // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' },
  2814. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2815. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2816. // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' },
  2817. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2818. // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', },
  2819. // { label: '币种', name: 'Currency', width: 60, align: 'left', },
  2820. // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', },
  2821. // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' },
  2822. //],
  2823. //colModel: ColModelMain,
  2824. width: "100%",
  2825. autowidth: true,
  2826. //shrinkToFit: true,
  2827. gridComplete: function () {
  2828. },
  2829. pager: "#gridPager",
  2830. // sortname: 'OOCode,cast(Sequence as int)',
  2831. sortname: "OOCode,REPLICATE('0',10-len(OOSequence))+OOSequence ",
  2832. sortorder: "asc",
  2833. viewrecords: true,
  2834. multiselect: true,
  2835. //beforeSelectRow: function (rowid, e) {
  2836. // $("#gridList").jqGrid('resetSelection');
  2837. // return (true);
  2838. //},
  2839. subGrid: true, // (1)开启子表格支持
  2840. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2841. $("#gridList").jqGrid("setSelection", rowid, false);
  2842. bindSubGrid11(subgrid_id, rowid)
  2843. }
  2844. });
  2845. $("#warehouse a.btn-default").click(function () {
  2846. $("#warehouse a.btn-default").removeClass("active");
  2847. $(this).addClass("active");
  2848. $('#btn_search').trigger("click");
  2849. });
  2850. $("#btn_search").click(function () {
  2851. var warehouse = $("#warehouse a.active").attr('data-value');
  2852. var queryJson = {
  2853. POCode: $("#txt_POCode").val(),
  2854. VenCode: $("#txt_VenCode").val(),
  2855. VenName: $("#txt_VenName").val(),
  2856. InvCode: $("#txt_InvCode").val(),
  2857. InvName: $("#txt_InvName").val(),
  2858. BatchCode: $("#txt_BatchCode").val(),
  2859. POStatus: $("#selShow").val()
  2860. }
  2861. $gridList.jqGrid('setGridParam', {
  2862. postData: { queryJson: JSON.stringify(queryJson) },
  2863. }).trigger('reloadGrid');
  2864. });
  2865. }
  2866. function bindSubGrid11(subgrid_id, rowid) {
  2867. $("#gridList").jqGrid("setSelection", rowid, false);
  2868. var subgrid_table_id;
  2869. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2870. var subgrid_pager_id;
  2871. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2872. // (5)动态添加子报表的table和pager
  2873. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2874. var ODNCode = $("#gridList").jqGrid('getRowData', rowid).OOCode;
  2875. var Sequence = $("#gridList").jqGrid('getRowData', rowid).OOSequence;
  2876. // (6)创建jqGrid对象
  2877. $("#" + subgrid_table_id).dataGrid({
  2878. cellEdit: true,
  2879. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2880. //colModel: [
  2881. // { label: "主键", name: "ID", hidden: true, key: true },
  2882. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2883. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2884. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2885. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2886. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2887. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2888. //],
  2889. colModel: _Clos1,
  2890. //colModel: ColModelSub,
  2891. shrinkToFit: true,//宽度自适应
  2892. multiselect: true,
  2893. prmNames: { search: "search" },
  2894. viewrecords: true,
  2895. height: "100%",
  2896. rowNum: 20,
  2897. pager: subgrid_pager_id,
  2898. });
  2899. }
  2900. //领料申请退料生成条码
  2901. function gridList12() {
  2902. var $gridList = $("#gridList");
  2903. var queryJson = {
  2904. POCode: $("#txt_POCode").val(),
  2905. InvCode: $("#txt_InvCode").val(),
  2906. InvName: $("#txt_InvName").val(),
  2907. BatchCode: $("#txt_BatchCode").val(),
  2908. POStatus: $("#selShow").val()
  2909. }
  2910. $gridList.dataGrid({
  2911. url: "/DHAY/DHCreateItemLot/GetGridJsonLLSQTL" + "?" + Math.random(),
  2912. postData: { queryJson: JSON.stringify(queryJson) },
  2913. height: $(window).height() - 200,
  2914. width: $(window).width() - 300,
  2915. colModel: _Clos,
  2916. //colModel: [
  2917. // { label: "主键", name: "ID", hidden: true, key: true },
  2918. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  2919. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  2920. // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, },
  2921. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  2922. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  2923. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  2924. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  2925. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  2926. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  2927. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  2928. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  2929. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  2930. //],
  2931. //colModel: ColModelMain,
  2932. width: "100%",
  2933. autowidth: true,
  2934. //shrinkToFit: true,
  2935. gridComplete: function () {
  2936. },
  2937. pager: "#gridPager",
  2938. // sortname: 'ApplyNegCode,cast(Sequence as int)',
  2939. sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  2940. sortorder: "asc",
  2941. viewrecords: true,
  2942. multiselect: true,
  2943. //beforeSelectRow: function (rowid, e) {
  2944. // $("#gridList").jqGrid('resetSelection');
  2945. // return (true);
  2946. //},
  2947. subGrid: true, // (1)开启子表格支持
  2948. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  2949. $("#gridList").jqGrid("setSelection", rowid, false);
  2950. bindSubGrid12(subgrid_id, rowid)
  2951. }
  2952. });
  2953. $("#warehouse a.btn-default").click(function () {
  2954. $("#warehouse a.btn-default").removeClass("active");
  2955. $(this).addClass("active");
  2956. $('#btn_search').trigger("click");
  2957. });
  2958. $("#btn_search").click(function () {
  2959. var warehouse = $("#warehouse a.active").attr('data-value');
  2960. var queryJson = {
  2961. POCode: $("#txt_POCode").val(),
  2962. InvCode: $("#txt_InvCode").val(),
  2963. InvName: $("#txt_InvName").val(),
  2964. BatchCode: $("#txt_BatchCode").val(),
  2965. POStatus: $("#selShow").val()
  2966. }
  2967. $gridList.jqGrid('setGridParam', {
  2968. postData: { queryJson: JSON.stringify(queryJson) },
  2969. }).trigger('reloadGrid');
  2970. });
  2971. }
  2972. function bindSubGrid12(subgrid_id, rowid) {
  2973. $("#gridList").jqGrid("setSelection", rowid, false);
  2974. var subgrid_table_id;
  2975. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  2976. var subgrid_pager_id;
  2977. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  2978. // (5)动态添加子报表的table和pager
  2979. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  2980. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  2981. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  2982. // (6)创建jqGrid对象
  2983. $("#" + subgrid_table_id).dataGrid({
  2984. cellEdit: true,
  2985. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  2986. //colModel: [
  2987. // { label: "主键", name: "ID", hidden: true, key: true },
  2988. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  2989. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  2990. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  2991. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  2992. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  2993. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  2994. //],
  2995. colModel: _Clos1,
  2996. //colModel: ColModelSub,
  2997. shrinkToFit: true,//宽度自适应
  2998. multiselect: true,
  2999. prmNames: { search: "search" },
  3000. viewrecords: true,
  3001. height: "100%",
  3002. rowNum: 20,
  3003. pager: subgrid_pager_id,
  3004. });
  3005. }
  3006. //材料出库退料
  3007. function gridList13() {
  3008. var $gridList = $("#gridList");
  3009. var queryJson = {
  3010. POCode: $("#txt_POCode").val(),
  3011. InvCode: $("#txt_InvCode").val(),
  3012. InvName: $("#txt_InvName").val(),
  3013. BatchCode: $("#txt_BatchCode").val(),
  3014. POStatus: $("#selShow").val(),
  3015. SCode: $("#txt_SCode").val(),
  3016. MOCode: $("#txt_MOCode").val(),
  3017. CreateTime: $("#txt_CreateTime").val(),
  3018. Creater: $("#txt_Creater").val(),
  3019. }
  3020. $gridList.dataGrid({
  3021. url: "/DHAY/DHCreateItemLot/GetGridJsonCLCK" + "?" + Math.random(),
  3022. postData: { MenuID: _MenuID, queryJson: JSON.stringify(queryJson) },
  3023. height: $(window).height() - 200,
  3024. width: $(window).width() - 300,
  3025. colModel: _Clos,
  3026. //colModel: [
  3027. // { label: "主键", name: "ID", hidden: true, key: true },
  3028. // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' },
  3029. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3030. // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, },
  3031. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3032. // { label: '料品编码', name: 'InvName', width: 60, align: 'left', },
  3033. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3034. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3035. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3036. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3037. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3038. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3039. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3040. //],
  3041. //colModel: ColModelMain,
  3042. width: "100%",
  3043. autowidth: true,
  3044. //shrinkToFit: true,
  3045. gridComplete: function () {
  3046. },
  3047. pager: "#gridPager",
  3048. // sortname: 'ApplyNegCode,cast(Sequence as int)',
  3049. sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3050. sortorder: "asc",
  3051. viewrecords: true,
  3052. multiselect: true,
  3053. //beforeSelectRow: function (rowid, e) {
  3054. // $("#gridList").jqGrid('resetSelection');
  3055. // return (true);
  3056. //},
  3057. subGrid: true, // (1)开启子表格支持
  3058. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3059. $("#gridList").jqGrid("setSelection", rowid, false);
  3060. bindSubGrid13(subgrid_id, rowid)
  3061. }
  3062. });
  3063. $("#warehouse a.btn-default").click(function () {
  3064. $("#warehouse a.btn-default").removeClass("active");
  3065. $(this).addClass("active");
  3066. $('#btn_search').trigger("click");
  3067. });
  3068. $("#btn_search").click(function () {
  3069. var warehouse = $("#warehouse a.active").attr('data-value');
  3070. var queryJson = {
  3071. POCode: $("#txt_POCode").val(),
  3072. InvCode: $("#txt_InvCode").val(),
  3073. InvName: $("#txt_InvName").val(),
  3074. BatchCode: $("#txt_BatchCode").val(),
  3075. POStatus: $("#selShow").val(),
  3076. SCode: $("#txt_SCode").val(),
  3077. MOCode: $("#txt_MOCode").val(),
  3078. CreateTime: $("#txt_CreateTime").val(),
  3079. Creater: $("#txt_Creater").val(),
  3080. }
  3081. $gridList.jqGrid('setGridParam', {
  3082. postData: { queryJson: JSON.stringify(queryJson) },
  3083. }).trigger('reloadGrid');
  3084. });
  3085. }
  3086. function bindSubGrid13(subgrid_id, rowid) {
  3087. $("#gridList").jqGrid("setSelection", rowid, false);
  3088. var subgrid_table_id;
  3089. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3090. var subgrid_pager_id;
  3091. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3092. // (5)动态添加子报表的table和pager
  3093. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3094. var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode;
  3095. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3096. // (6)创建jqGrid对象
  3097. $("#" + subgrid_table_id).dataGrid({
  3098. cellEdit: true,
  3099. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3100. //colModel: [
  3101. // { label: "主键", name: "ID", hidden: true, key: true },
  3102. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3103. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3104. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3105. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3106. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3107. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3108. //],
  3109. colModel: _Clos1,
  3110. //colModel: ColModelSub,
  3111. shrinkToFit: true,//宽度自适应
  3112. multiselect: true,
  3113. prmNames: { search: "search" },
  3114. viewrecords: true,
  3115. height: "100%",
  3116. rowNum: 20,
  3117. pager: subgrid_pager_id,
  3118. });
  3119. }
  3120. //委外领料申请退料
  3121. function gridList14() {
  3122. var $gridList = $("#gridList");
  3123. var queryJson = {
  3124. POCode: $("#txt_POCode").val(),
  3125. InvCode: $("#txt_InvCode").val(),
  3126. InvName: $("#txt_InvName").val(),
  3127. BatchCode: $("#txt_BatchCode").val(),
  3128. POStatus: $("#selShow").val()
  3129. }
  3130. $gridList.dataGrid({
  3131. url: "/DHAY/DHCreateItemLot/GetGridJsonWWLLTL" + "?" + Math.random(),
  3132. postData: { queryJson: JSON.stringify(queryJson) },
  3133. height: $(window).height() - 200,
  3134. width: $(window).width() - 300,
  3135. colModel: _Clos,
  3136. //colModel: [
  3137. // { label: "主键", name: "ID", hidden: true, key: true },
  3138. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3139. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3140. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3141. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3142. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3143. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3144. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3145. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3146. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3147. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3148. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3149. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3150. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3151. //],
  3152. //colModel: ColModelMain,
  3153. width: "100%",
  3154. autowidth: true,
  3155. //shrinkToFit: true,
  3156. gridComplete: function () {
  3157. },
  3158. pager: "#gridPager",
  3159. //sortname: 'OApplyNegCode,cast(Sequence as int)',
  3160. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3161. sortorder: "asc",
  3162. viewrecords: true,
  3163. multiselect: true,
  3164. //beforeSelectRow: function (rowid, e) {
  3165. // $("#gridList").jqGrid('resetSelection');
  3166. // return (true);
  3167. //},
  3168. subGrid: true, // (1)开启子表格支持
  3169. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3170. $("#gridList").jqGrid("setSelection", rowid, false);
  3171. bindSubGrid14(subgrid_id, rowid)
  3172. }
  3173. });
  3174. $("#warehouse a.btn-default").click(function () {
  3175. $("#warehouse a.btn-default").removeClass("active");
  3176. $(this).addClass("active");
  3177. $('#btn_search').trigger("click");
  3178. });
  3179. $("#btn_search").click(function () {
  3180. var warehouse = $("#warehouse a.active").attr('data-value');
  3181. var queryJson = {
  3182. POCode: $("#txt_POCode").val(),
  3183. InvCode: $("#txt_InvCode").val(),
  3184. InvName: $("#txt_InvName").val(),
  3185. BatchCode: $("#txt_BatchCode").val(),
  3186. POStatus: $("#selShow").val()
  3187. }
  3188. $gridList.jqGrid('setGridParam', {
  3189. postData: { queryJson: JSON.stringify(queryJson) },
  3190. }).trigger('reloadGrid');
  3191. });
  3192. }
  3193. function bindSubGrid14(subgrid_id, rowid) {
  3194. $("#gridList").jqGrid("setSelection", rowid, false);
  3195. var subgrid_table_id;
  3196. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3197. var subgrid_pager_id;
  3198. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3199. // (5)动态添加子报表的table和pager
  3200. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3201. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  3202. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3203. // (6)创建jqGrid对象
  3204. $("#" + subgrid_table_id).dataGrid({
  3205. cellEdit: true,
  3206. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3207. //colModel: [
  3208. // { label: "主键", name: "ID", hidden: true, key: true },
  3209. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3210. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3211. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3212. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3213. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3214. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3215. //],
  3216. colModel: _Clos1,
  3217. //colModel: ColModelSub,
  3218. shrinkToFit: true,//宽度自适应
  3219. multiselect: true,
  3220. prmNames: { search: "search" },
  3221. viewrecords: true,
  3222. height: "100%",
  3223. rowNum: 20,
  3224. pager: subgrid_pager_id,
  3225. });
  3226. }
  3227. //委外材料出库
  3228. function gridList15() {
  3229. var $gridList = $("#gridList");
  3230. var queryJson = {
  3231. POCode: $("#txt_POCode").val(),
  3232. InvCode: $("#txt_InvCode").val(),
  3233. InvName: $("#txt_InvName").val(),
  3234. BatchCode: $("#txt_BatchCode").val(),
  3235. POStatus: $("#selShow").val()
  3236. }
  3237. $gridList.dataGrid({
  3238. url: "/DHAY/DHCreateItemLot/GetGridJsonWWCLCK" + "?" + Math.random(),
  3239. postData: { queryJson: JSON.stringify(queryJson) },
  3240. height: $(window).height() - 200,
  3241. width: $(window).width() - 300,
  3242. colModel: _Clos,
  3243. //colModel: [
  3244. // { label: "主键", name: "ID", hidden: true, key: true },
  3245. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3246. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3247. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3248. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3249. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3250. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3251. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3252. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3253. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3254. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3255. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3256. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3257. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3258. //],
  3259. //colModel: ColModelMain,
  3260. width: "100%",
  3261. autowidth: true,
  3262. //shrinkToFit: true,
  3263. gridComplete: function () {
  3264. },
  3265. pager: "#gridPager",
  3266. //sortname: 'OApplyNegCode,cast(Sequence as int)',
  3267. sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3268. sortorder: "asc",
  3269. viewrecords: true,
  3270. multiselect: true,
  3271. //beforeSelectRow: function (rowid, e) {
  3272. // $("#gridList").jqGrid('resetSelection');
  3273. // return (true);
  3274. //},
  3275. subGrid: true, // (1)开启子表格支持
  3276. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3277. $("#gridList").jqGrid("setSelection", rowid, false);
  3278. bindSubGrid15(subgrid_id, rowid)
  3279. }
  3280. });
  3281. $("#warehouse a.btn-default").click(function () {
  3282. $("#warehouse a.btn-default").removeClass("active");
  3283. $(this).addClass("active");
  3284. $('#btn_search').trigger("click");
  3285. });
  3286. $("#btn_search").click(function () {
  3287. var warehouse = $("#warehouse a.active").attr('data-value');
  3288. var queryJson = {
  3289. POCode: $("#txt_POCode").val(),
  3290. InvCode: $("#txt_InvCode").val(),
  3291. InvName: $("#txt_InvName").val(),
  3292. BatchCode: $("#txt_BatchCode").val(),
  3293. POStatus: $("#selShow").val()
  3294. }
  3295. $gridList.jqGrid('setGridParam', {
  3296. postData: { queryJson: JSON.stringify(queryJson) },
  3297. }).trigger('reloadGrid');
  3298. });
  3299. }
  3300. function bindSubGrid15(subgrid_id, rowid) {
  3301. $("#gridList").jqGrid("setSelection", rowid, false);
  3302. var subgrid_table_id;
  3303. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3304. var subgrid_pager_id;
  3305. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3306. // (5)动态添加子报表的table和pager
  3307. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3308. var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode;
  3309. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3310. // (6)创建jqGrid对象
  3311. $("#" + subgrid_table_id).dataGrid({
  3312. cellEdit: true,
  3313. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3314. //colModel: [
  3315. // { label: "主键", name: "ID", hidden: true, key: true },
  3316. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3317. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3318. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3319. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3320. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3321. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3322. //],
  3323. colModel: _Clos1,
  3324. //colModel: ColModelSub,
  3325. shrinkToFit: true,//宽度自适应
  3326. //multiselect: true,
  3327. prmNames: { search: "search" },
  3328. multiselect: true,
  3329. viewrecords: true,
  3330. height: "100%",
  3331. rowNum: 20,
  3332. pager: subgrid_pager_id,
  3333. });
  3334. }
  3335. function gridList16() {
  3336. var $gridList = $("#gridList");
  3337. var queryJson = {
  3338. POCode: $("#txt_POCode").val(),
  3339. InvCode: $("#txt_InvCode").val(),
  3340. InvName: $("#txt_InvName").val(),
  3341. BatchCode: $("#txt_BatchCode").val(),
  3342. POStatus: $("#selShow").val()
  3343. }
  3344. $gridList.dataGrid({
  3345. url: "/DHAY/DHCreateItemLot/GetGridJsonFGGD" + "?" + Math.random(),
  3346. postData: { queryJson: JSON.stringify(queryJson) },
  3347. height: $(window).height() - 200,
  3348. width: $(window).width() - 300,
  3349. colModel: _Clos,
  3350. //colModel: [
  3351. // { label: "主键", name: "ID", hidden: true, key: true },
  3352. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3353. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3354. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3355. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3356. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3357. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3358. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3359. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3360. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3361. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3362. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3363. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3364. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3365. //],
  3366. //colModel: ColModelMain,
  3367. width: "100%",
  3368. autowidth: true,
  3369. //shrinkToFit: true,
  3370. gridComplete: function () {
  3371. },
  3372. pager: "#gridPager",
  3373. // sortname: 'MOCode,cast(Sequence as int)',
  3374. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3375. sortorder: "asc",
  3376. viewrecords: true,
  3377. multiselect: true,
  3378. //beforeSelectRow: function (rowid, e) {
  3379. // $("#gridList").jqGrid('resetSelection');
  3380. // return (true);
  3381. //},
  3382. subGrid: true, // (1)开启子表格支持
  3383. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3384. $("#gridList").jqGrid("setSelection", rowid, false);
  3385. bindSubGrid16(subgrid_id, rowid)
  3386. }
  3387. });
  3388. $("#warehouse a.btn-default").click(function () {
  3389. $("#warehouse a.btn-default").removeClass("active");
  3390. $(this).addClass("active");
  3391. $('#btn_search').trigger("click");
  3392. });
  3393. $("#btn_search").click(function () {
  3394. var warehouse = $("#warehouse a.active").attr('data-value');
  3395. var queryJson = {
  3396. POCode: $("#txt_POCode").val(),
  3397. InvCode: $("#txt_InvCode").val(),
  3398. InvName: $("#txt_InvName").val(),
  3399. BatchCode: $("#txt_BatchCode").val(),
  3400. POStatus: $("#selShow").val()
  3401. }
  3402. $gridList.jqGrid('setGridParam', {
  3403. postData: { queryJson: JSON.stringify(queryJson) },
  3404. }).trigger('reloadGrid');
  3405. });
  3406. }
  3407. function bindSubGrid16(subgrid_id, rowid) {
  3408. $("#gridList").jqGrid("setSelection", rowid, false);
  3409. var subgrid_table_id;
  3410. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3411. var subgrid_pager_id;
  3412. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3413. // (5)动态添加子报表的table和pager
  3414. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3415. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  3416. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3417. // (6)创建jqGrid对象
  3418. $("#" + subgrid_table_id).dataGrid({
  3419. cellEdit: true,
  3420. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3421. //colModel: [
  3422. // { label: "主键", name: "ID", hidden: true, key: true },
  3423. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3424. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3425. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3426. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3427. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3428. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3429. //],
  3430. colModel: _Clos1,
  3431. //colModel: ColModelSub,
  3432. shrinkToFit: true,//宽度自适应
  3433. multiselect: true,
  3434. prmNames: { search: "search" },
  3435. viewrecords: true,
  3436. height: "100%",
  3437. rowNum: 20,
  3438. pager: subgrid_pager_id,
  3439. });
  3440. }
  3441. //检验不合格
  3442. function gridList17() {
  3443. var $gridList = $("#gridList");
  3444. var queryJson = {
  3445. POCode: $("#txt_POCode").val(),
  3446. InvCode: $("#txt_InvCode").val(),
  3447. InvName: $("#txt_InvName").val(),
  3448. BatchCode: $("#txt_BatchCode").val(),
  3449. POStatus: $("#selShow").val()
  3450. }
  3451. $gridList.dataGrid({
  3452. url: "/DHAY/DHCreateItemLot/GetGridJsonBHGTM" + "?" + Math.random(),
  3453. postData: { queryJson: JSON.stringify(queryJson) },
  3454. height: $(window).height() - 200,
  3455. width: $(window).width() - 300,
  3456. colModel: _Clos,
  3457. //colModel: [
  3458. // { label: "主键", name: "ID", hidden: true, key: true },
  3459. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3460. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3461. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3462. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3463. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3464. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3465. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3466. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3467. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3468. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3469. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3470. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3471. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3472. //],
  3473. //colModel: ColModelMain,
  3474. width: "100%",
  3475. autowidth: true,
  3476. //shrinkToFit: true,
  3477. gridComplete: function () {
  3478. },
  3479. pager: "#gridPager",
  3480. sortname: 'LotNo',
  3481. sortorder: "asc",
  3482. viewrecords: true,
  3483. multiselect: true,
  3484. //beforeSelectRow: function (rowid, e) {
  3485. // $("#gridList").jqGrid('resetSelection');
  3486. // return (true);
  3487. //},
  3488. subGrid: true, // (1)开启子表格支持
  3489. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3490. $("#gridList").jqGrid("setSelection", rowid, false);
  3491. bindSubGrid17(subgrid_id, rowid)
  3492. }
  3493. });
  3494. $("#warehouse a.btn-default").click(function () {
  3495. $("#warehouse a.btn-default").removeClass("active");
  3496. $(this).addClass("active");
  3497. $('#btn_search').trigger("click");
  3498. });
  3499. $("#btn_search").click(function () {
  3500. var warehouse = $("#warehouse a.active").attr('data-value');
  3501. var queryJson = {
  3502. POCode: $("#txt_POCode").val(),
  3503. InvCode: $("#txt_InvCode").val(),
  3504. InvName: $("#txt_InvName").val(),
  3505. BatchCode: $("#txt_BatchCode").val(),
  3506. POStatus: $("#selShow").val()
  3507. }
  3508. $gridList.jqGrid('setGridParam', {
  3509. postData: { queryJson: JSON.stringify(queryJson) },
  3510. }).trigger('reloadGrid');
  3511. });
  3512. }
  3513. function bindSubGrid17(subgrid_id, rowid) {
  3514. $("#gridList").jqGrid("setSelection", rowid, false);
  3515. var subgrid_table_id;
  3516. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3517. var subgrid_pager_id;
  3518. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3519. // (5)动态添加子报表的table和pager
  3520. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3521. var LotNo = $("#gridList").jqGrid('getRowData', rowid).LotNo;
  3522. // var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3523. // (6)创建jqGrid对象
  3524. $("#" + subgrid_table_id).dataGrid({
  3525. cellEdit: true,
  3526. url: "/DHAY/DHCreateItemLot/GetSubGridJsonBHGTM?LotNo=" + LotNo + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3527. //colModel: [
  3528. // { label: "主键", name: "ID", hidden: true, key: true },
  3529. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3530. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3531. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3532. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3533. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3534. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3535. //],
  3536. colModel: _Clos1,
  3537. //colModel: ColModelSub,
  3538. shrinkToFit: true,//宽度自适应
  3539. multiselect: true,
  3540. prmNames: { search: "search" },
  3541. viewrecords: true,
  3542. height: "100%",
  3543. rowNum: 20,
  3544. pager: subgrid_pager_id,
  3545. });
  3546. }
  3547. function gridList18() {
  3548. var $gridList = $("#gridList");
  3549. var queryJson = {
  3550. POCode: $("#txt_POCode").val(),
  3551. InvCode: $("#txt_InvCode").val(),
  3552. InvName: $("#txt_InvName").val(),
  3553. BatchCode: $("#txt_BatchCode").val(),
  3554. POStatus: $("#selShow").val()
  3555. }
  3556. $gridList.dataGrid({
  3557. url: "/DHAY/DHCreateItemLot/GetGridJsonFCP" + "?" + Math.random(),
  3558. postData: { queryJson: JSON.stringify(queryJson) },
  3559. height: $(window).height() - 200,
  3560. width: $(window).width() - 300,
  3561. colModel: _Clos,
  3562. //colModel: [
  3563. // { label: "主键", name: "ID", hidden: true, key: true },
  3564. // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' },
  3565. // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' },
  3566. // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, },
  3567. // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
  3568. // { label: '料品名称', name: 'InvName', width: 60, align: 'left', },
  3569. // { label: '数量', name: 'Quantity', width: 100, align: 'left' },
  3570. // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' },
  3571. // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' },
  3572. // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', },
  3573. // { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  3574. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3575. // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
  3576. // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
  3577. //],
  3578. //colModel: ColModelMain,
  3579. width: "100%",
  3580. autowidth: true,
  3581. //shrinkToFit: true,
  3582. gridComplete: function () {
  3583. },
  3584. pager: "#gridPager",
  3585. // sortname: 'MOCode,cast(Sequence as int)',
  3586. sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  3587. sortorder: "asc",
  3588. viewrecords: true,
  3589. multiselect: true,
  3590. //beforeSelectRow: function (rowid, e) {
  3591. // $("#gridList").jqGrid('resetSelection');
  3592. // return (true);
  3593. //},
  3594. subGrid: true, // (1)开启子表格支持
  3595. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3596. $("#gridList").jqGrid("setSelection", rowid, false);
  3597. bindSubGrid18(subgrid_id, rowid)
  3598. }
  3599. });
  3600. $("#warehouse a.btn-default").click(function () {
  3601. $("#warehouse a.btn-default").removeClass("active");
  3602. $(this).addClass("active");
  3603. $('#btn_search').trigger("click");
  3604. });
  3605. $("#btn_search").click(function () {
  3606. var warehouse = $("#warehouse a.active").attr('data-value');
  3607. var queryJson = {
  3608. POCode: $("#txt_POCode").val(),
  3609. InvCode: $("#txt_InvCode").val(),
  3610. InvName: $("#txt_InvName").val(),
  3611. BatchCode: $("#txt_BatchCode").val(),
  3612. POStatus: $("#selShow").val()
  3613. }
  3614. $gridList.jqGrid('setGridParam', {
  3615. postData: { queryJson: JSON.stringify(queryJson) },
  3616. }).trigger('reloadGrid');
  3617. });
  3618. }
  3619. function bindSubGrid18(subgrid_id, rowid) {
  3620. $("#gridList").jqGrid("setSelection", rowid, false);
  3621. var subgrid_table_id;
  3622. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3623. var subgrid_pager_id;
  3624. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3625. // (5)动态添加子报表的table和pager
  3626. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3627. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  3628. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3629. // (6)创建jqGrid对象
  3630. $("#" + subgrid_table_id).dataGrid({
  3631. cellEdit: true,
  3632. url: "/DHAY/DHCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3633. //colModel: [
  3634. // { label: "主键", name: "ID", hidden: true, key: true },
  3635. // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3636. // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3637. // { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3638. // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3639. // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3640. // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3641. //],
  3642. colModel: _Clos1,
  3643. //colModel: ColModelSub,
  3644. shrinkToFit: true,//宽度自适应
  3645. multiselect: true,
  3646. prmNames: { search: "search" },
  3647. viewrecords: true,
  3648. height: "100%",
  3649. rowNum: 20,
  3650. pager: subgrid_pager_id,
  3651. });
  3652. }
  3653. function gridList19() {
  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: "/DHAY/DHCreateItemLot/GetGridJsonMO" + "?" + Math.random(),
  3664. postData: { queryJson: JSON.stringify(queryJson) },
  3665. height: $(window).height() - 200,
  3666. width: $(window).width() - 300,
  3667. colModel: _Clos,
  3668. width: "100%",
  3669. autowidth: true,
  3670. //shrinkToFit: true,
  3671. gridComplete: function () {
  3672. },
  3673. pager: "#gridPager",
  3674. // sortname: 'MOCode,cast(Sequence as int)',
  3675. sortname: "MOCode",
  3676. sortorder: "asc",
  3677. viewrecords: true,
  3678. multiselect: true,
  3679. //beforeSelectRow: function (rowid, e) {
  3680. // $("#gridList").jqGrid('resetSelection');
  3681. // return (true);
  3682. //},
  3683. subGrid: true, // (1)开启子表格支持
  3684. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  3685. $("#gridList").jqGrid("setSelection", rowid, false);
  3686. bindSubGrid19(subgrid_id, rowid)
  3687. }
  3688. });
  3689. $("#warehouse a.btn-default").click(function () {
  3690. $("#warehouse a.btn-default").removeClass("active");
  3691. $(this).addClass("active");
  3692. $('#btn_search').trigger("click");
  3693. });
  3694. $("#btn_search").click(function () {
  3695. var warehouse = $("#warehouse a.active").attr('data-value');
  3696. var queryJson = {
  3697. POCode: $("#txt_POCode").val(),
  3698. InvCode: $("#txt_InvCode").val(),
  3699. InvName: $("#txt_InvName").val(),
  3700. BatchCode: $("#txt_BatchCode").val(),
  3701. POStatus: $("#selShow").val()
  3702. }
  3703. $gridList.jqGrid('setGridParam', {
  3704. postData: { queryJson: JSON.stringify(queryJson) },
  3705. }).trigger('reloadGrid');
  3706. });
  3707. }
  3708. function bindSubGrid19(subgrid_id, rowid) {
  3709. $("#gridList").jqGrid("setSelection", rowid, false);
  3710. var subgrid_table_id;
  3711. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  3712. var subgrid_pager_id;
  3713. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  3714. // (5)动态添加子报表的table和pager
  3715. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  3716. var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode;
  3717. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  3718. // (6)创建jqGrid对象
  3719. $("#" + subgrid_table_id).dataGrid({
  3720. cellEdit: true,
  3721. url: "/DHAY/DHCreateItemLot/GetSubGridJson1?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  3722. colModel: [
  3723. { label: "主键", name: "ID", hidden: true, key: true },
  3724. { label: "来源单据号", name: "TransCode", width: 200, align: 'left' },
  3725. { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' },
  3726. { label: '条码', name: 'LotNo', width: 200, align: 'left' },
  3727. { label: '条码数量', name: 'Quantity', width: 200, align: 'left' },
  3728. { label: '操作人', name: 'MUSERName', width: 200, align: 'left' },
  3729. { label: '操作时间', name: 'MTIME', width: 200, align: 'left' },
  3730. ],
  3731. //colModel: _Clos1,
  3732. //colModel: ColModelSub,
  3733. shrinkToFit: true,//宽度自适应
  3734. multiselect: true,
  3735. prmNames: { search: "search" },
  3736. sortname: "LotNo",
  3737. sortorder: "desc",
  3738. viewrecords: true,
  3739. height: "100%",
  3740. rowNum: 20,
  3741. pager: subgrid_pager_id,
  3742. });
  3743. }
  3744. function btnDelete() {
  3745. debugger;
  3746. var objArr = '';
  3747. var obj = $("#gridList").jqGrid("getRowData");
  3748. for (var i = 0; i < obj.length; i++) {
  3749. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  3750. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  3751. if (rowData != "undefined" && rowData != null) {
  3752. for (var j = 0; j < rowData.length; j++) {
  3753. objArr += "'" + rowData[j] + "',";
  3754. }
  3755. }
  3756. }
  3757. if (objArr == "") {
  3758. $.modalAlertNew("WMS00099");
  3759. return;
  3760. }
  3761. if (Type == '19')
  3762. {
  3763. $.deleteForm({
  3764. url: "/DHAY/DHCreateItemLot/DeleteMOLot",
  3765. param: { keyValue: JSON.stringify(objArr) },
  3766. success: function () {
  3767. $.currentWindow().$("#gridList").trigger("reloadGrid");
  3768. }
  3769. })
  3770. }
  3771. else
  3772. {
  3773. $.deleteForm({
  3774. url: "/DHAY/DHCreateItemLot/DeleteItemLot",
  3775. param: { keyValue: JSON.stringify(objArr) },
  3776. success: function () {
  3777. $.currentWindow().$("#gridList").trigger("reloadGrid");
  3778. }
  3779. })
  3780. }
  3781. }
  3782. function btnAllCreate() {
  3783. debugger;
  3784. var PoStatus;
  3785. var jsonData = '';
  3786. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  3787. //if (ids.length != 1) {
  3788. // $.modalAlertNew("WMS00100");
  3789. // return;
  3790. //}
  3791. var POCode = "";
  3792. var PORow = "";
  3793. var VenCode = "";
  3794. var WorkPoint = "";
  3795. var VendorLot = "";
  3796. //生产退料
  3797. if (Type == '1') {
  3798. debugger;
  3799. var ARR = [];
  3800. for (var i in ids) {
  3801. Code = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  3802. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  3803. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  3804. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  3805. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  3806. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  3807. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  3808. if (thisCreateQty == 0) {
  3809. $.modalAlert("该单据条码已全部生成完毕!");
  3810. return;
  3811. }
  3812. thisCreateQty = thisCreateQty.toFixed(4);
  3813. var minPackQty = thisCreateQty;//最小包装量
  3814. //minPackQty = minPackQty.toFixed(4);
  3815. var createPageCount = 1;//本次生成张数
  3816. createPageCount = createPageCount.toFixed(0);
  3817. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  3818. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  3819. Quantity = Quantity.toFixed(2);
  3820. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  3821. CreatedQty = CreatedQty.toFixed(2);
  3822. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  3823. if (Quantity == CreatedQty) {
  3824. return false;
  3825. }
  3826. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  3827. if (EffectiveEnable == 'true') {
  3828. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  3829. } else {
  3830. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  3831. }
  3832. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  3833. var obj = {
  3834. Code: Code,
  3835. Sequence: Sequence,
  3836. thisCreateQty: thisCreateQty,
  3837. minPackQty: minPackQty,
  3838. createPageCount: createPageCount,
  3839. //VendorLot: VendorLot,
  3840. PRODUCTDATE: PRODUCTDATE,
  3841. ExpirationDate: ExpirationDate,
  3842. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  3843. //自由项
  3844. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  3845. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  3846. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  3847. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  3848. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  3849. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  3850. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  3851. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  3852. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  3853. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  3854. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  3855. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  3856. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  3857. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  3858. }
  3859. ARR.push(obj);
  3860. }
  3861. $.submitForm({
  3862. url: "/DHAY/DHCreateItemLot/SubmitFormGDTLALL" + "?" + Math.random(),
  3863. param: {
  3864. keyValue: JSON.stringify(ARR)
  3865. },
  3866. success: function () {
  3867. $.currentWindow().$("#gridList").trigger("reloadGrid");
  3868. }
  3869. })
  3870. }
  3871. //普通到货单
  3872. if (Type == '7') {
  3873. debugger;
  3874. var ARR = [];
  3875. for (var i in ids) {
  3876. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  3877. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  3878. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  3879. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  3880. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  3881. //console.log("单号:" + DNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  3882. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  3883. if (thisCreateQty == 0) {
  3884. $.modalAlert("该单据条码已全部生成完毕!");
  3885. return;
  3886. }
  3887. thisCreateQty = thisCreateQty.toFixed(4);
  3888. var minPackQty = thisCreateQty;//最小包装量
  3889. //minPackQty = minPackQty.toFixed(4);
  3890. var createPageCount = 1;//本次生成张数
  3891. createPageCount = createPageCount.toFixed(0);
  3892. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  3893. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  3894. Quantity = Quantity.toFixed(2);
  3895. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  3896. CreatedQty = CreatedQty.toFixed(2);
  3897. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  3898. if (Quantity == CreatedQty) {
  3899. return false;
  3900. }
  3901. if (EffectiveEnable == 'true') {
  3902. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  3903. } else {
  3904. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  3905. }
  3906. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  3907. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  3908. var obj = {
  3909. Code: DNCode,
  3910. Sequence: Sequence,
  3911. thisCreateQty: thisCreateQty,
  3912. minPackQty: minPackQty,
  3913. createPageCount: createPageCount,
  3914. //VendorLot: VendorLot,
  3915. PRODUCTDATE: PRODUCTDATE,
  3916. ExpirationDate: ExpirationDate,
  3917. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  3918. //自由项
  3919. ProjectCode : $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  3920. BatchCode : $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  3921. Version : $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  3922. Brand : $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  3923. cFree1 : $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  3924. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  3925. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  3926. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  3927. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  3928. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  3929. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  3930. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  3931. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  3932. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  3933. }
  3934. ARR.push(obj);
  3935. }
  3936. $.submitForm({
  3937. url: "/DHAY/DHCreateItemLot/SubmitFormSHDHALL" + "?" + Math.random(),
  3938. param: {
  3939. keyValue: JSON.stringify(ARR)
  3940. },
  3941. success: function () {
  3942. $.currentWindow().$("#gridList").trigger("reloadGrid");
  3943. }
  3944. })
  3945. }
  3946. //委外到货单
  3947. if (Type == '8') {
  3948. debugger;
  3949. var ARR = [];
  3950. for (var i in ids) {
  3951. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  3952. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  3953. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  3954. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  3955. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  3956. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  3957. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  3958. if (thisCreateQty == 0) {
  3959. $.modalAlert("该单据条码已全部生成完毕!");
  3960. return;
  3961. }
  3962. thisCreateQty = thisCreateQty.toFixed(4);
  3963. var minPackQty = thisCreateQty;//最小包装量
  3964. //minPackQty = minPackQty.toFixed(4);
  3965. var createPageCount = 1;//本次生成张数
  3966. createPageCount = createPageCount.toFixed(0);
  3967. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  3968. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  3969. Quantity = Quantity.toFixed(2);
  3970. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  3971. CreatedQty = CreatedQty.toFixed(2);
  3972. console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  3973. if (Quantity == CreatedQty) {
  3974. return false;
  3975. }
  3976. if (EffectiveEnable == 'true') {
  3977. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  3978. } else {
  3979. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  3980. }
  3981. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  3982. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  3983. var obj = {
  3984. Code: ODNCode,
  3985. Sequence: Sequence,
  3986. thisCreateQty: thisCreateQty,
  3987. minPackQty: minPackQty,
  3988. createPageCount: createPageCount,
  3989. //VendorLot: VendorLot,
  3990. PRODUCTDATE: PRODUCTDATE,
  3991. ExpirationDate: ExpirationDate,
  3992. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  3993. //自由项
  3994. ProjectCode : $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  3995. BatchCode : $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  3996. Version : $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  3997. Brand : $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  3998. cFree1 : $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  3999. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  4000. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  4001. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  4002. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  4003. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  4004. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  4005. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  4006. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  4007. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  4008. }
  4009. ARR.push(obj);
  4010. }
  4011. $.submitForm({
  4012. url: "/DHAY/DHCreateItemLot/SubmitFormWWSHDHALL" + "?" + Math.random(),
  4013. param: {
  4014. keyValue: JSON.stringify(obj)
  4015. },
  4016. success: function () {
  4017. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4018. }
  4019. })
  4020. }
  4021. //成品入库单条码生成
  4022. if (Type == '9') {
  4023. debugger;
  4024. var ARR = [];
  4025. for (var i in ids) {
  4026. Code = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  4027. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4028. EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable;
  4029. EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
  4030. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  4031. // console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
  4032. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  4033. if (thisCreateQty == 0) {
  4034. $.modalAlert("该单据条码已全部生成完毕!");
  4035. return;
  4036. }
  4037. thisCreateQty = thisCreateQty.toFixed(4);
  4038. var minPackQty = thisCreateQty;//最小包装量
  4039. //minPackQty = minPackQty.toFixed(4);
  4040. var createPageCount = 1;//本次生成张数
  4041. createPageCount = createPageCount.toFixed(0);
  4042. console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
  4043. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  4044. Quantity = Quantity.toFixed(2);
  4045. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  4046. CreatedQty = CreatedQty.toFixed(2);
  4047. // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty);
  4048. if (Quantity == CreatedQty) {
  4049. return false;
  4050. }
  4051. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  4052. if (EffectiveEnable=='true') {
  4053. var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE);
  4054. } else {
  4055. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  4056. }
  4057. // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
  4058. var obj = {
  4059. Code: Code,
  4060. Sequence:Sequence,
  4061. thisCreateQty: thisCreateQty,
  4062. minPackQty: minPackQty,
  4063. createPageCount: createPageCount,
  4064. //VendorLot: VendorLot,
  4065. PRODUCTDATE: PRODUCTDATE,
  4066. ExpirationDate: ExpirationDate,
  4067. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  4068. //自由项
  4069. ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
  4070. BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
  4071. Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
  4072. Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
  4073. cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
  4074. cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
  4075. cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
  4076. cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
  4077. cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
  4078. cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
  4079. cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
  4080. cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
  4081. cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
  4082. cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '',
  4083. }
  4084. ARR.push(obj);
  4085. }
  4086. $.submitForm({
  4087. url: "/DHAY/DHCreateItemLot/SubmitFormKLCPRKALL" + "?" + Math.random(),
  4088. param: {
  4089. keyValue: JSON.stringify(ARR)
  4090. },
  4091. success: function () {
  4092. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4093. }
  4094. })
  4095. }
  4096. if (Type == '17') {
  4097. for (var i in ids) {
  4098. LotNo = $("#gridList").jqGrid('getRowData', ids[i]).LotNo;
  4099. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  4100. var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量
  4101. if (thisCreateQty==0) {
  4102. $.modalAlert("该条码已全部生成完毕!");
  4103. return;
  4104. }
  4105. thisCreateQty = thisCreateQty.toFixed(4);
  4106. var minPackQty = thisCreateQty;//最小包装量
  4107. var createPageCount = 1;//本次生成张数
  4108. createPageCount = createPageCount.toFixed(0);
  4109. var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数
  4110. Quantity = Quantity.toFixed(2);
  4111. var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量
  4112. CreatedQty = CreatedQty.toFixed(2);
  4113. if (Quantity == CreatedQty) {
  4114. return false;
  4115. }
  4116. var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期
  4117. var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
  4118. var obj = {
  4119. thisCreateQty: thisCreateQty,
  4120. minPackQty: minPackQty,
  4121. createPageCount: createPageCount,
  4122. //VendorLot: VendorLot,
  4123. PRODUCTDATE: PRODUCTDATE,
  4124. ExpirationDate: ExpirationDate,
  4125. Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
  4126. }
  4127. $.submitForm({
  4128. url: "/DHAY/DHCreateItemLot/SubmitFormBHGTM?LotNo=" + LotNo + "&WorkPoint=" + WorkPoints,
  4129. param: {
  4130. keyValue: JSON.stringify(obj)
  4131. },
  4132. success: function () {
  4133. $.currentWindow().$("#gridList").trigger("reloadGrid");
  4134. }
  4135. })
  4136. }
  4137. }
  4138. }
  4139. function dateChange(num, date) {
  4140. if (!date) {
  4141. date = new Date();//没有传入值时,默认是当前日期
  4142. date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
  4143. }
  4144. date += " 00:00:00";//设置为当天凌晨12点
  4145. date = Date.parse(new Date(date)) / 1000;//转换为时间戳
  4146. date += (86400) * num;//修改后的时间戳
  4147. var newDate = new Date(parseInt(date) * 1000);//转换为时间
  4148. return newDate.getFullYear() + '-' + (newDate.getMonth() + 1) + '-' + newDate.getDate();
  4149. }
  4150. function btnCreate() {
  4151. debugger;
  4152. var PoStatus;
  4153. var jsonData = '';
  4154. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  4155. if (ids.length != 1) {
  4156. $.modalAlertNew("WMS00100");
  4157. return;
  4158. }
  4159. var POCode = "";
  4160. var PORow = "";
  4161. if (Type == '1') {
  4162. for (var i in ids) {
  4163. ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  4164. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4165. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4166. }
  4167. $.modalOpen({
  4168. id: "FormAddItemLot",
  4169. title: "生产退料条码生成",
  4170. url: "/DHAY/DHCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&" + Math.random(),
  4171. width: "550px",
  4172. height: "1000px",
  4173. callBack: function (iframeId) {
  4174. top.frames[iframeId].submitForm();
  4175. }
  4176. });
  4177. } else if (Type == '2') {
  4178. for (var i in ids) {
  4179. OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  4180. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4181. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4182. SourceCode = $("#gridList").jqGrid('getRowData', ids[i]).SourceCode;
  4183. }
  4184. $.modalOpen({
  4185. id: "FormAddItemLot",
  4186. title: "委外退料条码生成",
  4187. url: "/DHAY/DHCreateItemLot/From?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&SourceCode=" + SourceCode + "&Type=" + 2 + "&" + Math.random(),
  4188. width: "550px",
  4189. height: "1000px",
  4190. callBack: function (iframeId) {
  4191. top.frames[iframeId].submitForm();
  4192. }
  4193. });
  4194. } else if (Type == '3') {
  4195. debugger;
  4196. for (var i in ids) {
  4197. MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
  4198. MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  4199. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4200. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4201. Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
  4202. ERPStatus = $("#gridList").jqGrid('getRowData', ids[i]).ERPStatus;
  4203. if (ERPStatus == "3") {
  4204. //$.modalAlert("工单已完工不能生成条码!");
  4205. //return;
  4206. $.modalAlertNew("WMSAPIInfo508");
  4207. return;
  4208. }
  4209. }
  4210. $.modalOpen({
  4211. id: "FormAddItemLot",
  4212. title: "成品条码产生",
  4213. url: "/DHAY/DHCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity+ "&" + Math.random(),
  4214. width: "550px",
  4215. height: "1000px",
  4216. callBack: function (iframeId) {
  4217. top.frames[iframeId].submitForm();
  4218. }
  4219. });
  4220. } else if (Type == '4') {
  4221. for (var i in ids) {
  4222. SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode;
  4223. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4224. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4225. }
  4226. $.modalOpen({
  4227. id: "FormAddItemLot",
  4228. title: "销售退货条码产生",
  4229. url: "/DHAY/DHCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&" + Math.random(),
  4230. width: "550px",
  4231. height: "1000px",
  4232. callBack: function (iframeId) {
  4233. top.frames[iframeId].submitForm();
  4234. }
  4235. });
  4236. } else if (Type == '5') {
  4237. for (var i in ids) {
  4238. InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode;
  4239. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4240. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4241. }
  4242. $.modalOpen({
  4243. id: "FormAddItemLot",
  4244. title: "其他入库条码产生",
  4245. url: "/DHAY/DHCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&" + Math.random(),
  4246. width: "550px",
  4247. height: "1000px",
  4248. callBack: function (iframeId) {
  4249. top.frames[iframeId].submitForm();
  4250. }
  4251. });
  4252. } else if (Type == '6') {
  4253. for (var i in ids) {
  4254. ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode;
  4255. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4256. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4257. }
  4258. $.modalOpen({
  4259. id: "FormAddItemLot",
  4260. title: "归还单条码产生",
  4261. url: "/DHAY/DHCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&" + Math.random(),
  4262. width: "550px",
  4263. height: "1000px",
  4264. callBack: function (iframeId) {
  4265. top.frames[iframeId].submitForm();
  4266. }
  4267. });
  4268. } else if (Type == '7') {
  4269. for (var i in ids) {
  4270. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  4271. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4272. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4273. }
  4274. $.modalOpen({
  4275. id: "FormAddItemLot",
  4276. title: "审核到货单生成条码",
  4277. url: "/DHAY/DHCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&" + Math.random(),
  4278. width: "550px",
  4279. height: "1000px",
  4280. callBack: function (iframeId) {
  4281. top.frames[iframeId].submitForm();
  4282. }
  4283. });
  4284. } else if (Type == '8') {
  4285. for (var i in ids) {
  4286. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode;
  4287. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4288. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  4289. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4290. }
  4291. $.modalOpen({
  4292. id: "FormAddItemLot",
  4293. title: "审核委外到货单生成条码",
  4294. url: "/DHAY/DHCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&OODetailID=" + OODetailID + "&" + Math.random(),
  4295. width: "550px",
  4296. height: "1000px",
  4297. callBack: function (iframeId) {
  4298. top.frames[iframeId].submitForm();
  4299. }
  4300. });
  4301. } else if (Type == '9') {
  4302. for (var i in ids) {
  4303. RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
  4304. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4305. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4306. }
  4307. $.modalOpen({
  4308. id: "FormAddItemLot",
  4309. title: "开立成品入库单生成条码",
  4310. url: "/DHAY/DHCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&" + Math.random(),
  4311. width: "550px",
  4312. height: "1000px",
  4313. callBack: function (iframeId) {
  4314. top.frames[iframeId].submitForm();
  4315. }
  4316. });
  4317. } else if (Type == '10') {
  4318. for (var i in ids) {
  4319. DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
  4320. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4321. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4322. }
  4323. $.modalOpen({
  4324. id: "FormAddItemLot",
  4325. title: "审核拒收单生成条码",
  4326. url: "/DHAY/DHCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&" + Math.random(),
  4327. width: "550px",
  4328. height: "1000px",
  4329. callBack: function (iframeId) {
  4330. top.frames[iframeId].submitForm();
  4331. }
  4332. });
  4333. } else if (Type == '11') {
  4334. for (var i in ids) {
  4335. ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  4336. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence;
  4337. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4338. }
  4339. $.modalOpen({
  4340. id: "FormAddItemLot",
  4341. title: "审核委外拒收单生成条码",
  4342. url: "/DHAY/DHCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&" + Math.random(),
  4343. width: "550px",
  4344. height: "1000px",
  4345. callBack: function (iframeId) {
  4346. top.frames[iframeId].submitForm();
  4347. }
  4348. });
  4349. } else if (Type == '12') {
  4350. for (var i in ids) {
  4351. LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  4352. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4353. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4354. }
  4355. $.modalOpen({
  4356. id: "FormAddItemLot",
  4357. title: "审核领料申请退料生成条码",
  4358. url: "/DHAY/DHCreateItemLot/From?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&" + Math.random(),
  4359. width: "550px",
  4360. height: "1000px",
  4361. callBack: function (iframeId) {
  4362. top.frames[iframeId].submitForm();
  4363. }
  4364. });
  4365. } else if (Type == '13') {
  4366. for (var i in ids) {
  4367. CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode;
  4368. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4369. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4370. SourceCode = $("#gridList").jqGrid('getRowData', ids[i]).SourceCode;
  4371. }
  4372. $.modalOpen({
  4373. id: "FormAddItemLot",
  4374. title: "材料出库退料生成条码",
  4375. url: "/DHAY/DHCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&SourceCode=" + SourceCode+ "&Type=" + 13 + "&" + Math.random(),
  4376. width: "550px",
  4377. height: "1000px",
  4378. callBack: function (iframeId) {
  4379. top.frames[iframeId].submitForm();
  4380. }
  4381. });
  4382. } else if (Type == '14') {
  4383. for (var i in ids) {
  4384. WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  4385. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4386. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4387. }
  4388. $.modalOpen({
  4389. id: "FormAddItemLot",
  4390. title: "委外领料退料条码生成",
  4391. url: "/DHAY/DHCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&" + Math.random(),
  4392. width: "550px",
  4393. height: "1000px",
  4394. callBack: function (iframeId) {
  4395. top.frames[iframeId].submitForm();
  4396. }
  4397. });
  4398. }
  4399. else if (Type == '15') {
  4400. for (var i in ids) {
  4401. WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode;
  4402. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4403. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4404. }
  4405. $.modalOpen({
  4406. id: "FormAddItemLot",
  4407. title: "委外材料出库退料生成条码",
  4408. url: "/DHAY/DHCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&" + Math.random(),
  4409. width: "550px",
  4410. height: "1000px",
  4411. callBack: function (iframeId) {
  4412. top.frames[iframeId].submitForm();
  4413. }
  4414. });
  4415. }
  4416. else if (Type == '16') {
  4417. for (var i in ids) {
  4418. FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  4419. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4420. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4421. }
  4422. $.modalOpen({
  4423. id: "FormAddItemLot",
  4424. title: "返工工单生成条码",
  4425. url: "/DHAY/DHCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&" + Math.random(),
  4426. width: "550px",
  4427. height: "1000px",
  4428. callBack: function (iframeId) {
  4429. top.frames[iframeId].submitForm();
  4430. }
  4431. });
  4432. }
  4433. else if (Type == '18') {
  4434. for (var i in ids) {
  4435. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  4436. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4437. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  4438. }
  4439. $.modalOpen({
  4440. id: "FormAddItemLot",
  4441. title: "副产品生成条码",
  4442. url: "/DHAY/DHCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&" + Math.random(),
  4443. width: "550px",
  4444. height: "1000px",
  4445. callBack: function (iframeId) {
  4446. top.frames[iframeId].submitForm();
  4447. }
  4448. });
  4449. }
  4450. else if (Type == '19') {
  4451. for (var i in ids) {
  4452. FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
  4453. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  4454. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  4455. }
  4456. $.modalOpen({
  4457. id: "FormAddItemLot",
  4458. title: "生产订单生成条码",
  4459. url: "/DHAY/DHCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 19 + "&" + Math.random(),
  4460. width: "550px",
  4461. height: "1000px",
  4462. callBack: function (iframeId) {
  4463. top.frames[iframeId].submitForm();
  4464. }
  4465. });
  4466. }
  4467. }
  4468. function fullscreen() {
  4469. var docElm = document.documentElement;
  4470. if (docElm.requestFullscreen) {
  4471. docElm.requestFullscreen();
  4472. } else if (docElm.mozRequestFullScreen) {
  4473. docElm.mozRequestFullScreen();
  4474. } else if (docElm.webkitRequestFullScreen) {
  4475. docElm.webkitRequestFullScreen();
  4476. } else if (docElm.msRequestFullscreen) {
  4477. docElm.msRequestFullscreen();
  4478. }
  4479. $(window).bind('resize', function () {
  4480. $("#gridList").setGridWidth($(window).width());
  4481. }).trigger('resize');
  4482. $(window).bind('resize', function () {
  4483. $("#gridList").setGridHeight($(window).height());
  4484. }).trigger('resize');
  4485. }
  4486. function btnPrint() {
  4487. debugger;
  4488. if (mold == '')
  4489. {
  4490. if (Type == '1') { mold = '00001'; }//生产退料生成条码
  4491. if (Type == '2') { mold = '00002'; }//委外退料生成条码
  4492. if (Type == '3') { mold = '00003'; }//工单成品生成条码
  4493. if (Type == '4') { mold = '00004'; }//销售退货生成条码
  4494. if (Type == '5') { mold = '00005'; }//其他入库生成条码
  4495. if (Type == '6') { mold = '00006'; }//归还单生成条码
  4496. if (Type == '7') { mold = '00007'; }//普通到货单生成条码
  4497. if (Type == '8') { mold = '00008'; }//委外到货单生成条码
  4498. if (Type == '9') { mold = '00009'; }//成品入库单生成条码
  4499. if (Type == '10') { mold = '00010'; }//拒收单生成条码
  4500. if (Type == '11') { mold = '00011'; }//委外拒收单生成条码
  4501. if (Type == '12') { mold = '00012'; }//领料申请退料
  4502. if (Type == '13') { mold = '00013'; }//材料出库退料
  4503. if (Type == '14') { mold = '00014'; }//委外领料申请退料
  4504. if (Type == '15') { mold = '00015'; }//委外材料出库退料
  4505. if (Type == '16') { mold = '00016'; }//返工工单
  4506. if (Type == '17') { mold = 'BHG00001'; }//不合格条码入库
  4507. if (Type == '18') { mold = 'FCP00001'; }//副产品生成条码
  4508. if (Type == '19') { mold = 'MO00001'; }//生产订单生成条码
  4509. }
  4510. var objArr ='';
  4511. var arr = [];
  4512. var obj = $("#gridList").jqGrid("getRowData");
  4513. for (var i = 0; i < obj.length; i++) {
  4514. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  4515. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  4516. //var rowData = $SubGird.jqGrid("getRowData");
  4517. if (rowData != "undefined" && rowData != null && rowData.length != 0) {
  4518. for (var j = 0; j < rowData.length; j++) {
  4519. objArr += "'" + rowData[j] + "',";
  4520. }
  4521. //objArr = "" + objArr + "|";
  4522. }
  4523. }
  4524. //objArr = objArr.slice(0, objArr.length - 1);
  4525. arr.push(objArr);
  4526. if (objArr == "") {
  4527. $.modalAlertNew("WMS00101");
  4528. return;
  4529. }
  4530. $.modalOpen({
  4531. id: "PrintLot",
  4532. title: "打印",
  4533. url: "/WMS/Print/PrintView?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(),
  4534. width: "550px",
  4535. height: "1000px",
  4536. callBack: function (iframeId) {
  4537. top.frames[iframeId].submitForm();
  4538. }
  4539. });
  4540. }
  4541. function btn_ExportAll() {
  4542. debugger;
  4543. var objArr = '';
  4544. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  4545. for (var i in ids) {
  4546. objArr += "'" + $("#gridList").jqGrid('getRowData', ids[i]).ID + "',";
  4547. }
  4548. if (objArr=="") {
  4549. $.modalAlert("请选择单据后导出!");
  4550. return;
  4551. }
  4552. var postData = "&Type=" + Type + "";
  4553. //postData += "&ID=" + ID
  4554. postData += "&ID=" + objArr;
  4555. $.download("/DHAY/DHCreateItemLot/StatementExportAll" + "?" + Math.random(), postData, 'post');
  4556. }
  4557. function Select_SelGDLX() {
  4558. $("#SelGDLX").find("option").remove();
  4559. var DeptName = $("#SelGDLX option:checked").text();
  4560. $("#SelGDLX").append("<option value=''>--请选择--</option>");
  4561. $.ajax({
  4562. url: "/DHAY/DHCreateItemLot/SelGDLX" + "?" + Math.random(),
  4563. dataType: "json",
  4564. async: false,
  4565. success: function (data) {
  4566. if (data != null && data.length > 0) {
  4567. for (var i = 0; i < data.length; i++) {
  4568. $("#SelGDLX").append("<option value='" + data[i].Code + "'>" + data[i].Name + "</option>");
  4569. }
  4570. }
  4571. }
  4572. });
  4573. $("#SelGDLX option:checked").val('');
  4574. }
  4575. function btnCreateLook() {
  4576. var MODetailID = '';
  4577. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  4578. for (var i = 0; i < objList.length; i++) {
  4579. var rowId = objList[i];
  4580. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  4581. MODetailID = rowData.MODetailID;
  4582. }
  4583. $.modalOpenClean({
  4584. id: "FormMoPick",
  4585. title: "工单子件信息",
  4586. url: "/DHAY/DHCreateItemLot/FormMoPick" + "?" + Math.random() + "&MODetailID=" + MODetailID,
  4587. width: "90%",
  4588. height: "90%",
  4589. callBack: function (iframeId) {
  4590. top.frames[iframeId].submitForm();
  4591. }
  4592. });
  4593. }
  4594. function btn_Import() {
  4595. $.modalOpen({
  4596. id: "Upload",
  4597. title: "导入",
  4598. url: "/DHAY/DHCreateItemLot/ImportLot?" + Math.random(),
  4599. width: "400px",
  4600. height: "200px",
  4601. btn: null,
  4602. });
  4603. }
  4604. </script>
  4605. <iframe id="ifrm" src="" width="0" height="0"></iframe>
  4606. <script>
  4607. </script>
  4608. <div class="topPanel" style="height:150px;">
  4609. <div class="toolbar">
  4610. <div class="btn-group">
  4611. <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>
  4612. <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>
  4613. <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>
  4614. <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>
  4615. <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>
  4616. @*<a id="NF-ExportAll" authorize="yes" class="btn btn-default" onclick="btn_ExportAll()"><i class="fa fa-download"></i>导出</a>*@
  4617. <a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
  4618. </div>
  4619. <div class="btn-group" style="display:block;padding-left:2px;">
  4620. <a class="btn btn-primary" id="downPrintControl" href="~/PrintActivex.exe" style="display:none">点击下载打印组件</a>
  4621. <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>
  4622. <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>
  4623. </div>
  4624. <script>$('.toolbar').authorizeButton()</script>
  4625. </div>
  4626. <div class="search">
  4627. <table>
  4628. <tr>
  4629. <td class="POCodeShow" style="text-align:right;"><label class="lglabel " id="POCodeShowLable" for="txt_POCode">&nbsp;&nbsp;&nbsp;&nbsp;</label>:</td>
  4630. <td class="POCodeShow">
  4631. <div class="input-group">
  4632. <input id="txt_POCode" type="text" class="form-control" style="width: 130px;">
  4633. </div>
  4634. </td>
  4635. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenCode">&nbsp;&nbsp;&nbsp;&nbsp;供应商代码</label>:</td>
  4636. <td class="HideItems">
  4637. <div class="input-group HideItems">
  4638. <input id="txt_VenCode" type="text" class="form-control HideItems" style="width: 130px;">
  4639. </div>
  4640. </td>
  4641. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;供应商名称</label>:</td>
  4642. <td class="HideItems">
  4643. <div class="input-group HideItems">
  4644. <input id="txt_VenName" type="text" class="form-control HideItems" style="width: 130px;">
  4645. </div>
  4646. </td>
  4647. <td class="HideItems2" style="text-align:right;"><label class="lglabel HideItems2" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;源头单据号</label>:</td>
  4648. <td class="HideItems2">
  4649. <div class="input-group HideItems2">
  4650. <input id="txt_SCode" type="text" class="form-control HideItems2" style="width: 130px;">
  4651. </div>
  4652. </td>
  4653. <td class="HideItems3" style="text-align:right;"><label class="lglabel HideItems3" for="txt_U8InvCode">&nbsp;&nbsp;&nbsp;&nbsp;U8物料号</label>:</td>
  4654. <td class="HideItems3">
  4655. <div class="input-group HideItems3">
  4656. <input id="txt_U8InvCode" type="text" class="form-control HideItems3" style="width: 130px;">
  4657. </div>
  4658. </td>
  4659. <td class="HideItems3" style="text-align:right;"><label class="lglabel HideItems3" for="txt_CusInvCode">&nbsp;&nbsp;&nbsp;&nbsp;客户料号</label>:</td>
  4660. <td class="HideItems3">
  4661. <div class="input-group HideItems3">
  4662. <input id="txt_CusInvCode" type="text" class="form-control HideItems3" style="width: 130px;">
  4663. </div>
  4664. </td>
  4665. <td class="HideItems3" style="text-align:right;"><label class="lglabel HideItems3" for="txt_CusBatch">&nbsp;&nbsp;&nbsp;&nbsp;客户批次</label>:</td>
  4666. <td class="HideItems3">
  4667. <div class="input-group HideItems3">
  4668. <input id="txt_CusBatch" type="text" class="form-control HideItems3" style="width: 130px;">
  4669. </div>
  4670. </td>
  4671. <td class="HideTxt" style="text-align:right;"><label class="lglabel HideTxt" for="TimeFrom ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;开始时间</label>:</td>
  4672. <td>
  4673. <div class="input-group HideTxt">
  4674. <input id="TimeFrom" name="Time" type="text" class="form-control required" style="width:80px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" placeholder="日期(从)" />
  4675. </div>
  4676. </td>
  4677. <td class="HideTxt" style="text-align:right;"><label class="lglabel HideTxt" for="TimeArrive">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;结束时间</label>:</td>
  4678. <td>
  4679. <div class="input-group HideTxt">
  4680. <input id="TimeArrive" name="Time" type="text" class="form-control required" style="width:80px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" placeholder="日期(到)" />
  4681. </div>
  4682. </td>
  4683. </tr>
  4684. <tr>
  4685. <td style="text-align:right;"><label class="lglabel" for="txt_InvCode">&nbsp;&nbsp;&nbsp;&nbsp;料品编码</label>:</td>
  4686. <td>
  4687. <div class="input-group">
  4688. <input id="txt_InvCode" type="text" class="form-control" style="width: 130px;">
  4689. </div>
  4690. </td>
  4691. <td style="text-align:right;"><label class="lglabel" for="txt_InvName">&nbsp;&nbsp;&nbsp;&nbsp;料品名称</label>:</td>
  4692. <td>
  4693. <div class="input-group">
  4694. <input id="txt_InvName" type="text" class="form-control" style="width: 130px;">
  4695. </div>
  4696. </td>
  4697. <td style="text-align:right;"><label class="lglabel" for="txt_BatchCode">&nbsp;&nbsp;&nbsp;&nbsp;批次号</label>:</td>
  4698. <td>
  4699. <div class="input-group">
  4700. <input id="txt_BatchCode" type="text" class="form-control" style="width: 130px;">
  4701. </div>
  4702. </td>
  4703. <td>
  4704. <label>&nbsp;&nbsp;&nbsp;是否全部生成:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  4705. </td>
  4706. <td>
  4707. <div class="input-group">
  4708. <select id="selShow" name="F_Target" class="form-control" style="width: 130px;">
  4709. <option value="0">显示全部</option>
  4710. <option value="1">已全部生成</option>
  4711. <option value="2" selected="selected">未全部生成</option>
  4712. </select>
  4713. </div>
  4714. </td>
  4715. <td id="GDLX">
  4716. <label>&nbsp;&nbsp;&nbsp;工单类型:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  4717. </td>
  4718. <td id="GDLX2">
  4719. <div class="input-group">
  4720. <select id="SelGDLX" name="SelShow" class="form-control" style="width: 130px;">
  4721. </select>
  4722. </div>
  4723. </td>
  4724. @*<td class="GDLX" style="display:none">
  4725. <label>&nbsp;&nbsp;&nbsp;工单类型:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  4726. </td>
  4727. <td class="GDLX" style="display:none">
  4728. <div class="input-group">
  4729. <select id="selShow" name="F_Target" class="form-control" style="width: 100px;">
  4730. <option value="0">显示全部</option>
  4731. <option value="1">已全部生成</option>
  4732. <option value="2" selected="selected">未全部生成</option>
  4733. </select>
  4734. </div>
  4735. </td>*@
  4736. </tr>
  4737. <tr>
  4738. <td class="HideItems4" style="text-align:right;"><label class="lglabel HideItems4" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;工单号</label>:</td>
  4739. <td class="HideItems4">
  4740. <div class="input-group HideItems4">
  4741. <input id="txt_MOCode" type="text" class="form-control HideItems4" style="width: 130px;">
  4742. </div>
  4743. </td>
  4744. <td class="HideTxt2" style="text-align:right;"><label class="lglabel HideTxt2" for="txt_CreateTime ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;创建时间</label>:</td>
  4745. <td class="HideTxt2">
  4746. <div class="input-group HideTxt2">
  4747. <input id="txt_CreateTime" name="Time" type="text" class="form-control HideTxt2" style="width:80px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" placeholder="创建时间" />
  4748. </div>
  4749. </td>
  4750. <td class="HideItems5" style="text-align:right;"><label class="lglabel HideItems5" for="txt_Creater">&nbsp;&nbsp;&nbsp;&nbsp;创建人</label>:</td>
  4751. <td class="HideItems5">
  4752. <div class="input-group HideItems5">
  4753. <input id="txt_Creater" type="text" class="form-control HideItems5" style="width: 130px;">
  4754. </div>
  4755. </td>
  4756. <td class="HideItems6" style="text-align:right;"><label class="lglabel HideItems6" for="txt_CustomerName">&nbsp;&nbsp;&nbsp;&nbsp;客户名称</label>:</td>
  4757. <td class="HideItems6">
  4758. <div class="input-group HideItems6">
  4759. <input id="txt_CustomerName" type="text" class="form-control HideItems6" style="width: 130px;">
  4760. </div>
  4761. </td>
  4762. <td>
  4763. <span class="input-group-btn">
  4764. <button id="btn_search" type="button" class="btn btn-primary"><i class="fa fa-search"></i></button>
  4765. </span>
  4766. </td>
  4767. </tr>
  4768. </table>
  4769. </div>
  4770. </div>
  4771. <div class="gridPanel">
  4772. <table id="gridList"></table>
  4773. <div id="gridPager"></div>
  4774. </div>