1、调整导入运单
2、调整对账
This commit is contained in:
@@ -57,6 +57,36 @@
|
||||
{{ accessTypeMap[row.accessType] || '临时客商' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
<template #businessEndDate="{ row }">
|
||||
<span :class="{ 'business-license-expiring': isBusinessLicenseExpiringSoon(row) }">
|
||||
{{ formatBusinessLicenseValidPeriod(row) }}
|
||||
</span>
|
||||
</template>
|
||||
<template #fundUseRate="{ row }">
|
||||
{{ formatFundUseRate(row) }}
|
||||
</template>
|
||||
<template #fundUseRisk="{ row }">
|
||||
<el-tag v-if="row.fundUseRisk === 'high'" type="danger">
|
||||
{{ row.fundUseRiskName || '高风险' }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="row.fundUseRisk === 'medium'" type="warning">
|
||||
{{ row.fundUseRiskName || '中风险' }}
|
||||
</el-tag>
|
||||
<span v-else class="fund-use-risk-none">-</span>
|
||||
</template>
|
||||
<template #fundUseRisk-header>
|
||||
<span class="fund-use-risk-header">
|
||||
资金使用额度风险
|
||||
<el-tooltip placement="top" effect="dark">
|
||||
<template #content>
|
||||
<div>中风险:80% ≤ 客户资金额度使用率 < 90%</div>
|
||||
<div>高风险:客户资金额度使用率 ≥ 90%</div>
|
||||
<div>使用率 = (累计付款金额 - 累计收票金额) / 最大资金使用额度 × 100%</div>
|
||||
</template>
|
||||
<i class="el-icon-question fund-use-risk-help" />
|
||||
</el-tooltip>
|
||||
</span>
|
||||
</template>
|
||||
<template #approvalStatus="{ row }">
|
||||
<el-tag
|
||||
class="status-text"
|
||||
@@ -176,11 +206,29 @@
|
||||
<el-form-item label="客商编号" prop="customerCode">
|
||||
<el-input
|
||||
v-model="archiveForm.customerCode"
|
||||
disabled
|
||||
placeholder="保存后自动生成"
|
||||
maxlength="20"
|
||||
show-word-limit
|
||||
placeholder="请输入,留空则自动生成"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="客商类型" prop="customerKind">
|
||||
<el-select
|
||||
v-model="archiveForm.customerKind"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in customerKindOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="客商性质" prop="customerNature">
|
||||
<el-select
|
||||
@@ -241,23 +289,6 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="客商类型" prop="customerKind">
|
||||
<el-select
|
||||
v-model="archiveForm.customerKind"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in customerKindOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="企业法人" prop="legalPerson">
|
||||
<el-input v-model="archiveForm.legalPerson" maxlength="10" show-word-limit />
|
||||
@@ -1676,6 +1707,7 @@ export default {
|
||||
rejected: { label: '审核不通过', type: 'danger' },
|
||||
},
|
||||
formRules: {
|
||||
customerCode: [{ max: 20, message: '客商编号最多20个字符', trigger: 'blur' }],
|
||||
fullName: [{ required: true, message: '请输入客商名称', trigger: 'blur' }],
|
||||
customerNature: [{ required: true, message: '请选择客商性质', trigger: 'change' }],
|
||||
unifiedCreditCode: [
|
||||
@@ -1856,6 +1888,24 @@ export default {
|
||||
{ label: '正式', value: 'formal' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '营业执照有效期',
|
||||
prop: 'businessEndDate',
|
||||
slot: true,
|
||||
minWidth: 140,
|
||||
},
|
||||
{
|
||||
label: '资金使用情况',
|
||||
prop: 'fundUseRate',
|
||||
slot: true,
|
||||
minWidth: 130,
|
||||
},
|
||||
{
|
||||
label: '资金使用额度风险',
|
||||
prop: 'fundUseRisk',
|
||||
slot: true,
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
label: '审批状态',
|
||||
prop: 'approvalStatus',
|
||||
@@ -2098,6 +2148,7 @@ export default {
|
||||
accessType: 'temporary',
|
||||
approvalStatus: 'draft',
|
||||
status: 1,
|
||||
customerKind: 'external',
|
||||
deptId: [],
|
||||
deptIds: '',
|
||||
deptName: '',
|
||||
@@ -2268,6 +2319,40 @@ export default {
|
||||
if (typeof normalized === 'object') return Object.keys(normalized).length === 0;
|
||||
return false;
|
||||
},
|
||||
normalizeComparableChangeValue(value) {
|
||||
const normalized = this.normalizeChangeFieldValue(value);
|
||||
if (this.isEmptyChangeValue(normalized)) return null;
|
||||
if (typeof normalized === 'number') return Number.isFinite(normalized) ? normalized : null;
|
||||
if (typeof normalized === 'boolean') return normalized;
|
||||
if (typeof normalized === 'string') {
|
||||
const text = normalized.trim();
|
||||
if (/^-?\d+(\.\d+)?$/.test(text)) {
|
||||
const number = Number(text);
|
||||
return Number.isFinite(number) ? number : text;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
if (Array.isArray(normalized)) {
|
||||
return normalized.map(item => this.normalizeComparableChangeValue(item));
|
||||
}
|
||||
if (normalized && typeof normalized === 'object') {
|
||||
return Object.keys(normalized)
|
||||
.sort()
|
||||
.reduce((result, key) => {
|
||||
result[key] = this.normalizeComparableChangeValue(normalized[key]);
|
||||
return result;
|
||||
}, {});
|
||||
}
|
||||
return normalized;
|
||||
},
|
||||
isSameChangeValue(beforeValue, afterValue) {
|
||||
if (beforeValue === afterValue) return true;
|
||||
if (this.isEmptyChangeValue(beforeValue) && this.isEmptyChangeValue(afterValue)) return true;
|
||||
return (
|
||||
JSON.stringify(this.normalizeComparableChangeValue(beforeValue)) ===
|
||||
JSON.stringify(this.normalizeComparableChangeValue(afterValue))
|
||||
);
|
||||
},
|
||||
formatScoreChangeValue(value) {
|
||||
const scores = Array.isArray(value) ? value : [value];
|
||||
const categoryNames = { basic: '基础得分项', plus: '加分项目', minus: '减分项目' };
|
||||
@@ -2354,7 +2439,7 @@ export default {
|
||||
fields.forEach(([field, label]) => {
|
||||
const leftValue = left[field];
|
||||
const rightValue = right[field];
|
||||
if (JSON.stringify(leftValue) === JSON.stringify(rightValue)) return;
|
||||
if (this.isSameChangeValue(leftValue, rightValue)) return;
|
||||
const prefix = size > 1 ? `第${index + 1}条-${label}` : label;
|
||||
before.push(`${prefix}:${formatValue(field, leftValue)}`);
|
||||
after.push(`${prefix}:${formatValue(field, rightValue)}`);
|
||||
@@ -2437,11 +2522,7 @@ export default {
|
||||
const rows = fields
|
||||
.filter(
|
||||
field =>
|
||||
field !== '变更内容' &&
|
||||
!(
|
||||
this.isEmptyChangeValue(beforeData[field]) &&
|
||||
this.isEmptyChangeValue(afterData[field])
|
||||
)
|
||||
field !== '变更内容' && !this.isSameChangeValue(beforeData[field], afterData[field])
|
||||
)
|
||||
.map(field => ({
|
||||
field: this.getChangeFieldLabel(field),
|
||||
@@ -2451,7 +2532,8 @@ export default {
|
||||
before: this.formatChangeFieldValue(field, beforeData[field]),
|
||||
after: this.formatChangeFieldValue(field, afterData[field]),
|
||||
}),
|
||||
}));
|
||||
}))
|
||||
.filter(item => item.before !== item.after);
|
||||
const content = String(row.changeContent || '').trim();
|
||||
if (content) {
|
||||
rows.unshift({ field: '变更内容', before: '空', after: content });
|
||||
@@ -2467,27 +2549,11 @@ export default {
|
||||
this.changeRecordDetailVisible = true;
|
||||
},
|
||||
formatChangeContent(row) {
|
||||
const beforeData = this.parseChangeData(row.beforeData);
|
||||
const afterData = this.parseChangeData(row.afterData);
|
||||
const fields = [...new Set([...Object.keys(beforeData), ...Object.keys(afterData)])];
|
||||
const details = fields
|
||||
.filter(
|
||||
field =>
|
||||
field !== '变更内容' &&
|
||||
!(
|
||||
this.isEmptyChangeValue(beforeData[field]) &&
|
||||
this.isEmptyChangeValue(afterData[field])
|
||||
)
|
||||
)
|
||||
.map(field => {
|
||||
const scoreDiff = this.isScoreChangeField(field)
|
||||
? this.formatScoreChangeDiff(beforeData[field], afterData[field])
|
||||
: null;
|
||||
const before = scoreDiff?.before || this.formatChangeFieldValue(field, beforeData[field]);
|
||||
const after = scoreDiff?.after || this.formatChangeFieldValue(field, afterData[field]);
|
||||
return `${this.getChangeFieldLabel(field)}:变更前:${before} → 变更后:${after}`;
|
||||
});
|
||||
const rows = this.buildChangeRecordDetailRows(row);
|
||||
const content = String(row.changeContent || '').trim();
|
||||
const details = rows
|
||||
.filter(item => item.field !== '变更内容')
|
||||
.map(item => `${item.field}:变更前:${item.before} → 变更后:${item.after}`);
|
||||
return [content, ...details].filter(Boolean).join(';');
|
||||
},
|
||||
emptyContact() {
|
||||
@@ -2833,6 +2899,25 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
formatBusinessLicenseValidPeriod(row = {}) {
|
||||
if (row.businessTermType === '长期') return '无固定期限';
|
||||
return row.businessEndDate || '';
|
||||
},
|
||||
formatFundUseRate(row = {}) {
|
||||
if (row.fundUseRate === undefined || row.fundUseRate === null || row.fundUseRate === '') {
|
||||
return '-';
|
||||
}
|
||||
const rate = Number(row.fundUseRate);
|
||||
return Number.isFinite(rate) ? `${rate.toFixed(2)}%` : '-';
|
||||
},
|
||||
isBusinessLicenseExpiringSoon(row = {}) {
|
||||
if (row.businessTermType === '长期' || !row.businessEndDate) return false;
|
||||
const endDate = this.$dayjs(row.businessEndDate);
|
||||
if (!endDate.isValid()) return false;
|
||||
const today = this.$dayjs().startOf('day');
|
||||
const expireSoonDate = today.add(30, 'day');
|
||||
return !endDate.isAfter(expireSoonDate, 'day');
|
||||
},
|
||||
handleBusinessEndDateChange(value) {
|
||||
if (value) {
|
||||
this.archiveForm.businessTermType = '固定期限';
|
||||
@@ -4737,6 +4822,26 @@ export default {
|
||||
--el-tag-text-color: #409eff;
|
||||
}
|
||||
|
||||
.business-license-expiring {
|
||||
color: var(--el-color-danger);
|
||||
}
|
||||
|
||||
.fund-use-risk-none {
|
||||
color: #c0c4cc;
|
||||
}
|
||||
|
||||
.fund-use-risk-header {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.fund-use-risk-help {
|
||||
margin-left: 4px;
|
||||
color: #a8abb2;
|
||||
cursor: help;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.archive-form {
|
||||
:deep(.el-form-item__label) {
|
||||
flex: 0 0 calc(6em + 24px) !important;
|
||||
|
||||
Reference in New Issue
Block a user