Browse Source

fix: bug

master
zhang_li 8 months ago
parent
commit
c1f2f58146
  1. 7
      src/pages/deviceReport/addForm.vue
  2. 5
      src/pages/overhaulOrder/addForm.vue
  3. 7
      src/pages/repairOrder/addForm.vue

7
src/pages/deviceReport/addForm.vue

@ -94,6 +94,7 @@
const singleColumnList = ref([]) const singleColumnList = ref([])
const imgList = ref([]) const imgList = ref([])
const field = ref('') const field = ref('')
const msg = ref('')
function chickRightButton(field) { function chickRightButton(field) {
if (!form.value.type) { if (!form.value.type) {
proxy.$modal.showToast('请先选择类型') proxy.$modal.showToast('请先选择类型')
@ -139,6 +140,7 @@
}).then((res) => { }).then((res) => {
console.log(res) console.log(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 = ''
@ -159,6 +161,7 @@
flag:1 flag:1
}).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 = ''
@ -190,6 +193,10 @@
proxy.$modal.showToast(`请选择${type.value == 'DEVICE' || type.value == 'TECH' ? '设备' : '模具'}`) proxy.$modal.showToast(`请选择${type.value == 'DEVICE' || type.value == 'TECH' ? '设备' : '模具'}`)
return; return;
} }
if (!form.value.deviceName) {
proxy.$modal.showToast(msg.value)
return;
}
if (!form.value.type) { if (!form.value.type) {
proxy.$modal.showToast(`请选择类型'}`) proxy.$modal.showToast(`请选择类型'}`)
return; return;

5
src/pages/overhaulOrder/addForm.vue

@ -114,6 +114,11 @@
proxy.$modal.showToast('请输入故障描述') proxy.$modal.showToast('请输入故障描述')
return; return;
} }
if (!form.value.deviceNumber) {
proxy.$modal.showToast(`请选择${type.value == 'DEVICE' || type.value == 'TECH' ? '设备' : '模具'}名称`)
return;
}
if (!form.value.deviceName) { if (!form.value.deviceName) {
proxy.$modal.showToast(msg.value) proxy.$modal.showToast(msg.value)
return; return;

7
src/pages/repairOrder/addForm.vue

@ -123,6 +123,7 @@
const maintenanceShift = ref([]) const maintenanceShift = ref([])
const faultType = ref([]) const faultType = ref([])
const choosesingleColumnItem = ref() const choosesingleColumnItem = ref()
const msg = ref('')
// //
function chickRightButton(field) { function chickRightButton(field) {
if (!form.value.type) { if (!form.value.type) {
@ -153,6 +154,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 = ''
@ -171,6 +173,7 @@
number: form.value.deviceNumber number: form.value.deviceNumber
}).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 = ''
@ -197,6 +200,10 @@
proxy.$modal.showToast(`请选择${type.value == 'DEVICE' || type.value == 'TECH' ? '设备' : '模具'}名称`) proxy.$modal.showToast(`请选择${type.value == 'DEVICE' || type.value == 'TECH' ? '设备' : '模具'}名称`)
return; return;
} }
if (!form.value.deviceName) {
proxy.$modal.showToast(msg.value)
return;
}
if (!form.value.factoryAreaName) { if (!form.value.factoryAreaName) {
proxy.$modal.showToast('请输入区域') proxy.$modal.showToast('请输入区域')
return; return;

Loading…
Cancel
Save