From 61d04183402b76845e8cba9dd96b945209a34861 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 18 Mar 2020 19:31:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=85=AC=E5=8F=B8=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E4=BF=AE=E6=94=B9=E5=86=85=E5=A4=96=E5=9B=A2?= =?UTF-8?q?=E5=BD=B1=E5=93=8D=E5=BA=95=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PromoteCompanyController.class.php | 17 ++++++++++++++++- .../Admin/View/PromoteCompany/lists.html | 6 ++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 6655838a4..f7328afe8 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -146,8 +146,10 @@ class PromoteCompanyController extends ThinkController } } + $v['can_del'] = 0; }else{ //空值 + $v['can_del'] = 1; $v['list']=[ [ "account"=>"--", @@ -313,10 +315,23 @@ class PromoteCompanyController extends ThinkController if(isset($save['resources'])){ $save['resources'] = json_encode($save['resources'],JSON_UNESCAPED_UNICODE); } + //判断内外团是否修改 + $is_change_belong = false; + $company_id = $save['id']; + $y_belong = $model->field("company_belong")->where("id = {$save['id']}")->find()['company_belong']; + if(isset($save['company_belong']) && ($y_belong != $save['company_belong'])){ + $is_change_belong = true; + } $res = $model->save($save); if ($res) { \Think\Log::actionLog('PromoteCompany/edit', 'partner', $res); - + //处理底下所有会长的公会属性 + if($is_change_belong){ + $savedata = array( + "company_belong"=>$save['company_belong'] + ); + M("Promote","tab_")->where("company_id = '{$company_id}'")->save($savedata); + } addOperationLog(['op_type'=>1,'key'=>$_POST['company_name'],'op_name'=>'编辑推广公司','url'=>U('PromoteCompany/lists'),'menu'=>'推广员-推广员管理-推广公司管理-编辑推广公司']); $array=array( diff --git a/Application/Admin/View/PromoteCompany/lists.html b/Application/Admin/View/PromoteCompany/lists.html index 5f547a413..27619bd69 100644 --- a/Application/Admin/View/PromoteCompany/lists.html +++ b/Application/Admin/View/PromoteCompany/lists.html @@ -39,7 +39,7 @@
@@ -120,7 +120,9 @@ 查看 编辑 - 删除 + + 删除 + {$data.company_name} {$data.platform_name}