工单报备按钮加防重复点击1
This commit is contained in:
@ -105,27 +105,30 @@ export default {
|
||||
this.states=e
|
||||
},
|
||||
async submitBtn(){
|
||||
let res = await saveDriver({
|
||||
driverId:this.id ? this.id : '',
|
||||
driverName:this.driverName ,
|
||||
driverPhone:this.driverPhone,
|
||||
identityCardNumber:this.identityCardNumber,
|
||||
drivingModel:this.drivingModel,
|
||||
states:Number(this.states),
|
||||
createTime:timeFormat(new Date())
|
||||
})
|
||||
if(res.code === 200){
|
||||
if(this.id){
|
||||
this.$toast('修改成功')
|
||||
this.$toast(1111)
|
||||
try {
|
||||
let res = await saveDriver({
|
||||
driverId:this.id ? this.id : '',
|
||||
driverName:this.driverName ,
|
||||
driverPhone:this.driverPhone,
|
||||
identityCardNumber:this.identityCardNumber,
|
||||
drivingModel:this.drivingModel,
|
||||
states:Number(this.states),
|
||||
createTime:timeFormat(new Date())
|
||||
})
|
||||
if(res.code === 200){
|
||||
if(this.id){
|
||||
this.$toast('修改成功')
|
||||
|
||||
}else{
|
||||
this.$toast('添加成功')
|
||||
}else{
|
||||
this.$toast('添加成功')
|
||||
}
|
||||
setTimeout(()=>{
|
||||
this.$router.back();
|
||||
},2000)
|
||||
}
|
||||
setTimeout(()=>{
|
||||
this.$router.back();
|
||||
},2000)
|
||||
}else{
|
||||
this.$toast(res.msg)
|
||||
}catch (e){
|
||||
this.$toast(JSON.stringify(e), "eeeeeeee")
|
||||
}
|
||||
},
|
||||
cancelBtn(){//取消
|
||||
|
Reference in New Issue
Block a user