Compare commits

...

8 Commits

7 changed files with 120 additions and 24 deletions
+2
View File
@@ -36,6 +36,8 @@ export const approve = id =>
url: `${baseUrl}/approve`,
method: 'post',
params: { id },
// 审批通过后同步推送合规(附件转传可达 20s+),覆盖全局 10s 超时
timeout: 120000,
});
export const reject = id =>
+2
View File
@@ -43,6 +43,8 @@ export const approve = id =>
url: `${baseUrl}/approve`,
method: 'post',
params: { id },
// 审批通过后同步推送合规(远程多次调用),覆盖全局 10s 超时
timeout: 60000,
});
export const reject = id =>
+5
View File
@@ -1,5 +1,8 @@
import request from '@/axios';
/** 提交审核流(MK)统一超时:客商/项目/合同/预结算/正式结算/付款/开票/收票/汇票付款 */
export const MK_SUBMIT_TIMEOUT = 30000;
/**
* 调用 MK processSubmit 提交审核流
* @param {Object} data
@@ -15,6 +18,7 @@ export const processSubmit = data => {
url: '/blade-system/businessProcess/processSubmit',
method: 'post',
data,
timeout: MK_SUBMIT_TIMEOUT,
});
};
@@ -28,6 +32,7 @@ export const processDelete = data => {
url: '/blade-system/businessProcess/processDelete',
method: 'post',
data,
timeout: MK_SUBMIT_TIMEOUT,
});
};
@@ -203,11 +203,11 @@ export const resolveAttachmentTypeDictCode = (location, fallback = CONTRACT_ATTA
export const defaultContractAttachmentTypeOptions = [
{ label: '用印材料', value: '用印材料' },
{ label: '双章归档文件', value: '双章归档文件' },
// 高风险/黑名单客商合同必传,后端按 fileType=特批说明 校验与转传特批(与后端 HcsSyncConstant.ATTACHMENT_TYPE_SPEC_EXPLANATION 对齐)
{ label: '特批说明', value: '特批说明' },
{ label: '其他文件', value: CONTRACT_ATTACHMENT_TYPE_OTHER },
];
// 特批附件归口附件(佐证材料等)区上传:高风险/黑名单客商合同必传,后端按 fileType=特批附件 校验并挂特批面板(与后端 HcsSyncConstant.ATTACHMENT_TYPE_SPEC_EXPLANATION 对齐)
export const defaultContractSupportingAttachmentTypeOptions = [
{ label: '特批附件', value: '特批附件' },
{ label: '其他文件', value: CONTRACT_ATTACHMENT_TYPE_OTHER },
];
/** @deprecated 兼容旧引用,实际选项由业务字典动态加载 */
@@ -301,6 +301,8 @@ export const resolveContractAttachmentType = (
item => String(item.label) === aliasedFileType || String(item.label) === rawFileType
);
if (matchedByLabel) return matchedByLabel.value;
// 行已带类型但字典未命中(如历史保存值、字典缺失)时保留原值,避免重开页面时被降级为其他文件
if (rawFileType) return aliasedFileType;
const fileName = normalizeAttachmentTypeText(attachmentName(row));
if (!fileName) return otherType;
const matched = list
@@ -643,7 +645,7 @@ export default {
this.contractAttachmentTypeOptions
);
} else {
this.uploadDialogType = this.defaultAttachmentType;
this.uploadDialogType = this.uploadDialogType || this.defaultAttachmentType;
}
this.$message.success('上传成功');
},
@@ -203,6 +203,11 @@
placeholder="请输入其他事项说明"
/>
</el-form-item>
<!-- 风险客商提示:合同已推送合规并留痕高风险/黑名单时展示,变更提交同样要求特批附件 -->
<div v-if="riskTipText" class="contract-manage-form__risk-tip">
<div class="contract-manage-form__risk-tip-title">风险客商提示:</div>
<div class="contract-manage-form__risk-tip-content">{{ riskTipText }}</div>
</div>
</section>
<contract-attachment-section
@@ -489,6 +494,17 @@ export default {
pageTitle() {
return this.$route.query.name || '合同变更';
},
// 高风险/黑名单客商提示:按合同推送合规留痕 hcs_risk_level/hcs_black_status 判定(与合同详情口径一致)
riskTipText() {
const riskLevel = String(this.form.hcsRiskLevel || '').trim();
const blacklist = String(this.form.hcsBlackStatus || '').toLowerCase() === 'yes';
if (riskLevel !== '2' && !blacklist) return '';
const parties = [this.form.partyA, this.form.partyB]
.map(name => String(name || '').trim())
.filter(Boolean)
.join('、');
return `【${parties || '相对方'}】:被列入外部黑名单;涉贪污受贿裁判相关提及方(3年以上及其他);被执行人信息;买卖合同纠纷;劳动纠纷;重大纠纷。提交变更前须上传「特批附件」类型附件`;
},
changeAttachmentLocationOptions() {
return ['用印材料', '附件(佐证材料等)', '变更材料'];
},
@@ -762,6 +778,10 @@ export default {
}
.contract-basic-section__date-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; width: 360px; max-width: 100%; }
.contract-basic-section__date-range span { color: #606266; }
// 风险客商提示条(基本信息备注后):橙黄背景 + 红色文字,与合同新增页一致
.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-basic-section__date-range :deep(.el-date-editor) { width: auto; min-width: 0; }
.contract-basic-section :deep(.el-form-item) { align-items: center; }
.contract-basic-section :deep(.el-form-item__label) { flex: 0 0 96px !important; width: 96px !important; height: auto; padding-right: 12px; white-space: normal; word-break: break-all; line-height: 18px; }
+47 -10
View File
@@ -81,7 +81,12 @@
</template>
<template #hcsSyncStatus="{ row }">
<el-tag v-if="row.hcsSyncStatus" :type="hcsSyncTagType(row.hcsSyncStatus)" class="status-text">
<el-tooltip v-if="row.hcsSyncMsg" placement="top" :content="row.hcsSyncMsg">
<el-tag :type="hcsSyncTagType(row.hcsSyncStatus)" class="status-text">
{{ hcsSyncLabel(row.hcsSyncStatus) }}
</el-tag>
</el-tooltip>
<el-tag v-else-if="row.hcsSyncStatus" :type="hcsSyncTagType(row.hcsSyncStatus)" class="status-text">
{{ hcsSyncLabel(row.hcsSyncStatus) }}
</el-tag>
<span v-else>-</span>
@@ -329,6 +334,7 @@
<contract-attachment-section
title="附件(佐证材料等)"
description
attachment-type
readonly
:rows="detailAttachmentRows"
:preview="previewAttachment"
@@ -1208,6 +1214,11 @@ const createCopiedDetail = (detail = {}) => {
Object.keys(form).forEach(prop => {
if (Object.prototype.hasOwnProperty.call(detail, prop)) form[prop] = detail[prop];
});
// 特批附件属于原合同的特批佐证,复制后须对新合同重新上传,否则会绕过高风险/黑名单校验
const stripSpecAttachments = value => {
const rows = parseArray(value).filter(item => item?.fileType !== '特批附件');
return rows.length ? JSON.stringify(rows) : '';
};
return {
...form,
contractNo: '',
@@ -1215,8 +1226,8 @@ const createCopiedDetail = (detail = {}) => {
archiveStatus: '未归档',
feeGenerationMode: detail.feeGenerationMode || '',
billingEnabled: detail.billingEnabled,
contractFileJson: detail.contractFileJson || '',
attachmentsJson: detail.attachmentsJson || '',
contractFileJson: stripSpecAttachments(detail.contractFileJson),
attachmentsJson: stripSpecAttachments(detail.attachmentsJson),
billingPlanJson: detail.billingPlanJson || '',
paymentRatioJson: detail.paymentRatioJson || '',
settlementRuleJson: detail.settlementRuleJson || '',
@@ -1587,7 +1598,7 @@ export default {
);
});
if (!parts.length) return '';
return `${parts.join(';')},按集团规定不可直接签约,提交前须上传「特批说明」类型附件,审批通过后将自动发起合同特批`;
return `${parts.join(';')},按集团规定不可直接签约,提交前须上传「特批附件」类型附件,审批通过后将自动发起合同特批`;
},
// 详情风险客商提示(基本信息备注后展示):按推送留痕 hcs_risk_level/hcs_black_status 判定(甲乙取高/任一),文案与后端 riskTip 一致
detailRiskTipText() {
@@ -1752,7 +1763,10 @@ export default {
this.onLoad(this.page, this.query);
})
.catch(error => {
this.$message.error(error?.response?.data?.msg || '推送合规失败');
// 拦截器已弹出后端 msg(如特批审核中禁止重推),此处不再重复提示
if (!error?._notified) {
this.$message.error(error?.response?.data?.msg || '推送合规失败');
}
})
.finally(() => {
this.hcsRepushingId = null;
@@ -1786,7 +1800,10 @@ export default {
this.onLoad(this.page, this.query);
})
.catch(error => {
this.$message.error(error?.response?.data?.msg || '批量推送合规失败');
// 拦截器已弹出后端 msg,此处不再重复提示
if (!error?._notified) {
this.$message.error(error?.response?.data?.msg || '批量推送合规失败');
}
})
.finally(() => {
this.hcsRepushingId = null;
@@ -2373,6 +2390,10 @@ export default {
const options = [...new Set(names)].map(name => ({ label: name, value: name }));
this.contractPartyAOptions = options;
this.contractPartyBOptions = options;
// 复制/编辑回填的甲乙方不会触发下拉 change,加载选项后主动查一次 C101-1 风险
['partyA', 'partyB'].forEach(prop => {
if (this.form[prop]) this.queryPartyRisk(prop);
});
})
.finally(() => {
if (requestId === this.contractPartyRequestId) this.contractPartyLoading = false;
@@ -3184,10 +3205,26 @@ export default {
})
)
: request();
afterMk.then(() => {
this.$message.success(operation.successMessage || `${operation.label}成功`);
this.onLoad(this.page, this.query);
});
// 合同通过会同步等待附件转传 + 合规推送,加遮罩防重复点击
const loading =
operation.action === 'approve'
? this.$loading({
lock: true,
text: '正在推送合规,请稍候…',
background: 'rgba(255, 255, 255, 0.6)',
})
: null;
afterMk
.then(res => {
// data=false 表示审批已通过但合规推送失败,msg 带具体原因(照正式结算单审批)
if (operation.action === 'approve' && res?.data?.data === false) {
this.$message.warning(res.data.msg);
} else {
this.$message.success(operation.successMessage || `${operation.label}成功`);
}
this.onLoad(this.page, this.query);
})
.finally(() => loading && loading.close());
};
if (operation.prompt) {
this.$prompt(operation.prompt, operation.label, {
+39 -11
View File
@@ -68,8 +68,13 @@
</template>
<template #hcsSyncStatus="{ row }">
<el-tooltip v-if="row.hcsSyncMsg" placement="top" :content="row.hcsSyncMsg">
<el-tag :type="hcsSyncTagType(row.hcsSyncStatus)" class="status-text">
{{ hcsSyncLabel(row.hcsSyncStatus) }}
</el-tag>
</el-tooltip>
<el-tag
v-if="row.hcsSyncStatus"
v-else-if="row.hcsSyncStatus"
:type="hcsSyncTagType(row.hcsSyncStatus)"
class="status-text"
>
@@ -1676,7 +1681,10 @@ export default {
this.onLoad(this.page, this.query);
})
.catch(error => {
this.$message.error(error?.response?.data?.msg || '推送合规失败');
// 拦截器已弹出后端 msg,此处不再重复提示
if (!error?._notified) {
this.$message.error(error?.response?.data?.msg || '推送合规失败');
}
})
.finally(() => {
this.hcsRepushingId = null;
@@ -1710,7 +1718,10 @@ export default {
this.onLoad(this.page, this.query);
})
.catch(error => {
this.$message.error(error?.response?.data?.msg || '批量推送合规失败');
// 拦截器已弹出后端 msg,此处不再重复提示
if (!error?._notified) {
this.$message.error(error?.response?.data?.msg || '批量推送合规失败');
}
})
.finally(() => {
this.hcsRepushingId = null;
@@ -1857,14 +1868,31 @@ export default {
approvalStatus: row.approvalStatus || '',
}).then(() => request())
: request();
afterMk.then(res => {
if (res.data?.success === false || res.data?.data === false) {
this.$message.error(res.data?.msg || `${operation.label}失败,请联系管理员`);
return;
}
this.$message.success(`${operation.label}成功`);
this.onLoad(this.page, this.query);
});
// 项目通过会同步等待合规推送,加遮罩防重复点击
const loading =
operation.action === 'approve'
? this.$loading({
lock: true,
text: '正在推送合规,请稍候…',
background: 'rgba(255, 255, 255, 0.6)',
})
: null;
afterMk
.then(res => {
// data=false 表示审批已通过但合规推送失败,msg 带具体原因(照正式结算单审批)
if (operation.action === 'approve' && res.data?.data === false) {
this.$message.warning(res.data?.msg);
this.onLoad(this.page, this.query);
return;
}
if (res.data?.success === false) {
this.$message.error(res.data?.msg || `${operation.label}失败,请联系管理员`);
return;
}
this.$message.success(`${operation.label}成功`);
this.onLoad(this.page, this.query);
})
.finally(() => loading && loading.close());
};
if (operation.prompt) {
this.$prompt(operation.prompt, operation.label, {