From 26e972196ed6046bcb7fb341be86241c8300fd2b Mon Sep 17 00:00:00 2001
From: zjf <zhangjf@probim.com.cn>
Date: Fri, 03 Mar 2023 18:12:39 +0800
Subject: [PATCH] 修改参数及页面

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

diff --git a/src/api/common.js b/src/api/common.js
index ed9309f..68e4f4c 100644
--- a/src/api/common.js
+++ b/src/api/common.js
@@ -287,9 +287,33 @@
     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?AutoRenewingSubscriptionText=' + (data.AutoRenewingSubscriptionText === 'AutoRenewing Subscription' ? data.AutoRenewingSubscriptionText : '') +
+    (data.ContractNumber
+      ? '&ContractNumber=' + encodeURIComponent(data.ContractNumber) : '') +
+    (data.EndCustomerAccountName
+      ? '&EndCustomerAccountName=' + encodeURIComponent(data.EndCustomerAccountName) : '') +
+    (data.EndCustomerStateProvince
+      ? '&EndCustomerStateProvince=' + encodeURIComponent(data.EndCustomerStateProvince) : '') +
+    (data.ProductLine
+      ? '&ProductLine=' + encodeURIComponent(data.ProductLine) : '') +
+    (data.Term
+      ? '&Term=' + data.Term : '') +
+    (data.StartEndDate
+      ? '&StartEndDate=' + data.StartEndDate : '') +
+    (data.EndEndDate
+      ? '&EndEndDate=' + data.EndEndDate : '') +
+    (data.StartLastPurchaseDate
+      ? '&StartLastPurchaseDate=' + data.StartLastPurchaseDate : '') +
+    (data.EndLastPurchaseDate
+      ? '&EndLastPurchaseDate=' + data.EndLastPurchaseDate : ''),
     method: 'get',
     responseType: 'blob'
   })

--
Gitblit v1.9.3