Showing
6 changed files
with
64 additions
and
6 deletions
@@ -118,7 +118,20 @@ | @@ -118,7 +118,20 @@ | ||
118 | 118 | ||
119 | }, | 119 | }, |
120 | ready() { | 120 | ready() { |
121 | - //this.fetchData2(); | 121 | + this.fetchData1(); |
122 | + this.fetchData2(); | ||
123 | + /* | ||
124 | + this.$broadcast('grid-reload',{ | ||
125 | + type:1, | ||
126 | + reqTime:this.dateFormat(new Date(),"YYYYMMdd"), | ||
127 | + beginTime:"", | ||
128 | + endTime:"", | ||
129 | + productSkn:"", | ||
130 | + productSkc:"", | ||
131 | + productSku:"", | ||
132 | + factoryCode:"", | ||
133 | + sortId:"" | ||
134 | + });*/ | ||
122 | }, | 135 | }, |
123 | methods:{ | 136 | methods:{ |
124 | //获取店铺的经营指标:一个自然日内有效订单商品件数、有效订单商品金额 | 137 | //获取店铺的经营指标:一个自然日内有效订单商品件数、有效订单商品金额 |
@@ -127,6 +140,9 @@ | @@ -127,6 +140,9 @@ | ||
127 | type:"post", | 140 | type:"post", |
128 | url:"/report/getShopBusinessOverview", | 141 | url:"/report/getShopBusinessOverview", |
129 | dataType: 'json', | 142 | dataType: 'json', |
143 | + data: { | ||
144 | + dateId: util.dateFormat(new Date(),"YYYYMMdd") | ||
145 | + }, | ||
130 | success: function(rs) { | 146 | success: function(rs) { |
131 | this.buyNumbers = rs.data.buyNumbers; | 147 | this.buyNumbers = rs.data.buyNumbers; |
132 | this.orderAmount = rs.data.orderAmount; | 148 | this.orderAmount = rs.data.orderAmount; |
@@ -143,6 +159,9 @@ | @@ -143,6 +159,9 @@ | ||
143 | type:"post", | 159 | type:"post", |
144 | url:"/report/getShopBrandRank", | 160 | url:"/report/getShopBrandRank", |
145 | dataType: 'json', | 161 | dataType: 'json', |
162 | + data: { | ||
163 | + dateId: util.dateFormat(new Date(),"YYYYMMdd") | ||
164 | + }, | ||
146 | success: function(rs) { | 165 | success: function(rs) { |
147 | this.rankNow = rs.data.rankNow; | 166 | this.rankNow = rs.data.rankNow; |
148 | this.rankChange = rs.data.rankChange; | 167 | this.rankChange = rs.data.rankChange; |
@@ -7,13 +7,19 @@ module.exports={ | @@ -7,13 +7,19 @@ module.exports={ | ||
7 | getShopBusinessOverview:{ | 7 | getShopBusinessOverview:{ |
8 | title: "获取店铺的经营指标:一个自然日内有效订单商品件数、有效订单商品金额", | 8 | title: "获取店铺的经营指标:一个自然日内有效订单商品件数、有效订单商品金额", |
9 | domain:"{bigdata}", | 9 | domain:"{bigdata}", |
10 | - url: "/bigdata/getShopBusinessOverview" | 10 | + url: "/bigdata/getShopBusinessOverview", |
11 | + params:{ | ||
12 | + dateId:{type:"String"} | ||
13 | + } | ||
11 | }, | 14 | }, |
12 | 15 | ||
13 | getShopBrandRank:{ | 16 | getShopBrandRank:{ |
14 | title: "获取店铺的品牌排名,当前等级、排名、上升名词", | 17 | title: "获取店铺的品牌排名,当前等级、排名、上升名词", |
15 | domain:"{bigdata}", | 18 | domain:"{bigdata}", |
16 | - url: "/bigdata/getShopBrandRank" | 19 | + url: "/bigdata/getShopBrandRank", |
20 | + params:{ | ||
21 | + dateId:{type:"String"} | ||
22 | + } | ||
17 | }, | 23 | }, |
18 | 24 | ||
19 | getOrdersGoodsAccountRptList:{ | 25 | getOrdersGoodsAccountRptList:{ |
@@ -25,7 +25,7 @@ $('#sidebar .nav .has-sub>a').click(function() { | @@ -25,7 +25,7 @@ $('#sidebar .nav .has-sub>a').click(function() { | ||
25 | child.slideUp('fast'); | 25 | child.slideUp('fast'); |
26 | child.parent().removeClass('active'); | 26 | child.parent().removeClass('active'); |
27 | } | 27 | } |
28 | - isMenuShow = true; | 28 | + //isMenuShow = true; |
29 | return false; | 29 | return false; |
30 | }); | 30 | }); |
31 | 31 |
code/static/js.vue/util.js
0 → 100644
1 | +/** | ||
2 | + * Created by yoho on 2016/6/7. | ||
3 | + */ | ||
4 | +var util = { | ||
5 | + dateFormat: function(data, format) { | ||
6 | + if (!isNaN(data)) { | ||
7 | + var date = { | ||
8 | + "M+": data.getMonth() + 1, | ||
9 | + "d+": data.getDate(), | ||
10 | + "h+": data.getHours(), | ||
11 | + "m+": data.getMinutes(), | ||
12 | + "s+": data.getSeconds(), | ||
13 | + "q+": Math.floor((data.getMonth() + 3) / 3), | ||
14 | + "S+": data.getMilliseconds() | ||
15 | + }; | ||
16 | + if (/(y+)/i.test(format)) { | ||
17 | + format = format.replace(RegExp.$1, (data.getFullYear() + '').substr(4 - RegExp.$1.length)); | ||
18 | + } | ||
19 | + for (var k in date) { | ||
20 | + if (new RegExp("(" + k + ")").test(format)) { | ||
21 | + format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? date[k] : ("00" + date[k]).substr(("" + date[k]).length)); | ||
22 | + } | ||
23 | + } | ||
24 | + return format; | ||
25 | + } else { | ||
26 | + return ""; | ||
27 | + } | ||
28 | + } | ||
29 | +} | ||
30 | + | ||
31 | +module.exports= util; |
@@ -12,7 +12,8 @@ module.exports = { | @@ -12,7 +12,8 @@ module.exports = { | ||
12 | alias: { | 12 | alias: { |
13 | jquery: path.resolve(baseName, './jquery.js'), | 13 | jquery: path.resolve(baseName, './jquery.js'), |
14 | vue: path.resolve(baseName, './vue.min.js'), | 14 | vue: path.resolve(baseName, './vue.min.js'), |
15 | - echarts:path.resolve(baseName, './echarts.simple.min.js'), | 15 | + echarts:path.resolve(baseName, './echarts.simple.min.js'), |
16 | + util:path.resolve(baseName, './util.js') | ||
16 | }, | 17 | }, |
17 | extensions: ['', '.js', '.vue', '.scss'] | 18 | extensions: ['', '.js', '.vue', '.scss'] |
18 | }, | 19 | }, |
-
Please register or login to post a comment