From 0be0bfa942d0834288d95eb0a0b222cff834b693 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 10 十月 2023 10:52:27 +0800
Subject: [PATCH] 1.MES工单新增  工价管控

---
 vue.config.js                          |    2 +-
 src/views/produceManager/workOrder.vue |   50 ++++++++++++++++++++++++++++++++------------------
 2 files changed, 33 insertions(+), 19 deletions(-)

diff --git a/src/views/produceManager/workOrder.vue b/src/views/produceManager/workOrder.vue
index 3e881ca..4397316 100644
--- a/src/views/produceManager/workOrder.vue
+++ b/src/views/produceManager/workOrder.vue
@@ -662,7 +662,14 @@
             />
           </el-select>
         </el-form-item>
-
+        <el-form-item label="宸ヤ环绠℃帶" required>
+          <el-switch
+            v-model="dialogForm.is_steprice"
+            active-color="#13ce66"
+            inactive-color="#eee"
+            @change="routecodeChange"
+          />
+        </el-form-item>
         <!--        <el-form-item label="鏄惁鎺掔▼" prop="isAps">-->
         <!--          <el-radio-group v-model="dialogForm.isAps" style="width:200px" @change="changeIsAps">-->
         <!--            <el-radio key="Y" label="Y" value="Y">鏄�</el-radio>-->
@@ -726,7 +733,7 @@
         <!--        </el-form-item>-->
 
       </el-form>
-      <div style="display: flex;justify-content: flex-end">
+      <div style="display: flex;justify-content: flex-end;margin-top: -50px;">
         {{ routeStepArr }}
       </div>
 
@@ -2072,6 +2079,9 @@
         mesqty: '', // 宸ュ崟鏁伴噺
 
         routecode: '', // 宸ヨ壓璺嚎缂栫爜
+
+        is_steprice: false, // 鏄惁宸ヤ环绠$悊
+
         wkshopcode: '', // 鐢熶骇杞﹂棿缂栫爜
         planstartdate: '', // 璁″垝寮�濮嬫椂闂�
         planenddate: '', // 璁″垝瀹屾垚鏃堕棿
@@ -2410,24 +2420,27 @@
     },
     // 宸ヨ壓璺嚎鍊兼敼鍙�
     async routecodeChange() {
-      const data = {
-        partcode: this.dialogForm.partcode,
-        routecode: this.dialogForm.routecode,
-        wkshopcode: this.dialogForm.wkshopcode
-      }
-      await SelectRouteOrWkshop(data).then((res) => {
-        console.log(res, 1)
+      if (this.dialogForm.routecode) {
+        const data = {
+          partcode: this.dialogForm.partcode,
+          routecode: this.dialogForm.routecode,
+          wkshopcode: this.dialogForm.wkshopcode,
+          is_steprice: this.dialogForm.is_steprice ? 'Y' : 'N'
+        }
+        await SelectRouteOrWkshop(data).then((res) => {
+          console.log(res, 1)
 
-        SelectRouteStep({ routecode: this.dialogForm.routecode }).then(res2 => {
-          console.log(res2)
-          this.routeStepArr = res2.data.map(i => i.stepname).join('锛�')
+          SelectRouteStep({ routecode: this.dialogForm.routecode }).then(res2 => {
+            console.log(res2)
+            this.routeStepArr = res2.data.map(i => i.stepname).join('锛�')
+          })
+
+          this.submitButtonIsDisabled = false
+        }).catch(err => {
+          // console.log(err, 2)
+          this.submitButtonIsDisabled = true
         })
-
-        this.submitButtonIsDisabled = false
-      }).catch(err => {
-        // console.log(err, 2)
-        this.submitButtonIsDisabled = true
-      })
+      }
     },
     // 鐢熶骇杞﹂棿鍊兼敼鍙樻椂
     async  wkshopcodeChange(wkshopcode, partcode) {
@@ -2612,6 +2625,7 @@
 
       this.dialogForm.routecode = '' // 宸ヨ壓璺嚎缂栫爜
       this.dialogForm.wkshopcode = '' // 鐢熶骇杞﹂棿缂栫爜
+      this.dialogForm.is_steprice = false// 鏄惁宸ヤ环绠$悊
       this.dialogForm.planstartdate = '' // 璁″垝寮�濮嬫椂闂�
       this.dialogForm.planenddate = '' // 璁″垝瀹屾垚鏃堕棿
       this.dialogForm.orderlev = '' // 宸ュ崟绛夌骇
diff --git a/vue.config.js b/vue.config.js
index b13bc3b..e579143 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -53,7 +53,7 @@
     proxy: {
       [process.env.VUE_APP_BASE_API]: {
         // target: 'http://121.196.36.24:8017', // 璇锋眰鐨勭涓夆絽鎺モ紳鍦板潃       鏈湴寮�鍙戞湇鍔″櫒
-        target: 'http://192.168.94.178:8001', // 璇锋眰鐨勭涓夆絽鎺モ紳鍦板潃       瀹㈡埛鏈嶅姟鍣�
+        target: 'http://192.168.94.59:8001', // 璇锋眰鐨勭涓夆絽鎺モ紳鍦板潃       瀹㈡埛鏈嶅姟鍣�
         changeOrigin: true, // 璇锋眰璺ㄥ煙鏃讹紝闇� 閰嶇疆姝ら」
         pathRewrite: { // 璺緞閲嶅啓,鏇挎崲target涓殑璇锋眰鍦板潃
           ['^' + process.env.VUE_APP_BASE_API]: '/api/'

--
Gitblit v1.9.3