productManage.js
3.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
import request from "./request";
const path = "dj.api.smartcarlife.";
// 获取产品管理 列表数据
export function getProductManageList(data) {
data.method = `${path}productManager.page`;
return request(data);
}
// 获取产品管理列表 SPU 分页(否)
export function getProductManageListPageLimit(data) {
data.method = `${path}productManager.spu.page`;
return request(data);
}
// 获取产品管理列表 pageSku(是)
export function getProductManageListPageSku(data) {
data.method = `${path}productManager.pageSku`;
return request(data);
}
// 新增产品:所有参数转 json 字符串赋值到 requestJson
export function addProductManage(data) {
const requestData = {
method: `${path}productManager.add`,
requestJson: JSON.stringify(data),
};
return request(requestData, "post");
}
// 编辑产品:所有参数转 json 字符串赋值到 requestJson
export function UpdateProductManage(data) {
const requestData = {
method: `${path}productManager.update`,
requestJson: JSON.stringify(data),
};
return request(requestData, "post");
}
// 获取权益/升级类目服务项目
export function getProductServiceItems(data) {
data.method = `${path}vd.item.queryServiceItemsGradeConfig`;
return request(data, "post");
}
// 批量导入(通用,已拆分为轻改/延保)
export function productImport(data) {
data.method = `${path}productManager.import`;
return request(data, "post", ["file"]);
}
// 轻改SKU批量导入(code -1 时直接展示响应 message,无需 errCode 配置)
export function qinggaiImport(data) {
data.method = `${path}productManager.qinggai.import`;
return request(data, "post", ["file"], { useResponseMessage: true });
}
// 延保SKU批量导入(code -1 时直接展示响应 message,无需 errCode 配置)
export function yanbaoImport(data) {
data.method = `${path}productManager.yanbao.import`;
return request(data, "post", ["file"], { useResponseMessage: true });
}
// 获取延保类服务项目
export function getExtendServiceItems(data) {
data.method = `${path}vd.item.queryExtendServiceItemsConfig`;
return request(data, "post");
}
// 获取延保类服务项目部件列表
export function getExtendServiceItemsParts(data) {
data.method = `${path}vd.item.getExtendUnitList`;
return request(data, "post");
}
// 获取适用车系列表
export function getCarSeriesList(data) {
data.method = `${path}common.car.series.page`;
return request(data, "post");
}
// 分页获取上架商品所需的升级商品信息
export function getUpgradeProductList(data) {
data.method = `${path}productManager.listUpgradeGoodsWithPage`;
return request(data, "post");
}
// 根据id查询商品详情
export function getBaseGoodsById(data) {
data.method = "dj.api.basegoods.get.byId";
return request(data);
}
// 分页查询 SKU 详情(商品名称/编码搜索)
export function getBaseGoodsSkuPageById(data) {
data.method = "dj.api.basegoods.get.sku.page.byId";
return request(data);
}
// 分页查询基础商品操作日志
export function getBaseGoodsOperationLogPage(data) {
data.method = "dj.api.basegoods.get.goods.operationLog.page";
return request(data);
}
// 删除 SKU(升级商品)
export function upgradeGoodsDelete(data) {
data.method = "dj.smartcarlife.api.upgradegoods.delete";
return request(data, "post", [], { useResponseMessage: true });
}