import { Address, Tag } from '../common'; import { InquiryOrderStatus } from '../order/order-schema/common'; import { TenantUser } from '../order/order-schema/inquiry/InquiryOrderUser'; import { PayMethod } from '../order/order-schema/quotation'; import { Person, TenantConfigEncryptedViewTypeEnum } from '../user'; import { Base, Id } from '../utils'; import { QueryConditionV2 } from '../utils/api/Query'; import { CustomerTrackLevel } from './CustomerTrackInfo'; /** 职务 */ export declare const DtcCustomerPositions: string[]; export interface CustomerRepresentative { customerId: Id; /** 客户代表 */ representativeName: string; /** 客户代表联系方式 */ representativeContactInfo: string; representativePersonId: Id; representativePerson: Person; /** 客户代表邮箱 */ email?: string; /** 客户代表手机号 */ phoneNumber?: string; } export interface RepresentativePerson { id: Id; personId: Id; username: string; nickname: string; phoneNumber: string; email: string; source: string; origin: string; customerData: any; googleTrackData: any; englishName: string; } export declare class ReceiveAddress extends Address { customerId: Id; /** 收货人 */ recipient: string; firstName?: string; lastName?: string; /** 收货人联系电话 */ contactInfo: string; companyName?: string; email?: string; constructor(props?: Partial); } /** 客户推荐人 */ export declare class CustomerReferrer extends Base { personId: Id; nickname: string; username: string; phoneNumber: string; constructor(props?: Partial); } export type InquiryCustomerType = 'PERSON' | 'ENTERPRISE'; export type InquiryCustomerSource = 'PROXY_CHANNEL' | 'END_CHANNEL' | 'SITE_OVERSEA'; export type InquiryCustomerRegistrationStatus = 'ACTIVE' | 'UN_ACTIVE' | 'UN_REGISTER'; export declare class InquiryCustomer extends Base { /** 个人客户、企业客户 */ type: InquiryCustomerType; /** 渠道客户、终端客户 */ source: InquiryCustomerSource; /** 客户注册状态 */ registrationStatus: InquiryCustomerRegistrationStatus; /** 客户来源 官网 or 内部 */ isInternal: boolean; /** 客户代表 Id */ representativeId?: Id; /** 判断是否来自海外 */ get isOversea(): boolean; /** 创建人 */ creatorId: Id; /** @deprecated 客户是否启用 */ isEnable: boolean; /** 客户是否启用 */ enable: boolean; /** 注册来源 */ origin: string; /** new 注册来源 */ trackChannel: string; /** new 追踪码 */ trackOrigin: string; /** 客户分级 */ level?: CustomerTrackLevel; /** 所需材料 */ requiredMaterial?: string; /** 备注 */ customerLeadsRemark?: string; /** 公司名称 */ companyName?: string; /** 客户名称 */ name: string; /** 当用户为个人客户联系电话 */ phoneNumber: string; /** 客户代表 */ customerRepresentatives: CustomerRepresentative[]; /** 客户地址 */ address: string; /** 国家信息 */ country?: string; /** 客户邮箱 */ email: string; /** 销售代理人 */ maintainerId: Id; maintainerUser: TenantUser; /** 客户标签 */ tags: Tag[]; /** 所有的标签 id(包含系统自动打标) */ tagIds: Id[]; /** 人工添加的标签 id */ manualTagIds: Id[]; get systemTagIds(): string[]; /** 报价人 */ quotationUserIds: Id[]; quotationUsers: TenantUser[]; /** 收货信息 */ receiveAddress: ReceiveAddress[]; referrerId: Id; /** 推荐人(非注册用户) 名称 */ referrerName: string; /** 推荐人(非注册用户) 电话 */ referrerPhoneNumber?: string; /** 推荐人邮箱 */ referrerEmail?: string; /** 推荐人(注册用户) */ referrer?: CustomerReferrer; /** 客户绑定的报价组 */ quotationGroupIds?: Id[]; /** 开户银行 */ depositBankName: string; /** 银行账户 */ depositBankAccount: string; /** 公司电话 */ companyPhoneNumber: string; billingCompanyName: string; /** 开票地址 */ billingAddress: string; /** 开票邮箱 */ billingToEmail: string; /** 纳税人识别号 */ billingTaxPayerNumber: string; billingVat: string; /** @deprecated 额外属性 */ attr: { /** @deprecated */ taxpayerNumber?: string; /** @deprecated */ bankName?: string; /** @deprecated */ bankAccount?: string; /** @deprecated */ companyPhoneNumber?: string; /** @deprecated */ taxAddress?: string; /** 寄件人电话 */ senderPhoneNumber?: string; /** @deprecated */ vat?: string; }; /** @deprecated 最近成交时间 */ lastOrderTime: string; /** 最近成交时间 */ latestOrderTime: string; /** 最近询单时间 */ latestInquiryTime: string; /** 最近跟进时间 */ latestFollowUpTime: string; /** 最近活跃时间 */ latestActiveAt: string; /** 判断 合同校验 是使用租户配置还是该客户的配置 */ contractConfigType: 'TENANT_CONFIG' | 'CUSTOMER_CONFIG'; /** @deprecated */ taxRate: number; taxRateInThousand: number; /** 是否需要同步到erp */ isNeedSyncOrder: boolean; /** 是否系统客户 */ isSystemCustomer?: boolean; /** 是否开启对该客户供应产能 */ isSupplyOff?: boolean; /** 是否允许客户获取标准化需求 */ allowGetProductRequirement?: boolean; /** 是否允许同步客户其它费用 */ allowSyncOtherPrice?: boolean; allowRoundingItemPrice?: boolean; /** 接受外发订单后,供应商订单的初始状态 */ initialOrderStatus?: InquiryOrderStatus; /** 合同校验 */ contractCheckOption: { /** 是否开启校验 */ enable: boolean; /** 校验金额 */ amount: number; }; payMethod: Partial; /** 客户留资 JSON 字符串 */ customerData?: string; /** google 追踪信息 JSON 字符串 */ googleTrackData?: string; /** 多币种 */ settleCurrency?: string; representativePerson: RepresentativePerson; followUpTime?: string; industries?: []; /** 职务信息 */ position?: string; /** 邮件偏好 */ mailPreference?: 'DISALLOW_ALL' | 'NONE'; /** 转化分数 */ conversionScore: number; /** 跟进记录数量 */ followUpRecordCount: number; customerDataFromJSON(): Record; /** 追踪信息 */ get googleTrackDataFromJSON(): any; constructor(props?: Partial); } export interface CustomerFilterGroup { name: string; tags: string[]; tagConditions?: QueryConditionV2; } interface CustomerBehaviorStat { visitedPages: string[]; inquiryCount: number; orderCount: number; } export interface CustomerConversionStatScoreInfo { country: string[]; experience: string[]; accountType: InquiryCustomerType; orderAmount: number; industry: string[]; repurchase: string[]; demands: string[]; } export declare class InquiryCustomerPortraitStats extends Base { /** 短期行为数据(72小时内) */ behaviorStatWithIn72Hours: Partial; /** 历史行为统计 */ behaviorStat: Partial; /** 转换价值统计 */ conversionStat: Partial<{ total: number; value: 'high' | 'low'; scoreInfo: CustomerConversionStatScoreInfo; scores: Record; }>; constructor(props?: Partial); } export declare const defaultCustomerTags: { exact: boolean; modifiable: boolean; tag: string; }[]; export declare const getModifyCustomerParams: (customer: Partial) => import("lodash").Dictionary; /** 获取加密后的客户信息,这里是不同的地方会有不同的加密要求 */ export declare function getEncryptedInquiryCustomer(customer: InquiryCustomer, encryptAssertions: TenantConfigEncryptedViewTypeEnum[], ignoreFields?: 'name'[]): InquiryCustomer; export declare function distinctAddressList(addressList?: ReceiveAddress[]): ReceiveAddress[]; export declare const getCustomerConversionStatScoreInfo: (scoreInfo: CustomerConversionStatScoreInfo, key: keyof CustomerConversionStatScoreInfo) => string | number; export {};