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