diff --git a/src/views/mes/plan/index.vue b/src/views/mes/plan/index.vue
index 31cc1d24..cc4b19f6 100644
--- a/src/views/mes/plan/index.vue
+++ b/src/views/mes/plan/index.vue
@@ -78,7 +78,7 @@
-
+
@@ -304,6 +304,17 @@ const loading = ref(true) // 列表的加载中
const list = ref([]) // 列表的数据
const total = ref(0) // 列表的总页数
const tableRef = ref()
+const planTableMaxHeight = ref(520)
+const planPaginationRef = ref()
+
+const updatePlanTableMaxHeight = async () => {
+ await nextTick()
+ const tableTop = tableRef.value?.$el?.getBoundingClientRect().top ?? 0
+ const paginationHeight = planPaginationRef.value?.getBoundingClientRect().height ?? 72
+ const pageBottomGap = 56
+ const availableHeight = window.innerHeight - tableTop - paginationHeight - pageBottomGap
+ planTableMaxHeight.value = Math.min(window.innerHeight, Math.max(240, Math.floor(availableHeight)))
+}
const inspectableMap = reactive>({})
const baogongRecordRefreshKey = ref(0)
const zjProductPreListRefreshKey = ref(0)
@@ -336,6 +347,7 @@ const filterCount = 4 // 筛选框数量
/** 切换筛选框展开/折叠 */
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
+ updatePlanTableMaxHeight()
}
const warehouseList = ref([]) // 仓库列表
@@ -359,6 +371,7 @@ const getList = async () => {
await refreshInspectableMap(list.value)
} finally {
loading.value = false
+ updatePlanTableMaxHeight()
}
}
@@ -423,6 +436,12 @@ onMounted(async () => {
queryParams.status = '1'
}
await getList()
+ updatePlanTableMaxHeight()
+ window.addEventListener('resize', updatePlanTableMaxHeight)
+})
+
+onBeforeUnmount(() => {
+ window.removeEventListener('resize', updatePlanTableMaxHeight)
})
/** 物料需求 */
const itemFormRef = ref()