This commit is contained in:
parent
5510f68a74
commit
8d1171ce96
|
@ -20,6 +20,12 @@ export function extractStatusApi(id, data) {
|
|||
export function exportInancialRecordApi(data) {
|
||||
return request.get(`financial_record/mer_export`, data)
|
||||
}
|
||||
/**
|
||||
* @description 下载订单
|
||||
*/
|
||||
export function exportmerDetailExportApi(data) {
|
||||
return request.get(`financial_record/mer_detail_export`, data)
|
||||
}
|
||||
/**
|
||||
* @description 充值记录 -- 列表
|
||||
*/
|
||||
|
|
|
@ -67,6 +67,11 @@
|
|||
label="邮费金额"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="refund_amount"
|
||||
label="退款金额"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="amount"
|
||||
label="可提现金额"
|
||||
|
@ -77,6 +82,7 @@
|
|||
<router-link :to="{path: roterPre + '/accounts/billDetails/' + scope.row.mer_id}">
|
||||
<el-button type="text" size="small" >账单详情</el-button>
|
||||
</router-link>
|
||||
<el-button type="text" size="small" @click="exports('download',scope.row.mer_id,scope.row.date)">下载</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -98,7 +104,7 @@
|
|||
|
||||
<script>
|
||||
|
||||
import { merchantBillList,exportInancialRecordApi } from '@/api/accounts'
|
||||
import { merchantBillList,exportInancialRecordApi,exportmerDetailExportApi } from '@/api/accounts'
|
||||
import { merSelectApi } from "@/api/product";
|
||||
import { roterPre } from '@/settings'
|
||||
import createWorkBook from '@/utils/newToExcel.js'
|
||||
|
@ -155,7 +161,13 @@ export default {
|
|||
this.$message.error(res.message);
|
||||
});
|
||||
},
|
||||
async exports() {
|
||||
async exports(type,id,date) {
|
||||
let params = {
|
||||
mer_id: id,
|
||||
page:1,
|
||||
limit:500,
|
||||
date
|
||||
}
|
||||
const excelData = JSON.parse(JSON.stringify(this.tableForm)); let data = []
|
||||
excelData.page = 1
|
||||
excelData.limit = 200
|
||||
|
@ -163,7 +175,7 @@ export default {
|
|||
let pageCount = 1
|
||||
let lebData = {}
|
||||
for (let i = 0; i < pageCount; i++) {
|
||||
lebData = await this.downOrderData(excelData)
|
||||
lebData = type=='download'?await this.exportmerDetailExportApi(params):await this.downOrderData(excelData)
|
||||
pageCount = Math.ceil(lebData.count / excelData.limit)
|
||||
if (lebData.export.length) {
|
||||
data = data.concat(lebData.export)
|
||||
|
@ -181,6 +193,14 @@ export default {
|
|||
})
|
||||
})
|
||||
},
|
||||
/** 下载订单 */
|
||||
exportmerDetailExportApi(excelData) {
|
||||
return new Promise((resolve, reject) => {
|
||||
exportmerDetailExportApi(excelData).then((res) => {
|
||||
return resolve(res.data)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
|
|
Loading…
Reference in New Issue