Commit 559a8f2d authored by zhanglw's avatar zhanglw

订单操作

parent 0eb52769
...@@ -60,5 +60,8 @@ export const changeJinJiReadStatus = '/api/Notice/changeJinJiReadStatus'; //终 ...@@ -60,5 +60,8 @@ export const changeJinJiReadStatus = '/api/Notice/changeJinJiReadStatus'; //终
export const crossingFence = '/api/crossingFence'; //终端围栏出入消息回传 export const crossingFence = '/api/crossingFence'; //终端围栏出入消息回传
export const tRealTimeOrder = '/api/tRealTimeOrder'; //获取当前车辆的订单 export const tRealTimeOrder = '/api/tRealTimeOrder'; //获取当前车辆的订单
export const arriveCaiDian = '/api/tRealTimeOrder/arriveCaiDian'; //判断车辆到达采点后,提供订单id,使进入待装车状态 export const arriveCaiDian = '/api/tRealTimeOrder/arriveCaiDian'; //判断车辆到达采点后,提供订单id,使进入待装车状态
export const getAllLoadableKC = '/api/tRealTimeOrder/getAllLoadableKC'; //铲车查询附近五十米内是否有状态为2(到达采点,等待装车)的卡车 export const getAllLoadableKC = '/api/tRealTimeOrder/getAllLoadableKC'; //铲车界面展示可装车的卡车
export const chooseKCZC = '/api/tRealTimeOrder/chooseKCZC'; //铲车给指定卡车进行装车 export const chooseKCZC = '/api/tRealTimeOrder/chooseKCZC'; //铲车界面点击给卡车装车
export const completeZC = '/api/tRealTimeOrder/completeZC'; //卡车界面点击完成装车
export const crossDB = '/api/tRealTimeOrder/crossDB'; //卡车界面点击到达卸点
export const completeXC = '/api/tRealTimeOrder/completeXC'; //卡车界面点击完成装车
...@@ -56,8 +56,8 @@ export default { ...@@ -56,8 +56,8 @@ export default {
data() { data() {
return { return {
loginForm: { loginForm: {
username: "testkc", username: "",
password: "123456", password: "",
uuid: "", uuid: "",
}, },
loading: false, loading: false,
...@@ -65,8 +65,7 @@ export default { ...@@ -65,8 +65,7 @@ export default {
keyboardShowType: "", keyboardShowType: "",
//设备OAID testkc test999 //设备OAID testkc test999
//testcc deviceOAID: "test888", //testcc deviceOAID: "test888",
deviceOAID: "test999", deviceOAID: "",
// deviceOAID: "140945db5f9b8e04",
//判断设备是否与车绑定 //判断设备是否与车绑定
bindingStatus: false, bindingStatus: false,
//绑定的车牌号 //绑定的车牌号
...@@ -80,17 +79,18 @@ export default { ...@@ -80,17 +79,18 @@ export default {
this.getCookie(); this.getCookie();
}, },
mounted() { mounted() {
console.log(window, 1111111);
//两种方法相互冲突,每次只需要一种,并且获取的id不一样 //两种方法相互冲突,每次只需要一种,并且获取的id不一样
//app获取设备号方法 //app获取设备号方法
// this.appGetDeviceId(); this.appGetDeviceId();
//5+app获取OAID方法 //5+app获取OAID方法
if (window.plus) { // if (window.plus) {
this.plusReady(); // this.plusReady();
} else { // } else {
document.addEventListener("plusready", this.plusReady, false); // document.addEventListener("plusready", this.plusReady, false);
} // }
}, },
components: { components: {
// Keyboard // Keyboard
...@@ -98,41 +98,45 @@ export default { ...@@ -98,41 +98,45 @@ export default {
methods: { methods: {
//app获取设备号方法 //app获取设备号方法
appGetDeviceId() { appGetDeviceId() {
// let that = this; let that = this;
let appDeviceId1 = window.Device.getDeviceId();
// let appDeviceId1 = window.Device.getDeviceId(); // let appDeviceId1 = window.Device.getDeviceId();
// // let appDeviceId1 = window.Device.getDeviceId(); if (appDeviceId1) {
// console.log("app设备号", window.Device); that.deviceOAID = appDeviceId1;
// if (appDeviceId1) { //查询设备表是否存在该设备编号
// that.deviceOAID = appDeviceId1; httpGet(apiEquipmentQuery, { name: that.deviceOAID }).then(
// //查询设备表是否存在该设备编号 (resSheiBei) => {
// httpGet(apiEquipmentQuery, { name: that.deviceOAID }).then( if (resSheiBei.code == 200 && resSheiBei.data.totalElements != 0) {
// (resSheiBei) => { //查询车辆表中设备是否与车辆绑定
// if (resSheiBei.code == 200 && resSheiBei.data.totalElements != 0) { httpGet(vehicleInformationQuery, {
// //查询车辆表中设备是否与车辆绑定 equipmentName: that.deviceOAID,
// httpGet(vehicleInformationQuery, { }).then((resCar) => {
// equipmentName: that.deviceOAID, if (resCar.code == 200 && resCar.data.totalElements != 0) {
// }).then((resCar) => { that.bindingStatus = true;
// if (resCar.code == 200 && resCar.data.totalElements != 0) { } else {
// that.bindingStatus = true; that.bindingStatus = false;
// } else { }
// that.bindingStatus = false; });
// } } else {
// }); httpPostForJson(apiEquipmentQuery, {
// } else { name: that.deviceOAID,
// httpPostForJson(apiEquipmentQuery, { status: "正常",
// name: that.deviceOAID, }).then((res) => {
// status: "正常", that.bindingStatus = false;
// }).then((res) => { });
// that.bindingStatus = false; }
// }); }
// } );
// } }
// );
// }
}, },
//5+app获取OAID方法 //5+app获取OAID方法
plusReady() { plusReady() {
// let that = this; let that = this;
console.log("设备身份码:" + plus.device.imei);
console.log("用户识别码:" + plus.device.imsi);
console.log("设备型号信息:" + plus.device.model);
console.log("设备厂商信息:" + plus.device.vendor);
console.log("设备唯一标识号:" + plus.device.uuid);
// plus.device.getOAID({ // plus.device.getOAID({
// success: function (e) { // success: function (e) {
// console.log("oaid", e.oaid); // console.log("oaid", e.oaid);
...@@ -170,6 +174,45 @@ export default { ...@@ -170,6 +174,45 @@ export default {
// that.bindingStatus = false; // that.bindingStatus = false;
// }, // },
// }); // });
//无法获取oaid的设备尝试获取uuid或imei
plus.device.getInfo({
success:function(e){
console.log('getDeviceInfo success: '+JSON.stringify(e));
that.deviceOAID = e.uuid;
//查询设备表是否存在该设备编号
httpGet(apiEquipmentQuery, { name: that.deviceOAID }).then(
(resSheiBei) => {
if (
resSheiBei.code == 200 &&
resSheiBei.data.totalElements != 0
) {
//查询车辆表中设备是否与车辆绑定
httpGet(vehicleInformationQuery, {
equipmentName: that.deviceOAID,
}).then((resCar) => {
if (resCar.code == 200 && resCar.data.totalElements != 0) {
that.bindingStatus = true;
} else {
that.bindingStatus = false;
}
});
} else {
httpPostForJson(apiEquipmentQuery, {
name: that.deviceOAID,
status: "正常",
}).then((res) => {
that.bindingStatus = false;
});
}
}
);
},
fail:function(e){
console.log('getDeviceInfo failed: '+JSON.stringify(e));
that.bindingStatus = false;
}
});
}, },
getCode() { getCode() {
httpGet(code).then((res) => { httpGet(code).then((res) => {
......
...@@ -56,8 +56,8 @@ export default { ...@@ -56,8 +56,8 @@ export default {
data() { data() {
return { return {
loginForm: { loginForm: {
username: "", username: "testkc",
password: "", password: "123456",
uuid: "", uuid: "",
}, },
loading: false, loading: false,
...@@ -65,7 +65,8 @@ export default { ...@@ -65,7 +65,8 @@ export default {
keyboardShowType: "", keyboardShowType: "",
//设备OAID testkc test999 //设备OAID testkc test999
//testcc deviceOAID: "test888", //testcc deviceOAID: "test888",
deviceOAID: "", deviceOAID: "test999",
// deviceOAID: "140945db5f9b8e04",
//判断设备是否与车绑定 //判断设备是否与车绑定
bindingStatus: false, bindingStatus: false,
//绑定的车牌号 //绑定的车牌号
...@@ -79,18 +80,17 @@ export default { ...@@ -79,18 +80,17 @@ export default {
this.getCookie(); this.getCookie();
}, },
mounted() { mounted() {
console.log(window, 1111111);
//两种方法相互冲突,每次只需要一种,并且获取的id不一样 //两种方法相互冲突,每次只需要一种,并且获取的id不一样
//app获取设备号方法 //app获取设备号方法
this.appGetDeviceId(); // this.appGetDeviceId();
//5+app获取OAID方法 //5+app获取OAID方法
// if (window.plus) { if (window.plus) {
// this.plusReady(); this.plusReady();
// } else { } else {
// document.addEventListener("plusready", this.plusReady, false); document.addEventListener("plusready", this.plusReady, false);
// } }
}, },
components: { components: {
// Keyboard // Keyboard
...@@ -98,45 +98,41 @@ export default { ...@@ -98,45 +98,41 @@ export default {
methods: { methods: {
//app获取设备号方法 //app获取设备号方法
appGetDeviceId() { appGetDeviceId() {
let that = this; // let that = this;
let appDeviceId1 = window.Device.getDeviceId();
// let appDeviceId1 = window.Device.getDeviceId(); // let appDeviceId1 = window.Device.getDeviceId();
if (appDeviceId1) { // // let appDeviceId1 = window.Device.getDeviceId();
that.deviceOAID = appDeviceId1; // console.log("app设备号", window.Device);
//查询设备表是否存在该设备编号 // if (appDeviceId1) {
httpGet(apiEquipmentQuery, { name: that.deviceOAID }).then( // that.deviceOAID = appDeviceId1;
(resSheiBei) => { // //查询设备表是否存在该设备编号
if (resSheiBei.code == 200 && resSheiBei.data.totalElements != 0) { // httpGet(apiEquipmentQuery, { name: that.deviceOAID }).then(
//查询车辆表中设备是否与车辆绑定 // (resSheiBei) => {
httpGet(vehicleInformationQuery, { // if (resSheiBei.code == 200 && resSheiBei.data.totalElements != 0) {
equipmentName: that.deviceOAID, // //查询车辆表中设备是否与车辆绑定
}).then((resCar) => { // httpGet(vehicleInformationQuery, {
if (resCar.code == 200 && resCar.data.totalElements != 0) { // equipmentName: that.deviceOAID,
that.bindingStatus = true; // }).then((resCar) => {
} else { // if (resCar.code == 200 && resCar.data.totalElements != 0) {
that.bindingStatus = false; // that.bindingStatus = true;
} // } else {
}); // that.bindingStatus = false;
} else { // }
httpPostForJson(apiEquipmentQuery, { // });
name: that.deviceOAID, // } else {
status: "正常", // httpPostForJson(apiEquipmentQuery, {
}).then((res) => { // name: that.deviceOAID,
that.bindingStatus = false; // status: "正常",
}); // }).then((res) => {
} // that.bindingStatus = false;
} // });
); // }
} // }
// );
// }
}, },
//5+app获取OAID方法 //5+app获取OAID方法
plusReady() { plusReady() {
let that = this; // let that = this;
console.log("设备身份码:" + plus.device.imei);
console.log("用户识别码:" + plus.device.imsi);
console.log("设备型号信息:" + plus.device.model);
console.log("设备厂商信息:" + plus.device.vendor);
console.log("设备唯一标识号:" + plus.device.uuid);
// plus.device.getOAID({ // plus.device.getOAID({
// success: function (e) { // success: function (e) {
// console.log("oaid", e.oaid); // console.log("oaid", e.oaid);
...@@ -174,45 +170,6 @@ export default { ...@@ -174,45 +170,6 @@ export default {
// that.bindingStatus = false; // that.bindingStatus = false;
// }, // },
// }); // });
//无法获取oaid的设备尝试获取uuid或imei
plus.device.getInfo({
success:function(e){
console.log('getDeviceInfo success: '+JSON.stringify(e));
that.deviceOAID = e.uuid;
//查询设备表是否存在该设备编号
httpGet(apiEquipmentQuery, { name: that.deviceOAID }).then(
(resSheiBei) => {
if (
resSheiBei.code == 200 &&
resSheiBei.data.totalElements != 0
) {
//查询车辆表中设备是否与车辆绑定
httpGet(vehicleInformationQuery, {
equipmentName: that.deviceOAID,
}).then((resCar) => {
if (resCar.code == 200 && resCar.data.totalElements != 0) {
that.bindingStatus = true;
} else {
that.bindingStatus = false;
}
});
} else {
httpPostForJson(apiEquipmentQuery, {
name: that.deviceOAID,
status: "正常",
}).then((res) => {
that.bindingStatus = false;
});
}
}
);
},
fail:function(e){
console.log('getDeviceInfo failed: '+JSON.stringify(e));
that.bindingStatus = false;
}
});
}, },
getCode() { getCode() {
httpGet(code).then((res) => { httpGet(code).then((res) => {
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</div> </div>
<div class="sijikaoheTitle"> <div class="sijikaoheTitle">
<img src="../../../../assets/images/truckTuPian/fuxiaobiaotititle.png"> <img src="../../../../assets/images/truckTuPian/fuxiaobiaotititle.png">
<span>智能派单</span> <span>跑单记录</span>
</div> </div>
<!-- 卡车列表 --> <!-- 卡车列表 -->
<div class="co-table" v-if="carclass != '铲车'"> <div class="co-table" v-if="carclass != '铲车'">
......
...@@ -117,7 +117,7 @@ export default { ...@@ -117,7 +117,7 @@ export default {
type: 'success', type: 'success',
duration: 2500 duration: 2500
}); });
this.showDecide = false; this.viewClose();
this.$parent.safetySubmitCheckFn(); this.$parent.safetySubmitCheckFn();
}else{ }else{
this.$notify({ this.$notify({
......
...@@ -17,10 +17,19 @@ ...@@ -17,10 +17,19 @@
<div class="orderText2" @click="reachCD()" v-show="orderObj.status===1 && navStu===1"> <div class="orderText2" @click="reachCD()" v-show="orderObj.status===1 && navStu===1">
到达采点 到达采点
</div> </div>
<div class="orderText2" @click="reachCD()" v-show="orderObj.status===3"> <div class="orderText2" @click="loadTruck()" v-show="orderObj.status===3">
完成装车 完成装车
</div> </div>
<div class="orderText2" @click="navigation()" v-show="orderObj.status===4 && navStu===0">
导航前往
</div>
<div class="orderText2" @click="checkDestination()" v-show="orderObj.status===4 && navStu===1">
到达卸点
</div>
<div class="orderText2" @click="unloadTruck()" v-show="orderObj.status===5">
完成卸车
</div>
<audio id="audioMp3" controls :src="mp3Url" style="display:none;"></audio>
</div> </div>
</template> </template>
...@@ -33,9 +42,18 @@ import { ...@@ -33,9 +42,18 @@ import {
} from "@/common/httpBean.js"; } from "@/common/httpBean.js";
import { import {
tRealTimeOrder, tRealTimeOrder,
arriveCaiDian arriveCaiDian,
completeZC,
completeXC,
crossDB,
} from "@/axios/api.js"; } from "@/axios/api.js";
import newOrder from "@/assets/dingdan.mp3"; import xdd from "@/assets/audio/xdd.mp3";
import ddcd from "@/assets/audio/ddcd.mp3";
import qkjwj from "@/assets/audio/qkjwj.mp3";
import qzc from "@/assets/audio/qzc.mp3";
import gdb from "@/assets/audio/gdb.mp3";
import wdd from "@/assets/audio/wdd.mp3";
import ddwc from "@/assets/audio/ddwc.mp3";
export default { export default {
data() { data() {
...@@ -46,7 +64,8 @@ export default { ...@@ -46,7 +64,8 @@ export default {
sonTimer1: null, sonTimer1: null,
navStu: 0, navStu: 0,
orderStuText: '正在前往', orderStuText: '正在前往',
orderAudio: null orderAudio: null,
mp3Url:'',
}; };
}, },
mounted() { mounted() {
...@@ -71,25 +90,32 @@ export default { ...@@ -71,25 +90,32 @@ export default {
this.navStu=0; this.navStu=0;
this.orderStuText='正在前往'; this.orderStuText='正在前往';
this.orderObj = res.data; this.orderObj = res.data;
this.audioPlayByUrl(newOrder); this.audioPlayByUrl(xdd);
} else { } else {
if (res.data.id !== this.orderObj) { if (res.data.id !== this.orderObj) {
this.orderObj = res.data; this.orderObj = res.data;
} }
if (res.data.status === 6) { this.orderObj.status = res.data.status;
if (this.orderObj.status === 6) {
this.showDe = false; this.showDe = false;
this.$parent.kcListView = true; this.$parent.kcListView = true;
return; return;
} else { } else {
this.showDe = true; this.showDe = true;
} }
if (res.data.status === 2) { if (this.orderObj.status === 2) {
this.orderStuText = '等待装车'; this.orderStuText = '等待装车';
//播放靠近挖机语音 //播放靠近挖机语音
return; return;
} }
if (res.data.status === 3) { if (this.orderObj.status === 3) {
this.orderStuText = '开始装车'; this.orderStuText = '正在装车';
this.audioPlayByUrl(qzc);
return;
//播放根据提示进行装车
}
if (this.orderObj.status === 4) {
this.orderStuText = '完成装车';
//播放根据提示进行装车 //播放根据提示进行装车
} }
} }
...@@ -99,16 +125,111 @@ export default { ...@@ -99,16 +125,111 @@ export default {
} }
}); });
}, },
//导航开启 //点击导航
navigation() { navigation() {
// this.$parent.zhixinglujing(true, this.carnumber, this.carDestination); // this.$parent.zhixinglujing(true, this.carnumber, this.carDestination);
this.navStu = 1; this.navStu = 1;
}, },
//到达采点 //点击到达采点
reachCD() { reachCD() {
putForJson(arriveCaiDian,{orderNumber: this.orderObj.orderNumber}).then((res) => { putForJson(arriveCaiDian,{carNumber:this.carNumber,orderNumber: this.orderObj.orderNumber}).then((res) => {
if(res.code===200){ if(res.code===200){
this.navStu = 2; if(res.data>0){
this.navStu = 0;
this.audioPlayByUrl(ddcd);
this.queryOrder();
}else{
this.$notify({
title: res.msg,
type: "warning",
duration: 5000,
dangerouslyUseHTMLString: true,
});
this.audioPlayByUrl(qkjwj);
}
} else {
this.$notify({
title: '网络异常,请稍后再试',
type: "warning",
duration: 5000,
dangerouslyUseHTMLString: true,
});
}
});
},
//点击完成装车
loadTruck() {
putForJson(completeZC,{kc:this.carNumber, orderNumber: this.orderObj.orderNumber}).then((res) => {
if(res.code===200){
this.$notify({
title: res.msg,
type: "warning",
duration: 5000,
dangerouslyUseHTMLString: true,
});
this.queryOrder();
} else {
this.$notify({
title: '网络异常,请稍后再试',
type: "warning",
duration: 5000,
dangerouslyUseHTMLString: true,
});
}
});
},
//校验目的地
checkDestination() {
if(this.$parent.currArea==this.orderObj.xcArea){
this.navStu = 0;
this.$notify({
title: '您已到达'+this.orderObj.xcArea+',请卸车',
type: "warning",
duration: 5000,
dangerouslyUseHTMLString: true,
});
this.orderObj.status=0;
this.orderStuText = '正在卸车';
putForJson(crossDB,{orderNumber: this.orderObj.orderNumber}).then((res) => {
if(res.code===200){
this.$notify({
title: res.msg,
type: "warning",
duration: 5000,
dangerouslyUseHTMLString: true,
});
this.queryOrder();
this.audioPlayByUrl(gdb);
} else {
this.$notify({
title: '网络异常,请稍后再试',
type: "warning",
duration: 5000,
dangerouslyUseHTMLString: true,
});
}
});
}else{
this.$notify({
title: '您尚未到达'+this.orderObj.xcArea,
type: "warning",
duration: 5000,
dangerouslyUseHTMLString: true,
});
this.audioPlayByUrl(wdd);
}
},
//点击完成卸车
unloadTruck() {
httpDelForJson(completeXC,{id: this.orderObj.id, orderNumber: this.orderObj.orderNumber}).then((res) => {
if(res.code===200){
this.$notify({
title: res.msg,
type: "warning",
duration: 5000,
dangerouslyUseHTMLString: true,
});
this.audioPlayByUrl(ddwc);
this.queryOrder(); this.queryOrder();
} else { } else {
this.$notify({ this.$notify({
...@@ -122,12 +243,20 @@ export default { ...@@ -122,12 +243,20 @@ export default {
}, },
//播放语音 //播放语音
audioPlayByUrl(url) { audioPlayByUrl(url) {
if(!this.orderAudio){ this.$nextTick(() => {
this.orderAudio = document.createElement("audio"); this.mp3Url = url;
} let au = document.getElementById("audioMp3");
this.orderAudio.currentTime = 0; au.currentTime = 0;
this.orderAudio.src = url; setTimeout(()=>{
this.orderAudio.play(); au.play();
},500);
});
// if(!this.orderAudio){
// this.orderAudio = document.createElement("audio");
// }
// this.orderAudio.currentTime = 0;
// this.orderAudio.src = url;
// this.orderAudio.play();
}, },
//关闭清除定时器 //关闭清除定时器
dingshiqiCloseFn() { dingshiqiCloseFn() {
......
...@@ -98,10 +98,11 @@ ...@@ -98,10 +98,11 @@
<div class="waitingtrucksView_title">待装卡车列表</div> <div class="waitingtrucksView_title">待装卡车列表</div>
<div class="waitingtrucksView_content"> <div class="waitingtrucksView_content">
<div v-for="(item, index) in daizhangCar" :key="index"> <div v-for="(item, index) in daizhangCar" :key="index">
<div>车牌号:{{ item.number }}</div> <div>车牌号:{{ item.kc }}</div>
<button class="daizhangCarBtn1" @click="wanchengzhuangcheFn(item)"> <button v-show="item.status===1" class="daizhangCarBtn1" @click="wanchengzhuangcheFn(item)">
准备装车 邀请装车
</button> </button>
<span v-show="item.status===2" style="color:white;opacity:40%">正在装车...</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -126,7 +127,7 @@ import { ...@@ -126,7 +127,7 @@ import {
getAllLoadableKC, getAllLoadableKC,
vehicleInformationUpdate, vehicleInformationUpdate,
dingDanBiaoCaoZuo, dingDanBiaoCaoZuo,
manualSchedulingQuery, chooseKCZC,
getalarmRealQuery, getalarmRealQuery,
dispatchFinishQuery, dispatchFinishQuery,
carRealTimeLocationQuery2, carRealTimeLocationQuery2,
...@@ -136,7 +137,7 @@ import { ...@@ -136,7 +137,7 @@ import {
faultDayAdd, faultDayAdd,
faultMonthAdd, faultMonthAdd,
faultYearAdd, faultYearAdd,
creatOrder, crossingFence,
} from "@/axios/api.js"; } from "@/axios/api.js";
import axios from "axios"; import axios from "axios";
import startOrderReceiving from "./components/startOrderReceiving/index.vue"; //接受派单 import startOrderReceiving from "./components/startOrderReceiving/index.vue"; //接受派单
...@@ -163,7 +164,6 @@ import luzhangtubiao from "@/assets/images/truckTuPian/luzhang.png"; ...@@ -163,7 +164,6 @@ import luzhangtubiao from "@/assets/images/truckTuPian/luzhang.png";
import 'maptalks/dist/maptalks.css'; import 'maptalks/dist/maptalks.css';
import * as maptalks from 'maptalks'; import * as maptalks from 'maptalks';
import {crossingFence} from "../../axios/api";
import { config as appConfig } from '@/config.js'; import { config as appConfig } from '@/config.js';
export default { export default {
...@@ -213,8 +213,6 @@ export default { ...@@ -213,8 +213,6 @@ export default {
jsession: "", jsession: "",
//摄像头车辆设备号 //摄像头车辆设备号
devices: "", devices: "",
//禁用完成装车
interdictBtn: false,
//语音组件播放 //语音组件播放
indexSrcUrl: "", indexSrcUrl: "",
//语音数据 //语音数据
...@@ -757,8 +755,6 @@ export default { ...@@ -757,8 +755,6 @@ export default {
httpGet(getAllLoadableKC, {carNumber: this.carnumber}).then((res) => { httpGet(getAllLoadableKC, {carNumber: this.carnumber}).then((res) => {
if (res.code == 200 && res.data && res.data.length) { if (res.code == 200 && res.data && res.data.length) {
this.daizhangCar = res.data; this.daizhangCar = res.data;
console.log(this.daizhangCar)
this.interdictBtn = false;
} }
}); });
}, },
...@@ -1147,69 +1143,27 @@ export default { ...@@ -1147,69 +1143,27 @@ export default {
} }
}, },
//完成装车 //完成装车
wanchengzhuangcheFn(number, id, odd) { wanchengzhuangcheFn(item) {
console.log(number, id, odd, "完成装车"); item.status=2;
this.finishNum = number; putForJson(chooseKCZC,item).then((res) => {
this.interdictBtn = true; if(res.code===200){
//改订单状态 this.$notify({
httpGet(manualSchedulingQuery, { title: res.msg,
sort: "createTime,desc", type: "warning",
size: 1, duration: 5000,
carNo: number, dangerouslyUseHTMLString: true,
}).then((res) => { });
if (res.code == 200) { } else {
if (res.data.totalElements == 0) { this.$notify({
} else { title: '网络异常,请稍后再试',
putForJson(manualSchedulingQuery, { type: "warning",
id: res.data.content[0].id, duration: 5000,
status: 0, dangerouslyUseHTMLString: true,
}).then((res) => { });
});
}
}
});
//查询Oredr接口,判断是智能调度还是人工调度从而进行车辆信息状态修改
httpGet(dingDanBiaoCaoZuo, {
carNo: number,
size: 1,
sort: "createTime,desc",
}).then((res) => {
if (res.code == 200) {
if (res.data.content[0].flag != 0) {
//车辆信息状态修改
httpGet(vehicleInformationQuery, {number: number}).then(
(res11) => {
if (res11.code == 200) {
putForJson(vehicleInformationUpdate, {
id: res11.data.content[0].id,
workStatus: 0,
weightStatus: 1,
oddStatus: 1,
}).then((res) => {
});
}
}
);
} else {
//车辆信息状态修改
httpGet(vehicleInformationQuery, {number: number}).then(
(res11) => {
if (res11.code == 200) {
putForJson(vehicleInformationUpdate, {
id: res11.data.content[0].id,
workStatus: 0,
weightStatus: 1,
}).then((res) => {
});
}
}
);
}
} }
}); });
//智能调度是否完成
this.finishDispatch(number);
}, },
//智能调度是否完成
finishDispatch(number1) { finishDispatch(number1) {
let that = this; let that = this;
let number = number1 || this.finishNum; let number = number1 || this.finishNum;
......
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