api.ts
1.55 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
import { http } from '@/typing/http';
import request from '@/utils/request';
import { ORDER3 } from '@/utils/host';
export interface ListItem {
totalTaskCount?: number,//任务总数
shopTaskList?: ShopTaskList[],
year?: number,//年份
id?:number,
month?: number,//月份
canModified?: boolean//是否可调整
}
export interface ShopTaskList {
shopId?: number,//门店id
shopName?: string,//门店名称
taskCount?: number,//任务数量
staffTaskList?: StaffTaskList[]//员工任务列表
}
interface StaffTaskList {
staffId?: number,//员工id
staffName?: string,//员工名称
taskCount?: number,//任务数量
regularMonth?: number//转正几个月
}
export interface saveParams {
id?: number,
shopTaskList?: ShopTaskList[]
}
interface ListParams {
taskDate?: number,
autoAssign?: boolean
}
export interface SaveParams {
id?: number // 任务id
remark?: string // 备注
attachmentList?: string[] // 附件列表
}
/** 获取列表 */
export function getTackMaunuaList(params?: ListParams): http.PromiseResp<ListItem> {
return request.get(`${ORDER3}/erp/tack/car/task/detail`, { params });
}
/**手动提交*/
export function saveHandelTack(params: saveParams) {
return request.post(`${ORDER3}/erp/tack/car/task/manual/assign`, { ...params });
}
/**自动分配*/
export function autoAlloctionApi(params: saveParams) {
return request.post(`${ORDER3}/erp/tack/car/task/auto/assign`, { ...params });
}
/*提交 */
export function save(params?: SaveParams) {
return request.post(`${ORDER3}/erp/tack/car/task/submit`, params);
}