From d7b4cbde92aa4a6f6e68ae755f1c04477ca2127d Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期三, 31 七月 2024 17:57:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/components/do/b1-ins-order/add.vue                 |   31 ++++++++++++++++++++++++++++---
 src/components/do/b1-inspect-order-plan/Inspection.vue |   24 ++++++++++++++++++++----
 src/assets/api/controller.js                           |    1 +
 3 files changed, 49 insertions(+), 7 deletions(-)

diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js
index 13eb73a..04cf0e3 100644
--- a/src/assets/api/controller.js
+++ b/src/assets/api/controller.js
@@ -156,6 +156,7 @@
   dataCollection: "/deviceScope/dataCollection", // 鏁伴噰-鏁版嵁閲囬泦
   treeDevice: "/deviceScope/treeDevice", // 璁惧鏍戝舰
   temDataAcquisition: "/deviceScope/temDataAcquisition", // PK8000鏁伴噰
+  temDataAcquisition2: "/deviceScope/temDataAcquisition2", // PK8000鏁伴噰--澶氭潯
 }
 
 const insOrder = {
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index efadf12..328cd5b 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -164,7 +164,8 @@
         </el-col>
       </el-row>
     </div>
-    <div class="search" v-show="!configShow&&!equipConfigShow&&!cableConfigShow">
+    <div style="height: (100vh - 200px);">
+      <div class="search" v-show="!configShow&&!equipConfigShow&&!cableConfigShow">
       <el-row>
         <el-col class="search_thing" :span="6">
           <div class="search_label">濮旀墭缂栧彿锛�</div>
@@ -511,6 +512,7 @@
           </template>
         </el-table-column>
       </el-table>
+    </div>
     </div>
     <el-dialog title="閫夋嫨鍗曚綅" :visible.sync="selectUserDia" width="70%">
       <div class="body" style="height: 60vh;" v-if="selectUserDia">
@@ -1363,6 +1365,14 @@
           this.temperatureData = this.temperatureData.slice(0,-deleteNum)
         }
       },
+      changeProductList0(){
+        this.productList0.forEach(a=>{
+          let obj = this.productList.find(m => m.id == a.id)
+          if(obj){
+            a.state = obj.state
+          }
+        })
+      },
       searchFilterList () {
         const vtw = {
           inspectionItem: this.inspectionItem, // 妫�楠岄」
@@ -1372,6 +1382,7 @@
         const isHaveValue = Object.values(vtw).some(item => {
           return item
         })
+        this.changeProductList0()
         if (isHaveValue) {
           for(let i in vtw) {
             if (vtw[i]) {
@@ -1380,9 +1391,19 @@
               })
             }
           }
+          this.$nextTick(()=>{
+            this.productList.forEach(a => {
+              if (a.state == 1) this.toggleSelection(a)
+            })
+          })
         } else {
           // 娌℃湁鏌ヨ鏉′欢鏃舵覆鏌撴墍鏈夋暟鎹�
           this.productList = this.productList0
+          this.$nextTick(()=>{
+            this.productList.forEach(a => {
+              if (a.state == 1) this.toggleSelection(a)
+            })
+          })
         }
       },
       getAuthorizedPerson() {
@@ -2134,7 +2155,7 @@
           return item
         })
         const select = this.selectTree.split(' - ')
-        if (row.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && row.state === 1) {
+        if (row.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && row.state === 1&&this.isAskOnlyRead) {
           this.circulateShow = true;
           return
         } else if (row.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && row.state === 0) {
@@ -2150,6 +2171,8 @@
         } else if ((row.inspectionItem === '娓╁崌璇曢獙' || row.inspectionItem === '鐑惊鐜�') && row.state === 0) {
           this.temperatureShow = false;
         }
+        this.changeProductList0()
+        this.currentMethod.insProduct = this.productList0
         this.getProNum()
       },
       searchProject () {
@@ -2437,7 +2460,7 @@
             return
           }
           const select = this.selectTree.split(' - ')
-          if (p.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && p.state === 1) {
+          if (p.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && p.state === 1&&this.isAskOnlyRead) {
             this.circulateShow = true;
             return
           } else if (p.inspectionItem === '娓╁害寰幆' && select[2] === '鍏夌紗' && p.state === 0) {
@@ -2482,6 +2505,8 @@
             return item
           })
         }
+        this.changeProductList0()
+        this.currentMethod.insProduct = this.productList0
         this.getProNum()
         this.$nextTick(() => {
           this.$refs.productTable.doLayout()
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 003f684..de39416 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -318,7 +318,7 @@
             </el-form-item>
           </el-form>
           <el-button type="primary" size="small" v-if="(dataAcquisitionEidt>0||tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='娓╁害寰幆妫�楠屽師濮嬭褰�'&&temDataAcquisition)&&PROJECT=='妫�娴嬩腑蹇�'&&state==1" @click="getDataAcquisitionDevice" :loading="dataAcquisitionLoading">鏁版嵁閲囬泦</el-button>
-          <el-button :type="dataAcquisitionEidtAble?'':'primary'" size="small" v-if="(dataAcquisitionEidt>0)&&PROJECT=='妫�娴嬩腑蹇�'&&collected&&state==1" @click="dataAcquisitionEidtAble=!dataAcquisitionEidtAble">{{dataAcquisitionEidtAble?'鍏抽棴缂栬緫':'缂栬緫鏁伴噰'}}</el-button>
+          <el-button :type="dataAcquisitionEidtAble?'':'primary'" size="small" v-if="(dataAcquisitionEidt>0||(tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='娓╁害寰幆妫�楠屽師濮嬭褰�'))&&PROJECT=='妫�娴嬩腑蹇�'&&collected&&state==1" @click="dataAcquisitionEidtAble=!dataAcquisitionEidtAble">{{dataAcquisitionEidtAble?'鍏抽棴缂栬緫':'缂栬緫鏁伴噰'}}</el-button>
         </div>
       </div>
       <div class="center-box" id="nav" v-loading="tableLoading" v-if="!tableLists.find(m=>m.templateId==currentTable)||(tableLists.find(m=>m.templateId==currentTable).templateName!='娓╁害寰幆妫�楠屽師濮嬭褰�'&&!tableLists.find(m=>m.templateId==currentTable).templateName.includes('鐑惊鐜�')&&!tableLists.find(m=>m.templateId==currentTable).templateName.includes('娓╁崌璇曢獙'))">
@@ -537,7 +537,7 @@
                 {{ '澶栫'+(index+1) }}
               </template>
               <template slot-scope="scope">
-                <el-input size="small" v-model="scope.row.arr[index].value0" placeholder="" :disabled="state>1" @change="m=>changeItem(scope.row.arr[index])"></el-input>
+                <el-input size="small" v-model="scope.row.arr[index].value0" placeholder="" :disabled="state>1||!dataAcquisitionEidtAble" @change="m=>changeItem(scope.row.arr[index])"></el-input>
               </template>
             </el-table-column>
             <el-table-column
@@ -549,7 +549,7 @@
                 {{ '鍐呯'+(index+1) }}
               </template>
               <template slot-scope="scope">
-                <el-input size="small" :disabled="state>1" v-model="scope.row.arr[index].value1" placeholder="" @change="m=>changeItem(scope.row.arr[index])"></el-input>
+                <el-input size="small" :disabled="state>1||!dataAcquisitionEidtAble"  v-model="scope.row.arr[index].value1" placeholder="" @change="m=>changeItem(scope.row.arr[index])"></el-input>
               </template>
             </el-table-column>
             <el-table-column
@@ -2028,7 +2028,21 @@
               label:m
             })
           })
-          this.wareFormChange()
+          this.wareTableDataLoading = true
+          this.$axios.post(this.$api.deviceScope.temDataAcquisition2,{
+            entrustCode:this.insOrder.entrustCode,
+            sampleCode:this.currentSample.sampleCode,
+            model:this.currentSample.model,
+            }, {
+            headers: {
+              'Content-Type': 'application/json'
+            },
+            noQs:true
+          }).then(res=>{
+            // console.log(res.data)
+            this.wareFormChange()
+          })
+          // this.wareFormChange()
         }
         // 娓╁害寰幆妫�楠屽師濮嬭褰�---缁撴潫
         // 鐑惊鐜楠屽師濮嬭褰�---寮�濮�
@@ -2694,6 +2708,8 @@
       getUserInfo() {
         this.$axios.get(this.$api.user.getUserInfo).then(res => {
           this.userId = res.data.id
+          this.componentData.entity.userId = res.data.id
+          console.log(1111,this.userId)
         })
       },
       // 澶嶆牳

--
Gitblit v1.9.3