| | |
| | | {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} |
| | |
| | | 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); |
| | |
| | | {field: 'orderNo', title: '单据编号', merge: true, align: 'center'}, |
| | | {field: 'title', title: '商品', merge: true, align: 'center', width: 350}, |
| | | {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: '单位'}, |
| | |
| | | |
| | | }); |
| | | |
| | | $.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() { |