2026-03-04 10:35:23 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="detail-query-container">
|
2026-03-10 16:44:01 +08:00
|
|
|
<div class="query-page-shell">
|
|
|
|
|
<div class="shell-sidebar">
|
|
|
|
|
<div class="shell-panel-title">筛选条件</div>
|
|
|
|
|
<div class="shell-panel-body">筛选区域待接入</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="shell-main">
|
|
|
|
|
<div class="shell-header">
|
|
|
|
|
<span class="shell-title">流水明细查询</span>
|
|
|
|
|
<el-button size="small" type="primary" plain @click="handleExport">
|
|
|
|
|
导出流水
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="shell-panel-body">结果区域待接入</div>
|
|
|
|
|
</div>
|
2026-03-04 10:35:23 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2026-03-10 16:44:01 +08:00
|
|
|
import {
|
|
|
|
|
listBankStatement,
|
|
|
|
|
getBankStatementOptions,
|
|
|
|
|
getBankStatementDetail
|
|
|
|
|
} from "@/api/ccdiProjectBankStatement";
|
|
|
|
|
|
2026-03-10 16:47:32 +08:00
|
|
|
const createDefaultQueryParams = (projectId) => ({
|
|
|
|
|
projectId,
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
tabType: "all",
|
|
|
|
|
transactionStartTime: "",
|
|
|
|
|
transactionEndTime: "",
|
|
|
|
|
counterpartyName: "",
|
|
|
|
|
counterpartyNameEmpty: false,
|
|
|
|
|
userMemo: "",
|
|
|
|
|
userMemoEmpty: false,
|
|
|
|
|
ourSubjects: [],
|
|
|
|
|
ourBanks: [],
|
|
|
|
|
ourAccounts: [],
|
|
|
|
|
amountMin: "",
|
|
|
|
|
amountMax: "",
|
|
|
|
|
counterpartyAccount: "",
|
|
|
|
|
counterpartyAccountEmpty: false,
|
|
|
|
|
transactionType: "",
|
|
|
|
|
transactionTypeEmpty: false,
|
|
|
|
|
orderBy: "trxDate",
|
|
|
|
|
orderDirection: "desc",
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const createEmptyOptionData = () => ({
|
|
|
|
|
ourSubjectOptions: [],
|
|
|
|
|
ourBankOptions: [],
|
|
|
|
|
ourAccountOptions: [],
|
|
|
|
|
});
|
|
|
|
|
|
2026-03-04 10:35:23 +08:00
|
|
|
export default {
|
|
|
|
|
name: "DetailQuery",
|
|
|
|
|
props: {
|
|
|
|
|
projectId: {
|
|
|
|
|
type: [String, Number],
|
|
|
|
|
default: null,
|
|
|
|
|
},
|
|
|
|
|
projectInfo: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => ({
|
|
|
|
|
projectName: "",
|
|
|
|
|
updateTime: "",
|
|
|
|
|
projectStatus: "0",
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-03-10 16:47:32 +08:00
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
loading: false,
|
|
|
|
|
optionsLoading: false,
|
|
|
|
|
activeTab: "all",
|
|
|
|
|
dateRange: [],
|
|
|
|
|
list: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
queryParams: createDefaultQueryParams(this.projectId),
|
|
|
|
|
optionData: createEmptyOptionData(),
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getOptions();
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
projectId() {
|
|
|
|
|
this.syncProjectId();
|
|
|
|
|
this.getOptions();
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-03-10 16:44:01 +08:00
|
|
|
methods: {
|
2026-03-10 16:47:32 +08:00
|
|
|
async getList() {
|
|
|
|
|
this.syncProjectId();
|
|
|
|
|
if (!this.queryParams.projectId) {
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.total = 0;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.loading = true;
|
|
|
|
|
try {
|
|
|
|
|
const res = await listBankStatement(this.queryParams);
|
|
|
|
|
this.list = res.rows || [];
|
|
|
|
|
this.total = res.total || 0;
|
|
|
|
|
} catch (error) {
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.total = 0;
|
|
|
|
|
console.error("加载流水明细失败", error);
|
|
|
|
|
} finally {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getOptions() {
|
|
|
|
|
this.syncProjectId();
|
|
|
|
|
if (!this.queryParams.projectId) {
|
|
|
|
|
this.optionData = createEmptyOptionData();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.optionsLoading = true;
|
|
|
|
|
try {
|
|
|
|
|
const res = await getBankStatementOptions(this.queryParams.projectId);
|
|
|
|
|
const data = res.data || {};
|
|
|
|
|
this.optionData = {
|
|
|
|
|
ourSubjectOptions: data.ourSubjectOptions || [],
|
|
|
|
|
ourBankOptions: data.ourBankOptions || [],
|
|
|
|
|
ourAccountOptions: data.ourAccountOptions || [],
|
|
|
|
|
};
|
|
|
|
|
} catch (error) {
|
|
|
|
|
this.optionData = createEmptyOptionData();
|
|
|
|
|
console.error("加载流水筛选项失败", error);
|
|
|
|
|
} finally {
|
|
|
|
|
this.optionsLoading = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
syncProjectId() {
|
|
|
|
|
this.queryParams.projectId = this.projectId;
|
|
|
|
|
this.queryParams.tabType = this.activeTab;
|
|
|
|
|
},
|
|
|
|
|
handleQuery() {
|
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
|
this.queryParams.tabType = this.activeTab;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
resetQuery() {
|
|
|
|
|
this.activeTab = "all";
|
|
|
|
|
this.dateRange = [];
|
|
|
|
|
this.queryParams = createDefaultQueryParams(this.projectId);
|
|
|
|
|
this.syncProjectId();
|
|
|
|
|
this.getOptions();
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
2026-03-10 16:44:01 +08:00
|
|
|
handleExport() {
|
|
|
|
|
void listBankStatement;
|
|
|
|
|
void getBankStatementOptions;
|
|
|
|
|
void getBankStatementDetail;
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-03-04 10:35:23 +08:00
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.detail-query-container {
|
2026-03-10 16:44:01 +08:00
|
|
|
padding: 16px;
|
2026-03-04 10:35:23 +08:00
|
|
|
background: #fff;
|
2026-03-10 16:44:01 +08:00
|
|
|
min-height: 480px;
|
2026-03-04 10:35:23 +08:00
|
|
|
}
|
|
|
|
|
|
2026-03-10 16:44:01 +08:00
|
|
|
.query-page-shell {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: 320px minmax(0, 1fr);
|
|
|
|
|
gap: 16px;
|
|
|
|
|
}
|
2026-03-04 10:35:23 +08:00
|
|
|
|
2026-03-10 16:44:01 +08:00
|
|
|
.shell-sidebar,
|
|
|
|
|
.shell-main {
|
|
|
|
|
min-height: 448px;
|
|
|
|
|
border: 1px solid #ebeef5;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.shell-sidebar {
|
|
|
|
|
padding: 20px 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.shell-main {
|
|
|
|
|
padding: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.shell-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.shell-title,
|
|
|
|
|
.shell-panel-title {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #303133;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.shell-panel-body {
|
|
|
|
|
color: #909399;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
line-height: 22px;
|
|
|
|
|
}
|
2026-03-04 10:35:23 +08:00
|
|
|
|
2026-03-10 16:44:01 +08:00
|
|
|
@media (max-width: 992px) {
|
|
|
|
|
.query-page-shell {
|
|
|
|
|
grid-template-columns: 1fr;
|
2026-03-04 10:35:23 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|