providerUtil.js
13.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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
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 = {}) => {
if ('editArea' == data.type) {//供应商修改地区
const url = '/api/providermgm/providers/' + data.id + '/service-regions';
return fetch.putJson(url, data, options);
} else {
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 getManageCollectToday = (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 getManageCollectAgent = (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);
}
//获取供应商首页业绩及结算汇总
export const getManageCollectAchievementSettlement = (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 = {}) => {
console.log(data,params)
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)
}
//英格玛---供应商管理
//获取供应商---今日汇总数据
export const getProviderTodayCollectApi = (params, options = {}) => {
const url = `/api/recruit/brokers-home/daily-statistics`
return fetch.get(url, params)
}
//获取供应商---供应商汇总数据
export const getProviderManageCollectApi = (params, options = {}) => {
const url = `/api/recruit/brokers-home/statistics`
return fetch.get(url, params)
}
//获取供应商---供应商汇总数据
export const getPerformanceSettleApi = (params, options = {}) => {
const url = `/api/recruit/brokers-home/achievement-settlement-statistics`
return fetch.get(url, params)
}
//获取待审核供应商数据
export const getAuditListActionApi = (params, options = {}) => {
const url = `/api/recruit/brokers${params}`
return fetch.get(url, params)
}
//获取所有负责人数据
export const getAllPrincipalActionApi = (params, options = {}) => {
const url = `/api/uaa/simple/admins${params}`
return fetch.get(url, params)
}
//批量审核选中的未审核供应商
export const batchReviewProviderActionApi = (data, options = {}) => {
const url = `/api/recruit/brokers/status-settings`
//console.log(data,options,'1111111111111111111111')
return fetch.put(url, data, options)
}
//已通过供应商---添加供应商
export const addPassedProviderActionApi = (data, options = {}) => {
const url = `/api/recruit/brokers`
//console.log(data,options,'1111111111111111111111')
return fetch.post(url, data, options)
}
//获取导出二维码
export const getImportTwoDimensionalCodeActionApi = (params, options = {}) => {
const url = `/api/recruit/brokers/${params}/posqrcode`
//console.log(data,options,'1111111111111111111111')
return fetch.get(url, params, options)
}
//获取所有归属公司
export const getAllCompanyActionApi = (params, options = {}) => {
const url = `/api/uaa/myorgs`
//console.log(data,options,'1111111111111111111111')
return fetch.get(url, params, options)
}
//获取供应商详情信息
export const getProviderInfoDetailActionApi = (params, options = {}) => {
const url = `/api/recruit/brokers${params}`
//console.log(data,options,'1111111111111111111111')
return fetch.get(url, params, options)
}
//供应商管理---结算明细---列表
export const getBillingListActionApi = (params, options = {}) => {
const url = `/api/recruit/settlement-statistics${params}`
//console.log(data,options,'1111111111111111111111')
return fetch.get(url, params, options)
}
//供应商管理---结算明细---列表
export const getLookOverBaseInfoActionApi = (params, options = {}) => {
const url = `/api/recruit/settlement-statistics/${params}`
//console.log(data,options,'1111111111111111111111')
return fetch.get(url, params, options)
}
//供应商管理---结算明细---列表
export const getLookOverListActionApi = (params, options = {}) => {
const url = `/api/recruit/settlement-details/${params}`
//console.log(data,options,'1111111111111111111111')
return fetch.get(url, params, options)
}
//供应商管理---已通过供应商---终止合作
export const endPassedCooperationActionApi = (params, options = {}) => {
const url = `/api/recruit/brokers/op/change-status`
//console.log(data,options,'1111111111111111111111')
return fetch.post(url, params, options)
}
//供应商管理---已通过供应商---上传附件
export const uploadingAccessoryActionApi = (params, options = {}) => {
const url = `/api/recruit/brokers/op/upload-files/${params.id}`
//console.log(data,options,'1111111111111111111111')
return fetch.post(url, params, options)
}
//供应商管理--已失效---启用/停用
export const startUsingActionApi = (params, options = {}) => {
const url = `/api/recruit/brokers/op/change-status`
//console.log(data,options,'1111111111111111111111')
return fetch.post(url, params, options)
}
//供应商管理--详情---招聘职位--列表
export const getPositionListActionApi = (str,id, options = {}) => {
const url = `/api/recruit/broker-position-statistics/${id}${str}`
//console.log(data,options,'1111111111111111111111')
return fetch.get(url, options)
}
//供应商管理--结算明细--详情--列表---作废/返利加减项
export const cancellationLookOverActionApi = (params, options = {}) => {
const url = `/api/recruit/settlement-details/op/modify`
//console.log(data,options,'1111111111111111111111')
return fetch.post(url, params,options)
}
//财务管理--积分发放--详情--列表
export const getLookDetailClassActionApi = (params, options = {}) => {
const url = `/api/recruit/issue-details/${params}`
//console.log(data,options,'1111111111111111111111')
return fetch.get(url, params,options)
}
//供应商管理--查看--业绩统计--职位名称
export const getAllPositionTypesActionApi = (params, options = {}) => {
const url = `/api/recruit/has-policy-positions`
//console.log(data,options,'1111111111111111111111')
return fetch.get(url, params,options)
}