支持拉取行内和金综流水

This commit is contained in:
wjj
2026-07-20 13:07:49 +08:00
parent 1561df924f
commit 75d094dad4
13 changed files with 283 additions and 30 deletions

View File

@@ -56,7 +56,7 @@ export function executeQualityCheck(projectId) {
})
}
// 拉取本行信息
// 解析证件号码文件
export function parseIdCardFile(file) {
const formData = new FormData()
formData.append('file', file)
@@ -70,7 +70,7 @@ export function parseIdCardFile(file) {
})
}
// 拉取本行信息
// 拉取行内/金综流水
export function pullBankInfo(data) {
return request({
url: '/ccdi/file-upload/pull-bank-info',

View File

@@ -25,7 +25,7 @@
:disabled="isWriteLocked"
@click="handleFetchBankInfo"
>
拉取本行信息
拉取流水
</el-button>
<el-button
size="small"
@@ -110,7 +110,7 @@
</div>
<el-dialog
title="拉取本行信息"
title="拉取行内/金综流水"
:visible.sync="pullBankInfoDialogVisible"
:close-on-click-modal="false"
width="640px"
@@ -120,6 +120,24 @@
:model="pullBankInfoForm"
label-width="100px"
>
<el-form-item label="流水类型">
<el-radio-group
v-model="pullBankInfoForm.dataChannelCode"
:disabled="isWriteLocked"
class="pull-bank-channel-group"
>
<el-radio label="ZJRCU">
<span class="pull-bank-channel-title">拉取行内流水</span>
<span class="pull-bank-channel-tip">备注:仅支持获取近一年流水</span>
</el-radio>
<el-radio label="JZL">
<span class="pull-bank-channel-title">拉取金综流水</span>
<span class="pull-bank-channel-tip">
备注:自动获取最近30天内授权的流水文件
</span>
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="证件号码">
<el-input
v-model="pullBankInfoForm.idCardText"
@@ -171,7 +189,7 @@
</div>
</div>
</el-form-item>
<el-form-item label="时间跨度">
<el-form-item v-if="isZjrcuPullBankInfo" label="时间跨度">
<el-date-picker
class="pull-bank-range-picker"
v-model="pullBankInfoForm.dateRange"
@@ -309,6 +327,7 @@ export default {
parsingIdCardFile: false,
idCardFileList: [],
pullBankInfoForm: {
dataChannelCode: "ZJRCU",
idCardText: "",
dateRange: [],
},
@@ -365,6 +384,9 @@ export default {
isWriteLocked() {
return !this.canOperate || this.isProjectTagging || this.isProjectArchived;
},
isZjrcuPullBankInfo() {
return this.pullBankInfoForm.dataChannelCode === "ZJRCU";
},
writeLockedMessage() {
if (!this.canOperate) {
return "当前项目仅可查看,暂不可上传或拉取数据。";
@@ -440,6 +462,7 @@ export default {
},
resetPullBankInfoForm() {
this.pullBankInfoForm = {
dataChannelCode: "ZJRCU",
idCardText: "",
dateRange: this.buildDefaultPullBankInfoDateRange(),
};
@@ -594,18 +617,22 @@ export default {
}
const idCards = this.buildFinalIdCardList();
const [startDate, endDate] = this.pullBankInfoForm.dateRange || [];
const dataChannelCode = this.pullBankInfoForm.dataChannelCode;
if (idCards.length === 0) {
this.$message.warning("请至少输入一个身份证号");
return;
}
if (!startDate || !endDate) {
if (this.isZjrcuPullBankInfo && (!startDate || !endDate)) {
this.$message.warning("请选择完整的时间跨度");
return;
}
if (this.hasInvalidPullBankInfoDateRange([startDate, endDate])) {
if (
this.isZjrcuPullBankInfo &&
this.hasInvalidPullBankInfoDateRange([startDate, endDate])
) {
this.$message.warning("时间跨度仅支持近一年内日期,且最晚只能选择到昨天");
return;
}
@@ -616,8 +643,9 @@ export default {
const payload = {
projectId: this.projectId,
idCards,
startDate,
endDate,
dataChannelCode,
startDate: this.isZjrcuPullBankInfo ? startDate : null,
endDate: this.isZjrcuPullBankInfo ? endDate : null,
};
const res = await pullBankInfo(payload);
@@ -642,11 +670,11 @@ export default {
} catch (error) {
this.pullBankInfoLoading = false;
this.$message.error(
"拉取本行信息失败:" + ((error && error.message) || "未知错误")
"拉取流水失败:" + ((error && error.message) || "未知错误")
);
}
},
/** 拉取本行信息 */
/** 拉取流水 */
handleFetchBankInfo() {
if (this.isWriteLocked) {
this.showWriteLockedMessage();
@@ -1171,6 +1199,37 @@ export default {
}
.pull-bank-info-form {
.pull-bank-channel-group {
display: flex;
flex-direction: column;
gap: 12px;
::v-deep .el-radio {
display: flex;
align-items: center;
margin-right: 0;
line-height: 24px;
}
::v-deep .el-radio__label {
display: inline-flex;
align-items: baseline;
gap: 16px;
flex-wrap: wrap;
padding-left: 10px;
}
}
.pull-bank-channel-title {
font-size: 15px;
color: #303133;
}
.pull-bank-channel-tip {
font-size: 13px;
color: #909399;
}
.pull-bank-field-tip {
margin-top: 8px;
font-size: 12px;