Merge pull request '项目+合同对接合同系统' (#8) from feature/hcs-api-p0-web into master

Reviewed-on: #8
This commit was merged in pull request #8.
This commit is contained in:
2026-10-27 14:47:14 +08:00
26 changed files with 1304 additions and 55 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 =>
+96
View File
@@ -0,0 +1,96 @@
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 repushBatch = (bizType, ids) =>
request({
url: `${baseUrl}/sync/${bizType}/batch`,
method: 'post',
data: ids,
timeout: 300000,
});
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,
});
// 客商风险批量查询(客商列表页展示用):入参编号数组,后端逐个查 C101-1,单个失败跳过
export const getRiskBatch = customerCodes =>
request({
url: `${baseUrl}/risk/batch`,
method: 'get',
params: { customerCodes: (customerCodes || []).join(',') },
timeout: 60000,
});
// 客商风险按名称查询(客商档案表单展示用):名称反查编号后口径同编号查询
export const getRiskByName = customerName =>
request({
url: `${baseUrl}/risk/by-name`,
method: 'get',
params: { customerName },
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;
};
+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 =>