






export const setMainColumns = (self) => {
  return [
    { dataIndex: 'id', title: 'ID', hidden: true },
    // { dataIndex: 'providerId', title: '供应商ID', hidden: true },
    { dataIndex: 'name', title: '发货方名称' },
    { dataIndex: 'code', title: '发货方编码' },
    { dataIndex: 'shortName', title: '发货方简称' },
    {
      dataIndex: 'statusName',
      title: '状态',
      align: 'center',
      width: 80,
      customRender: (text, data) => {
        return self._c('a-badge', {
          attrs: {
            color: data.status > 0 ? 'cyan' : 'red',
            text
          }
        });
      }
    },
    { dataIndex: 'contact', title: '联系人', width: 120 },
    { dataIndex: 'phoneNumber', title: '手机号', width: 120 },
    { dataIndex: 'landlineNumber', title: '座机号', width: 120 },
    { dataIndex: 'memo', title: '备注', width: 120 },
    {
      dataIndex: 'provinceCityDistrict',
      title: '省市区',
      customRender: (text, data) => {
        const { provinceName, cityName, districtName } = data;
        let arr = [provinceName, cityName, districtName].filter((item) => item&&item);
        return arr.join('-');
      }
    },
    { dataIndex: 'address', title: '详细地址', width: 200  },
    { dataIndex: 'longitude', title: '经度' , width: 120 },
    { dataIndex: 'latitude', title: '纬度', width: 120  },


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