ouyj 5 miesięcy temu
rodzic
commit
386a1576ff
1 zmienionych plików z 29 dodań i 0 usunięć
  1. 29 0
      ygtx-ui/src/views/gxt/orderScore/index.vue

+ 29 - 0
ygtx-ui/src/views/gxt/orderScore/index.vue

@@ -1142,8 +1142,37 @@ function closeSelfEvaluationDialog() {
 
 /** 提交自评 */
 function submitSelfEvaluation() {
+  // 首先验证表单基础字段
   proxy.$refs["selfEvaluationRef"].validate(valid => {
     if (valid) {
+      // 验证自评得分是否为空
+      let scoreValid = true;
+      let emptyScorePerson = null;
+      
+      if (selfEvaluationForm.value.scorePersonList && selfEvaluationForm.value.scorePersonList.length > 0) {
+        for (let i = 0; i < selfEvaluationForm.value.scorePersonList.length; i++) {
+          const person = selfEvaluationForm.value.scorePersonList[i];
+          if (!person.selfScore || person.selfScore.trim() === '') {
+            scoreValid = false;
+            emptyScorePerson = person;
+            break;
+          }
+        }
+      } else {
+        scoreValid = false;
+      }
+      
+      // 如果得分验证不通过,提示用户
+      if (!scoreValid) {
+        if (emptyScorePerson) {
+          proxy.$modal.msgError(`自评分数不能为空`);
+        } else {
+          proxy.$modal.msgError("自评分数不能为空");
+        }
+        return;
+      }
+      
+      // 提交自评
       selfEvaluation(selfEvaluationForm.value).then(response => {
         proxy.$modal.msgSuccess("自评提交成功");
         selfEvaluationDialogVisible.value = false;