Commit d5a1d45f authored by caicaicai's avatar caicaicai

修改

parent 6235b0b6
...@@ -30,8 +30,8 @@ export default { ...@@ -30,8 +30,8 @@ export default {
mounted(){ mounted(){
this.sonTimer1 = setInterval(() => { this.sonTimer1 = setInterval(() => {
httpGet(dingDanBiaoCaoZuo,{sort:'createTime,desc',size:1,carNo:this.carnumber}).then((res) => { httpGet(dingDanBiaoCaoZuo,{sort:'createTime,desc',size:1,carNo:this.carnumber}).then((res) => {
if(res.data.length == 0){ if(res.data.content.length == 0){
this.loadData2(); //this.loadData2();
}else{ }else{
httpGet(vehicleInformationQuery,{number:this.carnumber,size:1}).then((resSon1) => { httpGet(vehicleInformationQuery,{number:this.carnumber,size:1}).then((resSon1) => {
if(resSon1.code == 200){ if(resSon1.code == 200){
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
this.showDe = true; this.showDe = true;
this.btnShow1 = true; this.btnShow1 = true;
this.btnShow2 = false; this.btnShow2 = false;
this.carDestination = res.data[0].destination; this.carDestination = res.data.content[0].destination;
} }
} }
}); });
...@@ -52,8 +52,8 @@ export default { ...@@ -52,8 +52,8 @@ export default {
this.carnumber = carnumber; this.carnumber = carnumber;
this.$nextTick(()=>{ this.$nextTick(()=>{
httpGet(dingDanBiaoCaoZuo,{sort:'createTime,desc',size:1,carNo:this.carnumber}).then((res) => { httpGet(dingDanBiaoCaoZuo,{sort:'createTime,desc',size:1,carNo:this.carnumber}).then((res) => {
if(res.data.length == 0){ if(res.data.content.length == 0){
this.loadData2(); //this.loadData2();
}else{ }else{
httpGet(vehicleInformationQuery,{number:this.carnumber,size:1}).then((resSon1) => { httpGet(vehicleInformationQuery,{number:this.carnumber,size:1}).then((resSon1) => {
if(resSon1.code == 200){ if(resSon1.code == 200){
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
this.showDe = true; this.showDe = true;
this.btnShow1 = true; this.btnShow1 = true;
this.btnShow2 = false; this.btnShow2 = false;
this.carDestination = res.data[0].destination; this.carDestination = res.data.content[0].destination;
} }
} }
}); });
...@@ -98,6 +98,11 @@ export default { ...@@ -98,6 +98,11 @@ export default {
//开始派单 //开始派单
startPaidanFn(){ startPaidanFn(){
this.btnShow1 = false; this.btnShow1 = false;
this.$notify({
title: '已开始派单!',
type: 'success',
duration: 2500
});
httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res) => { httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res) => {
if(res.code == 200){ if(res.code == 200){
putForJson(vehicleInformationUpdate,{id:res.data.content[0].id,number:this.carnumber,workStatus:1,weightStatus:2}).then((res) => {}); putForJson(vehicleInformationUpdate,{id:res.data.content[0].id,number:this.carnumber,workStatus:1,weightStatus:2}).then((res) => {});
...@@ -113,6 +118,11 @@ export default { ...@@ -113,6 +118,11 @@ export default {
refusePaidanFn(){ refusePaidanFn(){
this.btnShow1 = false; this.btnShow1 = false;
this.showDe = false; this.showDe = false;
this.$notify({
title: '已拒绝派单!',
type: 'success',
duration: 2500
});
httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res) => { httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res) => {
if(res.code == 200){ if(res.code == 200){
putForJson(vehicleInformationUpdate,{id:res.data.content[0].id,number:this.carnumber,oddStatus:1,workStatus:0}).then((res) => {}); putForJson(vehicleInformationUpdate,{id:res.data.content[0].id,number:this.carnumber,oddStatus:1,workStatus:0}).then((res) => {});
......
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