From 4a6d69f3ff895918b1b8f1e8e9b122ed8fcd5afa Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 24 十一月 2022 17:15:47 +0800
Subject: [PATCH] 1.自动排程实现静态部分

---
 src/views/scgl/sckbg.vue |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/views/scgl/sckbg.vue b/src/views/scgl/sckbg.vue
index 265672a..028a069 100644
--- a/src/views/scgl/sckbg.vue
+++ b/src/views/scgl/sckbg.vue
@@ -1822,6 +1822,9 @@
     },
     // 鐢ㄦ埛娣诲姞
     userAdd() {
+      if (this.userTableData.find(i => i.isVisible === 1)) {
+        return this.$message.info('璇峰厛淇濆瓨褰撳墠琛屼俊鎭紒')
+      }
       let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
       number = number === 0 ? (10 + Math.random()) : number
       console.log(this.userTableData, 6)
@@ -1938,7 +1941,6 @@
     dialogVisibleConfirm() {
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
-          this.$store.state.app.buttonIsDisabled = true
           if (this.dialogTitle === '澶栧崗鍙戞枡') {
             if (parseFloat(this.dialogForm.fqty) > parseFloat(this.dialogForm.noreportqty)) {
               return this.$message.info('鍙戞枡鏁伴噺涓嶈兘澶т簬鏈彂鏁伴噺!')
@@ -1953,6 +1955,7 @@
               taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
               fqty: this.dialogForm.fqty // 鍙戞枡鏁伴噺
             }
+            this.$store.state.app.buttonIsDisabled = true
             SavaMesOrderStepOut(data).then(res => {
               if (res.code === '200') {
                 this.dialogVisible = false
@@ -1989,16 +1992,15 @@
               ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
               badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
             }
+            this.$store.state.app.buttonIsDisabled = true
             SavaMesOrderStepIn(data).then(res => {
               if (res.code === '200') {
+                this.dialogVisible = false
                 this.$message.success('鏀舵枡鎴愬姛锛�')
-
                 if (this.dialogForm.nextstepcode === '') {
                   this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.inuser).username)
                   this.dialogVisible2 = true
                 }
-                this.dialogVisible = false
-
                 this.tabClick()
                 this.$store.state.app.buttonIsDisabled = false
               } else {
@@ -2017,10 +2019,11 @@
               taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
               startqty: this.dialogForm.startqty// 寮�濮嬫暟閲�
             }
+            this.$store.state.app.buttonIsDisabled = true
             SavaMesOrderStepStart(data).then(res => {
               if (res.code === '200') {
-                this.$message.success('寮�宸ユ垚鍔燂紒')
                 this.dialogVisible = false
+                this.$message.success('寮�宸ユ垚鍔燂紒')
                 this.tabClick()
                 this.$store.state.app.buttonIsDisabled = false
               } else {
@@ -2067,18 +2070,17 @@
               ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
               badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
             }
-
+            this.$store.state.app.buttonIsDisabled = true
             SavaMesOrderStepReport(data).then(res => {
               if (res.code === '200') {
+                this.dialogVisible = false
                 this.$message.success('鎶ュ伐鎴愬姛锛�')
-
                 if (this.dialogForm.nextstepcode === '') {
                   this.ZZprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.operation).username)
                   this.dialogVisible2 = true
-                  this.$store.state.app.buttonIsDisabled = false
                 }
-                this.dialogVisible = false
                 this.tabClick()
+                this.$store.state.app.buttonIsDisabled = false
               } else {
                 this.$message.error('鎶ュ伐澶辫触!')
               }

--
Gitblit v1.9.3