diff --git a/src/views/quality/pkg.vue b/src/views/quality/pkg.vue
index 8a1bc52..2eb7b6f 100644
--- a/src/views/quality/pkg.vue
+++ b/src/views/quality/pkg.vue
@@ -25,7 +25,7 @@
-
+
@@ -162,11 +162,22 @@ export default {
this.$refs[`${PackOrderId}`][0].scrollIntoView()
})
},
- packorderitemlst() { //获取包装单下的包装项
+ // table列表滚动到指定位置
+ scrollCurrentPos() {
+ const currentIndex = this.tableData.findIndex(item => item['LOG_PackOrderItemlst-SerialOrderId'] === '') - 1
+ this.$refs.elTable.bodyWrapper.scrollTop = 50*(currentIndex)
+ this.$nextTick(() => {
+ this.$refs.elTable.setCurrentRow(this.tableData[currentIndex])
+ })
+ },
+ packorderitemlst(type) { //获取包装单下的包装项
this.tableLoading = true
api.packorderitemlst(this.activePkg).then((res) => {
this.tableData = res.data || []
this.tableLoading = false
+ if (type === 1) {
+ this.scrollCurrentPos()
+ }
})
},
checkCodeInPkgs(code) { // 校验扫码是否在包装列表中
@@ -187,7 +198,7 @@ export default {
if (res.data == 'close') {
this.defaultSelectOne()
} else {
- this.packorderitemlst() // 获取包装单下的包装项
+ this.packorderitemlst(1) // 获取包装单下的包装项
}
}
})