|
|
|
|
@ -162,12 +162,14 @@ export default {
|
|
|
|
|
created() {
|
|
|
|
|
this.imgUrl = imgUrl
|
|
|
|
|
console.log(this.$route.query.id)
|
|
|
|
|
this.getStreetList();
|
|
|
|
|
//this.getStreetList();
|
|
|
|
|
if (this.$route.query.row && this.$route.query.column && this.$route.query.shelveId && this.$route.query.id && this.$route.query.name) {
|
|
|
|
|
this.id = this.$route.query.id
|
|
|
|
|
this.row = this.$route.query.row
|
|
|
|
|
this.column = this.$route.query.column
|
|
|
|
|
this.shelveId = this.$route.query.shelveId
|
|
|
|
|
this.direction = this.$route.query.direction
|
|
|
|
|
this.side = this.$route.query.side
|
|
|
|
|
this.streetId = this.$route.query.streetId
|
|
|
|
|
this.selectName = this.$route.query.name
|
|
|
|
|
this.selectType = this.$route.query.type
|
|
|
|
|
this.selectType2 = this.$route.query.type2
|
|
|
|
|
@ -184,35 +186,6 @@ export default {
|
|
|
|
|
Model
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
//获取巷道列表
|
|
|
|
|
getStreetList() {
|
|
|
|
|
this.$api.httpApi.getStreetList({
|
|
|
|
|
data: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 50,
|
|
|
|
|
}
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.listData = res.data.list;
|
|
|
|
|
this.select = this.id
|
|
|
|
|
this.getStreetDetail(this.id)
|
|
|
|
|
//this.getStockInfo(this.row,this.column,this.id)
|
|
|
|
|
//this.getStockList(this.id)
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
console.error(err);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//获取巷道详情
|
|
|
|
|
getStreetDetail(id) {
|
|
|
|
|
this.$axios.get('/street/' + id, {
|
|
|
|
|
data: {}
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.streetDetail = res.data
|
|
|
|
|
this.getRowColumnCounts()
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//获取总行列数
|
|
|
|
|
getRowColumnCounts(){
|
|
|
|
|
|
|
|
|
|
@ -272,86 +245,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.getStockInfo(1, 1, this.shelveId)
|
|
|
|
|
},
|
|
|
|
|
// 左右货架切换 需要更新行列数
|
|
|
|
|
handleTypeChange(value) {
|
|
|
|
|
this.selectType = value
|
|
|
|
|
this.updateShleveAndRowColumnCount(value)
|
|
|
|
|
this.row = 1
|
|
|
|
|
this.column = 1
|
|
|
|
|
this.getStockInfo(this.row, this.column, this.shelveId)
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//根据streetDetail更新货架及该货架的总行列数
|
|
|
|
|
//direction : left right
|
|
|
|
|
updateShleveAndRowColumnCount(direction){
|
|
|
|
|
if (direction == 'left') {
|
|
|
|
|
this.rowCount = this.streetDetail.leftRow
|
|
|
|
|
this.columnCount = this.streetDetail.leftColumn
|
|
|
|
|
if(this.streetDetail.leftType == 0){
|
|
|
|
|
this.shelveId = this.streetDetail.leftShelveId
|
|
|
|
|
this.selectType2 = ''
|
|
|
|
|
}else{
|
|
|
|
|
if(this.selectType2 == 'inside'){
|
|
|
|
|
this.shelveId = this.streetDetail.leftInsideShelveId
|
|
|
|
|
}else if(this.selectType2 == 'outside'){
|
|
|
|
|
this.shelveId = this.streetDetail.leftOutsideShelveId
|
|
|
|
|
}else{
|
|
|
|
|
this.selectType2 = 'inside'
|
|
|
|
|
this.shelveId = this.streetDetail.leftInsideShelveId
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else if (direction == 'right') {
|
|
|
|
|
this.rowCount = this.streetDetail.rightRow
|
|
|
|
|
this.columnCount = this.streetDetail.rightColumn
|
|
|
|
|
if(this.streetDetail.rightType == 0){
|
|
|
|
|
this.shelveId = this.streetDetail.rightShelveId
|
|
|
|
|
this.selectType2 = ''
|
|
|
|
|
}else{
|
|
|
|
|
if(this.selectType2 == 'inside'){
|
|
|
|
|
this.shelveId = this.streetDetail.rightInsideShelveId
|
|
|
|
|
}else if(this.selectType2 == 'outside'){
|
|
|
|
|
this.shelveId = this.streetDetail.rightOutsideShelveId
|
|
|
|
|
}else{
|
|
|
|
|
this.selectType2 = 'inside'
|
|
|
|
|
this.shelveId = this.streetDetail.rightInsideShelveId
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//内外货架切换
|
|
|
|
|
sideStreetChange(value) {
|
|
|
|
|
|
|
|
|
|
this.selectType2 = value
|
|
|
|
|
if (this.selectType == 'left' && value == 'none') {
|
|
|
|
|
this.shelveId = this.streetDetail.leftShelveId
|
|
|
|
|
this.rowCount = this.streetDetail.leftRow
|
|
|
|
|
this.columnCount = this.streetDetail.leftColumn
|
|
|
|
|
} else if (this.selectType == 'right' && value == 'none') {
|
|
|
|
|
this.rowCount = this.streetDetail.rightRow
|
|
|
|
|
this.columnCount = this.streetDetail.rightColumn
|
|
|
|
|
this.shelveId = this.streetDetail.rightShelveId
|
|
|
|
|
} else if (this.selectType == 'left' && value == 'inside') {
|
|
|
|
|
this.rowCount = this.streetDetail.leftRow
|
|
|
|
|
this.columnCount = this.streetDetail.leftColumn
|
|
|
|
|
this.shelveId = this.streetDetail.leftInsideShelveId
|
|
|
|
|
} else if (this.selectType == 'left' && value == 'out') {
|
|
|
|
|
this.rowCount = this.streetDetail.leftRow
|
|
|
|
|
this.columnCount = this.streetDetail.leftColumn
|
|
|
|
|
this.shelveId = this.streetDetail.leftOutsideShelveId
|
|
|
|
|
} else if (this.selectType == 'right' && value == 'inside') {
|
|
|
|
|
this.rowCount = this.streetDetail.rightRow
|
|
|
|
|
this.columnCount = this.streetDetail.rightColumn
|
|
|
|
|
this.shelveId = this.streetDetail.rightInsideShelveId
|
|
|
|
|
} else if (this.selectType == 'right' && value == 'out') {
|
|
|
|
|
this.rowCount = this.streetDetail.rightRow
|
|
|
|
|
this.columnCount = this.streetDetail.rightColumn
|
|
|
|
|
this.shelveId = this.streetDetail.rightOutsideShelveId
|
|
|
|
|
}
|
|
|
|
|
this.getStockInfo(this.row, this.column, this.shelveId)
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
prev() {
|
|
|
|
|
if(this.column > 1){
|
|
|
|
|
this.column = this.column - 1
|
|
|
|
|
|