| | |
| | | {type: 'checkbox'} |
| | | // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | ,{field: 'wrkNo', align: 'center',title: '任务号'} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘号'} |
| | | ,{field: 'anfme', align: 'center',title: '出库数量'} |
| | | ,{field: 'nodeId', align: 'center',title: '关联货位', hide: true} |
| | | ,{field: 'locNo', align: 'center',title: '货位'} |
| | | ,{field: 'matnr', align: 'center',title: '商品编码'} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称'} |
| | | ,{field: 'anfme', align: 'center',title: '出库数量', style: 'font-weight: bolder', width: 100} |
| | | ,{field: 'locNo', align: 'center',title: '货位'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘号'} |
| | | // ,{field: 'nodeId', align: 'center',title: '关联货位', hide: true} |
| | | ,{field: 'name', align: 'center',title: '名称', hide: true} |
| | | ,{field: 'specs', align: 'center',title: '规格', hide: true} |
| | | ,{field: 'model', align: 'center',title: '型号', hide: true} |
| | |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '货物条码', hide: true} |
| | | ,{field: 'docId', align: 'center',title: '单据类型', hide: true} |
| | | ,{field: 'docNum', align: 'center',title: '单据编号', hide: true} |
| | | ,{field: 'docNum', align: 'center',title: '单据编号'} |
| | | ,{field: 'custName', align: 'center',title: '客户名称', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'count', align: 'center',title: '数量', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '重量', hide: true} |
| | | ,{field: 'status$', align: 'center',title: '状态', hide: true} |
| | | // ,{field: 'createBy$', align: 'center',title: '添加人员',event: 'createBy', style: 'cursor:pointer'} |
| | | ,{field: 'createTime$', align: 'center',title: '生成时间'} |
| | | // ,{field: 'updateBy$', align: 'center',title: '修改人员',event: 'updateBy', style: 'cursor:pointer'} |
| | | // ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态', templet: '#wrkStsTpl', width: 100} |
| | | ,{field: 'createTime$', align: 'center',title: '生成时间'} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide: true} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:200} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:180} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | table.on('toolbar(pakout)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | // 批量打印 |
| | | case 'batchPrint': |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | layer.msg('请勾选打印记录', {icon: 9}); |
| | | } else { |
| | | layer.msg('权限不足、请联系管理员', {icon: 3}); |
| | | // console.log(data); |
| | | // layer.confirm(res.msg, { |
| | | // shadeClose: true |
| | | // , btn: ['打印拣货单'] |
| | | // }, function() { |
| | | // layer.closeAll(); |
| | | // printPakouts(data.number); |
| | | // } |
| | | // ) |
| | | } |
| | | break; |
| | | // 导出 |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | |
| | | } |
| | | }); |
| | | |
| | | // 打印拣货单 |
| | | function printPakouts(docNumber) { |
| | | $.ajax({ |
| | | url: baseUrl+"/work/stock/out/print", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | number: docNumber |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | res.data["barcodeUrl"]=baseUrl+"/custOrder/code/auth?type=1¶m="+res.data.docNum; |
| | | var tpl = $('#pakoutPrintTpl').html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | var box = $("#pakoutPrintBox"); |
| | | box.html(html);box.show(); |
| | | box.print({ |
| | | mediaPrint:true, |
| | | deferred: $.Deferred().done(function () { |
| | | layer.confirm('[重要] 打印是否成功?', {btn: ['Yes', 'No']}, function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/pakout/print/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | docNumber: docNumber |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | $(".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}) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | }) |
| | | }); |
| | | box.hide(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(pakout)', function(obj){ |
| | | var data = obj.data; |
| | |
| | | // 完成 |
| | | case 'complete': |
| | | layer.confirm('确认完成该笔拣货单?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | | var loadIndex = layer.load(2); |
| | | http.post(baseUrl+"/work/hand/control/pakout", {wrkNo: data.wrkNo, type:1}, function (res) { |
| | | layer.close(loadIndex); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg); |
| | | }) |
| | |
| | | // 取消 |
| | | case 'cancel': |
| | | layer.confirm('确认取消该笔拣货单?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | | var loadIndex = layer.load(2); |
| | | http.post(baseUrl+"/work/hand/control/pakout", {wrkNo: data.wrkNo, type:2}, function (res) { |
| | | layer.close(loadIndex); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg); |
| | | }) |
| | |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | }); |
| | | |