Commit 1c645add authored by guoyou's avatar guoyou

会员订单管理导出兼容

parent 305314c7
......@@ -534,36 +534,16 @@ export default {
},
excel() {
this.listQuery.isExport = true;
// if (!!this.createTime && !!this.createTime[0]) {
// this.listQuery.startOrderTime = formatDate(this.createTime[0], 'yyyy-MM-dd')+ ' 00:00:00'
// this.listQuery.endOrderTime = formatDate(this.createTime[1], 'yyyy-MM-dd')+ ' 23:59:59'
// }
// if (!!this.aplyTime && !!this.aplyTime[0]) {
// this.listQuery.startPayTime = this.aplyTime[0].getTime()
// this.listQuery.endPayTime = this.aplyTime[1].getTime()
// }
// let endOrderTime = this.listQuery.endOrderTime
// let endPayTime = this.listQuery.endPayTime
// let facilitatePhone = this.listQuery.facilitatePhone
// let isExport = 'true'
// let leaderPhone = this.listQuery.leaderPhone
// let level = this.listQuery.level
// let name = this.listQuery.name
// let orderNo = this.listQuery.orderNo
// let phone = this.listQuery.phone
// let startOrderTime = this.listQuery.startOrderTime
// let startPayTime = this.listQuery.startPayTime
// let state = this.listQuery.state
// let type = this.listQuery.type
// window.location.href=process.env.BASE_API+'/api/order/orderMember/app/unauth/export'+'?isExport='+isExport
var u = navigator.userAgent, app = navigator.appVersion;
orderMemberExcel(this.listQuery,{responseType: 'arraybuffer'}).then(res => {
this.listQuery.isExport = false;
const content = res
const blob = new Blob([content], {type: "application/vnd.ms-excel"})
const fileName = this.timestamp(new Date())+'.xlsx'
if ('download' in document.createElement('a')) {
// 非IE下载
const fileName = this.timestamp(new Date())+'会员订单列表.xlsx'
if(u.indexOf('Trident') > -1){
window.navigator.msSaveBlob(blob, fileName)
console.log('ie');
}else{
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
......@@ -572,9 +552,7 @@ export default {
elink.click()
URL.revokeObjectURL(elink.href) // 释放URL 对象
document.body.removeChild(elink)
} else {
// IE10+下载
window.navigator.msSaveBlob(blob, fileName)
console.log('fei ie');
}
})
},
......
......@@ -58,7 +58,7 @@
</el-table-column>
<el-table-column align="center" label="收款账号">
<template scope="scope">
<span>{{scope.row.accountName}}</span>
<span>{{scope.row.accountNumber}}</span>
</template>
</el-table-column>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment