export type A2AFromDataType = {
  num: string //订单编号
  dingNum: string //钉钉审批编号
  dateStart: string //租赁开始日期 - yyyy-mm-dd
  dateEnd: string //租赁结束日期 - yyyy-mm-dd
  zlName: string //租赁方名称

  siteArr: string[] | undefined
  zlProvince: string
  zlCity: string //所在地区 省/市

  zlUser: string //负责人
  zlPhone: string //联系方式
  pageSize: number
  pageNum: number
}

export const A2AtopTypeArr: { name: string; key: TopTypeType }[] = [
  { name: '租赁', key: 'ZL' },
  { name: '销售', key: 'XS' },
  { name: '报修', key: 'BX' },
  { name: '定损', key: 'DS' },
  { name: '维修', key: 'WX' }
]

export type TopTypeType = 'ZL' | 'XS' | 'BX' | 'DS' | 'WX'
export const A2AtopTypeObj: any = {
  ZL: '租赁方',
  XS: '购买方',
  BX: '报修方',
  DS: '报损方',
  WX: '收货方'
}

export const A2AtopTypeEditLabel = (topType: TopTypeType) => {
  let name = A2AtopTypeArr.find(v => v.key === topType)!.name
  if (name === '维修') name = '送修'
  return name
}
