Browse Source

配送计划地图呈现、市配配送编辑数据回显

dev-warehouse
kilo 2 years ago
parent
commit
a07d107b8c
  1. 2
      src/views/distribution/deliverylist/distributionDeliveryList.vue
  2. 2
      src/views/distribution/deliverylist/distributionDeliveryListdis.vue
  3. 4
      src/views/distribution/deliverylist/distributionDeliveryListmar.vue
  4. 1
      src/views/distribution/reservation/atlas.vue
  5. 108
      src/views/distribution/reservation/atlas1.vue
  6. 2
      src/views/distribution/turndelivery/deliveryDiscuss.vue
  7. 148
      src/views/distribution/turndelivery/deliveryMarket.vue

2
src/views/distribution/deliverylist/distributionDeliveryList.vue

@ -52,7 +52,7 @@
<template #default="slotProps"> <template #default="slotProps">
<el-button size="small" @click="editsolt(slotProps.scope)"> </el-button> <el-button size="small" @click="editsolt(slotProps.scope)"> </el-button>
<el-button size="small" @click="editmap(slotProps.scope)"> </el-button> <el-button size="small" @click="editmap(slotProps.scope)"> </el-button>
<el-button size="small" @click="costadd(slotProps.scope)"> </el-button> <!-- <el-button size="small" @click="costadd(slotProps.scope)"> </el-button>-->
</template> </template>
</tablecmt> </tablecmt>
<!-- <el-table ref="table" v-loading="loading"--> <!-- <el-table ref="table" v-loading="loading"-->

2
src/views/distribution/deliverylist/distributionDeliveryListdis.vue

@ -43,7 +43,7 @@
<el-button size="small" @click="editsolt(slotProps.scope)"> </el-button> <el-button size="small" @click="editsolt(slotProps.scope)"> </el-button>
<el-button size="small" @click="editmap(slotProps.scope)"> </el-button> <el-button size="small" @click="editmap(slotProps.scope)"> </el-button>
<el-button size="small" @click="handleEdit(slotProps.scope)"> </el-button> <el-button size="small" @click="handleEdit(slotProps.scope)"> </el-button>
<el-button size="small" @click="costadd(slotProps.scope)"> </el-button> <!-- <el-button size="small" @click="costadd(slotProps.scope)"> </el-button>-->
</template> </template>
</tablecmt> </tablecmt>
<!-- <el-table ref="table" v-loading="loading"--> <!-- <el-table ref="table" v-loading="loading"-->

4
src/views/distribution/deliverylist/distributionDeliveryListmar.vue

@ -40,8 +40,8 @@
<template #default="slotProps"> <template #default="slotProps">
<el-button size="small" @click="editsolt(slotProps.scope)"> </el-button> <el-button size="small" @click="editsolt(slotProps.scope)"> </el-button>
<el-button size="small" @click="editmap(slotProps.scope)"> </el-button> <el-button size="small" @click="editmap(slotProps.scope)"> </el-button>
<el-button size="small" @click="handleEdit(slotProps.scope)"> </el-button> <!-- <el-button size="small" @click="handleEdit(slotProps.scope)"> </el-button>-->
<el-button size="small" @click="costadd(slotProps.scope)"> </el-button> <!-- <el-button size="small" @click="costadd(slotProps.scope)"> </el-button>-->
</template> </template>
</tablecmt> </tablecmt>
<!-- <el-table ref="table" v-loading="loading"--> <!-- <el-table ref="table" v-loading="loading"-->

1
src/views/distribution/reservation/atlas.vue

@ -41,6 +41,7 @@ export default {
type:true, type:true,
} }
}, },
mounted() { mounted() {
let router = useRouter(); let router = useRouter();
let type =router.currentRoute.value.query.type let type =router.currentRoute.value.query.type

108
src/views/distribution/reservation/atlas1.vue

@ -1,26 +1,27 @@
<template> <template>
<div class="bmap" id="container" style="float: left"></div> <div class="bmap" id="container" ></div>
<div <!-- <div-->
style=" <!-- style="-->
border: 1px solid pink; <!-- border: 1px solid pink;-->
margin-left: 5px; <!-- margin-left: 5px;-->
height: 600px; <!-- height: 600px;-->
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); <!-- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);-->
" <!-- "-->
> <!-- >-->
<!-- @change="handleCheckedCitiesChange"--> <!-- &lt;!&ndash; @change="handleCheckedCitiesChange"&ndash;&gt;-->
<el-checkbox-group v-model="reservationIds"> <!-- <el-checkbox-group v-model="reservationIds">-->
<el-col v-for="(item, index) in reservationData"> <!-- <el-col v-for="(item, index) in reservationData">-->
<el-checkbox :label="item.id" :key="item.id" <!-- <el-checkbox :label="item.id" :key="item.id"-->
>{{ item.consignee }}&emsp;{{ item.deliveryAddress }}&emsp;{{ <!-- >{{ item.consignee }}&emsp;{{ item.deliveryAddress }}&emsp;{{-->
item.deliveryPhone <!-- item.deliveryPhone-->
}}</el-checkbox <!-- }}-->
> <!-- </el-checkbox-->
</el-col> <!-- >-->
</el-checkbox-group> <!-- </el-col>-->
</div> <!-- </el-checkbox-group>-->
<!-- </div>-->
<div style="margin-left: 40%; margin-top: 5%; float: bottom"> <div style="margin-left: 50%; margin-top: 5%; float: bottom">
<el-button icon="el-icon-circle-close" @click="back"> </el-button> <el-button icon="el-icon-circle-close" @click="back"> </el-button>
</div> </div>
</template> </template>
@ -29,9 +30,12 @@
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { getReservationAddr } from '@/api/distribution/distributionReservation'; import { getReservationAddr } from '@/api/distribution/distributionReservation';
import { getDictionaryBiz } from '@/api/system/dict'; import { getDictionaryBiz } from '@/api/system/dict';
import { selectStockArticleAtlasInfo} from '@/api/distribution/distributionDeliveryList' import { selectStockArticleAtlasInfo } from '@/api/distribution/distributionDeliveryList';
import { onMounted, reactive, toRefs, watchEffect } from 'vue'; import { onMounted, reactive, toRefs, createApp } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { ref, watch } from "vue"
let router = useRouter(); let router = useRouter();
let details = reactive({ let details = reactive({
name: 'BmapDemo', name: 'BmapDemo',
@ -40,25 +44,41 @@ let details = reactive({
addressList: [], addressList: [],
reservationData: [], reservationData: [],
reservationIds: [], reservationIds: [],
mapLoc: null, mapLoc: null
}); });
onMounted(() => { onMounted(() => {
details.item = JSON.parse(router.currentRoute.value.query.item); details.item = JSON.parse(router.currentRoute.value.query.item);
console.log("details.item.id------------->",details.item.id);
selectStockArticleAtlasInfo(details.item.id).then(res=>{ console.log('details.item.id------------->', details.item.id);
console.log("-------------->",res);
}) watch(details.item.id, (newValue, oldValue) => {
console.log("------------->",details.item); console.log("item变了", newValue, oldValue);
setTimeout(() => { a(details.item);
init(); },{immediate:true});
}, 1500); console.log('------------->', details.item);
// setTimeout(()=>{ // setTimeout(()=>{
// details.mapLoc.clearOverlays(); // details.mapLoc.clearOverlays();
// },9500) // },9500)
}); });
function init() {
function a(data) {
selectStockArticleAtlasInfo(data.id).then(res => {
const data = res.data.data;
console.log('res------------->', data);
setTimeout(() => {
init(data);
}, 1500);
});
}
function init(data) {
details.mapLoc = new BMapGL.Map('container'); // details.mapLoc = new BMapGL.Map('container'); //
let point = new BMapGL.Point(116.404, 39.915); // let point = new BMapGL.Point(116.404, 39.915); //
details.mapLoc.centerAndZoom(point, 12); details.mapLoc.centerAndZoom(point, 12);
@ -67,8 +87,16 @@ function init() {
if (details.mapLoc) { if (details.mapLoc) {
details.mapLoc.clearOverlays(); //label details.mapLoc.clearOverlays(); //label
} }
maplabel('四川成都龙泉驿区','展示的内容', 0); let a = data;
a.forEach((item,index)=>{
console.log('item------------->', item);
maplabel(item.customerAddress, item.customerName+"--"+item.customerAddress+"--"+item.customerTelephone, index);
// maplabel('-1-26-154', '', 0);
})
} }
function maplabel(address, contents, index) { function maplabel(address, contents, index) {
let myGeo = new BMapGL.Geocoder(); let myGeo = new BMapGL.Geocoder();
myGeo.getPoint(address, function(point) { myGeo.getPoint(address, function(point) {
@ -81,7 +109,7 @@ function maplabel(address,contents, index) {
let label = new BMapGL.Label(content, { let label = new BMapGL.Label(content, {
// //
position: point, position: point,
offset: new BMapGL.Size(10, 20), offset: new BMapGL.Size(10, 20)
}); });
details.mapLoc.addOverlay(label); // details.mapLoc.addOverlay(label); //
label.setStyle({ label.setStyle({
@ -90,7 +118,7 @@ function maplabel(address,contents, index) {
fontSize: '10px', fontSize: '10px',
border: '1px solid #1E90FF', border: '1px solid #1E90FF',
borderRadius: '20px', borderRadius: '20px',
padding: '5px 10px', padding: '5px 10px'
}); });
console.log(label, '---------------'); console.log(label, '---------------');
} else { } else {
@ -100,15 +128,19 @@ function maplabel(address,contents, index) {
} }
}); });
} }
function back() { function back() {
router.back(-1); router.back(-1);
} }
const { reservationIds }=toRefs(details)
const { reservationIds } = toRefs(details);
</script> </script>
<style scoped> <style scoped>
.bmap { .bmap {
width: 800px; margin-top: 2%;
width: 1800px;
height: 600px; height: 600px;
border: 1px solid pink; border: 1px solid pink;
} }

2
src/views/distribution/turndelivery/deliveryDiscuss.vue

@ -1479,7 +1479,7 @@
let data = res.data.data; let data = res.data.data;
Object.assign(this.stockUpForm,data.reservationInfo) Object.assign(this.stockUpForm,data.reservationInfo)
Object.assign(this.stockUpForm,data.stockupInfo) Object.assign(this.stockUpForm,data.stockupInfo)
this.stockUpForm.deliveryType = '10'; this.stockUpForm.deliveryType = '1';
this.stockUpForm.deliveryWay = data.reservationInfo.deliveryWay; this.stockUpForm.deliveryWay = data.reservationInfo.deliveryWay;
this.serveType = data.reservationInfo.serveType.split(","); this.serveType = data.reservationInfo.serveType.split(",");
if (data.stockupInfo){ if (data.stockupInfo){

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

@ -177,7 +177,8 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="备货时间:" prop="goodsShelfId"> <el-form-item label="备货时间:" prop="goodsShelfId">
<el-date-picker v-model="stockUpForm.stockupDate" type="datetime" placeholder="请选择备货时间" :disabled="isDisable"> <el-date-picker v-model="stockUpForm.stockupDate" type="datetime" placeholder="请选择备货时间"
:disabled="isDisable">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -243,6 +244,13 @@
:key="index"> :key="index">
</el-table-column> </el-table-column>
</template> </template>
<el-table-column prop="menu" label="操作" :width="220" align="center" v-if="isoperation">
<template #="{row}">
<el-button type="primary" link icon="el-icon-edit" @click="removeStockArticle(row)">移除
</el-button>
</template>
</el-table-column>
<!-- 操作栏模块 --> <!-- 操作栏模块 -->
</el-table> </el-table>
</el-row> </el-row>
@ -457,6 +465,7 @@
}, },
isInitialized: false, isInitialized: false,
isUpdate: false, isUpdate: false,
isoperation: false
}; };
}, },
watch: { watch: {
@ -546,9 +555,9 @@
// //
async getTeam() { async getTeam() {
let params = this.deptId; let params = this.deptId;
console.log("%%%%%%%%%",params); console.log('%%%%%%%%%', params);
getListTeamInfo(params).then(res => { getListTeamInfo(params).then(res => {
console.log("aaaaaaaaa",res.data.data); console.log('aaaaaaaaa', res.data.data);
let fo = []; let fo = [];
res.data.data.forEach(i => { res.data.data.forEach(i => {
let a = { let a = {
@ -563,9 +572,9 @@
// //
async getStorageArea() { async getStorageArea() {
let params = this.deptId; let params = this.deptId;
console.log("^^^^^^^^^^^^^",params); console.log('^^^^^^^^^^^^^', params);
stockUpInfo(params).then(res => { stockUpInfo(params).then(res => {
console.log("=========================》",res); console.log('=========================》', res);
let fo = []; let fo = [];
res.data.data.forEach(i => { res.data.data.forEach(i => {
let v = { let v = {
@ -582,20 +591,20 @@
return new Promise((rv, rev) => { return new Promise((rv, rev) => {
getDriverList(1, 10, '').then(res => { getDriverList(1, 10, '').then(res => {
this.driverData = res.data.data.records; this.driverData = res.data.data.records;
console.log("===============>",res.data.data); console.log('===============>', res.data.data);
rv(res.data.data.records) rv(res.data.data.records);
});
}); });
})
}, },
selectionChange(list) { selectionChange(list) {
// //
this.selectionList = list; this.selectionList = list;
console.log(" this.selectionList = list", this.selectionList); console.log(' this.selectionList = list', this.selectionList);
this.orderData.forEach(item => { this.orderData.forEach(item => {
if (item.id === this.obj.id) { if (item.id === this.obj.id) {
item.isUpdate = true; item.isUpdate = true;
} }
}) });
// //
// this.obj. // this.obj.
}, },
@ -609,15 +618,15 @@
return new Promise((rv, rev) => { return new Promise((rv, rev) => {
getVehicleList(1, 10, '').then(res => { getVehicleList(1, 10, '').then(res => {
this.vehicleData = res.data.data.records; this.vehicleData = res.data.data.records;
console.log("^^^^^^^^^^^^^^^^",res.data.data); console.log('^^^^^^^^^^^^^^^^', res.data.data);
rv(res.data.data.records) rv(res.data.data.records);
});
}); });
})
}, },
fetchData() { fetchData() {
this.error = this.post = null; this.error = this.post = null;
this.loading = true; this.loading = true;
console.log("this.$route.query",this.$route.query); console.log('this.$route.query', this.$route.query);
if (this.$route.query.id) { if (this.$route.query.id) {
this.reservationIds = this.$route.query.id; this.reservationIds = this.$route.query.id;
} }
@ -626,6 +635,17 @@
} }
}, },
removeStockArticle(row){
if (this.data.length===1){
this.$message({
message: '无法进行预约任务取消!!!',
type: 'warning'
});
return;
}
console.log("row------------->",row);
},
viewDriverInfo() { viewDriverInfo() {
console.log(this.driverInfo.length); console.log(this.driverInfo.length);
console.log(this.vehticleInfo.length); console.log(this.vehticleInfo.length);
@ -751,15 +771,22 @@
data.taskTime = this.form.taskTime; data.taskTime = this.form.taskTime;
} }
} }
console.log('this.data------------>', this.data);
if (!this.deliveryListId) {
data.reservationIds = this.reservationIds; data.reservationIds = this.reservationIds;
console.log("this.data------------>",this.data); console.log('>>>>>>>>>>>>', data);
console.log(">>>>>>>>>>>>",data);
deliveryTask(data).then((res) => { deliveryTask(data).then((res) => {
this.$router.push({ this.$router.push({
path: '/distribution/deliverylist/distributionDeliveryListmar', path: '/distribution/deliverylist/distributionDeliveryListmar',
name: '配送市配列表' name: '配送市配列表'
}); });
}); });
} else {
data.reservationInfos =this.data ;
console.log('>>>>>>>>>>>>', data);
console.log('-------------》', '修改提交');
}
}, },
changeVehicle(params) { changeVehicle(params) {
console.log(params); console.log(params);
@ -814,7 +841,7 @@
} else { } else {
this.$message({ this.$message({
message: '已经是第一条,上移失败', message: '已经是第一条,上移失败',
type: 'warning', type: 'warning'
}); });
} }
console.log(this.vehticleInfo); console.log(this.vehticleInfo);
@ -889,8 +916,8 @@
} }
this.aaa = true; this.aaa = true;
this.bbb = false; this.bbb = false;
this.stockUpForm.deliveryType="2"; this.stockUpForm.deliveryType = '2';
this.stockUpForm.deliveryWay="2"; this.stockUpForm.deliveryWay = '2';
this.stockUpForm.stockupDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.stockUpForm.stockupDate = dayjs().format('YYYY-MM-DD HH:mm:ss');
this.form.taskTime = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.form.taskTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss');
@ -909,8 +936,8 @@
} }
this.aaa = false; this.aaa = false;
this.bbb = true; this.bbb = true;
this.stockUpForm.deliveryType="2"; this.stockUpForm.deliveryType = '2';
this.stockUpForm.deliveryWay="2"; this.stockUpForm.deliveryWay = '2';
this.form.taskTime = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.form.taskTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
this.stockUpForm.stockupDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.stockUpForm.stockupDate = dayjs().format('YYYY-MM-DD HH:mm:ss');
this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss');
@ -921,20 +948,20 @@
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
// //
this.stockUpForm.deliveryType="2"; this.stockUpForm.deliveryType = '2';
this.stockUpForm.deliveryWay="2"; this.stockUpForm.deliveryWay = '2';
this.stockUpForm.stockupDate = new Date(); this.stockUpForm.stockupDate = new Date();
this.form.taskTime = new Date(); this.form.taskTime = new Date();
this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss');
this.stockUpForm.otherFee = 0; this.stockUpForm.otherFee = 0;
this.loadAndUnload = ["1","2"] ; this.loadAndUnload = ['1', '2'];
if (this.reservationIds) { if (this.reservationIds) {
console.log("》》》》》》》》》》》》》》》",this.reservationIds); this.isoperation = false;
console.log('》》》》》》》》》》》》》》》', this.reservationIds);
let ids = this.reservationIds; let ids = this.reservationIds;
getReservationAddr(ids).then(res => { getReservationAddr(ids).then(res => {
console.log("------------->",res); console.log('------------->', res);
const reservationData = res.data.data; const reservationData = res.data.data;
this.page.total = reservationData.total; this.page.total = reservationData.total;
this.data = reservationData.records; this.data = reservationData.records;
@ -943,16 +970,68 @@
}); });
} }
if (this.deliveryListId) { if (this.deliveryListId) {
console.log("<<<<<<<<<<",this.deliveryListId); this.isoperation = true;
console.log('<<<<<<<<<<', this.deliveryListId);
// //
getMarketDeliveryList(this.deliveryListId).then(res=>{ getMarketDeliveryList(this.deliveryListId).then(async res => {
console.log(res.data.data); 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.stockupInfo.loaderId;
this.stockUpForm.taskTime = deliveryData.taskTime;
console.log('reservationInfo--------------->', res.data.data.reservationInfo);
this.data = res.data.data.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.deliveryDriver = b;
this.driverList = b;
this.driverInfo = driverInfo;
} else {
}
});
} }
this.loading = false; this.loading = false;
}, }
}, }
}; };
</script> </script>
@ -973,14 +1052,17 @@
border-bottom: 4px solid #ffffff; border-bottom: 4px solid #ffffff;
// background-color: #ffffff; // background-color: #ffffff;
} }
.check { .check {
color: #D3832A; color: #D3832A;
border-bottom: 4px solid #D3832A; border-bottom: 4px solid #D3832A;
} }
} }
.minaxbox { .minaxbox {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.tophed { .tophed {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;

Loading…
Cancel
Save