| | |
| | | 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(){ |
| | |
| | | // {type: 'checkbox'} |
| | | {type: 'numbers'} |
| | | ,{field: 'wrkNo', align: 'center',title: 'id', hide:true} |
| | | ,{field: 'docNum',title: '拣货单号' , templet: '#orderNoTpl'} |
| | | ,{field: 'doc_num',title: '拣货单号' } |
| | | ,{align: 'center', title: '二维码', toolbar: '#operate', width: 200 , hide:true} |
| | | ,{align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'custName', align: 'center',title: '客户名称', width: 160} |
| | | // ,{field: 'custName', align: 'center',title: '客户名称', width: 160} |
| | | ,{field: 'createTime$', align: 'center',title: '操作时间'} |
| | | ,{align: 'center', title: '操作', toolbar: '#operate'} |
| | | |
| | |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | |
| | | var index = -1; |
| | | $("[data-field='status$']").children().each(function () { |
| | | index++; |
| | | if ($(this).text() === '未出库') { |
| | | $('tr').eq(index).css("color", 'red'); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | |
| | | // 监听行工具事件 |
| | | table.on('tool(saasLog)', function(obj){ |
| | | var data = obj.data; |
| | | console.log(data); |
| | | switch (obj.event) { |
| | | case "btnPrint": |
| | | btnPrint(data.wrkNo, data.docNum, 4); |
| | | btnPrint(data.wrkNo, data.doc_num, 4); |
| | | break; |
| | | case "wrkTrace": |
| | | btnPrint(data.wrkNo, data.docNum, 4); |
| | | btnPrint(data.wrkNo, data.doc_num, 4); |
| | | break; |
| | | case "btnPrint2": |
| | | btnPrint2(data.wrkNo, data.docNum, 4); |
| | | btnPrint2(data.wrkNo, data.doc_num, 4); |
| | | break; |
| | | case "del": |
| | | doDel(data); |
| | | break; |
| | | case "look": |
| | | var $a = $(obj.tr).find('a[lay-event="look"]'); |
| | |
| | | type: 1, |
| | | title: false, |
| | | area: '1200px', |
| | | offset: [top + 'px', (left - 530 + $a.outerWidth()) + 'px'], |
| | | offset: [top + 'px', (left - 450 + $a.outerWidth()) + 'px'], |
| | | shade: .01, |
| | | shadeClose: true, |
| | | fixed: false, |
| | | content: '<table id="lookSSXMTable" lay-filter="lookSSXMTable"></table>', |
| | | success: function (layero) { |
| | | table.render({ |
| | | id:'lookSSXMTable', |
| | | elem: '#lookSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/ManPakOut/list/auth', |
| | | where: { |
| | | doc_num: data.docNum |
| | | doc_num: data.doc_num, |
| | | uuid: data.uuid |
| | | }, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | |
| | | {type: 'numbers'} |
| | | ,{field: 'id', align: 'center',title: 'id', hide:true} |
| | | ,{field: 'docNum', align: 'center',title: '拣货单号'} |
| | | ,{field: 'uuid', align: 'center',title: 'uuid'} |
| | | ,{field: 'locNo', align: 'center',title: '库位'} |
| | | ,{field: 'matnr', align: 'center',title: '物料号'} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称'} |
| | | ,{field: 'batch', align: 'center',title: '批号'} |
| | | ,{field: 'barcode', align: 'center',title: '包号'} |
| | | // ,{field: 'matnr', align: 'center',title: '物料号'} |
| | | // ,{field: 'maktx', align: 'center',title: '商品名称'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'createTime$', align: 'center',title: '操作时间'} |
| | | ,{field: 'count', align: 'center',title: '完成数'} |
| | |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function () { |
| | | done: function (res) { |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | |
| | | var index = -1; |
| | | $("[data-field='status$']").children().each(function () { |
| | | index++; |
| | | if ($(this).text() === '未出库') { |
| | | $('tr').eq(index).css("color", 'red'); |
| | | } |
| | | }); |
| | | |
| | | |
| | | }, |
| | | size: '' |
| | | }); |
| | |
| | | var className = templateDom.attr("class"); |
| | | |
| | | if (className === 'template-barcode') { |
| | | json.data[i]["barcodeUrl"] = baseUrl + "/ManPakOut/code/auth?type=2¶m=" + (json.data[i].docNum+";"+json.data[i].matnr+";"+json.data[i].maktx+";"+json.data[i].anfme+";"+json.data[i].locNo+";"); |
| | | json.data[i]["barcodeUrl"] = baseUrl + "/ManPakOut/code/auth?type=2¶m=" + (json.data[i].docNum+";"+json.data[i].matnr+";"+json.data[i].batch+";"+json.data[i].anfme+";"+json.data[i].locNo+";"+json.data[i].barcode+";"+json.data[i].nodeId+";"+json.data[i].wrkNo+";"); |
| | | } else { |
| | | json.data[i]["barcodeUrl"] = baseUrl + "/ManPakOut/code/auth?type=2¶m=" + (json.data[i].docNum+";"+json.data[i].matnr+";"+json.data[i].maktx+";"+json.data[i].anfme+";"+json.data[i].locNo+";"); |
| | | json.data[i]["barcodeUrl"] = baseUrl + "/ManPakOut/code/auth?type=2¶m=" + (json.data[i].docNum+";"+json.data[i].matnr+";"+json.data[i].batch+";"+json.data[i].anfme+";"+json.data[i].locNo+";"+json.data[i].barcode+";"+json.data[i].nodeId+";"+json.data[i].wrkNo+";"); |
| | | } |
| | | } |
| | | var tpl = templateDom.html(); |
| | |
| | | }) |
| | | } |
| | | |
| | | function doDel(data) { |
| | | console.log(data) |
| | | 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:data.doc_num |
| | | }, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | tableIns.reload({page: {curr: 1}}); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }); |