| | |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'}, |
| | | {field: 'docType$', align: 'center', title: '类型', minWidth: 160, width: 160}, |
| | | {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, |
| | | {field: 'createTime$', title: '创建时间', minWidth: 200, width: 200}, |
| | | {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl',minWidth: 200}, |
| | | {field: 'docType$', align: 'center', title: '类型'}, |
| | | {align: 'center', title: '明细', toolbar: '#tbLook'}, |
| | | {field: 'createTime$', title: '创建时间'}, |
| | | {field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 160, width: 160}, |
| | | {field: 'shipName', align: 'center',title: '制单人'}, |
| | | {field: 'itemName', align: 'center',title: '仓库'}, |
| | | {field: 'memo', align: 'center',title: '备注', hide: true}, |
| | | {align: 'center', title: '操作', toolbar: '#operate', width: 180} |
| | | {align: 'center', title: '操作', toolbar: '#operate'} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | layer.open({ |
| | | type: 1, |
| | | title: false, |
| | | area: '820px', |
| | | area: '1000px', |
| | | offset: [top + 'px', (left - 530 + $a.outerWidth()) + 'px'], |
| | | shade: .01, |
| | | shadeClose: true, |
| | |
| | | {type: 'numbers'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 160}, |
| | | {field: 'specs', title: '规格'}, |
| | | {field: 'specs', title: '规格', width: 160}, |
| | | {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.suppCode+";客户名称:"+data.sku; |
| | | 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({ |