master
tping 4 years ago
parent 025d90f5fa
commit 0d52dc7d61

@ -472,6 +472,14 @@ 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) {
$save['relation']['self_company_id'] = $save['part_b'];
}
if ($save['part_a_type'] == 2) {
$save['relation']['self_company_id'] = $save['part_a'];
}
$res =D("PartnerVerify")->edit_db($save);
if ($res === false) {
$this->error('保存失败');

@ -699,6 +699,14 @@ class PromoteCompanyController extends ThinkController
));
}
$save['relation']['collaborate_way'] = $save['part_a_type'];
if ($save['part_a_type'] == 1) {
$save['relation']['self_company_id'] = $save['part_b'];
}
if ($save['part_a_type'] == 2) {
$save['relation']['self_company_id'] = $save['part_a'];
}
$save['turnover_ratio'] = $this->setTurnoverRatio($save);
$res = D("PromoteCompanyVerify")->edit_db($save);
if ($res) {

@ -230,7 +230,7 @@
<tr>
<td class="l">是否有打款流程:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<span class="form_radio table_btn" style="width: 100px;">
<label>
<input type="radio" value="1" name="relation[is_payment]">
</label>

@ -5,6 +5,8 @@
<style>
#form .txt_area.download_url {width:400px;}
.tabcon1711 .table_radio2 .table_btn {width:215px;}
.move200 {margin-left: -1000px;}
.move150 {margin-left: -150px;}
</style>
</block>
<block name="body">
@ -20,8 +22,8 @@
<div class="tab-wrap">
<div class="cf main-place top_nav_list navtab_list">
<ul class="tabnav1711 fr jstabnav">
<li data-tab="tab1" class="current"><a href="javascript:void(0);">基本信息</a></li>
<li data-tab="tab2" ><a href="javascript:void(0);">结算信息</a></li>
<li data-tab="tab1" id="tab_tab1" class="current"><a href="javascript:void(0);">基本信息</a></li>
<li data-tab="tab2" id="tab_tab2"><a href="javascript:void(0);">结算信息</a></li>
</ul>
<h3 class="page_title">{$meta_title}</h3>
</div>
@ -36,7 +38,7 @@
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>合同合作方名称:</td>
<td class="r" >
<input type="text" class="txt " name="partner" value="{$data.partner}" placeholder="请输入合作方名称">
<input type="text" class="txt " name="partner" id="partner" value="{$data.partner}" placeholder="请输入合作方名称">
</td>
</tr>
@ -135,7 +137,7 @@
<div id="tab2" class="tab-pane tab2 ">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<!--<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>合作方式:</td>
<td class="r">
<select name="relation[collaborate_way]" id="collaborate_way" class="select_gallery">
@ -145,7 +147,27 @@
<span class="notice-text"></span>
</td>
</tr>
-->
<tr>
<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="1" selected>上游CP公司</option>
<option value="2">己方公司</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" >上游CP公司</option>
<option value="2" selected>己方公司</option>
</select>
<span class="notice-text"></span>
</td>
</tr>
<!--<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>己方公司:</td>
<td class="r">
<select name="relation[self_company_id]" id="self_company" class="select_gallery">
@ -156,7 +178,26 @@
</select>
<span class="notice-text"></span>
</td>
</tr>-->
<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">
</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">
<?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>
</tr>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>结算周期:</td>
<td class="r">
@ -188,7 +229,7 @@
<tr>
<td class="l">是否有打款流程:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<span class="form_radio table_btn" style="width: 100px;">
<label>
<input type="radio" value="1" name="relation[is_payment]" <?php if($relation['is_payment'] == 1):?>checked<?php endif;?>> 是
</label>
@ -211,7 +252,7 @@
</tr>
<tr>
<td class="l">结算生效期限:</td>
<td class="r">
<td class="r" style="width: 640px;">
<input type="text" class="txt time time3" name="validity_start_time" value="{$data.validity_start_time}" placeholder="生效开始时间">
-<input type="text" class="txt time time4" name="validity_end_time" value="{$data.validity_end_time}" placeholder="生效结束时间">
<span class="notice-text" style="float: none;">结束时间不选默认永久</span>
@ -417,6 +458,73 @@
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
// 切换select
function selectRemove(id, typeId) {
$(id).children().remove();
indexNum = $(typeId).children('option:selected').index();
if (indexNum == 0) {
$(id).append("<option value='1'>" + $("#partner").val() + "</option>");
}
if (indexNum == 1) {
"<?php foreach($selfCompanies as $selfCompany):?>"
$(id).append(
"<option value=\"<?=$selfCompany['id']?>\" <?php if($selfCompany['company_name']=='海南万盟天下科技有限公司'):?>selected<?php endif;?>><?=$selfCompany['company_name']?></option>"
);
"<?php endforeach;?>";
}
}
$(function() {
if (!$("#partner").val()) {
$("#tab_tab1").click();
}
$("#tab_tab2").click(function() {
if (!$("#partner").val()) {
alert('请填写合作方名称');
$("#tab_tab1").click();
}
$("#part_a").children().remove();
$("#part_a").append("<option value='1'>" + $("#partner").val() + "</option>");
return false;
});
$("#part_a_type").change(function() {
selectRemove("#part_a", "#part_a_type");
indexBSelect = 0;
if (indexNum == 0) {
indexBSelect = 1;
}
if (indexNum == 1) {
indexBSelect = 0;
}
$("#part_b_type").get(0).selectedIndex = indexBSelect;
selectRemove("#part_b", "#part_b_type");
});
$("#part_b_type").change(function() {
selectRemove("#part_b", "#part_b_type");
indexASelect = 0;
if (indexNum == 0) {
indexASelect = 1;
}
if (indexNum == 1) {
indexASelect = 0;
}
$("#part_a_type").get(0).selectedIndex = indexASelect;
selectRemove("#part_a", "#part_a_type");
});
});
showTab();
$("input[type=radio][name=has_server_fee]").on('change', function (e) {
    var v = $(this).val();

@ -391,16 +391,16 @@
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司类型:</td>
<td class="l" style="width: ;">
<td class="r" style="width: 50px;">
<select name="part_a_type" id="part_a_type" class="select_gallery">
<option value="1" selected>上游CP公司</option>
<option value="2">己方公司</option>
</select>
<span class="notice-text"></span>
</td>
<td class="l" style="width: ;"><span class="move200"><i class="mustmark" >*</i>乙方公司类型:</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" style="margin-left: -900px;">
<select name="part_b_type" id="part_b_type" class="select_gallery" style="">
<option value="1" >上游CP公司</option>
<option value="2" selected>己方公司</option>
</select>
@ -426,15 +426,15 @@
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>甲方公司:</td>
<td class="l" style="width: ;">
<td class="r" style="width: 50px;">
<select name="part_a" id="part_a" class="select_gallery">
</select>
<span class="notice-text"></span>
</td>
<td class="l" style="width: ;"><span class="move200"><i class="mustmark" >*</i>乙方公司:</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" style="margin-left: -920px;">
<select name="part_b" id="part_b" class="select_gallery" style="">
<?php foreach($selfCompanies as $selfCompany):?>
<option value="<?=$selfCompany['id']?>" <?php if($selfCompany['company_name']==''):?>selected<?php endif;?>><?=$selfCompany['company_name']?></option>
<?php endforeach;?>
@ -499,7 +499,7 @@
<tr>
<td class="l">结算生效期限:</td>
<td class="r" style="width: ;">
<td class="r" style="width: 640px;">
<input type="text" class="txt time time3" name="validity_start_time" value="" placeholder="生效开始时间">
&nbsp;-&nbsp;<input type="text" class="txt time time4" name="validity_end_time" value="" placeholder="生效结束时间">
<span class="notice-text" style="float: none;">结束时间不选默认永久</span>

@ -9,6 +9,8 @@
<style>
#form .txt_area.download_url {width:400px;}
.tabcon1711 .table_radio2 .table_btn {width:215px;}
.move200 {margin-left: -1000px;}
.move150 {margin-left: -150px;}
</style>
</block>
<block name="body">
@ -141,9 +143,9 @@
<div class="tab-wrap">
<div class="cf main-place top_nav_list navtab_list">
<ul class="tabnav1711 fr jstabnav">
<li data-tab="tab1" class="current"><a href="javascript:void(0);">基本信息</a></li>
<li data-tab="tab2" ><a href="javascript:void(0);">结算信息</a></li>
<li data-tab="tab3" ><a href="javascript:void(0);">会长信息</a></li>
<li data-tab="tab1" id="tab_tab1" class="current"><a href="javascript:void(0);">基本信息</a></li>
<li data-tab="tab2" id="tab_tab2" ><a href="javascript:void(0);">结算信息</a></li>
<li data-tab="tab3" id="tab_tab3" ><a href="javascript:void(0);">会长信息</a></li>
</ul>
<h3 class="page_title">{$meta_title}</h3>
<p class="description_text">说明:查看和编辑推广公司的基本信息、结算信息、会长信息等。</p>
@ -159,7 +161,7 @@
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>推广公司名称:</td>
<td class="r" >
<input type="text" class="txt " name="company_name" value="{$data.company_name}" placeholder="请输入推广公司名称">
<input type="text" class="txt " name="company_name" id="partner" value="{$data.company_name}" placeholder="请输入推广公司名称">
</td>
</tr>
<tr>
@ -380,7 +382,7 @@
<div id="tab2" class="tab-pane tab2 ">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<!--<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>合作方式:</td>
<td class="r">
<select name="relation[collaborate_way]" id="collaborate_way" class="select_gallery">
@ -389,8 +391,27 @@
</select>
<span class="notice-text"></span>
</td>
</tr>
</tr>-->
<tr>
<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="1" selected>上游CP公司</option>
<option value="2">己方公司</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" >上游CP公司</option>
<option value="2" selected>己方公司</option>
</select>
<span class="notice-text"></span>
</td>
</tr>
<!--<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>己方公司:</td>
<td class="r">
<select name="relation[self_company_id]" id="self_company" class="select_gallery">
@ -401,7 +422,27 @@
</select>
<span class="notice-text"></span>
</td>
</tr>-->
<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">
</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">
<?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>
</tr>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>结算周期:</td>
<td class="r">
@ -433,7 +474,7 @@
<tr>
<td class="l">是否支付宝打款:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<span class="form_radio table_btn" style="width: 100px;">
<label>
<input type="radio" value="1" name="relation[is_payment]" <?php if($relation['is_payment'] == 1):?>checked<?php endif;?>> 是
</label>
@ -456,7 +497,7 @@
</tr>
<tr>
<td class="l">结算生效期限:</td>
<td class="r">
<td class="r" style="width: 640px;">
<input type="text" class="txt time time3" name="validity_start_time" value="{$data.validity_start_time}" placeholder="生效开始时间">
&nbsp;-&nbsp;<input type="text" class="txt time time4" name="validity_end_time" value="{$data.validity_end_time}" placeholder="生效结束时间">
<span class="notice-text" style="float: none;">结束时间不选默认永久</span>
@ -674,6 +715,73 @@
<block name="script">
<script type="text/javascript">
// 切换select
function selectRemove(id, typeId) {
$(id).children().remove();
indexNum = $(typeId).children('option:selected').index();
if (indexNum == 0) {
$(id).append("<option value='1'>" + $("#partner").val() + "</option>");
}
if (indexNum == 1) {
"<?php foreach($selfCompanies as $selfCompany):?>"
$(id).append(
"<option value=\"<?=$selfCompany['id']?>\" <?php if($selfCompany['company_name']=='海南万盟天下科技有限公司'):?>selected<?php endif;?>><?=$selfCompany['company_name']?></option>"
);
"<?php endforeach;?>";
}
}
$(function() {
if (!$("#partner").val()) {
$("#tab_tab1").click();
}
$("#tab_tab2").click(function() {
if (!$("#partner").val()) {
alert('请填写合作方名称');
$("#tab_tab1").click();
}
$("#part_a").children().remove();
$("#part_a").append("<option value='1'>" + $("#partner").val() + "</option>");
return false;
});
$("#part_a_type").change(function() {
selectRemove("#part_a", "#part_a_type");
indexBSelect = 0;
if (indexNum == 0) {
indexBSelect = 1;
}
if (indexNum == 1) {
indexBSelect = 0;
}
$("#part_b_type").get(0).selectedIndex = indexBSelect;
selectRemove("#part_b", "#part_b_type");
});
$("#part_b_type").change(function() {
selectRemove("#part_b", "#part_b_type");
indexASelect = 0;
if (indexNum == 0) {
indexASelect = 1;
}
if (indexNum == 1) {
indexASelect = 0;
}
$("#part_a_type").get(0).selectedIndex = indexASelect;
selectRemove("#part_a", "#part_a_type");
});
});
//导航高亮
highlight_subnav("{:U('PromoteCompany/lists')}");
$('#submit').click(function(){

Loading…
Cancel
Save