Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop
Showing
10 changed files
with
368 additions
and
36 deletions
@@ -159,11 +159,19 @@ if (window.NETSALEDATA) { | @@ -159,11 +159,19 @@ if (window.NETSALEDATA) { | ||
159 | 159 | ||
160 | 160 | ||
161 | { //尺寸信息 | 161 | { //尺寸信息 |
162 | - var sizeInfo = {}; | ||
163 | - if (window.NETSALEDATA.sizeInfo) { | ||
164 | - sizeInfo = window.NETSALEDATA.sizeInfo; | 162 | + var productSkn = window.NETSALEDATA.baseProductInfo.baseProduct.productSkn; |
163 | + if(productSkn) { | ||
164 | + common.util.__ajax({ | ||
165 | + url: '/meterManage/productSize/queryProdSizeList', | ||
166 | + data: { | ||
167 | + productSkn: productSkn | ||
168 | + } | ||
169 | + }, function (res) { | ||
170 | + if (res.data.list && res.data.list.length > 0) { | ||
171 | + $("#body").html(common.util.__template2($("#sizeinfo-template").html(), res.data.list[0])); | ||
172 | + } | ||
173 | + }, true); | ||
165 | } | 174 | } |
166 | - $("#body").html(common.util.__template2($("#sizeifo-template").html(), sizeInfo)); | ||
167 | } | 175 | } |
168 | 176 | ||
169 | 177 |
client/js/operations/normalAppSuggest.js
0 → 100644
1 | +/** | ||
2 | + * Created by ty on 2016/3/28. | ||
3 | + * APP意见反馈管理 | ||
4 | + */ | ||
5 | +var $ = require('jquery'), | ||
6 | + common = require('../common/common'), | ||
7 | + util = require('../common/util'); | ||
8 | + | ||
9 | +new common.edit("#filter").init(); | ||
10 | +new common.dropDown({el: "#isHot-filter"}); | ||
11 | +new common.dropDown({el: "#status-filter"}); | ||
12 | +new common.dropDown({el: "#source-filter"}); | ||
13 | +new common.dropDown({el: "#version-filter"}); | ||
14 | +new common.dropDown({el: "#clientType-filter"}); | ||
15 | +new common.dropDown({el: "#clientType-filter"}); | ||
16 | + | ||
17 | +var ENUM = { | ||
18 | + status: {all: '全部', noReply: '未回复', replied: '已回复'},//全部 | ||
19 | + tips: {"all": 0, "noReply": 0, "replied": 0}, | ||
20 | + statusStr: { | ||
21 | + 0: '未回复', | ||
22 | + 1: '已回复' | ||
23 | + } | ||
24 | +} | ||
25 | + | ||
26 | +var t = new common.tab({ | ||
27 | + el: "#basicTab", | ||
28 | + click: function () { | ||
29 | + g.init('/suggest/getSuggestList'); | ||
30 | + | ||
31 | + }, | ||
32 | + columns: [ | ||
33 | + {name: "all", display: "全部({all})"}, | ||
34 | + {name: "noReply", display: "未回复({noReply})"}, | ||
35 | + {name: "replied", display: "已回复({replied})"} | ||
36 | + ] | ||
37 | +}).init(ENUM.tips); | ||
38 | + | ||
39 | +// tab初始化 | ||
40 | +var loadTab = function () { | ||
41 | + t.active = undefined; | ||
42 | + setTimeout(function () { | ||
43 | + common.util.__ajax({ | ||
44 | + url: "/base/goods/ajax/auditCount", | ||
45 | + data: g.options.parms() | ||
46 | + }, function (res) { | ||
47 | + var __dt = $.extend({}, ENUM.tips, res.data); | ||
48 | + t.init(__dt); | ||
49 | + }, true); | ||
50 | + }, 400); | ||
51 | +} | ||
52 | + | ||
53 | +loadTab(); | ||
54 | + | ||
55 | +var g = new common.grid({ | ||
56 | + el: "#basicTable", | ||
57 | + parms: function () { | ||
58 | + return { | ||
59 | + uid: common.util.__input('uid-filter'), | ||
60 | + status: common.util.__input('status-filter'), | ||
61 | + clientType: common.util.__input('clientType-filter'), | ||
62 | + startTime: common.util.__input('startTime'), | ||
63 | + endTime: common.util.__input('endTime'), | ||
64 | + isHot: common.util.__input('isHot-filter'), | ||
65 | + appVersion: common.util.__input('appVersion-filter') | ||
66 | + }; | ||
67 | + }, | ||
68 | + columns: [ | ||
69 | + {display: " ", type:"checkbox"}, | ||
70 | + {display: "UID", name: "uid"}, | ||
71 | + {display: "来源", name: "clientType", width: "56px"}, | ||
72 | + {display: "版本号", name: "appVersion", width:"56px"}, | ||
73 | + {display: "图片", name: "", render: function(item) { | ||
74 | + if(item.imageUrl) { | ||
75 | + return '<img src="' + item.imageUrl + '" height="70px" width="100px" />'; | ||
76 | + } | ||
77 | + }}, | ||
78 | + {display: "反馈内容", name: "content", width:"20%"}, | ||
79 | + {display: "回复内容", name: "replyContent", width:"20%"}, | ||
80 | + {display: "时间", name: "createTime", width:"88px;"}, | ||
81 | + {display: "发送状态", name: "", width:"70px;",render: function(item) { | ||
82 | + if (item.status == "0") { | ||
83 | + return "未发送"; | ||
84 | + } else if (item.status == "1") { | ||
85 | + return "未发送"; | ||
86 | + } else if (item.status == "2") { | ||
87 | + return "已发送"; | ||
88 | + } | ||
89 | + }}, | ||
90 | + {display: "状态",name: "", width:"56px;",render: function(item) { | ||
91 | + if (item.status == "0") { | ||
92 | + return "未回复"; | ||
93 | + } else if (item.status == "1") { | ||
94 | + return "已回复"; | ||
95 | + } else if (item.status == "2") { | ||
96 | + return "已回复"; | ||
97 | + } | ||
98 | + }}, | ||
99 | + { | ||
100 | + display: "操作",name: "", width:"156px;", render: function (item) { | ||
101 | + var replyDisabled = item.status < 2 ? "" : "disabled"; | ||
102 | + var sendDisabled = item.status == 1 ? "" : "disabled"; | ||
103 | + var isHotDisabled = item.isHot == 0 ? "" : "disabled"; | ||
104 | + var arr = []; | ||
105 | + arr.push('<button '+ replyDisabled + ' class="btn btn-primary btn-xs replyBtn" data-index="'+ item.__index +'">回</button>'); | ||
106 | + arr.push('<button '+ sendDisabled + ' class="btn btn-success btn-xs sendBtn" data-index="'+ item.__index +'">发</button>'); | ||
107 | + if(isHotDisabled) { | ||
108 | + arr.push('<button ' + isHotDisabled + ' class="btn btn-warning btn-xs hotBtn" data-index="' + item.__index + '">热</button>'); | ||
109 | + } else { | ||
110 | + arr.push('<button ' + isHotDisabled + ' class="btn btn-danger btn-xs hotBtn" data-index="' + item.__index + '">热</button>'); | ||
111 | + } | ||
112 | + arr.push('<button class="btn btn-inverse btn-xs delBtn" data-index="'+ item.__index +'">删</button>'); | ||
113 | + return arr.join(""); | ||
114 | + } | ||
115 | + } | ||
116 | + ] | ||
117 | + | ||
118 | +}); | ||
119 | + | ||
120 | +g.init("/suggest/getSuggestList"); | ||
121 | +console.log(g); | ||
122 | + | ||
123 | +var Bll = { | ||
124 | + toast:function(url, item, hint) { | ||
125 | + var e = new common.edit("#base-form"); | ||
126 | + | ||
127 | + common.dialog.confirm(hint, | ||
128 | + common.util.__template2($("#reply-template").html(), item), | ||
129 | + function() { | ||
130 | + e.submit(url, function (option) { | ||
131 | + option.success=function(res) { | ||
132 | + if(res.data.code == 200) { | ||
133 | + util.__tip(res.data.message, "success"); | ||
134 | + } else { | ||
135 | + util.__tip(res.data.message); | ||
136 | + } | ||
137 | + g.reload(); | ||
138 | + }; | ||
139 | + option.error=function(res){ | ||
140 | + util.__tip(res.data.message); | ||
141 | + }; | ||
142 | + }); | ||
143 | + }); | ||
144 | + e.init(); | ||
145 | + } | ||
146 | +}; | ||
147 | + | ||
148 | +//设置回复 | ||
149 | +$(document).on('click', '.replyBtn', function() { | ||
150 | + var item = g.rows[$(this).data("index")]; | ||
151 | + Bll.toast("/suggest/replySuggest", item, "回答反馈内容"); | ||
152 | +}); | ||
153 | + | ||
154 | +//设置热门 | ||
155 | +$(document).on('click', '.hotBtn', function() { | ||
156 | + var item = g.rows[$(this).data("index")]; | ||
157 | + common.util.__ajax({ | ||
158 | + url: '/suggest/setHotSuggest', | ||
159 | + data: { | ||
160 | + id: item.id, | ||
161 | + isHot: 1//只能设置热门 | ||
162 | + } | ||
163 | + },function() { | ||
164 | + g.reload(); | ||
165 | + },true); | ||
166 | +}); | ||
167 | + | ||
168 | +//发送回复 | ||
169 | +$(document).on('click', '.sendBtn',function() { | ||
170 | + var item = g.rows[$(this).data("index")]; | ||
171 | + common.dialog.confirm("发送确认","是否确认发送?",function() { | ||
172 | + common.util.__ajax({ | ||
173 | + url: '/suggest/publishSuggest', | ||
174 | + data: { | ||
175 | + id: item.id | ||
176 | + } | ||
177 | + },function() { | ||
178 | + g.reload(); | ||
179 | + }); | ||
180 | + }); | ||
181 | +}); | ||
182 | + | ||
183 | +//删除一条记录 | ||
184 | +$(document).on('click', '.delBtn',function() { | ||
185 | + var item = g.rows[$(this).data("index")]; | ||
186 | + common.dialog.confirm("删除确认","是否确认删除?",function() { | ||
187 | + common.util.__ajax({ | ||
188 | + url: '/suggest/deleteSuggest', | ||
189 | + data: { | ||
190 | + id: item.id | ||
191 | + } | ||
192 | + },function() { | ||
193 | + g.reload(); | ||
194 | + }); | ||
195 | + }); | ||
196 | +}); | ||
197 | + | ||
198 | +$(document).on('click', '#filter-btn', function() { | ||
199 | + g.reload(1); | ||
200 | + loadTab(); | ||
201 | +}); |
@@ -8,7 +8,7 @@ exports.domain = "http://172.16.6.127:8088/platform"; | @@ -8,7 +8,7 @@ exports.domain = "http://172.16.6.127:8088/platform"; | ||
8 | 8 | ||
9 | exports.res = [ | 9 | exports.res = [ |
10 | {//入口信息管理界面 | 10 | {//入口信息管理界面 |
11 | - route:'/operations/entrance/index1232131', | 11 | + route:'/operations/entrance/index1', |
12 | method: 'GET', | 12 | method: 'GET', |
13 | view: 'pages/product/entrance', | 13 | view: 'pages/product/entrance', |
14 | src: '/product/entrance' | 14 | src: '/product/entrance' |
@@ -2,8 +2,8 @@ | @@ -2,8 +2,8 @@ | ||
2 | * Created by JiangMin on 2016/3/22. | 2 | * Created by JiangMin on 2016/3/22. |
3 | * 测量尺码管理 | 3 | * 测量尺码管理 |
4 | */ | 4 | */ |
5 | -//exports.domain = require('../config/common.js').domain; | ||
6 | -exports.domain = 'http://172.16.6.162:8088/platform'; //李建 | 5 | +exports.domain = require('../config/common.js').domain; |
6 | +//exports.domain = 'http://172.16.6.162:8088/platform'; //李建 | ||
7 | //exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境 | 7 | //exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境 |
8 | 8 | ||
9 | exports.res = [ | 9 | exports.res = [ |
@@ -8,9 +8,63 @@ exports.domain = "http://172.16.6.127:8088/platform"; | @@ -8,9 +8,63 @@ exports.domain = "http://172.16.6.127:8088/platform"; | ||
8 | 8 | ||
9 | exports.res = [ | 9 | exports.res = [ |
10 | { | 10 | { |
11 | - route:'/suggest/suggest/index123214', | 11 | + route:'/suggest/suggest/index1', |
12 | method: 'GET', | 12 | method: 'GET', |
13 | view: 'pages/operations/normalAppSuggest', | 13 | view: 'pages/operations/normalAppSuggest', |
14 | - src: '/operations/versionManage' | 14 | + src: '/operations/normalAppSuggest' |
15 | + }, | ||
16 | + { | ||
17 | + route:'/suggest/getSuggestList', | ||
18 | + method:'POST', | ||
19 | + url:'/suggest/suggest/getSuggestList', | ||
20 | + params:[ | ||
21 | + {name: 'page', type: 'number'}, | ||
22 | + {name: 'uid', type: 'string'}, | ||
23 | + {name: 'startTime', type: 'string'}, | ||
24 | + {name: 'endTime', type: 'string'}, | ||
25 | + {name: 'isHot', type: 'string'}, | ||
26 | + {name: 'status', type: 'string'}, | ||
27 | + {name: 'clientType', type: 'string'}, | ||
28 | + {name: 'appVersion', type: 'string'} | ||
29 | + ] | ||
30 | + }, | ||
31 | + { | ||
32 | + route:'/suggest/replySuggest', | ||
33 | + method:'POST', | ||
34 | + url:'/suggest/suggest/replySuggest', | ||
35 | + params:[ | ||
36 | + {name: 'id', type: 'string'}, | ||
37 | + {name: 'replyContent', type: 'string'} | ||
38 | + ] | ||
39 | + }, | ||
40 | + { | ||
41 | + route:'/suggest/setHotSuggest', | ||
42 | + method:'POST', | ||
43 | + url:'/suggest/suggest/setHotSuggest', | ||
44 | + params:[ | ||
45 | + {name: 'id', type: 'string'}, | ||
46 | + {name: 'isHot', type: 'number'} | ||
47 | + ] | ||
48 | + }, | ||
49 | + { | ||
50 | + route:'/suggest/publishSuggest', | ||
51 | + method:'POST', | ||
52 | + url:'/suggest/suggest/publishSuggest', | ||
53 | + params:[ | ||
54 | + {name: 'id', type: 'string'} | ||
55 | + ] | ||
56 | + }, | ||
57 | + { | ||
58 | + route:'/suggest/deleteSuggest', | ||
59 | + method:'POST', | ||
60 | + url:'/suggest/suggest/deleteSuggest', | ||
61 | + params:[ | ||
62 | + {name: 'id', type: 'string'} | ||
63 | + ] | ||
64 | + }, | ||
65 | + { | ||
66 | + route:'/suggest/getAllAppVersions', | ||
67 | + method:'POST', | ||
68 | + url:'/suggest/suggest/getAllAppVersions' | ||
15 | } | 69 | } |
16 | ]; | 70 | ]; |
@@ -8,7 +8,7 @@ exports.domain = "http://172.16.6.127:8088/platform"; | @@ -8,7 +8,7 @@ exports.domain = "http://172.16.6.127:8088/platform"; | ||
8 | 8 | ||
9 | exports.res = [ | 9 | exports.res = [ |
10 | { | 10 | { |
11 | - route:'/operations/version/index123213', | 11 | + route:'/operations/version/index1', |
12 | method: 'GET', | 12 | method: 'GET', |
13 | view: 'pages/operations/versionManage', | 13 | view: 'pages/operations/versionManage', |
14 | src: '/operations/versionManage' | 14 | src: '/operations/versionManage' |
@@ -70,6 +70,7 @@ | @@ -70,6 +70,7 @@ | ||
70 | <thead> | 70 | <thead> |
71 | <tr> | 71 | <tr> |
72 | <td>尺码</td> | 72 | <td>尺码</td> |
73 | + <td>参考尺码([[genderName]])</td> | ||
73 | [[each sizeRelationsList[0].prdSizeAttributeBoList as item index]] | 74 | [[each sizeRelationsList[0].prdSizeAttributeBoList as item index]] |
74 | <td>[[item.sizeAttributeName]]</td> | 75 | <td>[[item.sizeAttributeName]]</td> |
75 | [[/each]] | 76 | [[/each]] |
@@ -80,6 +81,7 @@ | @@ -80,6 +81,7 @@ | ||
80 | [[each sizeRelationsList as item index]] | 81 | [[each sizeRelationsList as item index]] |
81 | <tr> | 82 | <tr> |
82 | <td>[[item.sizeName]]</td> | 83 | <td>[[item.sizeName]]</td> |
84 | + <td>[[item.referenceName?item.referenceName:""]]</td> | ||
83 | [[each item.prdSizeAttributeBoList as item1 index1]] | 85 | [[each item.prdSizeAttributeBoList as item1 index1]] |
84 | <td>[[item1.sizeValue]]</td> | 86 | <td>[[item1.sizeValue]]</td> |
85 | [[/each]] | 87 | [[/each]] |
@@ -17,4 +17,73 @@ | @@ -17,4 +17,73 @@ | ||
17 | </div> | 17 | </div> |
18 | </div> | 18 | </div> |
19 | </div> | 19 | </div> |
20 | -</div> | ||
20 | +</div> | ||
21 | + | ||
22 | +<div class="contentpanel"> | ||
23 | + <div class="panel panel-default" style="..."> | ||
24 | + <div class="panel-body"> | ||
25 | + <div class="row" id="filter"> | ||
26 | + <div class="panel-col"> | ||
27 | + <input type="text" value="" name="userId" id="uid-filter" placeholder="UID" class="form-control"> | ||
28 | + </div> | ||
29 | + <div class="panel-col"> | ||
30 | + <input type="text" id="startTime" jsaction="time:end:endTime" class="form-control panel-input hasDatepicker " name="start_time" placeholder="开始时间"/> | ||
31 | + </div> | ||
32 | + <div class="panel-col"> | ||
33 | + <input type="text" id="endTime" jsaction="time:start:startTime" class="form-control panel-input hasDatepicker" name="end_time" placeholder="结束时间"/> | ||
34 | + </div> | ||
35 | + <div class="panel-col"> | ||
36 | + <select name="isHot" id="isHot-filter" tabindex="-1" title="" class="form-control"> | ||
37 | + <option value="">是否热门</option> | ||
38 | + <option value="0">不热门</option> | ||
39 | + <option value="1">热门</option> | ||
40 | + </select> | ||
41 | + </div> | ||
42 | + <div class="panel-col"> | ||
43 | + <select name="status" id="status-filter" tabindex="-1" title="" class="form-control"> | ||
44 | + <option value="">选择状态</option> | ||
45 | + <option value="0">未回复</option> | ||
46 | + <option value="1">已回复</option> | ||
47 | + <option value="2">已发送</option> | ||
48 | + </select> | ||
49 | + </div> | ||
50 | + <div class="panel-col"> | ||
51 | + <select name="clientType" id="clientType-filter" tabindex="-1" title="" class="form-control"> | ||
52 | + <option value="">选择来源</option> | ||
53 | + <option value="iPhone">iPhone</option> | ||
54 | + <option value="Android">Android</option> | ||
55 | + </select> | ||
56 | + </div> | ||
57 | + <div class="panel-col"> | ||
58 | + <select name="appVersion" id="appVersion-filter" tabindex="-1" title="" class="form-control"> | ||
59 | + <option value="">选择版本号</option> | ||
60 | + <option value="N">未测量</option> | ||
61 | + <option value="Y">已测量</option> | ||
62 | + </select> | ||
63 | + </div> | ||
64 | + | ||
65 | + <div class="panel-col"> | ||
66 | + <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> | ||
67 | + <a id="filter-all" href="/suggest/suggest/index1" class="btn btn-info">全部</a> | ||
68 | + </div> | ||
69 | + | ||
70 | + </div> | ||
71 | + </div> | ||
72 | + </div> | ||
73 | + <div class="panel-body nopadding"> | ||
74 | + <div class="dataTab_wrapper" id="basicTab"></div> | ||
75 | + <div class="dataTables_wrapper no-footer" id="basicTable"></div> | ||
76 | + </div> | ||
77 | +</div> | ||
78 | + | ||
79 | +<script type="text/template" id="reply-template"> | ||
80 | + <div class="row" id="base-form"> | ||
81 | + <div class="form-group"> | ||
82 | + <label class="col-sm-2 control-label">回复内容</label> | ||
83 | + <div class="col-sm-10"> | ||
84 | + <input type="hidden" id="id" value="[[id]]" /> | ||
85 | + <textarea id="replyContent" class="form-control" rows="6" style="height: 90px;">[[replyContent]]</textarea> | ||
86 | + </div> | ||
87 | + </div><!-- form-group --> | ||
88 | + </div> | ||
89 | +</script> |
@@ -10,32 +10,30 @@ | @@ -10,32 +10,30 @@ | ||
10 | 10 | ||
11 | </div> | 11 | </div> |
12 | </div> | 12 | </div> |
13 | -<script type="text/template" id="sizeifo-template"> | ||
14 | -<table style="table-layout:fixed " class="table table-striped table-bordered responsive dataTable no-footer"> | ||
15 | - <thead> | ||
16 | - <tr> | ||
17 | - <td>参考尺码</td> | ||
18 | - [[each sizeAttributeBos as item index]] | ||
19 | - <td>[[item.attributeName]]</td> | ||
20 | - [[/each]] | ||
21 | - </tr> | ||
22 | - </thead> | 13 | +<script type="text/template" id="sizeinfo-template"> |
14 | + [[if sizeRelationsList && sizeRelationsList.length > 0]] | ||
15 | + <table class="table table-striped table-hover table-bordered responsive dataTable no-footer"> | ||
16 | + <thead> | ||
17 | + <tr> | ||
18 | + <td>尺码</td> | ||
19 | + <td>参考尺码([[genderName]])</td> | ||
20 | + [[each sizeRelationsList[0].prdSizeAttributeBoList as item index]] | ||
21 | + <td>[[item.sizeAttributeName]]</td> | ||
22 | + [[/each]] | ||
23 | + </tr> | ||
24 | + </thead> | ||
23 | 25 | ||
24 | - <tbody> | 26 | + <tbody> |
27 | + [[each sizeRelationsList as item index]] | ||
25 | <tr> | 28 | <tr> |
26 | - <td> | ||
27 | - [[each sizeBoList as item index]] | ||
28 | - <def>[[item.sizeName]]</def> | ||
29 | - [[each item.sortAttributes as item1 index1]] | ||
30 | - <def>[[item1.sizeValue]]</def>/ | ||
31 | - [[/each]] | ||
32 | - <br> | ||
33 | - [[/each]] | ||
34 | - </td> | ||
35 | - [[each sizeAttributeBos as item index]] | ||
36 | - <td>[[item.id]]</td> | 29 | + <td>[[item.sizeName]]</td> |
30 | + <td>[[item.referenceName?item.referenceName:""]]</td> | ||
31 | + [[each item.prdSizeAttributeBoList as item1 index1]] | ||
32 | + <td>[[item1.sizeValue]]</td> | ||
37 | [[/each]] | 33 | [[/each]] |
38 | </tr> | 34 | </tr> |
39 | - </tbody> | ||
40 | -</table> | 35 | + [[/each]] |
36 | + </tbody> | ||
37 | + </table> | ||
38 | + [[/if]] | ||
41 | </script> | 39 | </script> |
-
Please register or login to post a comment