| | |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#saasLog', |
| | |
| | | ,{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: 'createTime$', align: 'center',title: '操作时间'} |
| | | ,{field: 'custName', align: 'center',title: '客户名称', width: 160} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | ,{field: 'updateTime$', align: 'center',title: '操作时间'} |
| | | ,{align: 'center', title: '操作', toolbar: '#operate'} |
| | | |
| | | ]], |
| | |
| | | case "del": |
| | | doDel(data); |
| | | break; |
| | | case "printExcel": |
| | | printExcel(data); |
| | | break; |
| | | case "look": |
| | | var $a = $(obj.tr).find('a[lay-event="look"]'); |
| | | var offset = $a.offset(); |
| | |
| | | var left = offset.left; |
| | | layer.open({ |
| | | type: 1, |
| | | title: false, |
| | | area: '1200px', |
| | | title: '单据明细', |
| | | area: '1500px', |
| | | offset: [top + 'px', (left - 450 + $a.outerWidth()) + 'px'], |
| | | shade: .01, |
| | | shadeClose: true, |
| | |
| | | id:'lookSSXMTable', |
| | | elem: '#lookSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/ManPakOut/list/auth', |
| | | url: baseUrl+'/ManPakOut/list/auth1', |
| | | where: { |
| | | doc_num: data.doc_num, |
| | | uuid: data.uuid |
| | |
| | | ,{field: 'batch', align: 'center',title: '批号'} |
| | | ,{field: 'barcode', align: 'center',title: '包号'} |
| | | // ,{field: 'matnr', align: 'center',title: '物料号'} |
| | | // ,{field: 'maktx', align: 'center',title: '商品名称'} |
| | | ,{field: 'maktx', align: 'center',title: '牌号'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'createTime$', align: 'center',title: '操作时间'} |
| | | ,{field: 'updateTime$', align: 'center',title: '操作时间'} |
| | | ,{field: 'count', align: 'center',title: '完成数'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{field: 'specs', align: 'center',title: '发货时间'} |
| | | ,{field: 'createBy', align: 'center',title: '', hide:true} |
| | | ,{align: 'center', title: '操作', toolbar: '#operateDetl'} |
| | | ]], |
| | |
| | | |
| | | for (let i = 0; i < res.data.length; i++){ |
| | | sum += res.data[i].anfme; |
| | | console.log("sum:"+res.data.anfme); |
| | | |
| | | } |
| | | json.anfmeSum = sum; |
| | | json.custName = json.data[0].custName; |
| | | var barcodeUrl = baseUrl + "/ManPakOut/code/auth?type=1¶m=" + res.data[0].docNum; |
| | | console.log("barcodeUrl:"+barcodeUrl); |
| | | json.barcodeUrl = barcodeUrl; |
| | |
| | | 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].batch+";"+json.data[i].anfme+";"+json.data[i].locNo+";"+json.data[i].barcode+";"+json.data[i].nodeId+";"+json.data[i].wrkNo+";"); |
| | | 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+";"+json.data[i].maktx); |
| | | } else { |
| | | 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+";"); |
| | | 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+";"+json.data[i].maktx); |
| | | } |
| | | } |
| | | var tpl = templateDom.html(); |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | function printExcel(data){ |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | layer.closeAll(); |
| | | layer.load(1, {shade: [0.1,'#fff']}); |
| | | location.href = baseUrl+"/pakout/printExport/auth?orderNo="+data.doc_num; |
| | | layer.closeAll('loading'); |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | |