Commit f2f7f5cb645f3bb240c2c30dbf7438945e9225ed

Authored by teemitop
1 parent 4739d4ef

bug修复

@@ -14,7 +14,7 @@ class Seller extends Common @@ -14,7 +14,7 @@ class Seller extends Common
14 $key= input('post.key') ? input('post.key') : ""; 14 $key= input('post.key') ? input('post.key') : "";
15 $limit = '&x='.$data["page"].'&y='.$data["limit"].'&keywords='.@$key['id']; 15 $limit = '&x='.$data["page"].'&y='.$data["limit"].'&keywords='.@$key['id'];
16 //获取运营人员列表 16 //获取运营人员列表
17 - $list= file_get_contents(UNDER_LINE.'App.Seller.GetSellerList'.$limit); 17 + $list= file_get_contents(ON_LINE.'App.Seller.GetSellerList'.$limit);
18 $array = json_decode($list,TRUE); 18 $array = json_decode($list,TRUE);
19 foreach ($array['data'][0]['data'] as $key => $value) { 19 foreach ($array['data'][0]['data'] as $key => $value) {
20 $array['data'][0]['data'][$key]['cdate'] = date("Y-m-d H:i:s",$value['cdate']); 20 $array['data'][0]['data'][$key]['cdate'] = date("Y-m-d H:i:s",$value['cdate']);
@@ -78,7 +78,15 @@ class Seller extends Common @@ -78,7 +78,15 @@ class Seller extends Common
78 $new_array[$key]['sms_send_count'] = $value['appSmsCount'] + $value['AndroidSmsCount'].'('.$value['appSmsCount'] .'/'. $value['AndroidSmsCount'].')'; 78 $new_array[$key]['sms_send_count'] = $value['appSmsCount'] + $value['AndroidSmsCount'].'('.$value['appSmsCount'] .'/'. $value['AndroidSmsCount'].')';
79 } 79 }
80 } 80 }
81 - return $result = ['code'=>0,'msg'=>'获取成功!','data'=>$new_array,'count'=>$array['data']['total'],'countReserve'=>$array['data']['countReserve'],'countSms'=>$array['data']['countSms'],'rel'=>1]; 81 + return $result = [
  82 + 'code'=>0,'msg'=>'获取成功!',
  83 + 'data'=>$new_array,
  84 + 'count'=>$array['data']['total'],
  85 + 'countReserve'=>$array['data']['countReserve'],
  86 + 'countSms'=>$array['data']['countSms'],
  87 + 'inviteeCount'=>$array['data']['inviteeCount'],
  88 + 'rel'=>1
  89 + ];
82 } 90 }
83 $this->assign ( 'title','预定订单统计'); 91 $this->assign ( 'title','预定订单统计');
84 return $this->fetch(); 92 return $this->fetch();
@@ -97,15 +105,22 @@ class Seller extends Common @@ -97,15 +105,22 @@ class Seller extends Common
97 $stime = $data['stime'] ? strtotime(date($data['stime'],time())) : ''; 105 $stime = $data['stime'] ? strtotime(date($data['stime'],time())) : '';
98 $etime = $data['etime'] ? strtotime(date($data['etime'],time())) : ''; 106 $etime = $data['etime'] ? strtotime(date($data['etime'],time())) : '';
99 107
100 - $parame = '&page='.$data["page"].'&size='.$data["limit"].'&sellername='.@$sellername.'&stime='.@$stime.'&etime='.@$etime.'&type='.@$data['channel'].'&sid='.$sid; 108 + $parame = '&page='.$data["page"].'&size='.$data["limit"].'&sellername='.@$sellername.'&stime='.@$stime.'&etime='.@$etime.'&type='.@$data['channel'].'&sid='.$sid.'&time_type='.@$data['time_type'];
101 //获取运营人员列表 109 //获取运营人员列表
102 $list= file_get_contents(UNDER_LINE.'App.Report.GetReserveData'.$parame); 110 $list= file_get_contents(UNDER_LINE.'App.Report.GetReserveData'.$parame);
  111 +
103 $array = json_decode($list,TRUE); 112 $array = json_decode($list,TRUE);
  113 + $new_array = array();
104 foreach ($array['data'] as $key => $value) { 114 foreach ($array['data'] as $key => $value) {
105 - $array['data'][$key]['reserve_count'] = $value['appReserveCount'] + $value['AndroidReserveCount'].'('.$value['appReserveCount'] .'/'. $value['AndroidReserveCount'].')';  
106 - $array['data'][$key]['sms_send_count'] = $value['appbatchNoticeCount'] + $value['AndroidbatchNoticeCount'].'('.$value['appbatchNoticeCount'] .'/'. $value['AndroidbatchNoticeCount'].')'; 115 + if(is_array($value)){
  116 + $new_array[$key]['id'] = $value['id'];
  117 + $new_array[$key]['sellername'] = $value['sellername'];
  118 + $new_array[$key]['inviting'] = $value['inviting'];
  119 + $new_array[$key]['reserve_count'] = $value['appReserveCount'] + $value['AndroidReserveCount'].'('.$value['appReserveCount'] .'/'. $value['AndroidReserveCount'].')';
  120 + $new_array[$key]['sms_send_count'] = $value['appSmsCount'] + $value['AndroidSmsCount'].'('.$value['appSmsCount'] .'/'. $value['AndroidSmsCount'].')';
  121 + }
107 } 122 }
108 - return $result = ['code'=>0,'msg'=>'获取成功!','data'=>$array['data'],'count'=>$array['data'][0]['total'],'rel'=>1]; 123 + return $result = ['code'=>0,'msg'=>'获取成功!','data'=>$new_array,'count'=>$array['data']['total'],'countReserve'=>$array['data']['countReserve'],'countSms'=>$array['data']['countSms'],'rel'=>1];
109 } 124 }
110 $this->assign ( 'title','预定订单统计'); 125 $this->assign ( 'title','预定订单统计');
111 return $this->fetch(); 126 return $this->fetch();
@@ -3,13 +3,20 @@ @@ -3,13 +3,20 @@
3 <fieldset class="layui-elem-field layui-field-title"> 3 <fieldset class="layui-elem-field layui-field-title">
4 <legend>{:$title}</legend> 4 <legend>{:$title}</legend>
5 </fieldset> 5 </fieldset>
6 - 6 + <blockquote class="layui-elem-quote">
  7 + <a href="{:url('Seller/getStatistics')}" class="layui-btn layui-btn-sm">
  8 + <i class="fa fa-file-image-o"></i> 商家维度
  9 + </a>
  10 + <a href="javascript:void(0);" class="layui-btn layui-btn-sm layui-btn-danger">
  11 + <i class="fa fa-file-image-o"></i> 设备维度
  12 + </a>
  13 + </blockquote>
7 <div class="demoTable"> 14 <div class="demoTable">
8 商家: 15 商家:
9 <div class="layui-input-inline"> 16 <div class="layui-input-inline">
10 <input class="layui-input" name="key" id="key" placeholder="{:lang('pleaseEnter')}店铺名称" autocomplete="off"> 17 <input class="layui-input" name="key" id="key" placeholder="{:lang('pleaseEnter')}店铺名称" autocomplete="off">
11 </div> 18 </div>
12 - 日期时间范围: 19 + 日期范围:
13 <div class="layui-input-inline" > 20 <div class="layui-input-inline" >
14 <!--<input type="text" style = "width:300px"; class="layui-input" id="time" placeholder="默认为当天的统计情况">--> 21 <!--<input type="text" style = "width:300px"; class="layui-input" id="time" placeholder="默认为当天的统计情况">-->
15 <input type="text" class="layui-input" id="stime" placeholder="开始日期"> 22 <input type="text" class="layui-input" id="stime" placeholder="开始日期">
@@ -28,6 +35,15 @@ @@ -28,6 +35,15 @@
28 </select> 35 </select>
29 </div> 36 </div>
30 </div> 37 </div>
  38 + 筛选条件:
  39 + <div class="layui-input-inline layui-form">
  40 + <div class="layui-input-8">
  41 + <select name="class" id="time_type" lay-filter="myselect">
  42 + <option value="1">录入时间</option>
  43 + <option value="2">到店时间</option>
  44 + </select>
  45 + </div>
  46 + </div>
31 地区: 47 地区:
32 <div class="layui-input-inline"> 48 <div class="layui-input-inline">
33 <input type="text" class="layui-input" id="area" placeholder="地区暂未开放"> 49 <input type="text" class="layui-input" id="area" placeholder="地区暂未开放">
@@ -37,10 +53,8 @@ @@ -37,10 +53,8 @@
37 <table class="layui-table" id="list" lay-filter="list"></table> 53 <table class="layui-table" id="list" lay-filter="list"></table>
38 </div> 54 </div>
39 <script type="text/html" id="toolbarDemo"> 55 <script type="text/html" id="toolbarDemo">
40 - <div class="layui-btn-container">  
41 - <span class="layui-btn layui-btn-sm">订单总数:<i id="count">X</i>条</span>  
42 - <span class="layui-btn layui-btn-sm">短信发送数量:<i id="size">Y</i>条</span>  
43 - </div> 56 + <span>订单总数:<i id="count">X</i>条</span>
  57 + <span>短信发送数量:<i id="size">Y</i>条</span>
44 </script> 58 </script>
45 {include file="common/foot"/} 59 {include file="common/foot"/}
46 <script> 60 <script>
@@ -56,21 +70,21 @@ @@ -56,21 +70,21 @@
56 toolbar: '#toolbarDemo', 70 toolbar: '#toolbarDemo',
57 cols: [[ 71 cols: [[
58 {checkbox:true,fixed: true}, 72 {checkbox:true,fixed: true},
59 - {field: 'id', title: '{:lang("id")}', width:60, fixed: true},  
60 - {field: 'sellername', title: '设备编号', width: 150},  
61 - {field: 'reserve_count', align: 'center', title: 'APP版本', sort: true, width: 250},  
62 - {field: 'sms_send_count', align: 'center',title: '所属商家', sort: true, width: 250},  
63 - {field: 'inviting', align: 'center',title: '产生订单量', width: 160, sort: true},  
64 - {field: 'inviting', align: 'center',title: '短信发送量', width: 160, sort: true}, 73 + {field: 'id', title: '{:lang("id")}', width:103, fixed: true},
  74 + {field: 'sellername', title: '设备编号', width: 350},
  75 + {field: 'reserve_count', align: 'center', title: 'APP版本', width: 250},
  76 + {field: 'sms_send_count', align: 'center',title: '所属商家', width: 250},
  77 + {field: 'inviting', align: 'center',title: '产生订单量', width: 290, sort: true},
  78 + {field: 'inviting', align: 'center',title: '短信发送量', width: 290, sort: true},
65 ]], 79 ]],
66 done: function(res, curr, count){ 80 done: function(res, curr, count){
67 - $('#count').html(res.count);  
68 - $('#size').html(res.count); 81 + $('#count').html(res.countReserve);
  82 + $('#size').html(res.countSms);
69 } 83 }
70 ,id: 'testReload' 84 ,id: 'testReload'
71 ,page: true 85 ,page: true
72 ,height: 'full-200' 86 ,height: 'full-200'
73 - ,width:1276 87 + ,width:1590
74 }); 88 });
75 89
76 //日期时间范围 90 //日期时间范围
@@ -103,8 +117,11 @@ @@ -103,8 +117,11 @@
103 //商家来源 117 //商家来源
104 var channel = $('#channel').val(); 118 var channel = $('#channel').val();
105 console.log(channel); 119 console.log(channel);
  120 + //筛选条件
  121 + var time_type = $('#time_type').val();
  122 + console.log(time_type);
106 //传参 123 //传参
107 - tableIn.reload({ page: {page: 1},where: {key: key,sid: a,stime: stime,etime: etime,channel: channel}}); 124 + tableIn.reload({ page: {page: 1},where: {key: key,sid: a,stime: stime,time_type: time_type,etime: etime,channel: channel}});
108 }); 125 });
109 126
110 var $ = layui.$, active = { 127 var $ = layui.$, active = {
@@ -3,7 +3,14 @@ @@ -3,7 +3,14 @@
3 <fieldset class="layui-elem-field layui-field-title"> 3 <fieldset class="layui-elem-field layui-field-title">
4 <legend>{:$title}</legend> 4 <legend>{:$title}</legend>
5 </fieldset> 5 </fieldset>
6 - 6 + <blockquote class="layui-elem-quote">
  7 + <a href="javascript:void(0);" class="layui-btn layui-btn-sm layui-btn-danger">
  8 + <i class="fa fa-file-image-o"></i> 商家维度
  9 + </a>
  10 + <a href="{:url('Seller/getEquipment')}" class="layui-btn layui-btn-sm">
  11 + <i class="fa fa-file-image-o"></i> 设备维度
  12 + </a>
  13 + </blockquote>
7 <div class="demoTable"> 14 <div class="demoTable">
8 商家: 15 商家:
9 <div class="layui-input-inline"> 16 <div class="layui-input-inline">
@@ -48,6 +55,7 @@ @@ -48,6 +55,7 @@
48 <script type="text/html" id="toolbarDemo"> 55 <script type="text/html" id="toolbarDemo">
49 <span>订单总数:<i id="count">X</i>条</span> 56 <span>订单总数:<i id="count">X</i>条</span>
50 <span>短信发送数量:<i id="size">Y</i>条</span> 57 <span>短信发送数量:<i id="size">Y</i>条</span>
  58 + <span>邀请总数:<i id="invitee">Z</i>条</span>
51 </script> 59 </script>
52 {include file="common/foot"/} 60 {include file="common/foot"/}
53 <script> 61 <script>
@@ -72,6 +80,7 @@ @@ -72,6 +80,7 @@
72 done: function(res, curr, count){ 80 done: function(res, curr, count){
73 $('#count').html(res.countReserve); 81 $('#count').html(res.countReserve);
74 $('#size').html(res.countSms); 82 $('#size').html(res.countSms);
  83 + $('#invitee').html(res.inviteeCount);
75 } 84 }
76 ,id: 'testReload' 85 ,id: 'testReload'
77 ,page: true 86 ,page: true
@@ -45,6 +45,7 @@ @@ -45,6 +45,7 @@
45 {field: 'phone', title: '商家电话', width: 150}, 45 {field: 'phone', title: '商家电话', width: 150},
46 {field: 'map_address', title: '商家地址', width: 300}, 46 {field: 'map_address', title: '商家地址', width: 300},
47 {field: 'last_num', align: 'center',title: '短信余量', width: 120}, 47 {field: 'last_num', align: 'center',title: '短信余量', width: 120},
  48 + {field: 'dz_version', align: 'center',title: 'APP版本号', width: 120},
48 {field: 'statusVal', align: 'center',title: '状态', width: 120}, 49 {field: 'statusVal', align: 'center',title: '状态', width: 120},
49 {field: 'user_name', align: 'center',title: '创建人', width: 120}, 50 {field: 'user_name', align: 'center',title: '创建人', width: 120},
50 {field: 'cdate', align: 'center',title: '创建日期', width: 180}, 51 {field: 'cdate', align: 'center',title: '创建日期', width: 180},