|
@@ -314,9 +314,13 @@ class FinancialManager extends Base{
|
|
|
"goodNo"=>"","inv_number"=>"","inv_buyer_code"=>"",'inv_seller_code'=>"",'channel'=>[1],'status'=>"","start"=>"","end"=>"",
|
|
|
"page"=>1,"size"=>15],"post","trim");
|
|
|
$where=[];
|
|
|
+ $headeIndex =0;
|
|
|
if($param['code']!="") $where[]= ["code","=","%{$param['code']}%"];
|
|
|
if(!empty($param['type'])) $where[]= ["type","in",$param['type']];
|
|
|
- if(!empty($param['channel'])) $where[]= ["channel","in",$param['channel']];
|
|
|
+ if(!empty($param['channel'])) {
|
|
|
+ $where[]= ["channel","in",$param['channel']];
|
|
|
+ if(in_array(3,$param['channel'])) $headeIndex =2;
|
|
|
+ }
|
|
|
if($param['status']!="") $where[]= ["status","in",$param['status']];
|
|
|
if($param['start']!="") $where[]= ["create_time",">=",startTime($param['start'])];
|
|
|
if($param['end']!="") $where[]= ["create_time","<=",endTime($param['end'])];
|
|
@@ -352,7 +356,7 @@ class FinancialManager extends Base{
|
|
|
];
|
|
|
|
|
|
$list = $this->model
|
|
|
- ->field($fields[$param['channel']-1])
|
|
|
+ ->field($fields[$headeIndex])
|
|
|
->where($where)
|
|
|
->order("id desc")
|
|
|
->select()->each(function (&$item){
|
|
@@ -361,6 +365,6 @@ class FinancialManager extends Base{
|
|
|
$item['goodType'] = \app\cxinv\model\FinancialManager::$ManagerGoodType[$item['goodType']]??"";
|
|
|
if(isset($item['inv_type'])) $item['inv_type'] =\app\cxinv\model\Invoice::$invoiceType[$item['inv_type']]??"";
|
|
|
})->toArray();
|
|
|
- exportExcel($list,$heade[$param['channel']-1],"manager");
|
|
|
+ exportExcel($list,$heade[$headeIndex],"manager");
|
|
|
}
|
|
|
}
|