소스 검색

会计、评估OMS开票功能调整

huangguoce 2 달 전
부모
커밋
a80474a274

+ 2 - 2
src/api/cw/invoice/CwFinanceInvoiceService.js

@@ -173,11 +173,11 @@ export default {
 			data: data,
 		});
 	},
-	downLoadOMSInvoiceAttachzip(fileUrl) {
+	downLoadOMSInvoiceAttachzip(params) {
 		return request({
 			url: prefix + "/cw_finance/invoice/downLoadOMSInvoiceAttachzip",
 			method: "get",
-			params: { fileUrl: fileUrl },
+			params: params,
 			responseType: "blob",
 		});
 	},

+ 2 - 2
src/api/finance/invoice/FinanceInvoiceService.js

@@ -108,11 +108,11 @@ export default class FinanceInvoiceService {
 			params: params,
 		});
 	}
-	downLoadOMSInvoiceAttachzip(fileUrl) {
+	downLoadOMSInvoiceAttachzip(params) {
 		return request({
 			url: prefix + "/finance/invoice/downLoadOMSInvoiceAttachzip",
 			method: "get",
-			params: { fileUrl: fileUrl },
+			params: params,
 			responseType: "blob",
 		});
 	}

+ 1 - 0
src/views/cw/invoice/InvoiceForm.vue

@@ -969,6 +969,7 @@ export default {
     },
     close() {
       this.$refs.uploadComponent.clearUpload()
+      this.$refs.invoiceComponent.clearUpload()
       this.$refs.inputForm.resetFields()
       this.inputForm = {
         accountTotal: '',

+ 5 - 2
src/views/cw/invoice/InvoiceList.vue

@@ -1150,9 +1150,12 @@ export default {
         let omsAttachmentUrl = row.omsAttachmentUrl.substring(1)
         // 去除最后一个/线后面的内容,保留/  
         omsAttachmentUrl = omsAttachmentUrl.substring(0, omsAttachmentUrl.lastIndexOf('/') + 1)
-        financeInvoiceService.downLoadOMSInvoiceAttachzip(omsAttachmentUrl).then((res) => {
+        financeInvoiceService.downLoadOMSInvoiceAttachzip({
+          fileUrl: omsAttachmentUrl,
+          invoiceNo: row.no
+        }).then((res) => {
           // 将二进制流文件写入excel表,以下为重要步骤
-          this.$utils.downloadZip(res, '发票-' + row.number + '所有发票格式.zip')
+          this.$utils.downloadZip(res, '发票-' + row.no + '.zip')
           this.loading = false
         }).catch(function (err) {
           this.loading = false

+ 1 - 0
src/views/finance/invoice/InvoiceForm.vue

@@ -906,6 +906,7 @@ export default {
     },
     close() {
       this.$refs.uploadComponent.clearUpload()
+      this.$refs.invoiceComponent.clearUpload()
       this.$refs.inputForm.resetFields()
       this.inputForm = {
         id: '',

+ 5 - 2
src/views/finance/invoice/InvoiceList.vue

@@ -935,9 +935,12 @@ export default {
         this.loading = true
         let omsAttachmentUrl = row.omsAttachmentUrl.substring(1)
         omsAttachmentUrl = omsAttachmentUrl.substring(0, omsAttachmentUrl.lastIndexOf('/') + 1)
-        this.financeInvoiceService.downLoadOMSInvoiceAttachzip(omsAttachmentUrl).then((res) => {
+        this.financeInvoiceService.downLoadOMSInvoiceAttachzip({
+          fileUrl: omsAttachmentUrl,
+          invoiceNo: row.no
+        }).then((res) => {
           // 将二进制流文件写入excel表,以下为重要步骤
-          this.$utils.downloadZip(res, '发票-' + row.number + '所有发票格式.zip')
+          this.$utils.downloadZip(res, '发票-' + row.no + '.zip')
           this.loading = false
         }).catch(function (err) {
           this.loading = false