Commit 7eafe20a authored by xxx's avatar xxx

修改退出时更改车辆状态问题

parent 25677ded
......@@ -152,22 +152,10 @@ export default {
if(res1.data.totalElements == 0){
return
}else{
//退出时删除所有单子
httpGet(dingDanBiaoCaoZuo,{carNo:this.carnumber}).then((resDel) => {
if(resDel.code == 200 && resDel.data.totalElements != 0){
httpDelForJson(dingDanBiaoCaoZuo,[resDel.data.content[0].id]).then((resDelSon) => {
//修改车辆状态为离线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1}).then((res2) => {
this.logout();
});
});
}else{
//修改车辆状态为离线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1}).then((res2) => {
this.logout();
});
}
})
//修改车辆状态为离线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1}).then((res2) => {
this.logout();
});
}
}
});
......@@ -252,18 +240,8 @@ export default {
if(res1.data.totalElements == 0){
return
}else{
//退出时删除所有单子
httpGet(dingDanBiaoCaoZuo,{carNo:this.carnumber}).then((resDel) => {
if(resDel.code == 200 && resDel.data.totalElements != 0){
httpDelForJson(dingDanBiaoCaoZuo,[resDel.data.content[0].id]).then((resDelSon) => {
//修改车辆状态为离线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1}).then((res2) => {});
});
}else{
//修改车辆状态为离线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1}).then((res2) => {});
}
})
//修改车辆状态为离线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:0,oddStatus:1}).then((res2) => {});
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment