Authored by 陶雨

Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop

'use strict';
var $ = require('jquery'),
common = require('../common/common');
var g = new common.grid({
el: "#basicTable",
parms: function() {
return {
state: $('input[name="state"]').val()
}
},
columns: [{
display: '',
name: 'foler',
render: function() {
return '';
}
}, {
display: 'ID',
name: 'categoryId'
}, {
display: '品类名称',
name: 'categoryName'
}, {
display: '所属分类',
name: '',
render: function() {
return '一级分类';
}
}, {
display: '分类图标',
name: ''
}, {
display: '排序',
name: 'orderBy'
}, {
display: '状态',
name: 'status'
}, {
display: '操作',
render: function() {
}
}]
});
g.init($("#gridurl").val());
\ No newline at end of file
... ...
... ... @@ -25,3 +25,4 @@
@import "module/template";
@import "module/shop-pc";
@import "module/shop-app";
@import "module/salecategory";
... ...
.state-select {
position: relative;
margin: 10px 0 0;
padding: 10px;
label {
cursor: pointer;
padding: 2px 10px;
&.current {
background: black;
color: #fff;
}
}
input {
position: absolute;
opacity: 0;
cursor: pointer;
}
}
\ No newline at end of file
... ...
//exports.domain = require('../config/common.js').domain;
exports.domain = 'http://localhost:30012';
//销售类目路由
exports.res = [{
'route': '/sale/category/index',
'method': 'GET',
'src': '/salecategory/index',
'view': 'pages/salecategory/index',
'data': {
gridurl: '/salesCategory/queryAllSalesCategoryList'
}
}, {
route: '/salesCategory/queryAllSalesCategoryList',
method: 'POST',
src: '/salesCategory/queryAllSalesCategoryList',
params: []
}]
\ No newline at end of file
... ...
module.exports = {
'/salesCategory/queryAllSalesCategoryList': function(req, res) {
res.json({
code: 200,
message: "queryAllSalesCategoryList success",
data: {
code: 200,
data: {
list: [{
"createTime": "1441117726",
"icon": "",
"categoryId": "1",
"relationParameter": "114,293,116,117,115,119,124,122,131,129,346,133,348,147,149,148,151,231,152,153,196,238,239,240,349,157,342,156,161,300,160,233,341,340,210,339,351,186,235,163,224,322,323,324,325,326,327,328,329,330,331,72,74,75,76,142,77,78,79,80,199,213,217,218,234,303,305,306,307,334,162,316,164,317,295,321,311,357,359,320,195,197,413,130,258,173,227,125,118,121,123,263,260,264,261,352",
"orderBy": "0",
"parentId": "0",
"categoryCode": "1,0,0,0",
"relationUrl": "",
"levelNumber": "1",
"categoryName": "男生",
"status": "1",
"items": [{
"createTime": "1441117792",
"icon": "http://img11.static.yhbimg.com/taobaocms/2015/09/01/14/01d48022e08742f1c96766caa6484593ce.jpg?imageView/{mode}/w/{width}/h/{height}",
"categoryId": "5",
"relationParameter": "114,293,116,117,115,119,124,122,413,258,173,227,125,118,121,123",
"orderBy": "10",
"parentId": "1",
"categoryCode": "1,5,0,0",
"relationUrl": "",
"levelNumber": "2",
"categoryName": "上衣",
"status": "1",
"items": [{
"relationUrl": "",
"createTime": "0",
"icon": "",
"categoryId": "45",
"relationParameter": "114,293",
"orderBy": "5",
"parentId": "5",
"categoryCode": "1,5,45,0",
"levelNumber": "3",
"categoryName": "T恤",
"status": "1"
}]
}, {
"relationUrl": "",
"createTime": "1441117934",
"icon": "http://img11.static.yhbimg.com/taobaocms/2015/09/01/14/019b1a20d4cf319e0e8035cacf2d1d231f.jpg?imageView/{mode}/w/{width}/h/{height}",
"categoryId": "8",
"relationParameter": "131,129,346,133,348,130,114,293",
"orderBy": "9",
"parentId": "1",
"categoryCode": "1,8,0,0",
"levelNumber": "2",
"categoryName": "裤装",
"status": "1",
"items": [{
"relationUrl": "UP",
"createTime": "1441118557",
"icon": "",
"categoryId": "86",
"relationParameter": "131",
"orderBy": "3",
"parentId": "8",
"categoryCode": "1,8,86,0",
"levelNumber": "3",
"categoryName": "短裤",
"status": "1"
}]
}, {
"createTime": "0",
"icon": "",
"categoryId": "11",
"relationParameter": "147,149,148,151,231",
"orderBy": "8",
"parentId": "1",
"categoryCode": "1,11,0,0",
"relationUrl": "22",
"levelNumber": "2",
"categoryName": "鞋靴",
"status": "1",
"items": [{
"relationUrl": "UP",
"createTime": "0",
"icon": "",
"categoryId": "107",
"relationParameter": "147",
"orderBy": "0",
"parentId": "11",
"categoryCode": "1,11,107,0",
"levelNumber": "3",
"categoryName": "休闲/运动鞋",
"status": "1"
}, {
"relationUrl": "UP",
"createTime": "0",
"icon": "",
"categoryId": "113",
"relationParameter": "149",
"orderBy": "0",
"parentId": "11",
"categoryCode": "1,11,113,0",
"levelNumber": "3",
"categoryName": "凉鞋/凉拖",
"status": "0"
}]
}, {
"relationUrl": "",
"createTime": "0",
"icon": "",
"categoryId": "14",
"relationParameter": "152,153,196,238,239,240,349,157,342,156,161,300,160,233,341,340,210,339,351,195,197",
"orderBy": "11",
"parentId": "1",
"categoryCode": "1,17,0,0",
"levelNumber": "2",
"categoryName": "包类",
"status": "0",
"items": [{
"relationUrl": "UP",
"createTime": "0",
"icon": "",
"categoryId": "147",
"relationParameter": "238,239,240,349",
"orderBy": "12",
"parentId": "14",
"categoryCode": "1,14,147,0",
"levelNumber": "3",
"categoryName": "钱包/卡包/手包/钥匙包",
"status": "1"
}]
}, {
"createTime": "0",
"icon": "",
"categoryId": "17",
"relationParameter": "186,235,163,224,322,323,324,325,326,327,328,329,330,331,72,74,75,76,142,77,78,79,80,199,213,217,218,234,303,305,306,307,334,162,316,320,164,317,295,321",
"orderBy": "0",
"parentId": "1",
"categoryCode": "1,17,0,0",
"relationUrl": "SJ",
"levelNumber": "2",
"categoryName": "服配",
"status": "0",
"items": [{
"relationUrl": "",
"createTime": "0",
"icon": "",
"categoryId": "177",
"relationParameter": "186,235",
"orderBy": "0",
"parentId": "17",
"categoryCode": "1,17,177,0",
"levelNumber": "3",
"categoryName": "太阳镜/眼镜",
"status": "1"
}, {
"relationUrl": "UP",
"createTime": "0",
"icon": "",
"categoryId": "246",
"relationParameter": "163,224,322,323,324,325,326,327,328,329,330,331",
"orderBy": "0",
"parentId": "17",
"categoryCode": "1,17,178,0",
"levelNumber": "3",
"categoryName": "帽子",
"status": "1"
}]
}]
}, {
"createTime": "1460079347",
"icon": "",
"categoryId": "2",
"relationParameter": "227,173,125,258,121,123,119,124,118,348,122,115,117,346,114,293,131,133,186,235,163,224,322,323,324,325,326,327,328,329,330,331,72,74,75,76,142,77,78,79,80,199,213,217,218,234,303,305,306,307,334,162,316,320,164,317,295,321,147,149,148,151,231,311,364,357,359,116,129,134,135,413,152,153,238,239,240,349,157,342,156,161,300,160,233,341,340,210,339,351,195,196,197,263",
"orderBy": "1",
"parentId": "0",
"categoryCode": "2,0,0,0",
"relationUrl": "11",
"levelNumber": "1",
"categoryName": "女生",
"status": "1",
"items": [{
"createTime": "1460079406",
"icon": "",
"categoryId": "31",
"relationParameter": "134,135",
"orderBy": "111",
"parentId": "2",
"categoryCode": "2,31,0,0",
"relationUrl": "11",
"levelNumber": "2",
"categoryName": "裙装",
"status": "1"
}]
}],
page: 1,
size: 10,
total: 1082,
totalPage: 109
}
}
});
}
}
\ No newline at end of file
... ...
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">运营管理</a></li>
<li>
销售类目管理
</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>销售类目管理</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<a href="/erpproduct/brands/add" class="btn btn-success"><i class="fa fa-plus"></i> 添加根分类</a>
<div class="panel panel-default" style="margin:10px 0;">
<div class="panel-body nopadding">
<div class="state-select">
<strong>状态:</strong>
<label><input type="radio" name="state" value="全部">全部</label>
<label class="current"><input type="radio" name="state" value="1">开启</label>
<label><input type="radio" name="state" value="0">关闭</label>
</div>
</div>
</div>
<div class="panel">
<div class="panel-body nopadding">
<div class="dataTables_wrapper no-footer" id="basicTable"></div>
</div>
</div>
</div>
<input type="hidden" id="gridurl" value="{{gridurl}}">
... ...