| | |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | for (let i=0;i<res.data.length;i++){ |
| | | res.data[i]["barcodeUrl"]=baseUrl+"/macCode/barcode/auth?param="+res.data[i].barcode; |
| | | } |
| | | var tpl = $("#templatePreview"+templateNo).html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | $("#box").html(html); |
| | | $("#box").print(); |
| | | // $('#template-preview-'+templateNo).print(); |
| | | let box = $("#box"); |
| | | box.html(html);box.show();box.print();box.hide(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl; |
| | | }else { |
| | |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }) |
| | | |
| | | // 数据保存动作 |