|
|
@ -25,7 +25,7 @@ |
|
|
|
</div> |
|
|
|
<!-- 右侧当前包装下的包装项列表 --> |
|
|
|
<div class="pkg-list-right"> |
|
|
|
<el-table v-loading="tableLoading" :data="tableData" border height="100%"> |
|
|
|
<el-table ref="elTable" v-loading="tableLoading" highlight-current-row :data="tableData" border height="100%"> |
|
|
|
<el-table-column v-for="item in tableColumn" :key="item" :label="getColumnName(`${item}`)" show-overflow-tooltip> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="item === 'LOG_PackOrderItemlst-CreateTime' || item === 'LOG_PackOrderItemlst-LastModify'"> |
|
|
@ -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) // 获取包装单下的包装项 |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|