From 31ce9a56c95000f1567cda9f5821aadb5d1e4fd0 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 30 八月 2023 16:25:02 +0800
Subject: [PATCH] 1.递交

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

diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index 538c1c2..617d120 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -88,7 +88,9 @@
               </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,10 +225,12 @@
             <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)" />
+                  <i :style="{color:$store.state.settings.theme}" class="el-icon-delete" @click="del(row)"/>
                 </el-tooltip>
               </div>
             </template>
@@ -257,7 +261,7 @@
     >
       <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
         <div style="display: flex;align-items: center">
-          <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" style="margin-top: -20px" />
+          <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" style="margin-top: -20px"/>
           <el-form-item prop="partcode" label="浜у搧鍚嶇О">
             <el-select
               v-show="operation==='add'"
@@ -272,7 +276,7 @@
               <el-option
                 v-for="item in partArr2"
                 :key="item.partcode"
-                :label="item.partname"
+                :label="item.partname+'/'+item.partcode"
                 :value="item.partcode"
               />
             </el-select>
@@ -312,7 +316,9 @@
       </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 +335,9 @@
 
       <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
@@ -355,15 +363,15 @@
           />
           <el-table-column
             prop="eqpcode"
-            label="璁惧缂栫爜"
+            :label="eqpTable.steptype==='W'?'渚涘簲鍟嗙紪鐮�':'璁惧缂栫爜'"
             sortable="custom"
             show-tooltip-when-overflow
-            min-width="110"
+            min-width="120"
           />
           <el-table-column
             prop="eqpname"
-            label="璁惧鍚嶇О"
-            min-width="110"
+            :label="eqpTable.steptype==='W'?'渚涘簲鍟嗗悕绉�':'璁惧鍚嶇О'"
+            min-width="120"
             show-tooltip-when-overflow
             sortable="custom"
           />
@@ -467,7 +475,7 @@
           @pagination="getEqpTable"
         />
       </div>
-      <div v-if="eqpTableLength===0" style="width: 100px;height: 84px;" />
+      <div v-if="eqpTableLength===0" style="width: 100px;height: 84px;"/>
 
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
@@ -551,6 +559,7 @@
         partcode: '',
         routecode: '',
         stepcode: '',
+        steptype: '',
         page: 1,
         rows: 10,
         prop: 'eqpcode',
@@ -664,6 +673,7 @@
     },
     async routeDialogChange(val) {
       const { data: res } = await RouteSelectStep({ routecode: val })
+      // this.stepDialogArr = res.filter(i => i.flag === 'Z')
       this.stepDialogArr = res
       this.eqpDialogArr = []
       this.radioChangeTempValue = ''
@@ -689,11 +699,13 @@
     },
     async getEqpTable(val) {
       if (typeof val === 'string') {
+        this.eqpTable.steptype = this.stepDialogArr.find(item => item.name === val).flag
         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
         this.eqpTable.routecode = this.dialogForm.routecode
         this.eqpTable.stepcode = this.stepDialogArr[0].code
@@ -711,9 +723,10 @@
     },
     // 淇濆瓨琛�
     async saveRow(row) {
-      if (parseFloat(row.unprice) <= 0) {
+      if (parseFloat(row.unprice) <= 0 && this.eqpTable.steptype !== 'W') {
         return this.$message.info('璁′欢鍗曚环蹇呴』澶т簬闆讹紒')
       }
+
       const data = {
         partcode: this.eqpTable.partcode, //  浜у搧缂栫爜
         routecode: this.eqpTable.routecode, //  宸ヨ壓璺嚎缂栫爜

--
Gitblit v1.9.3