2
3
فهرست منبع

loading

Signed-off-by: lijunqing <lijunqing@dashoo.cn>
lijunqing 6 سال پیش
والد
کامیت
6362d01e7d

+ 20 - 1
src/dashoo.cn/frontend_web/src/components/oilsupplier/businesslist.vue

@@ -307,6 +307,7 @@
               _this.loading=false
               _this.initData()
             } else {
+                 _this.loading=false
               _this.$message({
                 type: 'warning',
                 message: res.data.message
@@ -381,6 +382,14 @@
             this.Ids=[]
             this.Ids.push(val.Id)
             }
+          console.log(this.Ids)
+          if(this.Ids.length==0){
+           this.$message({
+                type: 'warning',
+                message: '请先选择删除条目'
+            })
+            return
+        }
         let _this = this
         _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
             confirmButtonText: '确定',
@@ -388,6 +397,10 @@
             type: 'warning'
           })
           .then(() => {
+              const delload= this.$loading({
+          lock: true,
+          text: '正在删除请稍后...',
+        });
             _this.$axios.delete('suppliercertsub/businessdelete/' + this.Ids.join(), {})
               .then(function (response) {
                 if (response.data.code === 0) {
@@ -395,8 +408,12 @@
                     type: 'success',
                     message: response.data.message
                   })
+                   _this.Ids=[]
+                   delload.close()
                   _this.initData()
                 } else {
+                   _this.Ids=[]
+                   delload.close()
                   _this.$message({
                     type: 'warning',
                     message: response.data.message
@@ -407,7 +424,9 @@
                 console.log(error)
               })
           })
-          .catch(() => {})
+          .catch(() => {
+               _this.Ids=[]
+          })
       },
       showDialog() {
         this.selectedorg = []

+ 20 - 1
src/dashoo.cn/frontend_web/src/components/oilsupplier/goodslist.vue

@@ -222,6 +222,7 @@
               _this.loading=false
               _this.initData()
             } else {
+              _this.loading=false
               _this.$message({
                 type: 'warning',
                 message: '操作失败!'
@@ -242,6 +243,14 @@
             this.Ids.push(val.Id)
         }
 
+        if(this.Ids.length==0){
+           this.$message({
+                type: 'warning',
+                message: '请先选择删除条目'
+            })
+            return
+        }
+
         let _this = this
         _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
             confirmButtonText: '确定',
@@ -249,6 +258,10 @@
             type: 'warning'
           })
           .then(() => {
+         const delload= this.$loading({
+          lock: true,
+          text: '正在删除请稍后...',
+        });
             _this.$axios.delete('suppliercertsub/businessdelete/' + this.Ids.join(), {})
               .then(function (response) {
                 if (response.data.code === 0) {
@@ -256,8 +269,12 @@
                     type: 'success',
                     message: response.data.message
                   })
+                  delload.close()
+                   _this.Ids=[]
                   _this.initData()
                 } else {
+                   delload.close()
+                    _this.Ids=[]
                   _this.$message({
                     type: 'warning',
                     message: response.data.message
@@ -268,7 +285,9 @@
                 console.log(error)
               })
           })
-          .catch(() => {})
+          .catch(() => {
+               _this.Ids=[]
+          })
       },
       showDialog() {
         //this.getorgtreelist()

+ 20 - 1
src/dashoo.cn/frontend_web/src/components/oilsupplier/techlist.vue

@@ -191,6 +191,7 @@
                _this.loading = false
               _this.initData()
             } else {
+                 _this.loading=false
               _this.$message({
                 type: 'warning',
                 message: '操作失败!'
@@ -206,6 +207,14 @@
             this.Ids=[]
             this.Ids.push(val.Id)
         }
+
+         if(this.Ids.length==0){
+           this.$message({
+                type: 'warning',
+                message: '请先选择删除条目'
+            })
+            return
+        }
         let _this = this
         _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
             confirmButtonText: '确定',
@@ -213,6 +222,10 @@
             type: 'warning'
           })
           .then(() => {
+              const delload= this.$loading({
+          lock: true,
+          text: '正在删除请稍后...',
+        });
             _this.$axios.delete('suppliercertsub/businessdelete/' + this.Ids.join(), {})
               .then(function (response) {
                 if (response.data.code === 0) {
@@ -220,8 +233,12 @@
                     type: 'success',
                     message: response.data.message
                   })
+                   delload.close()
+                  _this.Ids=[]
                   _this.initData()
                 } else {
+                   delload.close()
+                    _this.Ids=[]
                   _this.$message({
                     type: 'warning',
                     message: response.data.message
@@ -232,7 +249,9 @@
                 console.log(error)
               })
           })
-          .catch(() => {})
+          .catch(() => {
+               _this.Ids=[]
+          })
       },
       showDialog() {
         this.getorgtreelist()