feat(web-admin): viewport-fill list height for db weighbridge menus
Wire 地磅计划 and 地磅出入库 lists to useListTableViewportHeight (stats + pager below the table wrap), matching 地磅单管理. Dashboard has no list. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7ed3f26f9c
commit
11185f066a
8 files changed
+9731
-7719
No files matched your search
@@ -193,7 +193,9 @@
|
||||
"191": "formatYmd",
|
||||
"192": "prepareLineAliasAndBrandForSubmit",
|
||||
"193": "crm-product-display.ts",
|
||||
"194": "index.vue",
|
||||
"195": "Community 195",
|
||||
"196": "ClaimDialog.vue",
|
||||
"197": "v2.4.2.1 - 2025-06-16",
|
||||
"198": "fetchRoleOptions",
|
||||
"199": "colors.ts",
|
||||
@@ -204,9 +206,11 @@
|
||||
"204": "DbCrmCustomerSelect.vue",
|
||||
"205": "loadDefaultCustomerOptions",
|
||||
"206": "onDrop",
|
||||
"207": "SettingActions.vue",
|
||||
"208": "index.vue",
|
||||
"209": "Community 209",
|
||||
"210": "Community 210",
|
||||
"211": "navigation.ts",
|
||||
"212": "index.js",
|
||||
"213": "Community 213",
|
||||
"214": "Community 214",
|
||||
@@ -215,6 +219,7 @@
|
||||
"217": "index.js",
|
||||
"218": "price-letter.ts",
|
||||
"219": "applyBrandSelectChange",
|
||||
"220": "index.vue",
|
||||
"221": "index.js",
|
||||
"222": "index.vue",
|
||||
"223": "Community 223",
|
||||
@@ -226,8 +231,10 @@
|
||||
"229": "useClientColumnFilters.ts",
|
||||
"230": "customerPool.ts",
|
||||
"231": "handlePublish",
|
||||
"232": "index.vue",
|
||||
"233": "Community 233",
|
||||
"234": "Community 234",
|
||||
"235": "index.vue",
|
||||
"236": "handleEdit",
|
||||
"237": "handleDisburse",
|
||||
"238": "ViewKvTableCell.vue",
|
||||
@@ -236,11 +243,13 @@
|
||||
"241": "handleExportPdf",
|
||||
"242": "Community 242",
|
||||
"243": "Community 243",
|
||||
"244": "SettingItem.vue",
|
||||
"245": "index.js",
|
||||
"246": "fetchData",
|
||||
"247": "Community 247",
|
||||
"248": "Community 248",
|
||||
"249": "SettingItem.vue",
|
||||
"250": "v2.5.7 - 2025-09-14",
|
||||
"251": "handleDisburse",
|
||||
"252": "index.js",
|
||||
"253": "Community 253",
|
||||
@@ -253,10 +262,12 @@
|
||||
"260": "Community 260",
|
||||
"261": "Community 261",
|
||||
"262": "index.js",
|
||||
"263": "handleSubmit",
|
||||
"264": "syncStatsColumnWidths",
|
||||
"265": "Community 265",
|
||||
"266": "crypto.ts",
|
||||
"267": "fetchData",
|
||||
"268": "zh_CN.js",
|
||||
"269": "Community 269",
|
||||
"270": "Community 270",
|
||||
"271": "SettingDrawer.vue",
|
||||
@@ -270,7 +281,6 @@
|
||||
"284": "Community 284",
|
||||
"285": "Community 285",
|
||||
"286": "Community 286",
|
||||
"288": "loadUserOptions",
|
||||
"289": "handleEdit",
|
||||
"290": "index.js",
|
||||
"292": "Community 292",
|
||||
@@ -279,7 +289,6 @@
|
||||
"295": "Community 295",
|
||||
"296": "Community 296",
|
||||
"299": "zh_CN.js",
|
||||
"300": "form.vue",
|
||||
"301": "ProcessStatusTag.vue",
|
||||
"302": "Community 302",
|
||||
"303": "Community 303",
|
||||
|
||||
@@ -193,9 +193,7 @@
|
||||
"191": "formatYmd",
|
||||
"192": "prepareLineAliasAndBrandForSubmit",
|
||||
"193": "crm-product-display.ts",
|
||||
"194": "index.ts",
|
||||
"195": "Community 195",
|
||||
"196": "Community 196",
|
||||
"197": "v2.4.2.1 - 2025-06-16",
|
||||
"198": "fetchRoleOptions",
|
||||
"199": "colors.ts",
|
||||
@@ -209,7 +207,6 @@
|
||||
"208": "index.vue",
|
||||
"209": "Community 209",
|
||||
"210": "Community 210",
|
||||
"211": "navigation.ts",
|
||||
"212": "index.js",
|
||||
"213": "Community 213",
|
||||
"214": "Community 214",
|
||||
@@ -263,14 +260,12 @@
|
||||
"269": "Community 269",
|
||||
"270": "Community 270",
|
||||
"271": "SettingDrawer.vue",
|
||||
"274": "index.vue",
|
||||
"275": "index.js",
|
||||
"276": "tabs.ts",
|
||||
"277": "handleKeyDown",
|
||||
"278": "index.vue",
|
||||
"280": "Community 280",
|
||||
"281": "index.js",
|
||||
"282": "fetchData",
|
||||
"283": "Community 283",
|
||||
"284": "Community 284",
|
||||
"285": "Community 285",
|
||||
@@ -380,7 +375,6 @@
|
||||
"551": "Community 551",
|
||||
"552": "Community 552",
|
||||
"553": "Community 553",
|
||||
"555": "Community 555",
|
||||
"556": "Community 556",
|
||||
"557": "Community 557",
|
||||
"559": "Community 559",
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+2200
-2036
File diff suppressed because it is too large.
Load diff
@@ -135,8 +135,11 @@
|
||||
|
||||
<div class="list-body list-wrap">
|
||||
<div ref="inventoryTableWrapRef" class="table-scroll bx-list-table-wrap">
|
||||
<ListTable table-key="db-inventory"
|
||||
<ListTable
|
||||
ref="inventoryTableRef"
|
||||
table-key="db-inventory"
|
||||
class="list-table"
|
||||
:height="tableHeight"
|
||||
:data="tableData"
|
||||
v-loading="loading"
|
||||
stripe
|
||||
@@ -360,6 +363,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ListTable>
|
||||
</div>
|
||||
<div ref="inventoryBelowRef">
|
||||
<ListColumnStatsRow
|
||||
ref="inventoryStatsRowRef"
|
||||
storage-key="db-inventory-column-stats"
|
||||
@@ -368,23 +373,23 @@
|
||||
:table-wrap-el="inventoryTableWrapRef"
|
||||
:get-cell-value="getInventoryStatCellValue"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="pagination list-pager-bar">
|
||||
<div class="list-pager-selected">
|
||||
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
||||
<div class="pagination list-pager-bar">
|
||||
<div class="list-pager-selected">
|
||||
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
||||
</div>
|
||||
|
||||
<el-pagination
|
||||
v-show="total > 0"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 100, 500]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@current-change="handlePageChange"
|
||||
@size-change="handleSizeChange"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<el-pagination
|
||||
v-show="total > 0"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 100, 500]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@current-change="handlePageChange"
|
||||
@size-change="handleSizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -546,6 +551,7 @@
|
||||
import ListColumnStatsRow from '@/components/business/list-column-stats-row/index.vue'
|
||||
import type { StatsRowColumn } from '@/utils/list-column-stats'
|
||||
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
|
||||
import { useListTableViewportHeight } from '@/composables/useListTableViewportHeight'
|
||||
import { canDeleteByCreator, CREATOR_DELETE_TIP } from '@/utils/creator-delete'
|
||||
import { syncViewRowFromFlatList } from '@/utils/view-dialog-refresh'
|
||||
import DbCrmProductSelect from '@/components/business/db/DbCrmProductSelect.vue'
|
||||
@@ -610,8 +616,16 @@
|
||||
|
||||
|
||||
const inventoryTableWrapRef = ref<HTMLElement | null>(null)
|
||||
const inventoryBelowRef = ref<HTMLElement | null>(null)
|
||||
const inventoryTableRef = ref<any>(null)
|
||||
const inventoryStatsRowRef = ref<{ resync?: () => void } | null>(null)
|
||||
|
||||
const { tableHeight, recalc: recalcTableHeight } = useListTableViewportHeight({
|
||||
tableEl: inventoryTableWrapRef,
|
||||
pagerEl: inventoryBelowRef,
|
||||
tableRef: inventoryTableRef
|
||||
})
|
||||
|
||||
const inventoryStatsRowColumns = computed((): StatsRowColumn[] => {
|
||||
const cols: StatsRowColumn[] = [
|
||||
{ key: '__selection', interactive: false },
|
||||
@@ -1145,10 +1159,12 @@
|
||||
|
||||
onMounted(() => {
|
||||
loadData()
|
||||
nextTick(() => recalcTableHeight())
|
||||
})
|
||||
|
||||
onActivated(() => {
|
||||
openAddFromPlanQuery()
|
||||
nextTick(() => recalcTableHeight())
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -135,8 +135,11 @@
|
||||
|
||||
<div class="list-body list-wrap">
|
||||
<div ref="plansTableWrapRef" class="table-scroll bx-list-table-wrap">
|
||||
<ListTable table-key="db-plans"
|
||||
<ListTable
|
||||
ref="plansTableRef"
|
||||
table-key="db-plans"
|
||||
class="list-table"
|
||||
:height="tableHeight"
|
||||
:data="tableData"
|
||||
v-loading="loading"
|
||||
stripe
|
||||
@@ -294,6 +297,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ListTable>
|
||||
</div>
|
||||
<div ref="plansBelowRef">
|
||||
<ListColumnStatsRow
|
||||
ref="plansStatsRowRef"
|
||||
storage-key="db-plans-column-stats"
|
||||
@@ -302,23 +307,23 @@
|
||||
:table-wrap-el="plansTableWrapRef"
|
||||
:get-cell-value="getPlansStatCellValue"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="pagination list-pager-bar">
|
||||
<div class="list-pager-selected">
|
||||
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
||||
<div class="pagination list-pager-bar">
|
||||
<div class="list-pager-selected">
|
||||
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
||||
</div>
|
||||
|
||||
<el-pagination
|
||||
v-show="total > 0"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 100, 500]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@current-change="loadData"
|
||||
@size-change="loadData"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<el-pagination
|
||||
v-show="total > 0"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 100, 500]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@current-change="loadData"
|
||||
@size-change="loadData"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -498,6 +503,7 @@
|
||||
import ListColumnStatsRow from '@/components/business/list-column-stats-row/index.vue'
|
||||
import type { StatsRowColumn } from '@/utils/list-column-stats'
|
||||
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
|
||||
import { useListTableViewportHeight } from '@/composables/useListTableViewportHeight'
|
||||
import DbCrmProductSelect from '@/components/business/db/DbCrmProductSelect.vue'
|
||||
import DbPlanRelatedViewDialog from '@/components/business/db/DbPlanRelatedViewDialog.vue'
|
||||
import { useDbInstantSearch } from '@/composables/useDbInstantSearch'
|
||||
@@ -552,8 +558,16 @@
|
||||
|
||||
|
||||
const plansTableWrapRef = ref<HTMLElement | null>(null)
|
||||
const plansBelowRef = ref<HTMLElement | null>(null)
|
||||
const plansTableRef = ref<any>(null)
|
||||
const plansStatsRowRef = ref<{ resync?: () => void } | null>(null)
|
||||
|
||||
const { tableHeight, recalc: recalcTableHeight } = useListTableViewportHeight({
|
||||
tableEl: plansTableWrapRef,
|
||||
pagerEl: plansBelowRef,
|
||||
tableRef: plansTableRef
|
||||
})
|
||||
|
||||
const plansStatsRowColumns = computed((): StatsRowColumn[] => {
|
||||
const cols: StatsRowColumn[] = [
|
||||
{ key: '__selection', interactive: false },
|
||||
@@ -1025,6 +1039,11 @@
|
||||
dateRange.value = getCurrentMonthDateRange()
|
||||
}
|
||||
loadData()
|
||||
nextTick(() => recalcTableHeight())
|
||||
})
|
||||
|
||||
onActivated(() => {
|
||||
nextTick(() => recalcTableHeight())
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user