From f5c448839b8984ef38ea7fa810633d14955a4d92 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 03 十一月 2022 16:53:09 +0800
Subject: [PATCH] 1.安灯报表报表开发完成

---
 src/views/scgl/cngh.vue |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/views/scgl/cngh.vue b/src/views/scgl/cngh.vue
index 5fdc9cf..04964ae 100644
--- a/src/views/scgl/cngh.vue
+++ b/src/views/scgl/cngh.vue
@@ -19,6 +19,7 @@
                 v-model="form.workshop"
                 style="width: 200px"
                 placeholder="璇烽�夋嫨"
+                @change="getWhkspIsEqpSearch"
               >
                 <el-option
                   v-for="item in workshopArr"
@@ -33,12 +34,13 @@
                 v-model="form.devicetype"
                 style="width: 200px"
                 placeholder="璇烽�夋嫨"
+                :disabled="form.workshop===''"
               >
                 <el-option
                   v-for="item in devicetypeArr"
-                  :key="item.code"
-                  :label="item.name"
-                  :value="item.code"
+                  :key="item.eqp_code"
+                  :label="item.eqp_name"
+                  :value="item.eqp_code"
                 />
               </el-select>
             </el-form-item>
@@ -602,6 +604,7 @@
 } from '@/api/scgl'
 import { DeviceTypeSelect, WorkShopSelect } from '@/api/sbgl'
 import { handleDatetime3 } from '@/utils/global'
+import { WhkspIsEqpSearch } from '@/api/jcsz'
 
 export default {
   name: 'Zzjg',
@@ -824,7 +827,7 @@
       this.getCapacityPlanningSearch().then(res => {
         if (res.code === '200') {
           this.getWorkShopSelect()
-          this.getDeviceTypeSelect()
+          // this.getDeviceTypeSelect()
         }
       })
     },
@@ -842,8 +845,13 @@
       const { data: res } = await WorkShopSelect()
       this.workshopArr = res
     },
-    async getDeviceTypeSelect() {
-      const { data: res } = await DeviceTypeSelect()
+    // async getDeviceTypeSelect() {
+    //   const { data: res } = await DeviceTypeSelect()
+    //   this.devicetypeArr = res
+    // },
+    async  getWhkspIsEqpSearch(val) {
+      this.form.devicetype = ''
+      const { data: res } = await WhkspIsEqpSearch({ wkshpcode: val })
       this.devicetypeArr = res
     },
     mrfaSearch(row, operation) {

--
Gitblit v1.9.3