Authored by leo

Update: 店铺商品分类中支持物理类目筛选,列表展示可用库存

@@ -47,7 +47,10 @@ module.exports={ @@ -47,7 +47,10 @@ module.exports={
47 {name:"categoryId",type:"Number"}, 47 {name:"categoryId",type:"Number"},
48 {name:"productSKN",type:"Number"}, 48 {name:"productSKN",type:"Number"},
49 {name:"productName",type:"String"}, 49 {name:"productName",type:"String"},
50 - {name:"page",type:"Number"} 50 + {name:"page",type:"Number"},
  51 + {name:"maxSortId",type:"Number"},
  52 + {name:"middleSortId",type:"Number"},
  53 + {name:"smallSortId",type:"Number"}
51 ] 54 ]
52 }, 55 },
53 56
@@ -58,7 +61,10 @@ module.exports={ @@ -58,7 +61,10 @@ module.exports={
58 {name:"categoryId",type:"Number"}, 61 {name:"categoryId",type:"Number"},
59 {name:"productSKN",type:"Number"}, 62 {name:"productSKN",type:"Number"},
60 {name:"productName",type:"String"}, 63 {name:"productName",type:"String"},
61 - {name:"page",type:"Number"} 64 + {name:"page",type:"Number"},
  65 + {name:"maxSortId",type:"Number"},
  66 + {name:"middleSortId",type:"Number"},
  67 + {name:"smallSortId",type:"Number"}
62 ] 68 ]
63 }, 69 },
64 70
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
20 <div class="filter form-inline" style="margin-bottom: 20px"> 20 <div class="filter form-inline" style="margin-bottom: 20px">
21 <input id="productSKN" type="text" class="form-control" placeholder="SKN" />&nbsp;&nbsp; 21 <input id="productSKN" type="text" class="form-control" placeholder="SKN" />&nbsp;&nbsp;
22 <input id="productName" type="text" class="form-control" placeholder="商品名称" />&nbsp;&nbsp; 22 <input id="productName" type="text" class="form-control" placeholder="商品名称" />&nbsp;&nbsp;
  23 + <div id="sortTree" class="form-control height40" style="border: 0px; padding: 0px;"></div>
23 <a href="javascript:" class="btn btn-info filter-btn">查询</a> 24 <a href="javascript:" class="btn btn-info filter-btn">查询</a>
24 <a href="javascript:" class="btn btn-danger cancelAll" style="float: right;display: none">全部取消</a> 25 <a href="javascript:" class="btn btn-danger cancelAll" style="float: right;display: none">全部取消</a>
25 </div> 26 </div>
@@ -12,7 +12,10 @@ var g1 = new common.grid({ @@ -12,7 +12,10 @@ var g1 = new common.grid({
12 return { 12 return {
13 categoryId: curCategoryId, 13 categoryId: curCategoryId,
14 productSKN: common.util.__input("productSKN"), 14 productSKN: common.util.__input("productSKN"),
15 - productName: common.util.__input("productName") 15 + productName: common.util.__input("productName"),
  16 + maxSortId: tabTree.selected[0] ? tabTree.selected[0].id : "",
  17 + middleSortId: tabTree.selected[1] ? tabTree.selected[1].id : "",
  18 + smallSortId: tabTree.selected[2] ? tabTree.selected[2].id : ""
16 }; 19 };
17 }, 20 },
18 columns: [ 21 columns: [
@@ -30,6 +33,7 @@ var g1 = new common.grid({ @@ -30,6 +33,7 @@ var g1 = new common.grid({
30 {display: "SKN", name: "productSKN"}, 33 {display: "SKN", name: "productSKN"},
31 {display: "商品名称", name: "productName"}, 34 {display: "商品名称", name: "productName"},
32 {display: "销售价(元)", name: "salePrice"}, 35 {display: "销售价(元)", name: "salePrice"},
  36 + {display: "可售库存", name: "storage"},
33 {display: "分类", name: "productSort"}, 37 {display: "分类", name: "productSort"},
34 {display: "商品分类", render: function (item) { 38 {display: "商品分类", render: function (item) {
35 var name = item.categoryName ? item.categoryName : '未分类'; 39 var name = item.categoryName ? item.categoryName : '未分类';
@@ -64,7 +68,10 @@ var g2 = new common.grid({ @@ -64,7 +68,10 @@ var g2 = new common.grid({
64 return { 68 return {
65 categoryId: curCategoryId, 69 categoryId: curCategoryId,
66 productSKN: common.util.__input("productSKN"), 70 productSKN: common.util.__input("productSKN"),
67 - productName: common.util.__input("productName") 71 + productName: common.util.__input("productName"),
  72 + maxSortId: tabTree.selected[0] ? tabTree.selected[0].id : "",
  73 + middleSortId: tabTree.selected[1] ? tabTree.selected[1].id : "",
  74 + smallSortId: tabTree.selected[2] ? tabTree.selected[2].id : ""
68 }; 75 };
69 }, 76 },
70 columns: [ 77 columns: [
@@ -83,6 +90,7 @@ var g2 = new common.grid({ @@ -83,6 +90,7 @@ var g2 = new common.grid({
83 {display: "SKN", name: "productSKN"}, 90 {display: "SKN", name: "productSKN"},
84 {display: "商品名称", name: "productName"}, 91 {display: "商品名称", name: "productName"},
85 {display: "销售价(元)", name: "salePrice"}, 92 {display: "销售价(元)", name: "salePrice"},
  93 + {display: "可售库存", name: "storage"},
86 {display: "分类", name: "productSort"}, 94 {display: "分类", name: "productSort"},
87 {display: "商品分类", render: function (item) { 95 {display: "商品分类", render: function (item) {
88 var name = item.categoryName ? item.categoryName : '未分类'; 96 var name = item.categoryName ? item.categoryName : '未分类';
@@ -107,6 +115,9 @@ var g2 = new common.grid({ @@ -107,6 +115,9 @@ var g2 = new common.grid({
107 } 115 }
108 }); 116 });
109 117
  118 +var tabTree = new common.tabTree("#sortTree");
  119 +tabTree.init();
  120 +
110 var Bll = { 121 var Bll = {
111 init: function () { 122 init: function () {
112 this.getParamsInUrl(); 123 this.getParamsInUrl();