| | |
| | | printBarcodes[i]["barcodeUrl"] = baseUrl + "/mac/code/auth?type=2¶m=" + printBarcodes[i].barcode; |
| | | } |
| | | } |
| | | console.log(printBarcodes) |
| | | var tpl = templateDom.html(); |
| | | console.log(tpl) |
| | | var template = Handlebars.compile(tpl); |
| | | console.log(template) |
| | | var html = template({code:200, data: printBarcodes}); |
| | | console.log(html) |
| | | var box = $("#box"); |
| | | box.html(html);box.show(); |
| | | box.print({mediaPrint:true}); |
| | |
| | | layDateRender(mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | if (data.field.barcode == '' || data.field.num == '') { |
| | | layer.close(loadIndex); |
| | | layer.msg("请输入参数", {icon: 2}); |
| | | return false; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/basBarcode/"+(mData?'update':'generateBarcode')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |