From 0fe5b8389c7025ce34a05d3920d1d6c169f9fea7 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 03 三月 2023 16:31:50 +0800
Subject: [PATCH] 1.字体引入研究2.节拍工价、工单新增控制必须设置计件单价

---
 src/views/scgl/gd.vue |   34 ++++++++++++++++++++++++++++++++--
 1 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/src/views/scgl/gd.vue b/src/views/scgl/gd.vue
index 5fb73da..854af65 100644
--- a/src/views/scgl/gd.vue
+++ b/src/views/scgl/gd.vue
@@ -610,6 +610,7 @@
               style="width: 200px;"
               placeholder="璇烽�夋嫨"
               :disabled="dialogForm.routecode===''"
+              @change="wkshopcodeChange"
             >
               <el-option
                 v-for="item in wkshopArr"
@@ -743,11 +744,21 @@
         <div class="footerButton">
           <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
           <!--          <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">棰勮</el-button>-->
+
           <el-button
+            v-if="!sumbitBottonIsDisabled"
             v-waves
             type="primary"
             :loading="$store.state.app.buttonIsDisabled"
             :disabled="$store.state.app.buttonIsDisabled"
+            @click="dialogVisibleConfirm"
+          >纭� 瀹�</el-button>
+
+          <el-button
+            v-if="sumbitBottonIsDisabled"
+            v-waves
+            type="primary"
+            disabled
             @click="dialogVisibleConfirm"
           >纭� 瀹�</el-button>
         </div>
@@ -1661,7 +1672,7 @@
   AddUpdateMesOrder,
   ClosedMesOrder,
   DeleteMesOrder, ErpOrderSearch, JobCreationSonAddVison,
-  MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep,
+  MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep, SelectRouteOrWkshop,
   SelectRouteStep
 } from '@/api/scgl'
 import { InventoryFileAssociationRoute, PartSelect, SaveInventoryFile } from '@/api/zzmx'
@@ -1906,7 +1917,8 @@
         disabledDate(time) {
           return time.getTime() < Date.now() - 8.64e7
         }
-      }
+      },
+      sumbitBottonIsDisabled: false
     }
   },
   created() {
@@ -2041,6 +2053,8 @@
       }
 
       this.dialogForm.wkshopcode = ''
+
+      this.sumbitBottonIsDisabled = false
     },
     // 宸ヨ壓璺嚎鍊兼敼鍙�
     async routecodeChange(val) {
@@ -2053,6 +2067,21 @@
       this.wkshopArr = res2
       this.dialogForm.wkshopcode = ''
     },
+    // 鐢熶骇杞﹂棿鍊兼敼鍙樻椂
+    wkshopcodeChange(val) {
+      const data = {
+        partcode: this.dialogForm.partcode,
+        routecode: this.dialogForm.routecode,
+        wkshopcode: val
+      }
+      SelectRouteOrWkshop(data).then((res) => {
+        // console.log(res, 1)
+      }).catch(err => {
+        // console.log(err, 2)
+        this.sumbitBottonIsDisabled = true
+      })
+    },
+
     // 鏄惁鎺掔▼鍊兼敼鍙樻椂
     changeIsAps(val) {
       if (val === 'N') {
@@ -2214,6 +2243,7 @@
 
       this.bomIdArr = []
       this.$refs.dialogForm.clearValidate()
+      this.sumbitBottonIsDisabled = false
     },
     // 瀵硅瘽妗嗗彇娑�
     dialogVisibleCancel() {

--
Gitblit v1.9.3