fix(order): 修复产品信息验证逻辑

- 添加了对产品信息列表为空的验证判断
- 防止在列表为空时出现验证错误
- 确保产品BomCode验证逻辑的正确性
master
chenhao 2026-01-04 12:13:22 +08:00
parent 0b0add0b48
commit 71d23496f7
1 changed files with 1 additions and 1 deletions

View File

@ -465,7 +465,7 @@ export default {
this.$modal.msgError("折扣不能大于100%");
return;
}
const checkProduct=(list)=>list.every(item => item.productBomCode!=='')
const checkProduct=(list)=>!list ||list.every(item => item.productBomCode!=='')
if (!checkProduct(this.form.softwareProjectProductInfoList) || !checkProduct(this.form.hardwareProjectProductInfoList) || !checkProduct(this.form.maintenanceProjectProductInfoList)) {
this.$modal.msgError("请完善产品信息");
return;