
export const setColumns = (_self, expData = []) => {
  return [
    {
      dataIndex: 'containerBillNo',
      title: '容器归还单',
      width: 120,
      sorter: (a, b) => {
        return a.containerBillNo.localeCompare(b.containerBillNo);
      }
    },
    {
      dataIndex: 'statusName',
      title: '状态',
      width: 100,
      sorter: (a, b) => {
        return a.status-b.status;
      },
      alert:'center'
    },
    {
      dataIndex: 'driverName',
      title: '司机姓名',
      width: 120,
      sorter: (a, b) => {
        return a.driverName.localeCompare(b.driverName);
      }
    },
    {
      dataIndex: 'driverPhoneNumber',
      title: '司机电话',
      width: 150,
      sorter: (a, b) => {
        return a.driverPhoneNumber.localeCompare(b.driverPhoneNumber);
      }
    },
    {
      dataIndex: 'vehiclePlateNumber',
      title: '运输车辆',
      width: 120,
      sorter: (a, b) => {
        return a.vehiclePlateNumber.localeCompare(b.vehiclePlateNumber);
      }
    },
    {
      dataIndex: 'containersNumber',
      title: '容器数量',
      width: 120,
      sorter: (a, b) => {
        return a.containersNumber - b.containersNumber;
      }
    },
    {
      dataIndex: 'consigneeName',
      title: '收货方',
      width: 120,
      sorter: (a, b) => {
        return a.consignee.localeCompare(b.consignee);
      }
    },
    {
      dataIndex: 'consigneePhoneNumber',
      title: '收货方电话',
      width: 150,
      sorter: (a, b) => {
        return a.consigneePhoneNumber.localeCompare(b.consigneePhoneNumber);
      }
    },
    {
      dataIndex: 'consigneeAddress',
      title: '收货方地址',
      width: 200,
      sorter: (a, b) => {
        return a.consigneeAddress.localeCompare(b.consigneeAddress);
      }
    },
    {
      dataIndex: 'shipperName',
      title: '发货方',
      width: 120,
      sorter: (a, b) => {
        return a.shipper.localeCompare(b.shipper);
      }
    },
    {
      dataIndex: 'shipperAddress',
      title: '发货地址',
      width: 200,
      sorter: (a, b) => {
        return a.shipperAddress.localeCompare(b.shipperAddress);
      }
    },
    {
      dataIndex: 'shipperPhoneNumber',
      title: '发货方电话',
      width: 150,
      sorter: (a, b) => {
        return a.shipperPhoneNumber.localeCompare(b.shipperPhoneNumber);
      }
    },
    {
      dataIndex: 'containerBillDate',
      title: '下单时间',
      width: 150,
      sorter: (a, b) => {
        return new Date(a.containerBillDate) - new Date(b.containerBillDate);
      }
    },
    {
      dataIndex: 'deliveryTime',
      title: '送达时间',
      width: 150,
      sorter: (a, b) => {
        return new Date(a.deliveryTime) - new Date(b.deliveryTime);
      }
    },
    {
      dataIndex: 'abnormalStatusName',
      title: '是否异常',
      width: 120,
      sorter: (a, b) => {
        return a.abnormalStatus.localeCompare(b.abnormalStatus);

      }
    },
    {
      key: 'operation',
      title: '操作',
      fixed: 'right',
      align: 'center',
      width: 160,
      scopedSlots: { customRender: 'operation' }
    }
  ]
}
