| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import { ApiInstance } from '../type'
- export interface SearchInsurance {
- pages: number,
- size: number,
- username?: string,
- insCompanyId?: string,
- quoteStatus?: string, // 0:启用 1:禁用
- useStatus?: string, // 0 正常 1 不可用 2 未知
- userDept?: string
- }
- interface FieldsItem {
- type: string,
- field: string,
- label: string,
- value: string,
- isEdit: boolean
- }
- export interface AddAgreementAttribution {
- insCompanyId: string,
- userDept: string,
- loginUrl: string,
- username: string,
- password: string,
- fields: FieldsItem[],
- userAbbr?: string,
- }
- export interface UpdateAgreementAttribution extends AddAgreementAttribution {
- id: string
- }
- const insuranceApi = (axiosInstance: ApiInstance) => ({
- getAgreementAttributionList: (data: SearchInsurance) => axiosInstance.post('/manager/attribution/getAgreementAttributionList', data), // 列表查询
- leftList: (data: any) => axiosInstance.get(`/esmInsCompany/gainTopList?type=${data}&&systemCode=${localStorage.getItem('login_system')}`), //获取顶级保险公司
- getDeptTree: (data: { sysCode: string }) => axiosInstance.post('/dept/getDeptTree', data), // 归属
- addAgreementAttribution: (data: AddAgreementAttribution) => axiosInstance.post('/manager/attribution/addAgreementAttribution', data), // 新增
- getPtlInsAttributionTemplate: (data: { insCompanyId: string, apiType: string }) => axiosInstance.post('/manager/attributionTemplate/getPtlInsAttributionTemplate', data), // 配置
- getLoginUrl: (data: { companyId: string }) => axiosInstance.post('/manager/attribution/getLoginUrl', data), // 登录地址
- getAgreementAttribution: (data: { id: string }) => axiosInstance.post('/manager/attribution/getAgreementAttribution', data), // 详情
- updateAgreementAttribution: (data: any) => axiosInstance.post('/manager/attribution/updateAgreementAttribution', data), // 编辑
- enableAgreementAttribution: (data: { ids: string[] }) => axiosInstance.post('/manager/attribution/enableAgreementAttribution', data), // 启用
- disableAgreementAttribution: (data: { ids: string[] }) => axiosInstance.post('/manager/attribution/disableAgreementAttribution', data), // 禁用
- deleteAgreementAttribution: (data: { ids: string[] }) => axiosInstance.post('/manager/attribution/deleteAgreementAttribution', data), // 删除
- deptTree: (data: { id: string, deptName?: string }) => axiosInstance.get(`/manager/attribution/deptTree?id=${data.id}&deptName=${data.deptName}`), // 授权tree
- authorization: (data: { id: string, deptIds: string[] }) => axiosInstance.post('/manager/attribution/authorization', data),
- detectLogin: (data: any) => axiosInstance.post('/unify/order/detectLogin', data)
- })
- export default insuranceApi
|