|  |  |  | 
|---|
|  |  |  | {type: 'checkbox'} | 
|---|
|  |  |  | ,{type: 'numbers', title: '#'} | 
|---|
|  |  |  | ,{field: 'orderNo', align: 'center',title: '单据编号', templet: '#orderNoTpl', width: 160} | 
|---|
|  |  |  | ,{field: 'cstmrName$', align: 'center',title: '客户', width: 160} | 
|---|
|  |  |  | ,{field: 'standby1$', align: 'center',title: '出库仓库', width: 160} | 
|---|
|  |  |  | ,{field: 'matnr', align: 'center',title: '商品编码', width: 160} | 
|---|
|  |  |  | ,{field: 'maktx', align: 'center',title: '商品名称', width: 200} | 
|---|
|  |  |  | ,{field: 'batch', align: 'center',title: '序列码'} | 
|---|
|  |  |  | ,{field: 'batch', align: 'center',title: '批次'} | 
|---|
|  |  |  | ,{field: 'sku', align: 'center',title: 'U8旧品名'} | 
|---|
|  |  |  | ,{field: 'specs', align: 'center',title: '规格'} | 
|---|
|  |  |  | // ,{field: 'anfme', align: 'center',title: '数量'} | 
|---|
|  |  |  | ,{field: 'anfme', align: 'center',title: '主数量'} | 
|---|
|  |  |  | ,{field: 'weight', align: 'center',title: '辅数量'} | 
|---|
|  |  |  | ,{field: 'unit', align: 'center',title: '单位', hide: false} | 
|---|
|  |  |  | ,{field: 'manu', align: 'center',title: '辅单位'} | 
|---|
|  |  |  | // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'} | 
|---|
|  |  |  | ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'} | 
|---|
|  |  |  | // ,{field: 'name', 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: '供应商'} | 
|---|
|  |  |  | // ,{field: 'unitPrice', align: 'center',title: '单价'} | 
|---|
|  |  |  | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | form.on('submit(defaultOutSta)', function (data) { | 
|---|
|  |  |  | let val = $("#defaultOutStaSelect").val(); | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: baseUrl + "/user/updateDefaultOutSta", | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | contentType: 'application/json;charset=UTF-8', | 
|---|
|  |  |  | data: JSON.stringify({ | 
|---|
|  |  |  | defaultOutSta: val | 
|---|
|  |  |  | }), | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | if (res.code === 200){ | 
|---|
|  |  |  | layer.msg(res.msg, {icon: 1}) | 
|---|
|  |  |  | $("#defaultOutSta").html(val) | 
|---|
|  |  |  | } else if (res.code === 403){ | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | layer.msg(res.msg, {icon: 2}) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /* 表格2头工具栏点击事件 */ | 
|---|
|  |  |  | table.on('toolbar(orderDetlTable)', function (obj) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var checkStatus = table.checkStatus(obj.config.id).data; | 
|---|
|  |  |  | if (obj.event === 'pakoutPreview') { // 添加 | 
|---|
|  |  |  | if (checkStatus.length === 0) { | 
|---|
|  |  |  | 
|---|
|  |  |  | return d.id; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | doDelSensor({ids: ids}); | 
|---|
|  |  |  | } else if (obj.event === 'restartSync') { | 
|---|
|  |  |  | restartSyncOrder(checkStatus.map(function (d) { | 
|---|
|  |  |  | return d.id; | 
|---|
|  |  |  | })) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function restartSyncOrder(ids) { | 
|---|
|  |  |  | layer.confirm('确定要重新同步该订单数据吗?', { | 
|---|
|  |  |  | skin: 'layui-layer-admin', | 
|---|
|  |  |  | shade: .1 | 
|---|
|  |  |  | }, function (i) { | 
|---|
|  |  |  | layer.close(i); | 
|---|
|  |  |  | var loadIndex = layer.load(2); | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: baseUrl+"/order/restartSyncOrder", | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | contentType: 'application/json;charset=UTF-8', | 
|---|
|  |  |  | data: JSON.stringify(ids), | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | layer.close(loadIndex); | 
|---|
|  |  |  | if (res.code === 200){ | 
|---|
|  |  |  | layer.msg(res.msg, {icon: 1}); | 
|---|
|  |  |  | $(".layui-laypage-btn")[0].click(); | 
|---|
|  |  |  | } else if (res.code === 403){ | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | layer.msg(res.msg, {icon: 2}); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /* 表格2工具条点击事件 */ | 
|---|
|  |  |  | table.on('tool(orderDetlTable)', function (obj) { | 
|---|
|  |  |  | 
|---|
|  |  |  | url: baseUrl + "/out/pakout/preview/auth", | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | contentType: 'application/json;charset=UTF-8', | 
|---|
|  |  |  | data: JSON.stringify(ids), | 
|---|
|  |  |  | data: JSON.stringify({ | 
|---|
|  |  |  | ids: ids, | 
|---|
|  |  |  | cstateid: $("#defaultCstateid").val() | 
|---|
|  |  |  | }), | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | layer.close(loadIndex); | 
|---|
|  |  |  | 
|---|
|  |  |  | // {type: 'checkbox', merge: ['orderNo']}, | 
|---|
|  |  |  | {field: 'orderNo', title: '单据编号', merge: true, align: 'center'}, | 
|---|
|  |  |  | {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: 'batch', title: '批次', align: 'center'}, | 
|---|
|  |  |  | {field: 'initialWeight', title: '原托盘辅数量', align: 'center', width: 90, style: 'font-weight: bold'}, | 
|---|
|  |  |  | {field: 'initialAnfme', title: '原托盘数量', align: 'center', width: 90, style: 'font-weight: bold'}, | 
|---|
|  |  |  | {field: 'anfme', title: '主数量', align: 'center', width: 90, style: 'font-weight: bold'}, | 
|---|
|  |  |  | {field: 'weight', title: '辅数量', align: 'center', width: 90, style: 'font-weight: bold'}, | 
|---|
|  |  |  | {field: 'unit', align: 'center',title: '单位'}, | 
|---|
|  |  |  | {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, | 
|---|
|  |  |  | {field: 'frozen$', title: '明细', align: 'center', width: 90, templet: '#locFrozen'}, | 
|---|
|  |  |  | {field: 'frozenLoc$', title: '库位', align: 'center', width: 90, templet: '#locFrozenLoc'}, | 
|---|
|  |  |  | {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, | 
|---|
|  |  |  | {type: 'checkbox', merge: ['locNo']}, | 
|---|
|  |  |  | ]], | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: baseUrl + "/user/getDefaultOutSta", | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | contentType: 'application/json;charset=UTF-8', | 
|---|
|  |  |  | data: {}, | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | if (res.code === 200){ | 
|---|
|  |  |  | $("#defaultOutSta").html(res.data) | 
|---|
|  |  |  | } else if (res.code === 403){ | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function tableReload(child) { | 
|---|
|  |  |  | var searchData = {}; | 
|---|
|  |  |  | $.each($('#search-box [name]').serializeArray(), function() { | 
|---|