
export const setColumns = (self) => {
  return [
    {
      dataIndex: 'id',hidden:true, title: 'ID'
    },
    {
      dataIndex: 'siteOrder', width: 80, title: '顺序', align: 'center',

    },
    {
      dataIndex: 'distance', title: '距离', hidden:true,width: 200,
      customRender(txt,record) {
        return ~~record.distance+~~record.time
     }
    },

    { dataIndex: 'siteType',align: 'center', title: '提配类型', width:80,  },

    { dataIndex: 'stationName',align: 'center', title: '站点名称', width:120,  },
    { dataIndex: 'name',  title: '名称', width: 180, },
    { dataIndex: 'code', align: 'center', title: '编码', width: 120},
    { dataIndex: 'type',align: 'center', title: '类型', width:80,},
    {
      dataIndex: 'address',
      title: '详细地址',
      align: 'left',
      width:480,
    },
    // { dataIndex: 'groupItem', align: 'center', title: '分组信息', hidden: false },
    { dataIndex: 'position',align: 'center', width: 180,title: '经纬度',hidden:false,
      customRender(txt,record) {
        return record?.position?.join(',')??''
    }

    },
    // { dataIndex: 'id', title: 'id',width: 180,hidden:true},
    // { dataIndex: 'oid', title: 'oid',width: 180,hidden:true},

  ]
}
export const t2_setColumns = (self,str) => {
  let left=[]
  let right = [{
    dataIndex: "pickUpOrder", title: "提货顺序", width: 80,
    align: 'center',
  },
  {
    dataIndex: "shippingOrder", title: "配送顺序", width: 80,
    align: 'center',
  },
  ]
  return [
    ...eval(str),
    {
      dataIndex: "shipbillNo", title: "运单号",
      width:200,
      customRender: (txt, record) => {
        const { recordTagWord } = record
      let text= 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  self._c(
            'span',
            {},
            [text]
          )
        }
      }
    },
    { dataIndex: "cargoOwnerName", title: "货主"},
    { dataIndex: "orderNo", title: "订单号"},
    { dataIndex: "orderTypeName", title: "订单类型"},
    { dataIndex: "orderBusinessTypeName", title: "业务类型"},
    { dataIndex: "temperatureRequirementName", title: "温度要求"},
    { dataIndex: "lineName", title: "线路"},
    { dataIndex: "orderDate", title: "订单下单日期"},
    { dataIndex: "estimatedPickupStartTime", title: "预计提货日期"},
    { dataIndex: "estimatedDeliveryStartTime", title: "预计送达时间"},
    { dataIndex: "shipperTypeName", title: "发货方类型"},
    { dataIndex: "shipperUnitName", title: "发货方单位"},
    { dataIndex: "shipperProvinceCityDistrict", title: "始发地"},
    { dataIndex: "shipperAddress", title: "详细地址"},
    { dataIndex: "consigneeTypeName", title: "收货方类型"},
    { dataIndex: "consigneeUnitName", title: "收货方单位"},
    { dataIndex: "consigneeProvinceCityDistrict", title: "目的地"},
    { dataIndex: "consigneeAddress", title: "详细地址"}
  ]
}