Merge branch 'feature/zgc_1126' of wmtx/platform into release

1126
master
张谷诚 4 years ago committed by Gogs
commit ca605305e9

@ -362,6 +362,11 @@ class GameController extends ThinkController
}
}
/*
* ALTER TABLE `tab_game`
ADD COLUMN `kefu_qq_type` tinyint(2) NULL DEFAULT 0 COMMENT '客服qq类型0跟随系统 1不显示 2其他' AFTER `select_package_name`,
ADD COLUMN `kefu_qq` varchar(255) NULL DEFAULT '' COMMENT 'kefu_qq_type为2 时有效' AFTER `kefu_qq_type`;
*/
public function edit($id = null)
{
if (IS_POST) {
@ -459,6 +464,9 @@ class GameController extends ThinkController
$otherData['unique_code'] = $sibling['unique_code'];
$otherData['flooring_page_video'] = $sibling['flooring_page_video'];
$otherData['flooring_page_video_cover'] = $sibling['flooring_page_video_cover'];
$otherData['kefu_qq'] = I('post.kefu_qq');
$otherData['kefu_qq_type'] = I('post.kefu_qq_type');
M('Game', 'tab_')->data($otherData)->where(array('id' => $another['id']))->save();
//同时修改代充游戏折扣
$set_fidel['status'] = 1;

@ -409,6 +409,15 @@ class PartnerController extends ThinkController
$model = M("partner_verify", 'tab_');
if ($_POST) {
$save = I("post.");
$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'];
}
$this->checkData($save);
try {
@ -464,6 +473,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('保存失败');

@ -243,6 +243,9 @@ class PromoteCompanyController extends ThinkController
if ($page) {
$this->assign('_page', $page);
}
$games = M('game', 'tab_')->field('relation_game_id id,relation_game_name game_name,short')->where(['game_status'=>1,'down_port'=>1])->group("relation_game_id")->select();
$this->assign('games', $games);
//分配其他页面需要参数
$this->assign('promoteList', getPromoteByLevel(1));
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Partner/lists'])->find());
@ -253,6 +256,53 @@ class PromoteCompanyController extends ThinkController
$this->display();
}
// 批量上下架
public function displayOnShelves() {
if (IS_AJAX) {
$post = I("post.");
$game = M('game', 'tab_')->where(['id' => $post['batch_game']])->find();
$relationGames = M('game', 'tab_')->where(['relation_game_id' => $game['relation_game_id']])->select();
foreach ($relationGames as $relationGame) {
$gameId = $relationGame['id'];
$this->doDisplayOnShelves($gameId, $post['batch_company_type'], $post['batch_type']);
}
echo $this->ajaxReturn([
'code' => 1,
'msg' => '成功',
'data' => []
]);
}
}
private function doDisplayOnShelves($gameId, $batchCompanyType, $batchType) {
$where = [];
$exp = '';
if ($batchCompanyType == 1) {
$where['company_belong'] = array('exp', " IN (1,2)");
} else {
$where['company_belong'] = $batchCompanyType;
}
if ($batchType == 1) { // 批量增加
$where['_string'] = "concat(',', game_ids, ',') not like \"%,{$gameId},%\"";
$exp = "trim(BOTH ',' FROM concat(game_ids, ',', {$gameId}))";
}
if ($batchType == 2) { // 批量删除
$where['_string'] = "concat(',', game_ids, ',') like \"%,{$gameId},%\"";
$exp = "trim(BOTH ',' FROM replace(concat(',', game_ids, ','), \",{$gameId},\", ','))";
}
M('promote', 'tab_')->where($where)->save([
'game_ids' => ['exp', $exp]
]);
M('promote_company', 'tab_')->where($where)->save([
'game_ids' => ['exp', $exp]
]);
}
public function index()
{
$page = intval(I('get.p', 0));
@ -448,6 +498,14 @@ class PromoteCompanyController extends ThinkController
$save['promotes'] = json_decode($save['promotes'], true);
$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'];
}
$this->checkData($save);
$presidentDepositService = new PresidentDepositService();
@ -467,6 +525,7 @@ class PromoteCompanyController extends ThinkController
}
$save['create_time'] = $time;
$save['turnover_ratio'] = $this->setTurnoverRatio($save);
$result = D("PromoteCompanyVerify")->add_db($save);
if ($result) {
addOperationLog(['op_type'=>0,'key'=>$save['company_name'],'op_name'=>'新增推广公司','url'=>U('PromoteCompany/lists')]);
@ -667,6 +726,15 @@ class PromoteCompanyController extends ThinkController
{
if ($_POST) {
$save = I('post.');//前端已经验证
$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'];
}
$this->checkData($save);
$promoteCompanyService = new PromoteCompanyService();

@ -658,10 +658,20 @@
<span class="notice-text">在微信开放平台申请创建的应用签名fd0e6a444fd988bf23ce8a1818623b58若无此项可不填写待定</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">客服QQ类型</td>
<td class="r">
<select name="kefu_qq_type">
<option value="0">默认跟随系统</option>
<option value="1">没有客服QQ</option>
<option value="2">特殊客服QQ</option>
</select>
</td>
</tr>
<tr>
<td class="l noticeinfo">客服QQ</td>
<td class="r">
<input type="text" class="txt" name="ccustom_service_qq" value="" placeholder="游戏客服QQ">
<input type="text" class="txt" name="kefu_qq" value="" placeholder="游戏客服QQ">
<span class="notice-text">在游戏里遇到问题点击联系QQ</span>
</td>

@ -874,14 +874,25 @@
</td>
</tr>
<tr>
<td class="l noticeinfo">客服QQ类型</td>
<td class="r">
<select name="kefu_qq_type">
<option value="0" <if condition="$data['kefu_qq_type'] eq 0"> selected </if>>默认跟随系统</option>
<option value="1" <if condition="$data['kefu_qq_type'] eq 1"> selected </if>>没有客服QQ</option>
<option value="2" <if condition="$data['kefu_qq_type'] eq 2"> selected </if>>特殊客服QQ</option>
</select>
</td>
</tr>
<tr>
<td class="l noticeinfo">客服QQ</td>
<td class="r">
<input type="text" class="txt" name="ccustom_service_qq" value="{$data['ccustom_service_qq']}" placeholder="游戏客服QQ">
<input type="text" class="txt" name="kefu_qq" value="{$data['kefu_qq']}" placeholder="游戏客服QQ">
<span class="notice-text">在游戏里遇到问题点击联系QQ</span>
</td>
</tr>
</tbody>
</table>
</div>
@ -975,7 +986,7 @@
<!--推广配置-->
<div id="tab6" class="tab-pane tab6 ">
<!-- <div id="tab6" class="tab-pane tab6 ">
<input type="button" id="addpromote" onclick="addPromote()" style="background: #3E96C9;color:white;border:none;outline: none;width:90px;height:30px;border-radius: 3px;" value="添加" />
<div class="data_list data_game_list" id="addpromoteindex" style="margin-top:20px;">
<div class="">
@ -1056,7 +1067,7 @@
<input type="hidden" name="group_id" id="group_id" value="{$_GET['group_id']}">
<input type="hidden" name="promote_data" id="promote_data" value="[]">
<div id="transfer_promote" class="demo-transfer" style="margin-left: 100px;margin-top: 35px;display:none"></div>
</div>
</div> -->
<div class="form-item cf">
<input type="hidden" name='id' value="{$data['id']}" />

@ -20,8 +20,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 +36,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="" placeholder="请输入合作方名称">
<input type="text" class="txt " id="partner" name="partner" value="" placeholder="请输入合作方名称">
</td>
</tr>
@ -135,7 +135,8 @@
<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">
@ -144,7 +145,28 @@
</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_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">
@ -157,6 +179,26 @@
<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">
@ -188,12 +230,12 @@
<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]" checked="checked">
<input type="radio" value="1" name="relation[is_payment]">
</label>
<label>
<input type="radio" value="2" name="relation[is_payment]">
<input type="radio" value="2" name="relation[is_payment]" checked="checked">
</label>
</span>
<span class="notice-text">选择否将不能进行线上打款</span>
@ -212,7 +254,7 @@
<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="" placeholder="生效开始时间">
-<input type="text" class="txt time time4" name="validity_end_time" value="" placeholder="生效结束时间">
<span class="notice-text" style="float: none;">结束时间不选默认永久</span>
@ -417,15 +459,84 @@
<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();
var v = $(this).val();
if(v == 1){
$("#server_fee_input").show();
}else{
$("#server_fee_input").hide();
}
  });
});
$('.time1').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",

@ -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();

@ -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">
@ -142,9 +144,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>
@ -160,7 +162,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="" placeholder="请输入推广公司名称">
<input type="text" class="txt " id="partner" name="company_name" value="" placeholder="请输入推广公司名称">
</td>
</tr>
@ -442,7 +444,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">
@ -451,7 +453,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_type" id="part_a_type" class="select_gallery">
<option value="1" selected>下游推广公司</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" style="">
<option value="1" >下游推广公司</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">
@ -466,6 +488,27 @@
<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" style="">
<?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">
@ -497,7 +540,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]" checked="checked">
</label>
@ -505,8 +548,9 @@
<input type="radio" value="2" name="relation[is_payment]">
</label>
</span>
<span class="notice-text">选择否将不能进行线上打款</span>
<span class="notice-text">选择否将不能进行线上打款</span>
</td>
<!-- <td class="l"><span class="notice-text">选择否将不能进行线上打款</span></td> -->
</tr>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>收款方:</td>
@ -521,12 +565,14 @@
<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="" placeholder="生效开始时间">
&nbsp;-&nbsp;<input type="text" class="txt time time4" name="validity_end_time" value="" placeholder="生效结束时间">
<span class="notice-text" style="float: none;">结束时间不选默认永久</span>
</td>
<td>
</td>
</tr>
<tr>
<td class="l">支付宝真实姓名:</td>
@ -781,6 +827,74 @@
<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')}");
var flag = false;

@ -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">
@ -142,9 +144,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>
@ -160,7 +162,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>
@ -468,7 +470,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">
@ -477,8 +479,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>下游推广公司</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" >下游推广公司</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">
@ -489,7 +510,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">
@ -521,7 +562,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>
@ -544,7 +585,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>
@ -762,6 +803,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(){

@ -41,8 +41,21 @@
display: block;
clear:both;
}
.modal{
background: black;
position:fixed;
left:0;
top:0;
right:0;
bottom:0;
opacity: 0.4;
display: none;
}
</style>
<div class="modal" style="display: none;z-index: 9999;">1</div>
<div class="cf main-place top_nav_list navtab_list">
<div class="fr">
<a class="tabchose" href="{:U('lists')}">生效列表</a>
@ -143,6 +156,7 @@
<div class="tools">
<a class="ajax-post" target-form="ids" url="{:U('PromoteCompany/marketingDirectorShow', ['isShow'=>1])}"><span class="button_icon " style="margin-top: 0;"></span>展示市场总监信息</a>
<a class="ajax-post" target-form="ids" url="{:U('PromoteCompany/marketingDirectorShow', ['isShow'=>2])}"><span class="button_icon " style="margin-top: 0;"></span>隐藏市场总监信息</a>
<a class="batch" target-form="ids" url=""><span class="button_icon " style="margin-top: 0;"></span>批量上下架游戏</a>
</div>
</div>
</div>
@ -467,7 +481,53 @@
</div>
</form>
</div>
<div class="batch_page" style="display:none">
<div class="pro_promot_main" style="z-index: 9999;width:520px; left: 20%; top: 220px;">
<div class="pro_promot_title">
<div class="fl pro_promot_title_text">
<div class="fl pro_promot_title_bigtext"> 批量上下架游戏</div> </div>
<div class="batch_close fr"><img src="__IMG__/icon_close.png" style="margin-right: 10px;"></div>
</div>
<div class="pro_promot_con">
<div class="pro_promot_select">
<div class="pro_promot_select_title fl" style="text-align: center; width: 520px; line-height: 40px;">
<span style="margin-right: 40px;">操作类型:</span>
<select id="batch_type" name="batch_type" class="" style="width: 200px; magin-left: 100px;">
<option value="1">增加可推广游戏</option>
<option value="2">删除可推广游戏</option>
</select>
</div>
<br/>
<div class="pro_promot_select_title fl" style="text-align: center; width: 520px;">
<span style="margin-right: 40px;">游戏名称:</span>
<select id="batch_game" name="batch_game" class="" style="width: 200px; magin-left: 100px; line-height: 40px;">
<volist name="games" id="vo">
<option value="{$vo['id']}">{$vo['game_name']}</option>
</volist>
</select>
</div>
<p>
<div class="pro_promot_select_title fl" style="text-align: center; width: 520px;">
<span style="margin-right: 40px;">公司类型:</span>
<select id="batch_company_type" name="batch_company_type" class="" style="width: 200px; magin-left: 100px; line-height: 40px;">
<option value="0">内团</option>
<option value="1">外团(含分发)</option>
<option value="3"></option>
</select>
</div>
</div>
<div class="clear"></div>
<div class="clear"></div>
<div class="pro_promot_btn btn_wrap">
<div class="fl batch_btn_confirm btn">确定</div>
<div class="fr batch_btn_cancel btn">取消</div>
</div>
</div>
</div>
</form>
</div>
</block>
<block name="script">
@ -487,6 +547,21 @@
.layui-layer-demo .layui-layer-content tr~tr {border-top:1px solid #ccc;}
.layui-layer-demo .layui-layer-content td~td {border-left:1px solid #ccc;}
.layui-layer-demo .layui-layer-content tr:last-child td {}
.btn_wrap {
color: #ffffff;
background: #19b1ea;
}
.btn {
width: 32px;
height: 16px;
line-height: 16px;
text-align: center;
border: 1px solid #19b1ea;
color: #19b1ea;
border-radius: 5px;
cursor: pointer;
}
</style>
<script>
@ -653,6 +728,12 @@
}
});
});
//打开弹窗
$(".batch").click(function(){
$(".batch_page").css("display","block");
$(".modal").show();
});
//保存修改
$(".pro_promot_btn_confirm").click(function(){
@ -664,7 +745,49 @@
});
return false;
});
//保存修改
$(".batch_btn_confirm").click(function(){
$.ajax({
url: "{:U('displayOnShelves')}",
method: 'POST',
dataType: 'json',
data: {
batch_company_type: $("#batch_company_type").val(),
batch_game: $("#batch_game").val(),
batch_type: $("#batch_type").val()
},
error: function () {
alert("服务器繁忙,稍后再试");
$(".batch_page").hide();
$(".modal").hide();
},
success: function (data) {
if (!data.msg) {
alert(data.info);
} else {
alert(data.msg);
}
$(".batch_page").hide();
$(".modal").hide();
window.location.reload();
}
});
/* var index = layer.load(2);
$("#ajaxForm").ajaxSubmit(function(res){
layer.msg(res.msg);
layer.close(index);
});
return false; */
});
//关闭弹窗
$(".batch_close,.batch_btn_cancel").click(function(){
$(".batch_page").css("display","none");
$(".modal").hide();
});
//关闭弹窗
$(".pro_promot_close").click(function(){
$(".pro_promot").css("display","none");

Loading…
Cancel
Save