Showing
6 changed files
with
209 additions
and
3 deletions
client/js/basegoods/basebatch.js
0 → 100644
1 | +'use strict'; | ||
2 | +var $ = require('jquery'), | ||
3 | + common = require('../common/common'); | ||
4 | + | ||
5 | +$('input[type="file"]').after('<div class="file-name btn btn-default">请选择文件</div>'); | ||
6 | + | ||
7 | +function batchExport(el, type) { | ||
8 | + var loadModal = null; | ||
9 | + | ||
10 | + return { | ||
11 | + params: { | ||
12 | + type: type, | ||
13 | + __type: "batch-import" | ||
14 | + }, | ||
15 | + onStart: function() { | ||
16 | + loadModal = common.dialog.load(); | ||
17 | + | ||
18 | + $(el).parents('td').find('.file-name').text($(el).val().replace("C:\\fakepath\\", "")); | ||
19 | + }, | ||
20 | + onComplete: function(response) { | ||
21 | + console.log(response); | ||
22 | + if (loadModal) { | ||
23 | + loadModal.close(); | ||
24 | + } | ||
25 | + if (response.code == 200) { | ||
26 | + common.util.__tip(response.message, 'success'); | ||
27 | + } else { | ||
28 | + common.util.__tip(response.message, 'warning'); | ||
29 | + } | ||
30 | + } | ||
31 | + } | ||
32 | +} | ||
33 | + | ||
34 | +common.edit.ajaxfileupload('#sort-file', batchExport('#sort-file', 'searchSort')); | ||
35 | +common.edit.ajaxfileupload('#brand-file', batchExport('#brand-file', 'brandProperty')); |
client/js/basegoods/batch.js
0 → 100644
1 | +'use strict'; | ||
2 | +var $ = require('jquery'), | ||
3 | + common = require('../common/common'); | ||
4 | + | ||
5 | +$('input[type="file"]').after('<div class="file-name btn btn-default">请选择文件</div>'); | ||
6 | + | ||
7 | +function batchExport(el, type) { | ||
8 | + var loadModal = null; | ||
9 | + | ||
10 | + return { | ||
11 | + params: { | ||
12 | + type: type, | ||
13 | + __type: "batch-import" | ||
14 | + }, | ||
15 | + onStart: function() { | ||
16 | + loadModal = common.dialog.load(); | ||
17 | + | ||
18 | + $(el).parents('td').find('.file-name').text($(el).val().replace("C:\\fakepath\\", "")); | ||
19 | + }, | ||
20 | + onComplete: function(response) { | ||
21 | + console.log(response); | ||
22 | + if (loadModal) { | ||
23 | + loadModal.close(); | ||
24 | + } | ||
25 | + if (response.code == 200) { | ||
26 | + common.util.__tip(response.message, 'success'); | ||
27 | + } else { | ||
28 | + common.util.__tip(response.message, 'warning'); | ||
29 | + } | ||
30 | + } | ||
31 | + } | ||
32 | +} | ||
33 | + | ||
34 | +common.edit.ajaxfileupload('#sort-file', batchExport('#sort-file', 'searchSort')); | ||
35 | +common.edit.ajaxfileupload('#brand-file', batchExport('#brand-file', 'brandProperty')); |
@@ -18,8 +18,8 @@ var config = { | @@ -18,8 +18,8 @@ var config = { | ||
18 | // domain: 'http://172.16.6.252:9080',//陈超 | 18 | // domain: 'http://172.16.6.252:9080',//陈超 |
19 | //domain: 'http://172.16.6.227:8088/platform', //玛丽 | 19 | //domain: 'http://172.16.6.227:8088/platform', //玛丽 |
20 | // domain: 'http://192.168.102.202:8088/platform', | 20 | // domain: 'http://192.168.102.202:8088/platform', |
21 | - domain:'http://172.16.9.8:8080/yohobuy-platform-web',//葛超 | ||
22 | - // domain: 'http://192.168.102.202:8088/platform', | 21 | + // domain:'http://172.16.9.8:8080/yohobuy-platform-web',//葛超 |
22 | + domain: 'http://192.168.102.202:8088/platform', | ||
23 | loggers: { | 23 | loggers: { |
24 | api: { | 24 | api: { |
25 | level: 'verbose', | 25 | level: 'verbose', |
@@ -287,5 +287,25 @@ exports.res = [ | @@ -287,5 +287,25 @@ exports.res = [ | ||
287 | {name:"brandId",type:"Number"}, | 287 | {name:"brandId",type:"Number"}, |
288 | {name:"sortId",type:"Number"} | 288 | {name:"sortId",type:"Number"} |
289 | ] | 289 | ] |
290 | - } | 290 | + }, |
291 | + { | ||
292 | + route:'/goods/piliang/batch', | ||
293 | + method:'GET', | ||
294 | + view:'pages/basegoods/batch', | ||
295 | + src:'/basegoods/batch', | ||
296 | + data:{ | ||
297 | + pageTitle:"批量功能", | ||
298 | + secondTitle:"基础商品" | ||
299 | + } | ||
300 | + }, | ||
301 | + { | ||
302 | + route:'/goods/base/batch', | ||
303 | + method:'GET', | ||
304 | + view:'pages/basegoods/basebatch', | ||
305 | + src:'/basegoods/basegoods', | ||
306 | + data:{ | ||
307 | + pageTitle:"基础商品导入", | ||
308 | + secondTitle:"基础商品" | ||
309 | + } | ||
310 | + }, | ||
291 | ]; | 311 | ]; |
server/views/pages/basegoods/basebatch.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 | + <ul class="breadcrumb"> | ||
8 | + <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li> | ||
9 | + <li><a href="">商品管理</a></li> | ||
10 | + <li> | ||
11 | + {{# secondTitle}}{{.}}{{/ secondTitle}} | ||
12 | + {{^ secondTitle}}{{pageTitle}}{{/ secondTitle}} | ||
13 | + </li> | ||
14 | + </ul> | ||
15 | + | ||
16 | + <div> | ||
17 | + <div style="width: 30%;float: left;"> | ||
18 | + <h4>{{pageTitle}}</h4> | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + </div> | ||
22 | + </div> | ||
23 | +</div> | ||
24 | + | ||
25 | +<div class="contentpanel"> | ||
26 | + <div class="panel panel-default" style="margin-bottom:10px;"> | ||
27 | + <div class="panel-body"> | ||
28 | + <table class="table table-bordered"> | ||
29 | + <tr> | ||
30 | + <td rowspan="2">基础商品</td> | ||
31 | + <td>上传EXCEL:</td> | ||
32 | + <td style="position: relative;"><input id="sort-file" name="file" data-type="searchSort" type="file" style="cursor: pointer; height: 37px; top: 8px;"></td> | ||
33 | + </tr> | ||
34 | + <tr> | ||
35 | + <td>说明:</td> | ||
36 | + <td colspan="2"> | ||
37 | + 1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br> | ||
38 | + 2、第一行标题栏:<span style="color: #67D267;">货品名称、厂家编号、一级分类、二级分类、三级分类、四级分类、性别、货品年、货品季、吊牌价、销售价、色系、厂家颜色、款型、尺码、条码、能否补货、SKN计数</span><br> | ||
39 | + 3、<a href="{{domain}}/common/searchSort.xlsx">下载样例</a> | ||
40 | + </td> | ||
41 | + </tr> | ||
42 | + <tr> | ||
43 | + <td></td> | ||
44 | + <td> | ||
45 | + <div class="panel-col"> | ||
46 | + <a id="pass-btn" href="javascript:;" class="btn btn-info">上传</a> | ||
47 | + </div> | ||
48 | + </td> | ||
49 | + <td></td> | ||
50 | + </tr> | ||
51 | + </table> | ||
52 | + </div> | ||
53 | + </div> | ||
54 | +</div> | ||
55 | + | ||
56 | +<div class="panel panel-primary-head"> | ||
57 | + <div class="dataTab_wrapper" id="basicTable"></div> | ||
58 | +</div> |
server/views/pages/basegoods/batch.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 | + <ul class="breadcrumb"> | ||
8 | + <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li> | ||
9 | + <li><a href="">商品管理</a></li> | ||
10 | + <li> | ||
11 | + {{# secondTitle}}{{.}}{{/ secondTitle}} | ||
12 | + {{^ secondTitle}}{{pageTitle}}{{/ secondTitle}} | ||
13 | + </li> | ||
14 | + </ul> | ||
15 | + | ||
16 | + <div> | ||
17 | + <div style="width: 30%;float: left;"> | ||
18 | + <h4>{{pageTitle}}</h4> | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + </div> | ||
22 | + </div> | ||
23 | +</div> | ||
24 | + | ||
25 | +<div class="contentpanel"> | ||
26 | + <div class="panel panel-default" style="margin-bottom:10px;"> | ||
27 | + <div class="panel-body"> | ||
28 | + <table class="table table-bordered"> | ||
29 | + <tr> | ||
30 | + <td rowspan="2">补货</td> | ||
31 | + <td>上传EXCEL:</td> | ||
32 | + <td style="position: relative;"><input id="sort-file" name="file" data-type="searchSort" type="file" style="cursor: pointer; height: 37px; top: 8px;"></td> | ||
33 | + </tr> | ||
34 | + <tr> | ||
35 | + <td>说明:</td> | ||
36 | + <td colspan="2"> | ||
37 | + 1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br> | ||
38 | + 2、第一行标题栏:<span style="color: #67D267;">SKU|补货</span><br> | ||
39 | + 3、<a href="{{domain}}/common/searchSort.xlsx">下载样例</a> | ||
40 | + </td> | ||
41 | + </tr> | ||
42 | + <tr> | ||
43 | + <td rowspan="2">奥莱</td> | ||
44 | + <td>上传EXCEL:</td> | ||
45 | + <td style="position: relative;"><input id="brand-file" name="file" data-type="brandProperty" type="file" style="cursor: pointer; height: 37px; top: 8px;"></td> | ||
46 | + </tr> | ||
47 | + <tr> | ||
48 | + <td>说明:</td> | ||
49 | + <td colspan="2"> | ||
50 | + 1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br> | ||
51 | + 2、第一行标题栏:<span style="color: #67D267;">SKU|奥莱</span><br> | ||
52 | + 3、<a href="{{domain}}/common/searchSort.xlsx">下载样例</a> | ||
53 | + </td> | ||
54 | + </tr> | ||
55 | + </table> | ||
56 | + </div> | ||
57 | + </div> | ||
58 | +</div> |
-
Please register or login to post a comment