123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport"
- content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.css">
- <link rel="stylesheet" href="/static/dropload-gh-pages/dropload.css">
- <script type="text/javascript" src="/static/jquery-2.2.4.min.js"></script>
- <script type="text/javascript" src="/static/dropload-gh-pages/dropload.min.js"></script>
- <script type="text/javascript" src="/static/layer/layer.js"></script>
- <title>所有订单</title>
- </head>
- <style>
- body{
- background-color: #F1F1F1;
- }
- .container{
- max-width: 750px;
- height: auto;
- margin: 0 auto;
- padding: 0px 6px;
- }
- .order-all{
- width: 100%;
- height: 100px;
- background-color: #FFFFFF;
- border-radius: 2px;
- margin: 5px 0px;
- padding: 0px 8px;
- border: 1px solid #2878FF;
- }
- .order-title{
- width: 100%;
- height: 40px;
- line-height: 40px;
- border-bottom:1px solid #F1F1F1;
- }
- .order-title img{
- width: 24px;
- height: 24px;
- }
- .order-title-left{
- font-size: 14px;
- font-weight: 600;
- letter-spacing:1px;
- padding-left: 5px;
- color: #148d8f;
- }
- .order-title-right{
- font-size: 14px;
- float: right;
- letter-spacing:1px;
- }
- .order-content{
- width: 100%;
- height: auto;
- padding: 5px 0px;
- }
- .order-content-time{
- width: 100%;
- height: 23px;
- line-height: 23px;
- margin: 1px 0px;
- }
- .order-content-time text{
- font-size: 13px;
- color: #A9A9A9;
- }
- .order-content-name{
- width: 100%;
- height: 23px;
- line-height: 23px;
- margin: 1px 0px;
- }
- .order-content-name text{
- font-size: 13px;
- color: #A9A9A9;
- }
- .nulldata{
- width: 100%;
- height: 200px;
- text-align: center;
- position: fixed;
- top: 22%;
- }
- .nulldata img{
- width: 200px;
- height: 160px;
- text-align: center;
- }
- .nulldata-text{
- margin-top: 15px;
- font-size: 14px;
- letter-spacing: 2px;
- text-align: center;
- }
- .order-lists{
- width: 100%;
- height: auto;
- margin-bottom: 30px;
- }
- .footer-back{
- position: fixed;
- z-index: 1000;
- width: 100%;
- height: 45px;
- line-height: 45px;
- background-color: #ffffff;
- bottom: 0;
- left: 0;
- box-shadow: 0px 0px 10px 0px rgba(26, 25, 26, 0.05);
- display: table-cell;
- vertical-align: middle;
- text-align: center;
- }
- .footer-back a img{
- width: 43px;
- height: 43px;
- }
- </style>
- <body>
- {if (isset($list))}
- <div class="container">
- <div class="order-lists">
- {foreach $list as $k=>$v}
- <div class="order-all" onclick="orderDetails(this)" data-id="{$v['id']}" data-orgId="{$v['org_id']}">
- <div class="order-title">
- {if($v['order_mode']) == 1}
- <img src="/img/pending2x.png" alt="">
- {elseif($v['order_mode']) == 2 || $v['order_mode']==3 }
- <img src="/img/cancel2x.png" alt="">
- {elseif ($v['order_mode'] == 4)}
- <img src="/img/distribute2x.png" alt="">
- {elseif ($v['order_mode'] == 5)}
- <img src="/img/wancheng2x.png" alt="">
- {elseif ($v['order_mode'] == 6)}
- <img src="/img/yipingjia2x.png" alt="">
- {/if}
- {if($v['work_type_mode']) == 1}
- <text class="order-title-left">{$v['dep_name']}报修订单</text>
- {elseif($v['work_type_mode']) == 2}
- <text class="order-title-left">{$v['dep_name']}保洁订单</text>
- {elseif($v['work_type_mode']) == 3}
- <text class="order-title-left">{$v['dep_name']}运送订单</text>
- {elseif($v['work_type_mode']) == 4}
- <text class="order-title-left">{$v['dep_name']}安保订单</text>
- {elseif($v['work_type_mode']) == 15}
- <text class="order-title-left">{$v['dep_name']}品质整改订单</text>
- {/if}
- <text class="order-title-right" style="color: #2878FF">{$v['out_content']}</text>
- </div>
- <div class="order-content">
- <div class="order-content-time">
- <text>申请时间:</text><text>{$v['create_time']}</text>
- </div>
- <div class="order-content-name">
- <text>申请人姓名:</text><text>{$v['user_name']}</text>
- </div>
- </div>
- </div>
- {/foreach}
- </div>
- </div>
- {else /}
- <div class="nulldata">
- <img src="/public/img/nulldata.png" alt="">
- <div class="nulldata-text">空空如也 ~</div>
- </div>
- {/if}
- <div class="footer-back">
- <a href="javascript:;" onclick="javascript:history.back(-1);"><img src="/img/back.png"></a>
- </div>
- </body>
- </html>
- <script>
- function orderDetails(obj) {
- var objthis = $(obj);
- var id = $(objthis).attr('data-id');
- var orgId = $(objthis).attr('data-orgId');
- var url = "{:url('Statistics/ordersDetails')}?id="+id+'&orgId='+orgId;
- window.location.href=url;
- }
- </script>
- <script>
- var type = '<?=$type?>';
- var orgId = '<?=$orgId?>';
- var day= '<?=$day?>';
- var mode= '<?=$mode?>';
- var count= '<?=count($list)?>';
- $(function(){
- // 页数
- var page = 1;
- // 每页展示20个
- var size = 20;
- // dropload
- $('.container').dropload({
- scrollArea : window,
- domDown : {
- domClass : 'dropload-down',
- domRefresh : '<div class="dropload-refresh">↑上拉加载更多</div>',
- domLoad : '<div class="dropload-load"><span class="loading"></span>加载中...</div>',
- domNoData : '<div class="dropload-noData"></div>'
- },
- loadDownFn : function(me){
- page++;
- // 拼接HTML
- var result = '';
- var url="{:url('Statistics/ordersList')}";
- $.ajax({
- type: 'GET',
- url: url+'?page='+page+'&size='+size+'&type='+type+'&orgId='+orgId+'&day='+day+'&mode='+mode+'&dropload=1',
- dataType: 'json',
- success: function(res){
- var data = res.data;
- var arrLen = data.length;
- console.log(data,arrLen,111111111)
- if(arrLen > 0){
- for(var i = 0; i < data.length; i++){
- if(arrLen > 0){
- result +='<div class="order-all" onclick="orderDetails(this)" data-id="'+data[i].id+'" data-orgId="'+data[i].org_id+'">';
- result +='<div class="order-title">';
- if(data[i].order_mode ==1){
- result +='<img src="/img/pending2x.png" alt="">';
- }
- if(data[i].order_mode ==2 || data[i].order_mode ==3){
- result +='<img src="/img/cancel2x.png" alt="">';
- }
- if(data[i].order_mode ==4){
- result +='<img src="/img/distribute2x.png" alt="">';
- }
- if(data[i].order_mode ==5){
- result +='<img src="/img/wancheng2x.png" alt="">';
- }
- if(data[i].order_mode ==6){
- result +='<img src="/img/yipingjia2x.png" alt="">';
- }
- if(data[i].work_type_mode ==1){
- result +='<text class="order-title-left">'+data[i].dep_name+'报修订单</text>';
- }
- if(data[i].work_type_mode ==2){
- result +='<text class="order-title-left">'+data[i].dep_name+'保洁订单</text>';
- }
- if(data[i].work_type_mode ==3){
- result +='<text class="order-title-left">'+data[i].dep_name+'运送订单</text>';
- }
- if(data[i].work_type_mode ==4){
- result +='<text class="order-title-left">'+data[i].dep_name+'安保订单</text>';
- }
- if(data[i].work_type_mode ==15){
- result +='<text class="order-title-left">'+data[i].dep_name+'品质整改订单</text>';
- }
- result +='<text class="order-title-right" style="color: #2878FF">'+data[i].out_content+'</text>';
- result +='</div>';
- result +='<div class="order-content">';
- result +='<div class="order-content-time">';
- result +='<text>申请时间:</text><text>'+data[i].create_time+'</text>';
- result +='</div>';
- result +='<div class="order-content-name">';
- result +='<text>申请人姓名:</text><text>'+data[i].user_name+'</text>';
- result +='</div>';
- result +='</div>';
- result +='</div>';
- }
- }
- // 如果没有数据
- }else{
- // 锁定
- me.lock();
- // 无数据
- me.noData();
- }
- //延迟1秒加载
- setTimeout(function(){
- // 插入数据到页面,放到最后面
- $('.order-lists').append(result);
- // 每次数据插入,必须重置
- me.resetload();
- },1000);
- },
- error: function(xhr, type){
- // 即使加载出错,也得重置
- me.resetload();
- }
- });
- },
- threshold : 50
- });
- });
- </script>
|