From 37b9050ec94b02b4c197fd2bb508bb9857cc56a1 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 26 十一月 2022 11:24:39 +0800
Subject: [PATCH] 1.自动排程代码优化

---
 src/views/scgl/cngh.vue |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/src/views/scgl/cngh.vue b/src/views/scgl/cngh.vue
index 5fdc9cf..8e49ea7 100644
--- a/src/views/scgl/cngh.vue
+++ b/src/views/scgl/cngh.vue
@@ -13,12 +13,13 @@
           inline
           style="display: flex;justify-content: space-between"
         >
-          <div class="elForm" style="justify-content: flex-start">
+          <div class="elForm">
             <el-form-item label-width="70px" label="鐢熶骇杞﹂棿" style=" display: flex;">
               <el-select
                 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>
@@ -123,7 +125,9 @@
             min-width="300"
           >
             <template slot-scope="{row}">
+              <el-input v-if="row.CaptPlanWorkShift===null" :disabled="row.CaptPlanWorkShift===null" />
               <date-picker
+                v-else
                 v-model="row.CaptPlanShopCalendarList"
                 :row-data="row"
                 style="width: 100%;"
@@ -201,6 +205,7 @@
           highlight-current-row
           :header-cell-style="this.$headerCellStyle"
           :cell-style="this.$cellStyle"
+          @row-click="rowClick"
         >
 
           <el-table-column
@@ -212,8 +217,9 @@
                 v-model="radioSelectedCode"
                 :label="row.code"
                 style="padding-left: 10px;"
-                @change.native="getCurrentRowSource(row.code)"
               />
+              <!--              @change.native="getCurrentRowSource(row.code)"-->
+
             </template>
           </el-table-column>
           <el-table-column
@@ -602,6 +608,7 @@
 } from '@/api/scgl'
 import { DeviceTypeSelect, WorkShopSelect } from '@/api/sbgl'
 import { handleDatetime3 } from '@/utils/global'
+import { WhkspIsEqpSearch } from '@/api/jcsz'
 
 export default {
   name: 'Zzjg',
@@ -656,6 +663,10 @@
     this.getHeight()
   },
   methods: {
+    // 琛岀偣鍑讳簨浠�
+    rowClick(row, event, column) {
+      this.radioSelectedCode = row.code
+    },
     // 瀛愮粍浠跺け鐒︽椂鎵ц
     over(val) {
       if (val) {
@@ -824,7 +835,7 @@
       this.getCapacityPlanningSearch().then(res => {
         if (res.code === '200') {
           this.getWorkShopSelect()
-          this.getDeviceTypeSelect()
+          // this.getDeviceTypeSelect()
         }
       })
     },
@@ -842,8 +853,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