Commit ef524796 by 韩振

1

parent 1da7a727
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<el-card style="height: 620px; overflow: auto;"> <el-card style="height: 620px; overflow: auto;">
<div v-for="(item,index) in this.ArrayListX" :key="index"> <div v-for="(item,index) in this.ArrayListX" :key="index">
<ul :style="index === 10 ? 'margin-top: 40px; grid-template-columns: repeat('+ item.length +', 3.4%);' : 'grid-template-columns: repeat('+ item.length +', 3.4%);'" > <ul :style="index === 10 ? 'margin-top: 40px; grid-template-columns: repeat('+ item.length +', 3.4%);' : 'grid-template-columns: repeat('+ item.length +', 3.4%);'" >
<li v-for="(items,k) in item" :key="k+''+index" @click="onClick(items)" :style="items.preWzdm === '0000000000' ? 'border: 2px solid blue' : items.select ? 'border: 2px solid black' : ''" <li v-for="(items,k) in item" :key="k+''+index" @click="onClick(items)" :style="items.preWzdm == '0000000000' ? 'border: 2px solid blue' : items.select ? 'border: 2px solid black' : ''"
:class="items.x === 0 || items.y === 0 ? 'box' : items.status === 'E' ? 'boxE' : items.status === 'P' ? 'boxP': items.status === 'F' ? 'boxF' : items.status === 'A' ? 'boxA' : items.status === 'W' ? 'boxW' : items.status === 'C' ? 'boxC' : '' "> :class="items.x === 0 || items.y === 0 ? 'box' : items.status === 'E' ? 'boxE' : items.status === 'P' ? 'boxP': items.status === 'F' ? 'boxF' : items.status === 'A' ? 'boxA' : items.status === 'W' ? 'boxW' : items.status === 'C' ? 'boxC' : '' ">
{{ items.x === 0 ? items.y : items.y ===0 ? items.x : ''}} {{ items.x === 0 ? items.y : items.y ===0 ? items.x : ''}}
</li> </li>
...@@ -164,6 +164,7 @@ export default { ...@@ -164,6 +164,7 @@ export default {
for(var j=0;j<=res.data[0].maxRank;j++){ for(var j=0;j<=res.data[0].maxRank;j++){
this.ArrayListY.push({x: j, y: i, status: this.findStatus(j, i), positionCode: this.findPositionCode(j, i), preWzdm: this.findPreWzdm(j, i) }); this.ArrayListY.push({x: j, y: i, status: this.findStatus(j, i), positionCode: this.findPositionCode(j, i), preWzdm: this.findPreWzdm(j, i) });
} }
console.log(this.ArrayListY)
this.ArrayListX.push(this.ArrayListY); this.ArrayListX.push(this.ArrayListY);
} }
}, },
...@@ -171,8 +172,9 @@ export default { ...@@ -171,8 +172,9 @@ export default {
const {data: res} = await this.$axios.get('/summary/getRackByLayer?VLayer=' + this.layer.substring(1,2) + '&storeCode=' + sessionStorage.getItem('storeCode')) const {data: res} = await this.$axios.get('/summary/getRackByLayer?VLayer=' + this.layer.substring(1,2) + '&storeCode=' + sessionStorage.getItem('storeCode'))
if (res.code !== 99200) return this.$message.error(res.message) if (res.code !== 99200) return this.$message.error(res.message)
this.xyData = res.data.map(i => { this.xyData = res.data.map(i => {
return {vrank: i.vrank,vrow: i.vrow,status: i.status, positionCode: i.positionCode} return {vrank: i.vrank,vrow: i.vrow,status: i.status, positionCode: i.positionCode,preWzdm: i.preWzdm}
}) })
console.log(this.xyData)
}, },
findStatus(x, y) { findStatus(x, y) {
var resA = this.xyData.filter(i => i.vrank === x) var resA = this.xyData.filter(i => i.vrank === x)
...@@ -207,7 +209,7 @@ export default { ...@@ -207,7 +209,7 @@ export default {
for(var i=0;i<=this.layerList[this.layer.substring(1,2) - 1].maxRow;i++){ for(var i=0;i<=this.layerList[this.layer.substring(1,2) - 1].maxRow;i++){
this.ArrayListY = []; this.ArrayListY = [];
for(var j=0;j<=this.layerList[this.layer.substring(1,2) -1].maxRank;j++){ for(var j=0;j<=this.layerList[this.layer.substring(1,2) -1].maxRank;j++){
this.ArrayListY.push({x: j, y: i, status: this.findStatus(j, i), positionCode: this.findPositionCode(j, i)}); this.ArrayListY.push({x: j, y: i, status: this.findStatus(j, i), positionCode: this.findPositionCode(j, i), preWzdm: this.findPreWzdm(j, i)});
} }
this.ArrayListX.push(this.ArrayListY); this.ArrayListX.push(this.ArrayListY);
} }
...@@ -226,9 +228,9 @@ export default { ...@@ -226,9 +228,9 @@ export default {
this.select.palletId = res.data.palletId this.select.palletId = res.data.palletId
}, },
changeOld() { changeOld() {
if (this.findStatus(this.select.x, this.select.y + 1) != 'E') { /* if (this.findStatus(this.select.x, this.select.y + 1) != 'E') {
return this.$message.warning('只有下方货位非空时才能移位') return this.$message.warning('只有下方货位非空时才能移位')
} }*/
this.formData.oldPositionCode = this.select.positionCode this.formData.oldPositionCode = this.select.positionCode
this.formData.palletId = this.select.palletId this.formData.palletId = this.select.palletId
this.select.select = false this.select.select = false
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论