From a1a6630f2eabfc78a379b5808b1bf7231a084d0b Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 11 十月 2023 18:02:44 +0800
Subject: [PATCH] 工序弹框的 列表和详情的更新同步

---
 src/components/AddIssue.vue |   46 +++++++++++++++++++++++++++++++++-------------
 1 files changed, 33 insertions(+), 13 deletions(-)

diff --git a/src/components/AddIssue.vue b/src/components/AddIssue.vue
index f9795fb..223ce43 100644
--- a/src/components/AddIssue.vue
+++ b/src/components/AddIssue.vue
@@ -41,7 +41,7 @@
             </div>
             
           </template>
-          <template v-else>
+          <template v-else-if="Object.keys(taskData).length > 0 ">
             <div class="title-box margin_bottom_13">
               <div class="title-item color_4efefa font_size_20 title-bng">
                 褰撳墠浠诲姟锛歿{ taskData.Procedure.procedure.procedureName || "" }}
@@ -167,7 +167,7 @@
       </div>
       <div slot="footer" :class="messageError?'dialog-footer tac btn-error':'dialog-footer tac'" style="overflow: hidden">
         <template v-if="messageError">
-          <div class="btn" v-if="messageError =='涓嬪彂鎴愬姛锛�'"  @click="closeClick">
+          <div class="btn" v-if="messageError =='涓嬪彂鎴愬姛锛�'||ArrError"  @click="closeClick">
             <img  src="../../public/close-btn.png" />
           </div>
           <div class="btn" v-else  @click="confirmClick2">
@@ -179,7 +179,7 @@
               <img src="../../public/btn1.png" />
           </div>
           <div class="btn" v-if="showBtn == 1">
-            <div v-if='taskData&&taskData.canStarted' @click="confirmClick1"><img  src="../../public/confirm1.png" /></div>
+            <div v-if='taskData&&taskData.CanStarted' @click="confirmClick1"><img  src="../../public/confirm1.png" /></div>
             <div v-else><img  src="../../public/confirm2.png" /></div>
           </div>
           <div class="btn" v-if="showBtn == 2">
@@ -229,12 +229,24 @@
         return [];
       },
     },
+    ArrError:{
+      type: [String],
+      default: () => {
+        return '';
+      },
+    },
     safeProduce:{
       type: [String],
       default: () => {
         return '';
       },
-    }
+    },
+    activeName:{
+      type: [String,Number],
+      default: () => {
+        return 1;
+      },
+    },
   },
   data() {
     return {
@@ -243,7 +255,7 @@
       num: 0,
       timer: null,
       message: this.safeProduce,
-      messageError: "涓嬪彂鎴愬姛锛�",
+      messageError: "",
       resParams: {},
       isLoading:false,
       sencond:0,
@@ -278,6 +290,10 @@
       this.num = 0;
       this.showBtn=1;
       this.isLoading=false
+      this.sencond=0
+      this.sencondTimer=null
+      this.messageError=''
+      this.resParams= {},
       this.$emit('isTip',this.islook)
     },
   },
@@ -304,16 +320,20 @@
     getInfo() {
       // 1 鏈敓浜� 2鐢熶骇涓� 3鐢熶骇瀹屾垚
       if (
-        Object.keys(this.taskData).length > 0 &&
-        this.taskData.Procedure.ID &&
-        this.taskData.Procedure.Status == 1
+        Object.keys(this.taskData).length > 0 && this.taskData.Procedure.ID &&
+          this.taskData.Procedure.Status == 1
       ) {
-        this.num = 0;
-        this.showBtn = 1;
-        this.islook = true;
+          this.num = 0;
+          this.showBtn = 1;
+          this.islook = true;
       } else {
         this.islook = false;
-        // this.islook = true;
+        //  this.islook = true;
+        
+      }
+      if(this.ArrError){
+        this.messageError=this.ArrError;
+        
       }
       
     },
@@ -401,7 +421,7 @@
           this.num = 0;
           this.showBtn= 1
           this.shutdown();
-          this.$emit('getSetProductNumber')
+          this.$emit('getSetProductNumber',this.activeName)
           // this.$message.success("涓嬪彂鐢熶骇鏁伴噺鎴愬姛锛�");
         }
       } else {

--
Gitblit v1.8.0