Showing
6 changed files
with
57 additions
and
10 deletions
@@ -133,11 +133,11 @@ $("#all-btn").click(function() { | @@ -133,11 +133,11 @@ $("#all-btn").click(function() { | ||
133 | 133 | ||
134 | //批量导入按钮点击事件 | 134 | //批量导入按钮点击事件 |
135 | $('#import-btn').on('click', function() { | 135 | $('#import-btn').on('click', function() { |
136 | - /*if ($('#basicTable').css('display') == 'none') { | 136 | + if ($('#basicTable').css('display') == 'none') { |
137 | location.reload(); | 137 | location.reload(); |
138 | - }*/ | 138 | + } |
139 | $('#basicTable, .bulk-import').toggle(); | 139 | $('#basicTable, .bulk-import').toggle(); |
140 | - $('.panel-default a').addClass('disabled'); | 140 | + $('.panel-default a').not('#import-btn').addClass('disabled'); |
141 | $('.panel-default input, .panel-default select').attr('disabled', true); | 141 | $('.panel-default input, .panel-default select').attr('disabled', true); |
142 | }); | 142 | }); |
143 | 143 |
@@ -173,7 +173,7 @@ $('#basicTable').on('click', '.modify-btn', function() { | @@ -173,7 +173,7 @@ $('#basicTable').on('click', '.modify-btn', function() { | ||
173 | selectVal = $select.val() - 1, | 173 | selectVal = $select.val() - 1, |
174 | priceArr = []; | 174 | priceArr = []; |
175 | 175 | ||
176 | - priceArr.push([vipPrice * 0.95, vipPrice * 0.9, vipPrice * 0.88]); | 176 | + priceArr.push([price * 0.95, price * 0.9, price * 0.88]); |
177 | priceArr.push([price * 0.95, price * 0.95, price * 0.95]); | 177 | priceArr.push([price * 0.95, price * 0.95, price * 0.95]); |
178 | priceArr.push([price, price, price]); | 178 | priceArr.push([price, price, price]); |
179 | priceArr.push([$vipPrice.val(), $vipPrice.val(), $vipPrice.val()]); | 179 | priceArr.push([$vipPrice.val(), $vipPrice.val(), $vipPrice.val()]); |
@@ -244,8 +244,11 @@ $("#all-btn").click(function() { | @@ -244,8 +244,11 @@ $("#all-btn").click(function() { | ||
244 | 244 | ||
245 | //批量导入按钮点击事件 | 245 | //批量导入按钮点击事件 |
246 | $('#import-btn').on('click', function() { | 246 | $('#import-btn').on('click', function() { |
247 | + if ($('#basicTable').css('display') == 'none') { | ||
248 | + location.reload(); | ||
249 | + } | ||
247 | $('#basicTable, .bulk-import').toggle(); | 250 | $('#basicTable, .bulk-import').toggle(); |
248 | - $('.panel-default a').addClass('disabled'); | 251 | + $('.panel-default a').not('#import-btn').addClass('disabled'); |
249 | $('.panel-default input, .panel-default select').attr('disabled', true); | 252 | $('.panel-default input, .panel-default select').attr('disabled', true); |
250 | }); | 253 | }); |
251 | 254 |
@@ -76,6 +76,9 @@ var tableGird = new common.grid({ | @@ -76,6 +76,9 @@ var tableGird = new common.grid({ | ||
76 | return obj; | 76 | return obj; |
77 | }, | 77 | }, |
78 | columns: [{ | 78 | columns: [{ |
79 | + display: "", | ||
80 | + type: 'checkbox' | ||
81 | + }, { | ||
79 | display: "名称", | 82 | display: "名称", |
80 | name: "productName" | 83 | name: "productName" |
81 | }, { | 84 | }, { |
@@ -193,11 +196,39 @@ var loadtab = function() { | @@ -193,11 +196,39 @@ var loadtab = function() { | ||
193 | } | 196 | } |
194 | 197 | ||
195 | loadtab(); | 198 | loadtab(); |
199 | + | ||
200 | +//筛选 | ||
196 | $("#filter-btn").click(function() { | 201 | $("#filter-btn").click(function() { |
197 | loadtab(); | 202 | loadtab(); |
198 | - tableGird.reload(); | 203 | + tableGird.reload(1); |
199 | }); | 204 | }); |
200 | 205 | ||
206 | +//导出 | ||
207 | +$('#export-btn').on('click', function() { | ||
208 | + var selectedArr = tableGird.selected, | ||
209 | + len = selectedArr.length, | ||
210 | + queryConf = ''; | ||
211 | + if (len <= 0) { | ||
212 | + common.util.__tip('请选择要导出的商品', 'warning'); | ||
213 | + return; | ||
214 | + } | ||
215 | + $.each(selectedArr, function(i, value) { | ||
216 | + queryConf += value['limitProductCode']; | ||
217 | + if (i < len - 1) { | ||
218 | + queryConf += '|'; | ||
219 | + } | ||
220 | + }); | ||
221 | + | ||
222 | + common.util.__ajax({ | ||
223 | + url: '/limit/batch/export', | ||
224 | + data: { | ||
225 | + queryConf: queryConf, | ||
226 | + type: 'limitProductReminder' | ||
227 | + } | ||
228 | + }, function(res) { | ||
229 | + console.log(res); | ||
230 | + }) | ||
231 | +}); | ||
201 | 232 | ||
202 | //开启商品 | 233 | //开启商品 |
203 | $('#limit-table-box').on('click', '.open-btn', function() { | 234 | $('#limit-table-box').on('click', '.open-btn', function() { |
1 | exports.domain = require('../config/common.js').domain; | 1 | exports.domain = require('../config/common.js').domain; |
2 | //exports.domain = 'http://172.16.6.240:8088/platform'; | 2 | //exports.domain = 'http://172.16.6.240:8088/platform'; |
3 | +//exports.domain = 'http://172.16.6.182:8080/yohobuy-platform-web'; //曹燕 | ||
3 | 4 | ||
4 | //路由配置 | 5 | //路由配置 |
5 | exports.res = [{ | 6 | exports.res = [{ |
@@ -195,4 +196,15 @@ exports.res = [{ | @@ -195,4 +196,15 @@ exports.res = [{ | ||
195 | name: 'id', | 196 | name: 'id', |
196 | type: 'Number' | 197 | type: 'Number' |
197 | }] | 198 | }] |
199 | +}, { | ||
200 | + route: '/limit/batch/export', | ||
201 | + method: 'POST', | ||
202 | + url: '/batch/export', | ||
203 | + params: [{ | ||
204 | + name: 'queryConf', | ||
205 | + type: 'String' | ||
206 | + }, { | ||
207 | + name: 'type', | ||
208 | + type: 'String' | ||
209 | + }] | ||
198 | }]; | 210 | }]; |
@@ -87,13 +87,13 @@ | @@ -87,13 +87,13 @@ | ||
87 | <input type="hidden" value="{{hotFlag}}" id="hotFlag" for="radio"> | 87 | <input type="hidden" value="{{hotFlag}}" id="hotFlag" for="radio"> |
88 | </div> | 88 | </div> |
89 | <div class="col-md-3 height60"> | 89 | <div class="col-md-3 height60"> |
90 | - <label>热门发售排序:</label> | ||
91 | - <label><input id="orderBy" value="{{orderBy}}" type="text" class="form-control" placeholder=""></label> | 90 | + <label>热门发售排序<span class="red">*</span>:</label> |
91 | + <label><input id="orderBy" value="{{orderBy}}" type="text" class="form-control" placeholder="热门发售排序" placeholder="" required></label> | ||
92 | <p>(提示:数字越大越靠前)</p> | 92 | <p>(提示:数字越大越靠前)</p> |
93 | </div> | 93 | </div> |
94 | <div class="col-md-3"> | 94 | <div class="col-md-3"> |
95 | <label>未发售排序:</label> | 95 | <label>未发售排序:</label> |
96 | - <label><input id="notSaleOrderBy" value="{{notSaleOrderBy}}" type="text" class="form-control" placeholder=""></label> | 96 | + <label><input id="notSaleOrderBy" value="{{notSaleOrderBy}}" placeholder="未发售排序" type="text" class="form-control" placeholder=""></label> |
97 | </div> | 97 | </div> |
98 | </div> | 98 | </div> |
99 | </div> | 99 | </div> |
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <div class="media-body"> | 6 | <div class="media-body"> |
7 | <ul class="breadcrumb"> | 7 | <ul class="breadcrumb"> |
8 | <li><a href="#"><i class="glyphicon glyphicon-home"></i></a></li> | 8 | <li><a href="#"><i class="glyphicon glyphicon-home"></i></a></li> |
9 | - <li><a href="#">限购商品管理</a></li> | 9 | + <li><a href="#">运营管理</a></li> |
10 | <li>限购商品管理</li> | 10 | <li>限购商品管理</li> |
11 | </ul> | 11 | </ul> |
12 | <h4>限购商品管理</h4> | 12 | <h4>限购商品管理</h4> |
@@ -51,6 +51,7 @@ | @@ -51,6 +51,7 @@ | ||
51 | </div> --> | 51 | </div> --> |
52 | <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> | 52 | <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> |
53 | <a id="all-btn" href="" class="btn btn-info">全部</a> | 53 | <a id="all-btn" href="" class="btn btn-info">全部</a> |
54 | + <a id="export-btn" href="javascript:;" class="btn btn-info">导出</a> | ||
54 | </div> | 55 | </div> |
55 | </div> | 56 | </div> |
56 | </div> | 57 | </div> |
-
Please register or login to post a comment