甲乙方公司

master
tping 4 years ago
parent 08df25eab3
commit 304c59be10

@ -475,10 +475,10 @@ class PartnerController extends ThinkController
$this->checkData($save); $this->checkData($save);
$save['relation']['collaborate_way'] = $save['part_a_type']; $save['relation']['collaborate_way'] = $save['part_a_type'];
if ($save['part_a_type'] == 1) { if ($save['part_a_type'] == 1) {
$save['relation']['self_company_id'] = $save['part_b']; $save['relation']['self_company_id'] = $save['part_a'];
} }
if ($save['part_a_type'] == 2) { if ($save['part_a_type'] == 2) {
$save['relation']['self_company_id'] = $save['part_a']; $save['relation']['self_company_id'] = $save['part_b'];
} }
$res =D("PartnerVerify")->edit_db($save); $res =D("PartnerVerify")->edit_db($save);

@ -734,10 +734,10 @@ class PromoteCompanyController extends ThinkController
$save['relation']['collaborate_way'] = $save['part_a_type']; $save['relation']['collaborate_way'] = $save['part_a_type'];
if ($save['part_a_type'] == 1) { if ($save['part_a_type'] == 1) {
$save['relation']['self_company_id'] = $save['part_b']; $save['relation']['self_company_id'] = $save['part_a'];
} }
if ($save['part_a_type'] == 2) { if ($save['part_a_type'] == 2) {
$save['relation']['self_company_id'] = $save['part_a']; $save['relation']['self_company_id'] = $save['part_b'];
} }
$this->checkData($save); $this->checkData($save);

@ -152,16 +152,16 @@
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司类型:</td> <td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司类型:</td>
<td class="l" style="width: 50px;"> <td class="l" style="width: 50px;">
<select name="part_a_type" id="part_a_type" class="select_gallery"> <select name="part_a_type" id="part_a_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;?>>上游CP公司</option>
<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>
</select> </select>
<span class="notice-text"></span> <span class="notice-text"></span>
</td> </td>
<td class="l" style="width: 100px;"><i class="mustmark" >*</i>乙方公司类型:</td> <td class="l" style="width: 100px;"><i class="mustmark" >*</i>乙方公司类型:</td>
<td class="r"> <td class="r">
<select name="part_b_type" id="part_b_type" class="select_gallery"> <select name="part_b_type" id="part_b_type" class="select_gallery">
<option value="1" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>上游CP公司</option> <option value="1" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>上游CP公司</option>
<option value="2" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>己方公司</option> <option value="2" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>己方公司</option>
</select> </select>
<span class="notice-text"></span> <span class="notice-text"></span>
</td> </td>
@ -179,7 +179,7 @@
<span class="notice-text"></span> <span class="notice-text"></span>
</td> </td>
</tr>--> </tr>-->
<?php if($relation['collaborate_way'] == 2):?> <?php if($relation['collaborate_way'] == 1):?>
<tr> <tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td> <td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="l" style="width: 50px;"> <td class="l" style="width: 50px;">
@ -200,7 +200,7 @@
</td> </td>
</tr> </tr>
<?php endif;?> <?php endif;?>
<?php if($relation['collaborate_way'] == 1):?> <?php if($relation['collaborate_way'] == 2):?>
<tr> <tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td> <td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="l" style="width: 50px;"> <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"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司类型:</td>
<td class="l" style="width: 50px;"> <td class="l" style="width: 50px;">
<select name="part_a_type" id="part_a_type" class="select_gallery" disabled> <select name="part_a_type" id="part_a_type" class="select_gallery" disabled>
<option value="1" selected>上游CP公司</option> <option value="2" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>上游CP公司</option>
<option value="2">己方公司</option> <option value="1" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>己方公司</option>
</select> </select>
<span class="notice-text"></span> <span class="notice-text"></span>
</td> </td>
<td class="l" style="width: 100px;"><i class="mustmark" >*</i>乙方公司类型:</td> <td class="l" style="width: 100px;"><i class="mustmark" >*</i>乙方公司类型:</td>
<td class="r"> <td class="r">
<select name="part_b_type" id="part_b_type" class="select_gallery" disabled> <select name="part_b_type" id="part_b_type" class="select_gallery" disabled>
<option value="1" >上游CP公司</option> <option value="1" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>上游CP公司</option>
<option value="2" selected>己方公司</option> <option value="2" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>己方公司</option>
</select> </select>
<span class="notice-text"></span> <span class="notice-text"></span>
</td> </td>
@ -176,11 +176,32 @@
<span class="notice-text"></span> <span class="notice-text"></span>
</td> </td>
</tr>--> </tr>-->
<?php if($relation['collaborate_way'] == 1):?>
<tr> <tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td> <td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="l" style="width: 50px;"> <td class="l" style="width: 50px;">
<select name="part_b" id="part_b" class="select_gallery" disabled>
<?php foreach($selfCompanies as $selfCompany):?>
<option value="<?=$selfCompany['id']?>" <?php if($selfCompany['company_name']==''):?>selected<?php endif;?>><?=$selfCompany['company_name']?></option>
<?php endforeach;?>
</select>
<span class="notice-text"></span>
</td>
<td class="l" style="width: 90px;"><i class="mustmark" >*</i>乙方公司:</td>
<td class="r">
<select name="part_a" id="part_a" class="select_gallery" disabled> <select name="part_a" id="part_a" class="select_gallery" disabled>
<option id="cp_company" value='1'></option>
</select>
<span class="notice-text"></span>
</td>
</tr>
<?php endif;?>
<?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;">
<select name="part_a" id="part_a" class="select_gallery" disabled>
<option id="cp_company" value='1'></option>
</select> </select>
<span class="notice-text"></span> <span class="notice-text"></span>
</td> </td>
@ -194,6 +215,7 @@
<span class="notice-text"></span> <span class="notice-text"></span>
</td> </td>
</tr> </tr>
<?php endif;?>
<tr> <tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>结算周期:</td> <td class="l"><i class="mustmark" style="margin-left:-7px">*</i>结算周期:</td>
@ -467,21 +489,13 @@
} }
} }
$(function() { $(function() {
if (!$("#partner").val()) { $("#cp_company").text($("#partner").val());
$("#tab_tab1").click();
} else {
$("#part_a").children().remove();
$("#part_a").append("<option value='1'>" + $("#partner").val() + "</option>");
}
$("#tab_tab2").click(function() { $("#tab_tab2").click(function() {
if (!$("#partner").val()) { if (!$("#partner").val()) {
alert('请填写合作方名称'); alert('请填写合作方名称');
$("#tab_tab1").click(); $("#tab_tab1").click();
} }
$("#part_a").children().remove();
$("#part_a").append("<option value='1'>" + $("#partner").val() + "</option>");
return false; return false;
}); });

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

@ -486,16 +486,16 @@
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司类型:</td> <td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司类型:</td>
<td class="r" style="width: 50px;"> <td class="r" style="width: 50px;">
<select name="part_a_type" id="part_a_type" class="select_gallery" disabled> <select name="part_a_type" id="part_a_type" class="select_gallery" disabled>
<option value="1" selected>下游推广公司</option> <option value="2" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>下游推广公司</option>
<option value="2">己方公司</option> <option value="1" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>己方公司</option>
</select> </select>
<span class="notice-text"></span> <span class="notice-text"></span>
</td> </td>
<td class="l" style="width: 100px;"><i class="mustmark" >*</i>乙方公司类型:</td> <td class="l" style="width: 100px;"><i class="mustmark" >*</i>乙方公司类型:</td>
<td class="r"> <td class="r">
<select name="part_b_type" id="part_b_type" class="select_gallery" disabled> <select name="part_b_type" id="part_b_type" class="select_gallery" disabled>
<option value="1" >下游推广公司</option> <option value="1" <?php if($relation['collaborate_way'] == 1):?>selected<?php endif;?>>下游推广公司</option>
<option value="2" selected>己方公司</option> <option value="2" <?php if($relation['collaborate_way'] == 2):?>selected<?php endif;?>>己方公司</option>
</select> </select>
<span class="notice-text"></span> <span class="notice-text"></span>
</td> </td>
@ -513,11 +513,32 @@
<span class="notice-text"></span> <span class="notice-text"></span>
</td> </td>
</tr>--> </tr>-->
<?php if($relation['collaborate_way'] == 1):?>
<tr> <tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td> <td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="r" style="width: 50px;"> <td class="r" style="width: 50px;">
<select name="part_a" id="part_a" class="select_gallery" disabled> <select name="part_a" id="part_a" class="select_gallery" disabled>
<?php foreach($selfCompanies as $selfCompany):?>
<option value="<?=$selfCompany['id']?>" <?php if($selfCompany['company_name']==''):?>selected<?php endif;?>><?=$selfCompany['company_name']?></option>
<?php endforeach;?>
</select>
<span class="notice-text"></span>
</td>
<td class="l" style="width: 90px"><i class="mustmark" >*</i>乙方公司:</td>
<td class="r">
<select name="part_b" id="part_b" class="select_gallery" disabled>
<option id="cp_company" value='1'></option>
</select>
<span class="notice-text"></span>
</td>
</tr>
<?php endif;?>
<?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;">
<select name="part_a" id="part_a" class="select_gallery" disabled>
<option id="cp_company" value='1'></option>
</select> </select>
<span class="notice-text"></span> <span class="notice-text"></span>
</td> </td>
@ -531,6 +552,7 @@
<span class="notice-text"></span> <span class="notice-text"></span>
</td> </td>
</tr> </tr>
<?php endif;?>
<tr> <tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>结算周期:</td> <td class="l"><i class="mustmark" style="margin-left:-7px">*</i>结算周期:</td>
@ -821,12 +843,7 @@
} }
} }
$(function() { $(function() {
if (!$("#partner").val()) { $("#cp_company").text($("#partner").val());
$("#tab_tab1").click();
} else {
$("#part_a").children().remove();
$("#part_a").append("<option value='1'>" + $("#partner").val() + "</option>");
}
$("#tab_tab2").click(function() { $("#tab_tab2").click(function() {
if (!$("#partner").val()) { if (!$("#partner").val()) {
@ -834,8 +851,6 @@
$("#tab_tab1").click(); $("#tab_tab1").click();
} }
$("#part_a").children().remove();
$("#part_a").append("<option value='1'>" + $("#partner").val() + "</option>");
return false; return false;
}); });

Loading…
Cancel
Save