devManage.js
2.8 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
import request from '@/utils/request'
import { ContentTypeEnum } from '@/utils/httpEnum';
// 模拟字典接口,后续你可以替换为真实接口请求 utils/request.js
export function getTabsDict() {
return Promise.resolve([
{ label: '全部', value: 'all' },
{ label: '待办', value: 'todo' },
{ label: '已办', value: 'done' }
])
}
export function getFactoryDict() {
return Promise.resolve([
{ label: '全部', value: '' },
{ label: '一、二分厂', value: '12' },
{ label: '三、四分厂', value: '34' }
])
}
export function getDeptOptionsDict() {
return Promise.resolve([
{ value: '一分厂', text: '一分厂' },
{ value: '二分厂', text: '二分厂' },
{ value: '三分厂', text: '三分厂' },
{ value: '四分厂', text: '四分厂' },
{ value: '四分厂2', text: '四分厂2' },
{ value: '四分厂3', text: '四分厂3' },
{ value: '四分厂4', text: '四分厂4' },
{ value: '四分厂5', text: '四分厂5' }
])
}
export const statusOptions = [
{ value: 1, text: '审核中' },
{ value: 2, text: '审核通过' },
{ value: 3, text: '已驳回' },
{ value: 4, text: '已取消' }
];
const baseUrl = '/customer/develop';
// 查询列表
export function queryApi(params) {
return request({
url: `${baseUrl}/query`,
method: 'get',
params
})
}
// 取消
export function cancelApi(id) {
return request({
url: `${baseUrl}/cancel`,
method: 'get',
params: { id }
})
}
// 根据ID查询详情数据
export function getDetailApi(id) {
return request({
url: `${baseUrl}`,
method: 'get',
params: { id }
})
}
// 新增保存
export function createApi(params) {
return request({
url: `${baseUrl}`,
method: 'post',
data: params,
contentType: ContentTypeEnum.FORM_URLENCODED
})
}
// 修改保存
export function updateApi(params) {
return request({
url: `${baseUrl}`,
method: 'put',
data: params,
contentType: ContentTypeEnum.FORM_URLENCODED
})
}
// 批量审批
export function batchApproveApi(params) {
return request({
url: `/flow/task/approve/batch`,
method: 'post',
data: params,
contentType: ContentTypeEnum.JSON
})
}
// 待办类型数量统计
export function getTodoTypeStatisticsApi() {
return request({
url: `${baseUrl}/todoTypeStatistics`,
method: 'get',
})
}
// 客户池查询
export function customerQueryApi(params) {
return request({
url: `/basedata/customer/query`,
method: 'get',
params
})
}
// 科办查询
export function officeQueryApi(params) {
return request({
url: `/baseData/office/query`,
method: 'get',
params
})
}
// 产品品种 查询
export function productVarietyQueryApi(params) {
return request({
url: `/baseData/product/variety/query`,
method: 'get',
params
})
}