feat: 合同费用校验(无产品关联先跳过)clost #756 (#757)

Co-authored-by: lyx <2027667395@qq.com>
Reviewed-on: daoyoucloud/tachybase#757
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 14:45:55 +08:00 committed by sealday
parent b1bff7d27e
commit e230ea5586
2 changed files with 6 additions and 0 deletions

View File

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

View File

@ -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是否为数组格式) // const feeProduct = plan.fee_items.filter((item) => item.lease_item_id === options.values.lease_product.id // 确定options.values.lease_product是否为数组格式)
} else { } else {
const add = options.values.fee_product; 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); const feeData = plan.fee_items.filter((item) => !item.lease_item_id).map((item) => item.fee_product);
feeData.forEach((item) => { feeData.forEach((item) => {
const isHas = add.find((p) => p.id === item.id); const isHas = add.find((p) => p.id === item.id);