From 34aedd9998b5572488e49db884b2f7966d960a57 Mon Sep 17 00:00:00 2001
From: 819527061@qq.com <123456>
Date: 星期一, 18 十一月 2024 14:06:43 +0800
Subject: [PATCH] 订单统计页面
---
src/components/page/invoice/invoiceForm.vue | 38 ++++++++++++++++++++++++++++++--------
1 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/src/components/page/invoice/invoiceForm.vue b/src/components/page/invoice/invoiceForm.vue
index 224a2a3..26536fc 100644
--- a/src/components/page/invoice/invoiceForm.vue
+++ b/src/components/page/invoice/invoiceForm.vue
@@ -106,7 +106,7 @@
},
getByCarNo() {
this.invoiceData = []
- let url = this.$systemconfig.basePath + '/orderrecord/getByCarNo';
+ let url = this.$systemconfig.basePath + '/ffzf/orderrecord/getByCarNo';
let params = {
carNo: this.$route.query.carNo,
phone: this.$route.query.phone,
@@ -159,20 +159,42 @@
this.checkAll = checkedCount === ids.length;
},
seeInvoice() { //鏌ョ湅鍙戠エ
+ console.log(this.filedId.length,'this.filedId====')
if(this.filedId.length == 0){
alert("璇疯嚦灏戦�夋嫨涓�椤�")
}else {
- let url = this.$systemconfig.basePath + '/fileInfo/download/downloadPng';
- this.filedId.forEach(item => {
- console.log(item,'item=======')
+ if(this.filedId.length == 1) {
+ let url = this.$systemconfig.basePath + '/ffzf/fileInfo/download/downloadPng';
+ this.filedId.forEach(item => {
+ let param = {
+ fileId : item
+ }
+ this.$byutil.exportData(this,url,param,res => {
+ console.log(res,'res====')
+ let date = new Date()
+ let time = this.$moment(date).format('YYYY-MM-DD HH:mm:ss') + '-' + item
+ let blob = new Blob([res], {type: 'image/png'});
+ let downloadElement = document.createElement("a");
+ downloadElement.style.display = "none";
+ let href = window.URL.createObjectURL(blob); //鍒涘缓涓嬭浇鐨勯摼鎺�
+ downloadElement.href = href;
+ downloadElement.download = '鍙戠エ涓嬭浇.png'
+ document.body.appendChild(downloadElement);
+ downloadElement.click(); //鐐瑰嚮涓嬭浇
+ document.body.removeChild(downloadElement); //涓嬭浇瀹屾垚绉婚櫎鍏冪礌
+ window.URL.revokeObjectURL(href); //閲婃斁鎺塨lob瀵硅薄
+ })
+ })
+ }else if(this.filedId.length > 1) {
+ let result = this.filedId.join(",")
+ let url = this.$systemconfig.basePath + '/ffzf/fileInfo/download/downloadZips';
let param = {
- fileId : item
+ fileIds : result
}
this.$byutil.exportData(this,url,param,res => {
- console.log(res,'res====')
let date = new Date()
let time = this.$moment(date).format('YYYY-MM-DD HH:mm:ss')
- let blob = new Blob([res], {type: 'image/png'});
+ let blob = new Blob([res], {type: 'application/zip'});
let downloadElement = document.createElement("a");
downloadElement.style.display = "none";
let href = window.URL.createObjectURL(blob); //鍒涘缓涓嬭浇鐨勯摼鎺�
@@ -183,7 +205,7 @@
document.body.removeChild(downloadElement); //涓嬭浇瀹屾垚绉婚櫎鍏冪礌
window.URL.revokeObjectURL(href); //閲婃斁鎺塨lob瀵硅薄
})
- })
+ }
}
},
changeDate(){
--
Gitblit v1.9.1