providerUtil.js
7.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
import * as fetch from './fetch';
import * as constants from '../redux/constants/Constants';
const PROVIDER_PATH = '/api/providermgm/providers';
//某服务地区的供应商
export const getServiceAreaProviderUtil=(params,options={})=>{
const url='/api/providermgm/providers-area'+(params?'?'+params:'');
return fetch.get(url,options);
}
//获取动态表达定义
export const getFormDefind=(params,options={})=>{
const url='/api/formmeta/fields'+params;
return fetch.get(url,options);
}
//获取供应商列表
export const getProviders=(data,options={})=>{
const url=PROVIDER_PATH+data;
return fetch.get(url,options);
}
export const getRecruitProvider=(data,options={})=>{
const url='/api/providermgm/recruit-providers'+data;
return fetch.get(url,options);
}
//获取供应商详情
export const getProvider=(data,options={})=>{
const url=PROVIDER_PATH+'/'+data;
return fetch.get(url,options);
}
//添加供应商
export const addProvider=(data,options={})=>{
const url=PROVIDER_PATH;
return fetch.post(url,data,options);
}
//更新(除了账号信息)
export const editProvider=(data,options={})=>{
const url=PROVIDER_PATH+'/'+data.id;
return fetch.putJson(url,data,options);
}
// 停用/启用供应商
export const actProvider=(data,options={})=>{
const url=PROVIDER_PATH+'/'+data.id+'/action';
return fetch.putJson(url,data,options);
}
//获取账号
export const getProviderAccount=(data,options={})=>{
const url=PROVIDER_PATH+'/'+data+'/admin-account';
return fetch.get(url,options);
}
//开通账号
export const openProviderAccount=(data,options={})=>{
const url=PROVIDER_PATH+'/'+data.id+'/admin-account';
return fetch.post(url,data,options);
}
//导入供应商
export const importProvider=(data,options={})=>{
const url='api/providermgm/do-import';
return fetch.post(url,data,options);
}
//微信经纪人分销列表
export const getAgentList =(params,options={})=>{
const url = '/api/recruit/brokers'+ `?` + params;
return fetch.get(url,options);
}
//微信经纪人分销业绩列表
export const getAgentListDetail =(params,options={})=>{
const url = '/api/recruit/broker-candidates'+ `?` + params;
return fetch.get(url,options);
}
//微信经纪人分销修改状态
export const changeAgentState =(data,options={})=>{
const url = '/api/recruit/brokers/'+data.id+ `/status-settings`;
return fetch.put(url,data,options);
}
//微信经纪人审核操作(通过或者拒绝,包括编辑经纪人)
export const checkAgentState =(data,options={})=>{
const url = '/api/recruit/brokers/status-settings';
return fetch.put(url,data,options);
}
//微信经纪人新增一级经纪人
export const addAgent =(data,options={})=>{
const url = '/api/recruit/brokers';
return fetch.post(url,data,options);
}
//微信经纪人新增一级经纪人
export const editAgent =(data,options={})=>{
const url = '/api/recruit/brokers';
return fetch.post(url,data,options);
}
//微信经纪人分销导入经纪人
export const importAgent =(data,options={})=>{
const url = '/api/recruit/brokers/do-import';
return fetch.post(url,data,options);
}
//微信经纪人分销设置经纪人
export const setAgent =(data,options={})=>{
const url = '/api/recruit/brokers-setting';
return fetch.post(url,data,options);
}
//微信经纪人分销设置经纪人
export const agentSettingDays =(params,options={})=>{
const url = '/api/recruit/brokers-setting';
return fetch.get(url,options);
}
//微信经纪人详情
export const detailAgent =(data,options={})=>{
// const url = '/api/recruit/brokers'+'/'+data.id;
const url = '/api/recruit/brokers'+'/'+data.id+'?query_type='+data.type;
console.log(url);
return fetch.get(url,options);
}
//微信经纪人详情下级列表
export const detaiListLowerAgent =(str,id,options={})=>{
const url = '/api/recruit/brokers'+'/'+id+`/lower`+'?'+str;
return fetch.get(url,options);
}
//微信经纪人详情列表
export const detaiListAgent =(str,id,options={})=>{
const url = '/api/recruit/brokers'+'/'+id+`/achievement-list`+'?'+str;
return fetch.get(url,options);
}
//导出业绩详情
export const downloadAgentExcel = (params,options={}) =>{
const url = '/api/recruit/broker-candidates/export?'+params;
return fetch.get(url,options);
}
//导入业绩详情
export const importAgents = (params,options={}) =>{
const url = '/api/recruit/broker-candidates/import'
return fetch.post(url,params,options)
}
//获取首页经纪人设置
export const getIndexAgent = (params,options={}) =>{
const url = '/api/recruit/broker-settings';
return fetch.get(url,options);
}
//编辑首页经纪人设置
export const setIndexAgent = (data,options={}) =>{
const url = '/api/recruit/broker-settings';
return fetch.post(url,data,options);
}
//获取经纪人首页每日汇总
export const getIndexCollectToday = (params,options={}) =>{
const url = '/api/recruit/brokers-home/daily-statistics';
return fetch.get(url,options);
}
//获取经纪人首页经纪人汇总
export const getIndexCollectAgent = (params,options={}) =>{
const url = '/api/recruit/brokers-home/statistics';
return fetch.get(url,options);
}
//获取经纪人首页业绩及结算汇总
export const getIndexCollectAchievementSettlement = (params,options={}) =>{
const url = '/api/recruit/brokers-home/achievement-settlement-statistics';
return fetch.get(url,options);
}
//经纪人管理 ————结算明细—————————代理——————————————————————————start
//经纪人管理————结算明细 代理 获取岗位
export const getPosttion = (params, options = {}) => {
const url = `/api/recruit/positions?all=true&status=active&view=published` //status=active&view=published
return fetch.get(url, options);
}
//经纪人管理————结算明细 代理 列表
export const getBillingDetails = (params, options = {}) => {
const url = `/api/recruit/settlement-statistics?` + `${params}`
return fetch.get(url, options);
}
//经纪人管理————结算明细 代理 导出
export const getBillingDetailsExport = (params, options = {}) => {
const url = `/api/recruit/do-export/settlement-statistics?` + `${params}`
return fetch.get(url, options);
}
//经纪人管理————结算明细 代理 确认(批量确认)
export const postBillingDetails = (data , params, options = {}) => {
const url = `/api/recruit/settlement-statistics/op/confirm`
return fetch.post(url,data, options);
}
//经纪人管理————结算明细 代理 查看
export const getLookOver = (data, params, options = {}) => {
console.log(data)
const url = `/api/recruit/settlement-details/${data}`
return fetch.get(url, options);
}
//经纪人管理————结算明细 代理 查看 经纪人
export const getLookOverbroker = (id, params, options = {}) => {
console.log(id)
const url = `/api/recruit/settlement-statistics/${id}`
return fetch.get(url, options);
}
//经纪人管理————结算明细 代理 查看 作废
export const postLookOverbroker = (data, params, options = {}) => {
const url = `/api/recruit/settlement-details/op/invalid`
return fetch.post(url, data, options);
}
//经纪人管理————结算明细 分销 查看
export const postLookOverbroke = (data, params, options = {}) => {
const url = `/api/recruit/settlement-details/op/invalid`
return fetch.post(url, data, options);
}
//经纪人管理 ————结算明细—————————代理——————————————————————————end
// 已通过经纪人导出二维码
export const importQecode = (id,options={}) =>{
const url = `/api/recruit/brokers/${id}/posqrcode`
return fetch.get(url, options)
}
export const brokerChangeStatusUtil = (params, options = {}) => {
const url = `/api/recruit/brokers/op/change-status`
return fetch.post(url, params, options)
}