Browse Source

fix: bug

master
zhang_li 8 months ago
parent
commit
5c135980cc
  1. 6
      src/pages/deviceReport/addForm.vue
  2. 12
      src/pages/overhaulOrder/addForm.vue
  3. 12
      src/pages/overhaulOrder/addServiceRecord.vue
  4. 12
      src/pages/repairOrder/addForm.vue
  5. 12
      src/pages/repairOrder/addServiceRecord.vue
  6. 37
      src/pages/repairOrder/detail.vue
  7. 6
      src/pages/repairOrder/transfer.vue
  8. 6
      src/pages/sparePartsApplication/addForm.vue
  9. 6
      src/pages/sparePartsServiceWorkOrderList/addForm.vue
  10. 6
      src/pages/spotCheckOrder/addForm.vue
  11. 16
      src/pages/upkeepOrder/addServiceRecord.vue

6
src/pages/deviceReport/addForm.vue

@ -220,7 +220,11 @@
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {

12
src/pages/overhaulOrder/addForm.vue

@ -149,7 +149,11 @@
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {
@ -170,7 +174,11 @@
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {

12
src/pages/overhaulOrder/addServiceRecord.vue

@ -282,7 +282,11 @@
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {
@ -303,7 +307,11 @@
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {

12
src/pages/repairOrder/addForm.vue

@ -234,7 +234,11 @@
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {
@ -255,7 +259,11 @@
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {

12
src/pages/repairOrder/addServiceRecord.vue

@ -178,7 +178,11 @@
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {
@ -199,7 +203,11 @@
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {

37
src/pages/repairOrder/detail.vue

@ -322,7 +322,7 @@
orderClick(2) orderClick(2)
} }
// APP // APP
function orderClick(type) { async function orderClick(type) {
// //
// if (this.data.status == 'PENDING') { // if (this.data.status == 'PENDING') {
// if (this.$store.state.user.dept.parentId != this.data.factoryAreaNumber) { // if (this.$store.state.user.dept.parentId != this.data.factoryAreaNumber) {
@ -353,9 +353,7 @@
classes: data.value.classes, classes: data.value.classes,
faultType: data.value.faultType faultType: data.value.faultType
} }
let tips = data.value.status == 'PENDING' ? '是否接单?' : data.value.status == 'PECEIVED' ? '是否完成?' : data if(type ==2){
.value.status == 'COMPLETED' ? '是否验证完结?' : ''
proxy.$modal.confirm(tips).then(async () => {
proxy.$modal.loading('加载中') proxy.$modal.loading('加载中')
loading.value = true loading.value = true
// //
@ -380,7 +378,36 @@
proxy.$modal.closeLoading() proxy.$modal.closeLoading()
loading.value = false loading.value = false
}) })
}) }else{
let tips = data.value.status == 'PENDING' ? '是否接单?' : data.value.status == 'PECEIVED' ? '是否完成?' : data
.value.status == 'COMPLETED' ? '是否验证完结?' : ''
proxy.$modal.confirm(tips).then(async () => {
proxy.$modal.loading('加载中')
loading.value = true
//
if (data.value.status == 'PECEIVED') {
await repairOrderApi.repairOrderUpdate(dataTwo).then((res) => { }).catch(() => {
proxy.$modal.closeLoading()
loading.value = false
})
}
await repairOrderApi.orderClick(dataOne).then((res) => {
if (res.data) {
proxy.$modal.showToast('操作成功')
setTimeout(() => {
proxy.$tab.navigateBack()
loading.value = false
}, 1500)
} else {
proxy.$modal.showToast('操作失败')
loading.value = false
}
}).catch(() => {
proxy.$modal.closeLoading()
loading.value = false
})
})
}
} }
// //
function getDeviceRepairDetailsByNumber() { function getDeviceRepairDetailsByNumber() {

6
src/pages/repairOrder/transfer.vue

@ -183,7 +183,11 @@
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('转办失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('转办失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {

6
src/pages/sparePartsApplication/addForm.vue

@ -185,7 +185,11 @@
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {

6
src/pages/sparePartsServiceWorkOrderList/addForm.vue

@ -162,7 +162,11 @@
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {

6
src/pages/spotCheckOrder/addForm.vue

@ -189,7 +189,11 @@
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {

16
src/pages/upkeepOrder/addServiceRecord.vue

@ -9,10 +9,10 @@
<u-input v-model="form.equipmentParts" placeholder="请输入保养部位" maxlength="50" disabled/> <u-input v-model="form.equipmentParts" placeholder="请输入保养部位" maxlength="50" disabled/>
</u-form-item> --> </u-form-item> -->
<u-form-item label="预估人数" prop="peoples" class="disabled"> <u-form-item label="预估人数" prop="peoples" class="disabled">
<u-input v-model="form.peoples" type="number" placeholder="请输入预估人数" maxlength="50"/> <u-input v-model="form.peoples" type="number" placeholder="请输入预估人数" maxlength="50" disabled/>
</u-form-item> </u-form-item>
<u-form-item label="预估分钟" prop="estimatedMinutes" class="disabled"> <u-form-item label="预估分钟" prop="estimatedMinutes" class="disabled">
<u-input v-model="form.estimatedMinutes" type="number" placeholder="请输入预估分钟" maxlength="50"/> <u-input v-model="form.estimatedMinutes" type="number" placeholder="请输入预估分钟" maxlength="50" disabled/>
</u-form-item> </u-form-item>
<u-form-item label="实际分钟" prop="actualMinutes" required> <u-form-item label="实际分钟" prop="actualMinutes" required>
<u-input v-model="form.actualMinutes" type="number" placeholder="请输入实际分钟" maxlength="50"/> <u-input v-model="form.actualMinutes" type="number" placeholder="请输入实际分钟" maxlength="50"/>
@ -263,7 +263,11 @@ const form = ref({
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {
@ -284,7 +288,11 @@ const form = ref({
loading.value = false loading.value = false
}, 1500) }, 1500)
} else { } else {
proxy.$modal.showToast('添加失败') if(res.msg){
proxy.$modal.showToast(res.msg)
}else{
proxy.$modal.showToast('添加失败')
}
loading.value = false loading.value = false
} }
}).catch(() => { }).catch(() => {

Loading…
Cancel
Save