settlementUtil.js
4.9 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
import * as fetch from './fetch';
import * as constants from '../redux/constants/Constants';
//获取客户社保列表
export const getCustomerInsList=(offset=0,limit=10,cycle,search='',options={})=>{
let url = '';
if(search ==''){
url=`api/socialinsurance/views/?offset=${offset}&limit=${limit}&cycle_name=${cycle}`
}else {
url=`api/socialinsurance/views/?offset=${offset}&limit=${limit}&cycle_name=${cycle}&customer=${search}`
}
return fetch.get(url,options);
}
//获取待生成
export const getGenerateList = (year,month,offset=0,limit=10,keysearch='',options={}) =>{
let url = '';
if(keysearch==''){
url = `api/settlemgm/settle-records?limit=${limit}&offset=${offset}&type=recruit&category=customer&settle_year=${year}&settle_month=${month}&status=generate`;
}else{
url = `api/settlemgm/settle-records?limit=${limit}&offset=${offset}&type=recruit&category=customer&settle_year=${year}&settle_month=${month}&status=generate&keysearch=${keysearch}`;
}
// let url = 'api/settlemgm/settle-records/?status=generate';
return fetch.get(url,options);
}
//待确认
export const getConfirmingList = (year,month,offset=0,limit=10,keysearch='',options={}) =>{
let url = '';
if(keysearch==''){
url = `api/settlemgm/settle-records?limit=${limit}&offset=${offset}&type=recruit&category=customer&settle_year=${year}&settle_month=${month}&status=confirming`;
}else{
url = `api/settlemgm/settle-records?limit=${limit}&offset=${offset}&type=recruit&category=customer&settle_year=${year}&settle_month=${month}&status=confirming&keysearch=${keysearch}`;
}
return fetch.get(url,options);
}
//待付款
export const getPayingList = (year,month,offset=0,limit=10,keysearch='',options={}) =>{
let url = '';
if(keysearch==''){
url = `api/settlemgm/settle-records?limit=${limit}&offset=${offset}&type=recruit&category=customer&settle_year=${year}&settle_month=${month}&status=paying`;
}else{
url = `api/settlemgm/settle-records?limit=${limit}&offset=${offset}&type=recruit&category=customer&settle_year=${year}&settle_month=${month}&status=paying&keysearch=${keysearch}`;
}
return fetch.get(url,options);
}
//待核销
export const getVerifyingList = (year,month,offset=0,limit=10,keysearch='',options={}) =>{
let url = '';
if(keysearch==''){
url = `api/settlemgm/settle-records?limit=${limit}&offset=${offset}&type=recruit&category=customer&settle_year=${year}&settle_month=${month}&status=verifying`;
}else{
url = `api/settlemgm/settle-records?limit=${limit}&offset=${offset}&type=recruit&category=customer&settle_year=${year}&settle_month=${month}&status=verifying&keysearch=${keysearch}`;
}
return fetch.get(url,options);
}
//已完成
export const getCompletedList = (year,month,offset=0,limit=10,keysearch='',options={}) =>{
let url = '';
if(keysearch==''){
url = `api/settlemgm/settle-records?limit=${limit}&offset=${offset}&type=recruit&category=customer&settle_year=${year}&settle_month=${month}&status=completed`;
}else{
url = `api/settlemgm/settle-records?limit=${limit}&offset=${offset}&type=recruit&category=customer&settle_year=${year}&settle_month=${month}&status=completed&keysearch=${keysearch}`;
}
return fetch.get(url,options);
}
//导入结算单
export const insertSettlement = (id,data,options={}) =>{
const url=`/api/settlemgm/settle-records/${id}/op/import`
return fetch.post(url,{...data},options);
}
//生成结算单
export const generate_Settlement = (id,data={},options={}) =>{
const url=`api/settlemgm/settle-records/${id}/op/generate`
return fetch.post(url,data,options);
}
//生成结算单
export const confirm_Generate = (id,data={},options={}) =>{
const url=`api/settlemgm/settle-records/${id}/op/confirm-generate`
return fetch.post(url,data,options);
}
//加载详情
export const loadDetail = (id,offset=0,limit=10,keysearch='',options={}) =>{
let url = '';
if(keysearch == ''){
url=`api/settlemgm/settle-records/${id}/items?limit=${limit}&offset=${offset}`
}else{
url=`api/settlemgm/settle-records/${id}/items?limit=${limit}&offset=${offset}&keysearch=${keysearch}`
}
return fetch.get(url,options);
}
export const export_Settlement = (id,options={}) =>{
const url=`api/settlemgm/settle-records/${id}/op/doexport`
return fetch.post(url,options);
}
//核销
export const verify_Settlement = (id,options={}) =>{
const url=`api/settlemgm/settle-records/${id}/op/verify`
return fetch.post(url,options);
}
//加载详情
export const loadSettleRecordsDetail = (id,options={}) =>{
const url = `api/settlemgm/settle-records/${id}`
return fetch.get(url,options);
}
//获取职位结算详情
export const loadPositionSettlementDetail = (id,options={}) =>{
const url = `api/settlemgm/positions/${id}/settle-price`
return fetch.get(url,options);
}
//修改职位结算协议
export const modifyPositionSettlement = (values,options={}) =>{
const url = `api/settlemgm/positions/${values.id}/settle-price`
return fetch.post(url,values,options);
}