providentUtil.js
2.6 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
import * as fetch from './fetch';
import * as constants from '../redux/constants/Constants';
//获取客户公积金列表
export const getCustomerProvidentList = (offset = 0, limit = 10, cycle, search = '', options = {}) => {
let url = '';
if (search == '') {
url = `api/socialinsurance/housing-fund/views/?offset=${offset}&limit=${limit}&cycle_name=${cycle}`
} else {
url = `api/socialinsurance/housing-fund/views/?offset=${offset}&limit=${limit}&cycle_name=${cycle}&customer=${search}`
}
return fetch.get(url, options);
}
//导入公积金
export const insertProvident = (params,options={}) =>{
const url=`/api/socialinsurance/housing-fund/do-import`
return fetch.post(url,{...params},options);
}
//获取在缴列表
export const getPayingList = (customer_id,cycle,offset=0,limit=10,keysearch='',options={}) =>{
let url = '';
if(keysearch==''){
url=`api/socialinsurance/housing-fund/records/?customer_id=${customer_id}&cycle_name=${cycle}&offset=${offset}&limit=${limit}&category=renewal`
}else{
url=`api/socialinsurance/housing-fund/records/?customer_id=${customer_id}&cycle_name=${cycle}&offset=${offset}&limit=${limit}&name=${keysearch}&category=renewal`
}
return fetch.get(url,options);
}
//获取补缴缴列表
export const getSupplementList = (offset, limit, status, params = '', options = {}) => {
const url = EMPLOYEE_PATH + `?offset=${offset}&limit=${limit}&status=${status}` + params;
return fetch.get(url, options);
}
//获取停缴列表
export const getStopList = (customer_id,cycle,offset=0,limit=10,keysearch='',options={}) =>{
let url = '';
if(keysearch==''){
url=`api/socialinsurance/housing-fund/records/?customer_id=${customer_id}&cycle_name=${cycle}&offset=${offset}&limit=${limit}&category=decrease`
}else{
url=`api/socialinsurance/housing-fund/records/?customer_id=${customer_id}&cycle_name=${cycle}&offset=${offset}&limit=${limit}&name=${keysearch}&category=decrease`
}
return fetch.get(url,options);
}
//获取增员列表
export const getAddList = (customer_id,cycle,offset=0,limit=10,keysearch='',options={}) =>{
let url = '';
if(keysearch==''){
url=`api/socialinsurance/housing-fund/records/?customer_id=${customer_id}&cycle_name=${cycle}&offset=${offset}&limit=${limit}&category=increase`
}else{
url=`api/socialinsurance/housing-fund/records/?customer_id=${customer_id}&cycle_name=${cycle}&offset=${offset}&limit=${limit}&name=${keysearch}&category=increase`
}
return fetch.get(url,options);
}
//删除公积金
export const deleteProvident=(data,options={})=>{
const url=`api/socialinsurance/hf-cycles/${data.id}`;
return fetch.del(url,{},options);
}