|  |  | 
 |  |  |             {type: 'checkbox'} | 
 |  |  |             ,{type: 'numbers', title: '#'} | 
 |  |  |             ,{field: 'orderNo', align: 'center',title: '单据编号', templet: '#orderNoTpl', width: 160} | 
 |  |  |             ,{field: 'matnr', align: 'center',title: '单据号', width: 160} | 
 |  |  |             ,{field: 'maktx', align: 'center',title: '物料号', width: 200} | 
 |  |  |             ,{field: 'matnr', align: 'center',title: '物料号', width: 160} | 
 |  |  |             ,{field: 'maktx', align: 'center',title: '物料名称', width: 200} | 
 |  |  |             ,{field: 'batch', align: 'center',title: '序列码'} | 
 |  |  |             ,{field: 'specs', align: 'center',title: '规格'} | 
 |  |  |             // ,{field: 'anfme', align: 'center',title: '数量'} | 
 |  |  |             // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'} | 
 |  |  |             ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'} | 
 |  |  |             ,{field: 'color', align: 'center',title: '销售订单号'} | 
 |  |  |             ,{field: 'origin', align: 'center',title: '销售订单行号'} | 
 |  |  |             // ,{field: 'name', align: 'center',title: '名称'} | 
 |  |  |             // ,{field: 'model', align: 'center',title: '批次'} | 
 |  |  |             // ,{field: 'model', align: 'center',title: '通用型号'} | 
 |  |  |             ,{field: 'unit', align: 'center',title: '单位', hide: true} | 
 |  |  |             ,{field: 'barcode', align: 'center',title: '商品条码', hide: true} | 
 |  |  |             // ,{field: 'supplier', align: 'center',title: '供应商'} | 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     function pakoutPreviewDialog(data) { | 
 |  |  |         for(var i=0; i<data.length; i++){ | 
 |  |  |             if(!data[i].staNos){ | 
 |  |  |                 data[i].staNos = data[i].agvStaNos; | 
 |  |  |                 data[i].staNo = data[i].agvStaNo; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         var tableCache; | 
 |  |  |         layer.open({ | 
 |  |  |             type: 1 | 
 |  |  | 
 |  |  |                         {field: 'title', title: '商品', merge: true, align: 'center', width: 350}, | 
 |  |  |                         {field: 'batch', title: '序列码', align: 'center'}, | 
 |  |  |                         {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, | 
 |  |  |                         {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, | 
 |  |  |                         {field: 'locNo', title: '货位', align: 'center', templet: '#locNoTpl'}, | 
 |  |  |                         {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, | 
 |  |  |                         // {type: 'checkbox', merge: ['locNo']}, | 
 |  |  |                     ]], | 
 |  |  |                     //cols: getCol(data), | 
 |  |  |                     done: function (res) { | 
 |  |  |                         tableMerge.render(this); | 
 |  |  |                         $('.layui-table-body.layui-table-main').css("overflow", "auto"); | 
 |  |  | 
 |  |  |                     let data = tableCache[index]; | 
 |  |  |                     for (let i = 0; i<tableCache.length; i++) { | 
 |  |  |                         if (tableCache[i].locNo === data.locNo) { | 
 |  |  |                             tableCache[i]['staNo'] = Number(obj.elem.value); | 
 |  |  |                             //tableCache[i]['staNo'] = Number(obj.elem.value); | 
 |  |  |                             tableCache[i]['staNo'] = obj.elem.value; | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                     obj.othis.children().find("input").css("color", "blue"); | 
 |  |  | 
 |  |  |                             // 确认 | 
 |  |  |                             form.on('submit(staBatchSelectConfirm)', function (obj) { | 
 |  |  |                                 let loadIdx = layer.load(2); | 
 |  |  |                                 let batchSta = Number(obj.field.batchSta); | 
 |  |  |                                 //let batchSta = Number(obj.field.batchSta); | 
 |  |  |                                 let batchSta = obj.field.batchSta; | 
 |  |  |                                 let arr = []; | 
 |  |  |                                 for (let i = 0; i<tableCache.length; i++) { | 
 |  |  |                                     tableCache[i]['staNo'] = batchSta; | 
 |  |  | 
 |  |  |  | 
 |  |  |     function pakout(tableCache, layerIndex) { | 
 |  |  |         // let loadIndex = layer.load(2); | 
 |  |  |         for(var i=0; i<tableCache.length; i++){ | 
 |  |  |             if(tableCache[i].agvStaNos){ | 
 |  |  |                 tableCache[i].agvStaNo = tableCache[i].staNo; | 
 |  |  |                 tableCache[i].staNos = null; | 
 |  |  |                 tableCache[i].staNo = null; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         notice.msg('正在生成出库任务......', {icon: 4}); | 
 |  |  |         $.ajax({ | 
 |  |  |             url: baseUrl + "/out/pakout/auth", | 
 |  |  | 
 |  |  |                                 cellMinWidth: 100, | 
 |  |  |                                 cols: [[ | 
 |  |  |                                     {type: 'checkbox'}, | 
 |  |  |                                     {field: 'matnr', title: '单据号', align: 'center', width: 350}, | 
 |  |  |                                     {field: 'maktx', title: '物料号', align: 'center'}, | 
 |  |  |                                     {field: 'matnr', title: '物料号', align: 'center', width: 350}, | 
 |  |  |                                     {field: 'maktx', title: '物料名称', align: 'center'}, | 
 |  |  |                                     {field: 'specs', title: '规格', align: 'center'}, | 
 |  |  |                                     {field: 'batch', title: '批号', align: 'center'}, | 
 |  |  |                                     {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, | 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     function pakoutPreviewMergeDialog(data) { | 
 |  |  |         for(var i=0; i<data.length; i++){ | 
 |  |  |             if(!data[i].staNos){ | 
 |  |  |                 data[i].staNos = data[i].agvStaNos; | 
 |  |  |                 data[i].staNo = data[i].agvStaNo; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         var mergeTabCache; | 
 |  |  |         layer.open({ | 
 |  |  |             type: 1 | 
 |  |  | 
 |  |  |                         {field: 'specs', title: '规格', align: 'center'}, | 
 |  |  |                         {field: 'batch', title: '序列码', align: 'center'}, | 
 |  |  |                         {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, | 
 |  |  |                         {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, | 
 |  |  |                         {field: 'locNo', title: '货位', align: 'center', templet: '#locNoTpl'}, | 
 |  |  |                         {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, | 
 |  |  |                         // {type: 'checkbox', merge: ['locNo']}, | 
 |  |  |                     ]], | 
 |  |  | 
 |  |  |                     let data = mergeTabCache[index]; | 
 |  |  |                     for (let i = 0; i<mergeTabCache.length; i++) { | 
 |  |  |                         if (mergeTabCache[i].locNo === data.locNo) { | 
 |  |  |                             mergeTabCache[i]['staNo'] = Number(obj.elem.value); | 
 |  |  |                             //mergeTabCache[i]['staNo'] = Number(obj.elem.value); | 
 |  |  |                             mergeTabCache[i]['staNo'] = obj.elem.value; | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                     obj.othis.children().find("input").css("color", "blue"); | 
 |  |  | 
 |  |  |                             // 确认 | 
 |  |  |                             form.on('submit(staBatchSelectConfirm)', function (obj) { | 
 |  |  |                                 let loadIdx = layer.load(2); | 
 |  |  |                                 let batchSta = Number(obj.field.batchSta); | 
 |  |  |                                 //let batchSta = Number(obj.field.batchSta); | 
 |  |  |                                 let batchSta = obj.field.batchSta; | 
 |  |  |                                 let arr = []; | 
 |  |  |                                 for (let i = 0; i<mergeTabCache.length; i++) { | 
 |  |  |                                     mergeTabCache[i]['staNo'] = batchSta; |