From 4d8e7de144e340970b62b6da687942a22afc0afd Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 8 Jun 2021 15:20:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=93=E6=AC=BE=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementOfflineController.class.php | 16 +++++++++++----- .../CompanyStatementPoolController.class.php | 3 +++ .../View/CompanyStatementPool/viewPuPool.html | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementOfflineController.class.php b/Application/Admin/Controller/CompanyStatementOfflineController.class.php index cc1da063f..8a51a2e77 100644 --- a/Application/Admin/Controller/CompanyStatementOfflineController.class.php +++ b/Application/Admin/Controller/CompanyStatementOfflineController.class.php @@ -586,7 +586,7 @@ class CompanyStatementOfflineController extends ThinkController ,'pay_time'=>strtotime($payment_time) ]; - $unPayData = SM("company_statement_info_part","tab_") + $unPayData = M("company_statement_info_part","tab_") ->field("sum(statement_money) statement_money,info_id") ->where(["pay_status"=>0]) ->group("info_id") @@ -597,7 +597,7 @@ class CompanyStatementOfflineController extends ThinkController $handleData[$value['info_id']] = $value['statement_money']; } - $payData = SM("company_statement_info_part","tab_") + $payData = M("company_statement_info_part","tab_") ->field("sum(statement_money) statement_money,info_id") ->group("info_id") ->select(); @@ -613,11 +613,16 @@ class CompanyStatementOfflineController extends ThinkController $time = date("Y-m-d H:i:s",time()); $unPayAmount = $value['statement_money']-$handlePayData[$value['id']]; $saveData['remark'] = $value['remark']; + + $partInfo = M("company_statement_info_part","tab_")->where(['info_id'=>$value['id']])->order("id desc")->find(); + $partCompanyInfo = json_decode($partInfo['company_info'],true); + $saveData['company_info'] = $partInfo['company_info']; + if($handleData[$value['id']]) { - $saveData['remark'] = "{$value['remark']} {$_SESSION['onethink_admin']['user_auth']['username']}于{$time}已打款{$handleData[$value['id']]},剩余{$unPayAmount}"; + $saveData['remark'] .= ";{$_SESSION['onethink_admin']['user_auth']['username']}于{$time}向({$partCompanyInfo['payee_name']}/{$partCompanyInfo['opening_bank']}/{$partCompanyInfo['bank_account']})打款{$handleData[$value['id']]},剩余{$unPayAmount}"; } - SM("company_statement_info_part","tab_") + M("company_statement_info_part","tab_") ->where(['info_id'=>$value['id'],'pay_status'=>['neq',1]]) ->save(["pay_status"=>1,'pay_time'=>strtotime($payment_time)]); @@ -629,7 +634,8 @@ class CompanyStatementOfflineController extends ThinkController "pay_status"=>1, "pay_info"=>json_encode(["payment_user"=>$_SESSION['onethink_admin']['user_auth']["username"],"payment_time"=>$payment_time]), "remark"=>$saveData['remark'], - 'pay_time'=>strtotime($payment_time) + 'pay_time'=>strtotime($payment_time), + 'company_info'=>$partInfo['company_info'] ]); } else { $companyStatementInfo->where(['id'=>$value['id']])->save($saveData); diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index cf136000d..83f736809 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -779,6 +779,9 @@ class CompanyStatementPoolController extends ThinkController $cline = $line+1; if($is_export){ $v['statement_money'] = "=ROUND("; + $v['remark'] = str_replace(";","\n",$v['remark']); + }else{ + $v['remark'] = str_replace(";","
",$v['remark']); } $handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line); $v['statement_info'] = $handle_data; diff --git a/Application/Admin/View/CompanyStatementPool/viewPuPool.html b/Application/Admin/View/CompanyStatementPool/viewPuPool.html index e008db558..26e030d3c 100644 --- a/Application/Admin/View/CompanyStatementPool/viewPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/viewPuPool.html @@ -207,7 +207,7 @@ - {$com.remark} + {$com.remark}