From c7c67f279ab15a4614c6ad1f9f49553a2da54382 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 15 Jun 2020 20:59:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E6=AC=BE=E4=BF=A1=E6=81=AF=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementPoolController.class.php | 48 +++++++++++++++++-- .../View/CompanyStatementPool/lists.html | 12 +++++ .../CompanyStatementPool/viewPayment.html | 22 ++------- 3 files changed, 60 insertions(+), 22 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 45679b4fa..8c72a240c 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -27,6 +27,17 @@ class CompanyStatementPoolController extends ThinkController "4"=>"打款成功", "5"=>"无需打款" ]; + public $InfoVerifyStatus=[ + "-1"=>"配置信息不全", + "0"=>"信息未确认", + "1"=>"允许打款", + "2"=>"线下无需打款" + ]; + public $PayStatus=[ + "-1"=>"打款失败", + "0"=>"未打款", + "1"=>"打款成功" + ]; public $admininfo; public $DBModel; public function _initialize() @@ -499,6 +510,35 @@ class CompanyStatementPoolController extends ThinkController //修改状态 $this->setOneVerifyStatus(2,"payment",$_REQUEST['pool_id'],$mgs = "打款信息提交"); } + //查看打款信息 + public function viewPayment(){ + if(!isset($_REQUEST['id'])) $this->error("参数错误"); + $id = $_REQUEST['id']; + $CompanyInfo = M("company_statement_info","tab_") + ->alias('i') + ->field("i.id,i.pool_id,i.company_name,i.company_info,i.statement_money,p.statement_num,i.remark,i.pay_status,i.verify_status,p.statement_money all_money") + ->join("tab_company_statement_pool p ON p.id = i.pool_id") + ->where("pool_id='{$id}'") + ->select(); + foreach($CompanyInfo as $k=>&$v){ + $v['company_info'] = json_decode($v['company_info'],true); + $v['company_info']['ali_user'] ?? ''; + $v['company_info']['ali_account'] ?? ''; + $v['verify_status_str'] = $this->InfoVerifyStatus[ $v['verify_status']]; + + if($v['verify_status'] == 1){ + + $v['verify_status_str'] = $this->PayStatus[$v['pay_status']]; + if($v['pay_status'] == 1){ + $v['pay_type'] = $v['pay_type'] == 1 ? "提现" :"线上打款"; + $v['verify_status_str'] .= ("/". $v['pay_type']); + } + } + } + + $this->assign("CompanyInfo",$CompanyInfo); + $this->display(); + } //保存备注 public function saveRemark(){ @@ -782,7 +822,7 @@ class CompanyStatementPoolController extends ThinkController "setPayment"=>"打款信息提交", "editPayment"=>"打款信息编辑", - "viePayment"=>"打款详情", + "viewPayment"=>"打款详情", 'reCount'=>"重算", 'cancelPool'=>"撤销汇总", @@ -803,10 +843,10 @@ class CompanyStatementPoolController extends ThinkController $optist = ["viewPool","addRemark","viewRemark","editRemark","viewVoucher","editVoucher","uploadVoucher","editPayment"]; break; case '3': - $optist = ["viewPool","addRemark","viewRemark","editRemark","viewVoucher","editVoucher","uploadVoucher","editPayment","viePayment"]; + $optist = ["viewPool","addRemark","viewRemark","editRemark","viewVoucher","editVoucher","uploadVoucher","editPayment","viewPayment"]; break; case '4': - $optist = ["viewPool","addRemark","viewRemark","editRemark","viewVoucher","editVoucher","uploadVoucher","viePayment"]; + $optist = ["viewPool","addRemark","viewRemark","editRemark","viewVoucher","editVoucher","uploadVoucher","viewPayment"]; break; case '5': $optist = ["viewPool","addRemark","viewRemark","editRemark","reCount","cancelPool"]; @@ -845,7 +885,7 @@ class CompanyStatementPoolController extends ThinkController if($info['is_payment'] == 1){ $optist = array_diff($optist, ["setUlPayment"]); }else{ - $optist = array_diff($optist, ["setPayment","editPayment","viePayment"]); + $optist = array_diff($optist, ["setPayment","editPayment","viewPayment"]); } if(empty($info['remark'])){ diff --git a/Application/Admin/View/CompanyStatementPool/lists.html b/Application/Admin/View/CompanyStatementPool/lists.html index fd4a4397c..fead729a1 100644 --- a/Application/Admin/View/CompanyStatementPool/lists.html +++ b/Application/Admin/View/CompanyStatementPool/lists.html @@ -421,6 +421,18 @@ content: url }); }) + $(".viewPayment").on("click",function(){ + var id = $(this).data("id"); + var url = "{:U('viewPayment')}"+"&id="+id + layer.open({ + type: 2, + title: "海南万盟天下科技有限公司", + shadeClose: true, + shade: 0.8, + area: ['70%', '80%'], + content: url + }); + }) function cancelPoolAjax(opurl,senddata){ diff --git a/Application/Admin/View/CompanyStatementPool/viewPayment.html b/Application/Admin/View/CompanyStatementPool/viewPayment.html index 9ace64b39..3c2edbee7 100644 --- a/Application/Admin/View/CompanyStatementPool/viewPayment.html +++ b/Application/Admin/View/CompanyStatementPool/viewPayment.html @@ -110,21 +110,12 @@ 关联结算汇总单订单号 金额(元) 备注 + 打款状态 - - - {$key-0+1} - {$vo.company_name} - - - {$vo.statement_num} - {$vo.statement_money} - - - + {$key-0+1} {$vo.company_name} @@ -133,24 +124,19 @@ {$vo.statement_num} {$vo.statement_money} {$vo.remark} + {$vo.verify_status_str} - 合计: - 打款总金额:{$CompanyInfo[0]['all_money']} + 打款总金额:{$CompanyInfo[0]['all_money']} -
- -