|
@@ -716,7 +716,14 @@ class Payment extends BaseController
|
|
|
}
|
|
|
$status = isset($post['status']) && $post['status']!=='' ? intval($post['status']) :"";
|
|
|
if($status!==""){
|
|
|
- $condition []=["status","=",$status];
|
|
|
+ if($status!==''){
|
|
|
+ if($status==3){
|
|
|
+ $condition[]=["status","<>",2];
|
|
|
+ }else{
|
|
|
+ $condition[]=["status","=",$status];
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
$companyNo = isset($post['companyNo']) && $post['companyNo']!='' ? trim($post['companyNo']) :"";
|
|
|
if($companyNo!=""){
|
|
@@ -1086,7 +1093,26 @@ class Payment extends BaseController
|
|
|
$total = ceil($count/$size);
|
|
|
$page = $page>$total? intval($total):$page;
|
|
|
$list = Db::name("pay_invoice")->alias("a")->leftJoin("pay b","a.payNo=b.payNo")->field("a.*")->where
|
|
|
- ($condition)->page($page,$size)->select();
|
|
|
+ ($condition)->page($page,$size)->select()->toArray();
|
|
|
+ foreach ($list as &$value){
|
|
|
+ $invoinfo =Db::name("invoice_info")->where(["hpNo"=>$value['hpNo'],"status"=>1])->find();
|
|
|
+ $value['buyer_name'] = $invoinfo['buyer_name']??"";
|
|
|
+ $value['buyer_id'] = $invoinfo['buyer_id']??"";
|
|
|
+ $value['buyer_address'] = $invoinfo['buyer_address']??"";
|
|
|
+ $value['buyer_bank'] = $invoinfo['buyer_bank']??"";
|
|
|
+ $value['seller_name'] = $invoinfo['seller_name']??"";
|
|
|
+ $value['seller_id'] = $invoinfo['seller_id']??"";
|
|
|
+ $value['seller_address'] = $invoinfo['seller_address']??"";
|
|
|
+ $value['seller_bank'] = $invoinfo['seller_bank']??"";
|
|
|
+ $value['subtotal_amount'] = $invoinfo['subtotal_amount']??"";
|
|
|
+ $value['subtotal_tax'] = $invoinfo['subtotal_tax']??"";
|
|
|
+ $value['total'] = $invoinfo['total']??"";
|
|
|
+ $value['receiver'] = $invoinfo['receiver']??"";
|
|
|
+ $value['issuer'] = $invoinfo['issuer']??"";
|
|
|
+ $value['reivewer'] = $invoinfo['reivewer']??"";
|
|
|
+ $value['remarks'] = $invoinfo['remarks']??"";
|
|
|
+ $value['item_list'] = isset($invoinfo['item_list']) &&$invoinfo['item_list']!='' ?json_decode($invoinfo['item_list'],true):"";
|
|
|
+ }
|
|
|
return app_show(0,"获取成功",["list"=>$list,"count"=>$count]);
|
|
|
}
|
|
|
|
|
@@ -1152,21 +1178,11 @@ class Payment extends BaseController
|
|
|
|
|
|
public function UnPay(){
|
|
|
$post = $this->post;
|
|
|
- $token = isset($post['token']) ? trim($post['token']) : "";
|
|
|
- if($token==""){
|
|
|
- return error_show(101,'token不能为空');
|
|
|
- }
|
|
|
- $effetc = VerifyTokens($token);
|
|
|
- if(!empty($effetc) && $effetc['code']!=0){
|
|
|
- return error_show($effetc['code'],$effetc['message']);
|
|
|
- }
|
|
|
$codeNo = isset($post['id'])&&$post['id']!=="" ? trim($post['id']) :'';
|
|
|
if($codeNo===""){
|
|
|
- return error_show(1004,'参数id 不能为空');
|
|
|
+ return error_show(1004,'参数 id 不能为空');
|
|
|
}
|
|
|
- $update = Db::name('cgd_info')->where("id","in",$codeNo)->update(['status'=>2,"updatetime"=>date("Y-m-d
|
|
|
- H:i:s")]);
|
|
|
- // echo Db::name('cgd_info')->getLastSql();
|
|
|
+ $update = Db::name('cgd_info')->where("id","in",$codeNo)->update(['status'=>2,"updatetime"=>date("Y-m-d H:i:s")]);
|
|
|
if($update){
|
|
|
return app_show(0,'更新成功');
|
|
|
}else{
|