providerSettlementUtil.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import * as fetch from './fetch';
import * as constants from '../redux/constants/Constants';
//待确认
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=provider&settle_year=${year}&settle_month=${month}&status=confirming`;
}else{
url = `api/settlemgm/settle-records?limit=${limit}&offset=${offset}&type=recruit&category=provider&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=provider&settle_year=${year}&settle_month=${month}&status=paying`;
}else{
url = `api/settlemgm/settle-records?limit=${limit}&offset=${offset}&type=recruit&category=provider&settle_year=${year}&settle_month=${month}&status=paying&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=provider&settle_year=${year}&settle_month=${month}&status=completed`;
}else{
url = `api/settlemgm/settle-records?limit=${limit}&offset=${offset}&type=recruit&category=provider&settle_year=${year}&settle_month=${month}&status=completed&keysearch=${keysearch}`;
}
return fetch.get(url,options);
}
//生成结算单
export const confirm_Settlement = (id,data={},options={}) =>{
const url=`api/settlemgm/settle-records/${id}/op/confirm`
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 reject_Settlement = (id,options={}) =>{
const url=`api/settlemgm/settle-records/${id}/op/reject`
return fetch.post(url,options);
}
//付款
export const pay_Settlement = (id,options={}) =>{
const url=`api/settlemgm/settle-records/${id}/op/pay`
return fetch.post(url,options);
}
export const export_Settlement = (id,options={}) =>{
const url=`api/settlemgm/settle-records/${id}/op/doexport`
return fetch.post(url,options);
}