
export const setNextColumns = (self,isoperation=true) => {
  let operation = []
  if (isoperation) {
    operation=[{
      key: 'operation',
      title: '操作',
      fixed: 'right',
      align: 'center',
      width: 160,
      scopedSlots: { customRender: 'operation' }
    }]
  }

  return [
    {
      dataIndex: 'consigneeName',
      title: '门店名称',
      width: 120,
      sorter: (a, b) => {
        return ~~a.consigneeId-~~b.consigneeId;
      }
    },
    {
      dataIndex: 'consigneeAddress',
      title: '地址',
      width: 200,
      sorter: (a, b) => {
        return a.consigneeAddress.localeCompare(b.consigneeAddress);
      }
    },
    {
      dataIndex: 'consigneePhoneNumber',
      title: '联系电话',
      width: 120,
      sorter: (a, b) => {
        return a.consigneePhoneNumber.localeCompare(b.consigneePhoneNumber);
      }
    },

    {
      dataIndex: 'containersNumber',
      title: '容器数量',
      width: 120,
      sorter: (a, b) => {
        return a.containersNumber - b.containersNumber;
      }
    },
    {
      dataIndex: 'palletsNumber',
      title: '托盘数量',
      width: 120,
      sorter: (a, b) => {
        return a.palletsNumber - b.palletsNumber;
      }
    },
    {
      dataIndex: 'totesNumber',
      title: '周转箱数量',
      width: 120,
      sorter: (a, b) => {
        return a.totesNumber - b.totesNumber;
      }
    },
    {
      dataIndex: 'shipperName',
      title: '发货方',
      width: 120,
      sorter: (a, b) => {
        return a.shipperId-b.shipperId;
      }
    },
    {
      dataIndex: 'shipperPhoneNumber',
      title: '发货方电话',
      width: 120,
      sorter: (a, b) => {
        return a.shipperPhoneNumber.localeCompare(b.shipperPhoneNumber);
      }
    },
    {
      dataIndex: 'shipperAddress',
      title: '发货方地址',
      width: 200,
      sorter: (a, b) => {
        return a.shipperAddress.localeCompare(b.shipperAddress);
      }
    },
    {
      dataIndex: 'driverName',
      title: '送达司机姓名',
      width: 120,
      sorter: (a, b) => {
        return a.driverName.localeCompare(b.driverName);
      }
    },
    {
      dataIndex: 'driverPhoneNumber',
      title: '送达司机电话',
      width: 120,
      sorter: (a, b) => {
        return a.driverPhoneNumber.localeCompare(b.driverPhoneNumber);
      }
    },
    {
      dataIndex: 'vehiclePlateNumber',
      title: '送达车辆',
      width: 120,
      sorter: (a, b) => {
        return a.vehiclePlateNumber.localeCompare(b.vehiclePlateNumber);
      }
    },
    {
      dataIndex: 'containerBillNos',
      title: '关联单号',
      width: 120,
      sorter: (a, b) => {
        return a.containerBillNos.localeCompare(b.containerBillNos);
      }
    },
    {
      dataIndex: 'deliveryTime',
      title: '送达时间',
      width: 150,
      sorter: (a, b) => {
        return new Date(a.deliveryTime) - new Date(b.deliveryTime);
      }
    },...operation
  ]


}
