|
@ -5,7 +5,7 @@ |
|
|
<u-form-item label="转办类型" prop="status" required> |
|
|
<u-form-item label="转办类型" prop="status" required> |
|
|
<view class="select" @click="openSingleColumn('status',form.status,tansferType)"> |
|
|
<view class="select" @click="openSingleColumn('status',form.status,tansferType)"> |
|
|
<view class="input" v-if='form.status || form.status == 0'> |
|
|
<view class="input" v-if='form.status || form.status == 0'> |
|
|
{{selectFormat(form.status,tansferType)}} |
|
|
{{form.statusTxt}} |
|
|
</view> |
|
|
</view> |
|
|
<view class="placeholder" v-else> |
|
|
<view class="placeholder" v-else> |
|
|
{{`请选择转办类型`}} |
|
|
{{`请选择转办类型`}} |
|
@ -16,7 +16,7 @@ |
|
|
<u-form-item label="类型" prop="receiverType" required> |
|
|
<u-form-item label="类型" prop="receiverType" required> |
|
|
<view class="select" @click="openSingleColumn('receiverType',form.receiverType,deviceMoldType)"> |
|
|
<view class="select" @click="openSingleColumn('receiverType',form.receiverType,deviceMoldType)"> |
|
|
<view class="input" v-if='form.receiverType'> |
|
|
<view class="input" v-if='form.receiverType'> |
|
|
{{selectFormat(form.receiverType,deviceMoldType)}} |
|
|
{{form.receiverTypeTxt}} |
|
|
</view> |
|
|
</view> |
|
|
<view class="placeholder" v-else> |
|
|
<view class="placeholder" v-else> |
|
|
{{`请选择类型`}} |
|
|
{{`请选择类型`}} |
|
@ -101,10 +101,12 @@ |
|
|
form: { |
|
|
form: { |
|
|
id: '', |
|
|
id: '', |
|
|
receiverType: "", |
|
|
receiverType: "", |
|
|
|
|
|
receiverTypeTxt:'', |
|
|
deviceNumber: '', |
|
|
deviceNumber: '', |
|
|
deviceName: '', |
|
|
deviceName: '', |
|
|
receiverUserId: '', |
|
|
receiverUserId: '', |
|
|
status:0 |
|
|
status:0, |
|
|
|
|
|
statusTxt:'设备' |
|
|
}, |
|
|
}, |
|
|
deviceList: [], //设备列表 |
|
|
deviceList: [], //设备列表 |
|
|
singleColumnShow: false, |
|
|
singleColumnShow: false, |
|
@ -215,13 +217,13 @@ |
|
|
}, |
|
|
}, |
|
|
// 根据设备/模具号查询信息 |
|
|
// 根据设备/模具号查询信息 |
|
|
getDetailsByNumber() { |
|
|
getDetailsByNumber() { |
|
|
if (this.type == 'DEVICE'||this.type == 'TECH') { |
|
|
if (this.form.receiverType == 'DEVICE'||this.form.receiverType == 'TECH') { |
|
|
deviceApi.getDeviceDetailsByNumber({ |
|
|
deviceApi.getDeviceDetailsByNumber({ |
|
|
number:this.form.deviceNumber, |
|
|
number:this.form.deviceNumber, |
|
|
type:this.type |
|
|
type:this.form.receiverType |
|
|
}).then(async (res) => { |
|
|
}).then(async (res) => { |
|
|
if(!res.data){ |
|
|
if(!res.data){ |
|
|
this.$modal.showToast('找不到该设备') |
|
|
|
|
|
this.form.deviceName ='' |
|
|
this.form.deviceName ='' |
|
|
this.form.factoryAreaName = '' |
|
|
this.form.factoryAreaName = '' |
|
|
this.form.factoryAreaNumber = '' |
|
|
this.form.factoryAreaNumber = '' |
|
@ -233,18 +235,16 @@ |
|
|
this.form.factoryAreaNumber = res.data.factoryAreaNumber |
|
|
this.form.factoryAreaNumber = res.data.factoryAreaNumber |
|
|
await this.getSelecUser() |
|
|
await this.getSelecUser() |
|
|
}).catch(()=>{ |
|
|
}).catch(()=>{ |
|
|
this.$modal.showToast('找不到该设备') |
|
|
|
|
|
this.form.deviceName ='' |
|
|
this.form.deviceName ='' |
|
|
this.form.factoryAreaName = '' |
|
|
this.form.factoryAreaName = '' |
|
|
this.form.factoryAreaNumber = '' |
|
|
this.form.factoryAreaNumber = '' |
|
|
this.selecUserList = [] |
|
|
this.selecUserList = [] |
|
|
}) |
|
|
}) |
|
|
} else if (this.type == 'MOLD') { |
|
|
} else if (this.form.receiverType == 'MOLD') { |
|
|
moldApi.getMoldDetailsByNumber({ |
|
|
moldApi.getMoldDetailsByNumber({ |
|
|
number:this.form.deviceNumber |
|
|
number:this.form.deviceNumber |
|
|
}).then(async (res) => { |
|
|
}).then(async (res) => { |
|
|
if(!res.data){ |
|
|
if(!res.data){ |
|
|
this.$modal.showToast('找不到该设备') |
|
|
|
|
|
this.form.deviceName ='' |
|
|
this.form.deviceName ='' |
|
|
this.form.factoryAreaName = '' |
|
|
this.form.factoryAreaName = '' |
|
|
this.form.factoryAreaNumber = '' |
|
|
this.form.factoryAreaNumber = '' |
|
@ -256,12 +256,11 @@ |
|
|
this.form.factoryAreaNumber = res.data.factoryAreaNumber |
|
|
this.form.factoryAreaNumber = res.data.factoryAreaNumber |
|
|
await this.getSelecUser() |
|
|
await this.getSelecUser() |
|
|
}).catch(()=>{ |
|
|
}).catch(()=>{ |
|
|
this.$modal.showToast('找不到该设备') |
|
|
|
|
|
this.form.deviceName ='' |
|
|
this.form.deviceName ='' |
|
|
this.form.factoryAreaName = '' |
|
|
this.form.factoryAreaName = '' |
|
|
this.form.factoryAreaNumber = '' |
|
|
this.form.factoryAreaNumber = '' |
|
|
console.log(this.form) |
|
|
|
|
|
this.selecUserList = [] |
|
|
this.selecUserList = [] |
|
|
|
|
|
console.log(11,this.form) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -289,15 +288,19 @@ |
|
|
this.form.deviceName = '' |
|
|
this.form.deviceName = '' |
|
|
this.form.deviceNumber = '' |
|
|
this.form.deviceNumber = '' |
|
|
this.form.receiverUserId = undefined |
|
|
this.form.receiverUserId = undefined |
|
|
|
|
|
this.form.receiverTypeTxt = e[0].label |
|
|
this.getDeviceList() |
|
|
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'){ |
|
|
}else if(this.field == 'factoryAreaNumber'){ |
|
|
this.getSelecUser() |
|
|
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.singleColumnShow = false |
|
|
this.$emit('singleColumn', this.field, this.form[this.field]) |
|
|
this.$emit('singleColumn', this.field, this.form[this.field]) |
|
@ -384,9 +387,14 @@ |
|
|
if (option.id) this.form.id = option.id; |
|
|
if (option.id) this.form.id = option.id; |
|
|
if (option.deviceNumber) this.deviceNumber = option.deviceNumber; |
|
|
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.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() |
|
|
this.getFactoryAreaList() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|