diff --git a/.changeset/old-readers-look.md b/.changeset/old-readers-look.md new file mode 100644 index 000000000..271ae4972 --- /dev/null +++ b/.changeset/old-readers-look.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +合同费用校验(无产品关联先跳过) diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/contract-rule-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/contract-rule-service.ts index 79855ccce..9b71a4646 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/contract-rule-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/contract-rule-service.ts @@ -111,6 +111,7 @@ export class ContractRuleService { // const feeProduct = plan.fee_items.filter((item) => item.lease_item_id === options.values.lease_product.id // 确定options.values.lease_product是否为数组格式) } else { const add = options.values.fee_product; + if (!add) return; const feeData = plan.fee_items.filter((item) => !item.lease_item_id).map((item) => item.fee_product); feeData.forEach((item) => { const isHas = add.find((p) => p.id === item.id);