From e6c8b511277555a4a731ede8e7977fd3f61bfba5 Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Thu, 11 Jun 2020 17:11:06 +0800 Subject: [PATCH] upt --- .../Controller/PromoteCompanyController.class.php | 11 ++++++++++- .../View/PromoteCompany/service_agreement_list.html | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 4ec99e052..54fb16bb2 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -575,7 +575,9 @@ WHERE old_change_promote_id in ({$promoteData})"; if (!empty($_GET['title'])) { $map['title'] = ['like', "%{$_GET['title']}%"]; } - $list = M('service_agreement', 'tab_')->where($map)->page($p, $row)->select(); + $list = M('service_agreement', 'tab_') + ->field("tab_service_agreement.*, group_concat(distinct(tab_promote_company.company_name)) as company_name") + ->join('tab_promote_company on tab_promote_company.service_agreement_show = tab_service_agreement.id', 'LEFT')->where($map)->page($p, $row)->order("status desc")->select(); $count = M('service_agreement', 'tab_')->where($map)->count(); $page = set_pagination($count, $row); if ($page) { @@ -617,4 +619,11 @@ WHERE old_change_promote_id in ({$promoteData})"; } } + public function serviceAgreementSetDefault($id) + { + M('service_agreement', 'tab_')->save(['status'=>1]); + M('service_agreement', 'tab_')->where(['id'=>$id])->save(['status'=>2]); + return $this->success('设置完成'); + } + } diff --git a/Application/Admin/View/PromoteCompany/service_agreement_list.html b/Application/Admin/View/PromoteCompany/service_agreement_list.html index 3f5c27d89..5770762cc 100644 --- a/Application/Admin/View/PromoteCompany/service_agreement_list.html +++ b/Application/Admin/View/PromoteCompany/service_agreement_list.html @@ -60,6 +60,8 @@ --> ID 标题 + 是否默认合同 + 应用公司 操作人 操作时间 操作 @@ -75,9 +77,14 @@ {$data.id} {$data.name} + {$data.status} + {:get_admin_nickname($data['creator'])} {$data.created_time|date='Y-m-d H:i:s',###} + + 设置默认 + 编辑 删除