From e5dc86118eb820ba87998b45fe8afd533a4d2cfc Mon Sep 17 00:00:00 2001 From: chenzhi Date: Sat, 23 May 2020 12:40:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyRelationController.class.php | 31 ++ .../View/CompanyRelation/addRelation.html | 357 ++++++------------ 2 files changed, 152 insertions(+), 236 deletions(-) diff --git a/Application/Admin/Controller/CompanyRelationController.class.php b/Application/Admin/Controller/CompanyRelationController.class.php index 34be47beb..4fa12d3dd 100644 --- a/Application/Admin/Controller/CompanyRelationController.class.php +++ b/Application/Admin/Controller/CompanyRelationController.class.php @@ -65,6 +65,37 @@ class CompanyRelationController extends AdminController public function delRelation() { + } + public function getCompanyList($type) + { + if($type ==''){ + $this->success([],'',true); + } + $companyInfo = []; + if($type == 0){ + //己方公司 + $companyInfo = M("CompanyInfo","tab_")->field("id,partner company_name,link_man,link_phone")->where("status='1'")->select(); + } + if($type == 1){ + //上游 + $companyInfo = M("Partner","tab_")->field("id,partner company_name,company_type,link_man,link_phone")->where("status='1'")->select(); + } + if($type == 2){ + //下游游 + $companyInfo = M("PromoteCompany","tab_")->field("id,company_belong,company_name,company_type,settlement_contact link_man,contact_phone link_phone")->where("status='1'")->select(); + } + foreach($companyInfo as $k=>&$v){ + if(isset($v['company_belong'])){ + $v['company_belong'] = getCompanyBlong($v['company_belong']); + } + if(isset($v['company_type'])){ + $v['company_type'] = ($v['company_type'] == 1 ?"公司" :'个人'); + } + if(isset($v['link_phone']) && $v['link_phone']==0){ + $v['link_phone'] = ''; + } + } + $this->success($companyInfo,'',true); } public function menuAuth() { diff --git a/Application/Admin/View/CompanyRelation/addRelation.html b/Application/Admin/View/CompanyRelation/addRelation.html index e236ab7b4..b389e2b0c 100644 --- a/Application/Admin/View/CompanyRelation/addRelation.html +++ b/Application/Admin/View/CompanyRelation/addRelation.html @@ -119,43 +119,15 @@ *甲方公司: - - - 内外团: - - 请先选择甲方公司 - - - - 公司性质: - - 请先选择甲方公司 - - - - 开发类型: - - 请先选择甲方公司 - - - - 联系人: - - 请先选择甲方公司 - - - - 联系电话: - - 请先选择甲方公司 - - + + + @@ -167,7 +139,7 @@ *乙方公司类型: - @@ -187,38 +159,9 @@ - - - - 内外团: - - 请先选择乙方公司 - - - - 公司性质: - - 请先选择乙方公司 - - - - 开发类型: - - 请先选择乙方公司 - - - - 联系人: - - 请先选择乙方公司 - - - - 联系电话: - - 请先选择乙方公司 - - + + + @@ -308,88 +251,44 @@