From 8bfc9743f7f2c02c0e2c6de139dca17b2dde5cb4 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 26 十二月 2024 16:03:14 +0800
Subject: [PATCH] 完成人员迁移

---
 src/components/view/a7-sample-disposal.vue |   40 ++++++++++++++++++++++++++++++----------
 1 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/src/components/view/a7-sample-disposal.vue b/src/components/view/a7-sample-disposal.vue
index 4ea1d07..2a01a48 100644
--- a/src/components/view/a7-sample-disposal.vue
+++ b/src/components/view/a7-sample-disposal.vue
@@ -6,9 +6,9 @@
         <!-- <el-button size="medium" type="primary" @click="handleDown" v-loading="outLoading" style="margin-right: 16px;">瀵煎嚭</el-button> -->
       </el-col>
     </el-row>
-    <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="componentData0.entity.totaldealId=''">
+    <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="tabClick">
       <el-tab-pane label="濉啓" name="濉啓" style="height: 100%;" :key="1">
-        <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;" v-if="addPower">鏂板</el-button>
+        <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;" v-if="addPower&&currentInfo.submitState!='宸叉彁浜�'">鏂板</el-button>
         <div class="table" style="height: calc(100% - 200px)" v-if="activeName=='濉啓'">
           <ValueTable ref="ValueTable0" :url="$api.processTotaldeal.pageProcessDeal"
       :componentData="componentData0" :key="upIndex0" :delUrl="$api.processTotaldeal.delProcessDeal" />
@@ -32,7 +32,7 @@
             <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
           </div>
         </div>
-        <div class="table">
+        <div class="table" v-if="activeName=='鍘嗗彶璁板綍'">
           <ValueTable ref="ValueTable" :url="$api.processTotaldeal.pageProcessTotaldeal"
             :componentData="componentData" :key="upIndex"/>
         </div>
@@ -206,7 +206,7 @@
   name: "SampleDisposal",
   data() {
     return {
-      activeName:'濉啓',
+      activeName:'鍘嗗彶璁板綍',
       title:'鏂板',
       addDialogVisible:false,
       addLoading:false,
@@ -265,7 +265,7 @@
             type: 'text',
             method: 'handleCheck',
             disabFun: (row, index) => {
-						return row.examineState=='閫氳繃'||row.submitState=='寰呮彁浜�'
+						return row.examineState=='閫氳繃'||row.submitState=='寰呮彁浜�'||!row.submitState
             }
           }, {
             id: 'handleApproval',
@@ -273,7 +273,7 @@
             type: 'text',
             method: 'handleApproval',
             disabFun: (row, index) => {
-						return row.ratifyState=='閫氳繃'||row.submitState=='寰呮彁浜�'
+						return row.ratifyState=='閫氳繃'||row.submitState=='寰呮彁浜�'||!row.submitState
             }
           }],
           tagField: {},
@@ -299,12 +299,12 @@
             id: 'handleAdd0',
             font: '淇敼',
             type: 'text',
-            method: 'handleAdd0'
+            method: 'handleAdd0',
           },{
             id: 'delete',
             font: '鍒犻櫎',
             type: 'text',
-            method: 'doDiy'
+            method: 'doDiy',
           }],
           tagField: {},
           selectField: {},
@@ -324,6 +324,17 @@
       outPower:false,
       addPower:false,
     };
+  },
+  watch: {
+    'activeName' (val1, val2) {
+      if(val1=='濉啓'){
+        this.componentData0.do.forEach((item)=>{
+          item.disabFun = (row, index) => {
+            return !this.addPower||this.currentInfo.submitState=='宸叉彁浜�'
+          }
+        })
+      }
+    }
   },
   mounted() {
     this.entityCopy = this.HaveJson(this.componentData.entity);
@@ -475,12 +486,15 @@
     },
     // 鏌ョ湅
     handleLook(row){
+      this.currentInfo = row
       // console.log(row)
       // this.title0 = '鏌ョ湅'
       // this.commonFun(row)
       this.activeName = '濉啓'
       this.componentData0.entity.totaldealId = row.id
-      this.$refs['ValueTable0'].selectList()
+      this.$nextTick(()=>{
+        this.$refs['ValueTable0'].selectList()
+      })
     },
     commonFun(row,callbanck){
       this.currentInfo = row
@@ -573,8 +587,14 @@
       link.href = url;
       link.download = row.month+' 鏍峰搧澶勭悊鐢宠琛�';
       link.click();
+    },
+    tabClick(e){
+      if(e.index==0){
+        this.currentInfo = this.$refs['ValueTable'].tableData[0]
+        this.componentData0.entity.totaldealId=''
+      }
     }
-  },
+  }
 }
 </script>
 

--
Gitblit v1.9.3