This commit is contained in:
2026-10-27 17:39:28 +08:00
parent b913a931ff
commit dd64f443cf
12 changed files with 277 additions and 144 deletions
@@ -38,7 +38,7 @@ type BusinessForm = DemandFormModel
const configuration = computed(() => ({
trucking: {
title: '美国本土卡',
title: '美国本土卡车',
description: '查询并管理美国本土卡订单',
columns: transportColumns(false),
},
@@ -50,16 +50,20 @@ const configuration = computed(() => ({
})[props.kind])
function transportColumns(looseboard: boolean): ColumnDefinition[] {
const originLabel = looseboard ? '起运地' : 'B点取货地'
const destinationLabel = looseboard ? '目的地' : 'C点送达地'
const pickupLabel = looseboard ? '取货时间' : 'B点取货时间'
const deliveryLabel = looseboard ? '送货时间' : 'C点送达时间'
return [
{ key: 'orderNo', label: '订单编号', width: 180 },
...(!looseboard ? [{ key: 'vehicleType', label: '车辆类型', width: 110 }] : []),
{ key: 'origin', label: '起运地', width: 150 },
{ key: 'destination', label: '目的地', width: 150 },
{ key: 'origin', label: originLabel, width: 150 },
{ key: 'destination', label: destinationLabel, width: 150 },
...(looseboard ? [{ key: 'productName', label: '商品名称', width: 150 }, { key: 'estimatedPalletCount', label: '预计托数', width: 100 }] : []),
{ key: 'totalWeightKg', label: '总重量(kg)', width: 120 },
{ key: 'budgetAmount', label: '预算总价', width: 110 },
...([
{ key: 'pickupAt', label: '取货时间', width: 165 }, { key: 'deliveryAt', label: '送货时间', width: 165 },
{ key: 'pickupAt', label: pickupLabel, width: 165 }, { key: 'deliveryAt', label: deliveryLabel, width: 165 },
]),
{ key: 'status', label: '状态', width: 130 },
{ key: 'fleetArrangement', label: '承运安排', width: 190 },
@@ -93,7 +97,7 @@ const queryModel = computed<QueryModel>({
const queryFields = computed<QueryField[]>(() => [
{ key: 'orderNo', label: '订单号', type: 'input', placeholder: '请输入订单号' },
{ key: 'routeKeyword', label: '运输路线', type: 'input', placeholder: '请输入起运地或目的地' },
{ key: 'routeKeyword', label: '运输路线', type: 'input', placeholder: props.kind === 'trucking' ? '请输入 B 点或 C 点' : '请输入起运地或目的地' },
{
key: 'status',
label: '状态',
@@ -123,13 +127,13 @@ const detailFields = computed(() => {
...(props.kind === 'looseboard' ? [
['商品名称', summary.productName], ['预计托数', summary.estimatedPalletCount],
] : [['车辆类型', vehicleTypeLabel(summary.vehicleType)]]),
['起运地', read(summary, 'origin')], ['起运地址', current.originAddress],
['目的地', read(summary, 'destination')], ['目的地址', current.destinationAddress],
[props.kind === 'trucking' ? 'B点取货地' : '起运地', read(summary, 'origin')], [props.kind === 'trucking' ? 'B点取货地址' : '起运地址', current.originAddress],
[props.kind === 'trucking' ? 'C点送达地' : '目的地', read(summary, 'destination')], [props.kind === 'trucking' ? 'C点送达地址' : '目的地址', current.destinationAddress],
['件数', read(summary, 'packageCount')], ['总重量(kg)', read(summary, 'totalWeightKg')],
['总体积(m³)', read(summary, 'totalVolumeCbm')], ['预算总价', money(read(summary, 'budgetAmount'), read(summary, 'currency'))],
['起运地联系人', summary.originContactName], ['起运地联系电话', summary.originContactPhone],
['目的地联系人', summary.destinationContactName], ['目的地联系电话', summary.destinationContactPhone],
['取货时间', localMinute(summary.pickupAt)], ['送货时间', localMinute(summary.deliveryAt)], ['备注', current.remark],
[props.kind === 'trucking' ? 'B点联系人' : '起运地联系人', summary.originContactName], [props.kind === 'trucking' ? 'B点联系电话' : '起运地联系电话', summary.originContactPhone],
[props.kind === 'trucking' ? 'C点联系人' : '目的地联系人', summary.destinationContactName], [props.kind === 'trucking' ? 'C点联系电话' : '目的地联系电话', summary.destinationContactPhone],
[props.kind === 'trucking' ? 'B点取货时间' : '取货时间', localMinute(summary.pickupAt)], [props.kind === 'trucking' ? 'C点送达时间' : '送货时间', localMinute(summary.deliveryAt)], ['备注', current.remark],
]
})
@@ -212,7 +216,7 @@ function getRowActions(candidate: object): TableAction[] {
}
function detailFieldClass(label: unknown) {
return ['备注', '起运地址', '目的地址'].includes(String(label)) ? 'is-wide' : ''
return ['备注', props.kind === 'trucking' ? 'B点取货地址' : '起运地址', props.kind === 'trucking' ? 'C点送达地址' : '目的地址'].includes(String(label)) ? 'is-wide' : ''
}
const listRouteName = computed(() => ({