|
@@ -72,12 +72,14 @@
|
|
|
</a-alert>
|
|
|
<s-table
|
|
|
class="sTable fixPagination"
|
|
|
+ :style="{ height: tableHeight+77+'px' }"
|
|
|
ref="table"
|
|
|
size="small"
|
|
|
rowKey="id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
:defaultLoadData="false"
|
|
|
+ :scroll="{ y:tableHeight }"
|
|
|
bordered>
|
|
|
</s-table>
|
|
|
</a-card>
|
|
@@ -101,6 +103,7 @@ export default {
|
|
|
disabled: false,
|
|
|
isEdit: false, // 货位号是否为编辑
|
|
|
openModal: false, // 货位模板弹窗初始状态
|
|
|
+ tableHeight: 0,
|
|
|
formItemLayout: {
|
|
|
labelCol: { span: 6 },
|
|
|
wrapperCol: { span: 16 }
|
|
@@ -208,18 +211,29 @@ export default {
|
|
|
orderBillNo: ''
|
|
|
}
|
|
|
this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
+ pageInit () {
|
|
|
+ const _this = this
|
|
|
+ this.getPageInfo()
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
+ _this.setTableH()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setTableH () {
|
|
|
+ const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 300
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
- this.getPageInfo()
|
|
|
+ this.pageInit()
|
|
|
this.resetSearchForm()
|
|
|
}
|
|
|
},
|
|
|
activated () {
|
|
|
// 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
|
|
|
if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
|
|
|
- this.getPageInfo()
|
|
|
+ this.pageInit()
|
|
|
this.resetSearchForm()
|
|
|
}
|
|
|
}
|