Commit c3fe7cb8 authored by zhuwei's avatar zhuwei

bug,代码优化

parent a6e4648f
......@@ -63,11 +63,11 @@ class Performance extends Basic
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
// $params = array(
// "type" => 3, //1表示个人业绩排行 2门店 3区域
//// "end_day" => "",
//// "start_day" =>"",
// );
/*$params = array(
"type" => 3, //1表示个人业绩排行 2门店 3区域
"end_day" => "",
"start_day" =>"",
);*/
$params["type"] = 3;
......@@ -104,10 +104,10 @@ class Performance extends Basic
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
// $params = array(
// "start_day" => '2018-08-08',
// "end_day" => '2018-08-08',
// );
/*$params = array(
"start_day" => '2018-08-08',
"end_day" => '2018-08-08',
);*/
$params["type"] = 2;
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
......@@ -139,11 +139,11 @@ class Performance extends Basic
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
// $params = array(
// "type" => 1, //1表示个人业绩排行 2门店 3区域
// // "end_day" => "",
// // "start_day" =>"",
// );
/* $params = array(
"type" => 1, //1表示个人业绩排行 2门店 3区域
"end_day" => "",
"start_day" => "",
);*/
$params["type"] = 1;
......
......@@ -157,8 +157,6 @@ class PerformanceInfo extends Basic
$where['Agent.phone'] = ['like', '%'.$this->params['phone'].'%'];
}
$field = 'Obargain.create_time,';
$field .= 'Obargain.trade_type,';
$field .= 'Houses.landmark,';
......@@ -178,7 +176,6 @@ class PerformanceInfo extends Basic
$export = new ExportExcelUntil();
foreach ($return as $key => $v) {
$e_data_old['create_time'] = $v['create_time'];//提交时间
......@@ -191,9 +188,8 @@ class PerformanceInfo extends Basic
}else{
$e_data_old['trade_type'] = "好处费";
}
$e_data_old['landmark'] = $v['landmark'];//商铺地址
$e_data_old['house_id'] = $v['house_id'];//商铺编号
$e_data_old['house_id'] = $v['house_id'];//商铺编号
$e_data_old['name_phone'] = $v['name'].'-'.$v['phone'];//分佣提成方
$e_data_old['district_name'] = $v['district_name'].'-'.$v['store_name'];//所属部门
$e_data_old['scale'] = $v['scale'];//分佣比例
......@@ -202,10 +198,7 @@ class PerformanceInfo extends Basic
$e_data_new[]=$e_data_old;
}
$title = [ '提交时间', '成交类型', '商铺地址', '商铺编号', '分佣提成方', '所属部门门店', '分佣比例', '应收佣金', '实收佣金' ];
$export->exportTable('业绩明细', $e_data_new, 10, '业绩明细表', $title);
return '';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment