提交
This commit is contained in:
1 parent
33c038b8d9
commit
54b27a3f0e
253 files changed
+30060
-14298
No files matched your search
@@ -112,6 +112,29 @@ export function formatPlanProductListText(
|
||||
return `${name}${specPart},${qtyUnit}`
|
||||
}
|
||||
|
||||
/** 司机公开页产品一行展示(含运输计划产品备注) */
|
||||
export function formatPublicTransportProductLine(product: {
|
||||
productName?: string
|
||||
model?: string
|
||||
packageSpec?: string
|
||||
unit?: string
|
||||
quantity?: number | string | null
|
||||
remark?: string
|
||||
}) {
|
||||
const name = product.productName?.trim() || '—'
|
||||
const parts: string[] = []
|
||||
const model = product.model?.trim()
|
||||
const packageSpec = product.packageSpec?.trim()
|
||||
if (model) parts.push(model)
|
||||
if (packageSpec) parts.push(packageSpec)
|
||||
const qty = getPlanProductPlannedQuantity(product)
|
||||
const unitRaw = product.unit || '吨'
|
||||
parts.push(qty !== '—' ? `${qty} ${unitRaw}` : unitRaw)
|
||||
const remark = product.remark?.trim()
|
||||
parts.push(`备注:${remark || '—'}`)
|
||||
return `${name}(${parts.join(',')})`
|
||||
}
|
||||
|
||||
export function getPlPlanCompanyLabel(company?: string) {
|
||||
const map: Record<string, string> = { shanxia: '安庆山峡', yundong: '安徽云栋' }
|
||||
return company ? map[company] || company : '—'
|
||||
@@ -142,7 +165,7 @@ export function getPlPlanFollowStatusLabel(status?: string) {
|
||||
draft: '草稿',
|
||||
processing: '进行中',
|
||||
completed: '已完成',
|
||||
cancelled: '已取消'
|
||||
cancelled: '已作废'
|
||||
}
|
||||
return status ? map[status] || status : '—'
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user