| | |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | where: { |
| | | doc_class: 2,//出库单 |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | |
| | | cols: [[ |
| | | {field: 'docId', title: '编号', width: 70, align: 'center'}, |
| | | {field: 'docName', title: '单据类型'} |
| | | ,{field: 'docClass', title: '单据类别', hide:true} |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click'); |
| | |
| | | |
| | | /* 表格搜索 */ |
| | | form.on('submit(docTypeTableSearch)', function (data) { |
| | | insTb.reload({where: {doc_name: data.field.docName}}); |
| | | insTb.reload({where: {doc_name: data.field.docName,doc_class:2}}); |
| | | return false; |
| | | }); |
| | | |
| | |
| | | success: function (layero, dIndex) { |
| | | // 回显表单数据 |
| | | form.val('docTypeEditForm', mData); |
| | | if(mData){ |
| | | // $('#docId').addClass("layui-input").attr("disabled",true); |
| | | $('input[name="docId"]').addClass("layui-input").attr("disabled",true); |
| | | } |
| | | // 表单提交事件 |
| | | form.on('submit(docTypeEditSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | |
| | | ,{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) { |