优化涉疑交易模型口径和报告展示
This commit is contained in:
@@ -126,10 +126,10 @@
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
:disabled="isProjectTagging || isProjectArchived"
|
||||
placeholder="支持逗号、中文逗号、换行分隔"
|
||||
placeholder="仅支持英文逗号分隔"
|
||||
/>
|
||||
<div class="pull-bank-field-tip">
|
||||
支持逗号、中文逗号、换行分隔,文件解析结果会自动合并并去重
|
||||
仅支持英文逗号分隔,文件解析结果会自动合并并去重
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证文件">
|
||||
@@ -424,7 +424,7 @@ export default {
|
||||
resetPullBankInfoForm() {
|
||||
this.pullBankInfoForm = {
|
||||
idCardText: "",
|
||||
dateRange: [],
|
||||
dateRange: this.buildDefaultPullBankInfoDateRange(),
|
||||
};
|
||||
this.idCardFileList = [];
|
||||
this.parsingIdCardFile = false;
|
||||
@@ -434,7 +434,7 @@ export default {
|
||||
return Array.from(
|
||||
new Set(
|
||||
(text || "")
|
||||
.split(/[\n,,]+/)
|
||||
.split(/,+/)
|
||||
.map((item) => item.trim())
|
||||
.filter(Boolean)
|
||||
)
|
||||
@@ -504,11 +504,36 @@ export default {
|
||||
today.setHours(0, 0, 0, 0);
|
||||
return today;
|
||||
},
|
||||
getPullBankInfoMinSelectableDate() {
|
||||
return new Date(2025, 0, 1);
|
||||
},
|
||||
getPullBankInfoMaxSelectableDate() {
|
||||
const yesterday = this.getPullBankInfoTodayStart();
|
||||
yesterday.setDate(yesterday.getDate() - 1);
|
||||
return yesterday;
|
||||
},
|
||||
formatPullBankInfoDate(date) {
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||
const day = String(date.getDate()).padStart(2, "0");
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
buildDefaultPullBankInfoDateRange() {
|
||||
const minSelectableDate = this.getPullBankInfoMinSelectableDate();
|
||||
const maxSelectableDate = this.getPullBankInfoMaxSelectableDate();
|
||||
const defaultStartDate = new Date(maxSelectableDate.getTime());
|
||||
defaultStartDate.setFullYear(defaultStartDate.getFullYear() - 1);
|
||||
if (defaultStartDate.getTime() < minSelectableDate.getTime()) {
|
||||
return [
|
||||
this.formatPullBankInfoDate(minSelectableDate),
|
||||
this.formatPullBankInfoDate(maxSelectableDate),
|
||||
];
|
||||
}
|
||||
return [
|
||||
this.formatPullBankInfoDate(defaultStartDate),
|
||||
this.formatPullBankInfoDate(maxSelectableDate),
|
||||
];
|
||||
},
|
||||
parsePullBankInfoDate(dateValue) {
|
||||
if (!dateValue) return null;
|
||||
const [year, month, day] = String(dateValue)
|
||||
@@ -520,13 +545,23 @@ export default {
|
||||
return new Date(year, month - 1, day);
|
||||
},
|
||||
isPullBankInfoDateDisabled(time) {
|
||||
return time.getTime() >= this.getPullBankInfoTodayStart().getTime();
|
||||
const minSelectableDate = this.getPullBankInfoMinSelectableDate();
|
||||
const todayStart = this.getPullBankInfoTodayStart();
|
||||
return (
|
||||
time.getTime() < minSelectableDate.getTime() ||
|
||||
time.getTime() >= todayStart.getTime()
|
||||
);
|
||||
},
|
||||
hasInvalidPullBankInfoDateRange(dateRange) {
|
||||
const minSelectableDate = this.getPullBankInfoMinSelectableDate();
|
||||
const maxSelectableDate = this.getPullBankInfoMaxSelectableDate();
|
||||
return (dateRange || []).some((dateValue) => {
|
||||
const date = this.parsePullBankInfoDate(dateValue);
|
||||
return !date || date.getTime() > maxSelectableDate.getTime();
|
||||
return (
|
||||
!date ||
|
||||
date.getTime() < minSelectableDate.getTime() ||
|
||||
date.getTime() > maxSelectableDate.getTime()
|
||||
);
|
||||
});
|
||||
},
|
||||
buildFinalIdCardList() {
|
||||
@@ -555,7 +590,7 @@ export default {
|
||||
}
|
||||
|
||||
if (this.hasInvalidPullBankInfoDateRange([startDate, endDate])) {
|
||||
this.$message.warning("时间跨度最晚只能选择到昨天");
|
||||
this.$message.warning("时间跨度仅支持 2025-01-01 至昨天");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user