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>
|
2026-03-10 16:49:52 +08:00
|
|
|
<el-form label-position="top" class="filter-form">
|
|
|
|
|
<el-form-item label="交易时间">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="dateRange"
|
|
|
|
|
class="filter-control"
|
|
|
|
|
type="datetimerange"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
range-separator="至"
|
|
|
|
|
start-placeholder="开始时间"
|
|
|
|
|
end-placeholder="结束时间"
|
|
|
|
|
unlink-panels
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="对方名称">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.counterpartyName"
|
|
|
|
|
placeholder="请输入对方名称"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
<el-checkbox v-model="queryParams.counterpartyNameEmpty" class="empty-checkbox">
|
|
|
|
|
匹配空值
|
|
|
|
|
</el-checkbox>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="摘要">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.userMemo"
|
|
|
|
|
placeholder="请输入摘要关键字"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
<el-checkbox v-model="queryParams.userMemoEmpty" class="empty-checkbox">
|
|
|
|
|
匹配空值
|
|
|
|
|
</el-checkbox>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="本方主体">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.ourSubjects"
|
|
|
|
|
class="filter-control"
|
|
|
|
|
multiple
|
|
|
|
|
filterable
|
|
|
|
|
collapse-tags
|
|
|
|
|
clearable
|
|
|
|
|
:loading="optionsLoading"
|
|
|
|
|
placeholder="请选择本方主体"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in optionData.ourSubjectOptions"
|
|
|
|
|
:key="`subject-${item.value}`"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="本方银行">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.ourBanks"
|
|
|
|
|
class="filter-control"
|
|
|
|
|
multiple
|
|
|
|
|
filterable
|
|
|
|
|
collapse-tags
|
|
|
|
|
clearable
|
|
|
|
|
:loading="optionsLoading"
|
|
|
|
|
placeholder="请选择本方银行"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in optionData.ourBankOptions"
|
|
|
|
|
:key="`bank-${item.value}`"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="本方账号">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.ourAccounts"
|
|
|
|
|
class="filter-control"
|
|
|
|
|
multiple
|
|
|
|
|
filterable
|
|
|
|
|
collapse-tags
|
|
|
|
|
clearable
|
|
|
|
|
:loading="optionsLoading"
|
|
|
|
|
placeholder="请选择本方账号"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in optionData.ourAccountOptions"
|
|
|
|
|
:key="`account-${item.value}`"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="金额区间">
|
|
|
|
|
<div class="amount-range">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.amountMin"
|
|
|
|
|
placeholder="最小金额"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
<span class="amount-separator">-</span>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.amountMax"
|
|
|
|
|
placeholder="最大金额"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="对方账号">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.counterpartyAccount"
|
|
|
|
|
placeholder="请输入对方账号"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
<el-checkbox v-model="queryParams.counterpartyAccountEmpty" class="empty-checkbox">
|
|
|
|
|
匹配空值
|
|
|
|
|
</el-checkbox>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="交易类型">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.transactionType"
|
|
|
|
|
placeholder="请输入交易类型"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
<el-checkbox v-model="queryParams.transactionTypeEmpty" class="empty-checkbox">
|
|
|
|
|
匹配空值
|
|
|
|
|
</el-checkbox>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<div class="filter-actions">
|
|
|
|
|
<el-button type="primary" @click="handleQuery">查询</el-button>
|
|
|
|
|
<el-button plain @click="resetQuery">重置</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form>
|
2026-03-10 16:44:01 +08:00
|
|
|
</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: {
|
2026-03-10 16:49:52 +08:00
|
|
|
dateRange(value) {
|
|
|
|
|
this.queryParams.transactionStartTime = value && value[0] ? value[0] : "";
|
|
|
|
|
this.queryParams.transactionEndTime = value && value[1] ? value[1] : "";
|
|
|
|
|
},
|
2026-03-10 16:47:32 +08:00
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-10 16:49:52 +08:00
|
|
|
.filter-form {
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
|
|
|
|
:deep(.el-form-item) {
|
|
|
|
|
margin-bottom: 18px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.filter-control {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.empty-checkbox {
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.amount-range {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.amount-separator {
|
|
|
|
|
color: #909399;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.filter-actions {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
|
|
|
|
.el-button {
|
|
|
|
|
flex: 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-10 16:44:01 +08:00
|
|
|
.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
|
|
|
}
|
2026-03-10 16:49:52 +08:00
|
|
|
|
|
|
|
|
.filter-actions {
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
2026-03-04 10:35:23 +08:00
|
|
|
}
|
|
|
|
|
</style>
|