feat: 付款申请收款方风险客商提示条与特批附件提交校验(C101-1 风险查询联动)
This commit is contained in:
@@ -221,6 +221,11 @@
|
||||
show-word-limit /></el-form-item
|
||||
></el-col>
|
||||
</el-row>
|
||||
<!-- 风险客商提示(基本信息备注后,同合同新增页):收款方外部客商高风险/黑名单时展示,文案由后端 riskTip 拼装 -->
|
||||
<div v-if="payeeRiskText" class="payment-form-page__risk-tip">
|
||||
<div class="payment-form-page__risk-tip-title">风险客商提示:</div>
|
||||
<div class="payment-form-page__risk-tip-content">{{ payeeRiskText }}</div>
|
||||
</div>
|
||||
</section-card>
|
||||
<section-card v-if="isSettlementRelatedType" title="结算信息">
|
||||
<el-table :data="settlementRows" border
|
||||
@@ -664,6 +669,7 @@ import * as billLedgerApi from '@/api/payment/billLedger';
|
||||
import { getDictionary } from '@/api/system/dictbiz';
|
||||
import { getList as getProjectList } from '@/api/business/project-apply';
|
||||
import { getDetail as getContractDetail } from '@/api/business/contract-manage';
|
||||
import { getRisk as getCustomerRisk } from '@/api/business/hcs';
|
||||
import * as formalApi from '@/api/settlement/formalSettlement';
|
||||
import * as preApi from '@/api/settlement/preSettlement';
|
||||
import {
|
||||
@@ -811,6 +817,11 @@ export default {
|
||||
contractPaymentRatioLimit: null,
|
||||
contractPaymentRatioExceeded: false,
|
||||
payeeCustomerLevel: '',
|
||||
// 收款方 C101-1 风险查询留档:risky=高风险/黑名单,tip=后端拼装提示文案
|
||||
payeeRisky: false,
|
||||
payeeRiskTip: '',
|
||||
payeeRiskLevel: '',
|
||||
payeeBlackStatus: '',
|
||||
attachmentRuleLoading: false,
|
||||
attachmentImagePreviewVisible: false,
|
||||
attachmentImagePreviewUrls: [],
|
||||
@@ -967,11 +978,22 @@ export default {
|
||||
];
|
||||
},
|
||||
highRiskPayee() {
|
||||
// 收款方 C101-1 高风险/黑名单,或客商等级 D/E/F(本地评级口径),命中须上传特批附件
|
||||
if (this.payeeRisky) return true;
|
||||
const level = String(this.payeeCustomerLevel || '')
|
||||
.trim()
|
||||
.toUpperCase();
|
||||
return ['D', 'D级', 'E', 'E级', 'F', 'F级'].includes(level) || level.includes('高风险');
|
||||
},
|
||||
// 高风险/黑名单收款方提示(C101-1,同合同新增页风险客商提示口径;强制拦截在后端提交校验与金蝶推送门禁)
|
||||
payeeRiskText() {
|
||||
if (!this.payeeRisky) return '';
|
||||
const levelMap = { 0: '低风险', 1: '中风险', 2: '高风险' };
|
||||
const level = levelMap[this.payeeRiskLevel] || '未知';
|
||||
const blacklist = String(this.payeeBlackStatus || '').trim().toLowerCase() === 'yes' ? '是' : '否';
|
||||
const tip = this.payeeRiskTip || `收款方[${this.form.payeeName || ''}]为高风险/黑名单客商`;
|
||||
return `风险等级:${level}|黑名单:${blacklist}。${tip},按集团规定不可直接付款,提交前须上传「特批附件」类型附件,审批通过后将自动发起付款特批`;
|
||||
},
|
||||
requiredAttachmentMaterials() {
|
||||
if (this.form.paymentType === 'project_advance') {
|
||||
return [ATTACHMENT_MATERIALS.contract];
|
||||
@@ -1952,6 +1974,10 @@ export default {
|
||||
const preserveCurrentValue = autoSelectDefault === false;
|
||||
this.receiptAccountOptions = [];
|
||||
this.payeeCustomerLevel = '';
|
||||
this.payeeRisky = false;
|
||||
this.payeeRiskTip = '';
|
||||
this.payeeRiskLevel = '';
|
||||
this.payeeBlackStatus = '';
|
||||
if (!partyBName) {
|
||||
if (!preserveCurrentValue) this.clearReceiptAccount();
|
||||
return;
|
||||
@@ -1983,6 +2009,19 @@ export default {
|
||||
}
|
||||
const detail = this.unwrapData(await getCustomerArchiveDetail(customer.id));
|
||||
this.payeeCustomerLevel = detail.customerLevel || '';
|
||||
// 收款方实时查 C101-1 客商风险(后端对内部组织客商默认返回无风险):高风险/黑名单在
|
||||
// 基本信息"风险客商提示"条常驻展示并要求特批附件;查询失败不阻断填写,提交时后端强校验兜底
|
||||
if (detail.customerCode) {
|
||||
try {
|
||||
const risk = this.unwrapData(await getCustomerRisk(detail.customerCode)) || {};
|
||||
this.payeeRisky = Boolean(risk.risky);
|
||||
this.payeeRiskTip = risk.riskTip || '';
|
||||
this.payeeRiskLevel = risk.fdRiskLevel || '';
|
||||
this.payeeBlackStatus = risk.fdBlackStatus || '';
|
||||
} catch (error) {
|
||||
// 忽略风险查询异常,提交时后端 C101-1 强校验兜底
|
||||
}
|
||||
}
|
||||
this.receiptAccountOptions = (detail.receiptAccounts || [])
|
||||
.filter(item => item.accountName || item.accountHolderName || item.bankAccount)
|
||||
.map(item => ({
|
||||
@@ -2672,6 +2711,15 @@ export default {
|
||||
// 提交前静默保存,避免同时弹出「保存成功」与材料缺失 toast
|
||||
const saved = await this.saveDraft({ showSuccess: false });
|
||||
if (!saved) return;
|
||||
// 高风险/黑名单收款方必须上传特批附件(与后端提交强校验同口径)
|
||||
if (
|
||||
this.missingAttachmentMaterials.some(
|
||||
item => item.key === ATTACHMENT_MATERIALS.specialApproval.key
|
||||
)
|
||||
) {
|
||||
this.$message.warning('收款方为高风险/黑名单客商,必须上传「特批附件」类型附件后再提交审批');
|
||||
return;
|
||||
}
|
||||
const previousApprovalStatus = this.form.approvalStatus || '';
|
||||
await api.submit({ id: this.form.id });
|
||||
await submitMkApprovalFlow({
|
||||
@@ -2700,6 +2748,26 @@ export default {
|
||||
.payment-form-page__form {
|
||||
padding-bottom: 72px;
|
||||
}
|
||||
|
||||
// 风险客商提示条(基本信息备注后,同合同新增页):橙黄背景 + 红色文字
|
||||
.payment-form-page__risk-tip {
|
||||
margin: 0 0 18px;
|
||||
padding: 10px 16px;
|
||||
background: #faecd8;
|
||||
border-radius: 4px;
|
||||
|
||||
.payment-form-page__risk-tip-title {
|
||||
color: #f56c6c;
|
||||
font-weight: 600;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.payment-form-page__risk-tip-content {
|
||||
color: #f56c6c;
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
.payment-form-page__settlement-nos {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user