From 52b1cd4bf0ffd7a1ab053f49623d32a5d8b8de93 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 15 Mar 2024 11:03:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E6=A3=80=E8=8E=B7=E5=8F=96=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=88=97=E8=A1=A8=E5=8A=A0flag=3D2=EF=BC=8C=E8=BD=AC?= =?UTF-8?q?=E5=8A=9Ebug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/repairOrder/transfer.vue | 46 ++++++++++++++++------------ src/pages/spotCheckOrder/addForm.vue | 3 +- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/src/pages/repairOrder/transfer.vue b/src/pages/repairOrder/transfer.vue index 1b918f7..434810b 100644 --- a/src/pages/repairOrder/transfer.vue +++ b/src/pages/repairOrder/transfer.vue @@ -5,7 +5,7 @@ - {{selectFormat(form.status,tansferType)}} + {{form.statusTxt}} {{`请选择转办类型`}} @@ -16,7 +16,7 @@ - {{selectFormat(form.receiverType,deviceMoldType)}} + {{form.receiverTypeTxt}} {{`请选择类型`}} @@ -101,10 +101,12 @@ form: { id: '', receiverType: "", + receiverTypeTxt:'', deviceNumber: '', deviceName: '', receiverUserId: '', - status:0 + status:0, + statusTxt:'设备' }, deviceList: [], //设备列表 singleColumnShow: false, @@ -215,13 +217,13 @@ }, // 根据设备/模具号查询信息 getDetailsByNumber() { - if (this.type == 'DEVICE'||this.type == 'TECH') { + if (this.form.receiverType == 'DEVICE'||this.form.receiverType == 'TECH') { deviceApi.getDeviceDetailsByNumber({ number:this.form.deviceNumber, - type:this.type + type:this.form.receiverType }).then(async (res) => { if(!res.data){ - this.$modal.showToast('找不到该设备') + this.form.deviceName ='' this.form.factoryAreaName = '' this.form.factoryAreaNumber = '' @@ -233,18 +235,16 @@ this.form.factoryAreaNumber = res.data.factoryAreaNumber await this.getSelecUser() }).catch(()=>{ - this.$modal.showToast('找不到该设备') this.form.deviceName ='' this.form.factoryAreaName = '' this.form.factoryAreaNumber = '' this.selecUserList = [] }) - } else if (this.type == 'MOLD') { + } else if (this.form.receiverType == 'MOLD') { moldApi.getMoldDetailsByNumber({ number:this.form.deviceNumber }).then(async (res) => { if(!res.data){ - this.$modal.showToast('找不到该设备') this.form.deviceName ='' this.form.factoryAreaName = '' this.form.factoryAreaNumber = '' @@ -256,12 +256,11 @@ this.form.factoryAreaNumber = res.data.factoryAreaNumber await this.getSelecUser() }).catch(()=>{ - this.$modal.showToast('找不到该设备') this.form.deviceName ='' this.form.factoryAreaName = '' this.form.factoryAreaNumber = '' - console.log(this.form) this.selecUserList = [] + console.log(11,this.form) }) } }, @@ -289,15 +288,19 @@ this.form.deviceName = '' this.form.deviceNumber = '' this.form.receiverUserId = undefined + this.form.receiverTypeTxt = e[0].label this.getDeviceList() - } else if (this.field == 'deviceNumber') { - this.choosesingleColumnItem = this.singleColumnList.filter(item => item.number == e[0].value) - this.form.factoryAreaName = this.choosesingleColumnItem[0].factoryAreaName - this.form.factoryAreaNumber = this.choosesingleColumnItem[0].factoryAreaNumber - this.form.receiverUserId = undefined - this.getSelecUser() }else if(this.field == 'factoryAreaNumber'){ this.getSelecUser() + }else if(this.field == 'status'){ + this.form.statusTxt = e[0].label + if(this.form.status == 0){ + this.deviceMoldType = this.deviceMoldType1.filter(item => item.value != this.type) + }else{ + this.deviceMoldType = this.deviceMoldType1 + } + this.form.receiverType = this.deviceMoldType[0].value + this.form.receiverTypeTxt =this.deviceMoldType[0].label } this.singleColumnShow = false this.$emit('singleColumn', this.field, this.form[this.field]) @@ -384,9 +387,14 @@ if (option.id) this.form.id = option.id; if (option.deviceNumber) this.deviceNumber = option.deviceNumber; - this.deviceMoldType = await dictApi.getDict('app_device_mold_type') + this.deviceMoldType1 = await dictApi.getDict('app_device_mold_type') + if(this.form.status == 0){ + this.deviceMoldType = this.deviceMoldType1.filter(item => item.value != this.type) + }else{ + this.deviceMoldType = this.deviceMoldType1 + } this.form.receiverType = this.deviceMoldType[0].value - this.deviceMoldType = this.deviceMoldType.filter(item => item.value != this.type) + this.form.receiverTypeTxt =this.deviceMoldType[0].label this.getFactoryAreaList() } } diff --git a/src/pages/spotCheckOrder/addForm.vue b/src/pages/spotCheckOrder/addForm.vue index 489bb78..670285b 100644 --- a/src/pages/spotCheckOrder/addForm.vue +++ b/src/pages/spotCheckOrder/addForm.vue @@ -113,7 +113,8 @@ // 根据设备/模具号查询信息 getDetailsByNumber() { const data = { - number: this.form.deviceNumber + number: this.form.deviceNumber, + flag:2 } deviceApi.getDeviceDetailsByNumber(data).then((res) => { if (res.data) {