Commit 8d680210 authored by 沈翠玲's avatar 沈翠玲

修复同一个编排单号不定位的bug

parent 7af7105e
......@@ -1488,7 +1488,9 @@ export default {
},
handleSubmitCancelKnifeTemp() {
this.knifeTempVisible = true;
if(this.$refs.appScan) {
this.$refs.appScan.closed();
}
this.knifeTempAppScanVisible = false;
this.knifeTempCancelText = '取消';
},
......@@ -1937,6 +1939,7 @@ export default {
.then((res) => {
if (res.code === 200) {
let currentIndex = 0
this.$refs['zbtable'].bodyScrollTop = 0
// 过滤可加工数量为0的数据
this.tableData = res.rows.map((item, index) => {
if (item.location) {
......@@ -1957,19 +1960,16 @@ export default {
const query = uni.createSelectorQuery().in(this)
query
.select('#tableBody')
.boundingClientRect((data1) => {
// query
// .select('#tableBody .item-tr')
// .boundingClientRect((data) => {
const height = 80.8
.boundingClientRect()
query.select('#tableBody .item-tr')
.boundingClientRect()
query.exec(res => {
const data1 = res[0]
const height = res[1] ? res[1].height : 80.8
const currentIndexPlus = currentIndex + 1
console.log(data1.height, (height * currentIndexPlus), 'data1')
const scrollTop = ((height * currentIndexPlus) > data1.height) ? (height * currentIndexPlus) : 0
console.log('scrollTop', scrollTop)
this.$refs['zbtable'].bodyScrollTop = scrollTop
// }).exec()
})
.exec()
})
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment