代办事项审核bug修复

This commit is contained in:
2023-08-23 19:12:01 +08:00
parent 14f07eabad
commit d1477ec8b0
2 changed files with 25 additions and 23 deletions

View File

@ -104,7 +104,10 @@ export default {
this.states=e this.states=e
}, },
async submitBtn(){ async submitBtn(){
let res = await saveDriver({ if(!(this.driverName && this.driverPhone && this.identityCardNumber && this.drivingModel && this.states)){
this.$toast('必填字段未填写')
}else{
await saveDriver({
driverId:this.id ? this.id : '', driverId:this.id ? this.id : '',
driverName:this.driverName , driverName:this.driverName ,
driverPhone:this.driverPhone, driverPhone:this.driverPhone,
@ -113,7 +116,6 @@ export default {
states:Number(this.states), states:Number(this.states),
createTime:timeFormat(new Date()) createTime:timeFormat(new Date())
}) })
if(res.code === 200){
if(this.id){ if(this.id){
this.$toast('修改成功') this.$toast('修改成功')
@ -128,16 +130,16 @@ export default {
cancelBtn(){//取消 cancelBtn(){//取消
this.$router.back() this.$router.back()
}, },
validatePhoneNumber() { // validatePhoneNumber() {
const phoneNumberRegex = /^1[0-9]{10}$/; // const phoneNumberRegex = /^1[0-9]{10}$/;
if (!phoneNumberRegex.test(this.driverPhone)) { // if (!phoneNumberRegex.test(this.driverPhone)) {
this.phoneNumberError = true; // this.phoneNumberError = true;
this.phoneNumberErrorMessage = '电话号码格式不正确请输入有效的11位手机号码。'; // this.phoneNumberErrorMessage = '电话号码格式不正确请输入有效的11位手机号码。';
} else { // } else {
this.phoneNumberError = false; // this.phoneNumberError = false;
this.phoneNumberErrorMessage = ''; // this.phoneNumberErrorMessage = '';
} // }
} // }
}, },
components:{ components:{
TwoCommonBtn, TwoCommonBtn,

View File

@ -14,8 +14,8 @@
<div class="time">{{ item.toDoTime }} &nbsp;&nbsp;{{ item.userName }}</div> <div class="time">{{ item.toDoTime }} &nbsp;&nbsp;{{ item.userName }}</div>
</div> </div>
<div class="right"> <div class="right">
<button class="nopass" @click="toDoAudit(item ,2)">不通过</button> <button class="nopass" @click="todoAudit(item ,2)">不通过</button>
<button class="pass" @click="toDoAudit(item ,1)">通过</button> <button class="pass" @click="todoAudit(item ,1)">通过</button>
</div> </div>
</li> </li>
</ul> </ul>
@ -46,7 +46,7 @@ export default {
this.show = false this.show = false
} }
}, },
async toDoAudit(item,type) { async todoAudit(item,type) {
await toDoAudit({ await toDoAudit({
toDoId: item.toDoId, toDoId: item.toDoId,
toDoType: item.toDoType.code, toDoType: item.toDoType.code,