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 @@