From d71436544198b7b051115662fc9cf4b12ce0cda3 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 19 七月 2022 18:32:40 +0800
Subject: [PATCH] 1.修改bug

---
 src/views/zzmx/jpgj.vue |   40 +++++++++++++++++++++-------------------
 1 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index 5f98a55..e685e1c 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -13,11 +13,14 @@
             <el-form-item label="浜у搧鍚嶇О" style=" display: flex;">
               <el-select
                 v-model="form.partcode"
+                filterable
                 :popper-append-to-body="false"
                 style="width: 200px"
                 placeholder="璇烽�夋嫨"
+
                 @change="partChange"
               >
+                <!--                @focus="getPartSelect"-->
                 <el-option
                   v-for="item in partArr"
                   :key="item.partcode"
@@ -29,6 +32,7 @@
             <el-form-item label="宸ヨ壓璺嚎" style=" display: flex;">
               <el-select
                 v-model="form.routecode"
+                filterable
                 :disabled="form.partcode===''"
                 :popper-append-to-body="false"
                 style="width: 200px"
@@ -63,6 +67,7 @@
             <el-form-item label="鍏宠仈璁惧" style=" display: flex;">
               <el-select
                 v-model="form.eqpcode"
+                filterable
                 :disabled="form.stepcode===''"
                 :popper-append-to-body="false"
                 style="width: 200px"
@@ -213,13 +218,16 @@
             <el-select
               v-show="operation==='add'"
               v-model="dialogForm.partcode"
+              filterable
               style="width: 220px"
               placeholder="璇烽�夋嫨"
               :popper-append-to-body="false"
+
               @change="partDialogChange"
             >
+              <!--              @focus="getPartSelect2"-->
               <el-option
-                v-for="item in partArr"
+                v-for="item in partArr2"
                 :key="item.partcode"
                 :label="item.partname"
                 :value="item.partcode"
@@ -237,6 +245,7 @@
               v-show="operation==='add'"
               v-model="dialogForm.routecode"
               style="width: 220px"
+              filterable
               :disabled="dialogForm.partcode===''"
               placeholder="璇烽�夋嫨"
               :popper-append-to-body="false"
@@ -465,6 +474,7 @@
         rows: 20 // 姣忛〉澶氬皯鏉�
       },
       partArr: [], // 浜у搧闆嗗悎
+      partArr2: [], // 浜у搧闆嗗悎瀵硅瘽妗�
       routeArr: [], // 浜у搧闆嗗悎
       stepArr: [], // 浜у搧闆嗗悎
       eqpArr: [], // 浜у搧闆嗗悎
@@ -552,6 +562,10 @@
       const { data: res } = await PartSelect()
       this.partArr = res
     },
+    async getPartSelect2() {
+      const { data: res } = await PartSelect()
+      this.partArr2 = res
+    },
     async partChange(val) {
       const { data: res } = await PartSelectRpute({ partcode: val })
       this.routeArr = res
@@ -580,27 +594,18 @@
     },
     async partDialogChange(val) {
       const { data: res } = await PartSelectRpute({ partcode: val })
-      console.log(this.routeDialogArr = res, 888)
+      this.routeDialogArr = res
       this.stepDialogArr = []
       this.eqpDialogArr = []
     },
     async routeDialogChange(val) {
       const { data: res } = await RouteSelectStep({ routecode: val })
       this.stepDialogArr = res
-      // this.stepDialogArr = [
-      //   { code: '1001', name: '娴嬭瘯宸ュ簭1' },
-      //   { code: '1002', name: '娴嬭瘯宸ュ簭2' },
-      //   { code: '1003', name: '娴嬭瘯宸ュ簭3' },
-      //   { code: '1004', name: '娴嬭瘯宸ュ簭4' },
-      //   { code: '1005', name: '娴嬭瘯宸ュ簭5' },
-      //   { code: '1006', name: '娴嬭瘯宸ュ簭6' },
-      //   { code: '1007', name: '娴嬭瘯宸ュ簭7' },
-      //   { code: '1008', name: '娴嬭瘯宸ュ簭8' },
-      //   { code: '1009', name: '娴嬭瘯宸ュ簭9' }
-      // ]
       this.eqpDialogArr = []
     },
     radioChange(val) {
+      this.isEqpTableEdit = true
+
       // this.dialogForm.stepcode = this.stepDialogArr.find(item => item.name === val).code
       this.getEqpTable(val)
     },
@@ -648,7 +653,7 @@
         cavity_qty: row.cavity_qty, // 鍨嬭厰鏁�
         unprice: row.unprice//  璁′欢鍗曚环
       }
-      console.log(data, 7)
+
       // row.isVisible = 0
       const res = await SaveBeatRate(data)
       if (res.code === '200') {
@@ -673,7 +678,6 @@
     },
     // 澶嶅埗琛�
     async  copyRow(row) {
-      console.log(row)
       let currentData = {}// 褰撳墠琛屽璞�
       let nextData = {}// 涓嬩竴琛屽璞�
       if (row.RowNum === this.eqpDialogArr.length) {
@@ -686,8 +690,6 @@
           }
         })
       }
-      console.log(currentData, 2)
-      console.log(nextData, 3)
       const newData = {
         partcode: this.eqpTable.partcode, //  浜у搧缂栫爜
         routecode: this.eqpTable.routecode, //  宸ヨ壓璺嚎缂栫爜
@@ -699,7 +701,7 @@
         cavity_qty: currentData.cavity_qty, // 鍨嬭厰鏁�
         unprice: currentData.unprice//  璁′欢鍗曚环
       }
-      console.log(newData, 4)
+
       const res = await SaveBeatRate(newData)
       if (res.code === '200') {
         this.$message.success('澶嶅埗鎴愬姛锛�')
@@ -726,12 +728,12 @@
     add(operation) {
       this.operation = operation
       this.dialogVisible = true
+      this.getPartSelect2()
     },
     // 淇敼鎸夐挳
     async  edit(operation, row) {
       this.operation = operation
       this.dialogVisible = true
-      console.log(row)
 
       this.editPartName = row.partname
       this.editRouteName = row.route_name

--
Gitblit v1.9.3