From a1917eca0b4f0fabf9f13648a840c2be8e2bf7f9 Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期三, 20 九月 2023 15:41:26 +0800
Subject: [PATCH] 	modified:   src/components/view/standard-table/target.vue 	modified:   src/components/view/standard.vue

---
 src/components/view/finishedProductInspectionAdd.vue |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/components/view/finishedProductInspectionAdd.vue b/src/components/view/finishedProductInspectionAdd.vue
index 7c2948c..b72612a 100644
--- a/src/components/view/finishedProductInspectionAdd.vue
+++ b/src/components/view/finishedProductInspectionAdd.vue
@@ -123,7 +123,7 @@
                         <el-button v-if="!scope.row.isSelectDevice" type="text" @click="clickTableSelect(scope)">{{
                             scope.row.dname == null ? "璇烽�夋嫨" : scope.row.dname
                         }}</el-button>
-                        <el-select style="width: 100%;" @change="clickNodeSure(scope.row)" v-model="filterText" placeholder="璇烽�夋嫨">
+                        <el-select  v-if="scope.row.isSelectDevice" style="width: 100%;" @change="clickNodeSure(scope.row)" v-model="filterText" placeholder="璇烽�夋嫨">
                             <el-option v-for="item in materialOptions" :key="item.id" :label="item.device" :value="item.id">
                             </el-option>
                         </el-select>
@@ -253,8 +253,8 @@
                 name: null
             }, // node鐐瑰嚮淇濆瓨褰撳墠鐐瑰嚮鏁版嵁
             clickSelectDevice: {
-                index: "", // 鐐瑰嚮閫夋嫨瀛樺偍褰撳墠琛岀储寮�
-                rpId: "" // 鐐瑰嚮閫夋嫨瀛樺偍褰撳墠琛岄」鐩甀d
+                index: null, // 鐐瑰嚮閫夋嫨瀛樺偍褰撳墠琛岀储寮�
+                rpId: null // 鐐瑰嚮閫夋嫨瀛樺偍褰撳墠琛岄」鐩甀d
             }
         };
     },
@@ -318,11 +318,21 @@
             }).then(res => {
                 this.materialOptions = res.data;
                 this.filterText = row.did
+                if(this.materialOptions.length===1){
+                    this.$message({
+                    message: '璇ラ」鐩笅鍙湁涓�涓瘯楠岃澶囷紝鏃犻渶閫夋嫨锛�',
+                    type: 'warning'
+                });
+                    return
+                }
+                row.isSelectDevice = true
             });
         },
         // 鐐瑰嚮琛ㄦ牸閫夋嫨瑙﹀彂
         clickTableSelect(scope) {
-            scope.row.isSelectDevice = true
+            if(this.clickSelectDevice.index!=null){
+                this.$set(this.inspectionItems[this.clickSelectDevice.index],'isSelectDevice',false)
+            }
             this.clickSelectDevice.index = scope.$index;
             this.clickSelectDevice.rpId = scope.row.id;
             this.getOptions(scope.row);

--
Gitblit v1.9.3