diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 481fa2e4b..8f0e9bb45 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -1827,7 +1827,7 @@ class CompanyStatementPoolController extends ThinkController $save['verify_status'] = $svalue['verify_status']; $save['remark'] = $svalue['remark']; $save['company_info'] = $svalue['company_info']; - $save['statement_num'] = "JS_" . date("YmdHis", time()) . sp_random_string(5); + $save['statement_num'] = "JS_" . date("YmdHis", time()) . $svalue['company_id'] . sp_random_string(5); if ($amount > $limit_amount) { $save['statement_money'] = $limit_amount; @@ -1928,7 +1928,7 @@ class CompanyStatementPoolController extends ThinkController $save['verify_status'] = $svalue['verify_status']; $save['remark'] = $svalue['remark']; $save['company_info'] = $svalue['company_info']; - $save['statement_num'] = "JS_" . date("YmdHis", time()) . sp_random_string(5); + $save['statement_num'] = "JS_" . date("YmdHis", time()) .$svalue['company_id'] . sp_random_string(5); $save['statement_money'] = $svalue['statement_money']; $save['statement_info_id'] = $svalue['id']; diff --git a/Application/Payment/Controller/PaymentController.class.php b/Application/Payment/Controller/PaymentController.class.php index 2ab51099b..555f243d2 100644 --- a/Application/Payment/Controller/PaymentController.class.php +++ b/Application/Payment/Controller/PaymentController.class.php @@ -140,50 +140,50 @@ class PaymentController extends BaseController $v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}"; } + if ($handleData) { + $statementInfo = M("pay_statement_info","tab_") + ->alias('s') + ->field("s.*,p.statement_num statement_pool_num") + ->join("left join tab_company_statement_info i ON s.statement_info_id = i.id") + ->join("left join tab_company_statement_pool p ON p.id = i.pool_id") + ->where(['statement_info_id'=>['in',$handleData]]) + ->order("FIELD(s.pay_status,0,-1,1),s.verify_status desc") + ->select(); - $statementInfo = M("pay_statement_info","tab_") - ->alias('s') - ->field("s.*,p.statement_num statement_pool_num") - ->join("left join tab_company_statement_info i ON s.statement_info_id = i.id") - ->join("left join tab_company_statement_pool p ON p.id = i.pool_id") - ->where(['statement_info_id'=>['in',$handleData]]) - ->order("FIELD(s.pay_status,0,-1,1),s.verify_status desc") - ->select(); + $handleData = []; + foreach ($statementInfo as $key => $value) { - $handleData = []; - foreach ($statementInfo as $key => $value) { + $value['can_pay'] = 1; + if($value['verify_status'] == -1){ + $value['verify_status_str']="信息配置不全"; + $value['can_pay'] = 0; + }else{ + if($value['pay_status'] == 1){ $value['can_pay'] = 0; } + $value['verify_status_str'] = $this->PayStatus[$value['pay_status']]; + if($value['pay_status'] == 1){ + $value['pay_type'] = $value['pay_type'] == 1 ? "提现" :"线上打款"; + $value['verify_status_str'] .= ("/". $value['pay_type']); + } + } - $value['can_pay'] = 1; - if($value['verify_status'] == -1){ - $value['verify_status_str']="信息配置不全"; - $value['can_pay'] = 0; - }else{ - if($value['pay_status'] == 1){ $value['can_pay'] = 0; } - $value['verify_status_str'] = $this->PayStatus[$value['pay_status']]; - if($value['pay_status'] == 1){ - $value['pay_type'] = $value['pay_type'] == 1 ? "提现" :"线上打款"; - $value['verify_status_str'] .= ("/". $value['pay_type']); + $value['company_type'] = $this->CompanyType[$value['company_type']]; + $value['statement_begin_time'] = date('Y-m-d',$value['statement_begin_time']); + $value['statement_end_time'] = date('Y-m-d',$value['statement_end_time']); + if(empty($value['pay_time'])){ + $value['pay_time'] = "--"; + }else{ + $value['pay_time'] = date('Y-m-d H:i:s',$value['pay_time']); } + $value["valid"] = "{$value['statement_begin_time']} ~ {$value['statement_end_time']}"; + $handleData[$value['statement_info_id']]['data'][] = $value; + $handleData[$value['statement_info_id']]['ids'][] = $value['id']; } - $value['company_type'] = $this->CompanyType[$value['company_type']]; - $value['statement_begin_time'] = date('Y-m-d',$value['statement_begin_time']); - $value['statement_end_time'] = date('Y-m-d',$value['statement_end_time']); - if(empty($value['pay_time'])){ - $value['pay_time'] = "--"; - }else{ - $value['pay_time'] = date('Y-m-d H:i:s',$value['pay_time']); + foreach ($CompanyInfo as $key=>$value) { + $CompanyInfo[$key]['son_info'] = $handleData[$value['id']]['data']; + $CompanyInfo[$key]['ids'] = implode(',',$handleData[$value['id']]['ids']); } - $value["valid"] = "{$value['statement_begin_time']} ~ {$value['statement_end_time']}"; - $handleData[$value['statement_info_id']]['data'][] = $value; - $handleData[$value['statement_info_id']]['ids'][] = $value['id']; - } - - foreach ($CompanyInfo as $key=>$value) { - $CompanyInfo[$key]['son_info'] = $handleData[$value['id']]['data']; - $CompanyInfo[$key]['ids'] = implode(',',$handleData[$value['id']]['ids']); } -// dump($CompanyInfo);die(); //统计待打款金额 $countmap = $map; diff --git a/Application/Payment/View/ExcelPayment/lists.html b/Application/Payment/View/ExcelPayment/lists.html index f8cc951f9..55dd0a1c0 100644 --- a/Application/Payment/View/ExcelPayment/lists.html +++ b/Application/Payment/View/ExcelPayment/lists.html @@ -366,6 +366,9 @@ } else { layer.msg("打款失败"); } + setTimeout(function () { + window.location.reload(); + },2000); } diff --git a/Application/Payment/View/Payment/lists.html b/Application/Payment/View/Payment/lists.html index 6502d33ba..5c811bd1c 100644 --- a/Application/Payment/View/Payment/lists.html +++ b/Application/Payment/View/Payment/lists.html @@ -417,6 +417,9 @@ } else { layer.msg("打款失败"); } + setTimeout(function () { + window.location.reload(); + },2000); } @@ -431,6 +434,7 @@ var status = $(this).data('value'); var verifytip = 0; var paytip = 0; + var canpay = 0; var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { @@ -447,6 +451,11 @@ return ; } + if($(elem).data("pay") != 1) { + canpay = 1; + return; + } + return $(elem).data('verify_id'); }).get(); @@ -461,6 +470,11 @@ return; } + if (canpay == 1) { + layer.msg("" + '请选择信息配置完全的打款单' + ""); + return; + } + if(text.length < 1){ layer.msg("" + '请先选择要操作的打款单' + ""); return; diff --git a/Application/Payment/View/Payment/viewPuPool.html b/Application/Payment/View/Payment/viewPuPool.html index 21c5e8172..f6a031a8e 100644 --- a/Application/Payment/View/Payment/viewPuPool.html +++ b/Application/Payment/View/Payment/viewPuPool.html @@ -111,10 +111,12 @@