| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- import { ApiInstance } from '../type'
- import {LocationQueryValue} from "vue-router";
- // 新增
- export interface AddOperation {
- typeAttr: string,
- deptId: string,
- name: string,
- mobile: string,
- identity: string,
- identityTimeStart: string,
- identityTimeEnd: string,
- leaderId: string,
- referrerId: string,
- sex?: string,
- birthday?: string,
- nations?: string,
- koseki?: string,
- maritalStatus?: string,
- politicsStatus?: string,
- health?: string,
- province?: string,
- city?: string,
- district?: string,
- liveAddress?: string,
- postalCode?: string,
- education?: string,
- graduationTime?: string,
- school?: string,
- isComputer?: string,
- emergencyContactName?: string,
- emergencyContactTel?: string,
- salary?: string,
- salaryLevel?: string,
- bankCardId?: string,
- bankName?: string,
- sfz1?: string,
- sfz2?: string,
- qualification?: string,
- contract?: string,
- applicant?: string,
- salaryTable?: string,
- leaveTable?: string
- }
- // 列表
- export interface OperationSearch {
- pages: number,
- size: number,
- salesman?: string,
- organizationName?: string,
- deptId?: string,
- typeAttr?: string,
- deptName?: string,
- status?: number,
- isEnable?: string,
- leaderId?: string
- }
- // 银行卡
- export interface AddBankCard {
- userJzgInfoId: string,
- bankCardNumber: string,
- bankName: string,
- bankAddress: string,
- attachment?: string
- }
- // 启用/禁用
- export interface OperationIsEnable {
- ids: string[],
- isEnable: number,
- getAll: number
- }
- export interface OperationEdit extends AddOperation {
- id: string
- }
- // 业务员管理相关接口
- const operationApi = (axiosInstance: ApiInstance) => ({
- addOperation: (data: AddOperation) => axiosInstance.post('/userInfo/add', data), // 新赠
- updateOperation: (data: any) => axiosInstance.post('/userInfo/update', data), //编辑
- operationList: (data: OperationSearch) => axiosInstance.post('/userInfo/getUserInfoList', data), // 列表
- operationDelete: (data: {
- ids: string[],
- getAll: number
- }) => axiosInstance.post('/userInfo/delete', data), // 删除
- operationIsEnable: (data: OperationIsEnable) => axiosInstance.post('/userInfo/isEnable', data), // 启用/禁用
- operationDetail: (data: string | null | LocationQueryValue[] | undefined) => axiosInstance.get(`/userInfo/getUserInfo?id=${data}`), // 详情
- setLeader: (data: {
- ids: string[],
- leaderId: string,
- getAll: number
- }) => axiosInstance.post('/userInfo/batchLeader', data), // 设置负责人
- getUser: (data: string) => axiosInstance.post('/userInfo/getUser', { deptId: data }), // 获取管理人/推荐人
- addBankCard: (data: AddBankCard) => axiosInstance.post('/userInfo/addBankCard', data), // 添加银行卡
- salesmanAuthSuccess: (data: { userInfoId: string }) => axiosInstance.post('/userInfo/salesmanAuthSuccess', data), // 审核通过
- salesmanAuthFailed: (data: {
- userInfoId: string,
- approvalOpinion: string
- }) => axiosInstance.post('/userInfo/salesmanAuthFailed', data), // 审核不通过
- })
- export default operationApi
|