export type CoopStatus = '已合作' | '终止合作' | '洽谈中' | '合约过期';

export type SupplierType =
  | '备件供应商'
  | '保险公司'
  | '加氢站'
  | '充电站'
  | '维修站'
  | '救援车队'
  | '整车厂'
  | '其他';

export type SupplierKpiKey =
  | 'all'
  | 'cooperated'
  | 'negotiating'
  | 'terminated'
  | 'expired'
  | 'parts'
  | 'insurance'
  | 'licenseAbnormal';

export interface SupplierRecord {
  id: string;
  supplierCode: string;
  coopStatus: CoopStatus;
  supplierName: string;
  type: SupplierType;
  region: string;
  city: string;
  creditCodeOrId: string;
  contact: string;
  contactMobile: string;
  contactPhone: string;
  address: string;
  email: string;
  remark: string;
  creator: string;
  createTime: string;
  licenseStatus: '正常' | '异常';
}

export interface SupplierFilters {
  code: string;
  coopStatuses: CoopStatus[];
  types: SupplierType[];
  regions: string[];
  city: string;
  creator: string;
  nameKeyword: string;
}

export const EMPTY_FILTERS: SupplierFilters = {
  code: '',
  coopStatuses: [],
  types: [],
  regions: [],
  city: '',
  creator: '',
  nameKeyword: '',
};

export interface SupplierCreateForm {
  contractingCompany: string;
  supplierName: string;
  provinceCity: string;
  detailAddress: string;
  fullAddress: string;
  taxId: string;
  regPhone: string;
  regAddress: string;
  bankName: string;
  bankAccount: string;
  businessLicenseFile: string;
  otherDocFiles: string[];
}

export const EMPTY_CREATE_FORM: SupplierCreateForm = {
  contractingCompany: '',
  supplierName: '',
  provinceCity: '',
  detailAddress: '',
  fullAddress: '',
  taxId: '',
  regPhone: '',
  regAddress: '',
  bankName: '',
  bankAccount: '',
  businessLicenseFile: '',
  otherDocFiles: [],
};

export type SupplierPageId = 'list' | 'create';
