优化商品编辑时候单位的校验

This commit is contained in:
季圣华
2022-05-22 00:12:08 +08:00
parent 06b9001222
commit faf2c3ecc3

View File

@@ -644,8 +644,15 @@
} }
} else if(formData.unitId) { } else if(formData.unitId) {
if(commodityUnit != basicUnit && commodityUnit != otherUnit && commodityUnit != otherUnitTwo && commodityUnit != otherUnitThree) { if(commodityUnit != basicUnit && commodityUnit != otherUnit && commodityUnit != otherUnitTwo && commodityUnit != otherUnitThree) {
this.$message.warning('条码之后的单位填写有误,单位【' + commodityUnit + '】请修改为【' let warnInfo = '条码之后的单位填写有误,单位【' + commodityUnit + '】请修改为【' + basicUnit+ '】或【' + otherUnit+ '】'
+ basicUnit+ '】或【' + otherUnit+ '】或【' + otherUnitTwo+ '】或【' + otherUnitThree+ '】!'); if(otherUnitTwo) {
warnInfo += '或【' + otherUnitTwo+ '】'
}
if(otherUnitThree) {
warnInfo += '或【' + otherUnitThree+ '】'
}
warnInfo += ''
this.$message.warning(warnInfo);
return; return;
} }
} }