From 95af123562c0a05ae8955d53fcdcd4c8b310ced8 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 29 六月 2022 17:32:00 +0800
Subject: [PATCH] 1.制造模型:工艺路线(新增、删除、预览)功能开发 2.制造模型:工序定义(查询) 功能开发 3.系统设置:编码规则(查询)功能开发4.修改实施部提出的bug
---
src/views/sbgl/sbqd.vue | 29 ++++++++++++++++++-----------
1 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/src/views/sbgl/sbqd.vue b/src/views/sbgl/sbqd.vue
index ad2373f..5532429 100644
--- a/src/views/sbgl/sbqd.vue
+++ b/src/views/sbgl/sbqd.vue
@@ -197,6 +197,7 @@
</div>
<!--璁惧娓呭崟鏂板缂栬緫-->
<el-dialog
+ :close-on-click-modal="false"
:title="operation==='add'?'鏂板':'淇敼'"
:visible.sync="dialogVisible"
width="50%"
@@ -224,7 +225,7 @@
<el-form-item label="璁惧缁�" prop="devicegroupcode">
<el-select v-model="dialogForm.devicegroupcode" :popper-append-to-body="false" :disabled="dialogForm.devicetypecode===''" style="width: 220px" placeholder="璇烽�夋嫨">
<el-option
- v-for="item in DeviceGroupArr"
+ v-for="item in DeviceGroupDialogArr"
:key="item.code"
:label="item.name"
:value="item.code"
@@ -289,6 +290,7 @@
:visible.sync="DeviceTypeDialogVisible"
width="50%"
top="15vh"
+ :close-on-click-modal="false"
class="DeviceTypeDialogVisible"
@close="handleCloseDeviceType"
>
@@ -299,8 +301,8 @@
<el-table
:data="DeviceTypeArray"
border
+ height="400"
highlight-current-row
- :style="{width: 100+'%',height:tableHeight-300+'px'}"
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@sort-change="sortChangeOfDeviceType"
@@ -374,6 +376,7 @@
title="璁惧缁�"
:visible.sync="DeviceGroupDialogVisible"
width="70%"
+ :close-on-click-modal="false"
top="15vh"
class="DeviceTypeDialogVisible"
@close="handleCloseDeviceGroup"
@@ -385,7 +388,7 @@
:data="DeviceGroupArray"
border
highlight-current-row
- :style="{width: 100+'%',height:tableHeight-300+'px'}"
+ height="400"
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@sort-change="sortChangeOfDeviceGroup"
@@ -547,6 +550,7 @@
status: '',
ratio: ''
},
+ DeviceGroupDialogArr: [], // 璁惧缁勬暟缁�
WorkLineArr: [], // 鎵�灞炰骇绾挎暟缁�
operation: '',
dialogFormRules: {
@@ -626,7 +630,7 @@
},
// 璁惧绫诲瀷鏀瑰彉鏃�
async deviceTypeChange(val) {
- this.form.DeviceType = val
+ this.form.DeviceGroup = ''
const { data: res } = await DeviceTypeSelectGroup({ eqptypecode: val })
this.DeviceGroupArr = res
},
@@ -670,10 +674,11 @@
this.dialogVisible = true
},
// 淇敼鎸夐挳
- edit(operation, row) {
+ async edit(operation, row) {
this.operation = operation
this.dialogVisible = true
- // console.log(row)
+ await this.devicetypecodeChange(row.eqptype_code)
+ await this.workshopcodeChange(row.wksp_code)
this.$nextTick(() => {
this.dialogForm.id = row.id
this.dialogForm.devicecode = row.code
@@ -727,7 +732,7 @@
// 瀵硅瘽妗嗚澶囩被鍨嬩笅鎷夐�夋嫨鏀瑰彉鏃�
async devicetypecodeChange(val) {
const { data: res } = await DeviceTypeSelectGroup({ eqptypecode: val })
- this.DeviceGroupArr = res
+ this.DeviceGroupDialogArr = res
this.dialogForm.devicegroupcode = ''
},
// 瀵硅瘽妗嗗彇娑�
@@ -809,7 +814,8 @@
},
// 鏂板鎸夐挳
addDeviceType() {
- this.DeviceTypeArray.unshift({ code: '', name: '', group: '', remark: '', isVisible: 1 })
+ const number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
+ this.DeviceTypeArray.unshift({ code: '', name: '', group: '', remark: '', isVisible: 1, number: number })
},
// 鍒犻櫎
DeviceTypeDel(row) {
@@ -854,7 +860,7 @@
// 鍙栨秷
DeviceTypeCancel(row) {
this.DeviceTypeArray.forEach((item, index) => {
- if (item.isVisible === 1 && item.code === row.code) {
+ if (item.isVisible === 1 && item.number === row.number) {
this.DeviceTypeArray.splice(index, 1)
}
})
@@ -884,7 +890,8 @@
},
// 鏂板
addDeviceGroup() {
- this.DeviceGroupArray.unshift({ code: '', name: '', eqptype_code: '', eqptype_name: '', remark: '', isVisible: 1 })
+ const number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
+ this.DeviceGroupArray.unshift({ code: '', name: '', eqptype_code: '', eqptype_name: '', remark: '', isVisible: 1, number: number })
},
// 鎺掑簭
sortChangeOfDeviceGroup({ column, prop, order }) {
@@ -958,7 +965,7 @@
// 鍙栨秷鎸夐挳
DeviceGroupCancel(row) {
this.DeviceGroupArray.forEach((item, index) => {
- if (item.isVisible === 1 && item.code === row.code) {
+ if (item.isVisible === 1 && item.number === row.number) {
this.DeviceGroupArray.splice(index, 1)
}
})
--
Gitblit v1.9.3