From 949701537db93e3b43169e3a15f7caf6cbb3c9ef Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 21 三月 2023 16:25:14 +0800
Subject: [PATCH] 1.节拍工价优化

---
 src/views/zzmx/jpgj.vue |   32 +++++++++++++++++++++++++++-----
 1 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index 7746c24..a3070af 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -88,7 +88,10 @@
               </el-select>
             </el-form-item>
           </div>
-          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}">
+          <div
+            class="bodySearchReset"
+            :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"
+          >
             <el-button v-waves type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
             <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
           </div>
@@ -223,7 +226,11 @@
             <template slot-scope="{row}">
               <div class="operationClass">
                 <el-tooltip class="item" effect="dark" content="缂栬緫" placement="top">
-                  <i :style="{color:$store.state.settings.theme}" class="el-icon-edit-outline" @click="edit('edit',row)" />
+                  <i
+                    :style="{color:$store.state.settings.theme}"
+                    class="el-icon-edit-outline"
+                    @click="edit('edit',row)"
+                  />
                 </el-tooltip>
                 <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
                   <i :style="{color:$store.state.settings.theme}" class="el-icon-delete" @click="del(row)" />
@@ -312,7 +319,11 @@
       </el-form>
       <div style="display: flex;flex-direction: column;margin-bottom: 20px">
         <div>
-          <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" style="margin: -20px 10px 20px 0;" />宸ュ簭闆嗗悎
+          <i
+            class="el-icon-s-operation"
+            :style="{color:$store.state.settings.theme}"
+            style="margin: -20px 10px 20px 0;"
+          />宸ュ簭闆嗗悎
         </div>
         <div style="display: flex;background-color: #F2F6FC;padding:20px 0  20px 20px; min-height: 100px">
           <el-radio-group v-model="dialogForm.stepcode" @change="radioChange">
@@ -329,7 +340,11 @@
 
       <div style="display: flex;flex-direction: column;min-height: 300px">
         <div>
-          <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" style="margin: -20px 10px 20px 0" />璁惧鍒楄〃
+          <i
+            class="el-icon-s-operation"
+            :style="{color:$store.state.settings.theme}"
+            style="margin: -20px 10px 20px 0"
+          />璁惧鍒楄〃
         </div>
 
         <el-table
@@ -695,7 +710,7 @@
         this.eqpTable.partcode = this.dialogForm.partcode
         this.eqpTable.routecode = this.dialogForm.routecode
         this.eqpTable.stepcode = this.stepDialogArr.find(item => item.name === val).code
-      // } else if (typeof val === 'number') {
+        // } else if (typeof val === 'number') {
       } else {
         this.eqpTable.steptype = this.stepDialogArr[0].flag
         this.eqpTable.partcode = this.dialogForm.partcode
@@ -715,6 +730,13 @@
     },
     // 淇濆瓨琛�
     async saveRow(row) {
+      if (parseFloat(row.eqp_value) > 0 && parseFloat(row.cavity_qty) === 0) {
+        return this.$message.info('鑵斿瀷鏁板繀椤诲ぇ浜庨浂锛�')
+      }
+      if (parseFloat(row.eqp_value) === 0 && parseFloat(row.cavity_qty) > 0) {
+        return this.$message.info('鐢熶骇鑺傛媿蹇呴』澶т簬闆讹紒')
+      }
+
       if (parseFloat(row.unprice) <= 0 && this.eqpTable.steptype !== 'W') {
         return this.$message.info('璁′欢鍗曚环蹇呴』澶т簬闆讹紒')
       }

--
Gitblit v1.9.3