From 8897a87342eebf54230106da1a863188cd4d3153 Mon Sep 17 00:00:00 2001 From: tping Date: Mon, 4 Jan 2021 15:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B2=E4=B9=99=E6=96=B9=E5=85=AC=E5=8F=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PartnerController.class.php | 7 ++++++- .../Controller/PromoteCompanyController.class.php | 11 ++++++++--- Application/Admin/View/Partner/edit.html | 12 ++++++------ Application/Admin/View/Partner/show.html | 12 ++++++------ Application/Admin/View/PromoteCompany/edit.html | 12 ++++++------ Application/Admin/View/PromoteCompany/view.html | 12 ++++++------ 6 files changed, 38 insertions(+), 28 deletions(-) diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index 6866af2b7..b09301e63 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -473,7 +473,12 @@ class PartnerController extends ThinkController if ($_POST) { $save = I("post."); $this->checkData($save); - $save['relation']['collaborate_way'] = $save['part_a_type']; + if ($save['part_a_type'] == 1) { // 1己方公司的时候 合作类型是2 + $save['relation']['collaborate_way'] = 2; + } + if ($save['part_a_type'] == 2) { // 2下游推广公司的时候 合作类型是1 + $save['relation']['collaborate_way'] = 1; + } if ($save['part_a_type'] == 1) { $save['relation']['self_company_id'] = $save['part_a']; } diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 87bb0b6ae..0ab31c840 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -732,11 +732,16 @@ class PromoteCompanyController extends ThinkController if ($_POST) { $save = I('post.');//前端已经验证 - $save['relation']['collaborate_way'] = $save['part_a_type']; - if ($save['part_a_type'] == 1) { + if ($save['part_a_type'] == 1) { // 1己方公司的时候 合作类型是2 + $save['relation']['collaborate_way'] = 2; + } + if ($save['part_a_type'] == 2) { // 2下游推广公司的时候 合作类型是1 + $save['relation']['collaborate_way'] = 1; + } + if ($save['part_a_type'] == 1) { // 1己方公司的时候 $save['relation']['self_company_id'] = $save['part_a']; } - if ($save['part_a_type'] == 2) { + if ($save['part_a_type'] == 2) { // 2下游推广公司的时候 $save['relation']['self_company_id'] = $save['part_b']; } diff --git a/Application/Admin/View/Partner/edit.html b/Application/Admin/View/Partner/edit.html index aba96572e..cc36739df 100644 --- a/Application/Admin/View/Partner/edit.html +++ b/Application/Admin/View/Partner/edit.html @@ -152,16 +152,16 @@ *甲方公司类型: *乙方公司类型: @@ -179,7 +179,7 @@ --> - + *甲方公司: @@ -200,7 +200,7 @@ - + *甲方公司: diff --git a/Application/Admin/View/Partner/show.html b/Application/Admin/View/Partner/show.html index 5e6445583..df69e3536 100644 --- a/Application/Admin/View/Partner/show.html +++ b/Application/Admin/View/Partner/show.html @@ -149,16 +149,16 @@ *甲方公司类型: *乙方公司类型: @@ -176,7 +176,7 @@ --> - + *甲方公司: @@ -196,7 +196,7 @@ - + *甲方公司: diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index d98f280f8..b11946ec2 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -500,16 +500,16 @@ *甲方公司类型: *乙方公司类型: @@ -528,7 +528,7 @@ --> - + *甲方公司: @@ -549,7 +549,7 @@ - + *甲方公司: diff --git a/Application/Admin/View/PromoteCompany/view.html b/Application/Admin/View/PromoteCompany/view.html index 3dc1981c7..cb02e93d1 100644 --- a/Application/Admin/View/PromoteCompany/view.html +++ b/Application/Admin/View/PromoteCompany/view.html @@ -486,16 +486,16 @@ *甲方公司类型: *乙方公司类型: @@ -513,7 +513,7 @@ --> - + *甲方公司: @@ -533,7 +533,7 @@ - + *甲方公司: