From 7bd0d221ebf6dab38131b6d2cdeb2102272b7d98 Mon Sep 17 00:00:00 2001 From: linfso Date: Mon, 14 Oct 2024 09:09:54 +0800 Subject: [PATCH] md --- .../emis/emisWaybill/waybillIsPrinted.vue | 67 +++++++++++++++---- 1 file changed, 53 insertions(+), 14 deletions(-) diff --git a/src/views/emis/emisWaybill/waybillIsPrinted.vue b/src/views/emis/emisWaybill/waybillIsPrinted.vue index 52725b83..ff0c77b3 100644 --- a/src/views/emis/emisWaybill/waybillIsPrinted.vue +++ b/src/views/emis/emisWaybill/waybillIsPrinted.vue @@ -526,21 +526,60 @@ export default { return row.id; }, handleBatchPrint(){ - this.$confirm("确定打印?", "提示", { - cancelButtonText: "不打印", - confirmButtonText: "确定打印", - type: "warning", - distinguishCancelAndClose: true, - closeOnClickModal: false - }).then(() => { - let orderList=[]; - this.currentSelection.forEach(item=>{ - orderList.push(item.billCode); - }); + // this.$confirm("确定打印?", "提示", { + // cancelButtonText: "不打印", + // confirmButtonText: "确定打印", + // type: "warning", + // distinguishCancelAndClose: true, + // closeOnClickModal: false + // }).then(() => { + // let orderList=[]; + // this.currentSelection.forEach(item=>{ + // orderList.push(item.billCode); + // }); - // batchPrint(orderList,tplCode,orderDetailList) - this.$refs.tanexPrinter.batchPrint(orderList,null,this.currentSelection); - }).catch(() => {}); + // // batchPrint(orderList,tplCode,orderDetailList) + // this.$refs.tanexPrinter.batchPrint(orderList,null,this.currentSelection); + // }).catch(() => {}); + + this.$prompt('确定打印,输入打印份数', "提示", { + confirmButtonText: "确定打印", + cancelButtonText: "不打印", + distinguishCancelAndClose: true, + closeOnClickModal: false, + inputValue: 1, + inputValidator (value) { + if (value) { + return true; + }else{ + return false; + } + }, + inputErrorMessage: "文件名不能为空" + }).then(async ({ value }) => { + + let cnt=parseInt(value); + if(cnt){ + let orderList=[]; + this.currentSelection.forEach(item=>{ + orderList.push(item.billCode); + }); + for(let i=0; i{ + orderList.push(item.billCode); + }); + + // batchPrint(orderList,tplCode,orderDetailList) + this.$refs.tanexPrinter.batchPrint(orderList,null,this.currentSelection); + } + + + }).catch(() => {}); }, handlePrintPreview(){