|
|
@@ -1,4 +1,5 @@
|
|
|
<template>
|
|
|
+ <a-spin size="large" :spinning="exportLoading" tip="正在导出...">
|
|
|
<a-card :bordered="false">
|
|
|
<!-- 查询区域 -->
|
|
|
<div class="table-page-search-wrapper">
|
|
|
@@ -29,6 +30,8 @@
|
|
|
<!-- 操作按钮区域 -->
|
|
|
<div class="table-operator">
|
|
|
<a-button @click="handleChargeBack" type="primary" icon="rollback" v-if="paymentLane === 1">退单处理</a-button>
|
|
|
+
|
|
|
+ <a-button v-has="'paymentDetail:exportDetail'" type="primary" icon="download" @click="handleExportXls('付款明细')">导出</a-button>
|
|
|
</div>
|
|
|
|
|
|
<!-- table区域-begin -->
|
|
|
@@ -69,6 +72,7 @@
|
|
|
</div>
|
|
|
<HlwPaymentReissueModal ref="modalPayBackForm" @ok="modalFormOk"></HlwPaymentReissueModal>
|
|
|
</a-card>
|
|
|
+ </a-spin>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
@@ -76,7 +80,7 @@
|
|
|
import '@/assets/less/TableExpand.less'
|
|
|
import { mixinDevice } from '@/utils/mixin'
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
- import { httpAction, getAction, putAction } from '@/api/manage'
|
|
|
+ import { httpAction, getAction, putAction,downFile } from '@/api/manage'
|
|
|
import HlwPaymentReissueModal from './modules/HlwPaymentReissueModal'
|
|
|
|
|
|
export default {
|
|
|
@@ -87,6 +91,7 @@
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ exportLoading: false,
|
|
|
description: '付款明细表管理页面',
|
|
|
paymentLane: 0,
|
|
|
// 表头
|
|
|
@@ -295,6 +300,40 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
+ handleExportXls(fileName){
|
|
|
+ if(!fileName || typeof fileName != "string"){
|
|
|
+ fileName = "导出文件"
|
|
|
+ }
|
|
|
+ let param = {...this.queryParam};
|
|
|
+ param.paymentId = this.$route.query.paymentId;
|
|
|
+ console.log("导出参数",param)
|
|
|
+ this.exportLoading = true;
|
|
|
+ downFile(this.url.exportXlsUrl,param).then((data)=>{
|
|
|
+ if (!data) {
|
|
|
+ this.$message.warning("文件下载失败")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
+ window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xlsx')
|
|
|
+ }else{
|
|
|
+ let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
|
|
|
+ let link = document.createElement('a')
|
|
|
+ link.style.display = 'none'
|
|
|
+ link.href = url
|
|
|
+ link.setAttribute('download', fileName+'.xlsx')
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ document.body.removeChild(link); //下载完成移除元素
|
|
|
+ window.URL.revokeObjectURL(url); //释放掉blob对象
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.exportLoading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|