|
|
|
|
@ -994,7 +994,7 @@ function buildProjectContractsPayload(row: ProjectRow, index: number): Record<st
|
|
|
|
|
base.managerId = pf.managerId;
|
|
|
|
|
base.chargeId = pf.chargeId;
|
|
|
|
|
base.deputyId = pf.deputyId;
|
|
|
|
|
base.peopleId = Array.isArray(pf.peopleId) && pf.peopleId.length > 0 ? pf.peopleId.join(',') : pf.peopleId;
|
|
|
|
|
base.peopleId = normalizeProjectContractsPeopleId(pf.peopleId);
|
|
|
|
|
base.amount = pf.amount;
|
|
|
|
|
}
|
|
|
|
|
return base;
|
|
|
|
|
@ -1005,6 +1005,13 @@ function normalizePeopleId(value: string | string[] | number | undefined): strin
|
|
|
|
|
return Array.isArray(value) ? value.join(',') : value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 关联项目抄送:后端 ErpProjectContractsBo.peopleId 为 String,禁止提交 JSON 数组(含空数组) */
|
|
|
|
|
function normalizeProjectContractsPeopleId(value: string | string[] | number | undefined): string | undefined {
|
|
|
|
|
const raw = normalizePeopleId(value);
|
|
|
|
|
if (raw === undefined || raw === null || raw === '') return undefined;
|
|
|
|
|
return String(raw);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 校验回款比例之和是否为 100% */
|
|
|
|
|
function isRepaymentRateTotalValid(): boolean {
|
|
|
|
|
const totalRate = planStageList.value.reduce((sum, item) => sum + toNumber(item.repaymentRate), 0);
|
|
|
|
|
|