goods.basegood.js
2.41 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
/*weiqingting 4.5*/
module.exports=function(app) {
/*基础商品列表*/
app.get("/product/base/index","goods.basegoods.Index",function(){
this.$extend={
moduleName:'商品管理',
pageName:'基础商品列表'
}
});
/*列表头部各个审核状态的数量*/
app.post("/product/getbaseProductCountByStatus","basegoods_getbaseProductCountByStatus");
/*获取列表数据*/
app.post("/product/getBaseProductList","basegoods_getBaseProductList");
/*添加基础商品页面*/
app.get("/base/goods/add","goods.basegoods.Edit","basegoods_queryProductColors",function(colors,req,res){
this.$extend={
moduleName:'商品管理',
pageName:'添加基础商品',
action:"ADD",
list:colors.data.list,
}
});
/*添加基础商品*/
app.post("/base/goods/add","basegoods_addBaseProduct");
/*修改基础商品*/
app.get("/base/goods/update/:productSkn/:isAuditing","goods.basegoods.Edit",["basegoods_queryProductColors","basegoods_getBaseProduct"],function(colors,goods,req,res){
this.$extend={
moduleName:'商品管理',
pageName:'添加基础商品',
action:"UPDATE",
list:colors.data.list,
}
return goods;
});
/*删除基础商品*/
// app.post("/product/deleteBaseProduct","basegoods_deleteBaseProduct");
/*提交修改基础商品数据*/
app.post("/product/updateBaseProduct","basegoods_updateBaseProduct");
/*基础商品详情空页面*/
app.get("/base/goods/info/:productSkn/:isAuditing","goods.basegoods.Info","basegoods_getBaseProduct");
/*获取商品详情数据*/
// app.post("/product/getBaseProduct","basegoods_getBaseProduct");
/*获取颜色*/
app.post("/productColor/queryProductColors","basegoods_queryProductColors");
/*获取(非)销售属性*/
app.post("/product/querySortBySmallSort","basegoods_querySortBySmallSort");
app.post("/product/checkSkuBarCodeExist","basegoods_checkSkuBarCodeExist");
/*批量导出页面*/
app.get("/goods/piliang/batch","goods.basegoods.Batch",function(){
this.$extend={
moduleName:'商品管理',
pageName:'批量功能',
isPL:true
}
});
app.get("/goods/base/batch","goods.basegoods.Batch",function(req,res){
this.$extend={
moduleName:'商品管理',
pageName:'基础商品导入',
isBase:true,
shopName:req.session.user.auth.shopName,
shopId:req.session.user.auth.shopId
}
});
/*根据任务ID获取上传结果*/
app.post("/product/queryBatchImportResult","basegoods_queryBatchImportResult");
}