|
@@ -99,7 +99,7 @@ class Trade extends Base{
|
|
// 1待审批2审批通过3审批驳回4退款5解除认领
|
|
// 1待审批2审批通过3审批驳回4退款5解除认领
|
|
public function PoolStatus(){
|
|
public function PoolStatus(){
|
|
$params = $this->request->param(["logNo"=>"","status"=>"","remark"=>""],"post","trim");
|
|
$params = $this->request->param(["logNo"=>"","status"=>"","remark"=>""],"post","trim");
|
|
- $valid =Validate::rule(["logNo|资金认领编号"=>"require|max:255","status|状态"=>"require|in:1,2,3"]);
|
|
|
|
|
|
+ $valid =Validate::rule(["logNo|资金认领编号"=>"require|max:255","status|状态"=>"require|in:1,2,3,5"]);
|
|
if(!$valid->check($params)) return error($valid->getError());
|
|
if(!$valid->check($params)) return error($valid->getError());
|
|
$log = TradePool::where(["logNo"=>$params['logNo'],"is_del"=>0])->findOrEmpty();
|
|
$log = TradePool::where(["logNo"=>$params['logNo'],"is_del"=>0])->findOrEmpty();
|
|
if($log->isEmpty()) return error("资金认领信息不存在");
|
|
if($log->isEmpty()) return error("资金认领信息不存在");
|
|
@@ -131,8 +131,10 @@ class Trade extends Base{
|
|
}
|
|
}
|
|
|
|
|
|
public function list(){
|
|
public function list(){
|
|
- $params = $this->request->param(["tradNo"=>"","status"=>[],"name"=>"","bank"=>"","start"=>"","end"=>"","companyNo"=>"",'poCode'=>'',
|
|
|
|
- "page"=>1,"size"=>20,'used_lower'=>"",'used_upper'=>'','total_lower'=>'','total_upper'=>'',"relaComNo"=>"","trade_type"=>""],"post","trim");
|
|
|
|
|
|
+ $params = $this->request->param(["tradNo"=>"","status"=>[],"name"=>"","bank"=>"","start"=>"","end"=>"","companyNo"=>"",
|
|
|
|
+ 'poCode'=>'',"page"=>1,"size"=>20,'used_lower'=>"",'used_upper'=>'','total_lower'=>'','total_upper'=>'',"relaComNo"=>"",
|
|
|
|
+ "trade_type"=>"","palt_po"=>"","skuCode"=>"","goodName"=>"","plat_total_lower"=>"",'plat_total_upper'=>'',"com_total_lower"=>"",
|
|
|
|
+ "com_total_upper"=>"","trade_used"=>"","create_start"=>"","create_end"=>""],"post","trim");
|
|
$where=[["is_del","=",0]];
|
|
$where=[["is_del","=",0]];
|
|
if($params['tradNo']!=="")$where[]=["tradNo","like","%".$params['tradNo']."%"];
|
|
if($params['tradNo']!=="")$where[]=["tradNo","like","%".$params['tradNo']."%"];
|
|
if(!empty($params['status']))$where[]=["status","in",$params['status']];
|
|
if(!empty($params['status']))$where[]=["status","in",$params['status']];
|
|
@@ -148,6 +150,16 @@ class Trade extends Base{
|
|
if($params['total_upper']!=="") $where[]=["total_fee","<=",$params['total_upper']];
|
|
if($params['total_upper']!=="") $where[]=["total_fee","<=",$params['total_upper']];
|
|
if($params['poCode']!=="") $where[]=["poCode","like","%".$params['poCode']."%"];
|
|
if($params['poCode']!=="") $where[]=["poCode","like","%".$params['poCode']."%"];
|
|
if($params['trade_type']!=="") $where[]=["trade_type","=",$params['trade_type']];
|
|
if($params['trade_type']!=="") $where[]=["trade_type","=",$params['trade_type']];
|
|
|
|
+ if($params['palt_po']!=="") $where[]=["palt_po","like","%".$params['palt_po']."%"];
|
|
|
|
+ if($params['skuCode']!=="") $where[]=["skuCode","like","%".$params['skuCode']."%"];
|
|
|
|
+ if($params['goodName']!=="") $where[]=["goodName","like","%".$params['goodName']."%"];
|
|
|
|
+ if($params['plat_total_lower']!=="") $where[]=["plat_total",">=",$params['plat_total_lower']];
|
|
|
|
+ if($params['plat_total_upper']!=="") $where[]=["plat_total","<=",$params['plat_total_upper']];
|
|
|
|
+ if($params['com_total_lower']!=="") $where[]=["com_total",">=",$params['com_total_lower']];
|
|
|
|
+ if($params['com_total_upper']!=="") $where[]=["com_total","<=",$params['com_total_upper']];
|
|
|
|
+ if($params['trade_used']!=="") $where[]=["trade_used","like",'%'.$params['trade_used'].'%'];
|
|
|
|
+ if($params['create_start']!=="") $where[]=["createtime",">=",startTime($params['create_start'])];
|
|
|
|
+ if($params['create_end']!=="") $where[]=["createtime","<=",endTime($params['create_end'])];
|
|
$list = $this->model->with(["company",'Lib'])->withJoin("Lib","left")->where($where)->order("id desc")->paginate(["list_rows"=>$params['size'],"page"=>$params['page']]);
|
|
$list = $this->model->with(["company",'Lib'])->withJoin("Lib","left")->where($where)->order("id desc")->paginate(["list_rows"=>$params['size'],"page"=>$params['page']]);
|
|
return success("成功",['list'=>$list->items(),'count'=>$list->total()]);
|
|
return success("成功",['list'=>$list->items(),'count'=>$list->total()]);
|
|
}
|
|
}
|