From 0fcd9ee2e0ee8621f7206e2ef7d51e86a6d1e742 Mon Sep 17 00:00:00 2001 From: qiushui Date: Tue, 28 Dec 2021 11:13:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/checkManage/checkOperation.vue | 86 ++++++++++++++---------- 1 file changed, 49 insertions(+), 37 deletions(-) diff --git a/src/views/checkManage/checkOperation.vue b/src/views/checkManage/checkOperation.vue index 8392d3d..1d37d40 100644 --- a/src/views/checkManage/checkOperation.vue +++ b/src/views/checkManage/checkOperation.vue @@ -22,7 +22,7 @@
    +
  • + + 核对状态: + + + {{ statusMap[checkObj.status] }} + +
  • + {{ item.label }}: - {{ scanAndCheck[item.key] }} + {{ checkObj[item.key] }}
  • @@ -154,7 +163,9 @@ export default { columnCount: 0, selectName: '', shelveId: '', + // 方向 左右 selectType: 'left', + // 内外货架 selectType2: '', visible: false, category: '', @@ -163,31 +174,30 @@ export default { index: 0, imgUrl: '', params:[ - { - label:'核对状态', - key: 'orderNum' - }, + { label:'工单号', key: 'orderNum' }, { label:'系统条码号', - key: 'SystemCode' + key: 'wmsCode' }, { label:'扫描条码号', - key: 'ScanCode' + key: 'code' }, { label:'系统数量', - key: 'SystemNumber' + key: 'wmsCount' }, { label:'扫描数量', - key: 'CheckNumber' + key: 'count' } - ] + ], + statusMap: {0:"未盘点",1:"盘点异常",2:"核对正确"} + } }, beforeRouteLeave(to ,form, next) { @@ -228,7 +238,7 @@ export default { this.listData = res.data.list; this.select = this.id this.getStreetDetail(this.id) - this.getStockInfo(this.row,this.column,this.id) + //this.getStockInfo(this.row,this.column,this.id) //this.getStockList(this.id) }).catch(err => { console.error(err); @@ -247,12 +257,7 @@ export default { }, //获取总行列数 getRowColumnCounts(){ - if(this.selectType != 'none' && this.selectType != ''){ - this.handleTypeChange(this.selectType) - }else{ - this.handleTypeChange2(this.selectType2) - } - + this.updateShleveAndRowColumnCount(this.selectType) }, //获取复核页面的核对信息 getStockInfo(row, column, shelveId) { @@ -277,7 +282,7 @@ export default { this.select = value this.id = value this.row = 1 - this.column =1 + this.column = 1 this.getStreetList() for (var i = 0; i < this.listData.length; i++) { @@ -307,11 +312,23 @@ export default { } this.getStockInfo(1, 1, this.shelveId) }, + handlerType(value){ + this.handleTypeChange(value) + this.getStockInfo(this.row, this.column, this.shelveId) + }, + // 左右货架切换 需要更新行列数 handleTypeChange(value) { + + this.updateShleveAndRowColumnCount(value) this.row = 1 this.column = 1 - this.selectType = value - if (value == 'left') { + 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.leftShelveId) { @@ -323,7 +340,7 @@ export default { } else if (this.streetDetail.leftOutsideShelveId) { this.shelveId = this.streetDetail.leftOutsideShelveId } - } else if (value == 'right') { + } else if (direction == 'right') { this.rowCount = this.streetDetail.rightRow this.columnCount = this.streetDetail.rightColumn if (this.streetDetail.rightShelveId) { @@ -334,12 +351,14 @@ export default { this.shelveId = this.streetDetail.rightOutsideShelveId } } + }, + handlerType2(value){ + this.sideStreetChange(value) this.getStockInfo(this.row, this.column, this.shelveId) - }, - handleTypeChange2(value) { - this.row = 1 - this.column = 1 + //内外货架切换 + sideStreetChange(value) { + this.selectType2 = value if (this.selectType == 'left' && value == 'none') { this.shelveId = this.streetDetail.leftShelveId @@ -366,7 +385,7 @@ export default { this.columnCount = this.streetDetail.rightColumn this.shelveId = this.streetDetail.rightOutsideShelveId } - this.getStockInfo(this.row, this.column, this.shelveId) + //this.getStockInfo(this.row, this.column, this.shelveId) }, prev() { @@ -408,9 +427,8 @@ export default { } }).then(res => { if (res.code == 200) { - // this.next(index) - this.checkObj.status = 2; this.$message.success('操作成功'); + this.getStockInfo(this.row,this.column,this.shelveId) } }).catch(err => { @@ -431,14 +449,8 @@ export default { closeModel(visible, data) { this.visible = visible this.modelData = data - }, - goHistory(orderNum){ - const href = this.$router.resolve({ - name: 'historyMonitoring', - params:{orderNum:orderNum} - }); - window.open(href.href, '_blank'); - }, + } + } }