|
@@ -326,7 +326,7 @@ class OrderPay extends Base{
|
|
|
->select()
|
|
|
->toArray();
|
|
|
$value['child'] = $data;
|
|
|
- $value['companyName'] = Db::name("supplier_info")->where(["code" => $value['companyNo']])->value("name", "");
|
|
|
+ $value['companyName'] = Db::name('company_info')->where(['companyNo' => $value['companyNo']])->value('company_name', '');
|
|
|
}
|
|
|
return app_show(0,"获取成功",["list"=>$list,"count"=>$count]);
|
|
|
}
|
|
@@ -910,30 +910,6 @@ class OrderPay extends Base{
|
|
|
// return ['code' => 1003, "msg" => '对方户名不能为空'];
|
|
|
return error_show( 1003, '第'.($key+1).'行对方户名不能为空!');
|
|
|
}
|
|
|
-// if ($key == 0) {
|
|
|
-// if ($value[0] != '收款方公司编号') {
|
|
|
-// // return ['code' => 1003, "msg" => '模板第一列为必须为交易时间!'];
|
|
|
-// return error_show( 1003, '模板第一列为必须为收款方公司编号!');
|
|
|
-// }
|
|
|
-// if ($value[4] != '收入金额') {
|
|
|
-// // return ['code' => 1003, "msg" => '模板第二列为必须为收入金额!'];
|
|
|
-// return error_show( 1003, '模板第五列为必须为收入金额!');
|
|
|
-// }
|
|
|
-//
|
|
|
-// if ($value[6] != '交易行名') {
|
|
|
-// //return ['code' => 1003, "msg" => '模板第五列为必须为交易行名!'];
|
|
|
-// return error_show( 1003, '模板第七列为必须为交易行名!');
|
|
|
-// }
|
|
|
-// if ($value[8] != '对方账号') {
|
|
|
-// // return ['code' => 1003, "msg" => '模板第七列为必须为对方账号!'];
|
|
|
-// return error_show( 1003, '模板第九列为必须为对方账号!');
|
|
|
-// }
|
|
|
-// if ($value[9] != '对方户名') {
|
|
|
-// // return ['code' => 1003, "msg" => '模板第八列为必须为对方户名!'];
|
|
|
-// return error_show( 1003, '模板第十列为必须为对方户名!');
|
|
|
-// }
|
|
|
-// continue;
|
|
|
-// }
|
|
|
$company =Db::name("company_info")->where(["companyNo"=>$value[0]])->findOrEmpty();
|
|
|
if(empty($company)){
|
|
|
return error_show( 1003, "业务公司编号不存在{$value[0]}");
|
|
@@ -1129,4 +1105,26 @@ class OrderPay extends Base{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public function exportTrade(){
|
|
|
+ $param = $this->request->param(["name","bank","start","end","status","tradeNo","companyNo","total_lower",'total_upper'],"post","trim");
|
|
|
+ $condition=[["is_del","=",0]];
|
|
|
+ $param['name']==""?? $condition[]=["trade_out","like","%{$param['name']}%"];
|
|
|
+ $param['trade_bank']==""?? $condition[]=['trade_bank','like',"%{$param['trade_bank']}%"];;
|
|
|
+ $param['start']==""?? $condition[]=['trade_time','>=',startTime($param['start'])];
|
|
|
+ $param['end']==""?? $condition[]=['trade_time','<=',endTime($param['end'])];
|
|
|
+ $param['status']===""?? $condition[]=["status","=",$param['status']];
|
|
|
+ $param['tradeNo']==""?? $condition[]=["tradeNo","like","%{$param['tradeNo']}%"];
|
|
|
+ $param['companyNo']==""?? $condition[]=['companyNo','=',$param['companyNo']];
|
|
|
+ $param['total_lower']==""?? $condition[]=['total_fee','>=',$param['total_lower']];
|
|
|
+ $param['total_upper']==""?? $condition[]=['total_fee','>=',$param['total_upper']];
|
|
|
+ $list= \app\admin\model\Trade::where($condition)
|
|
|
+ ->field(["tradNo","companyNo","trade_in",'trade_in_account','trade_time','total_fee','trade_bank',
|
|
|
+ 'trade_account','trade_out','trade_used'])
|
|
|
+ ->select();
|
|
|
+ $header = ["资金编号","收款方公司编码",'收款方公司名称','收款方账户','交易时间','收入金额','交易行名','对方账号','对方户名','交易用途'];
|
|
|
+ if($list->isEmpty()){
|
|
|
+ $header=["暂无数据"];
|
|
|
+ }
|
|
|
+ excelExport("资金管理导出",$header,$list->toArray());
|
|
|
+ }
|
|
|
}
|