Authored by leo

Update:店铺商品分类支持按上下架状态筛选,列表按照库存倒序排序

... ... @@ -50,7 +50,8 @@ module.exports={
{name:"page",type:"Number"},
{name:"maxSortId",type:"Number"},
{name:"middleSortId",type:"Number"},
{name:"smallSortId",type:"Number"}
{name:"smallSortId",type:"Number"},
{name:"status",type:"Number"}
]
},
... ... @@ -64,7 +65,8 @@ module.exports={
{name:"page",type:"Number"},
{name:"maxSortId",type:"Number"},
{name:"middleSortId",type:"Number"},
{name:"smallSortId",type:"Number"}
{name:"smallSortId",type:"Number"},
{name:"status",type:"Number"}
]
},
... ...
... ... @@ -20,6 +20,11 @@
<div class="filter form-inline" style="margin-bottom: 20px">
<input id="productSKN" type="text" class="form-control" placeholder="SKN" />&nbsp;&nbsp;
<input id="productName" type="text" class="form-control" placeholder="商品名称" />&nbsp;&nbsp;
<select id="status-select" class="form-control" name="status-select">
<option value="-1">请选择上下架状态</option>
<option value="0">下架</option>
<option value="1">上架</option>
</select>&nbsp;&nbsp;
<div id="sortTree" class="form-control height40" style="border: 0px; padding: 0px;"></div>
<a href="javascript:" class="btn btn-info filter-btn">查询</a>
<a href="javascript:" class="btn btn-danger cancelAll" style="float: right;display: none">全部取消</a>
... ...
... ... @@ -6,6 +6,13 @@ var curCategoryId = 0,
selectedNum = 0,
curTab = 0;
var ENUM = {
status: {
'0': '未上架',
'1': '已上架'
}
}
var g1 = new common.grid({
el: '#productTable',
parms: function() {
... ... @@ -15,7 +22,8 @@ var g1 = new common.grid({
productName: common.util.__input("productName"),
maxSortId: tabTree.selected[0] ? tabTree.selected[0].id : "",
middleSortId: tabTree.selected[1] ? tabTree.selected[1].id : "",
smallSortId: tabTree.selected[2] ? tabTree.selected[2].id : ""
smallSortId: tabTree.selected[2] ? tabTree.selected[2].id : "",
status: common.util.__input("status-select")
};
},
columns: [
... ... @@ -34,6 +42,9 @@ var g1 = new common.grid({
{display: "商品名称", name: "productName"},
{display: "销售价(元)", name: "salePrice"},
{display: "可售库存", name: "storage"},
{display: "上下架状态", render: function(item) {
return ENUM.status[item.status];
}},
{display: "分类", name: "productSort"},
{display: "商品分类", render: function (item) {
var name = item.categoryName ? item.categoryName : '未分类';
... ... @@ -71,7 +82,8 @@ var g2 = new common.grid({
productName: common.util.__input("productName"),
maxSortId: tabTree.selected[0] ? tabTree.selected[0].id : "",
middleSortId: tabTree.selected[1] ? tabTree.selected[1].id : "",
smallSortId: tabTree.selected[2] ? tabTree.selected[2].id : ""
smallSortId: tabTree.selected[2] ? tabTree.selected[2].id : "",
status: common.util.__input("status-select")
};
},
columns: [
... ... @@ -91,6 +103,9 @@ var g2 = new common.grid({
{display: "商品名称", name: "productName"},
{display: "销售价(元)", name: "salePrice"},
{display: "可售库存", name: "storage"},
{display: "上下架状态", render: function(item) {
return ENUM.status[item.status];
}},
{display: "分类", name: "productSort"},
{display: "商品分类", render: function (item) {
var name = item.categoryName ? item.categoryName : '未分类';
... ...