| | |
| | | {field: 'batch', title: '批号'}, |
| | | {field: 'anfme', title: '数量'}, |
| | | {field: 'workQty', title: '作业数量'}, |
| | | {field: 'qty', title: '完成数量', style: 'font-weight: bold'} |
| | | {field: 'qty', title: '完成数量', style: 'font-weight: bold'}, |
| | | {align: 'center', title: '打印', toolbar: '#printOperate', width: 80} |
| | | // {field: 'unit', title: '单位'}, |
| | | // { |
| | | // field: 'createTime$', title: '创建时间', sort: true, templet: function (d) { |
| | |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(lookSSXMTable)', function(obj) { |
| | | $.ajax({ |
| | | url: baseUrl+"/orderDetl/getPrintDetl/" + obj.data.id, |
| | | headers: {'token': localStorage.getItem('token'),'Content-Type' :'application/json'}, |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | let data = res.data |
| | | var templateDom = $("#templatePreview1"); |
| | | var className = templateDom.attr("class"); |
| | | var param = "编码:"+data.matnr+";名称:"+data.maktx+";批次:"+data.batch+";规格:"+data.specs |
| | | +";单位:"+data.unit+";数量:"+data.anfme+";客户名称:"+data.cstmrName; |
| | | var encodeUrl = encodeURIComponent(param); |
| | | data["barcodeUrl"]=baseUrl+"/mac/code/auth?type=2¶m="+encodeUrl; |
| | | console.log(data["barcodeUrl"]); |
| | | let list = Array.isArray(res.data) ? res.data : [res.data]; |
| | | res.data = list; |
| | | var tpl = templateDom.html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | var box = $("#box"); |
| | | box.html(html);box.show(); |
| | | box.print({mediaPrint:true}); |
| | | box.hide(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | // 显示表单弹窗 |
| | | function showEditModel(expTpe) { |
| | | admin.open({ |