tableConfig.tsx 1017 Bytes
import type { DataTableColumnsType } from '@/components';
import type { Contract, Sunshine } from '@/api';

/** 运营管理表格列的唯一配置位置;页面只负责数据和操作。 */
export const CONTRACT_COLUMNS: DataTableColumnsType<Contract> = [
  { title: '车牌号', dataIndex: 'licensePlate' },
  { title: '车架号', dataIndex: 'vin' },
  {
    title: '车型',
    render: (_, row) =>
      [row.carBrand, row.carSeriesName, row.carTypeName].filter(Boolean).join(' ') || '-',
  },
  { title: '评估单编号', dataIndex: 'evalOrderNo' },
  { title: '合同状态', dataIndex: 'electronicContractStatus' },
];

export const SUNSHINE_COLUMNS: DataTableColumnsType<Sunshine> = [
  { title: '4S门店', dataIndex: 'sellerMerchantName' },
  { title: '车辆类型', dataIndex: 'carType' },
  {
    title: '激励价格',
    dataIndex: 'sunlightInspiresPrice',
    render: (value) => (value === undefined ? '-' : `¥${String(value)}`),
  },
  { title: '录入时间', dataIndex: 'createdDate' },
];