Parcourir la source

notify: 准入方式,除一级二级外其他需要考察报告

yuedefeng il y a 5 ans
Parent
commit
1c20476696

+ 30 - 16
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -880,11 +880,12 @@ export default {
     nextStep () {
       if (this.formDataCert.InStyle != '2' && this.formDataCert.InStyle != '3' ) {
         // 准入方式,除一级二级外其他需要考察报告
-        if (this.$refs['GoodsInfo'].scenefileurllist.length <= 0) {
-          this.$message({
-            type: 'warning',
-            message: '请上传现场考察报告!'
-          })
+        if (this.$refs['GoodsInfo'].scenefile.FileUrl.length <= 0) {
+          this.$notify({
+            title: '提示',
+            message: '请上传现场考察报告!',
+            type: 'warning'
+          });
           return false
         }
       }
@@ -1333,16 +1334,6 @@ export default {
       let valid = true
       if (this.formDataCert.Status <= 0 && this.activeName === '0') {
         valid = this.saveEntity()
-        if (this.formDataCert.InStyle != '2' && this.formDataCert.InStyle != '3' ) {
-          // 准入方式,除一级二级外其他需要考察报告
-          if (this.$refs['GoodsInfo'].scenefileurllist.length <= 0) {
-            this.$message({
-              type: 'warning',
-              message: '请上传现场考察报告!'
-            })
-            return false
-          }
-        }
       } else if (this.formDataCert.Status <= 0 && this.activeName === '1') {
         if (this.formDataCert.WorkerTotal <= 0) {
           this.$message({
@@ -1394,6 +1385,19 @@ export default {
             console.error(err)
           })
       }
+      if (this.activeName === '0' &&
+        this.formDataCert.InStyle != '2' &&
+        this.formDataCert.InStyle != '3' ) {
+        // 准入方式,除一级二级外其他需要考察报告
+        if (this.$refs['GoodsInfo'].scenefile.FileUrl.length <= 0) {
+          this.$notify({
+            title: '提示',
+            message: '请上传现场考察报告!',
+            type: 'warning'
+          });
+          return false
+        }
+      }
       if (!valid) {
         return false
       }
@@ -1419,7 +1423,6 @@ export default {
       if (this.formDataCert.Status >= 5) {
         this.totalTab = 5
       }
-      console.log('abbb', this.formData)
       let activeIdx = parseInt(this.activeName)
       if (activeIdx > 0) {
         this.activeName = (activeIdx - 1) + ''
@@ -1715,6 +1718,17 @@ export default {
       }
     },
     commitAudit () {
+      if (this.formDataCert.InStyle != '2' && this.formDataCert.InStyle != '3' ) {
+        // 准入方式,除一级二级外其他需要考察报告
+        if (this.$refs['GoodsInfo'].scenefile.FileUrl.length <= 0) {
+          this.$notify({
+            title: '提示',
+            message: '请上传现场考察报告!',
+            type: 'warning'
+          });
+          return false
+        }
+      }
       this.$refs['subfileList'].nextStep()
     },
     // chooseAuditorShow () {