From 458f6714f335938fce80690c037ffca0ccfaa50c Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 03 八月 2022 16:31:52 +0800
Subject: [PATCH] 1.综合看板渲染数据,完成一个版本
---
src/views/zzmx/jpgj.vue | 47 +++++++++++++++++++++++------------------------
1 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index 9bd31ba..b12b1f8 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -17,9 +17,10 @@
:popper-append-to-body="false"
style="width: 200px"
placeholder="璇烽�夋嫨"
- @focus="getPartSelect"
+
@change="partChange"
>
+ <!-- @focus="getPartSelect"-->
<el-option
v-for="item in partArr"
:key="item.partcode"
@@ -113,41 +114,48 @@
prop="RowNum"
width="50"
label="搴忓彿"
+ fixed
/>
<el-table-column
prop="partcode"
+ min-width="160"
label="浜у搧缂栫爜"
sortable="custom"
/>
<el-table-column
prop="partname"
label="浜у搧鍚嶇О"
+ min-width="160"
sortable="custom"
/>
<el-table-column
prop="partspec"
label="浜у搧瑙勬牸"
- width="110"
+ min-width="110"
sortable="custom"
/>
<el-table-column
prop="wksp_name"
label="鐢熶骇杞﹂棿"
+ min-width="110"
sortable="custom"
/>
<el-table-column
prop="route_name"
label="宸ヨ壓璺嚎"
sortable="custom"
+ min-width="110"
/>
<el-table-column
prop="stepname"
label="鍔犲伐宸ュ簭"
sortable="custom"
+ min-width="110"
/>
<el-table-column
prop="eqp_name"
label="鍔犲伐璁惧"
+ min-width="110"
sortable="custom"
/>
<el-table-column
@@ -177,6 +185,7 @@
<el-table-column
label="鎿嶄綔"
+ fixed="right"
>
<template slot-scope="{row}">
<div class="operationClass">
@@ -221,9 +230,10 @@
style="width: 220px"
placeholder="璇烽�夋嫨"
:popper-append-to-body="false"
- @focus="getPartSelect2"
+
@change="partDialogChange"
>
+ <!-- @focus="getPartSelect2"-->
<el-option
v-for="item in partArr2"
:key="item.partcode"
@@ -306,16 +316,19 @@
prop="eqpcode"
label="璁惧缂栫爜"
sortable="custom"
+ min-width="110"
/>
<el-table-column
prop="eqpname"
label="璁惧鍚嶇О"
+ min-width="110"
sortable="custom"
/>
<el-table-column
prop="wksp_name"
sortable="custom"
label="鐢熶骇杞﹂棿"
+ min-width="110"
/>
<el-table-column
sortable="custom"
@@ -421,8 +434,6 @@
<script>
import Pagination from '@/components/Pagination'
-import { AddUpdateOrganization, DeleteOrganization } from '@/api/jcsz'
-import { getCookie } from '@/utils/auth'
import {
BeatRateSearch, DeleteBeatRate,
PartSelect,
@@ -527,7 +538,7 @@
},
created() {
this.getBeatRateSearch()
- // this.getPartSelect()
+ this.getPartSelect()
},
mounted() {
window.addEventListener('resize', this.getHeight)
@@ -592,27 +603,18 @@
},
async partDialogChange(val) {
const { data: res } = await PartSelectRpute({ partcode: val })
- console.log(this.routeDialogArr = res, 888)
+ this.routeDialogArr = res
this.stepDialogArr = []
this.eqpDialogArr = []
},
async routeDialogChange(val) {
const { data: res } = await RouteSelectStep({ routecode: val })
this.stepDialogArr = res
- // this.stepDialogArr = [
- // { code: '1001', name: '娴嬭瘯宸ュ簭1' },
- // { code: '1002', name: '娴嬭瘯宸ュ簭2' },
- // { code: '1003', name: '娴嬭瘯宸ュ簭3' },
- // { code: '1004', name: '娴嬭瘯宸ュ簭4' },
- // { code: '1005', name: '娴嬭瘯宸ュ簭5' },
- // { code: '1006', name: '娴嬭瘯宸ュ簭6' },
- // { code: '1007', name: '娴嬭瘯宸ュ簭7' },
- // { code: '1008', name: '娴嬭瘯宸ュ簭8' },
- // { code: '1009', name: '娴嬭瘯宸ュ簭9' }
- // ]
this.eqpDialogArr = []
},
radioChange(val) {
+ this.isEqpTableEdit = true
+
// this.dialogForm.stepcode = this.stepDialogArr.find(item => item.name === val).code
this.getEqpTable(val)
},
@@ -660,7 +662,7 @@
cavity_qty: row.cavity_qty, // 鍨嬭厰鏁�
unprice: row.unprice// 璁′欢鍗曚环
}
- console.log(data, 7)
+
// row.isVisible = 0
const res = await SaveBeatRate(data)
if (res.code === '200') {
@@ -685,7 +687,6 @@
},
// 澶嶅埗琛�
async copyRow(row) {
- console.log(row)
let currentData = {}// 褰撳墠琛屽璞�
let nextData = {}// 涓嬩竴琛屽璞�
if (row.RowNum === this.eqpDialogArr.length) {
@@ -698,8 +699,6 @@
}
})
}
- console.log(currentData, 2)
- console.log(nextData, 3)
const newData = {
partcode: this.eqpTable.partcode, // 浜у搧缂栫爜
routecode: this.eqpTable.routecode, // 宸ヨ壓璺嚎缂栫爜
@@ -711,7 +710,7 @@
cavity_qty: currentData.cavity_qty, // 鍨嬭厰鏁�
unprice: currentData.unprice// 璁′欢鍗曚环
}
- console.log(newData, 4)
+
const res = await SaveBeatRate(newData)
if (res.code === '200') {
this.$message.success('澶嶅埗鎴愬姛锛�')
@@ -738,12 +737,12 @@
add(operation) {
this.operation = operation
this.dialogVisible = true
+ this.getPartSelect2()
},
// 淇敼鎸夐挳
async edit(operation, row) {
this.operation = operation
this.dialogVisible = true
- console.log(row)
this.editPartName = row.partname
this.editRouteName = row.route_name
--
Gitblit v1.9.3