| | |
| | | , toolbar: '#toolbarDemo' |
| | | , limit: 500 |
| | | , height: 500 |
| | | , totalRow: true |
| | | , loading: false |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | { type: 'checkbox', fixed: 'left', totalRowText: '合计' } |
| | | , { field: 'HMaterID', title: '物料ID', width: 100, hide: true } |
| | | , { field: 'HMaterNumber', title: '物料编码', width: 120 } |
| | | , { field: 'HOldMaterNumber', title: '旧物料编码', width: 120, hide: true } |
| | |
| | | , { field: 'HDDQty', title: '订单数量', width: 100 } |
| | | , { field: 'HMrbQty', title: '退料数量', width: 100, hide: true } |
| | | , { field: 'HBarcodeCount', title: '已生成条码数量', width: 135 } |
| | | , { field: 'HNotBarcodeCount', title: '可生成条码数量', width: 135 } |
| | | , { field: 'HQty', title: '本次生成条码数量', width: 135, edit: 'text', event: "inputHQty" } |
| | | , { field: 'HMinQty', title: '内箱包装数', width: 100, edit: 'text', event: "inputHMinQty" } |
| | | , { field: 'HBQty', title: '内箱数', width: 100 } |
| | | , { field: 'HWXQty', title: '外箱包装数', width: 100, edit: 'text', event: "inputHWXQty" } |
| | | , { field: 'HWBQty', title: '外箱数', width: 100 } |
| | | , { field: 'HNotBarcodeCount', title: '可生成条码数量', width: 135, totalRow: true} |
| | | , { field: 'HQty', title: '本次生成条码数量', width: 135, edit: 'text', event: "inputHQty", totalRow: true} |
| | | , { field: 'HMinQty', title: '内箱包装数', width: 100, edit: 'text', event: "inputHMinQty", totalRow: true} |
| | | , { field: 'HBQty', title: '内箱数', width: 100, totalRow: true} |
| | | , { field: 'HWXQty', title: '外箱包装数', width: 100, edit: 'text', event: "inputHWXQty", totalRow: true} |
| | | , { field: 'HWBQty', title: '外箱数', width: 100, totalRow: true} |
| | | , { field: 'HPrice', title: '单价', width: 100, hide: true } |
| | | , { field: 'HMoney', title: '金额', width: 100, hide: true } |
| | | , { field: 'HMTONO', title: '计划跟踪单号', width: 100, hide: true } |
| | |
| | | var newArray = []; |
| | | var index = -1; |
| | | //debugger; |
| | | |
| | | for (var i = 0; i < table.cache["mainTable"].length; i++) { |
| | | if (table.cache["mainTable"][i].HMaterName.indexOf("\"") != -1 || table.cache["mainTable"][i].HMaterName.indexOf(";") != -1) { |
| | | table.cache["mainTable"][i].HMaterName = table.cache["mainTable"][i].HMaterName.replace("\"", "”").replace(";", ";") |
| | | } |
| | | if (table.cache["mainTable"][i].HMaterModel.indexOf("\"") != -1 || table.cache["mainTable"][i].HMaterModel.indexOf(";") != -1) { |
| | | table.cache["mainTable"][i].HMaterModel = table.cache["mainTable"][i].HMaterModel.replace("\"", "”").replace(";", ";") |
| | | } |
| | | } |
| | | |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sSubStr = JSON.stringify(table.cache['mainTable']); |
| | | var sMainSub = sMainStr + ';' + sSubStr; |
| | |
| | | sessionStorage["linterid"] = rows.toString(); |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['80%', '80%'] |
| | | , area: ['40%', '80%'] |
| | | , title: '打印模版选择' |
| | | , shade: 0.6 //遮罩透明度 |
| | | , maxmin: false //允许全屏最小化 |
| | |
| | | } |
| | | else |
| | | { |
| | | //合并数量生成条码 |
| | | layer.load(3) |
| | | $.ajax({ |
| | | type: "GET", |
| | |
| | | , "HMaterShortNumber": "", "HSubjoin": "", "HMaterName": data[i].HMaterName |
| | | , "HMaterModel": data[i].HMaterModel, "HUnitName": data[i].HUnitName, "HUnitNumber": data[i].HUnitNumber |
| | | , "HUnitID": data[i].HUnitID, "HDDQty": data[i].HDDQty, "HMrbQty": 0, "HBarcodeCount": data[i].HBarcodeCount |
| | | , "HNotBarcodeCount": data[i].HNotBarcodeCount, "HQty": data[i].HQty, "HMinQty": data[i].HMinQty, "HBQty": data[i].HBQty |
| | | , "HWXQty": data[i].HWXQty, "HWBQty": data[i].HWBQty, "HPrice": data[i].HPrice, "HMoney": data[i].HMoney, "HMTONO": "" |
| | | , "HNotBarcodeCount": data[i].HNotBarcodeCount, "HQty": data[i].HQty, "HMinQty": data[i].HQty, "HBQty": data[i].HBQty |
| | | , "HWXQty": data[i].HQty, "HWBQty": data[i].HWBQty, "HPrice": data[i].HPrice, "HMoney": data[i].HMoney, "HMTONO": "" |
| | | , "HBatchNo": data[i].HBatchNo, "HBatchManager": data[i].HBatchManager, "HISKFPERIOD": data[i].HISKFPERIOD |
| | | , "HEXPUNIT": data[i].HEXPUNIT, "HKFDate": data[i].HKFDate, "HKFPeriod": data[i].HKFPeriod, "HKFDQDate": data[i].HKFDQDate |
| | | , "HSupMaterNumber": data[i].HSupMaterNumber, "HSupBatchNo": data[i].HSupBatchNo, "HPOOrderInterID": data[i].HPOOrderInterID |
| | |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHQty') { |
| | | //$(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | // var $input = $(this), val = $input.val(); |
| | | // if (!val) val = "0"; |
| | | // $input.val(parseInt(val.replace(/[^\d*\.?\d*]/g, ''))); |
| | | //}); |
| | | |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(parseInt(val.replace(/[^\d*\.?\d*]/g, ''))); |
| | | $input.val(val.replace(/[^\d*\.?\d*]/g, '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHMinQty') { |
| | | //$(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | // var $input = $(this), val = $input.val(); |
| | | // if (!val) val = "0"; |
| | | // $input.val(parseInt(val.replace(/[^\d*\.?\d*]/g, ''))); |
| | | //}); |
| | | |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(parseInt(val.replace(/[^\d*\.?\d*]/g, ''))); |
| | | $input.val(val.replace(/[^\d*\.?\d*]/g, '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHWXQty') { |
| | | //$(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | // var $input = $(this), val = $input.val(); |
| | | // if (!val) val = "0"; |
| | | // $input.val(parseInt(val.replace(/[^\d*\.?\d*]/g, ''))); |
| | | //}); |
| | | |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(parseInt(val.replace(/[^\d*\.?\d*]/g, ''))); |
| | | $input.val(val.replace(/[^\d*\.?\d*]/g, '')); |
| | | }); |
| | | } |
| | | }); |