|
|
@ -58,6 +58,8 @@ |
|
|
<div class="buttons"> |
|
|
<div class="buttons"> |
|
|
<el-button type="primary" @click="search">查询</el-button> |
|
|
<el-button type="primary" @click="search">查询</el-button> |
|
|
<el-button type="success" @click="reset">重置</el-button> |
|
|
<el-button type="success" @click="reset">重置</el-button> |
|
|
|
|
|
<el-button type="warning" @click="exportExcel()">导出excel</el-button> |
|
|
|
|
|
<el-button type="primary" @click="openExportList">查看导出列表</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</el-card> |
|
|
</el-card> |
|
|
@ -231,6 +233,38 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 导出列表 --> |
|
|
|
|
|
<el-dialog v-model="exportListVisible" title="导出列表" width="60vw"> |
|
|
|
|
|
<el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading"> |
|
|
|
|
|
<el-table-column prop="fileName" label="文件名" /> |
|
|
|
|
|
<el-table-column prop="state" label="状态"> |
|
|
|
|
|
<template #default="scope"> |
|
|
|
|
|
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'"> |
|
|
|
|
|
{{ getTagText(scope.row.state) }} |
|
|
|
|
|
</el-tag> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="createTime" label="创建时间"> |
|
|
|
|
|
<template #default="scope"> |
|
|
|
|
|
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="操作"> |
|
|
|
|
|
<template #default="scope"> |
|
|
|
|
|
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)" |
|
|
|
|
|
:disabled="scope.row.state !== 2"> |
|
|
|
|
|
下载 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<template #footer> |
|
|
|
|
|
<div class="dialog-footer"> |
|
|
|
|
|
<el-button text @click="exportListVisible = false">关闭</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- 仅保留地区财务相关弹窗:审核弹窗、编辑手续费弹窗 --> |
|
|
<!-- 仅保留地区财务相关弹窗:审核弹窗、编辑手续费弹窗 --> |
|
|
<!-- 审核弹窗 --> |
|
|
<!-- 审核弹窗 --> |
|
|
<el-dialog class="adddialog" v-model="auditFormisible" width="20vw" :before-close="closeAuditForm"> |
|
|
<el-dialog class="adddialog" v-model="auditFormisible" width="20vw" :before-close="closeAuditForm"> |
|
|
@ -688,6 +722,80 @@ const closeConfirmRefund = () => { |
|
|
textContent.value = '' |
|
|
textContent.value = '' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//导出相关 |
|
|
|
|
|
const exportListVisible = ref(false) |
|
|
|
|
|
const exportList = ref([]) |
|
|
|
|
|
const exportExcel = async function () { |
|
|
|
|
|
const statusParam = ref([30, 32, 40, 41])// 默认:看不到进度没到这里的 |
|
|
|
|
|
if (searchData.value.statuses === '待审核') { |
|
|
|
|
|
statusParam.value = [30] |
|
|
|
|
|
} else if (searchData.value.statuses === '审核通过') { |
|
|
|
|
|
statusParam.value = [40] |
|
|
|
|
|
} else if (searchData.value.statuses === '已驳回') { |
|
|
|
|
|
statusParam.value = [32] |
|
|
|
|
|
} else if (searchData.value.statuses === '退款成功') { |
|
|
|
|
|
statusParam.value = [41] |
|
|
|
|
|
} else { |
|
|
|
|
|
statusParam.value = [30, 32, 40, 41] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const params = { |
|
|
|
|
|
pageNum: pagination.value.pageNum, |
|
|
|
|
|
pageSize: pagination.value.pageSize, |
|
|
|
|
|
cashRecordDTO: { |
|
|
|
|
|
jwcode: searchData.value.jwcode, |
|
|
|
|
|
name: searchData.value.name, |
|
|
|
|
|
markets: searchData.value.markets, |
|
|
|
|
|
goodsNames: searchData.value.goodsName, |
|
|
|
|
|
statuses: statusParam.value, |
|
|
|
|
|
paymentCurrency: searchData.value.paymentCurrency, |
|
|
|
|
|
payType: searchData.value.payType, |
|
|
|
|
|
startTime: getTime.value && getTime.value[0] ? dayjs(getTime.value[0]).format('YYYY-MM-DD HH:mm:ss') : "", |
|
|
|
|
|
endTime: getTime.value && getTime.value[1] ? dayjs(getTime.value[1]).format('YYYY-MM-DD HH:mm:ss') : "", |
|
|
|
|
|
adminId: adminData.value.id |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const res = await API({ url: '/export/exportFinance', data: params }) |
|
|
|
|
|
if (res.code === 200) { |
|
|
|
|
|
ElMessage.success('导出成功') |
|
|
|
|
|
} else { |
|
|
|
|
|
ElMessage.error(res.msg || '导出失败') |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
const openExportList = () => { |
|
|
|
|
|
getExportList() |
|
|
|
|
|
exportListVisible.value = true |
|
|
|
|
|
} |
|
|
|
|
|
const getExportList = async () => { |
|
|
|
|
|
exportListLoading.value = true |
|
|
|
|
|
try { |
|
|
|
|
|
const result = await API({ url: '/export/export' }) |
|
|
|
|
|
if (result.code === 200) { |
|
|
|
|
|
const filteredData = result.data.filter(item => { |
|
|
|
|
|
return item.type === 12 |
|
|
|
|
|
}) |
|
|
|
|
|
exportList.value = filteredData |
|
|
|
|
|
} else { |
|
|
|
|
|
ElMessage.error(result.msg || '获取导出列表失败') |
|
|
|
|
|
} |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
console.error('获取导出列表出错:', error) |
|
|
|
|
|
ElMessage.error('获取导出列表失败,请稍后重试') |
|
|
|
|
|
} finally { |
|
|
|
|
|
exportListLoading.value = false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
const downloadExportFile = (item) => { |
|
|
|
|
|
if (item.state === 2) { |
|
|
|
|
|
const link = document.createElement('a') |
|
|
|
|
|
link.href = item.url |
|
|
|
|
|
link.download = item.fileName |
|
|
|
|
|
link.click() |
|
|
|
|
|
} else { |
|
|
|
|
|
ElMessage.warning('文件还在导出中,请稍后再试') |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 2.1 数据加载:获取地区财务订单列表 |
|
|
// 2.1 数据加载:获取地区财务订单列表 |
|
|
const getlist = async () => { |
|
|
const getlist = async () => { |
|
|
|