@@ -113,6 +124,8 @@ export default {
pdfUtils:new PdfUtils(),
+ printCnt:null,
+
loading: false,
}
@@ -157,6 +170,7 @@ export default {
},
},
mounted() {
+ this.printCnt=1;
this.initA4List();
this.showFirstFile();
window.addEventListener('mousewheel', this.handleScroll, { passive: false })
@@ -420,7 +434,7 @@ export default {
if(this.isA4){
printJS(this.loadPdfUrl);
}else{
- this.$emit("onPrint");
+ this.$emit("onPrint",this.printCnt);
}
},
showSinglePage(page){
diff --git a/src/views/emis/EmisBaseTools/TanexPrinterPanel.vue b/src/views/emis/EmisBaseTools/TanexPrinterPanel.vue
index 73558686..4e6cde1a 100644
--- a/src/views/emis/EmisBaseTools/TanexPrinterPanel.vue
+++ b/src/views/emis/EmisBaseTools/TanexPrinterPanel.vue
@@ -822,8 +822,8 @@
},
// 响应PDF预览
- onPdfViewPrint(){
- this.$emit("onPrint");
+ onPdfViewPrint(printCnt){
+ this.$emit("onPrint",printCnt);
},
handleClose(){
this.openPdfView=false;
diff --git a/src/views/emis/emisWaybill/waybillIsPrinted.vue b/src/views/emis/emisWaybill/waybillIsPrinted.vue
index ff0c77b3..0a69a1c7 100644
--- a/src/views/emis/emisWaybill/waybillIsPrinted.vue
+++ b/src/views/emis/emisWaybill/waybillIsPrinted.vue
@@ -525,61 +525,65 @@ export default {
rowKey (row) {
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);
- // });
+ handleBatchPrint(printCnt){
+ 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(() => {});
-
- 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)
+ // batchPrint(orderList,tplCode,orderDetailList)
+ if(printCnt){
+ this.$refs.tanexPrinter.batchPrint(orderList,null,this.currentSelection);
+ }else{
+ for(let i=0; i {});
+ // this.$prompt('确定打印,输入打印份数', "提示", {
+ // confirmButtonText: "确定打印",
+ // cancelButtonText: "不打印",
+ // distinguishCancelAndClose: true,
+ // closeOnClickModal: false,
+ // inputValue: 1,
+ // inputValidator (value) {
+ // if (value) {
+ // return true;
+ // }else{
+ // return false;
+ // }
+ // },
+ // inputErrorMessage: "文件名不能为空"
+ // }).then(async ({ value }) => {
- }).catch(() => {});
+ // 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(){