fix_contract_no_products_assfees (#759)

Co-authored-by: lyx <2027667395@qq.com>
Co-authored-by: sealday <zhanglin@daoyoucloud.com>
Reviewed-on: daoyoucloud/tachybase#759
Reviewed-by: sealday <zhanglin@daoyoucloud.com>
Co-authored-by: hello@lv <2256334253@qq.com>
Co-committed-by: hello@lv <2256334253@qq.com>
This commit is contained in:
hello@lv 2024-04-18 15:36:30 +08:00 committed by sealday
parent 78ba43e7f9
commit 4b3886b072
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"@hera/plugin-rental": patch
---
合同费用校验(无产品关联先跳过)

View File

@ -111,7 +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;
if (!Array.isArray(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);