|
@@ -1349,9 +1349,13 @@ class Dhorder
|
|
|
}
|
|
|
$where['type'] = '1,2';
|
|
|
$res = $this->head(1);
|
|
|
- $header = array('基础信息', '', '', '', '','', '', '', '', '','');
|
|
|
+ $header = array('基础信息', '', '', '', '','', '', '', '', '');
|
|
|
$body = array();
|
|
|
- $body[] = array('序号', '代理商姓名', '角色', '电话', '区域','应收合计', '月份', '代理费', '产品费(商品)', '产品费(电器卡)','产品费(菜卡)');
|
|
|
+ $pg = Dever::input('pg');
|
|
|
+ if ($pg == 1) {
|
|
|
+ $body[] = array('代理商姓名', '角色', '电话', '区域','应收合计', '月份', '代理费', '产品费(商品)', '产品费(电器卡)','产品费(菜卡)');
|
|
|
+ }
|
|
|
+
|
|
|
$i = 0;
|
|
|
foreach ($res[0] as $k => $v) {
|
|
|
if ($i == 0) {
|
|
@@ -1360,16 +1364,16 @@ class Dhorder
|
|
|
$header[] = '';
|
|
|
}
|
|
|
|
|
|
- $body[0][] = $v[0];
|
|
|
+ isset($body[0]) && $body[0][] = $v[0];
|
|
|
if ($v[1]) {
|
|
|
- $body[0][] = $v[1];
|
|
|
+ isset($body[0]) && $body[0][] = $v[1];
|
|
|
$header[] = '';
|
|
|
}
|
|
|
$i++;
|
|
|
}
|
|
|
$i = 0;
|
|
|
foreach ($res[1] as $k => $v) {
|
|
|
- $body[0][] = $v;
|
|
|
+ isset($body[0]) && $body[0][] = $v;
|
|
|
if ($i == 0) {
|
|
|
$header[] = '兑换权益';
|
|
|
} else {
|
|
@@ -1379,7 +1383,7 @@ class Dhorder
|
|
|
}
|
|
|
$i = 0;
|
|
|
foreach ($res[2] as $k => $v) {
|
|
|
- $body[0][] = $v;
|
|
|
+ isset($body[0]) && $body[0][] = $v;
|
|
|
if ($i == 0) {
|
|
|
$header[] = '使用金额';
|
|
|
} else {
|
|
@@ -1414,7 +1418,6 @@ class Dhorder
|
|
|
|
|
|
$d = array
|
|
|
(
|
|
|
- count($body),
|
|
|
$member['name'],
|
|
|
$role['name'],
|
|
|
$member['mobile'],
|
|
@@ -1462,10 +1465,10 @@ class Dhorder
|
|
|
$i++;
|
|
|
}
|
|
|
$heji = $order['agent_cash'] + $product_cash + $dianqi_cash + $caipin_cash;
|
|
|
- $d[5] = $heji;
|
|
|
- $d[8] = $product_cash;
|
|
|
- $d[9] = $dianqi_cash;
|
|
|
- $d[10] = $caipin_cash;
|
|
|
+ $d[4] = $heji;
|
|
|
+ $d[7] = $product_cash;
|
|
|
+ $d[8] = $dianqi_cash;
|
|
|
+ $d[9] = $caipin_cash;
|
|
|
|
|
|
foreach ($res[1] as $k1 => $v1) {
|
|
|
$d[$i] = 0;
|