export interface IListQuery { customerNo: string customerName: string contacts: string createTimeStart: string createTimeEnd: string formId: string approvalStatus: string offset: number limit: number sort?: string order?: string } export interface IDictType { name: string id: string value: string } export interface ITableColumn { text: string // 标题 value: string // 值 align?: 'left' | 'center' | 'right' // 排列 width?: string | number // 宽度,px值 show?: boolean // 是否显示列 showOverflow?: boolean // 是否溢出为省略号 filter?: Function // 字段过滤器 styleFilter?: Function // 文字过滤器 fixed?: boolean // 固定列 filters?: { text: string; value: string }[] // 列筛选 isFilters?: boolean // 是否有列筛选 required?: boolean // 是否必填 } export interface ICustomerInfo { id: string customerNo: string customerName: string deptId: string customerLocation: string customerLocationName?: string contacts?: string mobile?: string phone?: string postalCode?: string address?: string file?: string approvalStatus?: string approvalStatusName?: string processId?: string taskId?: string remark?: string createUserId?: number createUserName?: string createTime?: string decisionItem?: number } export interface ICustomerInfoStaff { id: string customerId: string staffName: string deptName: string staffJob?: string mobile?: string editable: boolean } // 验证手机 export const phoneValidator = (rule: any, value: any, callback: any) => { const reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ if (reg.test(value.trim()) === true || value.trim() === '') { callback() } else { callback(new Error('验证失败')) } } // 验证座机 export const mobileValidator = (rule: any, value: any, callback: any) => { const reg = /^(0\d{2,3}(-)?\d{7,8})$/ if (reg.test(value.trim()) === true) { callback() } else { callback(new Error('验证失败')) } } // 邮编校验 export const postalCodeValidator = (rule: any, value: any, callback: any) => { const reg = /^[0-9]{6}$/ if (reg.test(value.trim()) === true || value.trim() === '') { callback() } else { callback(new Error('验证失败')) } } export const mobileReg = (val: string) => { const reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ return reg.test(val) }