| | |
| | | endAddress: null as string | null, |
| | | plateNumber: null as string | null, |
| | | status: null as number | null, |
| | | chainDispatched: null as number | null, |
| | | dispatchTimeRange: null as [string, string] | null, |
| | | }) |
| | | |
| | |
| | | const isStartAddressSelectOpen = ref(false) |
| | | const isEndAddressSelectOpen = ref(false) |
| | | const isStatusSelectOpen = ref(false) |
| | | const isChainDispatchedSelectOpen = ref(false) |
| | | const isDispatchTimeRangeOpen = ref(false) |
| | | const orderCheckedRowKeys = ref<Array<number | string>>([]) |
| | | const orderCount = ref(0) |
| | |
| | | dispatchScore?: number | string | null |
| | | skipReason?: string |
| | | scoreDetail?: string |
| | | chainDispatchedName?: string |
| | | } |
| | | |
| | | interface VehicleRow { |
| | |
| | | { label: '服务中', value: 6 }, |
| | | { label: '已完成', value: 10 }, |
| | | { label: '已取消', value: -1 }, |
| | | ] |
| | | |
| | | const CHAIN_DISPATCHED_OPTIONS = [ |
| | | { label: '是', value: 1 }, |
| | | { label: '否', value: 0 }, |
| | | ] |
| | | |
| | | const ORDER_STATUS_LABEL_MAP: Record<number, string> = { |
| | |
| | | ), |
| | | }, |
| | | { |
| | | label: '是否连环派单', |
| | | path: 'chainDispatched', |
| | | render: () => ( |
| | | <n-select |
| | | v-model:value={searchModel.value.chainDispatched} |
| | | options={CHAIN_DISPATCHED_OPTIONS} |
| | | placeholder="请选择" |
| | | clearable |
| | | onUpdate:show={(val: boolean) => (isChainDispatchedSelectOpen.value = val)} |
| | | > |
| | | {{ |
| | | arrow: () => renderDropdownArrow(isChainDispatchedSelectOpen.value), |
| | | empty: () => renderSelectEmpty(), |
| | | }} |
| | | </n-select> |
| | | ), |
| | | }, |
| | | { |
| | | label: '下发时间', |
| | | path: 'dispatchTimeRange', |
| | | render: () => ( |
| | |
| | | endAddress: searchModel.value.endAddress || undefined, |
| | | plateNumber: searchModel.value.plateNumber || undefined, |
| | | status: searchModel.value.status ?? undefined, |
| | | // 用 ?? 而不是 ||:选「否」时值为 0,|| 会把它当假值丢掉,筛选退化成查全部 |
| | | chainDispatched: searchModel.value.chainDispatched ?? undefined, |
| | | dispatchStartTime: dispatchStartTime ? `${dispatchStartTime} 00:00:00` : undefined, |
| | | dispatchEndTime: dispatchEndTime ? `${dispatchEndTime} 23:59:59` : undefined, |
| | | testPlanId: currentPlanId.value, |
| | |
| | | dispatchScore: item.dispatchScore ?? null, |
| | | skipReason: item.skipReason || '', |
| | | scoreDetail: item.scoreDetail || '', |
| | | chainDispatchedName: item.chainDispatchedName || '', |
| | | } |
| | | }) |
| | | orderCount.value = Number(pageData.total || 0) |
| | |
| | | ), |
| | | }, |
| | | { title: '评分', key: 'dispatchScore', width: 90, render: row => row.dispatchScore != null ? String(row.dispatchScore) : '-' }, |
| | | { title: '连环派单', key: 'chainDispatchedName', width: 110, render: row => row.chainDispatchedName || '-' }, |
| | | { title: '订单记录', key: 'skipReason', width: 280, ellipsis: { tooltip: true }, render: row => row.skipReason || '-' }, |
| | | { |
| | | title: '操作', |
| | |
| | | endAddress: null, |
| | | plateNumber: null, |
| | | status: null, |
| | | chainDispatched: null, |
| | | dispatchTimeRange: null, |
| | | } |
| | | orderPageParams.value.pageNum = 1 |
| | |
| | | :row-props="getOrderRowProps" |
| | | flex-height |
| | | :bordered="false" |
| | | :scroll-x="1600" |
| | | :scroll-x="1710" |
| | | @update:checked-row-keys="handleOrderCheck" |
| | | > |
| | | <template #empty> |