From 786c543590b010ecdcbd38062d2fd79523f6227e Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 25 十二月 2024 11:22:59 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cnas' into cnas

---
 src/components/view/a7-sample-registration.vue                    |   45 +++++++++++---
 src/components/view/a8-periodic-document-review-records.vue       |   30 ++++++++-
 src/components/view/a7-sample-disposal.vue                        |   40 ++++++++++--
 src/components/view/a8-external-document-confirmation-records.vue |   38 ++++++++++--
 4 files changed, 123 insertions(+), 30 deletions(-)

diff --git a/src/components/view/a7-sample-disposal.vue b/src/components/view/a7-sample-disposal.vue
index daec7df..b133500 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.examineState!='閫氳繃'">鏂板</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" />
@@ -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,18 @@
             id: 'handleAdd0',
             font: '淇敼',
             type: 'text',
-            method: 'handleAdd0'
+            method: 'handleAdd0',
+            disabFun: (row, index) => {
+						  return !this.addPower||this.currentInfo.examineState=='閫氳繃'
+            }
           },{
             id: 'delete',
             font: '鍒犻櫎',
             type: 'text',
-            method: 'doDiy'
+            method: 'doDiy',
+            disabFun: (row, index) => {
+						  return !this.addPower||this.currentInfo.examineState=='閫氳繃'
+            }
           }],
           tagField: {},
           selectField: {},
@@ -324,6 +330,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.examineState=='閫氳繃'
+          }
+        })
+      }
+    }
   },
   mounted() {
     this.entityCopy = this.HaveJson(this.componentData.entity);
@@ -475,6 +492,7 @@
     },
     // 鏌ョ湅
     handleLook(row){
+      this.currentInfo = row
       // console.log(row)
       // this.title0 = '鏌ョ湅'
       // this.commonFun(row)
@@ -575,8 +593,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>
 
diff --git a/src/components/view/a7-sample-registration.vue b/src/components/view/a7-sample-registration.vue
index 3c308b3..83360af 100644
--- a/src/components/view/a7-sample-registration.vue
+++ b/src/components/view/a7-sample-registration.vue
@@ -3,10 +3,10 @@
     <el-row class="title">
       <el-col :span="20" style="padding-left: 20px;text-align: left;">鏍峰搧鎺ユ敹</el-col>
     </el-row>
-    <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="componentData0.entity.totalSampleId=''">
+    <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>
-        <div class="table" style="height: calc(100% - 200px)" F>
+        <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;" v-if="addPower&&currentInfo.examineState!='閫氳繃'">鏂板</el-button>
+        <div class="table" style="height: calc(100% - 200px)" v-if="activeName=='濉啓'">
           <ValueTable ref="ValueTable0" :url="$api.processSample.pageProcessSample"
       :componentData="componentData0" :key="upIndex0" :delUrl="$api.processSample.delProcessSample" />
         </div>
@@ -29,8 +29,8 @@
             <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
           </div>
         </div>
-        <div class="table">
-          <ValueTable ref="ValueTable" v-if="activeName=='鍘嗗彶璁板綍'" :url="$api.processSample.pageProcessTotalSample"
+        <div class="table" v-if="activeName=='鍘嗗彶璁板綍'">
+          <ValueTable ref="ValueTable" :url="$api.processSample.pageProcessTotalSample"
             :componentData="componentData" :key="upIndex"/>
         </div>
       </el-tab-pane>
@@ -232,7 +232,7 @@
   name: "SampleDisposal",
   data() {
     return {
-      activeName:'濉啓',
+      activeName:'鍘嗗彶璁板綍',
       title:'鏂板',
       addDialogVisible:false,
       addLoading:false,
@@ -291,7 +291,7 @@
             type: 'text',
             method: 'handleCheck',
             disabFun: (row, index) => {
-						return row.examineState=='閫氳繃'||row.submitState=='寰呮彁浜�'
+						return row.examineState=='閫氳繃'||row.submitState=='寰呮彁浜�'||!row.submitState
             }
           }, {
             id: 'handleApproval',
@@ -299,7 +299,7 @@
             type: 'text',
             method: 'handleApproval',
             disabFun: (row, index) => {
-						return row.ratifyState=='閫氳繃'||row.submitState=='寰呮彁浜�'
+						return row.ratifyState=='閫氳繃'||row.submitState=='寰呮彁浜�'||!row.submitState
             }
           }],
           tagField: {},
@@ -325,12 +325,18 @@
             id: 'handleAdd0',
             font: '淇敼',
             type: 'text',
-            method: 'handleAdd0'
+            method: 'handleAdd0',
+            disabFun:(row, index) => {
+              return !this.addPower||this.currentInfo.examineState=='閫氳繃'
+            }
           },{
             id: 'delete',
             font: '鍒犻櫎',
             type: 'text',
-            method: 'doDiy'
+            method: 'doDiy',
+            disabFun:(row, index) => {
+              return !this.addPower||this.currentInfo.examineState=='閫氳繃'
+            }
           }],
           tagField: {},
           selectField: {},
@@ -350,6 +356,17 @@
       outPower:true,
       addPower:true,
     };
+  },
+  watch: {
+    'activeName' (val1, val2) {
+      if(val1=='濉啓'){
+        this.componentData0.do.forEach((item)=>{
+          item.disabFun = (row, index) => {
+            return !this.addPower||this.currentInfo.examineState=='閫氳繃'
+          }
+        })
+      }
+    }
   },
   mounted() {
     this.entityCopy = this.HaveJson(this.componentData.entity);
@@ -503,6 +520,7 @@
       // console.log(row)
       // this.title0 = '鏌ョ湅'
       // this.commonFun(row)
+      this.currentInfo = row
       this.activeName = '濉啓'
       this.componentData0.entity.totalSampleId = row.id
       this.$nextTick(()=>{
@@ -600,6 +618,13 @@
       link.href = url;
       link.download = row.month+' 鏍峰搧鎺ユ敹琛�';
       link.click();
+    },
+    tabClick(e){
+      console.log(e)
+      if(e.index==0){
+        this.currentInfo = this.$refs['ValueTable'].tableData[0]
+        this.componentData0.entity.totalSampleId=''
+      }
     }
   },
 }
diff --git a/src/components/view/a8-external-document-confirmation-records.vue b/src/components/view/a8-external-document-confirmation-records.vue
index 9ca85f3..8402380 100644
--- a/src/components/view/a8-external-document-confirmation-records.vue
+++ b/src/components/view/a8-external-document-confirmation-records.vue
@@ -4,17 +4,17 @@
     <el-row class="title">
       <el-col :span="20" style="padding-left: 20px;text-align: left;">澶栨潵鏂囦欢纭璁板綍</el-col>
     </el-row>
-    <el-tabs type="border-card" v-model="activeName" style="height: 100%;">
+    <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="tabClick">
       <el-tab-pane label="濉啓" name="濉啓" style="height: 100%;">
         <div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 20px;">
-          <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.ratifyUserName">鏂板</el-button>
           <el-upload :action="action" :multiple="false"
               :show-file-list="false"
           accept='.doc,.docx' :headers="headers" :on-change="beforeUpload"
-          :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
+          :on-error="onError" ref='upload' v-if="upPower&&!currentInfo.ratifyUserName" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
           <el-button size="small" type="primary" :loading="upLoading">瀵煎叆</el-button></el-upload>
         </div>
-        <div class="table" style="height: calc(100% - 200px)" v-if="activeName=='鍘嗗彶璁板綍'">
+        <div class="table" style="height: calc(100% - 200px)" v-if="activeName=='濉啓'">
           <ValueTable ref="ValueTable0" :url="$api.manageRecordTotal.pageManageRecordVerify"
       :componentData="componentData0" :key="upIndex0" :delUrl="$api.manageRecordTotal.delManageRecordVerify" :upUrl="$api.manageRecordTotal.doManageRecordVerify" />
         </div>
@@ -37,7 +37,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.manageRecordTotal.pageManageRecordTotal"
             :componentData="componentData" :key="upIndex"/>
         </div>
@@ -69,7 +69,7 @@
   data(){
     return{
       title0:'鏌ョ湅',
-      activeName:'濉啓',
+      activeName:'鍘嗗彶璁板綍',
       lookDialogVisible:false,
       noCheckLoading:false,
       checkLoading:false,
@@ -141,12 +141,18 @@
             id: 'update',
             font: '淇敼',
             type: 'text',
-            method: 'doDiy'
+            method: 'doDiy',
+            disabFun:(row, index) => {
+              return !this.addPower||!!this.currentInfo.ratifyUserName
+            }
           },{
             id: 'delete',
             font: '鍒犻櫎',
             type: 'text',
-            method: 'doDiy'
+            method: 'doDiy',
+            disabFun:(row, index) => {
+              return !this.addPower||!!this.currentInfo.ratifyUserName
+            }
           }],
           tagField: {},
           selectField: {},
@@ -174,6 +180,17 @@
     },
     action() {
       return this.javaApi +this.$api.manageRecordTotal.exportManageRecordVerify
+    }
+  },
+  watch: {
+    'activeName' (val1, val2) {
+      if(val1=='濉啓'){
+        this.componentData0.do.forEach((item)=>{
+          item.disabFun = (row, index) => {
+            return !this.addPower||!!this.currentInfo.ratifyUserName
+          }
+        })
+      }
     }
   },
   mounted() {
@@ -332,6 +349,11 @@
         this.lookDialogVisible = false
       }).catch(err=>{});
     },
+    tabClick(e){
+      if(e.index==0){
+        this.currentInfo = this.$refs['ValueTable'].tableData[0]
+      }
+    }
   }
 }
 </script>
diff --git a/src/components/view/a8-periodic-document-review-records.vue b/src/components/view/a8-periodic-document-review-records.vue
index 129b328..99c45b6 100644
--- a/src/components/view/a8-periodic-document-review-records.vue
+++ b/src/components/view/a8-periodic-document-review-records.vue
@@ -12,7 +12,7 @@
         <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower" style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
       </el-col> -->
     </el-row>
-    <el-tabs type="border-card" v-model="activeName" style="height: 100%;">
+    <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="tabClick">
       <el-tab-pane label="濉啓" name="濉啓" style="height: 100%;">
         <div class="search">
           <div class="search_thing">
@@ -32,11 +32,11 @@
             <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
           </div>
           <div class="btns">
-            <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
+            <el-button size="medium" type="primary" @click="openAdd" v-if="addPower&&!currentInfo.ratifyUserName">鏂板</el-button>
             <el-upload :action="action" :multiple="false"
               :show-file-list="false"
               accept='.doc,.docx' :headers="headers" :on-change="beforeUpload"
-              :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
+              :on-error="onError" ref='upload' v-if="upPower&&!currentInfo.ratifyUserName" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
               <el-button type="primary" size="medium">瀵煎叆</el-button></el-upload>
           </div>
         </div>
@@ -161,7 +161,7 @@
   },
   data() {
     return {
-      activeName:'濉啓',
+      activeName:'鍘嗗彶璁板綍',
       title0:'鏂板',
       addPower:true,
       outPower:true,
@@ -189,12 +189,18 @@
           font: '鍒犻櫎',
           type: 'text',
           method: 'doDiy',
+          disabFun:(row, index) => {
+            return !this.addPower||!!this.currentInfo.ratifyUserName
+          }
         }, {
           id: 'handleEdit',
           font: '淇敼',
           type: 'text',
           method: 'handleEdit',
           field:[],
+          disabFun:(row, index) => {
+            return !this.addPower||!!this.currentInfo.ratifyUserName
+          }
         }],
         tagField: {
           // documentType:{
@@ -293,6 +299,17 @@
     },
     action() {
       return this.javaApi +this.$api.manageRecordIntervals.exportInManageRecordIntervals
+    }
+  },
+  watch: {
+    'activeName' (val1, val2) {
+      if(val1=='濉啓'){
+        this.componentData.do.forEach((item)=>{
+          item.disabFun = (row, index) => {
+            return !this.addPower||!!this.currentInfo.ratifyUserName
+          }
+        })
+      }
     }
   },
   mounted() {
@@ -541,6 +558,11 @@
       this.title0 = '鎵瑰噯'
       this.commonFun(row)
     },
+    tabClick(e){
+      if(e.index==0){
+        this.currentInfo = this.$refs['ValueTable0'].tableData[0]
+      }
+    }
   }
 }
 </script>

--
Gitblit v1.9.3