Compare commits
5 Commits
d76977c07c
...
24fec3c7d7
| Author | SHA1 | Date | |
|---|---|---|---|
| 24fec3c7d7 | |||
| b76ada9d6c | |||
| 2083754b16 | |||
| 3df09d7d45 | |||
| b878bc356e |
@@ -32,11 +32,11 @@ export const refreshMasterData = () =>
|
||||
timeout: 60000,
|
||||
});
|
||||
|
||||
export const getRisk = (customerCode, creditCode) =>
|
||||
export const getRisk = (customerCode, creditCode, customerName) =>
|
||||
request({
|
||||
url: `${baseUrl}/risk`,
|
||||
method: 'get',
|
||||
params: { customerCode, creditCode },
|
||||
params: { customerCode, creditCode, customerName },
|
||||
timeout: 30000,
|
||||
});
|
||||
|
||||
|
||||
@@ -163,6 +163,18 @@ export const queryKingdeeCustomer = creditCode => {
|
||||
});
|
||||
};
|
||||
|
||||
// 金蝶供应商编码查询(A901-1):新增客商填写信用代码后即时回显
|
||||
export const querySupplierCode = creditCode => {
|
||||
return request({
|
||||
url: '/blade-transport/customer-archive/query-supplier-code',
|
||||
method: 'get',
|
||||
timeout: 30000,
|
||||
params: {
|
||||
creditCode,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
export const syncKingdee = id => {
|
||||
return request({
|
||||
url: '/blade-transport/customer-archive/sync-kingdee',
|
||||
|
||||
@@ -883,8 +883,6 @@ export default {
|
||||
// 收款方 C101-1 风险查询留档:risky=高风险/黑名单,tip=后端拼装提示文案
|
||||
payeeRisky: false,
|
||||
payeeRiskTip: '',
|
||||
payeeRiskLevel: '',
|
||||
payeeBlackStatus: '',
|
||||
attachmentRuleLoading: false,
|
||||
// 最近一次从结算单同步过来的附件 URL,切换结算单时用于整批替换
|
||||
linkedSettlementAttachmentUrls: [],
|
||||
@@ -1065,14 +1063,12 @@ export default {
|
||||
.toUpperCase();
|
||||
return ['D', 'D级', 'E', 'E级', 'F', 'F级'].includes(level) || level.includes('高风险');
|
||||
},
|
||||
// 高风险/黑名单收款方提示(C101-1,同合同新增页风险客商提示口径;强制拦截在后端提交校验与金蝶推送门禁)
|
||||
// 高风险/黑名单收款方提示(C101-1,强制拦截在后端提交校验与金蝶推送门禁):
|
||||
// 等级/黑名单明细以后端 riskTip 为准(黑名单=金蝶命中、等级=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},按集团规定不可直接付款,提交前须上传「特批附件」类型附件,审批通过后将自动发起付款特批`;
|
||||
return `${tip},按集团规定不可直接付款,提交前须上传「特批附件」类型附件,审批通过后将自动发起付款特批`;
|
||||
},
|
||||
requiredAttachmentMaterials() {
|
||||
if (this.form.paymentType === 'project_advance') {
|
||||
@@ -2341,8 +2337,6 @@ export default {
|
||||
this.payeeCustomerLevel = '';
|
||||
this.payeeRisky = false;
|
||||
this.payeeRiskTip = '';
|
||||
this.payeeRiskLevel = '';
|
||||
this.payeeBlackStatus = '';
|
||||
if (!partyBName) {
|
||||
if (!preserveCurrentValue) this.clearReceiptAccount();
|
||||
return;
|
||||
@@ -2381,8 +2375,6 @@ export default {
|
||||
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 强校验兜底
|
||||
}
|
||||
|
||||
@@ -291,6 +291,17 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="供应商编码" prop="supplierCode">
|
||||
<el-input
|
||||
v-model="archiveForm.supplierCode"
|
||||
maxlength="64"
|
||||
show-word-limit
|
||||
disabled
|
||||
placeholder="金蝶供应商编码,系统自动获取"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="客商类型" prop="customerKind">
|
||||
<el-select
|
||||
@@ -1595,6 +1606,7 @@ import {
|
||||
getScoreTemplate,
|
||||
recognizeBusinessLicenseOcr,
|
||||
queryKingdeeCustomer,
|
||||
querySupplierCode,
|
||||
syncKingdee,
|
||||
} from '@/api/vehicle/customer-archive';
|
||||
import { getRisk, getRiskByName } from '@/api/business/hcs';
|
||||
@@ -1922,6 +1934,11 @@ export default {
|
||||
searchPlaceholder: '请输入',
|
||||
minWidth: 140,
|
||||
},
|
||||
{
|
||||
label: '供应商编码',
|
||||
prop: 'supplierCode',
|
||||
minWidth: 140,
|
||||
},
|
||||
{
|
||||
label: '客商简称',
|
||||
prop: 'shortName',
|
||||
@@ -2476,6 +2493,7 @@ export default {
|
||||
const form = this.archiveForm;
|
||||
form.kingdeeStatus = 'none';
|
||||
form.customerCode = '';
|
||||
form.supplierCode = '';
|
||||
form.fullName = '';
|
||||
form.legalPerson = '';
|
||||
form.registeredCapital = '';
|
||||
@@ -2491,6 +2509,7 @@ export default {
|
||||
handleKingdeeCreditCodeChange(val) {
|
||||
this.kingdeeBlocked = false;
|
||||
if (this.readonly || this.archiveForm.id) return;
|
||||
this.clearArchiveNameRisk();
|
||||
if (this.archiveForm.kingdeeStatus === 'exist') {
|
||||
this.resetKingdeeBackfill();
|
||||
}
|
||||
@@ -2499,7 +2518,21 @@ export default {
|
||||
.toUpperCase();
|
||||
if (code.length !== 18 || this.unifiedCreditCodeError(code)) return;
|
||||
clearTimeout(this.kingdeeQueryTimer);
|
||||
this.kingdeeQueryTimer = setTimeout(() => this.fetchKingdeeCustomer(code), 500);
|
||||
this.kingdeeQueryTimer = setTimeout(() => {
|
||||
this.fetchKingdeeCustomer(code);
|
||||
this.fetchSupplierCode(code);
|
||||
}, 500);
|
||||
},
|
||||
// 新增态下信用代码录入后即时查询金蝶供应商编码(A901-1)回显,查询失败静默留空,保存/同步时后端兜底落库
|
||||
async fetchSupplierCode(code) {
|
||||
try {
|
||||
const res = await querySupplierCode(code);
|
||||
// 防止响应返回时用户已修改代码
|
||||
if (String(this.archiveForm.unifiedCreditCode || '').trim().toUpperCase() !== code) return;
|
||||
this.archiveForm.supplierCode = res?.data?.data || '';
|
||||
} catch (error) {
|
||||
// 忽略查询异常,编码留空
|
||||
}
|
||||
},
|
||||
async fetchKingdeeCustomer(code) {
|
||||
let customer = null;
|
||||
@@ -2707,6 +2740,7 @@ export default {
|
||||
currentNode: '当前节点',
|
||||
currentProcessor: '当前处理人',
|
||||
customerCode: '客商编号',
|
||||
supplierCode: '供应商编码',
|
||||
shortName: '客商简称',
|
||||
fullName: '客商名称',
|
||||
customerType: '客商分类',
|
||||
@@ -5572,17 +5606,21 @@ export default {
|
||||
},
|
||||
// 客商名称风险校验(C101-1,仅展示不作为安全边界):名称失焦/回显时查询,
|
||||
// risky 在名称框下展示红色提示,悬浮见风险项明细;查询失败静默不阻断填写,提交链路由后端强校验兜底
|
||||
checkArchiveNameRisk() {
|
||||
// 清空客商名称下风险提示(信用代码变化后原按旧编号+信用代码查询的结果失效)
|
||||
clearArchiveNameRisk() {
|
||||
this.archiveNameRisky = false;
|
||||
this.archiveNameRiskTip = '';
|
||||
this.archiveNameRiskLabel = '';
|
||||
},
|
||||
checkArchiveNameRisk() {
|
||||
this.clearArchiveNameRisk();
|
||||
const customerName = String(this.archiveForm.fullName || '').trim();
|
||||
if (!customerName) return;
|
||||
// 新增客商档案本地反查不到编号:金蝶带出后表单已有客商编号,优先按编号查 C101-1,
|
||||
// 并传信用代码供金蝶黑名单(A801-5)兜底;无编号时按名称反查档案
|
||||
const customerCode = String(this.archiveForm.customerCode || '').trim();
|
||||
const request = customerCode
|
||||
? getRisk(customerCode, String(this.archiveForm.unifiedCreditCode || '').trim())
|
||||
? getRisk(customerCode, String(this.archiveForm.unifiedCreditCode || '').trim(), customerName)
|
||||
: getRiskByName(customerName);
|
||||
request
|
||||
.then(res => {
|
||||
|
||||
Reference in New Issue
Block a user