From 2126cd24b8a0174ac0597340917c0a4595f72254 Mon Sep 17 00:00:00 2001
From: zjf <zhangjf@probim.com.cn>
Date: Fri, 24 Feb 2023 15:19:25 +0800
Subject: [PATCH] 订阅条件导出

---
 src/api/common.js |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/api/common.js b/src/api/common.js
index ed9309f..9a073e3 100644
--- a/src/api/common.js
+++ b/src/api/common.js
@@ -287,9 +287,25 @@
     responseType: 'blob'
   })
 }
-export function DownloadSubscriptions (data) {
+export function ExportSubscriptionsExcel (data) {
+  // let params = ''
+  // for (const key in data) {
+  //   console.log(key + ':' + data[key])
+  //   params = params + (data[key] ? `&${key}=${data[key]}` : '')
+  // }
+  // console.log(params)
   return request({
-    url: '/AutoDesk/download/subscriptions/' + data.taskId,
+    url: '/AutoDesk/subscriptions/ExportExcel?AutoRenewingContractText=' + (data.AutoRenewingContractText === 'Auto-RenewingContract' ? data.AutoRenewingContractText : '') +
+    (data.EndCustomerStateProvince
+      ? '&EndCustomerStateProvince=' + encodeURIComponent(data.EndCustomerStateProvince) : '') +
+    (data.ProductLine
+      ? '&ProductLine=' + encodeURIComponent(data.ProductLine) : '') +
+    (data.Term
+      ? '&Term=' + data.Term : '') +
+    (data.StartContractEndDate
+      ? '&StartContractEndDate=' + data.StartContractEndDate : '') +
+    (data.EndContractEndDate
+      ? '&EndContractEndDate=' + data.EndContractEndDate : ''),
     method: 'get',
     responseType: 'blob'
   })

--
Gitblit v1.9.3