|
|
@ -5,7 +5,7 @@ |
|
|
|
<u-form-item label="转办类型" prop="status" required> |
|
|
|
<view class="select" @click="openSingleColumn('status',form.status,tansferType)"> |
|
|
|
<view class="input" v-if='form.status || form.status == 0'> |
|
|
|
{{selectFormat(form.status,tansferType)}} |
|
|
|
{{form.statusTxt}} |
|
|
|
</view> |
|
|
|
<view class="placeholder" v-else> |
|
|
|
{{`请选择转办类型`}} |
|
|
@ -16,7 +16,7 @@ |
|
|
|
<u-form-item label="类型" prop="receiverType" required> |
|
|
|
<view class="select" @click="openSingleColumn('receiverType',form.receiverType,deviceMoldType)"> |
|
|
|
<view class="input" v-if='form.receiverType'> |
|
|
|
{{selectFormat(form.receiverType,deviceMoldType)}} |
|
|
|
{{form.receiverTypeTxt}} |
|
|
|
</view> |
|
|
|
<view class="placeholder" v-else> |
|
|
|
{{`请选择类型`}} |
|
|
@ -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() |
|
|
|
} |
|
|
|
} |
|
|
|