Browse Source

Merge pull request '包装优化' (#152) from feature_supplier into develop

Reviewed-on: http://101.201.121.115:3000/leo/LAPP_GAAS_GFrame_WEBFRONT/pulls/152
Reviewed-by: Liwei <wei.li@le-it.com.cn>
pull/155/head
Liwei 3 years ago
parent
commit
50fe12a5e2
1 changed files with 14 additions and 3 deletions
  1. +14
    -3
      src/views/quality/pkg.vue

+ 14
- 3
src/views/quality/pkg.vue View File

@ -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) //
}
}
})


Loading…
Cancel
Save