|
|
@@ -4810,7 +4810,11 @@ const addBz = async() => {
|
|
|
if (formDatas.value[codeKey] || formDatas.value[nameKey]) {
|
|
|
console.log('有组员');
|
|
|
if (isNaN(percentageValue) || percentageValue <= 0 || percentageValue > 1) {
|
|
|
- console.log('分配系数不能小于等于0或者大于1,或者该值为NaN');
|
|
|
+ ElMessage({
|
|
|
+ type: "error",
|
|
|
+ message: "没有填写有效的组员或分配系数有误",
|
|
|
+ });
|
|
|
+ return;
|
|
|
} else {
|
|
|
hasValidMember = true; // 如果有有效的百分比值,则设置标志变量为true
|
|
|
}
|
|
|
@@ -4824,6 +4828,7 @@ if (!hasValidMember) {
|
|
|
type: "error",
|
|
|
message: "没有填写有效的组员或分配系数有误",
|
|
|
});
|
|
|
+ return;
|
|
|
}else if (shouldCheckLessThanOne && fpsum.value < 1) {//如果有组员,并且 shouldCheckLessThanOne 为 true(不是PM和SY机器),则检查 fpsum.value < 1
|
|
|
ElMessage({
|
|
|
type: "error",
|