| | |
| | | ,{field: 'defNumber', align: 'center',title: '初始票据号', hide: true} |
| | | ,{field: 'number', align: 'center',title: '票据号', hide: true} |
| | | ,{field: 'cstmrName', align: 'center',title: '客户'} |
| | | ,{field: 'waveNo', align: 'center', title: '波次编号'} |
| | | ,{align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 140, width: 140} |
| | | ,{field: 'tel', align: 'center',title: '联系方式', hide: true} |
| | | ,{field: 'operMemb', align: 'center',title: '操作人员', hide: true} |
| | |
| | | ,{field: 'sendTime$', align: 'center',title: '发货时间', hide: true} |
| | | ,{field: 'shipName', align: 'center',title: '物流名称', hide: true} |
| | | ,{field: 'shipCode', align: 'center',title: '物流单号', hide: true} |
| | | ,{field: 'settle$', align: 'center',title: '订单状态', templet: '#settleTpl', width: 100} |
| | | ,{field: 'settle$', align: 'center',title: '订单状态', templet: '#settleTpl', width: 105} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 120} |
| | | ]], |
| | | request: { |
| | |
| | | return d.id; |
| | | }); |
| | | doDelOrder({ids: ids}); |
| | | }else if (obj.event === 'wave'){ |
| | | var checkRows = table.checkStatus('orderTable'); |
| | | if (checkRows.data.length === 0) { |
| | | layer.msg('请选择要生成波次的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | doWaveOrder(checkRows); |
| | | } |
| | | }); |
| | | |
| | |
| | | |
| | | }); |
| | | } |
| | | /* 生成波次 */ |
| | | function doWaveOrder(obj) { |
| | | console.log(obj.data); |
| | | layer.confirm('确定要生成波次?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/orders/wave/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(obj.data), |
| | | contentType: 'application/json;charset=UTF-8', |
| | | 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}); |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }); |
| | | } |
| | | |
| | | // 生成拣货单 |
| | | function stockOut(orderNo) { |