export default (self, expData = []) => {
  return [
    {
      dataIndex: 'shipbillNo',
      title: '运单号',
      sorter: (a, b) => a.shipbillNo?.localeCompare(b.shipbillNo),
      width: 200,
      customRender: (txt, record) => {
        const { recordTagWord,colorTagFontColor } = record
      let text= self._c(
          'a',
          {
            attrs: {
              href: 'javascript:void(0)',
            },
            style: {[colorTagFontColor&&'color']: colorTagFontColor},

          },
          [self._v(txt)])
        if (recordTagWord) {
          return self._c('a-space', {}, [text, self._c('a-badge', {
            attrs: {
              numberStyle:{boxShadow:'none'},
              count: recordTagWord,
              overflowCount:Infinity
            }
          },
          )])
        } else {
          return text
        }

      },
    },
    {
      dataIndex: 'orderNo',
      title: '订单号',
      sorter: (a, b) => a.orderNo?.localeCompare(b.orderNo),
      width: 160
    },
    {
      dataIndex: 'cargoOwnerName',
      title: '货主',
      sorter: (a, b) => a.cargoOwnerId?.localeCompare(b.cargoOwnerId),
      width: 100
    },
    {
      dataIndex: 'carrierName',
      title: '承运商',
      sorter: (a, b) => a.carrierName?.localeCompare(b.carrierName),
      width: 120
    },
    {
      dataIndex: 'statusName',
      title: '运单状态',
      sorter: (a, b) => a.statusName?.localeCompare(b.statusName),
      width: 100
    },
    {
      dataIndex: 'consigneeName',
      title: '收货方',
      sorter: (a, b) => a.consigneeId?.localeCompare(b.consigneeId),
      width: 100
    },
    {
      dataIndex: 'itemCode',
      title: '商品编码',
      sorter: (a, b) => a.itemCode?.localeCompare(b.itemCode),
      width: 120
    },
    {
      dataIndex: 'itemName',
      title: '商品名称',
      sorter: (a, b) => a.itemName?.localeCompare(b.itemName),
      width: 160
    },
    {
      dataIndex: 'loadingLocation',
      title: '装货地点',
      sorter: (a, b) => a.loadingLocation?.localeCompare(b.loadingLocation),
      width: 120
    },
    {
      dataIndex: 'planDeliveryDate',
      title: '计划发货日期',
      sorter: (a, b) => +new Date(a.planDeliveryDate) - +new Date(b.planDeliveryDate),
      width: 140
    },
    {
      dataIndex: 'branchName',
      title: '仓库',
      sorter: (a, b) => a.branchName?.localeCompare(b.branchName),
      width: 100
    },
    {
      dataIndex: 'pcs',
      title: '计划箱数',
      alert:'center',
      sorter: (a, b) => a.pcs - b.pcs,
      width: 100
    },
    {
      dataIndex: 'isTransfiniteName;',
      title: '是否超限',
      sorter: (a, b) => a.isTransfinite - b.isTransfinite
    },
    {
      key: 'operation',
      title: '操作',
      width: 120,
      fixed: 'right',
      align: 'center',

     scopedSlots: { customRender: 'operation' },
    },
  ]
}

