| | |
| | | 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.StartLastPurchaseDate |
| | | ? '&StartLastPurchaseDate=' + data.StartLastPurchaseDate : '') + |
| | | (data.EndLastPurchaseDate |
| | | ? '&EndLastPurchaseDate=' + data.EndLastPurchaseDate : ''), |
| | | method: 'get', |
| | | responseType: 'blob' |
| | | }) |