zjh
7 天以前 d123ca35bb3ec4982af44aeb1ffffa8a3569a21b
pages/QC/LLJ/yzxFrom.vue
@@ -153,30 +153,42 @@
            data: submitData
         }
      }).then(res => {
         if(res.status==0){
            uni.showToast({
              title: '保存成功',
              icon: 'success',
              duration: 2000
            })
         }else{
            uni.showModal({
               title: "提示",
               content: res.message,
               confirmText: "确定",
               showCancel: false,
               success: (res) => {
               }
            })
         }
      }).catch(() => {
         this.isLoading = false; // 出现错误时结束加载
      });
        uni.showToast({
          title: '保存成功',
          icon: 'success',
          duration: 2000
        })
        
      } finally {
        this.isSubmitting = false
      }
    },
    validateForm() {
      for (const item of this.components) {
        if (item.selectedSpec === -1 || item.selectedMfg === -1) {
          return {
            valid: false,
            msg: `${item.name} 未完成选择`
          }
        }
      }
      // for (const item of this.components) {
      //   if (item.selectedSpec === -1 || item.selectedMfg === -1) {
      //     return {
      //       valid: false,
      //       msg: `${item.name} 未完成选择`
      //     }
      //   }
      // }
      return { valid: true }
    },
         onLoad(options) {