import { eLevel } from '@/types/level'

export enum eAddManagerModalMode {
  edit,
  create,
}

export enum eTypeOfOperatedObject {
  manager,
  clientManager,
}

export interface iBranchDetailMsg {
  fb: string
  sb: string
  fsb: string
  ssb: string

  fb_id: number
  sb_id: number
  fsb_id: number
  ssb_id: number
}

export interface iPersonalMsg {
  name: string
  uid: any
  phone: string
  branchDetailMsg: Partial<
    Omit<iBranchDetailMsg, 'fb_id' | 'sb_id' | 'fsb_id' | 'ssb_id'>
  >
  address: string
}

export interface iUserManagementState {
  modalShow: boolean
  modalMode: eAddManagerModalMode /* 模态框的形态 */
  typeOfOperatedObject: eTypeOfOperatedObject | undefined
  searchLevel: eLevel | undefined /* 当前搜索的层级 */
  branchDetailMsg: Partial<iBranchDetailMsg> /* 分支行搜索页面所选中的信息需要设在此处 */
  personalMsg: iPersonalMsg /* 调配人员时 该人员的个人信息 */
  address: string /* 新地址 */
  refreshMark: number /* 供表格刷新的标记，组件监听refreshMark，若变化，则刷新表格 */
}
