Browse Source

修复市配bug

dev-xx
qb 9 months ago
parent
commit
dfc81d95c9
  1. 159
      src/views/distribution/turndelivery/deliveryMarket.vue

159
src/views/distribution/turndelivery/deliveryMarket.vue

@ -1603,7 +1603,6 @@ export default {
}
}
}
console.log('this.vehticleList :>> ', this.vehticleList);
break;
}
}
@ -1744,12 +1743,20 @@ export default {
ddd() {
if (this.deliveryListId) {
this.vehicleIds = [];
this.vehticleList = [];
this.vehticleInfo = [];
this.driverInfo = [];
this.deliveryDriver = [];
this.driverForm.masterDriverName = '';
this.driverForm.masterVehicleNub = '';
this.driverForm = {};
} else {
// this.loadAndUnload = [];
this.vehicleIds = [];
this.vehticleList = [];
this.vehticleInfo = [];
this.driverInfo = [];
this.deliveryDriver = [];
this.serveType = [];
this.driverForm = {};
this.waixieForm = {};
@ -1791,85 +1798,83 @@ export default {
this.isoperation = true;
//
getMarketDeliveryList(this.deliveryListId).then(async res => {
console.log('--------------->', res.data.data);
const deliveryData = res.data.data;
// this.stockUpForm.outboundDate = deliveryData.stockupInfo.outboundDate;
// this.stockUpForm.taskTime = deliveryData.stockupInfo.taskTime;
// this.stockUpForm.goodsAreaId = deliveryData.stockupInfo.goodsAreaId;
// this.stockUpForm.forklift = deliveryData.stockupInfo.forkliftId;
this.stockUpForm.loader = deliveryData.loadingTeamId;
this.stockUpForm.unloader = deliveryData.unloadingTeamId;
this.stockUpForm.taskTime = deliveryData.taskTime;
// this.stockUpForm.stockupDate = deliveryData.stockupInfo.stockupDate;
this.stockUpForm.remarks = deliveryData.remarks;
// if (deliveryData.stockupInfo.teamResponsibility) {
// this.loadAndUnload = deliveryData.stockupInfo.teamResponsibility.split(',');
// }
console.log('reservationInfo--------------->', res.data.data.reservationInfo);
this.reservationData = deliveryData.reservationInfos;
if (deliveryData.kind === '1') {
//
let self = deliveryData.deliverySelfVO;
let vehicle = await this.getvehicleData();
console.log('___________________-->', vehicle);
let driver = await this.getMasterDriverData();
let a = [];
let b = [];
let vehicleInfo = [];
vehicle.forEach(item => {
self.forEach(s => {
if (item.id === s.vehicleId) {
a.push(s.vehicleId);
vehicleInfo.push(item);
}
if (s.isMaster === 2) {
this.driverForm.masterVehicleNub = s.vehicleNub;
}
getMarketDeliveryList(this.deliveryListId)
.then(async res => {
console.log('--------------->', res.data.data);
const deliveryData = res.data.data;
// this.stockUpForm.outboundDate = deliveryData.stockupInfo.outboundDate;
// this.stockUpForm.taskTime = deliveryData.stockupInfo.taskTime;
// this.stockUpForm.goodsAreaId = deliveryData.stockupInfo.goodsAreaId;
// this.stockUpForm.forklift = deliveryData.stockupInfo.forkliftId;
this.stockUpForm.loader = deliveryData.loadingTeamId;
this.stockUpForm.unloader = deliveryData.unloadingTeamId;
this.stockUpForm.taskTime = deliveryData.taskTime;
// this.stockUpForm.stockupDate = deliveryData.stockupInfo.stockupDate;
this.stockUpForm.remarks = deliveryData.remarks;
// if (deliveryData.stockupInfo.teamResponsibility) {
// this.loadAndUnload = deliveryData.stockupInfo.teamResponsibility.split(',');
// }
console.log('reservationInfo--------------->', res.data.data.reservationInfo);
this.reservationData = deliveryData.reservationInfos;
if (deliveryData.kind === '1') {
//
let self = deliveryData.deliverySelfVO;
let vehicle = await this.getvehicleData();
console.log('___________________-->', vehicle);
let driver = await this.getMasterDriverData();
let a = [];
let b = [];
let vehicleInfo = [];
vehicle.forEach(item => {
self.forEach(s => {
if (item.id === s.vehicleId) {
a.push(s.vehicleId);
vehicleInfo.push(item);
}
if (s.isMaster === 2) {
this.driverForm.masterVehicleNub = s.vehicleNub;
}
});
});
});
this.vehticleList = a;
this.vehicleIds = a;
console.log(' this.vehicleIds', this.vehicleIds);
this.vehticleInfo = vehicleInfo;
let driverInfo = [];
driver.forEach(item => {
self.forEach(s => {
if (item.id === s.driverId) {
b.push(s.driverId);
driverInfo.push(item);
}
if (s.isMaster === 2) {
this.driverForm.masterDriverName = s.driverName;
}
this.vehticleList = a;
this.vehicleIds = a;
console.log(' this.vehicleIds', this.vehicleIds);
this.vehticleInfo = vehicleInfo;
let driverInfo = [];
driver.forEach(item => {
self.forEach(s => {
if (item.id === s.driverId) {
b.push(s.driverId);
driverInfo.push(item);
}
if (s.isMaster === 2) {
this.driverForm.masterDriverName = s.driverName;
}
});
});
});
console.log('***********', b);
this.deliveryDriver = b;
this.driverList = b;
this.driverInfo = driverInfo;
this.loadingObj.pageLoading=false
} else {
let deliveryTripartiteVO = deliveryData.deliveryTripartiteVO;
this.aaa = false;
this.bbb = true;
// this.form.tripartiteSource = deliveryTripartiteVO.distributionCompanyId;
this.waixieForm.tripartiteSource = '1';
this.waixieForm.driverName = deliveryTripartiteVO.driverName;
this.waixieForm.vehicleNum = deliveryTripartiteVO.vehicleNum;
this.waixieForm.driverPhone = deliveryTripartiteVO.driverPhone;
this.waixieForm.deliveryFee = deliveryTripartiteVO.deliveryFee;
this.loadingObj.pageLoading=false
}
}).catch(()=>{
}).finally(()=>{
this.loading = false;
});
console.log('***********', b);
this.deliveryDriver = b;
this.driverList = b;
this.driverInfo = driverInfo;
this.loadingObj.pageLoading = false;
} else {
let deliveryTripartiteVO = deliveryData.deliveryTripartiteVO;
this.aaa = false;
this.bbb = true;
// this.form.tripartiteSource = deliveryTripartiteVO.distributionCompanyId;
this.waixieForm.tripartiteSource = '1';
this.waixieForm.driverName = deliveryTripartiteVO.driverName;
this.waixieForm.vehicleNum = deliveryTripartiteVO.vehicleNum;
this.waixieForm.driverPhone = deliveryTripartiteVO.driverPhone;
this.waixieForm.deliveryFee = deliveryTripartiteVO.deliveryFee;
this.loadingObj.pageLoading = false;
}
})
.catch(() => {})
.finally(() => {
this.loading = false;
});
}
},
},
};

Loading…
Cancel
Save