Commit f2f7f5cb645f3bb240c2c30dbf7438945e9225ed

Authored by teemitop
1 parent 4739d4ef

bug修复

... ... @@ -14,7 +14,7 @@ class Seller extends Common
$key= input('post.key') ? input('post.key') : "";
$limit = '&x='.$data["page"].'&y='.$data["limit"].'&keywords='.@$key['id'];
//获取运营人员列表
$list= file_get_contents(UNDER_LINE.'App.Seller.GetSellerList'.$limit);
$list= file_get_contents(ON_LINE.'App.Seller.GetSellerList'.$limit);
$array = json_decode($list,TRUE);
foreach ($array['data'][0]['data'] as $key => $value) {
$array['data'][0]['data'][$key]['cdate'] = date("Y-m-d H:i:s",$value['cdate']);
... ... @@ -78,7 +78,15 @@ class Seller extends Common
$new_array[$key]['sms_send_count'] = $value['appSmsCount'] + $value['AndroidSmsCount'].'('.$value['appSmsCount'] .'/'. $value['AndroidSmsCount'].')';
}
}
return $result = ['code'=>0,'msg'=>'获取成功!','data'=>$new_array,'count'=>$array['data']['total'],'countReserve'=>$array['data']['countReserve'],'countSms'=>$array['data']['countSms'],'rel'=>1];
return $result = [
'code'=>0,'msg'=>'获取成功!',
'data'=>$new_array,
'count'=>$array['data']['total'],
'countReserve'=>$array['data']['countReserve'],
'countSms'=>$array['data']['countSms'],
'inviteeCount'=>$array['data']['inviteeCount'],
'rel'=>1
];
}
$this->assign ( 'title','预定订单统计');
return $this->fetch();
... ... @@ -97,15 +105,22 @@ class Seller extends Common
$stime = $data['stime'] ? strtotime(date($data['stime'],time())) : '';
$etime = $data['etime'] ? strtotime(date($data['etime'],time())) : '';
$parame = '&page='.$data["page"].'&size='.$data["limit"].'&sellername='.@$sellername.'&stime='.@$stime.'&etime='.@$etime.'&type='.@$data['channel'].'&sid='.$sid;
$parame = '&page='.$data["page"].'&size='.$data["limit"].'&sellername='.@$sellername.'&stime='.@$stime.'&etime='.@$etime.'&type='.@$data['channel'].'&sid='.$sid.'&time_type='.@$data['time_type'];
//获取运营人员列表
$list= file_get_contents(UNDER_LINE.'App.Report.GetReserveData'.$parame);
$array = json_decode($list,TRUE);
$new_array = array();
foreach ($array['data'] as $key => $value) {
$array['data'][$key]['reserve_count'] = $value['appReserveCount'] + $value['AndroidReserveCount'].'('.$value['appReserveCount'] .'/'. $value['AndroidReserveCount'].')';
$array['data'][$key]['sms_send_count'] = $value['appbatchNoticeCount'] + $value['AndroidbatchNoticeCount'].'('.$value['appbatchNoticeCount'] .'/'. $value['AndroidbatchNoticeCount'].')';
if(is_array($value)){
$new_array[$key]['id'] = $value['id'];
$new_array[$key]['sellername'] = $value['sellername'];
$new_array[$key]['inviting'] = $value['inviting'];
$new_array[$key]['reserve_count'] = $value['appReserveCount'] + $value['AndroidReserveCount'].'('.$value['appReserveCount'] .'/'. $value['AndroidReserveCount'].')';
$new_array[$key]['sms_send_count'] = $value['appSmsCount'] + $value['AndroidSmsCount'].'('.$value['appSmsCount'] .'/'. $value['AndroidSmsCount'].')';
}
}
return $result = ['code'=>0,'msg'=>'获取成功!','data'=>$array['data'],'count'=>$array['data'][0]['total'],'rel'=>1];
return $result = ['code'=>0,'msg'=>'获取成功!','data'=>$new_array,'count'=>$array['data']['total'],'countReserve'=>$array['data']['countReserve'],'countSms'=>$array['data']['countSms'],'rel'=>1];
}
$this->assign ( 'title','预定订单统计');
return $this->fetch();
... ...
... ... @@ -3,13 +3,20 @@
<fieldset class="layui-elem-field layui-field-title">
<legend>{:$title}</legend>
</fieldset>
<blockquote class="layui-elem-quote">
<a href="{:url('Seller/getStatistics')}" class="layui-btn layui-btn-sm">
<i class="fa fa-file-image-o"></i> 商家维度
</a>
<a href="javascript:void(0);" class="layui-btn layui-btn-sm layui-btn-danger">
<i class="fa fa-file-image-o"></i> 设备维度
</a>
</blockquote>
<div class="demoTable">
商家:
<div class="layui-input-inline">
<input class="layui-input" name="key" id="key" placeholder="{:lang('pleaseEnter')}店铺名称" autocomplete="off">
</div>
日期时间范围:
日期范围:
<div class="layui-input-inline" >
<!--<input type="text" style = "width:300px"; class="layui-input" id="time" placeholder="默认为当天的统计情况">-->
<input type="text" class="layui-input" id="stime" placeholder="开始日期">
... ... @@ -28,6 +35,15 @@
</select>
</div>
</div>
筛选条件:
<div class="layui-input-inline layui-form">
<div class="layui-input-8">
<select name="class" id="time_type" lay-filter="myselect">
<option value="1">录入时间</option>
<option value="2">到店时间</option>
</select>
</div>
</div>
地区:
<div class="layui-input-inline">
<input type="text" class="layui-input" id="area" placeholder="地区暂未开放">
... ... @@ -37,10 +53,8 @@
<table class="layui-table" id="list" lay-filter="list"></table>
</div>
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<span class="layui-btn layui-btn-sm">订单总数:<i id="count">X</i>条</span>
<span class="layui-btn layui-btn-sm">短信发送数量:<i id="size">Y</i>条</span>
</div>
<span>订单总数:<i id="count">X</i>条</span>
<span>短信发送数量:<i id="size">Y</i>条</span>
</script>
{include file="common/foot"/}
<script>
... ... @@ -56,21 +70,21 @@
toolbar: '#toolbarDemo',
cols: [[
{checkbox:true,fixed: true},
{field: 'id', title: '{:lang("id")}', width:60, fixed: true},
{field: 'sellername', title: '设备编号', width: 150},
{field: 'reserve_count', align: 'center', title: 'APP版本', sort: true, width: 250},
{field: 'sms_send_count', align: 'center',title: '所属商家', sort: true, width: 250},
{field: 'inviting', align: 'center',title: '产生订单量', width: 160, sort: true},
{field: 'inviting', align: 'center',title: '短信发送量', width: 160, sort: true},
{field: 'id', title: '{:lang("id")}', width:103, fixed: true},
{field: 'sellername', title: '设备编号', width: 350},
{field: 'reserve_count', align: 'center', title: 'APP版本', width: 250},
{field: 'sms_send_count', align: 'center',title: '所属商家', width: 250},
{field: 'inviting', align: 'center',title: '产生订单量', width: 290, sort: true},
{field: 'inviting', align: 'center',title: '短信发送量', width: 290, sort: true},
]],
done: function(res, curr, count){
$('#count').html(res.count);
$('#size').html(res.count);
$('#count').html(res.countReserve);
$('#size').html(res.countSms);
}
,id: 'testReload'
,page: true
,height: 'full-200'
,width:1276
,width:1590
});
//日期时间范围
... ... @@ -103,8 +117,11 @@
//商家来源
var channel = $('#channel').val();
console.log(channel);
//筛选条件
var time_type = $('#time_type').val();
console.log(time_type);
//传参
tableIn.reload({ page: {page: 1},where: {key: key,sid: a,stime: stime,etime: etime,channel: channel}});
tableIn.reload({ page: {page: 1},where: {key: key,sid: a,stime: stime,time_type: time_type,etime: etime,channel: channel}});
});
var $ = layui.$, active = {
... ...
... ... @@ -3,7 +3,14 @@
<fieldset class="layui-elem-field layui-field-title">
<legend>{:$title}</legend>
</fieldset>
<blockquote class="layui-elem-quote">
<a href="javascript:void(0);" class="layui-btn layui-btn-sm layui-btn-danger">
<i class="fa fa-file-image-o"></i> 商家维度
</a>
<a href="{:url('Seller/getEquipment')}" class="layui-btn layui-btn-sm">
<i class="fa fa-file-image-o"></i> 设备维度
</a>
</blockquote>
<div class="demoTable">
商家:
<div class="layui-input-inline">
... ... @@ -48,6 +55,7 @@
<script type="text/html" id="toolbarDemo">
<span>订单总数:<i id="count">X</i>条</span>
<span>短信发送数量:<i id="size">Y</i>条</span>
<span>邀请总数:<i id="invitee">Z</i>条</span>
</script>
{include file="common/foot"/}
<script>
... ... @@ -72,6 +80,7 @@
done: function(res, curr, count){
$('#count').html(res.countReserve);
$('#size').html(res.countSms);
$('#invitee').html(res.inviteeCount);
}
,id: 'testReload'
,page: true
... ...
... ... @@ -45,6 +45,7 @@
{field: 'phone', title: '商家电话', width: 150},
{field: 'map_address', title: '商家地址', width: 300},
{field: 'last_num', align: 'center',title: '短信余量', width: 120},
{field: 'dz_version', align: 'center',title: 'APP版本号', width: 120},
{field: 'statusVal', align: 'center',title: '状态', width: 120},
{field: 'user_name', align: 'center',title: '创建人', width: 120},
{field: 'cdate', align: 'center',title: '创建日期', width: 180},
... ...