report.BusinessOverview.js 28.2 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725
webpackJsonp([1],{

/***/ 0:
/***/ function(module, exports, __webpack_require__) {

	'use strict';

	var Vue = __webpack_require__(74);
	Vue.use(__webpack_require__(119));

	new Vue({
	    el: 'body',
	    components: {
	        app: __webpack_require__(120)
	    }
	});

/***/ },

/***/ 120:
/***/ function(module, exports, __webpack_require__) {

	var __vue_script__, __vue_template__
	__vue_script__ = __webpack_require__(121)
	if (__vue_script__ &&
	    __vue_script__.__esModule &&
	    Object.keys(__vue_script__).length > 1) {
	  console.warn("[vue-loader] apps\\report\\client\\BusinessOverview\\app.vue: named exports in *.vue files are ignored.")}
	__vue_template__ = __webpack_require__(139)
	module.exports = __vue_script__ || {}
	if (module.exports.__esModule) module.exports = module.exports.default
	if (__vue_template__) {
	(typeof module.exports === "function" ? (module.exports.options || (module.exports.options = {})) : module.exports).template = __vue_template__
	}
	if (false) {(function () {  module.hot.accept()
	  var hotAPI = require("vue-hot-reload-api")
	  hotAPI.install(require("vue"), false)
	  if (!hotAPI.compatible) return
	  var id = "_v-33eb7696/app.vue"
	  if (!module.hot.data) {
	    hotAPI.createRecord(id, module.exports)
	  } else {
	    hotAPI.update(id, module.exports, __vue_template__)
	  }
	})()}

/***/ },

/***/ 121:
/***/ function(module, exports, __webpack_require__) {

	'use strict';

	Object.defineProperty(exports, "__esModule", {
	    value: true
	});

	var _util = __webpack_require__(122);

	var _util2 = _interopRequireDefault(_util);

	var _index = __webpack_require__(123);

	var _index2 = _interopRequireDefault(_index);

	var _index3 = __webpack_require__(130);

	var _index4 = _interopRequireDefault(_index3);

	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

	exports.default = {
	    components: {
	        comPageheader: _index2.default,
	        comGrid: _index4.default
	    },
	    data: function data() {
	        return {
	            buyNumbers: '--',
	            orderAmount: '--',
	            rankNow: '--',
	            rankChange: '--',
	            rankLevel: '',
	            rankDate: '',
	            listUpdateTime: '--:--',
	            overViewUpdateTime: '--:--',
	            grid: {
	                url: '/report/getOrdersGoodsRptList',
	                columns: [{ display: '图片', render: function render(item) {
	                        return item.imageUrl ? '<img src="' + item.imageUrl + '?imageView/0/w/78/h/78">' : "";
	                    }
	                }, { display: 'SKN/SKC/SKU', render: function render(item) {
	                        return '<p>SKN:' + item.productSkn + '</p>' + '<p>SKC:' + item.productSkc + '</p>' + '<p>SKU:' + item.productSku + '</p>';
	                    }
	                }, { display: '厂家编号', name: 'factoryCode' }, { display: '商品名称', name: 'goodsName' }, { display: '价格', render: function render(item) {
	                        return '<p>吊牌价:' + item.retailPrice + '</p>' + '<p>销售价:' + item.salesPrice + '</p>';
	                    }
	                }, { display: '颜色/尺码', render: function render(item) {
	                        return [item.colorName, item.sizeName].join('/');
	                    }
	                }, { display: '商品分类', render: function render(item) {
	                        return [item.maxSortName, item.middleSortName, item.smallSortName].join('-');
	                    }
	                }, { display: '数量', name: 'buyNumber' }, { display: '金额', name: 'orderAmount' }]
	            }
	        };
	    },
	    ready: function ready() {
	        this.fetchData1();
	        this.fetchData2();
	        this.$broadcast('grid-reload', {
	            type: 1,
	            reqTime: _util2.default.dateFormat(new Date(), "YYYYMMdd")
	        });
	    },

	    methods: {
	        //获取店铺的经营指标:一个自然日内有效订单商品件数、有效订单商品金额
	        fetchData1: function fetchData1() {
	            var self = this;
	            this.$http.post("/report/getShopBusinessOverview", {
	                dateId: _util2.default.dateFormat(new Date(), "YYYYMMdd")
	            }).then(function (response) {
	                var rs = response.data;
	                self.buyNumbers = rs.data.buyNumbers ? rs.data.buyNumbers : '--';
	                self.orderAmount = rs.data.orderAmount ? rs.data.orderAmount : '--';
	                self.overViewUpdateTime = rs.data.hour ? rs.data.hour.substring(0, 5) : '--:--';
	            });
	        },

	        //获取店铺的品牌排名,当前等级、排名、上升名词
	        fetchData2: function fetchData2() {
	            var self = this;
	            var day = new Date();
	            day.setDate(day.getDate() - 1); //前一天
	            self.rankDate = _util2.default.dateFormat(day, "MM月dd日");

	            this.$http.post("/report/getShopBrandRank", {
	                dateId: _util2.default.dateFormat(day, "YYYYMMdd")
	            }).then(function (response) {
	                var rs = response.data;
	                self.rankNow = rs.data.rankNow ? rs.data.rankNow : '--';
	                self.rankChange = rs.data.rankChange ? rs.data.rankChange : '--';
	                self.rankLevel = rs.data.rankLevel ? rs.data.rankLevel : '';
	            });
	        }
	    },
	    events: {
	        complete: function complete(data) {
	            if (data && data.additionInfo) {
	                this.listUpdateTime = data.additionInfo.hour ? data.additionInfo.hour + ":00" : '--:--';
	            } else {
	                this.listUpdateTime = '--';
	            }
	        }
	    }
	};
	// </script>
	// <template>
	//     <com-pageheader :title="'报表管理'" :sub-title="'经营总览'"></com-pageheader>
	//
	//     <div id="businessIndex">
	//         <div class="overViewTitle">
	//             <h3>经营指标</h3>
	//             <span>展示当日经营指标数据({{overViewUpdateTime}} 更新)</span>
	//         </div>
	//
	//         <div class="overViewContent" style="margin-left: 200px">
	//             <div class="dataModle1">
	//                 <p>有效订单的商品件数</p>
	//                 <h2>{{buyNumbers}}</h2>
	//             </div>
	//             <div class="dataModle1">
	//                 <p>有效订单的商品金额(元)</p>
	//                 <h2>{{orderAmount}}</h2>
	//             </div>
	//             <div class="clearfix"></div>
	//         </div>
	//     </div>
	//
	//     <div id="brandRanking">
	//         <div class="overViewTitle">
	//             <h3>品牌排名</h3>
	//             <span>{{rankDate}}品牌排名</span>
	//         </div>
	//
	//         <div class="overViewContent" style="margin-left: 125px">
	//             <div class="triangleShape">
	//                 <b>当前层级</b>
	//                 <div class="shape triangle-up {{rankLevel==1?'activeShape':''}}">
	//                     <span>前5%</span><i class="triangle-right"></i>
	//                 </div>
	//                 <div class="shape trapezoid-1 {{rankLevel==2?'activeShape':''}}">
	//                     <span>5%~20%</span><i class="triangle-right"></i>
	//                 </div>
	//                 <div class="shape trapezoid-2 {{rankLevel==3?'activeShape':''}}">
	//                     <span>20%~40%</span><i class="triangle-right"></i>
	//                 </div>
	//                 <div class="shape trapezoid-3 {{rankLevel==4?'activeShape':''}}">
	//                     <span>40%~65%</span><i class="triangle-right"></i>
	//                 </div>
	//                 <div class="shape trapezoid-4 {{rankLevel==5?'activeShape':''}}">
	//                     <span>65%~100%</span><i class="triangle-right"></i>
	//                 </div>
	//             </div>
	//
	//             <div class="rankData">
	//                 <div class="dataModle2" style="margin-bottom: 20px">
	//                     <p>同品类中<br>品牌排名为</p>
	//                     <h2>第<b>{{rankNow}}</b>名</h2>
	//                 </div>
	//                 <div class="dataModle2">
	//                     <p>较上周同期</p>
	//                     <h2 class="up" v-show="rankChange > 0"><i>↑</i><b>{{rankChange}}</b> 个名次</h2>
	//                     <h2 class="middle" v-show="rankChange == 0"><i>--</i><b>{{rankChange}}</b> 个名次</h2>
	//                     <h2 class="down" v-show="rankChange < 0"><i>↓</i><b>{{-rankChange}}</b> 个名次</h2>
	//                     <h2 v-show="rankChange=='--'"><b>--</b>个名次</h2>
	//
	//                     <div class="rankTip" v-show="rankChange > 0"><b class="_red">今天业绩不错,继续加油哦!</b></div>
	//                     <div class="rankTip" v-show="rankChange == 0"><b class="_blue">继续加油哦!</b></div>
	//                     <div class="rankTip" v-show="rankChange < 0"><b class="_green">还需再接再厉哦!</b></div>
	//                     <div class="rankTip" v-show="rankChange=='--'"><b class="_red">没数据也要加油哦!</b></div>
	//                 </div>
	//             </div>
	//             <div class="clearfix"></div>
	//         </div>
	//     </div>
	//
	//     <div id="businessDetail">
	//         <div class="overViewTitle">
	//             <h3>交易明细</h3>
	//             <span>展示当日商品交易情况({{listUpdateTime}} 更新)</span>
	//         </div>
	//
	//         <div class="detailList">
	//             <com-grid :columns="grid.columns" :url="grid.url"></com-grid>
	//         </div>
	//     </div>
	// </template>
	//
	// <script>

/***/ },

/***/ 122:
/***/ function(module, exports) {

	"use strict";

	/**
	 * Created by yoho on 2016/6/7.
	 */
	var util = {
	    dateFormat: function dateFormat(data, format) {
	        if (!isNaN(data)) {
	            var date = {
	                "M+": data.getMonth() + 1,
	                "d+": data.getDate(),
	                "h+": data.getHours(),
	                "m+": data.getMinutes(),
	                "s+": data.getSeconds(),
	                "q+": Math.floor((data.getMonth() + 3) / 3),
	                "S+": data.getMilliseconds()
	            };
	            if (/(y+)/i.test(format)) {
	                format = format.replace(RegExp.$1, (data.getFullYear() + '').substr(4 - RegExp.$1.length));
	            }
	            for (var k in date) {
	                if (new RegExp("(" + k + ")").test(format)) {
	                    format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? date[k] : ("00" + date[k]).substr(("" + date[k]).length));
	                }
	            }
	            return format;
	        } else {
	            return "";
	        }
	    }
	};

	module.exports = util;

/***/ },

/***/ 130:
/***/ function(module, exports, __webpack_require__) {

	var __vue_script__, __vue_template__
	__vue_script__ = __webpack_require__(131)
	if (__vue_script__ &&
	    __vue_script__.__esModule &&
	    Object.keys(__vue_script__).length > 1) {
	  console.warn("[vue-loader] components\\grid\\index.vue: named exports in *.vue files are ignored.")}
	__vue_template__ = __webpack_require__(138)
	module.exports = __vue_script__ || {}
	if (module.exports.__esModule) module.exports = module.exports.default
	if (__vue_template__) {
	(typeof module.exports === "function" ? (module.exports.options || (module.exports.options = {})) : module.exports).template = __vue_template__
	}
	if (false) {(function () {  module.hot.accept()
	  var hotAPI = require("vue-hot-reload-api")
	  hotAPI.install(require("vue"), false)
	  if (!hotAPI.compatible) return
	  var id = "_v-33e9e0e7/index.vue"
	  if (!module.hot.data) {
	    hotAPI.createRecord(id, module.exports)
	  } else {
	    hotAPI.update(id, module.exports, __vue_template__)
	  }
	})()}

/***/ },

/***/ 131:
/***/ function(module, exports, __webpack_require__) {

	'use strict';

	var _defineProperty2 = __webpack_require__(132);

	var _defineProperty3 = _interopRequireDefault(_defineProperty2);

	var _Pagination = __webpack_require__(133);

	var _Pagination2 = _interopRequireDefault(_Pagination);

	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

	module.exports = (0, _defineProperty3.default)({
	  components: {
	    pagination: _Pagination2.default
	  },
	  props: {
	    pageAble: {
	      type: Boolean,
	      default: true
	    },
	    checkedField: {
	      type: String,
	      default: 'id'
	    },
	    checkedFields: {
	      type: Array,
	      default: []
	    },
	    checkAble: {
	      type: Boolean,
	      default: false
	    },
	    pageSize: {
	      type: Number,
	      default: 10
	    },
	    columns: {
	      type: Array,
	      required: true
	    },
	    url: {
	      type: String
	    },
	    data: {
	      type: Array,
	      default: [],
	      required: true
	    }
	  },
	  data: function data() {
	    return {
	      params: {}
	    };
	  },

	  methods: {
	    getParam: function getParam(param) {
	      var me = this;
	      me.params = param || me.params;
	      me.params.page = me.page || 1;
	      me.params.size = me.pageSize;
	      return me.params;
	    },
	    resquest: function resquest(param) {
	      var me = this;
	      var data = me.getParam(param);

	      this.$http.post(me.url, data).then(function (response) {
	        var res = response.data;

	        me.data = res.data.list;
	        me.rowsTotal = res.data.totalPage;
	        me.page = res.data.page;
	        me.$dispatch('complete', res.data);
	      }, function (response) {
	        me.rowsTotal = 0;
	        me.page = 0;
	      });
	    },
	    bodyCell: function bodyCell(row, col) {
	      if (!row || !col) return "";
	      var value = col.name ? row[col.name] : null;
	      var content = "";
	      if (col.render) {
	        content = col.render.call(null, row);
	      } else {
	        content = value;
	      }
	      return content;
	    }
	  },
	  ready: function ready() {
	    //this.resquest();
	  },
	  computed: {
	    pageStart: function pageStart() {
	      return (this.page - 1) * this.pageSize;
	    },
	    columnsConfigs: function columnsConfigs() {
	      var columns = this.columns;
	      var cl = columns.length;
	      var arr = [];
	      for (var i = 0; i < cl; i++) {
	        arr.push(columns[i]);
	      }
	      return arr;
	    }
	  },
	  events: {
	    //子组件(grid)进行接收
	    'grid-reload': function gridReload(param) {
	      this.page = 1;
	      this.resquest(param);
	    },
	    'page': function page(_page) {
	      this.page = _page;
	      console.log(_page);
	      this.resquest();
	    }
	  }
	}, 'data', function data() {
	  return {
	    page: 0,
	    rowsTotal: 0
	  };
	});
	// </script>
	//
	// <template>
	//   <div class="vue-grid">
	//   <div class="dataTables_wrapper no-footer">
	//     <table grid-select="{{checkedFields}}" class="table table-striped table-bordered responsive dataTable no-footer">
	//       <thead>
	//         <tr>
	//           <th v-if="checkAble" class="operation-th"></th>
	//           <th v-for="item in columns">
	// 					  {{item.display}}
	// 					</th>
	//         </tr>
	//       </thead>
	//       <tbody>
	//         <template v-if="pageAble">
	//           <template v-if="data.length > 0">
	//             <tr v-for="item in data">
	//               <td v-if="checkAble"><input type="checkbox" id="{{item[checkedField]}}" value="{{item[checkedField]}}" v-model="checkedFields"></td>
	//               <td v-for="option in columnsConfigs" >{{{bodyCell(item,option)}}} </td>
	//             </tr>
	//           </template>
	//           <template v-else>
	//             <tr><td :colspan="100">没有数据</td></tr>
	//           </template>
	//         </template>
	//         <template v-else>
	//           <tr v-for="item in data">
	//             <td v-for="option in columnsConfigs" >{{{ item[option.name] }}} </td>
	//           </tr>
	//         </template>
	//       </tbody>
	//     </table>
	//   </div>
	//     <template v-if="pageAble">
	//       <pagination :page-size="pageSize" :pages="rowsTotal" :current-page.sync="page"></pagination>
	//     </template>
	//   </div>
	// </template>
	//
	// <script>

/***/ },

/***/ 132:
/***/ function(module, exports, __webpack_require__) {

	"use strict";

	exports.__esModule = true;

	var _defineProperty = __webpack_require__(112);

	var _defineProperty2 = _interopRequireDefault(_defineProperty);

	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

	exports.default = function (obj, key, value) {
	  if (key in obj) {
	    (0, _defineProperty2.default)(obj, key, {
	      value: value,
	      enumerable: true,
	      configurable: true,
	      writable: true
	    });
	  } else {
	    obj[key] = value;
	  }

	  return obj;
	};

/***/ },

/***/ 133:
/***/ function(module, exports, __webpack_require__) {

	var __vue_script__, __vue_template__
	__webpack_require__(134)
	__vue_script__ = __webpack_require__(136)
	if (__vue_script__ &&
	    __vue_script__.__esModule &&
	    Object.keys(__vue_script__).length > 1) {
	  console.warn("[vue-loader] components\\grid\\Pagination.vue: named exports in *.vue files are ignored.")}
	__vue_template__ = __webpack_require__(137)
	module.exports = __vue_script__ || {}
	if (module.exports.__esModule) module.exports = module.exports.default
	if (__vue_template__) {
	(typeof module.exports === "function" ? (module.exports.options || (module.exports.options = {})) : module.exports).template = __vue_template__
	}
	if (false) {(function () {  module.hot.accept()
	  var hotAPI = require("vue-hot-reload-api")
	  hotAPI.install(require("vue"), false)
	  if (!hotAPI.compatible) return
	  var id = "_v-af95be16/Pagination.vue"
	  if (!module.hot.data) {
	    hotAPI.createRecord(id, module.exports)
	  } else {
	    hotAPI.update(id, module.exports, __vue_template__)
	  }
	})()}

/***/ },

/***/ 134:
/***/ function(module, exports, __webpack_require__) {

	// style-loader: Adds some css to the DOM by adding a <style> tag

	// load the styles
	var content = __webpack_require__(135);
	if(typeof content === 'string') content = [[module.id, content, '']];
	// add the styles to the DOM
	var update = __webpack_require__(127)(content, {});
	if(content.locals) module.exports = content.locals;
	// Hot Module Replacement
	if(false) {
		// When the styles change, update the <style> tags
		if(!content.locals) {
			module.hot.accept("!!./../../node_modules/.0.23.1@css-loader/index.js!./../../node_modules/.8.5.3@vue-loader/lib/style-rewriter.js!./../../node_modules/.8.5.3@vue-loader/lib/selector.js?type=style&index=0!./Pagination.vue", function() {
				var newContent = require("!!./../../node_modules/.0.23.1@css-loader/index.js!./../../node_modules/.8.5.3@vue-loader/lib/style-rewriter.js!./../../node_modules/.8.5.3@vue-loader/lib/selector.js?type=style&index=0!./Pagination.vue");
				if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
				update(newContent);
			});
		}
		// When the module is disposed, remove the <style> tags
		module.hot.dispose(function() { update(); });
	}

/***/ },

/***/ 135:
/***/ function(module, exports, __webpack_require__) {

	exports = module.exports = __webpack_require__(126)();
	// imports


	// module
	exports.push([module.id, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.prev,.next{\n  cursor: pointer\n}\n", ""]);

	// exports


/***/ },

/***/ 136:
/***/ function(module, exports) {

	'use strict';

	Object.defineProperty(exports, "__esModule", {
	  value: true
	});
	//
	//
	// <template>
	//   <div class="pagination-container">
	//     <template v-if="pages > 0">
	//       <div>
	//         <ul class="pagination light-theme simple-pagination">
	//           <li class="prev" v-bind:class="{'disabled':currentPage<2}" @click="prev">
	//             <span class="current prev">Prev</span>
	//           </li>
	//           <li v-if="showFirst" @click="nav('1')">
	//             <a  href="javascript:void(0)">1</a>
	//           </li>
	//           <li v-if="showFirst&&(+pages!=6)" class="disabled"><span class="ellipse">…</span></li>
	//
	//           <li v-for="n in draw" v-bind:class="{'active':n===currentPage}" @click="nav(n)">
	//             <a  href="javascript:void(0)">{{n}}</a>
	//           </li>
	//
	//           <li v-if="showLast&&(+pages!=6)" class="disabled"><span class="ellipse">…</span></li>
	//           <li v-if="showLast" @click="nav(pages)">
	//             <a  href="javascript:void(0)">{{pages}}</a>
	//           </li>
	//
	//           <li class="next" v-bind:class="{'disabled':currentPage>pages-1}" @click="next">
	//             <span class="current next">Next</span>
	//           </li>
	//         </ul>
	//       </div>
	//     </template>
	//   </div>
	// </template>
	//
	// <script type="text/javascript">
	exports.default = {
	  props: {
	    pageSize: {
	      type: Number,
	      default: 10
	    },
	    pages: {
	      type: Number,
	      required: true
	    },
	    currentPage: {
	      type: Number,
	      required: true
	    }
	  },
	  data: function data() {
	    return {
	      showLast: true,
	      showFirst: true
	    };
	  },

	  computed: {
	    draw: function draw() {
	      var bll = this,
	          arr = [];
	      var beginNum = bll.currentPage - 2;
	      if (beginNum > bll.pages - 4) beginNum = bll.pages - 4;
	      if (beginNum < 1) beginNum = 1;
	      var endNum = beginNum + 4;
	      if (endNum > bll.pages) endNum = bll.pages;
	      var showFirst = true,
	          showLast = true;
	      for (var i = beginNum; i <= endNum; i++) {
	        if (i === 1) {
	          showFirst = false;
	        }
	        if (i === bll.pages) {
	          showLast = false;
	        }
	        arr.push(i);
	      }
	      bll.showFirst = showFirst;
	      bll.showLast = showLast;
	      return arr;
	    }
	  },
	  methods: {
	    nav: function nav(n) {
	      this.currentPage = +n;
	      this.$dispatch('page', this.currentPage);
	    },
	    prev: function prev() {
	      if (this.currentPage > 0) {
	        this.nav(this.currentPage - 1);
	      }
	    },
	    next: function next() {
	      if (this.currentPage < this.pages) {
	        this.nav(this.currentPage + 1);
	      }
	    }
	  }
	};
	// </script>
	// <style>
	//   .prev,.next{
	//     cursor: pointer
	//   }
	// </style>

/***/ },

/***/ 137:
/***/ function(module, exports) {

	module.exports = "\n\n\n<div class=\"pagination-container\">\n  <template v-if=\"pages > 0\">\n    <div>\n      <ul class=\"pagination light-theme simple-pagination\">\n        <li class=\"prev\" v-bind:class=\"{'disabled':currentPage<2}\" @click=\"prev\">\n          <span class=\"current prev\">Prev</span>\n        </li>\n        <li v-if=\"showFirst\" @click=\"nav('1')\">\n          <a  href=\"javascript:void(0)\">1</a>\n        </li>\n        <li v-if=\"showFirst&&(+pages!=6)\" class=\"disabled\"><span class=\"ellipse\">…</span></li>\n\n        <li v-for=\"n in draw\" v-bind:class=\"{'active':n===currentPage}\" @click=\"nav(n)\">\n          <a  href=\"javascript:void(0)\">{{n}}</a>\n        </li>\n\n        <li v-if=\"showLast&&(+pages!=6)\" class=\"disabled\"><span class=\"ellipse\">…</span></li>\n        <li v-if=\"showLast\" @click=\"nav(pages)\">\n          <a  href=\"javascript:void(0)\">{{pages}}</a>\n        </li>\n\n        <li class=\"next\" v-bind:class=\"{'disabled':currentPage>pages-1}\" @click=\"next\">\n          <span class=\"current next\">Next</span>\n        </li>\n      </ul>\n    </div>\n  </template>\n</div>\n";

/***/ },

/***/ 138:
/***/ function(module, exports) {

	module.exports = "\n\n  <div class=\"vue-grid\">\n  <div class=\"dataTables_wrapper no-footer\">\n    <table grid-select=\"{{checkedFields}}\" class=\"table table-striped table-bordered responsive dataTable no-footer\">\n      <thead>\n        <tr>\n          <th v-if=\"checkAble\" class=\"operation-th\"></th>\n          <th v-for=\"item in columns\">\n\t\t\t\t\t  {{item.display}}\n\t\t\t\t\t</th>\n        </tr>\n      </thead>\n      <tbody>\n        <template v-if=\"pageAble\">\n          <template v-if=\"data.length > 0\">\n            <tr v-for=\"item in data\">\n              <td v-if=\"checkAble\"><input type=\"checkbox\" id=\"{{item[checkedField]}}\" value=\"{{item[checkedField]}}\" v-model=\"checkedFields\"></td>\n              <td v-for=\"option in columnsConfigs\" >{{{bodyCell(item,option)}}} </td>\n            </tr>\n          </template>\n          <template v-else>\n            <tr><td :colspan=\"100\">没有数据</td></tr>\n          </template>\n        </template>\n        <template v-else>\n          <tr v-for=\"item in data\">\n            <td v-for=\"option in columnsConfigs\" >{{{ item[option.name] }}} </td>\n          </tr>\n        </template>\n      </tbody>\n    </table>\n  </div>\n    <template v-if=\"pageAble\">\n      <pagination :page-size=\"pageSize\" :pages=\"rowsTotal\" :current-page.sync=\"page\"></pagination>\n    </template>\n  </div>\n";

/***/ },

/***/ 139:
/***/ function(module, exports) {

	module.exports = "\n<com-pageheader :title=\"'报表管理'\" :sub-title=\"'经营总览'\"></com-pageheader>\n\n<div id=\"businessIndex\">\n    <div class=\"overViewTitle\">\n        <h3>经营指标</h3>\n        <span>展示当日经营指标数据({{overViewUpdateTime}} 更新)</span>\n    </div>\n\n    <div class=\"overViewContent\" style=\"margin-left: 200px\">\n        <div class=\"dataModle1\">\n            <p>有效订单的商品件数</p>\n            <h2>{{buyNumbers}}</h2>\n        </div>\n        <div class=\"dataModle1\">\n            <p>有效订单的商品金额(元)</p>\n            <h2>{{orderAmount}}</h2>\n        </div>\n        <div class=\"clearfix\"></div>\n    </div>\n</div>\n\n<div id=\"brandRanking\">\n    <div class=\"overViewTitle\">\n        <h3>品牌排名</h3>\n        <span>{{rankDate}}品牌排名</span>\n    </div>\n\n    <div class=\"overViewContent\" style=\"margin-left: 125px\">\n        <div class=\"triangleShape\">\n            <b>当前层级</b>\n            <div class=\"shape triangle-up {{rankLevel==1?'activeShape':''}}\">\n                <span>前5%</span><i class=\"triangle-right\"></i>\n            </div>\n            <div class=\"shape trapezoid-1 {{rankLevel==2?'activeShape':''}}\">\n                <span>5%~20%</span><i class=\"triangle-right\"></i>\n            </div>\n            <div class=\"shape trapezoid-2 {{rankLevel==3?'activeShape':''}}\">\n                <span>20%~40%</span><i class=\"triangle-right\"></i>\n            </div>\n            <div class=\"shape trapezoid-3 {{rankLevel==4?'activeShape':''}}\">\n                <span>40%~65%</span><i class=\"triangle-right\"></i>\n            </div>\n            <div class=\"shape trapezoid-4 {{rankLevel==5?'activeShape':''}}\">\n                <span>65%~100%</span><i class=\"triangle-right\"></i>\n            </div>\n        </div>\n\n        <div class=\"rankData\">\n            <div class=\"dataModle2\" style=\"margin-bottom: 20px\">\n                <p>同品类中<br>品牌排名为</p>\n                <h2>第<b>{{rankNow}}</b>名</h2>\n            </div>\n            <div class=\"dataModle2\">\n                <p>较上周同期</p>\n                <h2 class=\"up\" v-show=\"rankChange > 0\"><i>↑</i><b>{{rankChange}}</b> 个名次</h2>\n                <h2 class=\"middle\" v-show=\"rankChange == 0\"><i>--</i><b>{{rankChange}}</b> 个名次</h2>\n                <h2 class=\"down\" v-show=\"rankChange < 0\"><i>↓</i><b>{{-rankChange}}</b> 个名次</h2>\n                <h2 v-show=\"rankChange=='--'\"><b>--</b>个名次</h2>\n\n                <div class=\"rankTip\" v-show=\"rankChange > 0\"><b class=\"_red\">今天业绩不错,继续加油哦!</b></div>\n                <div class=\"rankTip\" v-show=\"rankChange == 0\"><b class=\"_blue\">继续加油哦!</b></div>\n                <div class=\"rankTip\" v-show=\"rankChange < 0\"><b class=\"_green\">还需再接再厉哦!</b></div>\n                <div class=\"rankTip\" v-show=\"rankChange=='--'\"><b class=\"_red\">没数据也要加油哦!</b></div>\n            </div>\n        </div>\n        <div class=\"clearfix\"></div>\n    </div>\n</div>\n\n<div id=\"businessDetail\">\n    <div class=\"overViewTitle\">\n        <h3>交易明细</h3>\n        <span>展示当日商品交易情况({{listUpdateTime}} 更新)</span>\n    </div>\n\n    <div class=\"detailList\">\n        <com-grid :columns=\"grid.columns\" :url=\"grid.url\"></com-grid>\n    </div>\n</div>\n";

/***/ }

});