|
@ -107,14 +107,15 @@ |
|
|
const faultType = ref([]) |
|
|
const faultType = ref([]) |
|
|
const isDisabled = ref(false) |
|
|
const isDisabled = ref(false) |
|
|
const choosesingleColumnItem = ref([]) |
|
|
const choosesingleColumnItem = ref([]) |
|
|
|
|
|
const msg = ref('') |
|
|
function submit() { |
|
|
function submit() { |
|
|
// 校验 |
|
|
// 校验 |
|
|
if (!form.value.describes) { |
|
|
if (!form.value.describes) { |
|
|
proxy.$modal.showToast('请输入故障描述') |
|
|
proxy.$modal.showToast('请输入故障描述') |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (!form.value.deviceNumber) { |
|
|
if (!form.value.deviceName) { |
|
|
proxy.$modal.showToast('请选择设备名称或者维修工单') |
|
|
proxy.$modal.showToast(msg.value) |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (!form.value.faultType) { |
|
|
if (!form.value.faultType) { |
|
@ -248,6 +249,7 @@ |
|
|
type: type.value |
|
|
type: type.value |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
if (!res.data) { |
|
|
if (!res.data) { |
|
|
|
|
|
msg.value = res.msg |
|
|
form.value.deviceName = '' |
|
|
form.value.deviceName = '' |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaNumber = '' |
|
|
form.value.factoryAreaNumber = '' |
|
@ -256,7 +258,9 @@ |
|
|
form.value.deviceName = res.data.name |
|
|
form.value.deviceName = res.data.name |
|
|
form.value.factoryAreaName = res.data.factoryAreaName |
|
|
form.value.factoryAreaName = res.data.factoryAreaName |
|
|
form.value.factoryAreaNumber = res.data.factoryAreaNumber |
|
|
form.value.factoryAreaNumber = res.data.factoryAreaNumber |
|
|
}).catch(() => { |
|
|
}).catch((error) => { |
|
|
|
|
|
console.log(error) |
|
|
|
|
|
msg.value = error.msg |
|
|
form.value.deviceName = '' |
|
|
form.value.deviceName = '' |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaNumber = '' |
|
|
form.value.factoryAreaNumber = '' |
|
@ -265,7 +269,9 @@ |
|
|
moldApi.getMoldDetailsByNumber({ |
|
|
moldApi.getMoldDetailsByNumber({ |
|
|
number: form.value.deviceNumber |
|
|
number: form.value.deviceNumber |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
|
|
|
console.log(22,res) |
|
|
if (!res.data) { |
|
|
if (!res.data) { |
|
|
|
|
|
msg.value = res.msg |
|
|
form.value.deviceName = '' |
|
|
form.value.deviceName = '' |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaNumber = '' |
|
|
form.value.factoryAreaNumber = '' |
|
@ -274,7 +280,9 @@ |
|
|
form.value.deviceName = res.data.name |
|
|
form.value.deviceName = res.data.name |
|
|
form.value.factoryAreaName = res.data.factoryAreaName |
|
|
form.value.factoryAreaName = res.data.factoryAreaName |
|
|
form.value.factoryAreaNumber = res.data.factoryAreaNumber |
|
|
form.value.factoryAreaNumber = res.data.factoryAreaNumber |
|
|
}).catch(() => { |
|
|
}).catch((error) => { |
|
|
|
|
|
console.log(error) |
|
|
|
|
|
msg.value = error.msg |
|
|
form.value.deviceName = '' |
|
|
form.value.deviceName = '' |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaNumber = '' |
|
|
form.value.factoryAreaNumber = '' |
|
|