| | |
| | | layer.open({ |
| | | type: 2, |
| | | title: '生成托盘码', |
| | | area: ['500px'], |
| | | shadeClose: true, |
| | | offset: '100px', |
| | | area: ['360px'], |
| | | shade: 0.1, |
| | | content: 'tray.html', |
| | | success: function(layero, index){ |
| | | layer.iframeAuto(index) |
| | | }, |
| | | end: function () { |
| | | } |
| | |
| | | |
| | | }); |
| | | |
| | | function printPreview(content) { |
| | | var tpl = $('#trayCodeTemplate').html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(content); |
| | | let box = $("#printBox"); |
| | | box.html(html); |
| | | box.show(); |
| | | box.print(); |
| | | box.hide(); |
| | | } |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |