地图提交

master
Mr.sun 2 years ago
parent b3e09bff8a
commit 7b75ae3897
  1. 8
      src/api/util/mapDrawing.js
  2. 9
      src/api/wms/busFunctions/storeManager/sysStock.js
  3. 8
      src/views/libraryManage/inventoryLock/examine/extract.vue
  4. 43
      src/views/libraryManage/warehouseMap/index.vue

@ -127,7 +127,11 @@ class MapDrawing extends EventEmitter {
this.property.renderer.setSize(this.property.width, this.property.height - 180) this.property.renderer.setSize(this.property.width, this.property.height - 180)
document.getElementById('mapContainer').appendChild(this.property.renderer.domElement) document.getElementById('mapContainer').appendChild(this.property.renderer.domElement)
// 设置背景色 // 设置背景色
this.property.renderer.setClearColor(0x000000, 1.0) this.property.renderer.setClearColor( '#808e9b', 1)//淡灰
// this.property.renderer.setClearColor( '#686de0', 1)
// this.property.renderer.setClearColor( '#dff9fb', 1)//淡
// this.property.renderer.setClearColor( '#487eb0', 1)//淡
// this.property.renderer.setClearColor( '#6a85cf', 1)//淡蓝
} }
/** /**
@ -756,7 +760,6 @@ class MapDrawing extends EventEmitter {
let stateDictionary = this.property.config.tileStateDictionary[this.property.config.tileStateDictionary.hasOwnProperty(storageRack.state) ? storageRack.state : '0'] let stateDictionary = this.property.config.tileStateDictionary[this.property.config.tileStateDictionary.hasOwnProperty(storageRack.state) ? storageRack.state : '0']
//疑似仓库地图 点位`1 //疑似仓库地图 点位`1
// console.log('仓库',this.property.layer.levels.nowLevel); // console.log('仓库',this.property.layer.levels.nowLevel);
let storageRackInfo = { let storageRackInfo = {
id: storageRack.id, id: storageRack.id,
type: 'storageRack', type: 'storageRack',
@ -780,7 +783,6 @@ class MapDrawing extends EventEmitter {
// console.log('你好,Mr.sun',storageRackInfo); // console.log('你好,Mr.sun',storageRackInfo);
storageRack.childNodes = self.drawRactangleInParentWithLevel(storageRackInfo, freightSpaces, dictionary) storageRack.childNodes = self.drawRactangleInParentWithLevel(storageRackInfo, freightSpaces, dictionary)
} else { } else {
console.log(2222);
storageRack.childNodes = self.drawRactangleInParent(storageRackInfo, freightSpaces, dictionary) storageRack.childNodes = self.drawRactangleInParent(storageRackInfo, freightSpaces, dictionary)
} }
})) }))

@ -33,4 +33,11 @@ export function queryStockDetailListExport(query) {
params: query params: query
}) })
} }
// 查询货位地图
export function getBaseLocationForMap(query) {
return request({
url: '/wms/location/getBaseLocationForMap',
method: 'get',
params: query
})
}

@ -73,6 +73,13 @@ export default {
istrue: true, istrue: true,
'min-width': 120, 'min-width': 120,
'show-overflow-tooltip': true 'show-overflow-tooltip': true
},
{
label: '单据状态',
prop: 'orderStatus',
istrue: true,
'min-width': 120,
'show-overflow-tooltip': true
} }
] ]
}, },
@ -125,7 +132,6 @@ export default {
listLock(obj) listLock(obj)
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
console.log(res.rows)
this.tableData = res.rows.filter((item) => { this.tableData = res.rows.filter((item) => {
return item.orderStatus !== 'out' return item.orderStatus !== 'out'
}) })

@ -1,7 +1,8 @@
<template> <template>
<div class="app-container" <div
v-loading="loading" class="app-container"
v-loading="loading"
> >
<div <div
@ -163,8 +164,6 @@
<li style="width: 30px;height: 20px;background-color: #ecf0f1;margin-left:8px;margin-right:20px"></li> <li style="width: 30px;height: 20px;background-color: #ecf0f1;margin-left:8px;margin-right:20px"></li>
<li>有货</li> <li>有货</li>
<li style="width: 30px;height: 20px;background-color: #3742fa;margin-left:8px;margin-right:20px"></li> <li style="width: 30px;height: 20px;background-color: #3742fa;margin-left:8px;margin-right:20px"></li>
<!-- <li>空台车</li>
<li style="width: 30px;height: 20px;background-color: #70a1ff;margin-left:8px;margin-right:20px"></li> -->
<li>已分配</li> <li>已分配</li>
<li style="width: 30px;height: 20px;background-color: #eccc68;margin-left:8px;margin-right:20px"></li> <li style="width: 30px;height: 20px;background-color: #eccc68;margin-left:8px;margin-right:20px"></li>
<li>锁定库存</li> <li>锁定库存</li>
@ -384,7 +383,7 @@ export default {
} }
}, },
mounted() { mounted() {
// this.startMap() this.startMap()
this.init('fourwayCar') this.init('fourwayCar')
if (!localStorage.getItem('level')) { if (!localStorage.getItem('level')) {
localStorage.setItem('level', 'level-1') localStorage.setItem('level', 'level-1')
@ -396,7 +395,7 @@ export default {
init(type) { init(type) {
let self = this let self = this
this.type = type this.type = type
this.config=JSON.parse(JSON.stringify(sysConfig)) this.config = JSON.parse(JSON.stringify(sysConfig))
switch (type) { switch (type) {
case 'fourwayCar': case 'fourwayCar':
this.config.mutiLayer = true this.config.mutiLayer = true
@ -410,14 +409,14 @@ export default {
this.config.warehouseType = 1 this.config.warehouseType = 1
break break
} }
let container=null let container = null
container = document.getElementById('mapContainer') container = document.getElementById('mapContainer')
if (container) { if (container) {
this.config.mapWidth = this.config.columnCount * this.config.standardXLength this.config.mapWidth = this.config.columnCount * this.config.standardXLength
this.config.mapHeight = this.config.rowCount * this.config.standardYLength this.config.mapHeight = this.config.rowCount * this.config.standardYLength
this.config.leftOffset = this.config.leftOffset - this.config.mapWidth / 2 - this.config.standardXLength / 2 - this.config.standardXLength * this.config.leftOffsetCell this.config.leftOffset = this.config.leftOffset - this.config.mapWidth / 2 - this.config.standardXLength / 2 - this.config.standardXLength * this.config.leftOffsetCell
this.config.topOffset = this.config.topOffset - this.config.mapHeight / 2 - this.config.standardYLength / 2 - this.config.standardYLength * this.config.topOffsetCell this.config.topOffset = this.config.topOffset - this.config.mapHeight / 2 - this.config.standardYLength / 2 - this.config.standardYLength * this.config.topOffsetCell
this.mapControl =null this.mapControl = null
this.mapControl = new MapDrawing('mapContainer', { this.mapControl = new MapDrawing('mapContainer', {
width: container.offsetWidth - 10, width: container.offsetWidth - 10,
height: window.innerHeight - 10, height: window.innerHeight - 10,
@ -485,7 +484,6 @@ export default {
} }
} }
this.mapControl.initWarehouse() this.mapControl.initWarehouse()
} else { } else {
this.init() this.init()
} }
@ -606,22 +604,24 @@ export default {
num1: 0, num1: 0,
num2: 0, num2: 0,
num3: 0, num3: 0,
num4: 0 num4: 0,
num5: 0
} }
this.locationObj2 = { this.locationObj2 = {
num1: 0, num1: 0,
num2: 0, num2: 0,
num3: 0, num3: 0,
num4: 0 num4: 0,
num5: 0
} }
getBaseLocationForMap({ pageNum: 1, pageSize: 9999 }).then((res) => { getBaseLocationForMap({ pageNum: 1, pageSize: 9999 }).then((res) => {
res.rows.forEach((item, index) => { // res.rows.forEach((item, index) => {
// console.log(item) // // console.log(item)
if (item.isDel == '1') { // if (item.isDel == '1') {
// console.log('isDel') // // console.log('isDel')
item.locationStatus = '7' // item.locationStatus = '7'
} // }
}) // })
this.latticeForPiler1 = res.rows this.latticeForPiler1 = res.rows
localStorage.setItem('latticeForPiler1', JSON.stringify(this.latticeForPiler1)) localStorage.setItem('latticeForPiler1', JSON.stringify(this.latticeForPiler1))
this.doUpdateFreightSpaceState() this.doUpdateFreightSpaceState()
@ -647,6 +647,11 @@ export default {
if (item.locationStatus != 0) { if (item.locationStatus != 0) {
this.locationObj2.num4++ this.locationObj2.num4++
} }
} else if (item.locationName.slice(0, 2) == '5-') {
this.locationObj.num5++
if (item.locationStatus != 0) {
this.locationObj2.num5++
}
} }
}) })
}) })
@ -893,7 +898,7 @@ export default {
localStorage.setItem('layerItem', JSON.stringify(this.layer)) localStorage.setItem('layerItem', JSON.stringify(this.layer))
// location.reload() // location.reload()
this.$router.replace('/mapRouter'); this.$router.replace('/mapRouter')
}, },
getPointPosition(tileData) { getPointPosition(tileData) {
// x // x

Loading…
Cancel
Save