approve.ts
1.14 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
import { find, isEmpty } from 'lodash-es';
import { defHttp } from '/@/utils/http/axios';
import {
FIELDS_BASE_INFO,
FIELDS_PROFIT_INFO,
FIELDS_REPORT_INFO,
} from '../../views/project/order/constant';
enum Api {
APPROVE = '/order/erp/audit/wait_audit_list',
APPROVE_ED = '/order/erp/audit/audit_list',
AUDIT = '/order/erp/audit/do_audit',
}
export const approveAuditApi = async (params: any) =>
defHttp.post<any>(
{
url: Api.AUDIT,
params,
},
{ message: '操作成功' },
);
export const getWaitListApi = async (params: DemoParams) => {
const res = await defHttp.post({
url: Api.APPROVE,
params,
});
res.records = res.records.map((item) => {
return item;
});
console.log(res.records, 5656565656);
return new Promise((resolve) => {
resolve({ items: res.records, total: res.total });
});
};
export const getApprovedListApi = async (params: any) => {
const res = await defHttp.post({
url: Api.APPROVE_ED,
params,
});
res.records = res.records.map((item) => {
return item;
});
return new Promise((resolve) => {
resolve({ items: res.records, total: res.total });
});
};