feat(pl): add Excel export for freight unsettled plans and settlement tabs
Support filtered and selected export across freight settlement board panels. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
8f1f08b284
commit
b1f734dbb0
9 files changed
+303
-2
No files matched your search
@@ -71,6 +71,15 @@
|
||||
>
|
||||
<el-icon><DocumentAdd /></el-icon>生成结算单
|
||||
</el-button>
|
||||
<ListExportDropdown
|
||||
:export-fn="freightApi.exportUnsettledPlans"
|
||||
:get-filter-params="getUnsettledExportFilterParams"
|
||||
:has-selection="true"
|
||||
:selected-ids="selectedRows.map((r) => r.id)"
|
||||
:visible-columns="unsettledExportColumns"
|
||||
filename="待结算计划.xlsx"
|
||||
/>
|
||||
|
||||
<ListToolbarEndActions
|
||||
:loading="loading"
|
||||
:column-defs="listColumnDefs"
|
||||
@@ -214,6 +223,7 @@
|
||||
<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 ListExportDropdown from '@/components/business/list-export-dropdown/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'
|
||||
@@ -297,6 +307,22 @@ const vehicleOptions = ref<Vehicle[]>([])
|
||||
const vehicleTrailerLookup = computed(() => buildVehicleTrailerLookup(vehicleOptions.value))
|
||||
const planList = ref<UnsettledPlanItem[]>([])
|
||||
const selectedRows = ref<UnsettledPlanItem[]>([])
|
||||
|
||||
function getUnsettledExportFilterParams() {
|
||||
return {
|
||||
q: quickSearchKeyword.value.trim() || searchForm.q || undefined,
|
||||
carrierId: searchForm.carrierId || undefined,
|
||||
planType: searchForm.planType || undefined,
|
||||
licensePlate: searchForm.licensePlate || undefined
|
||||
}
|
||||
}
|
||||
|
||||
const unsettledExportColumns = computed(() => {
|
||||
const cols = [...visibleColumns.value]
|
||||
if (!cols.includes('planNo')) cols.unshift('planNo')
|
||||
return cols
|
||||
})
|
||||
|
||||
const planViewVisible = ref(false)
|
||||
const viewPlanId = ref('')
|
||||
const quickSearchKeyword = ref('')
|
||||
|
||||
Reference in new issue
Block a user