Authored by 马力

Merge branch 'dev_店铺商品分类优化_14140' into gray

# Conflicts:
#	dist/yohobuy-shops-fe/4.8.3/jquery/goods.netsale.Edit.js
#	dist/yohobuy-shops-fe/4.8.3/jquery/goods.netsale.Index.js
#	server/views/goods/netsale/Edit.html
#	server/views/goods/netsale/Index.html
@@ -47,7 +47,11 @@ module.exports={ @@ -47,7 +47,11 @@ 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"},
  54 + {name:"status",type:"Number"}
51 ] 55 ]
52 }, 56 },
53 57
@@ -58,7 +62,11 @@ module.exports={ @@ -58,7 +62,11 @@ module.exports={
58 {name:"categoryId",type:"Number"}, 62 {name:"categoryId",type:"Number"},
59 {name:"productSKN",type:"Number"}, 63 {name:"productSKN",type:"Number"},
60 {name:"productName",type:"String"}, 64 {name:"productName",type:"String"},
61 - {name:"page",type:"Number"} 65 + {name:"page",type:"Number"},
  66 + {name:"maxSortId",type:"Number"},
  67 + {name:"middleSortId",type:"Number"},
  68 + {name:"smallSortId",type:"Number"},
  69 + {name:"status",type:"Number"}
62 ] 70 ]
63 }, 71 },
64 72
@@ -20,6 +20,12 @@ @@ -20,6 +20,12 @@
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 + <select id="status-select" class="form-control" name="status-select">
  24 + <option value="-1">请选择上下架状态</option>
  25 + <option value="0">下架</option>
  26 + <option value="1">上架</option>
  27 + </select>&nbsp;&nbsp;
  28 + <div id="sortTree" class="form-control height40" style="border: 0px; padding: 0px;"></div>
23 <a href="javascript:" class="btn btn-info filter-btn">查询</a> 29 <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> 30 <a href="javascript:" class="btn btn-danger cancelAll" style="float: right;display: none">全部取消</a>
25 </div> 31 </div>
@@ -6,13 +6,24 @@ var curCategoryId = 0, @@ -6,13 +6,24 @@ var curCategoryId = 0,
6 selectedNum = 0, 6 selectedNum = 0,
7 curTab = 0; 7 curTab = 0;
8 8
  9 +var ENUM = {
  10 + status: {
  11 + '0': '未上架',
  12 + '1': '已上架'
  13 + }
  14 +}
  15 +
9 var g1 = new common.grid({ 16 var g1 = new common.grid({
10 el: '#productTable', 17 el: '#productTable',
11 parms: function() { 18 parms: function() {
12 return { 19 return {
13 categoryId: curCategoryId, 20 categoryId: curCategoryId,
14 productSKN: common.util.__input("productSKN"), 21 productSKN: common.util.__input("productSKN"),
15 - productName: common.util.__input("productName") 22 + productName: common.util.__input("productName"),
  23 + maxSortId: tabTree.selected[0] ? tabTree.selected[0].id : "",
  24 + middleSortId: tabTree.selected[1] ? tabTree.selected[1].id : "",
  25 + smallSortId: tabTree.selected[2] ? tabTree.selected[2].id : "",
  26 + status: common.util.__input("status-select")
16 }; 27 };
17 }, 28 },
18 columns: [ 29 columns: [
@@ -30,6 +41,10 @@ var g1 = new common.grid({ @@ -30,6 +41,10 @@ var g1 = new common.grid({
30 {display: "SKN", name: "productSKN"}, 41 {display: "SKN", name: "productSKN"},
31 {display: "商品名称", name: "productName"}, 42 {display: "商品名称", name: "productName"},
32 {display: "销售价(元)", name: "salePrice"}, 43 {display: "销售价(元)", name: "salePrice"},
  44 + {display: "可售库存", name: "storage"},
  45 + {display: "上下架状态", render: function(item) {
  46 + return ENUM.status[item.status];
  47 + }},
33 {display: "分类", name: "productSort"}, 48 {display: "分类", name: "productSort"},
34 {display: "商品分类", render: function (item) { 49 {display: "商品分类", render: function (item) {
35 var name = item.categoryName ? item.categoryName : '未分类'; 50 var name = item.categoryName ? item.categoryName : '未分类';
@@ -64,7 +79,11 @@ var g2 = new common.grid({ @@ -64,7 +79,11 @@ var g2 = new common.grid({
64 return { 79 return {
65 categoryId: curCategoryId, 80 categoryId: curCategoryId,
66 productSKN: common.util.__input("productSKN"), 81 productSKN: common.util.__input("productSKN"),
67 - productName: common.util.__input("productName") 82 + productName: common.util.__input("productName"),
  83 + maxSortId: tabTree.selected[0] ? tabTree.selected[0].id : "",
  84 + middleSortId: tabTree.selected[1] ? tabTree.selected[1].id : "",
  85 + smallSortId: tabTree.selected[2] ? tabTree.selected[2].id : "",
  86 + status: common.util.__input("status-select")
68 }; 87 };
69 }, 88 },
70 columns: [ 89 columns: [
@@ -83,6 +102,10 @@ var g2 = new common.grid({ @@ -83,6 +102,10 @@ var g2 = new common.grid({
83 {display: "SKN", name: "productSKN"}, 102 {display: "SKN", name: "productSKN"},
84 {display: "商品名称", name: "productName"}, 103 {display: "商品名称", name: "productName"},
85 {display: "销售价(元)", name: "salePrice"}, 104 {display: "销售价(元)", name: "salePrice"},
  105 + {display: "可售库存", name: "storage"},
  106 + {display: "上下架状态", render: function(item) {
  107 + return ENUM.status[item.status];
  108 + }},
86 {display: "分类", name: "productSort"}, 109 {display: "分类", name: "productSort"},
87 {display: "商品分类", render: function (item) { 110 {display: "商品分类", render: function (item) {
88 var name = item.categoryName ? item.categoryName : '未分类'; 111 var name = item.categoryName ? item.categoryName : '未分类';
@@ -107,6 +130,9 @@ var g2 = new common.grid({ @@ -107,6 +130,9 @@ var g2 = new common.grid({
107 } 130 }
108 }); 131 });
109 132
  133 +var tabTree = new common.tabTree("#sortTree");
  134 +tabTree.init();
  135 +
110 var Bll = { 136 var Bll = {
111 init: function () { 137 init: function () {
112 this.getParamsInUrl(); 138 this.getParamsInUrl();