| | |
| | | } |
| | | }); |
| | | break; |
| | | case 'refreshData': |
| | | tableIns.reload({ |
| | | page: { |
| | | curr: pageCurr |
| | | } |
| | | }); |
| | | limit(); |
| | | break; |
| | | case 'deleteData': |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | |
| | | } |
| | | }); |
| | | break; |
| | | // 批量打印 |
| | | case "btnPrintBatch": |
| | | layer.open({ |
| | | type: 1, |
| | | title: '批量打印', |
| | | shadeClose: true, |
| | | content: $('#printDataDiv'), |
| | | success: function(layero, index){ |
| | | |
| | | }, |
| | | end: function () { |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | |
| | | title: '详情', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | shadeClose: true, |
| | | content: 'matCode_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), data, true); |
| | |
| | | }); |
| | | } |
| | | break; |
| | | |
| | | // 打印 |
| | | case "btnPrint": |
| | | console.log(data); |
| | | layer.open({ |
| | | type: 1, |
| | | title: '打印', |
| | | // area: ['500px', top.detailHeight], |
| | | shadeClose: true, |
| | | content: $('#printDataDiv'), |
| | | success: function(layero, index){ |
| | | layer.iframeAuto(index); |
| | | }, |
| | | end: function () { |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 开始打印 |
| | | form.on('submit(doPrint)', function (data) { |
| | | let param = []; |
| | | param.push("1902980-11/12"); |
| | | console.log(param) |
| | | $.ajax({ |
| | | url: baseUrl+"/macCode/print/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: param}, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | console.log(res.data); |
| | | |
| | | |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | console.log(data.field); |
| | | // $('#template-preview-1').print(); |
| | | }) |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null){ |