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/styles/font.ttf     |    0 
 src/views/scgl/gd.vue   |   34 ++++++++++++++++-
 src/views/zzmx/jpgj.vue |    4 ++
 src/views/xtsz/mmxg.vue |   14 ++++---
 src/api/scgl.js         |    9 ++++
 src/styles/font.css     |    8 ++++
 src/views/bbgl/rygz.vue |    2 
 7 files changed, 62 insertions(+), 9 deletions(-)

diff --git a/src/api/scgl.js b/src/api/scgl.js
index 0e7c63a..b9f5d23 100644
--- a/src/api/scgl.js
+++ b/src/api/scgl.js
@@ -375,3 +375,12 @@
     params: data
   })
 }
+
+// 宸ュ崟娲惧彂閫夋嫨宸ヨ壓璺嚎鎴栭�夋嫨鐢熶骇杞﹂棿鏃跺垽鏂粦瀹氭潯浠�
+export function SelectRouteOrWkshop(data) {
+  return request({
+    url: 'ProductionManagement/SelectRouteOrWkshop',
+    method: 'get',
+    params: data
+  })
+}
diff --git a/src/styles/font.css b/src/styles/font.css
new file mode 100644
index 0000000..3011cd2
--- /dev/null
+++ b/src/styles/font.css
@@ -0,0 +1,8 @@
+@font-face {
+  /*閲嶅懡鍚嶅瓧浣撳悕*/
+  font-family: 'font';
+  /*寮曞叆瀛椾綋*/
+  src: url('font.ttf');
+  font-weight: normal;
+  font-style: normal;
+}
diff --git a/src/styles/font.ttf b/src/styles/font.ttf
new file mode 100644
index 0000000..67b0f5b
--- /dev/null
+++ b/src/styles/font.ttf
Binary files differ
diff --git a/src/views/bbgl/rygz.vue b/src/views/bbgl/rygz.vue
index 79a8ad6..230199d 100644
--- a/src/views/bbgl/rygz.vue
+++ b/src/views/bbgl/rygz.vue
@@ -199,7 +199,7 @@
               </el-table-column>
               <el-table-column
                 prop="ratio"
-                label="宸ュ簭鍗曚环"
+                label="鍒嗛厤姣斾緥"
                 width="110"
                 sortable="custom"
               >
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() {
diff --git a/src/views/xtsz/mmxg.vue b/src/views/xtsz/mmxg.vue
index 5d13ad7..489af77 100644
--- a/src/views/xtsz/mmxg.vue
+++ b/src/views/xtsz/mmxg.vue
@@ -231,7 +231,7 @@
 <!--import elDragDialog from '@/directive/el-drag-dialog'-->
 <!--import waves from '@/directive/waves'-->
 <!--import TableColumnSettings from '@/components/TableColumnSettings'-->
-
+<!--import '../../styles/font.css'-->
 <!--export default {-->
 <!--  name: 'Zzjg',-->
 <!--  components: {-->
@@ -429,7 +429,7 @@
 <!--        // background: '#a7a7a7', padding: '0'-->
 <!--        background: '#f8f8fa',-->
 <!--        padding: '10px 0',-->
-<!--        // fontFamily: 'SimHei',-->
+<!--        fontFamily: 'font',-->
 <!--        // margin: '3px 0',-->
 <!--        color: '#bfc3c8',-->
 <!--        fontWeight: 600-->
@@ -442,14 +442,16 @@
 
 <!--    cellStyle() {-->
 <!--      const option = {-->
-<!--        // fontFamily: 'SimHei',-->
+<!--        fontFamily: 'font',-->
 <!--        // padding: '5px 0'-->
 <!--        // fontFamily: 'sans-serif',-->
 <!--        // fontFamily: 'Rubber cover glass BL-04',-->
-<!--        // fontWeight: 'bold',-->
-<!--        // fontWeight: 550,-->
+<!--        // fontWeight: 'normal',-->
+<!--        fontWeight: 500,-->
 
-<!--        color: '#706f6f'-->
+<!--        // color: '#706f6f'-->
+
+<!--        color: '#29262e'-->
 <!--        // color: `rgb(51, 54, 57)`-->
 
 <!--      }-->
diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index a3d51ed..ac6f28c 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -711,6 +711,10 @@
     },
     // 淇濆瓨琛�
     async saveRow(row) {
+      if (parseFloat(row.unprice) <= 0) {
+        return this.$message.info('璁′欢鍗曚环蹇呴』澶т簬闆讹紒')
+      }
+
       const data = {
         partcode: this.eqpTable.partcode, //  浜у搧缂栫爜
         routecode: this.eqpTable.routecode, //  宸ヨ壓璺嚎缂栫爜

--
Gitblit v1.9.3