outSourcingUtil.js
9.2 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
import * as fetch from './fetch';
import * as constants from '../redux/constants/Constants';
const PROVIDER_PATH = '/api/providermgm/providers';
const OUTSOURCING_PATH = '/api/outsourcing/outsourcing-project';
const OUTSOURCING_STORE_PATH = '/api/outsourcing/store-info';
const OUTSOURCING_SKU_PATH = '/api/outsourcing/sku-mgm';
const OUTSOURCING_SKU_CLERK = '/api/outsourcing/clerk';
const OUTSOURCING_SKU_INSPECTOR = '/api/outsourcing/inspector';
//外包项目列表
export const getOutSourcingList=(params,options={})=>{
const url=OUTSOURCING_PATH+ `?`+params;
return fetch.get(url,options);
}
//外包项目添加
export const addOutSourcing=(data,options={})=>{
const url=OUTSOURCING_PATH;
return fetch.post(url,data,options);
}
//外包项目编辑
export const editOutSourcing=(data,options={})=>{
const url=OUTSOURCING_PATH+'/'+data.id;
return fetch.put(url,data,options);
}
//外包单体项目详情
export const getOutSourcingItemDetail=(params,options={})=>{
const url=OUTSOURCING_PATH+'/'+params.id;
return fetch.get(url,options);
}
//外包单体项目删除
export const deleteOutSourcing=(params,options={})=>{
const url=OUTSOURCING_PATH+'/'+params.id;
return fetch.del(url,options);
}
// *******************外包项目门店设置****************
//外包项目门店列表
export const getOutSourcingStoreList=(params,options={})=>{
const url=OUTSOURCING_STORE_PATH+ `?`+params;
return fetch.get(url,options);
}
//获取项目下的品牌options
export const getBrandlist=(data,options={})=>{
const url=OUTSOURCING_STORE_PATH+'/brandlist';
return fetch.post(url,data,options);
}
//获取项目下的品牌options
export const getStorelist=(data,options={})=>{
const url=OUTSOURCING_STORE_PATH+'/storelist';
return fetch.post(url,data,options);
}
//外包项目门店添加
export const addOutSourcingStore=(data,options={})=>{
const url=OUTSOURCING_STORE_PATH;
return fetch.post(url,data,options);
}
//外包项目门店删除
export const delOutSourcingStore=(data,options={})=>{
const url=OUTSOURCING_STORE_PATH+'/batchdelete';
return fetch.post(url,data,options);
}
//外包项目门店详情查看
export const getOutSourcingItemStoreDetail=(params,options={})=>{
const url=OUTSOURCING_STORE_PATH+'/'+params.id;
return fetch.get(url,options);
}
//外包项目门店详情编辑
export const editOutSourcingStore=(data,options={})=>{
const url=OUTSOURCING_STORE_PATH+'/'+data.id;
return fetch.put(url,data,options);
}
//外包项目门店批量修改sku
export const batchChangeOutSourcingSku=(data,options={})=>{
const url=OUTSOURCING_STORE_PATH+'/'+'batch-update';
return fetch.post(url,data,options);
}
// 检测记录报表
export const checkInfoList=(data,options={})=>{
const url=`/api/outsourcing/check-info/list`;
return fetch.post(url,data,options);
}
// 检测记录报表导出
export const exportRecordList=(params,options={})=>{
const url=`/api/outsourcing/check-infos/do-export`+'?'+params;
return fetch.get(url,options);
}
// 检测记录详情
export const getCheckDetail=(params,options={})=>{
const url=`/api/outsourcing/check-info/${params.id}`;
return fetch.get(url,options);
}
// 出勤记录报表
export const attendInfoList=(params,options={})=>{
const url=`/api/outsourcing/inspector-attendance/statistics`+'?'+params;
return fetch.get(url,options);
}
// 个人考勤汇总
export const privateAttendInfoList=(params,options={})=>{
const {id='',paramsData=''}=params;
const url=`/api/outsourcing/inspector-attendance/statistics/`+id+'?'+paramsData;
return fetch.get(url,options);
}
// 个人考勤详情
export const attendDetailInfoList=(params,options={})=>{
const url=`/api/outsourcing/inspector-attendance/detail`+'?'+params;
return fetch.get(url,options);
}
// sku列表
export const getSkuList=(params,options={})=>{
const url=OUTSOURCING_SKU_PATH+ `?`+params;
return fetch.get(url,options);
}
//添加sku
export const addOutSourcingSku=(data,options={})=>{
const url=OUTSOURCING_SKU_PATH;
return fetch.post(url,data,options);
}
//sku详情查看
export const getOutSourcingItemSkuDetail=(params,options={})=>{
const url=OUTSOURCING_SKU_PATH+'/'+params.id;
return fetch.get(url,options);
}
//sku详情编辑
export const editOutSourcingItemSkuDetail=(data,options={})=>{
const url=OUTSOURCING_SKU_PATH+'/'+data.id;
return fetch.put(url,data,options);
}
//sku删除
export const deleteOutSourcingItemSku=(params,options={})=>{
const url=OUTSOURCING_SKU_PATH+'/'+params.id;
return fetch.del(url,options);
}
//加载sku系列-产品
export const loadSkuList=(data,options={})=>{
const url=OUTSOURCING_SKU_PATH+'/statistics';
return fetch.post(url,data,options);
}
// 检测员列表
export const getCheckerList=(params,options={})=>{
const url=OUTSOURCING_SKU_CLERK+ `?`+params;
return fetch.get(url,options);
}
//添加检测员
export const addOutSourcingChecker=(data,options={})=>{
const url=OUTSOURCING_SKU_CLERK;
return fetch.post(url,data,options);
}
//检测员|业务员详情查看
export const getOutSourcingItemCheckerDetail=(params,options={})=>{
const url=OUTSOURCING_SKU_CLERK+'/'+params.id;
return fetch.get(url,options);
}
//检测员|业务员详情编辑
export const editOutSourcingItemCheckerDetail=(data,options={})=>{
const url=OUTSOURCING_SKU_CLERK+'/'+data.id;
return fetch.put(url,data,options);
}
//检测员删除
export const deleteOutSourcingItemChecker=(params,options={})=>{
const url=OUTSOURCING_SKU_CLERK+'/'+params.id;
return fetch.del(url,options);
}
//加载检测员系列-产品
export const loadCheckerList=(data,options={})=>{
const url=OUTSOURCING_SKU_CLERK+'/statistics';
return fetch.post(url,data,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 changeAgentState =(data,options={})=>{//获取风控管理列表
console.log(data);console.log(55555);
const url = '/api/recruit/brokers/'+data.id+ `/status-settings`;
return fetch.put(url,data,options);
}
//微信经纪人新增一级经纪人
export const addAgent =(data,options={})=>{//获取风控管理列表
console.log(data);
const url = '/api/recruit/brokers';
return fetch.post(url,data,options);
}
//微信经纪人分销导入经纪人
export const importAgent =(data,options={})=>{//获取风控管理列表
console.log(data);
const url = '/api/recruit/brokers/do-import';
return fetch.post(url,data,options);
}
//微信经纪人分销设置经纪人
export const setAgent =(data,options={})=>{//获取风控管理列表
console.log(data);
const url = '/api/recruit/brokers-setting';
return fetch.post(url,data,options);
}
//微信经纪人分销设置经纪人
export const agentSettingDays =(params,options={})=>{//获取风控管理列表
console.log(params);
const url = '/api/recruit/brokers-setting';
return fetch.get(url,options);
}
//微信经纪人详情
export const detailAgent =(data,options={})=>{//获取风控管理列表
console.log(data);
const url = '/api/recruit/brokers'+'/'+data.id;
console.log(url);
return fetch.get(url,options);
}
//微信经纪人详情列表
export const detaiListlAgent =(str,id,options={})=>{//获取风控管理列表
console.log(str);
console.log(id);
console.log(55555);
const url = '/api/recruit/brokers'+'/'+id+`/lower`+'?'+str;
return fetch.get(url,options);
}
// 门店信息导出
export const exportOutsourcingStore =(params,options={})=>{
const url = `/api/outsourcing/store-infos/do-export?${params}`
return fetch.get(url,options)
}
//
export const batchOperationClerkUtil = (params, options = {}) => {
const url = '/api/outsourcing/store-info/batch-operation-clerk'
return fetch.post(url, params, options)
}