Browse Source

手动上传相关页面限制重复点击上传

Epans 2 years ago
parent
commit
9ef5348006

+ 16 - 2
.gitignore

@@ -1,2 +1,16 @@
-.vscode/
-node_modules
+.DS_Store
+node_modules/
+dist/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+package-lock.json
+tests/**/coverage/
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.0fe1a511.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.a98b1206.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.198d6a86.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.3415c10d.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-581b2547.df9fb7e7.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-d17f893e.97a3589c.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-libs.8fedaea8.js


BIN
dist20221114测试地址1.zip


+ 29 - 2
src/views/custom/allot/index.vue

@@ -437,6 +437,8 @@ export default {
   },
   data() {
     return {
+      isSap:1,
+      isSrm:1,
       selectList: [],
       isAllotsap: [],
       currentRow:{},
@@ -577,8 +579,19 @@ export default {
       const that = this 
       console.log("currentRow ProofCode",this.currentRow.ProofCode)
       var send_data = this.selectList
-    
-      SapTrans(send_data).then(response => {
+
+      if(send_data.length == 0){
+        that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
+        return false
+      }
+
+
+      console.log(that.isSap)
+
+      if(that.isSap == 1){
+
+         that.isSap = 0
+         SapTrans(send_data).then(response => {
               console.log('response', response)
                 
               if (response.msg !== 'fail') {
@@ -589,6 +602,20 @@ export default {
                   that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
                 }
             })
+ 
+            
+      } else {
+
+        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
+      }
+
+      setTimeout(() => {
+              that.isSap = 1
+            }, 3000)
+
+
+    
+    
       //  if(true){
       //sapStatus 0 或没有 未同步,1 同步成功,2同步失败
       // if(this.currentRow.sapStatus){

+ 29 - 1
src/views/custom/outStock/index.vue

@@ -1003,6 +1003,8 @@ export default {
   },
   data() {
     return {
+      isSap:1,
+      isSrm:1,
       selectList: [],
       currentRow:{},
       totalImportInfo: 0,
@@ -1356,7 +1358,19 @@ export default {
       const that = this 
       console.log("currentRow ProofCode",this.currentRow.ProofCode)
       var send_data = this.selectList
-      SapUse(send_data).then(response => {
+
+      if(send_data.length == 0){
+        that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
+        return false
+      }
+
+
+      console.log(that.isSap)
+
+      if(that.isSap == 1){
+
+         that.isSap = 0
+         SapUse(send_data).then(response => {
               console.log('response', response)
                 
               if (response.msg !== 'fail') {
@@ -1368,6 +1382,20 @@ export default {
                   that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
                 }
             })
+ 
+            
+      } else {
+
+        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
+      }
+
+      setTimeout(() => {
+              that.isSap = 1
+            }, 3000)
+
+
+
+      
     
       // if(this.currentRow.ProofCode){
       //    console.log("currentRow ProofCode 这个值说明已经上传了,不用上传")

+ 57 - 4
src/views/custom/purchase/index.vue

@@ -986,7 +986,8 @@ export default {
   },
   data() {
     return {
-
+      isSap:1,
+      isSrm:1,
       selectList: [],
 
       isPurchaseSap: [],isPurchaseSrm: [],
@@ -1914,10 +1915,20 @@ export default {
       const that = this 
       console.log("currentRow",this.currentRow.sapstatus)
 
-            var send_data = this.selectList
+     var send_data = this.selectList
+
+     if(send_data.length == 0){
+        that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
+        return false
+      }
+
+
+      console.log(that.isSap)
 
+      if(that.isSap == 1){
 
-            SapOrder(send_data).then(response => {
+         that.isSap = 0
+         SapOrder(send_data).then(response => {
               console.log('response', response)
                 
                if (response.msg !== 'fail') {
@@ -1930,6 +1941,20 @@ export default {
                 }
                
             })
+ 
+            
+      } else {
+
+        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
+      }
+
+      setTimeout(() => {
+              that.isSap = 1
+            }, 3000)
+
+
+
+           
     
   
       // if(this.currentRow.sapstatus){
@@ -1988,7 +2013,20 @@ export default {
       console.log('勾选数据selectList', this.selectList)
 
       var send_data = this.selectList
-      SrmOrder(send_data).then(response => {
+
+
+      if(send_data.length == 0){
+        that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
+        return false
+      }
+
+
+      console.log(that.isSrm)
+
+      if(that.isSrm == 1){
+
+         that.isSrm = 0
+         SrmOrder(send_data).then(response => {
               console.log('response', response)
                 
                if (response.msg !== 'fail') {
@@ -2003,6 +2041,21 @@ export default {
                
             })
 
+ 
+            
+      } else {
+
+        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
+      }
+
+      setTimeout(() => {
+              that.isSrm = 1
+            }, 3000)
+
+
+
+
+   
       // if(this.currentRow.srmstatus){
       //   if(this.currentRow.srmstatus != 0){
       //     const srmArr = this.currentRow.srmbuyeCode.split(",")

+ 28 - 1
src/views/custom/retreat/index.vue

@@ -599,6 +599,8 @@ import Pagination from '@/components/Pagination' // secondary package based on e
 import { MessageBox } from 'element-ui'
 import Cookies from 'js-cookie'
 export default {
+  isSap:1,
+      isSrm:1,
   selectList: [],
   name: 'Retreat',
   components: { Pagination },
@@ -983,7 +985,20 @@ export default {
       const that = this 
       console.log("currentRow ProofCode",this.currentRow.ProofCode)
       var send_data = this.selectList
-      SapQuit(send_data).then(response => {
+
+      if(send_data.length == 0){
+        that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
+        return false
+      }
+
+
+      console.log(that.isSap)
+
+      if(that.isSap == 1){
+
+         that.isSap = 0
+      
+         SapQuit(send_data).then(response => {
               console.log('response', response)
                 
               if (response.msg !== 'fail') {
@@ -996,6 +1011,18 @@ export default {
                   that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
                 }
             })
+            
+      } else {
+
+        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
+      }
+
+      setTimeout(() => {
+              that.isSap = 1
+            }, 3000)
+
+
+      
       //  if(true){
       // if(this.currentRow.ProofCode){
       //    console.log("currentRow ProofCode 这个值说明已经上传了,不用上传")

+ 28 - 1
src/views/custom/returngoods/index.vue

@@ -629,6 +629,8 @@ export default {
   },
   data() {
     return {
+      isSap:1,
+      isSrm:1,
       selectList: [],
       isRetrunsap: [], 
       currentRow:{},
@@ -1081,7 +1083,19 @@ export default {
       const that = this 
       console.log("currentRow ProofCode",this.currentRow.ProofCode)
       var send_data = this.selectList
-      SapRef(send_data).then(response => {
+
+      if(send_data.length == 0){
+        that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
+        return false
+      }
+
+
+      console.log(that.isSap)
+
+      if(that.isSap == 1){
+
+         that.isSap = 0
+         SapRef(send_data).then(response => {
               console.log('response', response)
                 
               if (response.msg !== 'fail') {
@@ -1093,6 +1107,19 @@ export default {
                   that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
                 }
             })
+ 
+            
+      } else {
+
+        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
+      }
+
+      setTimeout(() => {
+              that.isSap = 1
+            }, 3000)
+
+
+     
 
       //  if(true){
       // if(this.currentRow.ProofCode){

+ 16 - 9
src/views/custom/storage/index.vue

@@ -1989,10 +1989,10 @@ export default {
 
       var send_data = this.selectList
 
-      // if(send_data.length == 0){
-      //   that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
-      //   return false
-      // }
+      if(send_data.length == 0){
+        that.$notify({ title: '失败', message: '请勾选数据!'  , type: 'error', duration: 2000 })
+        return false
+      }
 
       console.log(that.isSap)
 
@@ -2016,18 +2016,25 @@ export default {
               
             })
 
-            setTimeout(() => {
-              that.isSap = 1
-            }, 3000)
+           
 
             console.log(that.isSap)
             
       } else {
 
-        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟'  , type: 'error', duration: 2000 })
+        that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
       }
 
-            
+      setTimeout(() => {
+              that.isSap = 1
+            }, 3000)
+
+
+
+
+
+
+     
 
       // //  if(true){
       // if(this.currentRow.ProofCode){

Some files were not shown because too many files changed in this diff