Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop
Showing
14 changed files
with
245 additions
and
46 deletions
@@ -4,10 +4,7 @@ var $ = require('jquery'), | @@ -4,10 +4,7 @@ var $ = require('jquery'), | ||
4 | common=require('../common/common'); | 4 | common=require('../common/common'); |
5 | var e = new common.edit("#activityForm"); | 5 | var e = new common.edit("#activityForm"); |
6 | 6 | ||
7 | -e.on("render", function() { | ||
8 | - | ||
9 | -}); | ||
10 | - | 7 | +// e.on("render", function() { |
11 | var bgStyle = $("#backgroundStyle").val(); | 8 | var bgStyle = $("#backgroundStyle").val(); |
12 | var prizeList = $("#prizeList").val(); | 9 | var prizeList = $("#prizeList").val(); |
13 | if (bgStyle) { | 10 | if (bgStyle) { |
@@ -23,23 +20,9 @@ e.on("render", function() { | @@ -23,23 +20,9 @@ e.on("render", function() { | ||
23 | $("#realUserNum").val(prizeObj.realUserNum); | 20 | $("#realUserNum").val(prizeObj.realUserNum); |
24 | $("#sockUserNum").val(prizeObj.sockUserNum); | 21 | $("#sockUserNum").val(prizeObj.sockUserNum); |
25 | } | 22 | } |
23 | +// }); | ||
26 | 24 | ||
27 | -function dealTotalHours() { | ||
28 | - var beginTimeStr = $("#beginTimeStr").val(); | ||
29 | - var endTimeStr = $("#endTimeStr").val(); | ||
30 | - if (beginTimeStr != "" && endTimeStr != "") { | ||
31 | - var bDate = new Date(beginTimeStr); | ||
32 | - var eDate = new Date(endTimeStr); | ||
33 | - var hours = eDate.getTime() - bDate.getTime(); | ||
34 | - $("#totalHours").html("总计时间:" + parseInt(hours / (1000 * 60 * 60)) + " 小时"); | ||
35 | - } else { | ||
36 | - $("#totalHours").html(""); | ||
37 | - } | ||
38 | -} | ||
39 | -dealTotalHours(); | ||
40 | -$("#beginTimeStr,#endTimeStr").change(function() { | ||
41 | - dealTotalHours(); | ||
42 | -}); | 25 | +// |
43 | 26 | ||
44 | e.init(); | 27 | e.init(); |
45 | 28 |
@@ -61,7 +61,6 @@ | @@ -61,7 +61,6 @@ | ||
61 | } else if (item.status == 1) { | 61 | } else if (item.status == 1) { |
62 | HtmArr.push('<a data-index="'+item.__index+'" href="javascript:void(0);" class="closeshops btn btn-danger btn-xs">关闭</a>'); | 62 | HtmArr.push('<a data-index="'+item.__index+'" href="javascript:void(0);" class="closeshops btn btn-danger btn-xs">关闭</a>'); |
63 | } | 63 | } |
64 | - HtmArr.push('<a href="/activity/drawline/data/'+item.activityId+'" href="javascript:void(0);" class="btn btn-info btn-xs">数据</a>'); | ||
65 | return HtmArr.join(''); | 64 | return HtmArr.join(''); |
66 | }} | 65 | }} |
67 | ] | 66 | ] |
@@ -24,7 +24,7 @@ new common.dropDown({ | @@ -24,7 +24,7 @@ new common.dropDown({ | ||
24 | }); | 24 | }); |
25 | new common.dropDown({ | 25 | new common.dropDown({ |
26 | el: '#supplier', | 26 | el: '#supplier', |
27 | - ajax: 'supplier' | 27 | + ajax: 'querySupplier' |
28 | }); | 28 | }); |
29 | new common.dropDown({ | 29 | new common.dropDown({ |
30 | el: '#brand', | 30 | el: '#brand', |
client/js/help/helpCategory.js
0 → 100644
1 | +//帮助分类 | ||
2 | +var $ = require('jquery'); | ||
3 | + common = require('../common/common'); | ||
4 | + | ||
5 | + var g = new common.grid({ | ||
6 | + el: '#help_list', | ||
7 | + columns: [ | ||
8 | + {display: "编号", name: "name"}, | ||
9 | + {display: "分类名称", name: "category"}, | ||
10 | + {display: "显示平台", name: "paltform"}, | ||
11 | + {display: "时间", name: "time"}, | ||
12 | + { | ||
13 | + display: "操作", name: "", render: function (item) { | ||
14 | + | ||
15 | + var arr = []; | ||
16 | + arr.push('<a class="btn btn-info add2" data-index="' + item.__index + '">编辑</a>'); | ||
17 | + arr.push('<a class="btn btn-info delbtn" data-index="' + item.__index + '">删除</a>'); | ||
18 | + return arr.join(''); | ||
19 | + } | ||
20 | + } | ||
21 | + ] | ||
22 | + }); | ||
23 | + | ||
24 | + g.init("/operations111/helpcategory/index111"); | ||
25 | + | ||
26 | +var Bll = { | ||
27 | + onClick:function(arg1, arg2, arg3) { | ||
28 | + var e = new common.edit("#baseform"); | ||
29 | + | ||
30 | +console.log(arg2); | ||
31 | + common.dialog.confirm(arg3, | ||
32 | + common.util.__template($("#template").html(), arg2), | ||
33 | + function() { | ||
34 | + e.submit(arg1,function(option){ | ||
35 | + // option.data.category=option.data.category_name_value+"--uoho"; | ||
36 | + // console.log(option.data); | ||
37 | + option.success=function(){ | ||
38 | + alert("suc"); | ||
39 | + g.reload(); | ||
40 | + }; | ||
41 | + option.error=function(){ | ||
42 | + alert("fail"); | ||
43 | + } | ||
44 | + }); | ||
45 | + }); | ||
46 | + e.init(); | ||
47 | + new common.dropDown({el: "#xxx"}); | ||
48 | + } | ||
49 | +}; | ||
50 | + | ||
51 | + $('#add-category').on('click', function () { | ||
52 | + var item={}; | ||
53 | + Bll.onClick("/operations111/helpcategory/index222",item,"添加分类"); | ||
54 | + }); | ||
55 | + | ||
56 | + $('#help_list').on('click', '.add2', function () { | ||
57 | + var item=g.rows[$(this).data("index")]; | ||
58 | + Bll.onClick("/operations111/helpcategory/indexModify",item, "修改分类"); | ||
59 | + }); | ||
60 | + $('#help_list').on('click', '.delbtn', function() { | ||
61 | + var e = new common.edit("baseform"); | ||
62 | + common.dialog.confirm("是否确认删除", | ||
63 | + "", | ||
64 | + function() { | ||
65 | + e.submit("/operations111/helpcategory/indexDelete", function(option) { | ||
66 | + option.success=function() { | ||
67 | + alert("删除成功"); | ||
68 | + g.reload(); | ||
69 | + }; | ||
70 | + option.error=function() { | ||
71 | + alert("删除失败"); | ||
72 | + }; | ||
73 | + }) | ||
74 | + }); | ||
75 | + e.init(); | ||
76 | + }); | ||
77 | + | ||
78 | + | ||
79 | + |
@@ -208,10 +208,10 @@ $('#export-btn').on('click', function() { | @@ -208,10 +208,10 @@ $('#export-btn').on('click', function() { | ||
208 | var selectedArr = tableGird.selected, | 208 | var selectedArr = tableGird.selected, |
209 | len = selectedArr.length, | 209 | len = selectedArr.length, |
210 | queryConf = ''; | 210 | queryConf = ''; |
211 | - if (len <= 0) { | 211 | + /*if (len <= 0) { |
212 | common.util.__tip('请选择要导出的商品', 'warning'); | 212 | common.util.__tip('请选择要导出的商品', 'warning'); |
213 | return; | 213 | return; |
214 | - } | 214 | + }*/ |
215 | $.each(selectedArr, function(i, value) { | 215 | $.each(selectedArr, function(i, value) { |
216 | queryConf += value['limitProductCode']; | 216 | queryConf += value['limitProductCode']; |
217 | if (i < len - 1) { | 217 | if (i < len - 1) { |
@@ -222,7 +222,7 @@ $('#export-btn').on('click', function() { | @@ -222,7 +222,7 @@ $('#export-btn').on('click', function() { | ||
222 | common.util.__ajax({ | 222 | common.util.__ajax({ |
223 | url: '/limit/batch/export', | 223 | url: '/limit/batch/export', |
224 | data: { | 224 | data: { |
225 | - queryConf: queryConf, | 225 | + queryConf: '2016022517335568', |
226 | type: 'limitProductReminder' | 226 | type: 'limitProductReminder' |
227 | } | 227 | } |
228 | }, function(res) { | 228 | }, function(res) { |
@@ -107,16 +107,5 @@ exports.res = [ | @@ -107,16 +107,5 @@ exports.res = [ | ||
107 | {name: 'activityDesc',type: 'string'}, | 107 | {name: 'activityDesc',type: 'string'}, |
108 | {name: 'prizeList',type: 'string'} | 108 | {name: 'prizeList',type: 'string'} |
109 | ] | 109 | ] |
110 | - }, { | ||
111 | - // 数据查询页面渲染 | ||
112 | - route: '/activity/drawline/data/:activityId', | ||
113 | - method: 'GET', | ||
114 | - view: 'pages/activity/data', | ||
115 | - url : "/DrawlineActivityRest/getPrizeDetailInfo", | ||
116 | - params:[{ | ||
117 | - name:'activityId', | ||
118 | - type:'Number' | ||
119 | - }], | ||
120 | - src:'/activity/data' | ||
121 | } | 110 | } |
122 | ]; | 111 | ]; |
@@ -51,8 +51,8 @@ exports.res = [ | @@ -51,8 +51,8 @@ exports.res = [ | ||
51 | //网销信息 -> 网销信息页面渲染 | 51 | //网销信息 -> 网销信息页面渲染 |
52 | route: '/goods/netsale/index', | 52 | route: '/goods/netsale/index', |
53 | method: 'GET', | 53 | method: 'GET', |
54 | - view: 'pages/goods/net-sale', | ||
55 | - src: '/goods/net-sale', | 54 | + view: 'pages/goods/netsale', |
55 | + src: '/goods/netsale', | ||
56 | data: { | 56 | data: { |
57 | pageTitle: '网销信息', | 57 | pageTitle: '网销信息', |
58 | filter: { | 58 | filter: { |
server/interface/helpcategory.js
0 → 100644
1 | +exports.domain = 'http://localhost:30012'; | ||
2 | + | ||
3 | +exports.res = [ | ||
4 | +{ | ||
5 | + route:'/operations111/helpcategory/index', | ||
6 | + method: 'GET', | ||
7 | + view: 'pages/help/help', | ||
8 | + src: '/help/helpCategory' | ||
9 | +},{ | ||
10 | + route: '/operations111/helpcategory/index111', | ||
11 | + method: 'POST', | ||
12 | + url:'/paltform/helpcategory/getReviewList', | ||
13 | + params: [ | ||
14 | + {name: 'page', type: 'Number'}, | ||
15 | + {name: 'size', type: 'Number',def:10} | ||
16 | + ] | ||
17 | +},{ | ||
18 | + route: '/operations111/helpcategory/index222', | ||
19 | + method: 'POST', | ||
20 | + url: '/goods', | ||
21 | + params: [ | ||
22 | + {name: 'name', type: 'String'}, | ||
23 | + {name: 'category', type: 'String'}, | ||
24 | + {name: 'paltform', type: 'String'} | ||
25 | + ] | ||
26 | +},{ | ||
27 | + route: '/operations111/helpcategory/indexModify', | ||
28 | + method: 'POST', | ||
29 | + url: '/goods', | ||
30 | + params: [ | ||
31 | + {name: 'id', type: 'Number'}, | ||
32 | + {name: 'name', type: 'String'}, | ||
33 | + {name: 'category', type: 'String'}, | ||
34 | + {name: 'paltform', type: 'String'} | ||
35 | + ] | ||
36 | +},{ | ||
37 | + route: '/operations111/helpcategory/indexDelete', | ||
38 | + method: 'POST', | ||
39 | + url: '/goods', | ||
40 | + params: [ | ||
41 | + {name: 'name', type: 'String'} | ||
42 | + ] | ||
43 | +}] |
server/stub/config/help.js
0 → 100644
1 | +/** | ||
2 | + * 桩数据 | ||
3 | + * @author h1bomb | ||
4 | + */ | ||
5 | + | ||
6 | +module.exports = { | ||
7 | + '/paltform/helpcategory/getReviewList': function(req, res) { | ||
8 | + res.json({ | ||
9 | + code: 200, | ||
10 | + data: { | ||
11 | + list: [{ | ||
12 | + name: '51197205', | ||
13 | + category: 'http://img10.static.yhbimg.com/goodsimg/2016/02/01/07/019d377b10ce778c4938b3c7e2c63a229a.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90', | ||
14 | + paltform: 'ceshiproductwss01', | ||
15 | + time: '100.00', | ||
16 | + status: 0 | ||
17 | + }, { | ||
18 | + name: '51197204', | ||
19 | + category: 'ceshiproductwss01', | ||
20 | + paltform: '长袖', | ||
21 | + time: '16/02/03 16:57', | ||
22 | + status: 1 | ||
23 | + }, { | ||
24 | + name: '51197204', | ||
25 | + category: 'ceshiproductwss01', | ||
26 | + paltform: '长袖', | ||
27 | + time: '16/02/03 16:57', | ||
28 | + status: 1 | ||
29 | + }, { | ||
30 | + name: '51197204', | ||
31 | + category: 'ceshiproductwss01', | ||
32 | + paltform: '长袖', | ||
33 | + time: '16/02/03 16:57', | ||
34 | + status: 1 | ||
35 | + }, { | ||
36 | + name: '51197204', | ||
37 | + category: 'ceshiproductwss01', | ||
38 | + paltform: '长袖', | ||
39 | + time: '16/02/03 16:57', | ||
40 | + status: 1 | ||
41 | + }], | ||
42 | + page: 1, | ||
43 | + size: 10, | ||
44 | + totalPage: 1 | ||
45 | + } | ||
46 | + }); | ||
47 | + } | ||
48 | +} |
@@ -47,9 +47,6 @@ | @@ -47,9 +47,6 @@ | ||
47 | <div class="col-sm-3"> | 47 | <div class="col-sm-3"> |
48 | <input type="text" class="form-control" jsaction="time:start:beginTimeStr" id="endTimeStr" required placeholder="活动结束时间" value="{{endTimeStr}}" readonly > | 48 | <input type="text" class="form-control" jsaction="time:start:beginTimeStr" id="endTimeStr" required placeholder="活动结束时间" value="{{endTimeStr}}" readonly > |
49 | </div> | 49 | </div> |
50 | - <div class="col-sm-3"> | ||
51 | - <label class="control-label" id="totalHours"></label> | ||
52 | - </div> | ||
53 | <!-- readonly require--> | 50 | <!-- readonly require--> |
54 | </div> | 51 | </div> |
55 | 52 | ||
@@ -91,12 +88,12 @@ | @@ -91,12 +88,12 @@ | ||
91 | <label class="">顶部banner:<span class="red">*</span></label> | 88 | <label class="">顶部banner:<span class="red">*</span></label> |
92 | </div> | 89 | </div> |
93 | <div class="col-sm-7"> | 90 | <div class="col-sm-7"> |
94 | - <input type="file" id="topBanner" name="topBanner" value="{{topBanner}}" placeholder="顶部banner" required /> | 91 | + <input type="file" id="topBanner" name="topBanner" value="{{topBanner}}" placeholder="顶部banner" /> |
95 | </div> | 92 | </div> |
96 | </div> | 93 | </div> |
97 | - <div class="input-group col-sm-12"> | ||
98 | - <div class="col-sm-1"> | ||
99 | - <label class="">背景样式:</label> | 94 | + <div class="input-group col-sm-10"> |
95 | + <div class="col-sm-2"> | ||
96 | + <label class="">背景样式:<span class="red">*</span></label> | ||
100 | </div> | 97 | </div> |
101 | <div class="col-sm-1"> | 98 | <div class="col-sm-1"> |
102 | <input type="file" id="backgroundStyle1" name="backgroundStyle1" placeholder="背景样式" /> | 99 | <input type="file" id="backgroundStyle1" name="backgroundStyle1" placeholder="背景样式" /> |
@@ -129,7 +126,7 @@ | @@ -129,7 +126,7 @@ | ||
129 | <div class="form-group"> | 126 | <div class="form-group"> |
130 | <label class="col-sm-2 control-label">活动说明:</label> | 127 | <label class="col-sm-2 control-label">活动说明:</label> |
131 | <div class="col-sm-8"> | 128 | <div class="col-sm-8"> |
132 | - <input type="text" id="activityDesc" placeholder="请输入链接" class="form-control" value="{{activityDesc}}"> | 129 | + <input type="text" id="activityDesc" placeholder="活动说明" class="form-control" value="{{activityDesc}}"> |
133 | </div> | 130 | </div> |
134 | </div> | 131 | </div> |
135 | 132 |
server/views/pages/goods/netsale-edit.html
0 → 100644
server/views/pages/help/help.html
0 → 100644
1 | +<div class="pageheader"> | ||
2 | + <div class="media"> | ||
3 | + <div class="pageicon pull-left"> | ||
4 | + <i class="fa fa-th-list"></i> | ||
5 | + </div> | ||
6 | + <div class="media-body"> | ||
7 | + <div> | ||
8 | + <div style="width: 30%;float: left;"> | ||
9 | + <h4>帮助分类</h4> | ||
10 | + </div> | ||
11 | + </div> | ||
12 | + </div> | ||
13 | + </div> | ||
14 | +</div> | ||
15 | + | ||
16 | +<div class="contentpanel"> | ||
17 | + <div class="panel panel-default" style="margin-bottom: 10px;"> | ||
18 | + <div class="panel-body"> | ||
19 | + <div class="row"> | ||
20 | + <a class="btn btn-info" id="add-category">添加帮助分类</a> | ||
21 | + </div> | ||
22 | + </div> | ||
23 | + <div id="help_list"></div> | ||
24 | + </div> | ||
25 | +</div> | ||
26 | + | ||
27 | +<script type="text/template" id="template"> | ||
28 | +<div class="rows" id="baseform"> | ||
29 | + <div class="form-group"> | ||
30 | + <label for="category_name_value" class="col-sm-2 control-label">分类名称</label> | ||
31 | + <div class="col-sm-10"> | ||
32 | + <input type="hidden" value="{id}" id="id" /> | ||
33 | + | ||
34 | + <input type="text" value="{name}" id="category" class="form-control" required="required" /> | ||
35 | + <label>注:分类名称必填</label> | ||
36 | + </div> | ||
37 | + </div> | ||
38 | + <div class="form-group"> | ||
39 | + <label for="fir_category_value" class="col-sm-2 control-label">一级分类</label> | ||
40 | + <div class="col-sm-10"> | ||
41 | + <select id="xxx" style="width: 280px;"> | ||
42 | + <option value="volvo">Volvo</option> | ||
43 | + <option value="saab">Saab</option> | ||
44 | + <option value="opel">Opel</option> | ||
45 | + <option value="audi">Audi</option> | ||
46 | + </select> | ||
47 | + </div> | ||
48 | + </div> | ||
49 | + <div class="form-group"> | ||
50 | + <label class="col-sm-2 control-label">品牌风格</label> | ||
51 | + <div class="col-sm-8"> | ||
52 | + <label style="cursor: pointer;"><input type="checkbox" name="paltform" value="运动"> 运动</label> | ||
53 | + <label style="cursor: pointer;"><input type="checkbox" name="paltform" value="户外"> 户外</label> | ||
54 | + <label style="cursor: pointer;"><input type="checkbox" name="paltform" value="街头"> 街头</label> | ||
55 | + <label style="cursor: pointer;"><input type="checkbox" name="paltform" value="暗黑"> 暗黑</label> | ||
56 | + <label style="cursor: pointer;"><input type="checkbox" name="paltform" value="军事"> 军事</label> | ||
57 | + </div> | ||
58 | + <input type="hidden" id="paltform" value="{paltform}" for="checkbox"> | ||
59 | + </div> | ||
60 | + </div> | ||
61 | +</script> |
-
Please register or login to post a comment