123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport"
- content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <!-- 所有的 css & js 资源 -->
- <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
- <link rel="stylesheet" href="../../static/sa.css">
- <script src="../../static/kj/jquery.min.js"></script>
- <script src="../../static/kj/layer/layer.js"></script>
- <script src="../../static/sa.js"></script>
- <style type="text/css">
- .vue-box {
- margin: 0;
- padding: 0;
- height: 100%;
- }
- .el-card {
- border-radius: 0px;
- border: 1px #ddd solid;
- margin-bottom: 14px;
- }
- .s-row {
- /* background-color: antiquewhite; */
- padding: 10px 14px;
- padding-bottom: 0px;
- }
- .s-row-1 {
- padding-top: 14px;
- }
- .s-row-2 {
- /* margin-top: -10px; */
- }
- .s-row-2 .el-card .el-card__body {
- height: 250px;
- }
- .s-row-3 .el-card {
- /* height: 100%; */
- }
- .echarts-div {
- height: 100%;
- }
- .s-row-3 .el-alert {
- margin-bottom: 14px;
- }
- </style>
- </head>
- <body>
- <div class="vue-box" style="height: 980px;width: 100%;">
- <div v-if="currentCustomerId==1&&showStatics">
- <div class="s-row" style="background: #fff;">
- <com-sta-data></com-sta-data>
- </div>
- <el-row :gutter="10">
- <el-col span="12">
- <el-card class="box-card" style="height: 600px;overflow-y: auto;">
- <div slot="header" class="clearfix">
- <span>业务类型统计</span>
- <div style="float: right; padding: 3px 0">
- <el-date-picker v-model="feeType.date" type="daterange" range-separator="至"
- start-placeholder="开始日期" end-placeholder="结束日期" @change="getFeeTypeStatics">
- </el-date-picker>
- </div>
- <div>
- <el-table :data="feeType.list">
- <el-table-column type="index" width="50" label="序号">
- </el-table-column>
- <sa-td name="名称" prop="feeType" type="enum"
- :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车业务', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业',10:'总计'}"></sa-td>
- <el-table-column prop="total" label="数量">
- </el-table-column>
- <el-table-column prop="price" label="金额(元)">
- </el-table-column>
- </el-table>
- </div>
- </div>
- </el-card>
- </el-col>
- <el-col span="12">
- <el-card class="box-card" style="height: 600px;overflow-y: auto;">
- <div slot="header" class="clearfix">
- <span>收费项目统计</span>
- <div style="float: right; padding: 3px 0">
- <el-date-picker v-model="itemType.date" type="daterange" range-separator="至"
- start-placeholder="开始日期" end-placeholder="结束日期" @change="itemTypeStatics">
- </el-date-picker>
- </div>
- <div>
- <el-table :data="itemType.list">
- <el-table-column type="index" width="50" label="序号">
- </el-table-column>
- <el-table-column prop="name" label="名称">
- </el-table-column>
- <el-table-column prop="total" label="数量">
- </el-table-column>
- <el-table-column prop="price" label="金额(元)">
- </el-table-column>
- </el-table>
- </div>
- </div>
- </el-card>
- </el-col>
- </el-row>
- </div>
- <div v-if="currentCustomerId!==1||!showStatics"
- style="text-align: center; margin-top: 113px; font-size: 60px; letter-spacing: 30px;">
- 欢迎使用场站管理系统
- </div>
- </div>
- <script src="../../static/kj/vue.min.js"></script>
- <script src="../../static/kj/element-ui/index.js"></script>
- <script src="../../static/kj/httpVueLoader.js"></script>
- <script src="../../static/kj/jquery.min.js"></script>
- <script src="../../static/kj/layer/layer.js"></script>
- <!-- <script src="https://unpkg.com/echarts@4.6.0/dist/echarts-en.min.js"></script> -->
- <script src="../../static/sa.js"></script>
- <script type="text/javascript">
- var app = new Vue({
- components: {
- 'com-sta-data': httpVueLoader('com-sta-data.vue'),
- 'com-chart-1': httpVueLoader('com-chart-1.vue'),
- 'com-chart-2': httpVueLoader('com-chart-2.vue'),
- 'com-chart-3': httpVueLoader('com-chart-3.vue'),
- 'com-stack': httpVueLoader('com-stack.vue'),
- 'com-update-log': httpVueLoader('com-update-log.vue'),
- 'com-origin': httpVueLoader('com-origin.vue'),
- "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
- // 'com-intro': httpVueLoader('com-intro.vue'),
- },
- el: '.vue-box',
- data: {
- currentCustomerId: '-1',
- timmer: null,
- feeType: {
- date: [new Date(), new Date()],
- list: [],
- p: {
- startDay: '',
- endDay: ''
- }
- },
- itemType: {
- date: [new Date(), new Date()],
- list: [],
- p: {
- startDay: '',
- endDay: ''
- }
- },
- car: {
- totalCar: 1,
- inCar: 2,
- outCar: 3,
- weightCar: 0,
- emptyCar: 0
- },
- showStatics:false,
- },
- created(){
- this.getCurrUser();
- },
- methods: {
- getCurrUser() {
- let user = sa.$sys.getCurrUser();
- let roleId=user.roleId;
- this.showStatics=roleId!='233';
- },
- getCurrentCustomerId() {
- sa.ajaxNoLoading('/TbCostomer/getCurrentCustomerId', function(resp) {
- this.currentCustomerId = resp.data;
- }.bind(this));
- },
- itemTypeStatics() {
- let days = this.itemType.date;
- let p = this.itemType.p;
- if (days.length == 2) {
- p.startDay = sa.forDate(days[0]);
- p.endDay = sa.forDate(days[1]);
- }
- sa.ajaxNoLoading('/TbFeeDetails/itemTypeStatics', sa.removeNull(p), function(resp) {
- this.itemType.list = resp.data;
- }.bind(this))
- },
- getFeeTypeStatics() {
- let days = this.feeType.date;
- let p = this.feeType.p;
- if (days.length == 2) {
- p.startDay = sa.forDate(days[0]);
- p.endDay = sa.forDate(days[1]);
- }
- sa.ajaxNoLoading('/TbFeeDetails/feeTypeStatics', sa.removeNull(p), function(resp) {
- let list = resp.data;
- for (let i in list) {
- let item = list[i];
- if (!item.feeType) {
- item.feeType = 10;
- }
- }
- this.feeType.list = list;
- }.bind(this))
- }
- },
- mounted: function() {
- this.getFeeTypeStatics();
- this.itemTypeStatics();
- this.timmer = setInterval(() => {
- this.getFeeTypeStatics();
- this.itemTypeStatics();
- }, 300000)
- this.getCurrentCustomerId();
- },
- beforeDestroy() {
- if (this.timmer != null) {
- clearInterval(this.timmer);
- }
- }
- })
- // 设置监听,改变窗口大小时重绘图表
- window.myChartList = [];
- window.onresize = function() {
- myChartList.forEach(function(myChart) {
- myChart.resize();
- })
- }
- </script>
- </body>
- </html>
|