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.

744 lines
34 KiB

  1. @{
  2. ViewBag.Title = "Index";
  3. Layout = "~/Views/Shared/_Index.cshtml";
  4. }
  5. <script>
  6. debugger;
  7. var _Clos = new Array();
  8. var Type = $.request("Type");
  9. var Name = "单据号";
  10. var ColOOdelMain = [];
  11. var ColOOdelSub = [];
  12. $(function () {
  13. SetCols();
  14. if (Type == '201' ) {
  15. $(".HideItems").css('display', 'none');
  16. }
  17. $("#POCodeShowLable").text(Name);
  18. if (Type != '201') {
  19. $("#GDLX").css('display', 'none');
  20. $("#GDLX2").css('display', 'none');
  21. }
  22. if (Type == '201') {
  23. $(".GDLX").css('display', 'block');
  24. Select_SelGDLX();
  25. gridList201();
  26. }
  27. //副产品
  28. if (Type == '20') {
  29. gridList20();
  30. }
  31. })
  32. function SetCols() {
  33. $.ajax({
  34. url: "/Print/SelectColumnName?" + Math.random(),
  35. dataType: "json",
  36. async: false,
  37. success: function (data) {
  38. var cols = new Array();
  39. var cols1 = new Array();
  40. if (Type == '201') {
  41. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  42. cols.push(collast);
  43. var collast = { label: '工单号', name: 'OOCode', width: 120, align: 'left' };
  44. cols.push(collast);
  45. var collast = { label: '工单行号', name: 'Sequence', width: 50, align: 'left' };
  46. cols.push(collast);
  47. var collast = { label: 'ERP工单行ID', name: 'OODetailID', hidden: true };
  48. cols.push(collast);
  49. var collast = { label: '已入库数量', name: 'RCVQuantity', hidden: true, };
  50. cols.push(collast);
  51. var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
  52. cols.push(collast);
  53. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  54. cols.push(collast);
  55. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  56. cols.push(collast);
  57. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  58. cols.push(collast);
  59. var collast = {
  60. label: "状态", name: "OOStatus", width: 60, align: "left",
  61. formatter: function (cellvalue) {
  62. if (cellvalue == "1") {
  63. return "初始";
  64. } else if (cellvalue == "2") {
  65. return "下发";
  66. }
  67. else if (cellvalue == "3") {
  68. return "关单";
  69. }
  70. else { return ""; }
  71. }
  72. };
  73. cols.push(collast);
  74. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  75. cols.push(collast);
  76. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  77. cols.push(collast);
  78. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  79. //cols.push(collast);
  80. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  81. cols.push(collast);
  82. var collast = { label: '可入库数量', name: 'ERPNum', width: 100, align: 'left' };
  83. cols.push(collast);
  84. var collast = { label: '工单备注', name: 'OOMemo', width: 100, align: 'left' };
  85. cols.push(collast);
  86. $.ajax({
  87. url: "/Print/SelectTableColumnName?" + Math.random(),
  88. dataType: "json",
  89. async: false,
  90. success: function (data) {
  91. if (data != null && data.length > 0) {
  92. DateList = data;
  93. for (var i = 0; i < data.length; i++) {
  94. var TableCode = data[i].TableCode;
  95. if (TableCode == "ICSOO") {
  96. var Code = data[i].Code;
  97. var Name = data[i].Name;
  98. var obj = new Array();
  99. obj = {
  100. label: Name,
  101. name: Code,
  102. width: 80,
  103. align: "left"
  104. }
  105. cols.push(obj);
  106. }
  107. if (TableCode == "ICSInventory") {
  108. var Code = data[i].Code;
  109. var Name = data[i].Name;
  110. var obj = new Array();
  111. obj = {
  112. label: Name,
  113. name: Code,
  114. width: 80,
  115. align: "left"
  116. }
  117. cols.push(obj);
  118. //cols1.push(obj);
  119. }
  120. }
  121. }
  122. _Clos = cols;
  123. //_Clos1 = cols1;
  124. }
  125. });
  126. }
  127. //副产品生成条码
  128. if (Type == '20') {
  129. var collast = { label: "主键", name: "ID", hidden: true, key: true };
  130. cols.push(collast);
  131. var collast = { label: '工单号', name: 'OOCode', width: 120, align: 'left' };
  132. cols.push(collast);
  133. var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' };
  134. cols.push(collast);
  135. var collast = { label: '备料表ID', name: 'PickID', hidden: true, };
  136. cols.push(collast);
  137. var collast = { label: '料品编码(子)', name: 'ZInvCode', width: 100, align: 'left' };
  138. cols.push(collast);
  139. var collast = { label: '料品编码(母)', name: 'MInvCode', width: 100, align: 'left' };
  140. cols.push(collast);
  141. var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', };
  142. cols.push(collast);
  143. var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
  144. cols.push(collast);
  145. var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' };
  146. cols.push(collast);
  147. var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' };
  148. cols.push(collast);
  149. var collast = { label: '规格型号', name: 'InvStd', width: 60, align: 'left', };
  150. cols.push(collast);
  151. var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
  152. cols.push(collast);
  153. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  154. //cols.push(collast);
  155. var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', };
  156. cols.push(collast);
  157. var collast = { label: '工单关联ID', name: 'OODetailID', hidden: true };
  158. cols.push(collast);
  159. //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
  160. //cols.push(collast);
  161. $.ajax({
  162. url: "/Print/SelectTableColumnName?" + Math.random(),
  163. dataType: "json",
  164. async: false,
  165. success: function (data) {
  166. if (data != null && data.length > 0) {
  167. DateList = data;
  168. for (var i = 0; i < data.length; i++) {
  169. var TableCode = data[i].TableCode;
  170. if (TableCode == "ICSOOPick") {
  171. var Code = data[i].Code;
  172. var Name = data[i].Name;
  173. var obj = new Array();
  174. obj = {
  175. label: Name,
  176. name: Code,
  177. width: 80,
  178. align: "left"
  179. }
  180. cols.push(obj);
  181. }
  182. if (TableCode == "ICSInventory") {
  183. var Code = data[i].Code;
  184. var Name = data[i].Name;
  185. var obj = new Array();
  186. obj = {
  187. label: Name,
  188. name: Code,
  189. width: 80,
  190. align: "left"
  191. }
  192. cols.push(obj);
  193. //cols1.push(obj);
  194. }
  195. }
  196. }
  197. _Clos = cols;
  198. //_Clos1 = cols1;
  199. }
  200. });
  201. }
  202. var cols1 = new Array();
  203. var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
  204. cols1.push(collast1);
  205. var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' };
  206. cols1.push(collast1);
  207. var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' };
  208. cols1.push(collast1);
  209. var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
  210. cols1.push(collast1);
  211. var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' };
  212. cols1.push(collast1);
  213. var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' };
  214. cols1.push(collast1);
  215. var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' };
  216. cols1.push(collast1);
  217. var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' };
  218. cols1.push(collast1);
  219. var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' };
  220. cols1.push(collast1);
  221. var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' };
  222. cols1.push(collast1);
  223. var collast1 = { label: '是否检验', name: 'isInspection', width: 100, align: 'left' };
  224. cols1.push(collast1);
  225. var collast1 = { label: '是否免检', name: 'isExemption', width: 100, align: 'left' };
  226. cols1.push(collast1);
  227. var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' };
  228. cols1.push(collast1);
  229. var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' };
  230. cols1.push(collast1);
  231. if (data != null && data.length > 0) {
  232. DateList = data;
  233. for (var i = 0; i < data.length; i++) {
  234. var ColName = data[i].ColName;
  235. var ColCode = data[i].ColCode;
  236. var obj = new Array();
  237. obj = {
  238. label: ColName,
  239. name: ColCode,
  240. width: 80,
  241. align: "left"
  242. }
  243. cols.push(obj);
  244. cols1.push(obj);
  245. }
  246. }
  247. _Clos = cols;
  248. _Clos1 = cols1;
  249. }
  250. });
  251. }
  252. //成品
  253. function gridList201() {
  254. var $gridList = $("#gridList");
  255. var queryJson = {
  256. POCode: $("#txt_POCode").val(),
  257. InvCode: $("#txt_InvCode").val(),
  258. InvName: $("#txt_InvName").val(),
  259. BatchCode: $("#txt_BatchCode").val(),
  260. POStatus: $("#selShow").val(),
  261. SelGDLX: $("#SelGDLX option:checked").val(),
  262. }
  263. $gridList.dataGrid({
  264. url: "/OMAY/ICSOOCreateLot/GetGridJsonChengPing" + "?" + Math.random(),
  265. postData: { queryJson: JSON.stringify(queryJson) },
  266. height: $(window).height() - 200,
  267. width: $(window).width() - 300,
  268. colModel: _Clos,
  269. width: "100%",
  270. autowidth: true,
  271. //shrinkToFit: true,
  272. gridComplete: function () {
  273. },
  274. pager: "#gridPager",
  275. //sortname: 'MOCode,cast(Sequence as int)',
  276. sortname: "OOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  277. sortorder: "asc",
  278. viewrecords: true,
  279. multiselect: true,
  280. //beforeSelectRow: function (rowid, e) {
  281. // $("#gridList").jqGrid('resetSelection');
  282. // return (true);
  283. //},
  284. subGrid: true, // (1)开启子表格支持
  285. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  286. $("#gridList").jqGrid("setSelection", rowid, false);
  287. bindSubGrid201(subgrid_id, rowid)
  288. }
  289. });
  290. $("#warehouse a.btn-default").click(function () {
  291. $("#warehouse a.btn-default").removeClass("active");
  292. $(this).addClass("active");
  293. $('#btn_search').trigger("click");
  294. });
  295. $("#btn_search").click(function () {
  296. var warehouse = $("#warehouse a.active").attr('data-value');
  297. var queryJson = {
  298. POCode: $("#txt_POCode").val(),
  299. InvCode: $("#txt_InvCode").val(),
  300. InvName: $("#txt_InvName").val(),
  301. BatchCode: $("#txt_BatchCode").val(),
  302. POStatus: $("#selShow").val(),
  303. SelGDLX: $("#SelGDLX option:checked").val(),
  304. }
  305. $gridList.jqGrid('setGridParam', {
  306. postData: { queryJson: JSON.stringify(queryJson) },
  307. }).trigger('reloadGrid');
  308. });
  309. }
  310. function bindSubGrid201(subgrid_id, rowid) {
  311. $("#gridList").jqGrid("setSelection", rowid, false);
  312. var subgrid_table_id;
  313. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  314. var subgrid_pager_id;
  315. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  316. // (5)动态添加子报表的table和pager
  317. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  318. var OOCode = $("#gridList").jqGrid('getRowData', rowid).OOCode;
  319. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  320. // (6)创建jqGrid对象
  321. $("#" + subgrid_table_id).dataGrid({
  322. cellEdit: true,
  323. url: "/OMAY/ICSOOCreateLot/GetSubGridJson?ApplyNegCode=" + OOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  324. colModel: _Clos1,
  325. //colModel: ColModelSub,
  326. shrinkToFit: true,//宽度自适应
  327. multiselect: true,
  328. prmNames: { search: "search" },
  329. viewrecords: true,
  330. height: "100%",
  331. rowNum: 20,
  332. pager: subgrid_pager_id,
  333. });
  334. }
  335. function gridList20() {
  336. var $gridList = $("#gridList");
  337. var queryJson = {
  338. POCode: $("#txt_POCode").val(),
  339. InvCode: $("#txt_InvCode").val(),
  340. InvName: $("#txt_InvName").val(),
  341. BatchCode: $("#txt_BatchCode").val(),
  342. POStatus: $("#selShow").val()
  343. }
  344. $gridList.dataGrid({
  345. url: "/OMAY/ICSOOCreateLot/GetGridJsonOOPick" + "?" + Math.random(),
  346. postData: { queryJson: JSON.stringify(queryJson) },
  347. height: $(window).height() - 200,
  348. width: $(window).width() - 300,
  349. colModel: _Clos,
  350. width: "100%",
  351. autowidth: true,
  352. //shrinkToFit: true,
  353. gridComplete: function () {
  354. },
  355. pager: "#gridPager",
  356. // sortname: 'MOCode,cast(Sequence as int)',
  357. sortname: "OOCode,REPLICATE('0',10-len(Sequence))+Sequence ",
  358. sortorder: "asc",
  359. viewrecords: true,
  360. multiselect: true,
  361. //beforeSelectRow: function (rowid, e) {
  362. // $("#gridList").jqGrid('resetSelection');
  363. // return (true);
  364. //},
  365. subGrid: true, // (1)开启子表格支持
  366. subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
  367. $("#gridList").jqGrid("setSelection", rowid, false);
  368. bindSubGrid20(subgrid_id, rowid)
  369. }
  370. });
  371. $("#warehouse a.btn-default").click(function () {
  372. $("#warehouse a.btn-default").removeClass("active");
  373. $(this).addClass("active");
  374. $('#btn_search').trigger("click");
  375. });
  376. $("#btn_search").click(function () {
  377. var warehouse = $("#warehouse a.active").attr('data-value');
  378. var queryJson = {
  379. POCode: $("#txt_POCode").val(),
  380. InvCode: $("#txt_InvCode").val(),
  381. InvName: $("#txt_InvName").val(),
  382. BatchCode: $("#txt_BatchCode").val(),
  383. POStatus: $("#selShow").val()
  384. }
  385. $gridList.jqGrid('setGridParam', {
  386. postData: { queryJson: JSON.stringify(queryJson) },
  387. }).trigger('reloadGrid');
  388. });
  389. }
  390. function bindSubGrid20(subgrid_id, rowid) {
  391. $("#gridList").jqGrid("setSelection", rowid, false);
  392. var subgrid_table_id;
  393. subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
  394. var subgrid_pager_id;
  395. subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
  396. // (5)动态添加子报表的table和pager
  397. $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
  398. var OOCode = $("#gridList").jqGrid('getRowData', rowid).OOCode;
  399. var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence;
  400. // (6)创建jqGrid对象
  401. $("#" + subgrid_table_id).dataGrid({
  402. cellEdit: true,
  403. url: "/OMAY/ICSOOCreateLot/GetSubGridJson?ApplyNegCode=" + OOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
  404. colModel: _Clos1,
  405. //colModel: ColModelSub,
  406. shrinkToFit: true,//宽度自适应
  407. multiselect: true,
  408. prmNames: { search: "search" },
  409. viewrecords: true,
  410. height: "100%",
  411. rowNum: 20,
  412. pager: subgrid_pager_id,
  413. });
  414. }
  415. function btnDelete() {
  416. var objArr = '';
  417. var obj = $("#gridList").jqGrid("getRowData");
  418. for (var i = 0; i < obj.length; i++) {
  419. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  420. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  421. if (rowData != "undefined" && rowData != null) {
  422. for (var j = 0; j < rowData.length; j++) {
  423. objArr += "'" + rowData[j] + "',";
  424. }
  425. }
  426. }
  427. if (objArr == "") {
  428. $.modalAlertNew("WMS00099");
  429. return;
  430. }
  431. $.deleteForm({
  432. url: "/WMS/WMSCreateItemLot/DeleteItemLot",
  433. param: { keyValue: JSON.stringify(objArr) },
  434. success: function () {
  435. $.currentWindow().$("#gridList").trigger("reloadGrid");
  436. }
  437. })
  438. }
  439. function dateChange(num, date) {
  440. if (!date) {
  441. date = new Date();//没有传入值时,默认是当前日期
  442. date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
  443. }
  444. date += " 00:00:00";//设置为当天凌晨12点
  445. date = Date.parse(new Date(date)) / 1000;//转换为时间戳
  446. date += (86400) * num;//修改后的时间戳
  447. var newDate = new Date(parseInt(date) * 1000);//转换为时间
  448. return newDate.getFullYear() + '-' + (newDate.getMonth() + 1) + '-' + newDate.getDate();
  449. }
  450. function btnCreate() {
  451. debugger;
  452. var PoStatus;
  453. var jsonData = '';
  454. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
  455. if (ids.length != 1) {
  456. $.modalAlertNew("WMS00100");
  457. return;
  458. }
  459. var POCode = "";
  460. var PORow = "";
  461. if (Type == '201') {
  462. for (var i in ids) {
  463. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  464. OOCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  465. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  466. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
  467. }
  468. $.modalOpen({
  469. id: "FormAddItemLot",
  470. title: "委外条码产生",
  471. url: "/OMAY/ICSOOCreateLot/OOFrom?OOCode=" + encodeURI(encodeURI(OOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&OODetailID=" + OODetailID + "&" + Math.random(),
  472. width: "550px",
  473. height: "1000px",
  474. callBack: function (iframeId) {
  475. top.frames[iframeId].submitForm();
  476. }
  477. });
  478. }
  479. else if (Type == '20') {
  480. for (var i in ids) {
  481. OOPickCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode;
  482. Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
  483. OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID;
  484. InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
  485. }
  486. $.modalOpen({
  487. id: "FormAddItemLot",
  488. title: "委外备料条码生成",
  489. url: "/OMAY/ICSOOCreateLot/OOFrom?OOPickCode=" + encodeURI(encodeURI(OOPickCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&OODetailID=" + OODetailID + "&" + Math.random(),
  490. width: "550px",
  491. height: "1000px",
  492. callBack: function (iframeId) {
  493. top.frames[iframeId].submitForm();
  494. }
  495. });
  496. }
  497. }
  498. function fullscreen() {
  499. var docElm = document.documentElement;
  500. if (docElm.requestFullscreen) {
  501. docElm.requestFullscreen();
  502. } else if (docElm.mozRequestFullScreen) {
  503. docElm.mozRequestFullScreen();
  504. } else if (docElm.webkitRequestFullScreen) {
  505. docElm.webkitRequestFullScreen();
  506. } else if (docElm.msRequestFullscreen) {
  507. docElm.msRequestFullscreen();
  508. }
  509. $(window).bind('resize', function () {
  510. $("#gridList").setGridWidth($(window).width());
  511. }).trigger('resize');
  512. $(window).bind('resize', function () {
  513. $("#gridList").setGridHeight($(window).height());
  514. }).trigger('resize');
  515. }
  516. function btnPrint() {
  517. debugger;
  518. var OOld = '';
  519. if (Type == '201') { OOld = '00003'; }//工单成品生成条码
  520. if (Type == '20') { OOld = 'FCP00001'; }//副产品生成条码
  521. var objArr = '';
  522. var arr = [];
  523. var obj = $("#gridList").jqGrid("getRowData");
  524. for (var i = 0; i < obj.length; i++) {
  525. var $SubGird = $("#gridList_" + obj[i].ID + "_t");
  526. var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow');
  527. if (rowData != "undefined" && rowData != null && rowData.length != 0) {
  528. for (var j = 0; j < rowData.length; j++) {
  529. objArr += "'" + rowData[j] + "',";
  530. }
  531. objArr = objArr.slice(0, objArr.length - 1);
  532. objArr = "" + objArr + "|";
  533. arr.push(objArr);
  534. }
  535. }
  536. if (objArr == "") {
  537. $.modalAlertNew("WMS00101");
  538. return;
  539. }
  540. $.modalOpen({
  541. id: "PrintLot",
  542. title: "打印",
  543. url: "/WMS/Print/PrintView?Arguments=" + encodeURI(encodeURI(arr)) + "&OOld=" + OOld + "&" + Math.random(),
  544. width: "550px",
  545. height: "1000px",
  546. callBack: function (iframeId) {
  547. top.frames[iframeId].submitForm();
  548. }
  549. });
  550. }
  551. function btn_ExportAll() {
  552. debugger;
  553. var objArr = '';
  554. var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  555. for (var i in ids) {
  556. objArr += "'" + $("#gridList").jqGrid('getRowData', ids[i]).ID + "',";
  557. }
  558. if (objArr=="") {
  559. $.modalAlert("请选择单据后导出!");
  560. return;
  561. }
  562. var postData = "&Type=" + Type + "";
  563. //postData += "&ID=" + ID
  564. postData += "&ID=" + objArr;
  565. $.download("/WMS/WMSCreateItemLot/StatementExportAll" + "?" + Math.random(), postData, 'post');
  566. }
  567. function Select_SelGDLX() {
  568. $("#SelGDLX").find("option").remove();
  569. var DeptName = $("#SelGDLX option:checked").text();
  570. $("#SelGDLX").append("<option value=''>--请选择--</option>");
  571. $.ajax({
  572. url: "/WMS/WMSCreateItemLot/SelGDLX" + "?" + Math.random(),
  573. dataType: "json",
  574. async: false,
  575. success: function (data) {
  576. if (data != null && data.length > 0) {
  577. for (var i = 0; i < data.length; i++) {
  578. $("#SelGDLX").append("<option value='" + data[i].Code + "'>" + data[i].Name + "</option>");
  579. }
  580. }
  581. }
  582. });
  583. $("#SelGDLX option:checked").val('');
  584. }
  585. </script>
  586. <iframe id="ifrm" src="" width="0" height="0"></iframe>
  587. <script>
  588. </script>
  589. <div class="topPanel" style="height:100px;">
  590. <div class="toolbar">
  591. <div class="btn-group">
  592. <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>
  593. <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>
  594. <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>
  595. @*<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>*@
  596. @*<a id="NF-ExportAll" authorize="yes" class="btn btn-default" onclick="btn_ExportAll()"><i class="fa fa-download"></i>导出</a>*@
  597. <a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
  598. </div>
  599. <div class="btn-group" style="display:block;padding-left:2px;">
  600. <a class="btn btn-primary" id="downPrintControl" href="~/PrintActivex.exe" style="display:none">点击下载打印组件</a>
  601. </div>
  602. <script>$('.toolbar').authorizeButton()</script>
  603. </div>
  604. <div class="search">
  605. <table>
  606. <tr>
  607. <td class="POCodeShow" style="text-align:right;"><label class="lglabel " id="POCodeShowLable" for="txt_POCode">&nbsp;&nbsp;&nbsp;&nbsp;</label>:</td>
  608. <td class="POCodeShow">
  609. <div class="input-group">
  610. <input id="txt_POCode" type="text" class="form-control" style="width: 100px;">
  611. </div>
  612. </td>
  613. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenCode">&nbsp;&nbsp;&nbsp;&nbsp;供应商代码</label>:</td>
  614. <td class="HideItems">
  615. <div class="input-group HideItems">
  616. <input id="txt_VenCode" type="text" class="form-control HideItems" style="width: 100px;">
  617. </div>
  618. </td>
  619. <td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenName">&nbsp;&nbsp;&nbsp;&nbsp;供应商名称</label>:</td>
  620. <td class="HideItems">
  621. <div class="input-group HideItems">
  622. <input id="txt_VenName" type="text" class="form-control HideItems" style="width: 100px;">
  623. </div>
  624. </td>
  625. </tr>
  626. <tr>
  627. <td style="text-align:right;"><label class="lglabel" for="txt_InvCode">&nbsp;&nbsp;&nbsp;&nbsp;料品编码</label>:</td>
  628. <td>
  629. <div class="input-group">
  630. <input id="txt_InvCode" type="text" class="form-control" style="width: 100px;">
  631. </div>
  632. </td>
  633. <td style="text-align:right;"><label class="lglabel" for="txt_InvName">&nbsp;&nbsp;&nbsp;&nbsp;料品名称</label>:</td>
  634. <td>
  635. <div class="input-group">
  636. <input id="txt_InvName" type="text" class="form-control" style="width: 100px;">
  637. </div>
  638. </td>
  639. <td style="text-align:right;"><label class="lglabel" for="txt_BatchCode">&nbsp;&nbsp;&nbsp;&nbsp;批次号</label>:</td>
  640. <td>
  641. <div class="input-group">
  642. <input id="txt_BatchCode" type="text" class="form-control" style="width: 100px;">
  643. </div>
  644. </td>
  645. <td>
  646. <label>&nbsp;&nbsp;&nbsp;是否全部生成:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  647. </td>
  648. <td>
  649. <div class="input-group">
  650. <select id="selShow" name="F_Target" class="form-control" style="width: 100px;">
  651. <option value="0">显示全部</option>
  652. <option value="1">已全部生成</option>
  653. <option value="2" selected="selected">未全部生成</option>
  654. </select>
  655. </div>
  656. </td>
  657. <td id="GDLX">
  658. <label>&nbsp;&nbsp;&nbsp;工单类型:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  659. </td>
  660. <td id="GDLX2">
  661. <div class="input-group">
  662. <select id="SelGDLX" name="SelShow" class="form-control" style="width: 100px;"></select>
  663. </div>
  664. </td>
  665. @*<td class="GDLX" style="display:none">
  666. <label>&nbsp;&nbsp;&nbsp;工单类型:&nbsp;&nbsp;&nbsp;&nbsp;</label>
  667. </td>
  668. <td class="GDLX" style="display:none">
  669. <div class="input-group">
  670. <select id="selShow" name="F_Target" class="form-control" style="width: 100px;">
  671. <option value="0">显示全部</option>
  672. <option value="1">已全部生成</option>
  673. <option value="2" selected="selected">未全部生成</option>
  674. </select>
  675. </div>
  676. </td>*@
  677. <td>
  678. <span class="input-group-btn">
  679. <button id="btn_search" type="button" class="btn btn-primary"><i class="fa fa-search"></i></button>
  680. </span>
  681. </td>
  682. </tr>
  683. </table>
  684. </div>
  685. </div>
  686. <div class="gridPanel">
  687. <table id="gridList"></table>
  688. <div id="gridPager"></div>
  689. </div>