feat(web-admin): add mobile card list for transport plans in webview.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-09-14 16:25:09 +08:00
1 parent 5220637639
commit 17edd7016f
3 files changed
+401 -9

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
import type { Plan } from '@/api/pl'
import {
formatPlVehiclePlateDisplay,
getPlPlanFollowStatusLabel,
getPlPlanFollowStatusTagType,
getPlPlanTypeLabel
} from '@/utils/pl-display'
function productSummary(plan: Plan): string {
const extra = (plan as Plan & { productSummary?: string }).productSummary
if (extra) return extra
const names = (plan.products || [])
.map((item) => item.productName)
.filter(Boolean)
if (names.length) return names.join(' · ')
const parties = [plan.supplierName, plan.customerName || plan.destinationName]
.filter(Boolean)
.join(' → ')
return parties || '—'
}
export function buildPlanCard(plan: Plan) {
return {
id: plan.id,
planNo: plan.planNo || '—',
typeLabel: getPlPlanTypeLabel(plan.planType || ''),
planDate: plan.planDate || '—',
statusLabel: getPlPlanFollowStatusLabel(plan.followStatus),
statusTagType: getPlPlanFollowStatusTagType(plan.followStatus),
plate: formatPlVehiclePlateDisplay(plan.licensePlate, plan.trailerNo) || '—',
people: plan.personnelSummary || '—',
product: productSummary(plan)
}
}