From 68e417e94ab4c97e13d24522d748fc032f4865af Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 07 十一月 2022 16:38:29 +0800
Subject: [PATCH] 1.工艺路线新增复制功能2.节拍工价编辑问题处理
---
src/views/zzmx/jpgj.vue | 63 ++++++++++++++++++++-----------
1 files changed, 41 insertions(+), 22 deletions(-)
diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index a506c91..cf72335 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -256,7 +256,6 @@
style="width: 220px"
placeholder="璇烽�夋嫨"
:popper-append-to-body="false"
-
@change="partDialogChange"
>
<!-- @focus="getPartSelect2"-->
@@ -328,14 +327,15 @@
class="tableFixed"
:data="eqpDialogArr"
:height="tableHeight"
- :style="{width: 100+'%',height:tableHeight-50+'px',}"
+ :style="{width: 100+'%',height:tableHeight-50+'px'}"
border
:row-class-name="tableRowClassName"
- highlight-current-row
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
+ highlight-current-row
@sort-change="dialogSortChange"
>
+ <!-- @row-click="rowClick"-->
<el-table-column
width="50"
label="搴忓彿"
@@ -431,10 +431,10 @@
>
<template slot-scope="{row}">
<div class="operationClass">
- <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>
+ <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>
</div>
</template>
</el-table-column>
@@ -639,6 +639,7 @@
this.routeDialogArr = res
this.stepDialogArr = []
this.eqpDialogArr = []
+ this.dialogForm.routecode = ''
},
async routeDialogChange(val) {
const { data: res } = await RouteSelectStep({ routecode: val })
@@ -668,12 +669,14 @@
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.partcode = this.dialogForm.partcode
this.eqpTable.routecode = this.dialogForm.routecode
this.eqpTable.stepcode = this.stepDialogArr[0].code
this.dialogForm.stepcode = this.stepDialogArr[0].name
}
+
const res = await StepSelectEqpList(this.eqpTable)
this.eqpDialogArr = res.data
this.eqpTableLength = res.count
@@ -714,13 +717,26 @@
editRow(row) {
if (this.isEqpTableEdit) {
row.isVisible = 1
+ let temp = {}
+ this.eqpDialogArr.forEach((item, index) => {
+ if (row.eqpcode === item.eqpcode) {
+ temp = item
+ this.eqpDialogArr.splice(index, 1, temp)
+ this.eqpDialogArr[index].isVisible = 1
+ }
+ })
this.isEqpTableEdit = false
} else {
return this.$message.info('鍙兘涓�琛屼竴琛屼慨鏀癸紒')
}
},
+ // rowClick(row, column, event) {
+ // console.log(row, column, event, 3)
+ // console.log(this.dialogForm.stepcode, 4)
+ // this.getEqpTable(this.dialogForm.stepcode)
+ // },
// 澶嶅埗琛�
- async copyRow(row) {
+ async copyRow(row) {
let currentData = {}// 褰撳墠琛屽璞�
let nextData = {}// 涓嬩竴琛屽璞�
if (row.RowNum === this.eqpDialogArr.length) {
@@ -775,7 +791,7 @@
this.getPartSelect2()
},
// 淇敼鎸夐挳
- async edit(operation, row) {
+ async edit(operation, row) {
this.operation = operation
this.dialogVisible = true
@@ -783,13 +799,11 @@
this.editRouteName = row.route_name
this.editStepName = row.stepname
- // this.$nextTick(() => {
+ await this.partDialogChange(row.partcode)
+ await this.routeDialogChange(row.route_code)
this.dialogForm.partcode = row.partcode
this.dialogForm.routecode = row.route_code
this.dialogForm.stepcode = row.stepcode
- // })
- await this.partDialogChange(row.partcode)
- await this.routeDialogChange(row.route_code)
await this.radioChange(0)
},
// 鍒犻櫎鎸夐挳
@@ -889,15 +903,17 @@
<!--鍏叡椤甸潰鏍峰紡-->
<style lang="scss" scoped>
$main_color: #42b983;
-.el-button--text{
+.el-button--text {
font-size: 14px;
cursor: pointer;
}
-.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
+
+.el-icon-share, .el-icon-delete, .el-icon-edit-outline {
color: $main_color;
cursor: pointer;
}
-.el-icon-edit-outline{
+
+.el-icon-edit-outline {
margin-right: 15px;
}
@@ -958,8 +974,8 @@
background-color: #f8f8fa;
}
-::v-deep .el-table__body .el-table__row.hover-row td{
- background-color: #eaecef ;
+::v-deep .el-table__body .el-table__row.hover-row td {
+ background-color: #eaecef;
}
::v-deep .el-form--inline .el-form-item__label {
@@ -975,14 +991,17 @@
.body ::v-deep .el-form-item {
margin-bottom: 0;
}
+
.userDialogVisible ::v-deep .el-form-item {
margin-bottom: 0;
}
-.tableFixed{
- ::v-deep .el-table__fixed-right{
+
+.tableFixed {
+ ::v-deep .el-table__fixed-right {
height: 100% !important;
}
- ::v-deep .el-table__fixed{
+
+ ::v-deep .el-table__fixed {
height: 100% !important;
}
}
--
Gitblit v1.9.3