Browse Source

Merge remote-tracking branch 'origin/dev' into dev

fix_bug_pro20231227
caoyizhong 2 years ago
parent
commit
b1c6e4e8d4
  1. 4
      src/App.vue
  2. 64
      src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelfView.vue
  3. 61
      src/views/distribution/reservation/atlas1.vue

4
src/App.vue

@ -14,4 +14,8 @@ body,
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.BMap_cpyCtrl,
.anchorBL {
display: none !important;
}
</style> </style>

64
src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelfView.vue

@ -77,7 +77,7 @@
<div>货位{{ ite.goodsAllocationName }}</div> <div>货位{{ ite.goodsAllocationName }}</div>
<div class="fwhserveNub"> <div class="fwhserveNub">
<div>服务号</div> <div>服务号</div>
<div v-for="it in (ite.serveNub||[])"> <div v-for="it in ite.serveNub || []">
{{ it }} {{ it }}
</div> </div>
</div> </div>
@ -113,7 +113,9 @@
<el-button type="primary" @click="showupt(2)">按自编号</el-button> <el-button type="primary" @click="showupt(2)">按自编号</el-button>
<el-button type="primary">按包件</el-button> <el-button type="primary">按包件</el-button>
<el-button type="primary">按托盘</el-button> <el-button type="primary">按托盘</el-button>
<el-button type="danger">禁用</el-button> <el-button type="primary">按库存品</el-button>
<el-button type="primary">按零担</el-button>
<el-button type="danger" @click="upgood">禁用</el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
@ -166,9 +168,14 @@
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { getVisualization, getstoreCargo } from '@/api/basicdata/basicdataGoodsShelfView'; import {
getVisualization,
getstoreCargo,
updategood,
} from '@/api/basicdata/basicdataGoodsShelfView';
import { useMessage } from 'element-plus';
import { reactive, toRefs, onMounted } from 'vue'; import { reactive, toRefs, onMounted } from 'vue';
const message = useMessage();
let details = reactive({ let details = reactive({
columnList: [ columnList: [
{ {
@ -274,44 +281,63 @@ async function initconfig() {
if (details.arrlist[details.checkselect]?.warehouseGoodsAreaVOList.length > 0) { if (details.arrlist[details.checkselect]?.warehouseGoodsAreaVOList.length > 0) {
details.checkregionselect = 0; details.checkregionselect = 0;
details.checksele = 0; details.checksele = 0;
checkshelves() checkshelves();
} else { } else {
details.checkregionselect = ''; details.checkregionselect = '';
} }
console.log(res.data, 'configconfigconfigconfigconfig'); console.log(res.data, 'configconfigconfigconfigconfig');
} }
function initpage(){ function initpage() {
// let warehousearr= // let warehousearr=
} }
async function upgood() {
let data = {
id: details.checkite.id,
enableStatus: 2,
};
let res = await updategood(data);
if (res.data.code == 200) {
message({
type: 'success',
message: '操作成功!',
});
checkshelves();
} else {
message({
type: 'error',
message: res.msg,
});
}
}
const checkcso = () => { const checkcso = () => {
if (details.arrlist[details.checkselect]?.warehouseGoodsAreaVOList.length > 0) { if (details.arrlist[details.checkselect]?.warehouseGoodsAreaVOList.length > 0) {
details.checkregionselect = 0; details.checkregionselect = 0;
details.checksele = 0; details.checksele = 0;
checkshelves() checkshelves();
} else { } else {
details.checkregionselect = ''; details.checkregionselect = '';
details.contenarr=[] details.contenarr = [];
details.contenbxsty['--length'] =0 details.contenbxsty['--length'] = 0;
} }
}; };
const checkregion = () => { const checkregion = () => {
details.checksele = 0; details.checksele = 0;
checkshelves() checkshelves();
console.log(details.checksele, 'details.checkseledetails.checksele'); console.log(details.checksele, 'details.checkseledetails.checksele');
}; };
function ckindexs(index) { function ckindexs(index) {
details.checksele = index; details.checksele = index;
checkshelves() checkshelves();
} }
async function checkshelves() { async function checkshelves() {
/** /**
* goodsAreaId 货区ID * goodsAreaId 货区ID
* goodsShelfId 货架ID * goodsShelfId 货架ID
*/ */
let goodsAreaarr=details.arrlist[details.checkselect]['warehouseGoodsAreaVOList'][details.checkregionselect] let goodsAreaarr =
let goodsShelfarr=goodsAreaarr['warehouseGoodsShelfEntitieList'][details.checksele] details.arrlist[details.checkselect]['warehouseGoodsAreaVOList'][details.checkregionselect];
let goodsShelfarr = goodsAreaarr['warehouseGoodsShelfEntitieList'][details.checksele];
let data = { let data = {
goodsAreaId: goodsAreaarr.id, goodsAreaId: goodsAreaarr.id,
goodsShelfId: goodsShelfarr.id, goodsShelfId: goodsShelfarr.id,
@ -332,7 +358,7 @@ async function checkshelves() {
// console.error(error); // console.error(error);
// } // }
// }; // };
const showupt = (value) => { const showupt = value => {
console.log('112312'); console.log('112312');
details.isshowupt = value; details.isshowupt = value;
}; };

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

@ -1,26 +1,26 @@
<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"--> <!-- @change="handleCheckedCitiesChange"-->
<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.customerName }}&emsp;{{ item.customerAddress }}&emsp;{{
item.deliveryPhone item.customerTelephone
}}</el-checkbox }}</el-checkbox
> >
</el-col> </el-col>
</el-checkbox-group> </el-checkbox-group> -->
</div> <!-- </div> -->
<div style="margin-left: 40%; margin-top: 5%; float: bottom"> <div style="display: flex;align-items: center;justify-content: center;">
<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>
@ -41,46 +41,44 @@
reservationData: [], reservationData: [],
reservationIds: [], reservationIds: [],
mapLoc: null, mapLoc: null,
// datalist:[]
}); });
onMounted(() => { onMounted(()=>{
initmap()
})
watchEffect(()=>{
details.item = JSON.parse(router.currentRoute.value.query.item); details.item = JSON.parse(router.currentRoute.value.query.item);
selectStockArticleAtlasInfo(details.item.id).then(res => { selectStockArticleAtlasInfo(details.item.id).then(res => {
const data = res.data.data; const data = res.data.data;
console.log('res------------->', data); console.log('res------------->', data);
details.reservationData=data
setTimeout(() => { setTimeout(() => {
init(data); init(data);
}, 1500); }, 1500);
}); });
// setTimeout(()=>{ })
// details.mapLoc.clearOverlays(); function initmap(){
// },9500)
});
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);
details.mapLoc.enableScrollWheelZoom(true); details.mapLoc.enableScrollWheelZoom(true);
}
function init(data) {
// maplabel() // maplabel()
if (details.mapLoc) { if (details?.mapLoc) {
details.mapLoc.clearOverlays(); //label details?.mapLoc.clearOverlays(); //label
} }
let a = data; data.map((item,index)=>{
a.forEach((item,index)=>{
console.log('item------------->', item);
maplabel(item.customerAddress, item.customerName+"--"+item.customerAddress+"--"+item.customerTelephone, index); maplabel(item.customerAddress, item.customerName+"--"+item.customerAddress+"--"+item.customerTelephone, index);
// maplabel('-1-26-154', '', 0);
}) })
// maplabel('驿','', 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) {
if (point) { if (point) {
console.log(point, '---------------'); // console.log(point, '---------------');
if (index == 0) { if (index == 0) {
details.mapLoc.centerAndZoom(point, 12); details.mapLoc.centerAndZoom(point, 12);
} }
@ -99,10 +97,10 @@
borderRadius: '20px', borderRadius: '20px',
padding: '5px 10px', padding: '5px 10px',
}); });
console.log(label, '---------------'); // console.log(label, '---------------');
} else { } else {
// alert(''); // alert('');
console.log(point); // console.log(point);
console.log('您选择的地址没有解析到结果!'); console.log('您选择的地址没有解析到结果!');
} }
}); });
@ -115,8 +113,9 @@
<style scoped> <style scoped>
.bmap { .bmap {
width: 800px; width: 100%;
height: 600px; height: 700px;
border: 1px solid pink; margin-bottom: 60px;
/* border: 1px solid pink; */
} }
</style> </style>

Loading…
Cancel
Save