From 5b23c2562004da7d6c06c42447a20dbd2f097672 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 03 三月 2023 16:33:41 +0800
Subject: [PATCH] 1.节拍工价、工单新增控制必须设置计件单价

---
 src/views/zzmx/jpgj.vue |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index 2137b81..2656b6a 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -124,14 +124,14 @@
           />
           <el-table-column
             prop="partcode"
-            min-width="160"
+            min-width="120"
             label="浜у搧缂栫爜"
             sortable="custom"
           />
           <el-table-column
             prop="partname"
             label="浜у搧鍚嶇О"
-            min-width="160"
+            min-width="200"
             sortable="custom"
           />
           <el-table-column
@@ -262,7 +262,7 @@
               <el-option
                 v-for="item in partArr2"
                 :key="item.partcode"
-                :label="item.partname"
+                :label="item.partname + ' / '+ item.partcode"
                 :value="item.partcode"
               />
             </el-select>
@@ -304,11 +304,13 @@
         <div>
           <i class="el-icon-s-operation" style="color:#42b983;margin: -20px 10px 20px 0" />宸ュ簭闆嗗悎
         </div>
-        <div style="display: flex;background-color: #F2F6FC;padding:20px 0  20px 20px; min-height: 100px">
+
+        <div style="display: flex;background-color: #F2F6FC;padding:10px; min-height: 100px">
           <el-radio-group v-model="dialogForm.stepcode" @change="radioChange">
             <el-radio
-              v-for="item in stepDialogArr"
+              v-for="(item,index) in stepDialogArr"
               :key="item.code"
+              :style="{marginLeft:index%7===0?0:'10px',marginBottom:'10px'}"
               :label="item.name"
               border
             />
@@ -431,10 +433,10 @@
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <el-button v-show="row.isVisible===1" type="text" @click="saveRow(row)">淇濆瓨</el-button>
-                <el-button v-show="row.isVisible===1" type="text" @click="cancelRow(row)">鍙栨秷</el-button>
-                <el-button v-show="row.isVisible===0" type="text" @click="editRow(row)">缂栬緫</el-button>
-                <el-button v-show="row.isVisible===0" type="text" @click="copyRow(row)">澶嶅埗</el-button>
+                <el-button v-if="row.isVisible===1" type="text" @click="saveRow(row)">淇濆瓨</el-button>
+                <el-button v-if="row.isVisible===1" type="text" @click="cancelRow(row)">鍙栨秷</el-button>
+                <el-button v-if="row.isVisible===0" type="text" @click="editRow(row)">缂栬緫</el-button>
+                <el-button v-if="row.isVisible===0" type="text" @click="copyRow(row)">澶嶅埗</el-button>
               </div>
             </template>
           </el-table-column>
@@ -694,6 +696,9 @@
     },
     // 淇濆瓨琛�
     async saveRow(row) {
+      if (parseFloat(row.unprice) <= 0) {
+        return this.$message.info('璁′欢鍗曚环蹇呴』澶т簬闆讹紒')
+      }
       const data = {
         partcode: this.eqpTable.partcode, //  浜у搧缂栫爜
         routecode: this.eqpTable.routecode, //  宸ヨ壓璺嚎缂栫爜
@@ -717,6 +722,8 @@
     // 鍙栨秷琛�
     cancelRow(row) {
       this.getEqpTable()
+      this.radioChange(this.radioChangeTempValue)
+      this.dialogForm.stepcode = this.radioChangeTempValue
       this.isEqpTableEdit = true
     },
     // 缂栬緫琛�

--
Gitblit v1.9.3