补齐流水明细查询导出与状态反馈
This commit is contained in:
@@ -159,7 +159,13 @@
|
||||
<span class="shell-title">流水明细查询</span>
|
||||
<span class="shell-subtitle">按项目范围查询交易明细并查看详情</span>
|
||||
</div>
|
||||
<el-button size="small" type="primary" plain @click="handleExport">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
plain
|
||||
:disabled="total === 0"
|
||||
@click="handleExport"
|
||||
>
|
||||
导出流水
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -171,6 +177,15 @@
|
||||
</el-tabs>
|
||||
|
||||
<div class="result-card">
|
||||
<el-alert
|
||||
v-if="listError"
|
||||
:closable="false"
|
||||
class="result-alert"
|
||||
show-icon
|
||||
title="流水明细加载失败,请稍后重试"
|
||||
type="error"
|
||||
/>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
@@ -179,6 +194,12 @@
|
||||
class="result-table"
|
||||
@sort-change="handleSortChange"
|
||||
>
|
||||
<template slot="empty">
|
||||
<el-empty
|
||||
:image-size="96"
|
||||
description="当前筛选条件下暂无流水明细"
|
||||
/>
|
||||
</template>
|
||||
<el-table-column
|
||||
label="交易时间"
|
||||
prop="trxDate"
|
||||
@@ -445,6 +466,7 @@ export default {
|
||||
dateRange: [],
|
||||
list: [],
|
||||
total: 0,
|
||||
listError: "",
|
||||
detailData: createEmptyDetailData(),
|
||||
queryParams: createDefaultQueryParams(this.projectId),
|
||||
optionData: createEmptyOptionData(),
|
||||
@@ -471,6 +493,7 @@ export default {
|
||||
if (!this.queryParams.projectId) {
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
this.listError = "";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -479,9 +502,11 @@ export default {
|
||||
const res = await listBankStatement(this.queryParams);
|
||||
this.list = res.rows || [];
|
||||
this.total = res.total || 0;
|
||||
this.listError = "";
|
||||
} catch (error) {
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
this.listError = "加载流水明细失败";
|
||||
console.error("加载流水明细失败", error);
|
||||
} finally {
|
||||
this.loading = false;
|
||||
@@ -577,7 +602,17 @@ export default {
|
||||
this.detailVisible = false;
|
||||
this.detailData = createEmptyDetailData();
|
||||
},
|
||||
handleExport() {},
|
||||
handleExport() {
|
||||
if (this.total === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.download(
|
||||
"ccdi/project/bank-statement/export",
|
||||
{ ...this.queryParams },
|
||||
`${this.projectInfo.projectName || "项目"}_流水明细_${Date.now()}.xlsx`
|
||||
);
|
||||
},
|
||||
formatField(value) {
|
||||
return value || "-";
|
||||
},
|
||||
@@ -697,6 +732,10 @@ export default {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.result-alert {
|
||||
margin: 16px 16px 0;
|
||||
}
|
||||
|
||||
.result-table {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -799,6 +838,10 @@ export default {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.result-alert {
|
||||
margin: 12px 12px 0;
|
||||
}
|
||||
|
||||
.detail-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user