123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>首页</title>
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
- <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
- </head>
- <body>
- <div class="layui-fluid">
- <div class="layui-row layui-col-space15">
- <div class="layui-col-md12">
- <div class="layui-row layui-col-space15">
- <div class="layui-col-md8">
- <div class="layui-card">
- <div class="layui-card-header">快捷方式</div>
- <div class="layui-card-body">
- <div class="layui-carousel layadmin-carousel layadmin-shortcut">
- <div carousel-item>
- <ul class="layui-row layui-col-space10">
- <li class="layui-col-md3">
- <a lay-href="order/edit.html">
- <i class="layui-icon layui-icon-util"></i>
- <cite>维修开单</cite>
- </a>
- </li>
- <li class="layui-col-md3">
- <a lay-href="order/edit_wash.html">
- <i class="layui-icon layui-icon-water"></i>
- <cite>洗车开单</cite>
- </a>
- </li>
- <li class="layui-col-md3">
- <a lay-href="order/order.html">
- <i class="layui-icon layui-icon-form"></i>
- <cite>工单管理</cite>
- </a>
- </li>
- <li class="layui-col-md3">
- <a lay-href="member/member.html">
- <i class="layui-icon layui-icon-user"></i>
- <cite>会员管理</cite>
- </a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="layui-col-md4">
- <div class="layui-card">
- <div class="layui-card-header">特别提醒</div>
- <div class="layui-card-body">
- <div class="layui-carousel layadmin-carousel layadmin-backlog">
- <div carousel-item>
- <ul >
- <li class="layui-col-xs4">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3.8>本月接车</h3.8>
- <br>
- <p><cite id="order_count"></cite></p>
- </a>
- </li>
- <li class="layui-col-xs4">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3.8>电子档案</h3.8>
- <br>
- <p><cite id="dzda_count"></cite></p>
- </a>
- </li>
- <li class="layui-col-xs4">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3.8>保险提醒</h3.8>
- <br>
- <p><cite id="insurance_count">4</cite></p>
- </a>
- </li>
- <li class="layui-col-xs4">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3.8>定保提醒</h3.8>
- <br>
- <p><cite id="routine_remind_count">2</cite></p>
- </a>
- </li>
- <li class="layui-col-xs4">
- <a href="javascript:;" class="layadmin-backlog-body">
- <h3.8>年检提醒</h3.8>
- <br>
- <p><cite id="vehicle_inspection_count">3</cite></p>
- </a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="layui-col-md8">
- <div class="layui-card">
- <div class="layui-card-header">数据概览(最近12个月)</div>
- <div class="layui-card-body">
- <div id="chart1" style="height:360px;">
- </div>
- <div id="chart2" style="height:360px;">
- </div>
- <div id="chart3" style="height:360px;">
- </div>
- <div id="chart4" style="height:360px;">
- </div>
- </div>
- </div>
- </div>
- <div class="layui-col-md4">
- <div class="layui-card" id="Notice">
- <div class="layui-card-header">公告</div>
- <table class="layui-hide" id="datagrid" lay-filter="datagrid"></table>
- </div>
- </div>
- <div class="layui-col-md4">
- <div class="layui-card">
- <div class="layui-card-header">手机版</div>
- <div class="layui-card-body" style="text-align: center">
- <img src="http://soft.zzliaoyuan.com/repairwin_qrcode.png" style="width: 200px; height:200px">
- <p>扫描二维码下载安装手机版</p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script src="../../layuiadmin/layui/layui.js?t=1"></script>
- <script>
- layui.config({
- base: '../../layuiadmin/' //静态资源所在路径
- }).extend({
- index: 'lib/index', //主入口模块
- }).use(['index', 'home','echarts', 'table'], function() {
- var $ = layui.$;
- var admin = layui.admin
- ,echarts = layui.echarts;
- var mouth =[]
- var table = layui.table;
- var user_id = layui.data(layui.setter.tableName)['USER-ID'];
- table.render({
- elem: '#datagrid'
- ,url: '/office/notice/unexpired/data/'
- ,cols: [[
- {field:'id',align:'left', width:'9%', templet: function(d){
- var isRead = false;
- for (var a=0;a<d.browses_user.length;a++){
- if (d.browses_user[a]['browse_user'] == user_id){
- isRead = true;
- break;
- }
- }
- if (isRead) {
- return '<span id="P_'+ d.id +'"><i class="layui-icon layui-icon-ok-circle"></i></span>';
- } else {
- return '<span id="P_'+ d.id +'"><i class="layui-icon layui-icon-log"></i></span>';
- }
- }}
- ,{field:'title',align:'left', title:'标题', width:'63%'}
- ,{field:'create_time',align:'left', title:'发布时间', width:'28%'}
- ]]
- ,height: '300px'
- ,done: function (res) {
- $('th').hide(); // 去掉表头
- $('td').css({'border': '0px'});
- layui.index.removeNoPermButtons();
- }
- });
- admin.req({
- url: '/order/order/count/'
- , done: function (res) {
- $('#order_count').html(res.data.order_count);
- $('#dzda_count').html(res.data.dzda_count);
- $('#insurance_count').html(res.data.insurance_count);
- $('#routine_remind_count').html(res.data.routine_remind_count);
- $('#vehicle_inspection_count').html(res.data.vehicle_inspection_count);
- }
- });
- admin.req({
- url:'/order/order/report/?maint_order=1&wash_order=1&deliver_part=1&member=1'
- , done: function (res) {
- var mouth=res.data.order_mouth
- var order_amount=res.data.order_amount
- var order_count=res.data.order_count
- var washorder_amount=res.data.washorder_amount
- var washorder_count=res.data.washorder_count
- var deliver_count=res.data.deliver_count
- var deliver_amount=res.data.deliver_amount
- var member_count=res.data.member_count
- var member_amount=res.data.member_amount
- var chart1 = echarts.init($('#chart1')[0]);
- var chart2 = echarts.init($('#chart2')[0]);
- var chart3 = echarts.init($('#chart3')[0]);
- var chart4 = echarts.init($('#chart4')[0]);
- var option1 = {
- title: {
- text: '工单统计'
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- toolbox: {
- feature: {
- dataView: {show: true, readOnly: false},
- magicType: {show: true, type: ['line', 'bar']},
- restore: {show: true},
- saveAsImage: {show: true}
- }
- },
- legend: {
- data:['金额','台次']
- },
- xAxis: [
- {
- type: 'category',
- data: mouth,
- axisPointer: {
- type: 'shadow'
- },
- axisLine: {
- lineStyle: {
- color: '#009688', // 颜色
- }
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '金额',
- min: 0,
- axisLabel: {
- formatter: '{value} 元'
- },
- axisLine: {
- lineStyle: {
- color: '#009688', // 颜色
- }
- }
- },
- {
- type: 'value',
- name: '台次',
- min: 0,
- axisLabel: {
- formatter: '{value} '
- },
- axisLine: {
- lineStyle: {
- color: '#009688', // 颜色
- }
- }
- }
- ],
- series: [
- {
- name:'金额',
- type:'bar',
- itemStyle: {
- normal: {
- color: "#FFB800",
- lineStyle: {
- color: "#FFB800"
- }
- }
- },
- data:order_amount,
- },
- {
- name:'台次',
- type:'line',
- yAxisIndex: 1,
- itemStyle: {
- normal: {
- color: "#1E9FFF",
- lineStyle: {
- color: "#1E9FFF"
- }
- }
- },
- data:order_count
- }
- ]
- };
- var option2 = {
- title: {
- text: '洗车统计'
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- toolbox: {
- feature: {
- dataView: {show: true, readOnly: false},
- magicType: {show: true, type: ['line', 'bar']},
- restore: {show: true},
- saveAsImage: {show: true}
- }
- },
- legend: {
- data:['金额','台次']
- },
- xAxis: [
- {
- type: 'category',
- data: mouth,
- axisPointer: {
- type: 'shadow'
- },
- axisLine: {
- lineStyle: {
- color: '#009688',
- }
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '台次',
- min: 0,
- axisLabel: {
- formatter: '{value} 元'
- },
- axisLine: {
- lineStyle: {
- color: '#009688',
- }
- }
- },
- {
- type: 'value',
- name: '台次',
- min: 0,
- axisLabel: {
- formatter: '{value} '
- },
- axisLine: {
- lineStyle: {
- color: '#009688',
- }
- }
- }
- ],
- series: [
- {
- name:'金额',
- type:'bar',
- itemStyle: {
- normal: {
- color: "#FFB800",
- lineStyle: {
- color: "#FFB800"
- }
- }
- },
- data:washorder_amount,
- },
- {
- name:'台次',
- type:'line',
- yAxisIndex: 1,
- itemStyle: {
- normal: {
- color: "#1E9FFF",
- lineStyle: {
- color: "#1E9FFF"
- }
- }
- },
- data:washorder_count
- }
- ]
- };
- var option3 = {
- title: {
- text: '出库统计'
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- toolbox: {
- feature: {
- dataView: {show: true, readOnly: false},
- magicType: {show: true, type: ['line', 'bar']},
- restore: {show: true},
- saveAsImage: {show: true}
- }
- },
- legend: {
- data:['金额','数量']
- },
- xAxis: [
- {
- type: 'category',
- data: mouth,
- axisPointer: {
- type: 'shadow'
- },
- axisLine: {
- lineStyle: {
- color: '#009688',
- }
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '金额',
- min: 0,
- axisLabel: {
- formatter: '{value} 元'
- },
- axisLine: {
- lineStyle: {
- color: '#009688',
- }
- }
- },
- {
- type: 'value',
- name: '数量',
- min: 0,
- axisLabel: {
- formatter: '{value} '
- },
- axisLine: {
- lineStyle: {
- color: '#009688',
- }
- }
- }
- ],
- series: [
- {
- name:'金额',
- type:'bar',
- itemStyle: {
- normal: {
- color: "#FFB800",
- lineStyle: {
- color: "#FFB800"
- }
- }
- },
- data:deliver_amount,
- },
- {
- name:'数量',
- type:'line',
- yAxisIndex: 1,
- itemStyle: {
- normal: {
- color: "#1E9FFF",
- lineStyle: {
- color: "#1E9FFF"
- }
- }
- },
- data:deliver_count
- }
- ]
- };
- var option4 = {
- title: {
- text: '会员统计'
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- toolbox: {
- feature: {
- dataView: {show: true, readOnly: false},
- magicType: {show: true, type: ['line', 'bar']},
- restore: {show: true},
- saveAsImage: {show: true}
- }
- },
- legend: {
- data:['金额','数量']
- },
- xAxis: [
- {
- type: 'category',
- data: mouth,
- axisPointer: {
- type: 'shadow'
- },
- axisLine: {
- lineStyle: {
- color: '#009688',
- }
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '金额',
- min: 0,
- axisLabel: {
- formatter: '{value} 元'
- },
- axisLine: {
- lineStyle: {
- color: '#009688',
- }
- }
- },
- {
- type: 'value',
- name: '数量',
- min: 0,
- axisLabel: {
- formatter: '{value} '
- },
- axisLine: {
- lineStyle: {
- color: '#009688',
- }
- }
- }
- ],
- series: [
- {
- name:'销售金额',
- type:'bar',
- itemStyle: {
- normal: {
- color: "#FFB800",
- lineStyle: {
- color: "#FFB800"
- }
- }
- },
- data:member_amount,
- },
- {
- name:'销售数量',
- type:'line',
- yAxisIndex: 1,
- itemStyle: {
- normal: {
- color: "#1E9FFF",
- lineStyle: {
- color: "#1E9FFF"
- }
- }
- },
- data:member_count
- }
- ]
- };
- chart1.setOption(option1);
- chart2.setOption(option2);
- chart3.setOption(option3);
- chart4.setOption(option4);
- }
- });
- table.on('row(datagrid)', function (obj) {
- var data = obj.data;
- table.editdata = data;
- layui.onSubmitChild = function (data) {
- table.reload('datagrid',{});
- };
- layer.open({
- type: 2,
- title: '查看['+ data.title + ']',
- shadeClose: true,
- area: ['80%', '80%'],
- content: '/views/notice/notice_detail.html?id='+data.id
- });
- });
- });
- </script>
- </body>
- </html>
|