From 1de3950a235f8488b2bc41797a21d688cc36eb6e Mon Sep 17 00:00:00 2001 From: yiming Date: Fri, 12 Aug 2022 14:07:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9=E7=AE=A1=E7=90=86=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E8=B4=A7=E6=9E=B6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/antd_color.less | 2 +- src/views/checkManage/Subsection.vue | 12 +-- src/views/checkManage/checkOperation.vue | 115 +++++------------------ src/views/checkManage/index.vue | 14 +-- src/views/stockLog/index.vue | 54 +---------- vue.config.js | 2 +- 6 files changed, 28 insertions(+), 171 deletions(-) diff --git a/public/antd_color.less b/public/antd_color.less index 4524b4e..b746b9c 100644 --- a/public/antd_color.less +++ b/public/antd_color.less @@ -1397,7 +1397,7 @@ tr.ant-table-expanded-row:hover {background: #fbfbfb;} .ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;} .ant-tag-geekblue {color: #2f54eb;background: #f0f5ff;border-color: #adc6ff;} .ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;} -.ant-tag-purple {color: #722ed1;background: color(~`colorPalette("@{text-color}", 1)`);border-color: #d3adf7;} +.ant-tag-purple {color: #722ed1;background: #f9f0ff;border-color: #d3adf7;} .ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;} .ant-time-picker-panel {color: @text-color;} .ant-time-picker-panel-inner {background-color: #fff;background-clip: padding-box;border-radius: 4px;box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);} diff --git a/src/views/checkManage/Subsection.vue b/src/views/checkManage/Subsection.vue index 2e8dc8f..3816502 100644 --- a/src/views/checkManage/Subsection.vue +++ b/src/views/checkManage/Subsection.vue @@ -220,16 +220,6 @@ export default { var color = status == 1 ?'#d81e06': (status == 2|| status == 3) ? '#1afa29': '#bfbfbf'; dom.style.background = color }, - // getStatusTab(tab,status,rowColumn){ - // var dom = document.getElementById(this.shelveId+'-'+rowColumn+'-'+tab); - // console.log(dom) - // console.log(this.shelveId+'-'+rowColumn+'-'+tab) - // dom.style.type ="close-circle" - - // var color = status == 1 ?'#d81e06': status == 2 ? '#1afa29': '#bfbfbf'; - // dom.style.color = color - // console.log(dom) - // }, getStatus(){ @@ -288,7 +278,7 @@ export default { tocheckPage(row,column){ this.$router.push({ name: 'checkOperation', - query: {row: row, column: column, shelveId: this.shelveId, id: this.streetId, name:this.streetName, type: this.type, type2: this.inOut} + query: {row: row, column: column, direction: this.direction,side:this.side, streetId: this.streetId, name:this.streetName} }) } } diff --git a/src/views/checkManage/checkOperation.vue b/src/views/checkManage/checkOperation.vue index aaf06bc..d5012ec 100644 --- a/src/views/checkManage/checkOperation.vue +++ b/src/views/checkManage/checkOperation.vue @@ -6,6 +6,11 @@ @@ -94,23 +93,11 @@ import {imgUrl} from "@/api/importExcel"; export default { data() { return { - listData: [], - scanAndCheck: {}, + checkObj: {}, - streetDetail: {}, - checkList: {}, - id: 0, row: 1, column: 1, - //当前货架行列总数 - rowCount: 0, - columnCount: 0, - selectName: '', - shelveId: '', - // 方向 左右 - selectType: 'left', - // 内外货架 - selectType2: '', + streetName: '', visible: false, category: '', count: 0, @@ -161,19 +148,18 @@ export default { }, created() { this.imgUrl = imgUrl - console.log(this.$route.query.id) + //this.getStreetList(); - if (this.$route.query.row && this.$route.query.column && this.$route.query.shelveId && this.$route.query.id && this.$route.query.name) { + if (this.$route.query.row && this.$route.query.column && this.$route.query.direction && this.$route.query.side && this.$route.query.streetId) { this.id = this.$route.query.id this.row = this.$route.query.row this.column = this.$route.query.column 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 - this.getStockInfo(this.row, this.column, this.shelveId); + this.streetName = this.$route.query.name + + this.getStockInfo(this.row, this.column); } }, mounted() { @@ -186,19 +172,16 @@ export default { Model }, methods: { - //获取总行列数 - getRowColumnCounts(){ - - this.updateShleveAndRowColumnCount(this.selectType) - if(this.streetDetail){} - }, + //获取复核页面的核对信息 - getStockInfo(row, column, shelveId) { + getStockInfo(row, column) { this.$api.httpApi.getStockInfo({ data: { row: Number(row), column: Number(column), - shelveId: shelveId, + direction: this.direction, + side: this.side, + streetId: this.streetId, } }).then(res => { if (res.data) { @@ -216,65 +199,9 @@ export default { this.id = value this.row = 1 this.column = 1 - - this.getStreetList() - for (var i = 0; i < this.listData.length; i++) { - if (this.listData[i].id == value) { - if (this.listData[i].leftShelveId) { - this.shelveId = this.listData[i].leftShelveId - this.selectType = 'left' - this.selectType2 = 'none' - this.rowCount = this.listData[i].leftRow - this.columnCount = this.listData[i].leftColumn - - } else if (this.listData[i].leftInsideShelveId) { - this.shelveId = this.listData[i].leftInsideShelveId - this.selectType = 'left' - this.selectType2 = 'inside' - this.rowCount = this.listData[i].leftRow - this.columnCount = this.listData[i].leftColumn - } else if (this.listData[i].leftOutsideShelveId) { - this.shelveId = this.listData[i].leftOutsideShelveId - this.selectType = 'left' - this.selectType2 = 'out' - this.rowCount = this.listData[i].leftRow - this.columnCount = this.listData[i].leftColumn - } - - } - } - this.getStockInfo(1, 1, this.shelveId) - }, - prev() { - if(this.column > 1){ - this.column = this.column - 1 - }else{ - if(this.row > 1){ - this.row = this.row - 1 - this.column = this.columnCount - }else{ - this.row = this.rowCount - this.column = this.columnCount - } - } - - this.getStockInfo(this.row,this.column,this.shelveId) - }, - next() { - if(this.column < this.columnCount){ - this.column = this.column + 1 - }else{ - //最大列了 row+1 - if(this.row < this.rowCount){ - this.row = this.row + 1 - this.column = 1 - }else{ - this.row = 1 - this.column = 1 - } - } - this.getStockInfo(this.row,this.column,this.shelveId) + this.getStockInfo(1, 1) }, + checkSure(row, column, shelveId, index) { this.$api.httpApi.stockCheckCorrect({ data: { @@ -285,7 +212,7 @@ export default { }).then(res => { if (res.code == 200) { this.$message.success('操作成功'); - this.getStockInfo(this.row,this.column,this.shelveId) + this.getStockInfo(this.row,this.column) } }).catch(err => { diff --git a/src/views/checkManage/index.vue b/src/views/checkManage/index.vue index 2a0e7a4..371ace1 100644 --- a/src/views/checkManage/index.vue +++ b/src/views/checkManage/index.vue @@ -138,14 +138,7 @@ export default { }); }, - getStatus(data, rowCol) { - return (data[rowCol] || {}).status; - }, - // 获取状态对应的颜色 - getStatusBg(data, rowCol) { - let status = this.getStatus(data, rowCol); - return status == 1 ?'#d81e06': status == 2 ? '#1afa29': '#bfbfbf'; - }, + //获取巷道详情 getStreetDetail(id) { this.$axios.get('/street/' + id, { @@ -164,11 +157,6 @@ export default { this.getStreetDetail(value) }, - tocheckOperation(checkObj, item) { - console.log(checkObj) - console.log(item) - this.$router.push({name: 'checkOperation', query: {checkObj: checkObj, item: item}}) - }, exportStock() { this.$api.httpApi.exportStock({ diff --git a/src/views/stockLog/index.vue b/src/views/stockLog/index.vue index 01bdfdc..8b034ea 100644 --- a/src/views/stockLog/index.vue +++ b/src/views/stockLog/index.vue @@ -16,7 +16,7 @@ 左侧货架 - 浅货架 @@ -41,7 +41,7 @@ 右侧货架 - 浅货架 @@ -73,14 +73,6 @@ export default { select: '', streetId: 0, streetDetail: {}, - checkList: [], - stockInfo: { - left: {}, - right: {} - }, - - leftShelveId:{}, - rightShelveId:{} } }, computed: { @@ -121,51 +113,13 @@ export default { }); }, - // 获取盘点状态 - async getStockRowColumn() { - this.rightShelveChange(); - this.leftShelveChange(); - - }, - rightShelveChange() { - // let shelveId; - // let shelveType = 'none'; - // if(this.streetDetail.rightShelveId) { - // shelveId = this.streetDetail.rightShelveId; - // }else if(this.streetDetail.rightInsideShelveId && this.size2 =='rightInsideShelveId'){ - // shelveId = this.streetDetail.rightInsideShelveId; - // shelveType = 'inside'; - // }else if(this.streetDetail.rightOutsideShelveId && this.size2 == 'rightOutsideShelveId'){ - // shelveId = this.streetDetail.rightOutsideShelveId; - // shelveType = 'out'; - // }; - // this.rightShelveId.shelveId = shelveId; - // this.rightShelveId.shelveType = shelveType; - - }, - leftShelveChange() { - // let shelveId; - // let shelveType = 'none'; - // if(this.streetDetail.leftShelveId) { - // shelveId = this.streetDetail.leftShelveId; - // }else if(this.streetDetail.leftInsideShelveId && this.size =='leftInsideShelveId'){ - // shelveId = this.streetDetail.leftInsideShelveId; - // shelveType = 'inside'; - // }else if(this.streetDetail.leftOutsideShelveId && this.size== 'leftOutsideShelveId'){ - // shelveId = this.streetDetail.leftOutsideShelveId; - // shelveType = 'out'; - // }; - // this.leftShelveId.shelveId = shelveId; - // this.leftShelveId.shelveType = shelveType; - }, - + //获取巷道详情 getStreetDetail(id) { this.$axios.get('/street/' + id, { data: {} }).then(res => { this.streetDetail = res.data - this.getStockRowColumn() }).catch(err => { }) @@ -176,8 +130,6 @@ export default { this.select = value this.getStreetDetail(value) - this.leftShelveChange(); - this.rightShelveChange(); }, }, diff --git a/vue.config.js b/vue.config.js index 34f1c5d..3832c02 100644 --- a/vue.config.js +++ b/vue.config.js @@ -46,7 +46,7 @@ module.exports = { } }, '/api': { - target: 'http://192.168.77.91:8099', + target: 'http://127.0.0.1:8099', // target: 'http://115.236.65.98:13001/monitor', // target: 'http://127.0.0.1:9007', logLevel:'debug', //控制台终端打印代理前的真实地址