工单处理页面下填写维保单添加判空验证

master
chen 2022-04-01 14:35:56 +08:00
parent 0260fcd142
commit 8e7212a435
1 changed files with 24 additions and 3 deletions

View File

@ -218,9 +218,30 @@
},
goWorkorderTwo(){
console.log(this.targetObj);
if(this.checkEmpty()) {
uni.navigateTo({
url: "/pages/workOrder/workOrderThree"
})
}
},
//
checkEmpty(){
let result = false;
if(!this.targetObj.endTime) {
this.$toolAll.tools.showToast('请选择结束时间');
} else if(!this.targetObj.workDescribe) {
this.$toolAll.tools.showToast('请填写工作描述');
} else if(this.targetObj.maintenanceImgList.length==0) {
this.$toolAll.tools.showToast('请上传维保图片');
} else if(!this.targetObj.faultReason) {
this.$toolAll.tools.showToast('请填写故障原因');
} else if(!this.targetObj.maintenancePersonnel) {
this.$toolAll.tools.showToast('请填写维保人员');
} else {
result = true;
}
return result;
},
addMountingsList() {
uni.navigateTo({