| | |
| | | var pageCurr; |
| | | var printMatCodeNos = []; |
| | | var ordernoo = "123"; |
| | | var insTbCount = 0; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin', 'layer'], function(){ |
| | |
| | | ,{align: 'center', title: '二维码', toolbar: '#operate', width: 200 , hide:true} |
| | | ,{align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'owner$', align: 'center',title: '货主'} |
| | | ,{field: 'payment$', align: 'center',title: '货物形态'} |
| | | // ,{field: 'custName', align: 'center',title: '客户名称', width: 160} |
| | | ,{field: 'createTime$', align: 'center',title: '操作时间'} |
| | | ,{align: 'center', title: '操作', toolbar: '#operate'} |
| | |
| | | case "btnPrint2": |
| | | btnPrint2(data.wrkNo, data.docNum, 4); |
| | | break; |
| | | case "del": |
| | | doDel(data.docNum); |
| | | break; |
| | | case "look": |
| | | var $a = $(obj.tr).find('a[lay-event="look"]'); |
| | | var offset = $a.offset(); |
| | |
| | | ,{field: 'matnr', align: 'center',title: '物料号'} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'owner$', align: 'center',title: '货主'} |
| | | ,{field: 'payment$', align: 'center',title: '货物形态'} |
| | | ,{field: 'owner', align: 'center',title: '货主', hide:true} |
| | | ,{field: 'payment', align: 'center',title: '货物形态', hide:true} |
| | | ,{field: 'createTime$', align: 'center',title: '操作时间'} |
| | | ,{field: 'count', align: 'center',title: '完成数'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | |
| | | }) |
| | | } |
| | | |
| | | function doDel(docNum) { |
| | | console.log(docNum) |
| | | layer.confirm('确定要删除吗?', { |
| | | shade: .1, |
| | | skin: 'layui-layer-admin' |
| | | }, function (i) { |
| | | layer.close(i); |
| | | layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/pakout/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data:{ |
| | | docNum:docNum |
| | | }, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | if (insTbCount === 0) { |
| | | insTb.reload({page: {curr: 1}}); |
| | | } else { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | layer.msg(res.msg, {icon: 1}); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | |