From 6c850cd09c1af59ec7977042cea8453d01d9b15e Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 28 四月 2023 15:04:23 +0800
Subject: [PATCH] 1.提交
---
src/views/zzmx/jpgj.vue | 36 ++++++++++++++++++++++++------------
1 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index 8c67361..681286f 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -16,21 +16,20 @@
style="display: flex;justify-content: space-between"
>
<div class="elForm">
- <el-form-item label-width="70px" label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-form-item label="浜у搧鍚嶇О/缂栫爜" style=" display: flex;">
<el-select
v-model="form.partcode"
filterable
:popper-append-to-body="false"
style="width: 200px"
placeholder="璇烽�夋嫨"
-
@change="partChange"
>
<!-- @focus="getPartSelect"-->
<el-option
v-for="item in partArr"
:key="item.partcode"
- :label="item.partname"
+ :label="item.partname+' / '+item.partcode"
:value="item.partcode"
/>
</el-select>
@@ -131,8 +130,9 @@
<el-table-column
prop="partname"
label="浜у搧鍚嶇О"
- min-width="160"
+ min-width="300"
sortable="custom"
+ show-tooltip-when-overflow
/>
<el-table-column
prop="partspec"
@@ -344,25 +344,29 @@
/>
<el-table-column
prop="eqpcode"
- label="璁惧缂栫爜"
+ :label="eqpTable.steptype==='W'?'渚涘簲鍟嗙紪鐮�':'璁惧缂栫爜'"
sortable="custom"
- min-width="110"
+ show-tooltip-when-overflow
+ 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"
/>
<el-table-column
prop="wksp_name"
sortable="custom"
label="鐢熶骇杞﹂棿"
+ show-tooltip-when-overflow
min-width="110"
/>
<el-table-column
sortable="custom"
prop="eqp_value"
+ show-tooltip-when-overflow
label="璁惧鑺傛媿"
width="110"
>
@@ -431,10 +435,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>
@@ -533,6 +537,7 @@
partcode: '',
routecode: '',
stepcode: '',
+ steptype: '',
page: 1,
rows: 10,
prop: 'eqpcode',
@@ -669,11 +674,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 {
+ 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
@@ -691,6 +698,9 @@
},
// 淇濆瓨琛�
async saveRow(row) {
+ if (parseFloat(row.unprice) <= 0 && this.eqpTable.steptype !== 'W') {
+ return this.$message.info('璁′欢鍗曚环蹇呴』澶т簬闆讹紒')
+ }
const data = {
partcode: this.eqpTable.partcode, // 浜у搧缂栫爜
routecode: this.eqpTable.routecode, // 宸ヨ壓璺嚎缂栫爜
@@ -714,6 +724,8 @@
// 鍙栨秷琛�
cancelRow(row) {
this.getEqpTable()
+ this.radioChange(this.radioChangeTempValue)
+ this.dialogForm.stepcode = this.radioChangeTempValue
this.isEqpTableEdit = true
},
// 缂栬緫琛�
--
Gitblit v1.9.3