This commit is contained in:
zlwu committed 2026-08-17 09:22:31 +08:00
1 parent 42ad896456
commit 6b2147aa46
66 files changed
+617071 -28046

No files matched your search

@@ -53,15 +53,17 @@
</div>
<div class="list-body list-wrap">
<ListTable table-key="pl-freight-components-approval-done-panel"
class="list-table"
:data="settlementList"
v-loading="loading"
stripe
row-key="id"
@row-dblclick="handleView"
@selection-change="handleSelectionChange"
>
<div ref="doneTableWrapRef" class="table-scroll bx-list-table-wrap">
<ListTable table-key="pl-freight-components-approval-done-panel"
class="list-table"
:data="settlementList"
v-loading="loading"
stripe
row-key="id"
@row-dblclick="handleView"
@selection-change="handleSelectionChange"
@header-dragend="() => doneStatsRowRef?.resync?.()"
>
<el-table-column type="selection" min-width="55" align="center" header-align="center" />
<el-table-column
type="index"
@@ -133,6 +135,15 @@
<template #default="{ row }">{{ row.submitterName || '—' }}</template>
</el-table-column>
</ListTable>
<ListColumnStatsRow
ref="doneStatsRowRef"
storage-key="pl-freight-approval-done-column-stats"
:columns="doneStatsRowColumns"
:data="settlementList"
:table-wrap-el="doneTableWrapRef"
:get-cell-value="getDoneStatCellValue"
/>
</div>
<div class="pagination list-pager-bar">
<div class="list-pager-selected">
@@ -158,6 +169,8 @@
<script setup lang="ts">
import ListQuickSearchInput from '@/components/business/list-quick-search-input/index.vue'
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
import ListColumnStatsRow from '@/components/business/list-column-stats-row/index.vue'
import type { StatsRowColumn } from '@/utils/list-column-stats'
import { useDbInstantSearch } from '@/composables/useDbInstantSearch'
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
import { RefreshLeft, Search } from '@element-plus/icons-vue'
@@ -187,6 +200,36 @@ const {
resetToDefault
} = usePersistedListColumns('pl-freight-approval-done-columns', listColumnDefs)
const doneTableWrapRef = ref<HTMLElement | null>(null)
const doneStatsRowRef = ref<{ resync?: () => void } | null>(null)
const doneStatsRowColumns = computed((): StatsRowColumn[] => {
const cols: StatsRowColumn[] = [
{ key: '__selection', interactive: false },
{ key: '__index', interactive: false },
{ key: 'settlementNo', interactive: true, prop: 'settlementNo' }
]
for (const def of listColumnDefs) {
if (!isColumnVisible(def.prop)) continue
cols.push({
key: def.prop,
interactive: true,
prop: def.prop,
money: def.prop === 'totalFreight'
})
}
return cols
})
function getDoneStatCellValue(row: FreightSettlement, prop: string): unknown {
if (prop === 'settlementStatus') return getSettlementStatusLabel(row.settlementStatus)
if (prop === 'approvalFinishedTime') {
return row.approvalFinishedTime ? formatDateTime(row.approvalFinishedTime) : ''
}
if (prop === 'submitterName') return row.submitterName || ''
return (row as any)?.[prop]
}
const loading = ref(false)
const selectedRows = ref<FreightSettlement[]>([])
const settlementList = ref<FreightSettlement[]>([])
@@ -284,3 +327,9 @@ onMounted(() => {
defineExpose({ refresh })
</script>
<style scoped lang="scss">
.bx-list-table-wrap {
min-width: 0;
}
</style>
@@ -71,15 +71,17 @@
</div>
<div class="list-body list-wrap">
<ListTable table-key="pl-freight-components-approval-pending-panel"
class="list-table"
:data="settlementList"
v-loading="loading"
stripe
row-key="id"
@selection-change="handleSelectionChange"
@row-dblclick="handleView"
>
<div ref="pendingTableWrapRef" class="table-scroll bx-list-table-wrap">
<ListTable table-key="pl-freight-components-approval-pending-panel"
class="list-table"
:data="settlementList"
v-loading="loading"
stripe
row-key="id"
@selection-change="handleSelectionChange"
@row-dblclick="handleView"
@header-dragend="() => pendingStatsRowRef?.resync?.()"
>
<el-table-column type="selection" min-width="55" align="center" header-align="center" />
<el-table-column
type="index"
@@ -145,6 +147,15 @@
<template #default="{ row }">{{ formatDateTime(row.createTime) }}</template>
</el-table-column>
</ListTable>
<ListColumnStatsRow
ref="pendingStatsRowRef"
storage-key="pl-freight-approval-pending-column-stats"
:columns="pendingStatsRowColumns"
:data="settlementList"
:table-wrap-el="pendingTableWrapRef"
:get-cell-value="getPendingStatCellValue"
/>
</div>
<div class="pagination list-pager-bar">
<div class="list-pager-selected">
@@ -190,6 +201,8 @@
<script setup lang="ts">
import ListQuickSearchInput from '@/components/business/list-quick-search-input/index.vue'
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
import ListColumnStatsRow from '@/components/business/list-column-stats-row/index.vue'
import type { StatsRowColumn } from '@/utils/list-column-stats'
import { useDbInstantSearch } from '@/composables/useDbInstantSearch'
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
import { CircleCheck, CircleClose, RefreshLeft, Search } from '@element-plus/icons-vue'
@@ -216,6 +229,36 @@ const {
resetToDefault
} = usePersistedListColumns('pl-freight-approval-pending-columns', listColumnDefs)
const pendingTableWrapRef = ref<HTMLElement | null>(null)
const pendingStatsRowRef = ref<{ resync?: () => void } | null>(null)
const pendingStatsRowColumns = computed((): StatsRowColumn[] => {
const cols: StatsRowColumn[] = [
{ key: '__selection', interactive: false },
{ key: '__index', interactive: false },
{ key: 'settlementNo', interactive: true, prop: 'settlementNo' }
]
for (const def of listColumnDefs) {
if (!isColumnVisible(def.prop)) continue
cols.push({
key: def.prop,
interactive: true,
prop: def.prop,
money: def.prop === 'totalFreight'
})
}
return cols
})
function getPendingStatCellValue(row: FreightSettlement, prop: string): unknown {
if (prop === 'currentApproverName') return row.currentApproverName || ''
if (prop === 'submitterName') return row.submitterName || ''
if (prop === 'createTime') {
return row.createTime ? formatDateTime(row.createTime) : ''
}
return (row as any)?.[prop]
}
const loading = ref(false)
const settlementList = ref<FreightSettlement[]>([])
const selectedRows = ref<FreightSettlement[]>([])
@@ -340,3 +383,9 @@ onMounted(() => {
defineExpose({ refresh })
</script>
<style scoped lang="scss">
.bx-list-table-wrap {
min-width: 0;
}
</style>
@@ -55,15 +55,17 @@
</div>
<div class="list-body list-wrap">
<ListTable table-key="pl-freight-components-disburse-panel"
class="list-table"
:data="settlementList"
v-loading="loading"
stripe
row-key="id"
@selection-change="handleSelectionChange"
@row-dblclick="handleView"
>
<div ref="disburseTableWrapRef" class="table-scroll bx-list-table-wrap">
<ListTable table-key="pl-freight-components-disburse-panel"
class="list-table"
:data="settlementList"
v-loading="loading"
stripe
row-key="id"
@selection-change="handleSelectionChange"
@row-dblclick="handleView"
@header-dragend="() => disburseStatsRowRef?.resync?.()"
>
<el-table-column type="selection" min-width="55" align="center" header-align="center" />
<el-table-column
type="index"
@@ -122,6 +124,15 @@
<template #default="{ row }">{{ row.submitterName || '—' }}</template>
</el-table-column>
</ListTable>
<ListColumnStatsRow
ref="disburseStatsRowRef"
storage-key="pl-freight-disburse-column-stats"
:columns="disburseStatsRowColumns"
:data="settlementList"
:table-wrap-el="disburseTableWrapRef"
:get-cell-value="getDisburseStatCellValue"
/>
</div>
<div class="pagination list-pager-bar">
<div class="list-pager-selected">
@@ -154,6 +165,8 @@
<script setup lang="ts">
import ListQuickSearchInput from '@/components/business/list-quick-search-input/index.vue'
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
import ListColumnStatsRow from '@/components/business/list-column-stats-row/index.vue'
import type { StatsRowColumn } from '@/utils/list-column-stats'
import { useDbInstantSearch } from '@/composables/useDbInstantSearch'
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
import { Money, RefreshLeft, Search } from '@element-plus/icons-vue'
@@ -181,6 +194,35 @@ const {
const emit = defineEmits<{ disbursed: [] }>()
const disburseTableWrapRef = ref<HTMLElement | null>(null)
const disburseStatsRowRef = ref<{ resync?: () => void } | null>(null)
const disburseStatsRowColumns = computed((): StatsRowColumn[] => {
const cols: StatsRowColumn[] = [
{ key: '__selection', interactive: false },
{ key: '__index', interactive: false },
{ key: 'settlementNo', interactive: true, prop: 'settlementNo' }
]
for (const def of listColumnDefs) {
if (!isColumnVisible(def.prop)) continue
cols.push({
key: def.prop,
interactive: true,
prop: def.prop,
money: def.prop === 'totalFreight'
})
}
return cols
})
function getDisburseStatCellValue(row: FreightSettlement, prop: string): unknown {
if (prop === 'approvalFinishedTime') {
return row.approvalFinishedTime ? formatDateTime(row.approvalFinishedTime) : ''
}
if (prop === 'submitterName') return row.submitterName || ''
return (row as any)?.[prop]
}
const loading = ref(false)
const settlementList = ref<FreightSettlement[]>([])
const selectedRows = ref<FreightSettlement[]>([])
@@ -295,3 +337,9 @@ onMounted(() => {
defineExpose({ refresh })
</script>
<style scoped lang="scss">
.bx-list-table-wrap {
min-width: 0;
}
</style>
@@ -47,15 +47,17 @@
</div>
<div class="list-body list-wrap">
<ListTable table-key="pl-freight-components-settled-panel"
class="list-table"
:data="settlementList"
v-loading="loading"
stripe
row-key="id"
@row-dblclick="handleView"
@selection-change="handleSelectionChange"
>
<div ref="settledTableWrapRef" class="table-scroll bx-list-table-wrap">
<ListTable table-key="pl-freight-components-settled-panel"
class="list-table"
:data="settlementList"
v-loading="loading"
stripe
row-key="id"
@row-dblclick="handleView"
@selection-change="handleSelectionChange"
@header-dragend="() => settledStatsRowRef?.resync?.()"
>
<el-table-column type="selection" min-width="55" align="center" header-align="center" />
<el-table-column
type="index"
@@ -115,6 +117,15 @@
</template>
</el-table-column>
</ListTable>
<ListColumnStatsRow
ref="settledStatsRowRef"
storage-key="pl-freight-settled-column-stats"
:columns="settledStatsRowColumns"
:data="settlementList"
:table-wrap-el="settledTableWrapRef"
:get-cell-value="getSettledStatCellValue"
/>
</div>
<div class="pagination list-pager-bar">
<div class="list-pager-selected">
@@ -140,6 +151,8 @@
<script setup lang="ts">
import ListQuickSearchInput from '@/components/business/list-quick-search-input/index.vue'
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
import ListColumnStatsRow from '@/components/business/list-column-stats-row/index.vue'
import type { StatsRowColumn } from '@/utils/list-column-stats'
import { useDbInstantSearch } from '@/composables/useDbInstantSearch'
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
import { RefreshLeft, Search } from '@element-plus/icons-vue'
@@ -167,6 +180,36 @@ const {
resetToDefault
} = usePersistedListColumns('pl-freight-settled-columns', listColumnDefs)
const settledTableWrapRef = ref<HTMLElement | null>(null)
const settledStatsRowRef = ref<{ resync?: () => void } | null>(null)
const settledStatsRowColumns = computed((): StatsRowColumn[] => {
const cols: StatsRowColumn[] = [
{ key: '__selection', interactive: false },
{ key: '__index', interactive: false },
{ key: 'settlementNo', interactive: true, prop: 'settlementNo' }
]
for (const def of listColumnDefs) {
if (!isColumnVisible(def.prop)) continue
cols.push({
key: def.prop,
interactive: true,
prop: def.prop,
money: def.prop === 'totalFreight' || def.prop === 'disburseAmount'
})
}
return cols
})
function getSettledStatCellValue(row: FreightSettlement, prop: string): unknown {
if (prop === 'disburseAmount') return row.disburseAmount || 0
if (prop === 'disburseTime') {
return row.disburseTime ? formatDateTime(row.disburseTime) : ''
}
if (prop === 'settlementStatus') return getSettlementStatusLabel(row.settlementStatus)
return (row as any)?.[prop]
}
const loading = ref(false)
const selectedRows = ref<FreightSettlement[]>([])
const settlementList = ref<FreightSettlement[]>([])
@@ -256,3 +299,9 @@ onMounted(() => {
defineExpose({ refresh })
</script>
<style scoped lang="scss">
.bx-list-table-wrap {
min-width: 0;
}
</style>
@@ -126,15 +126,17 @@
</div>
<div class="list-body list-wrap">
<ListTable table-key="pl-freight-components-settlement-bill-panel"
class="list-table"
:data="settlementList"
v-loading="loading"
stripe
row-key="id"
@selection-change="handleSelectionChange"
@row-dblclick="handleView"
>
<div ref="billsTableWrapRef" class="table-scroll bx-list-table-wrap">
<ListTable table-key="pl-freight-components-settlement-bill-panel"
class="list-table"
:data="settlementList"
v-loading="loading"
stripe
row-key="id"
@selection-change="handleSelectionChange"
@row-dblclick="handleView"
@header-dragend="() => billsStatsRowRef?.resync?.()"
>
<el-table-column type="selection" min-width="55" align="center" header-align="center" />
<el-table-column
type="index"
@@ -235,6 +237,15 @@
<template #default="{ row }">{{ formatDateTime(row.createTime) }}</template>
</el-table-column>
</ListTable>
<ListColumnStatsRow
ref="billsStatsRowRef"
storage-key="pl-freight-settlement-bill-column-stats"
:columns="billsStatsRowColumns"
:data="settlementList"
:table-wrap-el="billsTableWrapRef"
:get-cell-value="getBillsStatCellValue"
/>
</div>
<div class="pagination list-pager-bar">
<div class="list-pager-selected">
@@ -309,6 +320,8 @@
<script setup lang="ts">
import ListQuickSearchInput from '@/components/business/list-quick-search-input/index.vue'
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
import ListColumnStatsRow from '@/components/business/list-column-stats-row/index.vue'
import type { StatsRowColumn } from '@/utils/list-column-stats'
import { useDbInstantSearch } from '@/composables/useDbInstantSearch'
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
import {
@@ -352,6 +365,41 @@ const {
resetToDefault
} = usePersistedListColumns('pl-freight-settlement-bill-columns', listColumnDefs)
const billsTableWrapRef = ref<HTMLElement | null>(null)
const billsStatsRowRef = ref<{ resync?: () => void } | null>(null)
const billsStatsRowColumns = computed((): StatsRowColumn[] => {
const cols: StatsRowColumn[] = [
{ key: '__selection', interactive: false },
{ key: '__index', interactive: false },
{ key: 'settlementNo', interactive: true, prop: 'settlementNo' }
]
for (const def of listColumnDefs) {
if (!isColumnVisible(def.prop)) continue
cols.push({
key: def.prop,
interactive: true,
prop: def.prop,
money: def.prop === 'totalFreight' || def.prop === 'disburseAmount'
})
}
return cols
})
function getBillsStatCellValue(row: FreightSettlement, prop: string): unknown {
if (prop === 'settlementStatus') return getSettlementStatusLabel(row.settlementStatus)
if (prop === 'disburseAmount') return row.disburseAmount || 0
if (prop === 'disburseTime') {
return row.disburseTime ? formatDateTime(row.disburseTime) : ''
}
if (prop === 'currentApproverName') return row.currentApproverName || ''
if (prop === 'submitterName') return row.submitterName || ''
if (prop === 'createTime') {
return row.createTime ? formatDateTime(row.createTime) : ''
}
return (row as any)?.[prop]
}
const loading = ref(false)
const cancelLoadingMap = reactive<Record<string, boolean>>({})
const {
@@ -540,3 +588,9 @@ onMounted(() => {
defineExpose({ refresh })
</script>
<style scoped lang="scss">
.bx-list-table-wrap {
min-width: 0;
}
</style>
@@ -84,15 +84,17 @@
</div>
<div class="list-body list-wrap">
<ListTable table-key="pl-freight-components-unsettled-plan-panel"
class="list-table"
:data="planList"
v-loading="loading"
stripe
row-key="id"
@selection-change="handleSelectionChange"
@row-dblclick="handleViewPlan"
>
<div ref="unsettledTableWrapRef" class="table-scroll bx-list-table-wrap">
<ListTable table-key="pl-freight-components-unsettled-plan-panel"
class="list-table"
:data="planList"
v-loading="loading"
stripe
row-key="id"
@selection-change="handleSelectionChange"
@row-dblclick="handleViewPlan"
@header-dragend="() => unsettledStatsRowRef?.resync?.()"
>
<el-table-column type="selection" min-width="48" align="center" />
<el-table-column
type="index"
@@ -178,6 +180,15 @@
}}</template>
</el-table-column>
</ListTable>
<ListColumnStatsRow
ref="unsettledStatsRowRef"
storage-key="pl-freight-unsettled-plan-column-stats"
:columns="unsettledStatsRowColumns"
:data="planList"
:table-wrap-el="unsettledTableWrapRef"
:get-cell-value="getUnsettledStatCellValue"
/>
</div>
<div class="pagination list-pager-bar">
<div class="list-pager-selected">
@@ -203,6 +214,8 @@
<script setup lang="ts">
import ListQuickSearchInput from '@/components/business/list-quick-search-input/index.vue'
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
import ListColumnStatsRow from '@/components/business/list-column-stats-row/index.vue'
import type { StatsRowColumn } from '@/utils/list-column-stats'
import { useDbInstantSearch } from '@/composables/useDbInstantSearch'
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
import { DocumentAdd, RefreshLeft, Search } from '@element-plus/icons-vue'
@@ -236,6 +249,39 @@ const {
resetToDefault
} = usePersistedListColumns('pl-freight-unsettled-plan-columns', listColumnDefs)
const unsettledTableWrapRef = ref<HTMLElement | null>(null)
const unsettledStatsRowRef = ref<{ resync?: () => void } | null>(null)
const unsettledStatsRowColumns = computed((): StatsRowColumn[] => {
const cols: StatsRowColumn[] = [
{ key: '__selection', interactive: false },
{ key: '__index', interactive: false },
{ key: 'planNo', interactive: true, prop: 'planNo' }
]
for (const def of listColumnDefs) {
if (!isColumnVisible(def.prop)) continue
cols.push({
key: def.prop,
interactive: true,
prop: def.prop,
money: def.prop === 'freightAmount'
})
}
return cols
})
function getUnsettledStatCellValue(row: UnsettledPlanItem, prop: string): unknown {
if (prop === 'planType') return getPlanTypeLabel(row.planType)
if (prop === 'partnerName') return row.customerName || row.supplierName || ''
if (prop === 'licensePlate') {
return formatPlVehiclePlateDisplay(row.licensePlate, undefined, vehicleTrailerLookup.value)
}
if (prop === 'archiveTime') {
return row.archiveTime ? formatDateTime(row.archiveTime) : ''
}
return (row as any)?.[prop]
}
const loading = ref(false)
const createLoading = ref(false)
const {
@@ -396,3 +442,9 @@ onMounted(() => {
defineExpose({ refresh })
</script>
<style scoped lang="scss">
.bx-list-table-wrap {
min-width: 0;
}
</style>