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. 242
      src/views/distribution/reservation/atlas1.vue
  6. 2
      src/views/distribution/turndelivery/deliveryDiscuss.vue
  7. 1350
      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

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

@ -1,115 +1,147 @@
<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">
<el-button icon="el-icon-circle-close" @click="back"> </el-button> <div style="margin-left: 50%; margin-top: 5%; float: bottom">
</div> <el-button icon="el-icon-circle-close" @click="back"> </el-button>
</div>
</template> </template>
<script setup> <script setup>
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';
let router = useRouter(); import { ref, watch } from "vue"
let details = reactive({
name: 'BmapDemo',
item: null, let router = useRouter();
error: null, let details = reactive({
addressList: [], name: 'BmapDemo',
reservationData: [], item: null,
reservationIds: [], error: null,
mapLoc: null, addressList: [],
}); reservationData: [],
onMounted(() => { reservationIds: [],
details.item = JSON.parse(router.currentRoute.value.query.item); mapLoc: null
console.log("details.item.id------------->",details.item.id); });
selectStockArticleAtlasInfo(details.item.id).then(res=>{
console.log("-------------->",res);
}) onMounted(() => {
console.log("------------->",details.item); details.item = JSON.parse(router.currentRoute.value.query.item);
setTimeout(() => {
init(); console.log('details.item.id------------->', details.item.id);
}, 1500);
// setTimeout(()=>{ watch(details.item.id, (newValue, oldValue) => {
// details.mapLoc.clearOverlays(); console.log("item变了", newValue, oldValue);
a(details.item);
// },9500) },{immediate:true});
}); console.log('------------->', details.item);
// setTimeout(()=>{
function init() { // details.mapLoc.clearOverlays();
details.mapLoc = new BMapGL.Map('container'); //
let point = new BMapGL.Point(116.404, 39.915); // // },9500)
details.mapLoc.centerAndZoom(point, 12); });
details.mapLoc.enableScrollWheelZoom(true);
// maplabel()
if (details.mapLoc) {
details.mapLoc.clearOverlays(); //label function a(data) {
selectStockArticleAtlasInfo(data.id).then(res => {
const data = res.data.data;
console.log('res------------->', data);
setTimeout(() => {
init(data);
}, 1500);
});
} }
maplabel('四川成都龙泉驿区','展示的内容', 0);
}
function maplabel(address,contents, index) {
let myGeo = new BMapGL.Geocoder(); function init(data) {
myGeo.getPoint(address, function (point) { details.mapLoc = new BMapGL.Map('container'); //
if (point) { let point = new BMapGL.Point(116.404, 39.915); //
console.log(point, '---------------'); details.mapLoc.centerAndZoom(point, 12);
if (index == 0) { details.mapLoc.enableScrollWheelZoom(true);
details.mapLoc.centerAndZoom(point, 12); // maplabel()
} if (details.mapLoc) {
let content = contents; details.mapLoc.clearOverlays(); //label
let label = new BMapGL.Label(content, {
//
position: point,
offset: new BMapGL.Size(10, 20),
});
details.mapLoc.addOverlay(label); //
label.setStyle({
// label
color: '#000',
fontSize: '10px',
border: '1px solid #1E90FF',
borderRadius: '20px',
padding: '5px 10px',
});
console.log(label, '---------------');
} else {
// alert('');
console.log(point);
console.log('您选择的地址没有解析到结果!');
} }
}); let a = data;
} a.forEach((item,index)=>{
function back() { console.log('item------------->', item);
router.back(-1);
} maplabel(item.customerAddress, item.customerName+"--"+item.customerAddress+"--"+item.customerTelephone, index);
const { reservationIds }=toRefs(details)
// maplabel('-1-26-154', '', 0);
})
}
function maplabel(address, contents, index) {
let myGeo = new BMapGL.Geocoder();
myGeo.getPoint(address, function(point) {
if (point) {
console.log(point, '---------------');
if (index == 0) {
details.mapLoc.centerAndZoom(point, 12);
}
let content = contents;
let label = new BMapGL.Label(content, {
//
position: point,
offset: new BMapGL.Size(10, 20)
});
details.mapLoc.addOverlay(label); //
label.setStyle({
// label
color: '#000',
fontSize: '10px',
border: '1px solid #1E90FF',
borderRadius: '20px',
padding: '5px 10px'
});
console.log(label, '---------------');
} else {
// alert('');
console.log(point);
console.log('您选择的地址没有解析到结果!');
}
});
}
function back() {
router.back(-1);
}
const { reservationIds } = toRefs(details);
</script> </script>
<style scoped> <style scoped>
.bmap { .bmap {
width: 800px; margin-top: 2%;
height: 600px; width: 1800px;
border: 1px solid pink; height: 600px;
} border: 1px solid pink;
}
</style> </style>

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){

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

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save