Merge pull request 'hotfix/company_bug' (#71) from hotfix/company_bug into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/71
master
廖金灵 4 years ago
commit 34d778f4ce

@ -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'];
}

@ -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'];
}

@ -152,16 +152,16 @@
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司类型:</td>
<td class="l" style="width: 50px;">
<select name="part_a_type" id="part_a_type" class="select_gallery">
<option value="2" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>上游CP公司</option>
<option value="1" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>己方公司</option>
<option value="2" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>上游CP公司</option>
<option value="1" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>己方公司</option>
</select>
<span class="notice-text"></span>
</td>
<td class="l" style="width: 100px;"><i class="mustmark" >*</i>乙方公司类型:</td>
<td class="r">
<select name="part_b_type" id="part_b_type" class="select_gallery">
<option value="1" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>上游CP公司</option>
<option value="2" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>己方公司</option>
<option value="1" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>上游CP公司</option>
<option value="2" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>己方公司</option>
</select>
<span class="notice-text"></span>
</td>
@ -179,7 +179,7 @@
<span class="notice-text"></span>
</td>
</tr>-->
<?php if($relation['collaborate_way'] == 1):?>
<?php if($relation['collaborate_way'] == 2):?>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="l" style="width: 50px;">
@ -200,7 +200,7 @@
</td>
</tr>
<?php endif;?>
<?php if($relation['collaborate_way'] == 2):?>
<?php if($relation['collaborate_way'] == 1):?>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="l" style="width: 50px;">

@ -149,16 +149,16 @@
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司类型:</td>
<td class="l" style="width: 50px;">
<select name="part_a_type" id="part_a_type" class="select_gallery" disabled>
<option value="2" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>上游CP公司</option>
<option value="1" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>己方公司</option>
<option value="2" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>上游CP公司</option>
<option value="1" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>己方公司</option>
</select>
<span class="notice-text"></span>
</td>
<td class="l" style="width: 100px;"><i class="mustmark" >*</i>乙方公司类型:</td>
<td class="r">
<select name="part_b_type" id="part_b_type" class="select_gallery" disabled>
<option value="1" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>上游CP公司</option>
<option value="2" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>己方公司</option>
<option value="1" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>上游CP公司</option>
<option value="2" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>己方公司</option>
</select>
<span class="notice-text"></span>
</td>
@ -176,7 +176,7 @@
<span class="notice-text"></span>
</td>
</tr>-->
<?php if($relation['collaborate_way'] == 1):?>
<?php if($relation['collaborate_way'] == 2):?>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="l" style="width: 50px;">
@ -196,7 +196,7 @@
</td>
</tr>
<?php endif;?>
<?php if($relation['collaborate_way'] == 2):?>
<?php if($relation['collaborate_way'] == 1):?>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="l" style="width: 50px;">

@ -500,16 +500,16 @@
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司类型:</td>
<td class="r" style="width: 50px;">
<select name="part_a_type" id="part_a_type" class="select_gallery">
<option value="2" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>下游推广公司</option>
<option value="1" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>己方公司</option>
<option value="2" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>下游推广公司</option>
<option value="1" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>己方公司</option>
</select>
<span class="notice-text"></span>
</td>
<td class="l" style="width: 100px;"><i class="mustmark" >*</i>乙方公司类型:</td>
<td class="r">
<select name="part_b_type" id="part_b_type" class="select_gallery" >
<option value="1" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>下游推广公司</option>
<option value="2" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>己方公司</option>
<option value="1" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>下游推广公司</option>
<option value="2" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>己方公司</option>
</select>
<span class="notice-text"></span>
</td>
@ -528,7 +528,7 @@
</td>
</tr>-->
<?php if($relation['collaborate_way'] == 1):?>
<?php if($relation['collaborate_way'] == 2):?>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="r" style="width: 50px;">
@ -549,7 +549,7 @@
</tr>
<?php endif;?>
<?php if($relation['collaborate_way'] == 2):?>
<?php if($relation['collaborate_way'] == 1):?>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="r" style="width: 50px;">

@ -486,16 +486,16 @@
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司类型:</td>
<td class="r" style="width: 50px;">
<select name="part_a_type" id="part_a_type" class="select_gallery" disabled>
<option value="2" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>下游推广公司</option>
<option value="1" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>己方公司</option>
<option value="2" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>下游推广公司</option>
<option value="1" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>己方公司</option>
</select>
<span class="notice-text"></span>
</td>
<td class="l" style="width: 100px;"><i class="mustmark" >*</i>乙方公司类型:</td>
<td class="r">
<select name="part_b_type" id="part_b_type" class="select_gallery" disabled>
<option value="1" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>下游推广公司</option>
<option value="2" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>己方公司</option>
<option value="1" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>下游推广公司</option>
<option value="2" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>己方公司</option>
</select>
<span class="notice-text"></span>
</td>
@ -513,7 +513,7 @@
<span class="notice-text"></span>
</td>
</tr>-->
<?php if($relation['collaborate_way'] == 1):?>
<?php if($relation['collaborate_way'] == 2):?>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="r" style="width: 50px;">
@ -533,7 +533,7 @@
</td>
</tr>
<?php endif;?>
<?php if($relation['collaborate_way'] == 2):?>
<?php if($relation['collaborate_way'] == 1):?>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="r" style="width: 50px;">

Loading…
Cancel
Save