From ce5f54390b99b19723845f32daebf66c26958505 Mon Sep 17 00:00:00 2001
From: yunuo970428 <405378304@qq.com>
Date: Wed, 8 Jan 2025 11:44:22 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=B8=93=E9=A1=B9=E8=BF=94?=
=?UTF-8?q?=E5=88=A9=E9=A2=84=E6=8F=90=E8=AF=A6=E6=83=85=E5=AF=BC=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../specialrebate/specialrebatewithholding.js | 10 +++++++
.../specialrebatewithholdingInfo.vue | 27 ++++++++++++++++++-
.../zhuanxiangfanliyutiYiBanInfo.vue | 27 ++++++++++++++++++-
3 files changed, 62 insertions(+), 2 deletions(-)
diff --git a/anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatewithholding.js b/anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatewithholding.js
index c9b01b652a..912cc866bb 100644
--- a/anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatewithholding.js
+++ b/anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatewithholding.js
@@ -51,6 +51,16 @@ export default {
method: 'get'
})
},
+ // 导出
+ downloadExcel: function(data) {
+ return request({
+ url: '/scm/v1/scmspecialrebatewith/excelList',
+ method: 'post',
+ params: data,
+ responseType: 'blob', // 表明返回服务器返回的数据类型
+ headers: { 'Content-Type': 'application/json' }
+ })
+ },
createPdf: function(data) {
return request({
url: '/scm/v1/scmspecialrebatewithapply/createPdf',
diff --git a/anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatewithholding/specialrebatewithholdingInfo.vue b/anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatewithholding/specialrebatewithholdingInfo.vue
index afb4aa5d9b..9788389f1f 100644
--- a/anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatewithholding/specialrebatewithholdingInfo.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatewithholding/specialrebatewithholdingInfo.vue
@@ -7,7 +7,7 @@
{{ viewTitle }}
- 导出
+ 导出
下载
关闭
@@ -191,6 +191,31 @@ export default {
})
return sums
},
+ doExport() {
+ const loading = this.$loading({
+ lock: true,
+ text: 'Loading',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+ req.downloadExcel({ sid: this.formobj.sid }).then((resp) => {
+ loading.close()
+ const blob = new Blob([resp], {
+ type: 'application/vnd.ms-excel'
+ })
+ const fileName = '专项返利预提明细' + '.xls'
+ const elink = document.createElement('a')
+ elink.download = fileName
+ elink.style.display = 'none'
+ elink.href = URL.createObjectURL(blob)
+ document.body.appendChild(elink)
+ elink.click()
+ URL.revokeObjectURL(elink.href)
+ document.body.removeChild(elink)
+ }).catch(() => {
+ loading.close()
+ })
+ },
download() {
req.createPdf({ specialWithSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') {
diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiYiBanInfo.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiYiBanInfo.vue
index c965f8c355..56a5452f29 100644
--- a/anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiYiBanInfo.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiYiBanInfo.vue
@@ -7,7 +7,7 @@
{{ viewTitle }}
- 导出
+ 导出
下载
撤回
@@ -226,6 +226,31 @@ export default {
})
return sums
},
+ doExport() {
+ const loading = this.$loading({
+ lock: true,
+ text: 'Loading',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+ req.downloadExcel({ sid: this.formobj.sid }).then((resp) => {
+ loading.close()
+ const blob = new Blob([resp], {
+ type: 'application/vnd.ms-excel'
+ })
+ const fileName = '专项返利预提明细' + '.xls'
+ const elink = document.createElement('a')
+ elink.download = fileName
+ elink.style.display = 'none'
+ elink.href = URL.createObjectURL(blob)
+ document.body.appendChild(elink)
+ elink.click()
+ URL.revokeObjectURL(elink.href)
+ document.body.removeChild(elink)
+ }).catch(() => {
+ loading.close()
+ })
+ },
download() {
req.createPdf({ specialWithSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') {