扩展客户资料表单:多手机号、固话、微信QQ与备注
添加/编辑客户支持动态多手机、联系电话、备注等字段,详情侧栏同步展示。
This commit is contained in:
+21
-4
@@ -77,14 +77,31 @@ export interface AvailableAgent {
|
||||
}
|
||||
|
||||
export interface Customer {
|
||||
id: number; tenant_id: number; name: string; phone: string; email: string
|
||||
id: number
|
||||
tenant_id: number
|
||||
name: string
|
||||
phone: string
|
||||
/** 联系电话/固话 */
|
||||
tel?: string
|
||||
email: string
|
||||
wechat?: string
|
||||
qq?: string
|
||||
/** 客户备注 */
|
||||
remark?: string
|
||||
tags: string
|
||||
source: string; status: string; conversation_count: number; last_contact_at: string
|
||||
source: string
|
||||
status: string
|
||||
conversation_count: number
|
||||
last_contact_at: string
|
||||
contacts?: CustomerContact[]
|
||||
}
|
||||
|
||||
export type SaveCustomerPayload = Partial<Customer> & {
|
||||
name?: string
|
||||
/** 多个手机号;首项为主手机 */
|
||||
phones?: string[]
|
||||
}
|
||||
|
||||
export interface KnowledgeCategory {
|
||||
id: number; tenant_id: number; parent_id: number | null; name: string
|
||||
/** 本分类直属条目数 */
|
||||
@@ -347,8 +364,8 @@ export const exportStatisticsCSV = () =>
|
||||
|
||||
export const getCustomer = (id: number) =>
|
||||
get<{ customer: Customer; sessions: Session[]; contacts?: CustomerContact[] }>(`/customers/${id}`)
|
||||
export const createCustomer = (data: Partial<Customer>) => post<Customer>('/customers', data)
|
||||
export const updateCustomer = (id: number, data: Partial<Customer>) => put<Customer>(`/customers/${id}`, data)
|
||||
export const createCustomer = (data: SaveCustomerPayload) => post<Customer>('/customers', data)
|
||||
export const updateCustomer = (id: number, data: SaveCustomerPayload) => put<Customer>(`/customers/${id}`, data)
|
||||
export const deleteCustomer = (id: number) => del(`/customers/${id}`)
|
||||
|
||||
// 黑名单
|
||||
|
||||
Reference in New Issue
Block a user