laborContractUtil.js
8.3 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
import * as fetch from './fetch';
import * as constants from '../redux/constants/Constants';
//获取合同模板列表
export const loadTmpList = (query, options = {}) => {
const url = `/api/contract/templates${query}`;
return fetch.get(url, options);
}
//新增合同模板
export const newContractTemplate = (params, options = {}) => {
const url = `/api/contract/templates`;
return fetch.post(url, params, options);
}
//更新劳动合同模板
export const renewalContractTempalte = (params, options = {}) => {
const url = `/api/contract/templates/${params.id}`;
return fetch.put(url, params, options);
}
//获取合同模板详情
export const loadTmpDetail = (id, query, options = {}) => {
let url = `/api/contract/templates/${id}`;
if (query)
url = url + `?t=1&${query}`;
return fetch.get(url, options);
}
//删除合同模板
export const rmContractTmp = (id, data = {}, options = {}) => {
const url = `/api/contract/templates/${id}`;
return fetch.del(url, data, options);
}
//获取合同模板自定义字段
export const loadTmpToolbars = (query, options = {}) => {
const url = `/api/contract/user-define-fields?${query ? query : ''}`
return fetch.get(url, options);
}
//获取法务实体列表
export const loadLegalEntityList = (query, options = {}) => {
const url = `/api/contract/legal-entities${query}`;
return fetch.get(url, options);
}
//新增法务实体
export const newLegalEntity = (params, options = {}) => {
const url = `/api/contract/legal-entities`;
return fetch.post(url, params, options);
}
//删除法务实体
export const rmLegalEntity = (id, data = {}, options = {}) => {
const url = `/api/contract/legal-entities/${id}`;
return fetch.del(url, data, options);
}
//获取入职待签署列表
export const loadWaitForSignList = (params, options = {}) => {
const url = `/api/empmgm/employees${params}`;
return fetch.get(url, options);
}
//获取劳动合同列表
export const loadContractList = (query, options = {}) => {
const url = `/api/contract/contracts${query}`;
return fetch.get(url, options);
}
//导入劳动合同
export const insertLaborContract = (params, options = {}) => {
const url = `/api/contract/do-import`
return fetch.post(url, params, options);
}
//取消签署
export const cancel_Sign = (id, options = {}) => {
const url = `/api/contract/contracts/${id}/op/cancel-sign`
return fetch.post(url, options);
}
//终止签署
export const stopSign = (data, id, options = {}) => {
const url = `/api/contract/contracts/${id}/op/terminate`
return fetch.post(url, data, options);
}
//新增纸质合同
export const createPaperContract = (params, options = {}) => {
const url = `/api/contract/paper-contracts`
return fetch.post(url, params, options);
}
//获取合同详情
export const loadContractDetail = (id, options = {}) => {
const url = `/api/contract/contracts/${id}`;
return fetch.get(url, options);
}
//更新劳动合同
export const renewalContract = (values, options = {}) => {
const url = `/api/contract/contracts/${values.id}`;
return fetch.put(url, values, options);
}
//获取签章列表
export const loadSignList = (query, options = {}) => {
const url = `/api/contract/seals${query}`;
return fetch.get(url, options);
}
//新增签章
export const newSign = (params, options = {}) => {
const url = `/api/contract/legal-entities/${params.id}/seals`;
return fetch.post(url, params, options);
}
//删除签章
export const rmSign = (uuid, data = {}, options = {}) => {
const url = `/api/contract/seals/${uuid}`;
return fetch.del(url, data, options);
}
//获取法务实体的签章
export const loadLglEntSeal = (id, options = {}) => {
const url = `/api/contract/legal-entities/${id}/seals`;
return fetch.get(url, options);
}
//发起签署
export const beginSign = (params, options = {}) => {
let url = `/api/contract/contracts`;
if (params && params.batch) {
url = `/api/contract/batch/contracts`;
}
return fetch.post(url, params, options);
}
//设置合同到期提醒日期
export const newContractRemind = (params, options = {}) => {
const url = `/api/contract/contract-reminds`;
return fetch.post(url, params, options);
}
//获取劳动合同到期提醒日期
export const loadContractRemind = (id, options = {}) => {
const url = `/api/contract/contract-reminds`;
return fetch.get(url, options);
}
/*
*公司签署
*/
export const comSign = (data = {}, options = {}) => {
const url = '/api/contract/contracts/' + data.contract_id + '/op/com-sign';
return fetch.post(url, data, options);
}
//离职待终止合同列表
export const loadWaitTerminateList = (params, options = {}) => {
const url = `/api/contract/contracts${params}`;
return fetch.get(url, options);
}
// 批量结束离职待终止合同
export const batchStopContract = (ids, options = {}) => {
const url = `/api/contract/batch-terminate`;
return fetch.post(url, ids, options);
}
//获取首页统计数据
export const loadContractNum = (params, options = {}) => {
const url = `/api/contract/contract-statistic`;
return fetch.get(url, options);
}
//获取劳动合同上传二维码
export const loadQRcode = (id, options = {}) => {
const url = `/api/contract/contracts/${id}/op/scan-upload`;
return fetch.get(url, options);
}
//设置密码
export const setSignPwd = (data = {}, options = {}) => {
const url = '/api/uaa/sign-pwd';
return fetch.post(url, data, options);
}
//获取是否设置密码
export const getSignPwd = (id, options = {}) => {
const url = `/api/uaa/sign-pwd`;
return fetch.get(url, options);
}
//获取导入记录列表(劳动合同)
export const getLaborContractRecordsUitl = (params, options = {}) => {
const url = '/api/contract/import-jobs' + (params ? '?' + params : '');
return fetch.get(url, options);
}
//获取导入失败记录列表(劳动合同)
export const getFailLaborContractRecordsUitl = (params, options = {}) => {
const url = '/api/contract/import-jobs/' + params.id + '/records'
return fetch.get(url, options);
}
//获取公积金社保缴纳状态
export const getFundAndSocialSecurity = (id, params, options = {}) => {
const url = `/api/empmgm/employees/${id}/si-hf-status`
// const url =`/api/empmgm/employees/200747291584237568/si-hf-status`
return fetch.get(url, options);
}
//获取公积金社保缴纳详情
export const getFundAndSocialSecurityDetail = (params, options = {}) => {
let url = `/api/psiorder/ent-insured-persons?insurances=true`
if (params && params.service_contract_id) {
url = url + `&service_contract_id=${params.service_contract_id}`;
}
if (params && params.customer_id) {
url = url + `&customer_id=${params.customer_id}`;
}
if (params && params.id_card_no) {
url = url + `&id_num=${params.id_card_no}`;
}
return fetch.get(url, options);
}
//劳动合同管理(变更)
export const postLaborContractChange = (id, data, options = {}) => {
const url = `/api/contract/contracts/${id}/op/change`
// const url =`/api/contract/contracts/200747291584237568/op/change`
return fetch.post(url, data, options);
}
//劳动合同管理(续签)
export const postLaborContractContinue = (data, options = {}) => {
console.log(data)
const url = `/api/contract/contracts/${data.id}/op/renew`
return fetch.post(url, data, options);
}
// 删除劳动合同
export const deleteContract = (id, options = {}) => {
const url = `/api/contract/papery-contracts/${id}`
return fetch.del(url, options)
}
//验证重名字
export const checkTemplateName = (data, options = {}) => {
const url = `/api/contract/template-duplicate-check`
return fetch.post(url, data, options);
}
//上传模版生成图片
export const uploadConfractForPic = (data, options = {}) => {
const url = `/api/contract/convert-template-file`
return fetch.post(url, data, options);
}
// 预览合同
export const previewTemplateUtil = (data, options = {}) => {
const url = `/api/contract/preview-template`
return fetch.post(url, data, options)
}
// 社会化用工 公司签章
export const SocialWorkComSign = (data = {}, options = {}) => {
const url = `/api/contract/common/contracts/${data.contract_id}/op/partya-sign`
return fetch.post(url, data, options)
}
// 劳动合同管理 导出
export const exportLaborContract = (data, options = {}) => {
const url = '/api/contract/do-export' + `${ data ? data : '' }`
return fetch.get(url, options)
}