huangxz
2026-08-10 0c81042b1641611e0f72a7b4872e741bc74cb5ea
feat(tpd): 乘客订单列表新增连环派单筛选与列

「是否连环派单」为下拉单选,清空即不限;筛选值用 ?? 传参,
避免选「否」时 0 被当假值丢掉退化成查全部。
列宽合计变为 1710,scroll-x 同步跟上,保证 fixed 的操作列可见。
2个文件已修改
35 ■■■■■ 已修改文件
src/service/api/testPlanManagement.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/testDemo/testPlanManagement/detail.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/service/api/testPlanManagement.ts
@@ -138,6 +138,7 @@
  status?: number
  testPlanId: number | string
  genStatus?: number
  chainDispatched?: number
}) {
  return request.Post<Service.ResponseResult<any>>('/operation/api/v1/test-plan-demo/detail/pageOrders', data)
}
@@ -151,6 +152,7 @@
  startAddress?: string
  status?: number
  testPlanId: number | string
  chainDispatched?: number
}) {
  const method = request.Post<Blob>('/operation/api/v1/test-plan-demo/detail/exportOrders', data, {
    responseType: 'blob',
src/views/testDemo/testPlanManagement/detail.vue
@@ -59,6 +59,7 @@
  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,
})
@@ -66,6 +67,7 @@
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)
@@ -89,6 +91,7 @@
  dispatchScore?: number | string | null
  skipReason?: string
  scoreDetail?: string
  chainDispatchedName?: string
}
interface VehicleRow {
@@ -139,6 +142,11 @@
  { 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> = {
@@ -264,6 +272,24 @@
    ),
  },
  {
    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: () => (
@@ -317,6 +343,8 @@
    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,
@@ -442,6 +470,7 @@
        dispatchScore: item.dispatchScore ?? null,
        skipReason: item.skipReason || '',
        scoreDetail: item.scoreDetail || '',
        chainDispatchedName: item.chainDispatchedName || '',
      }
    })
    orderCount.value = Number(pageData.total || 0)
@@ -612,6 +641,7 @@
    ),
  },
  { 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: '操作',
@@ -670,6 +700,7 @@
    endAddress: null,
    plateNumber: null,
    status: null,
    chainDispatched: null,
    dispatchTimeRange: null,
  }
  orderPageParams.value.pageNum = 1
@@ -1000,7 +1031,7 @@
                  :row-props="getOrderRowProps"
                  flex-height
                  :bordered="false"
                  :scroll-x="1600"
                  :scroll-x="1710"
                  @update:checked-row-keys="handleOrderCheck"
                >
                  <template #empty>