diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index 6866af2b7..2bbcbd793 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -280,6 +280,8 @@ class PartnerController extends ThinkController // $count = $model // ->where($map) // ->count(); + $arraypage = $page; + //分页 $parameter['p'] = $page; $parameter['row'] = $row; @@ -288,7 +290,7 @@ class PartnerController extends ThinkController $this->assign('_page', $page); } - $arraypage = $page; +// $arraypage = $page; $size = $row;//每页显示的记录数 $parseData = array_slice($parseData, ($arraypage - 1) * $size, $size); // $page = set_pagination($count, $row, $parameter); @@ -473,7 +475,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 @@ - + *甲方公司: