commodity.js
3.88 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
import request from '@/utils/request'
// import request from './map'
//* ******************** 添加商品 *********************
// 选择商品分组查询
export function getGroupSelect(data) {
return request({
url: '/product/getGroupSelect',
method: 'post',
data
})
}
// 商品分类
export function getClassifySelect(data) {
return request({
url: '/product/getClassifySelect',
method: 'post',
data
})
}
// 商品管理查询
export function getClassifyGetAll(data) {
return request({
url: '/canvas/getAll',
method: 'post',
data
})
}
// 修改商品查询
export function getClassifyGetById(data) {
return request({
url: '/product/getById',
method: 'post',
data
})
}
// 查询商品详情
export function getProductById(data) {
return request({
url: '/canvas/getById',
method: 'post',
data
})
}
// 修改商品
export function getClassifyUpdate(data) {
return request({
url: '/product/update',
method: 'post',
data
})
}
// 新增商品
export function getClassifyAdd(data) {
return request({
url: '/product/save',
method: 'post',
data
})
}
// 商品上下架
export function getClassifyStart(data) {
return request({
url: '/product/start',
method: 'post',
data
})
}
// 强制下架
export function Forced(data) {
return request({
url: '/canvas/forced',
method: 'post',
data
})
}
// 设置虚拟销量
export function setFictitious(data) {
return request({
url: '/canvas/setFictitious',
method: 'post',
data
})
}
// 商品审核
export function examine(data) {
return request({
url: '/canvas/examine',
method: 'post',
data
})
}
// 商品分类
export function getClassify(data) {
return request({
url: '/canvas/getClassify',
method: 'post',
data
})
}
// 删除商品
export function getClassifyDelete(data) {
return request({
url: '/product/delete',
method: 'post',
data
})
}
// 导入商品模板表下载
export const downloadTemplate = (data = {}) => {
return request({
url: 'product/downloadTemplate',
method: 'post',
data,
responseType: 'blob'
// type:"application/vnd.ms-excel;charset=utf-8"
})
}
// 上传商品模板
export const importProduct = (data = {}) => {
return request({
url: 'product/importProduct',
method: 'post',
data,
headers: {
'Content-type': 'multipart/form-data'
}
})
}
//* ******************** 商品分组 *********************
// 分组查询getClassifyGetById
export function commodityListGetAll(data) {
return request({
url: '/group/getAll',
method: 'post',
data
})
}
// 分组详情查询
export function commodityListGetById(data) {
return request({
url: '/group/getById',
method: 'post',
data
})
}
// 分组删除
export function commodityListDelete(data) {
return request({
url: '/group/delete',
method: 'post',
data
})
}
// 修改分组
export function commodityListUpdate(data) {
return request({
url: '/group/update',
method: 'post',
data
})
}
// 添加分组
export function commodityListAdd(data) {
return request({
url: '/group/save',
method: 'post',
data
})
}
// 分组商品查询
export function getGroupList(data) {
return request({
url: '/group/getProducts',
method: 'post',
data
})
}
//* ******************** 设置会员价格 *********************
// 商品会员价格数据查询
export function getProductMembers(data) {
return request({
url: '/product/getProductMembers',
method: 'post',
data
})
}
// 商品设置会员价
export function setProductMember(data) {
return request({
url: '/product/setProductMember',
method: 'post',
data
})
}
// 导出商品
export function productExport(data) {
return request({
url: '/canvas/exportAll',
method: 'post',
data,
responseType: 'blob'
})
}