Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ea96bcdc0 | |||
| b7af496a43 | |||
| 9e5f53702f | |||
| 8640238cbe | |||
| ef1a43f947 |
@@ -0,0 +1,69 @@
|
|||||||
|
import request from '@/axios';
|
||||||
|
|
||||||
|
const baseUrl = '/blade-transport/hcs';
|
||||||
|
|
||||||
|
// 合规推送涉及 HCS 远程多次调用(风险校验+附件转传+起草),可达 20s+,覆盖全局 10s 超时
|
||||||
|
export const repush = (bizType, id) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/sync/${bizType}/${id}`,
|
||||||
|
method: 'post',
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const getTemplates = () =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/master-data/template`,
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
|
||||||
|
export const refreshMasterData = () =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/master-data/refresh`,
|
||||||
|
method: 'post',
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const getRisk = customerCode =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/risk`,
|
||||||
|
method: 'get',
|
||||||
|
params: { customerCode },
|
||||||
|
timeout: 30000,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const uploadAttachment = formData =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/attachment/upload`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const downloadAttachment = (fdId, name) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/attachment/download`,
|
||||||
|
method: 'get',
|
||||||
|
params: { fdId, name },
|
||||||
|
responseType: 'blob',
|
||||||
|
timeout: 120000,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const applyContractSpec = data =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/contract/spec-apply`,
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const confirmContractSpec = (id, result) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/contract/spec/confirm`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id, result },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const unwrapData = response => {
|
||||||
|
const data = response?.data?.data ?? response?.data;
|
||||||
|
return data && typeof data === 'object' && 'data' in data ? data.data : data;
|
||||||
|
};
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
export const transportTypeOptions = [
|
export const transportTypeOptions = [
|
||||||
{ label: '公路运输', value: '公路运输' },
|
{ label: '公路运输', value: '公路运输' },
|
||||||
{ label: '铁路运输', value: '铁路运输' },
|
{ label: '铁路运输', value: '铁路运输' },
|
||||||
{ label: '水路运输', value: '水路运输' },
|
{ label: '水路运输', value: '水路运输' },
|
||||||
@@ -143,6 +143,12 @@ export const contractArchiveStatusOptions = [
|
|||||||
{ label: '已归档', value: '已归档' },
|
{ label: '已归档', value: '已归档' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const hcsSyncStatusOptions = [
|
||||||
|
{ label: '待推送', value: 'unsynced' },
|
||||||
|
{ label: '已推送', value: 'synced' },
|
||||||
|
{ label: '推送失败', value: 'failed' },
|
||||||
|
];
|
||||||
|
|
||||||
export const nodeOptions = [
|
export const nodeOptions = [
|
||||||
{ label: '接单', value: '接单' },
|
{ label: '接单', value: '接单' },
|
||||||
{ label: '到场', value: '到场' },
|
{ label: '到场', value: '到场' },
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import {
|
|||||||
createCrudOption,
|
createCrudOption,
|
||||||
effectiveTypeOptions,
|
effectiveTypeOptions,
|
||||||
nonNegativeRule,
|
nonNegativeRule,
|
||||||
|
hcsSyncStatusOptions,
|
||||||
selectRule,
|
selectRule,
|
||||||
signTypeOptions,
|
signTypeOptions,
|
||||||
textRule,
|
textRule,
|
||||||
@@ -606,6 +607,19 @@ export const option = createCrudOption([
|
|||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '合规状态',
|
||||||
|
prop: 'hcsSyncStatus',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 6,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
slot: true,
|
||||||
|
dicData: hcsSyncStatusOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '当前节点',
|
label: '当前节点',
|
||||||
prop: 'currentNode',
|
prop: 'currentNode',
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import {
|
|||||||
businessModeOptions,
|
businessModeOptions,
|
||||||
businessTypeOptions,
|
businessTypeOptions,
|
||||||
createCrudOption,
|
createCrudOption,
|
||||||
|
hcsSyncStatusOptions,
|
||||||
nonNegativeRule,
|
nonNegativeRule,
|
||||||
projectApprovalStatusOptions,
|
projectApprovalStatusOptions,
|
||||||
projectSourceOptions,
|
projectSourceOptions,
|
||||||
@@ -405,6 +406,19 @@ export const option = createCrudOption([
|
|||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '合规状态',
|
||||||
|
prop: 'hcsSyncStatus',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 1,
|
||||||
|
slot: true,
|
||||||
|
dicData: hcsSyncStatusOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '生效类型',
|
label: '生效类型',
|
||||||
prop: 'effectiveType',
|
prop: 'effectiveType',
|
||||||
|
|||||||
@@ -203,6 +203,8 @@ export const resolveAttachmentTypeDictCode = (location, fallback = CONTRACT_ATTA
|
|||||||
export const defaultContractAttachmentTypeOptions = [
|
export const defaultContractAttachmentTypeOptions = [
|
||||||
{ label: '用印材料', value: '用印材料' },
|
{ label: '用印材料', value: '用印材料' },
|
||||||
{ label: '双章归档文件', value: '双章归档文件' },
|
{ label: '双章归档文件', value: '双章归档文件' },
|
||||||
|
// 高风险/黑名单客商合同必传,后端按 fileType=特批说明 校验与转传特批(与后端 HcsSyncConstant.ATTACHMENT_TYPE_SPEC_EXPLANATION 对齐)
|
||||||
|
{ label: '特批说明', value: '特批说明' },
|
||||||
{ label: '其他文件', value: CONTRACT_ATTACHMENT_TYPE_OTHER },
|
{ label: '其他文件', value: CONTRACT_ATTACHMENT_TYPE_OTHER },
|
||||||
];
|
];
|
||||||
export const defaultContractSupportingAttachmentTypeOptions = [
|
export const defaultContractSupportingAttachmentTypeOptions = [
|
||||||
|
|||||||
@@ -0,0 +1,271 @@
|
|||||||
|
<template>
|
||||||
|
<section class="contract-manage-form__section contract-manage-form__section--panel hcs-contract-panel">
|
||||||
|
<div class="contract-manage-form__attachment-head">
|
||||||
|
<div class="dialog-section-title">合规信息</div>
|
||||||
|
<div>
|
||||||
|
<el-button
|
||||||
|
v-if="canApplySpec"
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
:loading="specApplying"
|
||||||
|
@click="openSpecDialog"
|
||||||
|
>
|
||||||
|
发起特批
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="isSpecProcessing"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
@click="confirmSpecResult"
|
||||||
|
>
|
||||||
|
确认特批结果
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-descriptions :column="3" class="contract-manage-detail__descriptions">
|
||||||
|
<el-descriptions-item label="合规同步状态">
|
||||||
|
<el-tooltip
|
||||||
|
v-if="hcsSyncMsg"
|
||||||
|
placement="top"
|
||||||
|
:content="hcsSyncMsg"
|
||||||
|
>
|
||||||
|
<el-tag :type="syncTagType" class="status-text">{{ syncLabel }}</el-tag>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tag v-else :type="syncTagType" class="status-text">{{ syncLabel }}</el-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合规合同ID">{{
|
||||||
|
contract.hcsFdId || '-'
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="客商风险">
|
||||||
|
<template v-if="contract.hcsRiskLevel || contract.hcsBlackStatus">
|
||||||
|
<el-tag
|
||||||
|
v-if="isBlacklist"
|
||||||
|
type="danger"
|
||||||
|
class="status-text"
|
||||||
|
>黑名单</el-tag
|
||||||
|
>
|
||||||
|
<span v-if="contract.hcsRiskLevel" class="hcs-contract-panel__risk">{{
|
||||||
|
`风险等级:${contract.hcsRiskLevel}`
|
||||||
|
}}</span>
|
||||||
|
<span v-if="!contract.hcsRiskLevel && !isBlacklist">-</span>
|
||||||
|
</template>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="特批状态">
|
||||||
|
<el-tag v-if="specLabel" :type="specTagType" class="status-text">{{ specLabel }}</el-tag>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="特批说明" :span="2">{{
|
||||||
|
contract.hcsSpecMsg || '-'
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
v-model="specDialogVisible"
|
||||||
|
title="发起合同特批"
|
||||||
|
width="640px"
|
||||||
|
append-to-body
|
||||||
|
destroy-on-close
|
||||||
|
class="hcs-contract-panel__spec-dialog"
|
||||||
|
@closed="resetSpecDialog"
|
||||||
|
>
|
||||||
|
<el-alert
|
||||||
|
title="高风险客商合同需经集团特批后方可签约推送;请上传特批申请材料及内部审批流程附件。"
|
||||||
|
type="warning"
|
||||||
|
:closable="false"
|
||||||
|
class="hcs-contract-panel__spec-alert"
|
||||||
|
/>
|
||||||
|
<el-upload
|
||||||
|
drag
|
||||||
|
multiple
|
||||||
|
:show-file-list="false"
|
||||||
|
:http-request="uploadMaterial"
|
||||||
|
:on-error="() => uploadFailed()"
|
||||||
|
class="hcs-contract-panel__spec-upload"
|
||||||
|
>
|
||||||
|
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||||
|
<div class="el-upload__text">将特批材料拖到此处,或<em>点击上传到合同系统</em></div>
|
||||||
|
</el-upload>
|
||||||
|
<el-table :data="materials" border class="hcs-contract-panel__spec-table">
|
||||||
|
<el-table-column type="index" label="序号" width="70" align="center" />
|
||||||
|
<el-table-column prop="name" label="文件名" min-width="220" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="fdId" label="合规附件ID" min-width="240" show-overflow-tooltip />
|
||||||
|
<el-table-column label="操作" width="90" align="center" fixed="right">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
<el-link type="danger" @click="materials.splice($index, 1)">删除</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<template #footer>
|
||||||
|
<el-button type="primary" :loading="specApplying" @click="submitSpec">确认发起</el-button>
|
||||||
|
<el-button @click="specDialogVisible = false">取消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { UploadFilled } from '@element-plus/icons-vue';
|
||||||
|
import {
|
||||||
|
applyContractSpec,
|
||||||
|
confirmContractSpec,
|
||||||
|
uploadAttachment,
|
||||||
|
} from '@/api/business/hcs';
|
||||||
|
|
||||||
|
const SYNC_STATUS_OPTIONS = [
|
||||||
|
{ label: '待推送', value: 'unsynced', type: 'info' },
|
||||||
|
{ label: '已推送', value: 'synced', type: 'success' },
|
||||||
|
{ label: '推送失败', value: 'failed', type: 'danger' },
|
||||||
|
];
|
||||||
|
|
||||||
|
const SPEC_STATUS_OPTIONS = [
|
||||||
|
{ label: '待特批', value: 'need', type: 'warning' },
|
||||||
|
{ label: '特批中', value: 'processing', type: 'warning' },
|
||||||
|
{ label: '特批通过', value: 'approved', type: 'success' },
|
||||||
|
{ label: '特批驳回', value: 'rejected', type: 'danger' },
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'HcsContractPanel',
|
||||||
|
components: { UploadFilled },
|
||||||
|
props: {
|
||||||
|
// 合同详情行(须含 id/hcsSyncStatus/hcsFdId/hcsRiskLevel/hcsBlackStatus/hcsSpecStatus 等)
|
||||||
|
contract: { type: Object, required: true },
|
||||||
|
},
|
||||||
|
emits: ['refresh'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
specDialogVisible: false,
|
||||||
|
specApplying: false,
|
||||||
|
materials: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
syncLabel() {
|
||||||
|
return SYNC_STATUS_OPTIONS.find(item => item.value === this.contract.hcsSyncStatus)?.label || '-';
|
||||||
|
},
|
||||||
|
syncTagType() {
|
||||||
|
return SYNC_STATUS_OPTIONS.find(item => item.value === this.contract.hcsSyncStatus)?.type || 'info';
|
||||||
|
},
|
||||||
|
hcsSyncMsg() {
|
||||||
|
return this.contract.hcsSyncMsg || '';
|
||||||
|
},
|
||||||
|
isBlacklist() {
|
||||||
|
return String(this.contract.hcsBlackStatus || '').toLowerCase() === 'yes';
|
||||||
|
},
|
||||||
|
specLabel() {
|
||||||
|
return SPEC_STATUS_OPTIONS.find(item => item.value === this.contract.hcsSpecStatus)?.label || '';
|
||||||
|
},
|
||||||
|
specTagType() {
|
||||||
|
return SPEC_STATUS_OPTIONS.find(item => item.value === this.contract.hcsSpecStatus)?.type || 'info';
|
||||||
|
},
|
||||||
|
isSpecProcessing() {
|
||||||
|
return this.contract.hcsSpecStatus === 'processing';
|
||||||
|
},
|
||||||
|
canApplySpec() {
|
||||||
|
return ['need', 'rejected'].includes(this.contract.hcsSpecStatus);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openSpecDialog() {
|
||||||
|
this.specDialogVisible = true;
|
||||||
|
},
|
||||||
|
resetSpecDialog() {
|
||||||
|
this.materials = [];
|
||||||
|
},
|
||||||
|
// 自定义上传:直传合同合规系统(C103-2),成功记录合规附件ID
|
||||||
|
uploadMaterial(options) {
|
||||||
|
const file = options.file;
|
||||||
|
if (file.size / 1024 / 1024 > 50) {
|
||||||
|
this.$message.warning('单文件大小不能超过 50MB');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('fdFile', file);
|
||||||
|
uploadAttachment(formData)
|
||||||
|
.then(response => {
|
||||||
|
const fdId = response?.data?.data || response?.data;
|
||||||
|
if (!fdId || typeof fdId !== 'string') {
|
||||||
|
this.$message.error(response?.data?.msg || '上传合同系统失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.materials.push({ fdId, name: file.name });
|
||||||
|
this.$message.success(`已上传合同系统:${file.name}`);
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.$message.error(error?.response?.data?.msg || '上传合同系统失败');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
uploadFailed() {
|
||||||
|
this.$message.error('上传合同系统失败');
|
||||||
|
},
|
||||||
|
submitSpec() {
|
||||||
|
if (!this.materials.length) {
|
||||||
|
this.$message.warning('请先上传特批申请材料');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.specApplying = true;
|
||||||
|
applyContractSpec({
|
||||||
|
contractId: this.contract.id,
|
||||||
|
attachments: this.materials.map(item => ({ fdId: item.fdId, name: item.name })),
|
||||||
|
})
|
||||||
|
.then(response => {
|
||||||
|
if (response?.data?.success === false) {
|
||||||
|
this.$message.error(response?.data?.msg || '特批发起失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$message.success(response?.data?.data || '特批发起成功,等待集团审批');
|
||||||
|
this.specDialogVisible = false;
|
||||||
|
this.$emit('refresh');
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.$message.error(error?.response?.data?.msg || '特批发起失败');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.specApplying = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
confirmSpecResult() {
|
||||||
|
this.$prompt('请输入集团特批结果(approved=通过 / rejected=驳回)', '确认特批结果', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
inputPattern: /^(approved|rejected)$/,
|
||||||
|
inputErrorMessage: '请输入 approved 或 rejected',
|
||||||
|
}).then(({ value }) => {
|
||||||
|
confirmContractSpec(this.contract.id, value).then(() => {
|
||||||
|
this.$message.success('特批结果已确认');
|
||||||
|
this.$emit('refresh');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.hcs-contract-panel__risk {
|
||||||
|
margin-left: 8px;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hcs-contract-panel__spec-alert {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hcs-contract-panel__spec-upload {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
|
||||||
|
:deep(.el-upload) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-upload-dragger) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.hcs-contract-panel__spec-table {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -72,6 +72,13 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #hcsSyncStatus="{ row }">
|
||||||
|
<el-tag v-if="row.hcsSyncStatus" :type="hcsSyncTagType(row.hcsSyncStatus)" class="status-text">
|
||||||
|
{{ hcsSyncLabel(row.hcsSyncStatus) }}
|
||||||
|
</el-tag>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #menu="{ row }">
|
<template #menu="{ row }">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="hasPermission(`${config.permission}_view`)"
|
v-if="hasPermission(`${config.permission}_view`)"
|
||||||
@@ -92,6 +99,9 @@
|
|||||||
>
|
>
|
||||||
{{ operation.label }}
|
{{ operation.label }}
|
||||||
</el-link>
|
</el-link>
|
||||||
|
<el-link v-if="canHcsRepush(row)" type="warning" @click="handleHcsRepush(row)">
|
||||||
|
{{ hcsRepushingId === row.id ? '推送中…' : '推送合规' }}
|
||||||
|
</el-link>
|
||||||
<el-link v-if="canDelete(row)" type="danger" @click="removeRow(row)">删除</el-link>
|
<el-link v-if="canDelete(row)" type="danger" @click="removeRow(row)">删除</el-link>
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
@@ -180,9 +190,18 @@
|
|||||||
<el-descriptions-item label="其他事项说明" :span="3">{{
|
<el-descriptions-item label="其他事项说明" :span="3">{{
|
||||||
detailValue('remark')
|
detailValue('remark')
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item v-if="detailRiskTipText" label="风险客商提示" :span="3">
|
||||||
|
<span style="color: #f56c6c">{{ detailRiskTipText }}</span>
|
||||||
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<hcs-contract-panel
|
||||||
|
v-if="!isPublicViewPage"
|
||||||
|
:contract="detailRow"
|
||||||
|
@refresh="initDetailPage"
|
||||||
|
/>
|
||||||
|
|
||||||
<contract-attachment-section
|
<contract-attachment-section
|
||||||
title="用印材料"
|
title="用印材料"
|
||||||
description
|
description
|
||||||
@@ -448,6 +467,7 @@
|
|||||||
clearable
|
clearable
|
||||||
:loading="contractPartyLoading"
|
:loading="contractPartyLoading"
|
||||||
@visible-change="visible => visible && loadContractPartyOptions()"
|
@visible-change="visible => visible && loadContractPartyOptions()"
|
||||||
|
@change="queryPartyRisk('partyA')"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in contractPartyAOptions"
|
v-for="item in contractPartyAOptions"
|
||||||
@@ -465,6 +485,7 @@
|
|||||||
clearable
|
clearable
|
||||||
:loading="contractPartyLoading"
|
:loading="contractPartyLoading"
|
||||||
@visible-change="visible => visible && loadContractPartyOptions()"
|
@visible-change="visible => visible && loadContractPartyOptions()"
|
||||||
|
@change="queryPartyRisk('partyB')"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in contractPartyBOptions"
|
v-for="item in contractPartyBOptions"
|
||||||
@@ -619,6 +640,11 @@
|
|||||||
placeholder="请输入其他事项说明"
|
placeholder="请输入其他事项说明"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- 风险客商提示(基本信息备注后):外部客商高风险/黑名单时展示,文案由后端 riskTip 拼装 -->
|
||||||
|
<div v-if="partyRiskText" class="contract-manage-form__risk-tip">
|
||||||
|
<div class="contract-manage-form__risk-tip-title">风险客商提示:</div>
|
||||||
|
<div class="contract-manage-form__risk-tip-content">{{ partyRiskText }}</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<contract-attachment-section
|
<contract-attachment-section
|
||||||
@@ -1046,6 +1072,7 @@ import NProgress from 'nprogress';
|
|||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
import { exportBlob } from '@/api/common';
|
import { exportBlob } from '@/api/common';
|
||||||
import * as api from '@/api/business/contract-manage';
|
import * as api from '@/api/business/contract-manage';
|
||||||
|
import { repush as hcsRepush, getRisk } from '@/api/business/hcs';
|
||||||
import { getMkPublicDetail } from '@/api/mk-process';
|
import { getMkPublicDetail } from '@/api/mk-process';
|
||||||
import { getList as getProjectList } from '@/api/business/project-apply';
|
import { getList as getProjectList } from '@/api/business/project-apply';
|
||||||
import { getList as getCustomerArchiveList } from '@/api/vehicle/customer-archive';
|
import { getList as getCustomerArchiveList } from '@/api/vehicle/customer-archive';
|
||||||
@@ -1066,6 +1093,7 @@ import ContractAttachmentSection, {
|
|||||||
isContractSupportingAttachmentLocation,
|
isContractSupportingAttachmentLocation,
|
||||||
normalizeContractFileRows,
|
normalizeContractFileRows,
|
||||||
} from './components/contract-attachment-section.vue';
|
} from './components/contract-attachment-section.vue';
|
||||||
|
import HcsContractPanel from './components/hcs-contract-panel.vue';
|
||||||
import PdfPreview from '@/components/pdf-preview/main.vue';
|
import PdfPreview from '@/components/pdf-preview/main.vue';
|
||||||
import { ElImageViewer, ElCascader } from 'element-plus';
|
import { ElImageViewer, ElCascader } from 'element-plus';
|
||||||
import { OpenFileViewer } from '@open-file-viewer/vue';
|
import { OpenFileViewer } from '@open-file-viewer/vue';
|
||||||
@@ -1238,6 +1266,7 @@ export default {
|
|||||||
ContractAttachmentSection,
|
ContractAttachmentSection,
|
||||||
BillingPlanEditor,
|
BillingPlanEditor,
|
||||||
ChangeRecordDetailDialog,
|
ChangeRecordDetailDialog,
|
||||||
|
HcsContractPanel,
|
||||||
ElImageViewer,
|
ElImageViewer,
|
||||||
OpenFileViewer,
|
OpenFileViewer,
|
||||||
PdfPreview,
|
PdfPreview,
|
||||||
@@ -1316,6 +1345,9 @@ export default {
|
|||||||
contractCategoryDictOptions: [],
|
contractCategoryDictOptions: [],
|
||||||
contractPartyAOptions: [],
|
contractPartyAOptions: [],
|
||||||
contractPartyBOptions: [],
|
contractPartyBOptions: [],
|
||||||
|
// 合规客商风险(C101-1 展示用):甲方/乙方选择后即时查询
|
||||||
|
contractPartyCodeMap: {},
|
||||||
|
partyRisk: {},
|
||||||
contractPartyLoading: false,
|
contractPartyLoading: false,
|
||||||
contractPartyRequestId: 0,
|
contractPartyRequestId: 0,
|
||||||
organizationOptions: [],
|
organizationOptions: [],
|
||||||
@@ -1354,6 +1386,8 @@ export default {
|
|||||||
billCycleTypeOptions: ['固定截单日', '自然月', '自定义多周期'],
|
billCycleTypeOptions: ['固定截单日', '自然月', '自定义多周期'],
|
||||||
detailLoading: false,
|
detailLoading: false,
|
||||||
detailRow: {},
|
detailRow: {},
|
||||||
|
// 合规(HCS)推送/对账状态
|
||||||
|
hcsRepushingId: null,
|
||||||
detailContractFileRows: [],
|
detailContractFileRows: [],
|
||||||
detailAttachmentRows: [],
|
detailAttachmentRows: [],
|
||||||
detailBillingPlanRows: [],
|
detailBillingPlanRows: [],
|
||||||
@@ -1530,6 +1564,32 @@ export default {
|
|||||||
const endDate = this.detailRow.endDate || '-';
|
const endDate = this.detailRow.endDate || '-';
|
||||||
return `${startDate} 至 ${endDate}`;
|
return `${startDate} 至 ${endDate}`;
|
||||||
},
|
},
|
||||||
|
// 高风险/黑名单客商签约提示(C101-1,签约前提示;强制拦截在后端提交校验与推送链路)
|
||||||
|
partyRiskText() {
|
||||||
|
const parts = [];
|
||||||
|
['partyA', 'partyB'].forEach(prop => {
|
||||||
|
const risk = this.partyRisk[prop];
|
||||||
|
if (!risk?.risky) return;
|
||||||
|
// riskTip 由后端按风险项拼装(【公司名称】:黑名单;涉诉;被执行人等),缺失时兜底通用提示
|
||||||
|
parts.push(
|
||||||
|
risk.riskTip ||
|
||||||
|
`${prop === 'partyA' ? '甲方' : '乙方'}[${this.form[prop] || ''}]为高风险/黑名单客商`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
if (!parts.length) return '';
|
||||||
|
return `${parts.join(';')},按集团规定不可直接签约,提交前须上传「特批说明」类型附件,审批通过后将自动发起合同特批`;
|
||||||
|
},
|
||||||
|
// 详情风险客商提示(基本信息备注后展示):按推送留痕 hcs_risk_level/hcs_black_status 判定(甲乙取高/任一),文案与后端 riskTip 一致
|
||||||
|
detailRiskTipText() {
|
||||||
|
const riskLevel = String(this.detailRow.hcsRiskLevel || '').trim();
|
||||||
|
const blacklist = String(this.detailRow.hcsBlackStatus || '').toLowerCase() === 'yes';
|
||||||
|
if (riskLevel !== '2' && !blacklist) return '';
|
||||||
|
const parties = [this.detailRow.partyA, this.detailRow.partyB]
|
||||||
|
.map(name => String(name || '').trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
.join('、');
|
||||||
|
return `【${parties || '相对方'}】:被列入外部黑名单;涉贪污受贿裁判相关提及方(3年以上及其他);被执行人信息;买卖合同纠纷;劳动纠纷;重大纠纷`;
|
||||||
|
},
|
||||||
detailLegalSealText() {
|
detailLegalSealText() {
|
||||||
const value = this.detailRow.legalSealFlag;
|
const value = this.detailRow.legalSealFlag;
|
||||||
if (value === undefined || value === null || value === '') return '-';
|
if (value === undefined || value === null || value === '') return '-';
|
||||||
@@ -1651,6 +1711,44 @@ export default {
|
|||||||
if (stage === 'terminated') return 'danger';
|
if (stage === 'terminated') return 'danger';
|
||||||
return 'info';
|
return 'info';
|
||||||
},
|
},
|
||||||
|
// ==================== 合规(HCS)推送/对账(照“同步金蝶”按钮模式) ====================
|
||||||
|
hcsSyncLabel(value) {
|
||||||
|
return { unsynced: '待推送', synced: '已推送', failed: '推送失败' }[value] || value;
|
||||||
|
},
|
||||||
|
hcsSyncTagType(value) {
|
||||||
|
return { unsynced: 'info', synced: 'success', failed: 'danger' }[value] || 'info';
|
||||||
|
},
|
||||||
|
canHcsRepush(row) {
|
||||||
|
return (
|
||||||
|
['approved', 'change_approved'].includes(row.approvalStatus) &&
|
||||||
|
row.hcsSyncStatus !== 'synced'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
handleHcsRepush(row) {
|
||||||
|
if (this.hcsRepushingId) return;
|
||||||
|
this.$confirm('确定推送该数据到合同合规系统?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
this.hcsRepushingId = row.id;
|
||||||
|
hcsRepush('contract', row.id)
|
||||||
|
.then(res => {
|
||||||
|
if (res.data?.success === false) {
|
||||||
|
this.$message.error(res.data?.msg || '推送合规失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$message.success(res.data?.data || '推送合规成功');
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.$message.error(error?.response?.data?.msg || '推送合规失败');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.hcsRepushingId = null;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
canEdit(row) {
|
canEdit(row) {
|
||||||
return (
|
return (
|
||||||
this.hasPermission(`${this.config.permission}_edit`) &&
|
this.hasPermission(`${this.config.permission}_edit`) &&
|
||||||
@@ -2209,8 +2307,21 @@ export default {
|
|||||||
])
|
])
|
||||||
.then(responses => {
|
.then(responses => {
|
||||||
if (requestId !== this.contractPartyRequestId) return;
|
if (requestId !== this.contractPartyRequestId) return;
|
||||||
const names = responses
|
const records = responses.flatMap(extractRecords);
|
||||||
.flatMap(extractRecords)
|
// 名称→客商编码映射,供 C101-1 风险查询使用(§9-U6 编码体系联调确认)
|
||||||
|
const codeMap = {};
|
||||||
|
records.forEach(item => {
|
||||||
|
const code = item.customerCode;
|
||||||
|
if (!code) return;
|
||||||
|
[item.fullName, item.shortName, item.customerName]
|
||||||
|
.map(name => String(name || '').trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
.forEach(name => {
|
||||||
|
codeMap[name] = code;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.contractPartyCodeMap = codeMap;
|
||||||
|
const names = records
|
||||||
.map(item => item.fullName || item.shortName || item.customerName || item.customerCode)
|
.map(item => item.fullName || item.shortName || item.customerName || item.customerCode)
|
||||||
.map(name => String(name || '').trim())
|
.map(name => String(name || '').trim())
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
@@ -2223,6 +2334,31 @@ export default {
|
|||||||
if (requestId === this.contractPartyRequestId) this.contractPartyLoading = false;
|
if (requestId === this.contractPartyRequestId) this.contractPartyLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// C101-1 客商风险查询(展示用,强校验在后端提交/推送链路):失败静默不阻塞填写
|
||||||
|
queryPartyRisk(prop) {
|
||||||
|
const name = this.form[prop];
|
||||||
|
const code = name ? this.contractPartyCodeMap[name] : null;
|
||||||
|
if (!code) {
|
||||||
|
this.partyRisk = { ...this.partyRisk, [prop]: null };
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getRisk(code)
|
||||||
|
.then(res => {
|
||||||
|
const risk = res?.data?.data ?? res?.data ?? {};
|
||||||
|
this.partyRisk = {
|
||||||
|
...this.partyRisk,
|
||||||
|
[prop]: {
|
||||||
|
customerKind: risk.customerKind || '',
|
||||||
|
// risky 由后端统一判定:外部客商高风险(等级=2)或黑名单;内部组织客商默认无风险恒为 false
|
||||||
|
risky: risk.risky === true,
|
||||||
|
riskTip: risk.riskTip || '',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.partyRisk = { ...this.partyRisk, [prop]: null };
|
||||||
|
});
|
||||||
|
},
|
||||||
loadOrganizationOptions() {
|
loadOrganizationOptions() {
|
||||||
if (this.organizationLoading) return;
|
if (this.organizationLoading) return;
|
||||||
this.organizationLoading = true;
|
this.organizationLoading = true;
|
||||||
@@ -3104,6 +3240,29 @@ export default {
|
|||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.contract-manage-form__risk-alert {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 风险客商提示条(基本信息备注后):橙黄背景 + 红色文字(设计稿 2026-10)
|
||||||
|
.contract-manage-form__risk-tip {
|
||||||
|
margin: 0 0 18px;
|
||||||
|
padding: 10px 16px;
|
||||||
|
background: #faecd8;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.contract-manage-form__risk-tip-title {
|
||||||
|
color: #f56c6c;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contract-manage-form__risk-tip-content {
|
||||||
|
color: #f56c6c;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.contract-manage-page {
|
.contract-manage-page {
|
||||||
&__expiry-search {
|
&__expiry-search {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -0,0 +1,100 @@
|
|||||||
|
<template>
|
||||||
|
<basic-container class="hcs-master-data-page">
|
||||||
|
<div class="hcs-master-data-page__head">
|
||||||
|
<div class="dialog-section-title">合规主数据(HCS)</div>
|
||||||
|
<el-button type="primary" :loading="refreshing" @click="handleRefresh">刷新缓存</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-tabs v-model="activeTab">
|
||||||
|
<el-tab-pane label="合同模板" name="template" />
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="templates" border>
|
||||||
|
<el-table-column type="index" label="序号" width="70" align="center" />
|
||||||
|
<el-table-column prop="fdId" label="模板ID(fdTemplateId)" min-width="320" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="fdName" label="模板名称" min-width="220" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="fdStatus" label="状态" width="100" align="center" />
|
||||||
|
<el-table-column prop="fdContractCharacter" label="合同性质" min-width="140" align="center" />
|
||||||
|
<el-table-column label="创建时间" min-width="170" align="center">
|
||||||
|
<template #default="{ row }">{{ formatTime(row.fdCreateTime) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<el-alert
|
||||||
|
class="hcs-master-data-page__tip"
|
||||||
|
title="合同类别与合规模板的对应关系由 Nacos 配置 thirdParty.hcs.contract.template-mapping 维护;此列表用于核对映射的模板ID 是否存在。"
|
||||||
|
type="info"
|
||||||
|
:closable="false"
|
||||||
|
/>
|
||||||
|
</basic-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getTemplates, refreshMasterData } from '@/api/business/hcs';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'HcsMasterData',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeTab: 'template',
|
||||||
|
loading: false,
|
||||||
|
refreshing: false,
|
||||||
|
templates: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.loadTemplates();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadTemplates() {
|
||||||
|
this.loading = true;
|
||||||
|
getTemplates()
|
||||||
|
.then(response => {
|
||||||
|
const data = response?.data?.data ?? response?.data;
|
||||||
|
this.templates = Array.isArray(data) ? data : [];
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message.error('合规模板列表加载失败');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleRefresh() {
|
||||||
|
this.refreshing = true;
|
||||||
|
refreshMasterData()
|
||||||
|
.then(response => {
|
||||||
|
this.$message.success(response?.data?.data || '合规主数据缓存已刷新');
|
||||||
|
this.loadTemplates();
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.$message.error(error?.response?.data?.msg || '刷新失败');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.refreshing = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
formatTime(value) {
|
||||||
|
if (!value) return '-';
|
||||||
|
return this.$dayjs(Number(value)).format('YYYY-MM-DD HH:mm:ss');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.hcs-master-data-page__head {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
|
||||||
|
.dialog-section-title {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.hcs-master-data-page__tip {
|
||||||
|
margin-top: 12px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -58,6 +58,17 @@
|
|||||||
{{ displayStatus(row, 'approvalStatus') }}
|
{{ displayStatus(row, 'approvalStatus') }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #hcsSyncStatus="{ row }">
|
||||||
|
<el-tag
|
||||||
|
v-if="row.hcsSyncStatus"
|
||||||
|
:type="hcsSyncTagType(row.hcsSyncStatus)"
|
||||||
|
class="status-text"
|
||||||
|
>
|
||||||
|
{{ hcsSyncLabel(row.hcsSyncStatus) }}
|
||||||
|
</el-tag>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="project-apply-page__risk-search">
|
<div class="project-apply-page__risk-search">
|
||||||
<span class="project-apply-page__risk-label">
|
<span class="project-apply-page__risk-label">
|
||||||
@@ -128,6 +139,13 @@
|
|||||||
>
|
>
|
||||||
{{ operation.label }}
|
{{ operation.label }}
|
||||||
</el-link>
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
v-if="canHcsRepush(row)"
|
||||||
|
type="warning"
|
||||||
|
@click="handleHcsRepush(row)"
|
||||||
|
>
|
||||||
|
{{ hcsRepushingId === row.id ? '推送中…' : '推送合规' }}
|
||||||
|
</el-link>
|
||||||
<el-link type="danger" v-if="canDelete(row)" @click="rowDel(row)"> 删除 </el-link>
|
<el-link type="danger" v-if="canDelete(row)" @click="rowDel(row)"> 删除 </el-link>
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
@@ -916,6 +934,7 @@
|
|||||||
import { exportBlob } from '@/api/common';
|
import { exportBlob } from '@/api/common';
|
||||||
import { defineAsyncComponent } from 'vue';
|
import { defineAsyncComponent } from 'vue';
|
||||||
import * as api from '@/api/business/project-apply';
|
import * as api from '@/api/business/project-apply';
|
||||||
|
import { repush as hcsRepush } from '@/api/business/hcs';
|
||||||
import { getMkPublicDetail } from '@/api/mk-process';
|
import { getMkPublicDetail } from '@/api/mk-process';
|
||||||
import {
|
import {
|
||||||
getList as getCustomerArchiveList,
|
getList as getCustomerArchiveList,
|
||||||
@@ -1121,6 +1140,8 @@ export default {
|
|||||||
{ label: '高风险', value: 'high', statKey: 'high' },
|
{ label: '高风险', value: 'high', statKey: 'high' },
|
||||||
{ label: '中风险', value: 'medium', statKey: 'medium' },
|
{ label: '中风险', value: 'medium', statKey: 'medium' },
|
||||||
],
|
],
|
||||||
|
// 合规(HCS)推送状态
|
||||||
|
hcsRepushingId: null,
|
||||||
page: {
|
page: {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageSizes: [10, 20, 50, 100],
|
pageSizes: [10, 20, 50, 100],
|
||||||
@@ -1612,6 +1633,45 @@ export default {
|
|||||||
return this.canOperation(operation, row);
|
return this.canOperation(operation, row);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// ==================== 合规(HCS)推送/对账(照“同步金蝶”按钮模式) ====================
|
||||||
|
hcsSyncLabel(value) {
|
||||||
|
return { unsynced: '待推送', synced: '已推送', failed: '推送失败' }[value] || value;
|
||||||
|
},
|
||||||
|
hcsSyncTagType(value) {
|
||||||
|
return { unsynced: 'info', synced: 'success', failed: 'danger' }[value] || 'info';
|
||||||
|
},
|
||||||
|
canHcsRepush(row) {
|
||||||
|
return (
|
||||||
|
!this.readonlyScope &&
|
||||||
|
['approved', 'change_approved'].includes(row.approvalStatus) &&
|
||||||
|
row.hcsSyncStatus !== 'synced'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
handleHcsRepush(row) {
|
||||||
|
if (this.hcsRepushingId) return;
|
||||||
|
this.$confirm('确定推送该数据到合同合规系统?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
this.hcsRepushingId = row.id;
|
||||||
|
hcsRepush('project', row.id)
|
||||||
|
.then(res => {
|
||||||
|
if (res.data?.success === false) {
|
||||||
|
this.$message.error(res.data?.msg || '推送合规失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$message.success(res.data?.data || '推送合规成功');
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.$message.error(error?.response?.data?.msg || '推送合规失败');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.hcsRepushingId = null;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
canOperation(operation, row) {
|
canOperation(operation, row) {
|
||||||
const permission = operation.permission || `${this.config.permission}_${operation.action}`;
|
const permission = operation.permission || `${this.config.permission}_${operation.action}`;
|
||||||
if (!this.hasPermission(permission) || this.readonlyScope || row.readonly) return false;
|
if (!this.hasPermission(permission) || this.readonlyScope || row.readonly) return false;
|
||||||
|
|||||||
@@ -223,6 +223,11 @@
|
|||||||
show-word-limit /></el-form-item
|
show-word-limit /></el-form-item
|
||||||
></el-col>
|
></el-col>
|
||||||
</el-row>
|
</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>
|
||||||
<section-card v-if="isSettlementRelatedType" title="结算信息">
|
<section-card v-if="isSettlementRelatedType" title="结算信息">
|
||||||
<el-table :data="settlementRows" border
|
<el-table :data="settlementRows" border
|
||||||
@@ -669,6 +674,7 @@ import * as billLedgerApi from '@/api/payment/billLedger';
|
|||||||
import { getDictionary } from '@/api/system/dictbiz';
|
import { getDictionary } from '@/api/system/dictbiz';
|
||||||
import { getList as getProjectList } from '@/api/business/project-apply';
|
import { getList as getProjectList } from '@/api/business/project-apply';
|
||||||
import { getDetail as getContractDetail } from '@/api/business/contract-manage';
|
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 formalApi from '@/api/settlement/formalSettlement';
|
||||||
import * as preApi from '@/api/settlement/preSettlement';
|
import * as preApi from '@/api/settlement/preSettlement';
|
||||||
import {
|
import {
|
||||||
@@ -817,6 +823,11 @@ export default {
|
|||||||
contractPaymentRatioLimit: null,
|
contractPaymentRatioLimit: null,
|
||||||
contractPaymentRatioExceeded: false,
|
contractPaymentRatioExceeded: false,
|
||||||
payeeCustomerLevel: '',
|
payeeCustomerLevel: '',
|
||||||
|
// 收款方 C101-1 风险查询留档:risky=高风险/黑名单,tip=后端拼装提示文案
|
||||||
|
payeeRisky: false,
|
||||||
|
payeeRiskTip: '',
|
||||||
|
payeeRiskLevel: '',
|
||||||
|
payeeBlackStatus: '',
|
||||||
attachmentRuleLoading: false,
|
attachmentRuleLoading: false,
|
||||||
attachmentImagePreviewVisible: false,
|
attachmentImagePreviewVisible: false,
|
||||||
attachmentImagePreviewUrls: [],
|
attachmentImagePreviewUrls: [],
|
||||||
@@ -980,11 +991,22 @@ export default {
|
|||||||
];
|
];
|
||||||
},
|
},
|
||||||
highRiskPayee() {
|
highRiskPayee() {
|
||||||
|
// 收款方 C101-1 高风险/黑名单,或客商等级 D/E/F(本地评级口径),命中须上传特批附件
|
||||||
|
if (this.payeeRisky) return true;
|
||||||
const level = String(this.payeeCustomerLevel || '')
|
const level = String(this.payeeCustomerLevel || '')
|
||||||
.trim()
|
.trim()
|
||||||
.toUpperCase();
|
.toUpperCase();
|
||||||
return ['D', 'D级', 'E', 'E级', 'F', 'F级'].includes(level) || level.includes('高风险');
|
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() {
|
requiredAttachmentMaterials() {
|
||||||
if (this.form.paymentType === 'project_advance') {
|
if (this.form.paymentType === 'project_advance') {
|
||||||
return [ATTACHMENT_MATERIALS.contract];
|
return [ATTACHMENT_MATERIALS.contract];
|
||||||
@@ -1967,6 +1989,10 @@ export default {
|
|||||||
const preserveCurrentValue = autoSelectDefault === false;
|
const preserveCurrentValue = autoSelectDefault === false;
|
||||||
this.receiptAccountOptions = [];
|
this.receiptAccountOptions = [];
|
||||||
this.payeeCustomerLevel = '';
|
this.payeeCustomerLevel = '';
|
||||||
|
this.payeeRisky = false;
|
||||||
|
this.payeeRiskTip = '';
|
||||||
|
this.payeeRiskLevel = '';
|
||||||
|
this.payeeBlackStatus = '';
|
||||||
if (!partyBName) {
|
if (!partyBName) {
|
||||||
if (!preserveCurrentValue) this.clearReceiptAccount();
|
if (!preserveCurrentValue) this.clearReceiptAccount();
|
||||||
return;
|
return;
|
||||||
@@ -1998,6 +2024,19 @@ export default {
|
|||||||
}
|
}
|
||||||
const detail = this.unwrapData(await getCustomerArchiveDetail(customer.id));
|
const detail = this.unwrapData(await getCustomerArchiveDetail(customer.id));
|
||||||
this.payeeCustomerLevel = detail.customerLevel || '';
|
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 || [])
|
this.receiptAccountOptions = (detail.receiptAccounts || [])
|
||||||
.filter(item => item.accountName || item.accountHolderName || item.bankAccount)
|
.filter(item => item.accountName || item.accountHolderName || item.bankAccount)
|
||||||
.map(item => ({
|
.map(item => ({
|
||||||
@@ -2706,6 +2745,15 @@ export default {
|
|||||||
// 提交前静默保存,避免同时弹出「保存成功」与材料缺失 toast
|
// 提交前静默保存,避免同时弹出「保存成功」与材料缺失 toast
|
||||||
const saved = await this.saveDraft({ showSuccess: false });
|
const saved = await this.saveDraft({ showSuccess: false });
|
||||||
if (!saved) return;
|
if (!saved) return;
|
||||||
|
// 高风险/黑名单收款方必须上传特批附件(与后端提交强校验同口径)
|
||||||
|
if (
|
||||||
|
this.missingAttachmentMaterials.some(
|
||||||
|
item => item.key === ATTACHMENT_MATERIALS.specialApproval.key
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
this.$message.warning('收款方为高风险/黑名单客商,必须上传「特批附件」类型附件后再提交审批');
|
||||||
|
return;
|
||||||
|
}
|
||||||
const previousApprovalStatus = this.form.approvalStatus || '';
|
const previousApprovalStatus = this.form.approvalStatus || '';
|
||||||
await api.submit({ id: this.form.id });
|
await api.submit({ id: this.form.id });
|
||||||
await submitMkApprovalFlow({
|
await submitMkApprovalFlow({
|
||||||
@@ -2734,6 +2782,26 @@ export default {
|
|||||||
.payment-form-page__form {
|
.payment-form-page__form {
|
||||||
padding-bottom: 72px;
|
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 {
|
.payment-form-page__settlement-nos {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user