feat(pl): 运费结算审批分流与车辆挂车号等 PL 能力完善
拆分运费审批/出款页面,补充结算发票附件与菜单 SQL,并同步前后端模型与车辆相关展示。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
66d5a8714b
commit
98aec80d71
37 files changed
+1362
-195
No files matched your search
@@ -110,6 +110,8 @@ export function usePlPlanArrangeActions() {
|
||||
endPoint?: string
|
||||
pickupAddress?: string
|
||||
destinationAddress?: string
|
||||
pickupNotes?: string
|
||||
destinationNotes?: string
|
||||
licensePlate?: string
|
||||
driverUrl?: string
|
||||
}) {
|
||||
@@ -118,7 +120,9 @@ export function usePlPlanArrangeActions() {
|
||||
lines.push(
|
||||
`时间:${formatDateTime(plan.value?.pickupTime) || plan.value?.planDate || '—'}`
|
||||
)
|
||||
const productText = products.value.map(p => formatPlanProductListText(p, getUnitLabel)).join(';')
|
||||
const productText = products.value
|
||||
.map(p => formatPlanProductListText(p, getUnitLabel, { usePlannedQuantity: true }))
|
||||
.join(';')
|
||||
lines.push(`产品:${productText || '—'}`)
|
||||
lines.push(
|
||||
`路线:${options?.pickupAddress || plan.value?.pickupAddress || options?.startPoint || '—'} → ${
|
||||
@@ -129,6 +133,8 @@ export function usePlPlanArrangeActions() {
|
||||
'—'
|
||||
}`
|
||||
)
|
||||
lines.push(`取货注意事项:${options?.pickupNotes || plan.value?.pickupNotes || '—'}`)
|
||||
lines.push(`送货注意事项:${options?.destinationNotes || plan.value?.destinationNotes || '—'}`)
|
||||
lines.push(`司机链接:${options?.driverUrl || driverUrl.value || '—'}`)
|
||||
return lines.join('\n')
|
||||
}
|
||||
@@ -168,13 +174,24 @@ export function usePlPlanArrangeActions() {
|
||||
ElMessage.success('已复制全部现场链接')
|
||||
}
|
||||
|
||||
function resolveSiteRecordProductText(record: TransportSiteLink) {
|
||||
const product = products.value.find(item => item.id === record.planProductId)
|
||||
if (product) {
|
||||
return formatPlanProductListText(product, getUnitLabel, { usePlannedQuantity: true })
|
||||
}
|
||||
return record.productName || '—'
|
||||
}
|
||||
|
||||
function buildSiteSummaryText(options?: { licensePlate?: string }) {
|
||||
return buildSiteSummaryFromInventoryLinks({
|
||||
planNo: plan.value?.planNo,
|
||||
licensePlate: options?.licensePlate || licensePlate.value || plan.value?.licensePlate,
|
||||
pickupTime: plan.value?.pickupTime,
|
||||
planDate: plan.value?.planDate,
|
||||
records: siteRecords.value
|
||||
records: siteRecords.value.map(record => ({
|
||||
...record,
|
||||
productText: resolveSiteRecordProductText(record)
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -184,7 +201,7 @@ export function usePlPlanArrangeActions() {
|
||||
return
|
||||
}
|
||||
await navigator.clipboard.writeText(buildSiteSummaryText(options))
|
||||
ElMessage.success('已复制现场简述')
|
||||
ElMessage.success('已复制给现场')
|
||||
}
|
||||
|
||||
async function copyPlanSummary(options?: {
|
||||
@@ -192,11 +209,13 @@ export function usePlPlanArrangeActions() {
|
||||
endPoint?: string
|
||||
pickupAddress?: string
|
||||
destinationAddress?: string
|
||||
pickupNotes?: string
|
||||
destinationNotes?: string
|
||||
licensePlate?: string
|
||||
driverUrl?: string
|
||||
}) {
|
||||
await navigator.clipboard.writeText(buildPlanSummaryText(options))
|
||||
ElMessage.success('已复制计划简述')
|
||||
ElMessage.success('已复制给司机')
|
||||
}
|
||||
|
||||
function resolveInventoryUnitLabel(record: TransportInventoryLink) {
|
||||
|
||||
Reference in new issue
Block a user