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

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

parent 7af7105e
...@@ -1488,7 +1488,9 @@ export default { ...@@ -1488,7 +1488,9 @@ export default {
}, },
handleSubmitCancelKnifeTemp() { handleSubmitCancelKnifeTemp() {
this.knifeTempVisible = true; this.knifeTempVisible = true;
if(this.$refs.appScan) {
this.$refs.appScan.closed(); this.$refs.appScan.closed();
}
this.knifeTempAppScanVisible = false; this.knifeTempAppScanVisible = false;
this.knifeTempCancelText = '取消'; this.knifeTempCancelText = '取消';
}, },
...@@ -1937,6 +1939,7 @@ export default { ...@@ -1937,6 +1939,7 @@ export default {
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
let currentIndex = 0 let currentIndex = 0
this.$refs['zbtable'].bodyScrollTop = 0
// 过滤可加工数量为0的数据 // 过滤可加工数量为0的数据
this.tableData = res.rows.map((item, index) => { this.tableData = res.rows.map((item, index) => {
if (item.location) { if (item.location) {
...@@ -1957,19 +1960,16 @@ export default { ...@@ -1957,19 +1960,16 @@ export default {
const query = uni.createSelectorQuery().in(this) const query = uni.createSelectorQuery().in(this)
query query
.select('#tableBody') .select('#tableBody')
.boundingClientRect((data1) => { .boundingClientRect()
// query query.select('#tableBody .item-tr')
// .select('#tableBody .item-tr') .boundingClientRect()
// .boundingClientRect((data) => { query.exec(res => {
const height = 80.8 const data1 = res[0]
const height = res[1] ? res[1].height : 80.8
const currentIndexPlus = currentIndex + 1 const currentIndexPlus = currentIndex + 1
console.log(data1.height, (height * currentIndexPlus), 'data1')
const scrollTop = ((height * currentIndexPlus) > data1.height) ? (height * currentIndexPlus) : 0 const scrollTop = ((height * currentIndexPlus) > data1.height) ? (height * currentIndexPlus) : 0
console.log('scrollTop', scrollTop)
this.$refs['zbtable'].bodyScrollTop = 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