home.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>首页</title>
  6. <meta name="renderer" content="webkit">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  9. <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
  10. <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
  11. </head>
  12. <body>
  13. <div class="layui-fluid">
  14. <div class="layui-row layui-col-space15">
  15. <div class="layui-col-md12">
  16. <div class="layui-row layui-col-space15">
  17. <div class="layui-col-md8">
  18. <div class="layui-card">
  19. <div class="layui-card-header">快捷方式</div>
  20. <div class="layui-card-body">
  21. <div class="layui-carousel layadmin-carousel layadmin-shortcut">
  22. <div carousel-item>
  23. <ul class="layui-row layui-col-space10">
  24. <li class="layui-col-md3">
  25. <a lay-href="order/edit.html">
  26. <i class="layui-icon layui-icon-util"></i>
  27. <cite>维修开单</cite>
  28. </a>
  29. </li>
  30. <li class="layui-col-md3">
  31. <a lay-href="order/edit_wash.html">
  32. <i class="layui-icon layui-icon-water"></i>
  33. <cite>洗车开单</cite>
  34. </a>
  35. </li>
  36. <li class="layui-col-md3">
  37. <a lay-href="order/order.html">
  38. <i class="layui-icon layui-icon-form"></i>
  39. <cite>工单管理</cite>
  40. </a>
  41. </li>
  42. <li class="layui-col-md3">
  43. <a lay-href="member/member.html">
  44. <i class="layui-icon layui-icon-user"></i>
  45. <cite>会员管理</cite>
  46. </a>
  47. </li>
  48. </ul>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="layui-col-md4">
  55. <div class="layui-card">
  56. <div class="layui-card-header">特别提醒</div>
  57. <div class="layui-card-body">
  58. <div class="layui-carousel layadmin-carousel layadmin-backlog">
  59. <div carousel-item>
  60. <ul >
  61. <li class="layui-col-xs4">
  62. <a href="javascript:;" class="layadmin-backlog-body">
  63. <h3.8>本月接车</h3.8>
  64. <br>
  65. <p><cite id="order_count"></cite></p>
  66. </a>
  67. </li>
  68. <li class="layui-col-xs4">
  69. <a href="javascript:;" class="layadmin-backlog-body">
  70. <h3.8>电子档案</h3.8>
  71. <br>
  72. <p><cite id="dzda_count"></cite></p>
  73. </a>
  74. </li>
  75. <li class="layui-col-xs4">
  76. <a href="javascript:;" class="layadmin-backlog-body">
  77. <h3.8>保险提醒</h3.8>
  78. <br>
  79. <p><cite id="insurance_count">4</cite></p>
  80. </a>
  81. </li>
  82. <li class="layui-col-xs4">
  83. <a href="javascript:;" class="layadmin-backlog-body">
  84. <h3.8>定保提醒</h3.8>
  85. <br>
  86. <p><cite id="routine_remind_count">2</cite></p>
  87. </a>
  88. </li>
  89. <li class="layui-col-xs4">
  90. <a href="javascript:;" class="layadmin-backlog-body">
  91. <h3.8>年检提醒</h3.8>
  92. <br>
  93. <p><cite id="vehicle_inspection_count">3</cite></p>
  94. </a>
  95. </li>
  96. </ul>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. <div class="layui-col-md8">
  103. <div class="layui-card">
  104. <div class="layui-card-header">数据概览(最近12个月)</div>
  105. <div class="layui-card-body">
  106. <div id="chart1" style="height:360px;">
  107. </div>
  108. <div id="chart2" style="height:360px;">
  109. </div>
  110. <div id="chart3" style="height:360px;">
  111. </div>
  112. <div id="chart4" style="height:360px;">
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="layui-col-md4">
  118. <div class="layui-card" id="Notice">
  119. <div class="layui-card-header">公告</div>
  120. <table class="layui-hide" id="datagrid" lay-filter="datagrid"></table>
  121. </div>
  122. </div>
  123. <div class="layui-col-md4">
  124. <div class="layui-card">
  125. <div class="layui-card-header">手机版</div>
  126. <div class="layui-card-body" style="text-align: center">
  127. <img src="http://soft.zzliaoyuan.com/repairwin_qrcode.png" style="width: 200px; height:200px">
  128. <p>扫描二维码下载安装手机版</p>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. <script src="../../layuiadmin/layui/layui.js?t=1"></script>
  136. <script>
  137. layui.config({
  138. base: '../../layuiadmin/' //静态资源所在路径
  139. }).extend({
  140. index: 'lib/index', //主入口模块
  141. }).use(['index', 'home','echarts', 'table'], function() {
  142. var $ = layui.$;
  143. var admin = layui.admin
  144. ,echarts = layui.echarts;
  145. var mouth =[]
  146. var table = layui.table;
  147. var user_id = layui.data(layui.setter.tableName)['USER-ID'];
  148. table.render({
  149. elem: '#datagrid'
  150. ,url: '/office/notice/unexpired/data/'
  151. ,cols: [[
  152. {field:'id',align:'left', width:'9%', templet: function(d){
  153. var isRead = false;
  154. for (var a=0;a<d.browses_user.length;a++){
  155. if (d.browses_user[a]['browse_user'] == user_id){
  156. isRead = true;
  157. break;
  158. }
  159. }
  160. if (isRead) {
  161. return '<span id="P_'+ d.id +'"><i class="layui-icon layui-icon-ok-circle"></i></span>';
  162. } else {
  163. return '<span id="P_'+ d.id +'"><i class="layui-icon layui-icon-log"></i></span>';
  164. }
  165. }}
  166. ,{field:'title',align:'left', title:'标题', width:'63%'}
  167. ,{field:'create_time',align:'left', title:'发布时间', width:'28%'}
  168. ]]
  169. ,height: '300px'
  170. ,done: function (res) {
  171. $('th').hide(); // 去掉表头
  172. $('td').css({'border': '0px'});
  173. layui.index.removeNoPermButtons();
  174. }
  175. });
  176. admin.req({
  177. url: '/order/order/count/'
  178. , done: function (res) {
  179. $('#order_count').html(res.data.order_count);
  180. $('#dzda_count').html(res.data.dzda_count);
  181. $('#insurance_count').html(res.data.insurance_count);
  182. $('#routine_remind_count').html(res.data.routine_remind_count);
  183. $('#vehicle_inspection_count').html(res.data.vehicle_inspection_count);
  184. }
  185. });
  186. admin.req({
  187. url:'/order/order/report/?maint_order=1&wash_order=1&deliver_part=1&member=1'
  188. , done: function (res) {
  189. var mouth=res.data.order_mouth
  190. var order_amount=res.data.order_amount
  191. var order_count=res.data.order_count
  192. var washorder_amount=res.data.washorder_amount
  193. var washorder_count=res.data.washorder_count
  194. var deliver_count=res.data.deliver_count
  195. var deliver_amount=res.data.deliver_amount
  196. var member_count=res.data.member_count
  197. var member_amount=res.data.member_amount
  198. var chart1 = echarts.init($('#chart1')[0]);
  199. var chart2 = echarts.init($('#chart2')[0]);
  200. var chart3 = echarts.init($('#chart3')[0]);
  201. var chart4 = echarts.init($('#chart4')[0]);
  202. var option1 = {
  203. title: {
  204. text: '工单统计'
  205. },
  206. tooltip: {
  207. trigger: 'axis',
  208. axisPointer: {
  209. type: 'cross',
  210. crossStyle: {
  211. color: '#999'
  212. }
  213. }
  214. },
  215. toolbox: {
  216. feature: {
  217. dataView: {show: true, readOnly: false},
  218. magicType: {show: true, type: ['line', 'bar']},
  219. restore: {show: true},
  220. saveAsImage: {show: true}
  221. }
  222. },
  223. legend: {
  224. data:['金额','台次']
  225. },
  226. xAxis: [
  227. {
  228. type: 'category',
  229. data: mouth,
  230. axisPointer: {
  231. type: 'shadow'
  232. },
  233. axisLine: {
  234. lineStyle: {
  235. color: '#009688', // 颜色
  236. }
  237. }
  238. }
  239. ],
  240. yAxis: [
  241. {
  242. type: 'value',
  243. name: '金额',
  244. min: 0,
  245. axisLabel: {
  246. formatter: '{value} 元'
  247. },
  248. axisLine: {
  249. lineStyle: {
  250. color: '#009688', // 颜色
  251. }
  252. }
  253. },
  254. {
  255. type: 'value',
  256. name: '台次',
  257. min: 0,
  258. axisLabel: {
  259. formatter: '{value} '
  260. },
  261. axisLine: {
  262. lineStyle: {
  263. color: '#009688', // 颜色
  264. }
  265. }
  266. }
  267. ],
  268. series: [
  269. {
  270. name:'金额',
  271. type:'bar',
  272. itemStyle: {
  273. normal: {
  274. color: "#FFB800",
  275. lineStyle: {
  276. color: "#FFB800"
  277. }
  278. }
  279. },
  280. data:order_amount,
  281. },
  282. {
  283. name:'台次',
  284. type:'line',
  285. yAxisIndex: 1,
  286. itemStyle: {
  287. normal: {
  288. color: "#1E9FFF",
  289. lineStyle: {
  290. color: "#1E9FFF"
  291. }
  292. }
  293. },
  294. data:order_count
  295. }
  296. ]
  297. };
  298. var option2 = {
  299. title: {
  300. text: '洗车统计'
  301. },
  302. tooltip: {
  303. trigger: 'axis',
  304. axisPointer: {
  305. type: 'cross',
  306. crossStyle: {
  307. color: '#999'
  308. }
  309. }
  310. },
  311. toolbox: {
  312. feature: {
  313. dataView: {show: true, readOnly: false},
  314. magicType: {show: true, type: ['line', 'bar']},
  315. restore: {show: true},
  316. saveAsImage: {show: true}
  317. }
  318. },
  319. legend: {
  320. data:['金额','台次']
  321. },
  322. xAxis: [
  323. {
  324. type: 'category',
  325. data: mouth,
  326. axisPointer: {
  327. type: 'shadow'
  328. },
  329. axisLine: {
  330. lineStyle: {
  331. color: '#009688',
  332. }
  333. }
  334. }
  335. ],
  336. yAxis: [
  337. {
  338. type: 'value',
  339. name: '台次',
  340. min: 0,
  341. axisLabel: {
  342. formatter: '{value} 元'
  343. },
  344. axisLine: {
  345. lineStyle: {
  346. color: '#009688',
  347. }
  348. }
  349. },
  350. {
  351. type: 'value',
  352. name: '台次',
  353. min: 0,
  354. axisLabel: {
  355. formatter: '{value} '
  356. },
  357. axisLine: {
  358. lineStyle: {
  359. color: '#009688',
  360. }
  361. }
  362. }
  363. ],
  364. series: [
  365. {
  366. name:'金额',
  367. type:'bar',
  368. itemStyle: {
  369. normal: {
  370. color: "#FFB800",
  371. lineStyle: {
  372. color: "#FFB800"
  373. }
  374. }
  375. },
  376. data:washorder_amount,
  377. },
  378. {
  379. name:'台次',
  380. type:'line',
  381. yAxisIndex: 1,
  382. itemStyle: {
  383. normal: {
  384. color: "#1E9FFF",
  385. lineStyle: {
  386. color: "#1E9FFF"
  387. }
  388. }
  389. },
  390. data:washorder_count
  391. }
  392. ]
  393. };
  394. var option3 = {
  395. title: {
  396. text: '出库统计'
  397. },
  398. tooltip: {
  399. trigger: 'axis',
  400. axisPointer: {
  401. type: 'cross',
  402. crossStyle: {
  403. color: '#999'
  404. }
  405. }
  406. },
  407. toolbox: {
  408. feature: {
  409. dataView: {show: true, readOnly: false},
  410. magicType: {show: true, type: ['line', 'bar']},
  411. restore: {show: true},
  412. saveAsImage: {show: true}
  413. }
  414. },
  415. legend: {
  416. data:['金额','数量']
  417. },
  418. xAxis: [
  419. {
  420. type: 'category',
  421. data: mouth,
  422. axisPointer: {
  423. type: 'shadow'
  424. },
  425. axisLine: {
  426. lineStyle: {
  427. color: '#009688',
  428. }
  429. }
  430. }
  431. ],
  432. yAxis: [
  433. {
  434. type: 'value',
  435. name: '金额',
  436. min: 0,
  437. axisLabel: {
  438. formatter: '{value} 元'
  439. },
  440. axisLine: {
  441. lineStyle: {
  442. color: '#009688',
  443. }
  444. }
  445. },
  446. {
  447. type: 'value',
  448. name: '数量',
  449. min: 0,
  450. axisLabel: {
  451. formatter: '{value} '
  452. },
  453. axisLine: {
  454. lineStyle: {
  455. color: '#009688',
  456. }
  457. }
  458. }
  459. ],
  460. series: [
  461. {
  462. name:'金额',
  463. type:'bar',
  464. itemStyle: {
  465. normal: {
  466. color: "#FFB800",
  467. lineStyle: {
  468. color: "#FFB800"
  469. }
  470. }
  471. },
  472. data:deliver_amount,
  473. },
  474. {
  475. name:'数量',
  476. type:'line',
  477. yAxisIndex: 1,
  478. itemStyle: {
  479. normal: {
  480. color: "#1E9FFF",
  481. lineStyle: {
  482. color: "#1E9FFF"
  483. }
  484. }
  485. },
  486. data:deliver_count
  487. }
  488. ]
  489. };
  490. var option4 = {
  491. title: {
  492. text: '会员统计'
  493. },
  494. tooltip: {
  495. trigger: 'axis',
  496. axisPointer: {
  497. type: 'cross',
  498. crossStyle: {
  499. color: '#999'
  500. }
  501. }
  502. },
  503. toolbox: {
  504. feature: {
  505. dataView: {show: true, readOnly: false},
  506. magicType: {show: true, type: ['line', 'bar']},
  507. restore: {show: true},
  508. saveAsImage: {show: true}
  509. }
  510. },
  511. legend: {
  512. data:['金额','数量']
  513. },
  514. xAxis: [
  515. {
  516. type: 'category',
  517. data: mouth,
  518. axisPointer: {
  519. type: 'shadow'
  520. },
  521. axisLine: {
  522. lineStyle: {
  523. color: '#009688',
  524. }
  525. }
  526. }
  527. ],
  528. yAxis: [
  529. {
  530. type: 'value',
  531. name: '金额',
  532. min: 0,
  533. axisLabel: {
  534. formatter: '{value} 元'
  535. },
  536. axisLine: {
  537. lineStyle: {
  538. color: '#009688',
  539. }
  540. }
  541. },
  542. {
  543. type: 'value',
  544. name: '数量',
  545. min: 0,
  546. axisLabel: {
  547. formatter: '{value} '
  548. },
  549. axisLine: {
  550. lineStyle: {
  551. color: '#009688',
  552. }
  553. }
  554. }
  555. ],
  556. series: [
  557. {
  558. name:'销售金额',
  559. type:'bar',
  560. itemStyle: {
  561. normal: {
  562. color: "#FFB800",
  563. lineStyle: {
  564. color: "#FFB800"
  565. }
  566. }
  567. },
  568. data:member_amount,
  569. },
  570. {
  571. name:'销售数量',
  572. type:'line',
  573. yAxisIndex: 1,
  574. itemStyle: {
  575. normal: {
  576. color: "#1E9FFF",
  577. lineStyle: {
  578. color: "#1E9FFF"
  579. }
  580. }
  581. },
  582. data:member_count
  583. }
  584. ]
  585. };
  586. chart1.setOption(option1);
  587. chart2.setOption(option2);
  588. chart3.setOption(option3);
  589. chart4.setOption(option4);
  590. }
  591. });
  592. table.on('row(datagrid)', function (obj) {
  593. var data = obj.data;
  594. table.editdata = data;
  595. layui.onSubmitChild = function (data) {
  596. table.reload('datagrid',{});
  597. };
  598. layer.open({
  599. type: 2,
  600. title: '查看['+ data.title + ']',
  601. shadeClose: true,
  602. area: ['80%', '80%'],
  603. content: '/views/notice/notice_detail.html?id='+data.id
  604. });
  605. });
  606. });
  607. </script>
  608. </body>
  609. </html>