master
tping 4 years ago
parent e28e7c347e
commit c75d73c9f7

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

@ -433,6 +433,14 @@ class PartnerController extends ThinkController
if ($has_check) {
$this->error('已存在同名cp,请勿重复添加');
}
$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")->add_db($save);
if ($res) {

@ -214,6 +214,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());
@ -224,6 +227,44 @@ class PromoteCompanyController extends ThinkController
$this->display();
}
// 批量上下架
public function displayOnShelves() {
if (IS_AJAX) {
$post = I("post.");
// var_dump(time());
$where = [];
if ($post['batch_company_type'] == 1) {
$where['company_belong'] = array('exp', " IN (1,2)");
} else {
$where['company_belong'] = $post['batch_company_type'];
}
if ($post['batch_type'] == 1) { // 批量增加
$where['_string'] = "concat(',', game_ids, ',') not like \"%,{$post['batch_game']},%\"";
$exp = "trim(BOTH ',' FROM concat(game_ids, ',', {$post['batch_game']}))";
}
if ($post['batch_type'] == 2) { // 批量删除
$where['_string'] = "concat(',', game_ids, ',') like \"%,{$post['batch_game']},%\"";
$exp = "trim(BOTH ',' FROM replace(concat(',', game_ids, ','), \",{$post['batch_game']},\", ','))";
}
M('promote', 'tab_')->where($where)->save([
'game_ids' => ['exp', $exp]
]);
M('promote_company', 'tab_')->where($where)->save([
'game_ids' => ['exp', $exp]
]);
// var_dump(M('promote', 'tab_')->_sql(),time());die;
echo $this->ajaxReturn([
'code' => 1,
'msg' => '成功',
'data' => []
]);
}
}
public function index()
{
$page = intval(I('get.p', 0));
@ -438,6 +479,15 @@ class PromoteCompanyController extends ThinkController
}
$save['create_time'] = $time;
$save['turnover_ratio'] = $this->setTurnoverRatio($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'];
}
$result = D("PromoteCompanyVerify")->add_db($save);
if ($result) {
addOperationLog(['op_type'=>0,'key'=>$save['company_name'],'op_name'=>'新增推广公司','url'=>U('PromoteCompany/lists')]);

@ -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">
@ -190,10 +232,10 @@
<td class="r table_radio">
<span class="form_radio table_btn">
<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",

@ -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="" placeholder="请输入推广公司名称">
<input type="text" class="txt " id="partner" name="company_name" value="" placeholder="请输入推广公司名称">
</td>
</tr>
@ -376,7 +378,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">
@ -385,7 +387,27 @@
</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: ;">
<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="r">
<select name="part_b_type" id="part_b_type" class="select_gallery" style="margin-left: -900px;">
<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">
@ -399,7 +421,28 @@
</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: ;">
<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="r">
<select name="part_b" id="part_b" class="select_gallery" style="margin-left: -920px;">
<?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">
@ -431,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]" checked="checked">
</label>
@ -439,8 +482,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>
@ -455,12 +499,14 @@
<tr>
<td class="l">结算生效期限:</td>
<td class="r">
<td class="r" style="width: ;">
<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>
@ -715,6 +761,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;

@ -132,6 +132,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>
@ -162,6 +163,7 @@
<th>原包名</th>
<th>现包名</th>
<th>产品类型</th>
<th>结算时间</th>
<th colspan="2">游戏分成比例</th>
<th style="width:10%;min-width:150px;">操作</th>
</tr>
@ -431,7 +433,53 @@
</div>
</form>
</div>
<div class="batch_page" style="display:none">
<div class="pro_promot_main" style="width:520px; left: 20%; top: 10%;">
<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">
@ -446,6 +494,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>
@ -577,6 +640,11 @@
}
});
});
//打开弹窗
$(".batch").click(function(){
$(".batch_page").css("display","block");
});
//保存修改
$(".pro_promot_btn_confirm").click(function(){
@ -588,7 +656,42 @@
});
return false;
});
//保存修改
$(".batch_btn_confirm").click(function(){
batch_company_type
$.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();
},
success: function (data) {
alert(data.msg);
$(".batch_page").hide();
}
});
/* 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");
});
//关闭弹窗
$(".pro_promot_close").click(function(){
$(".pro_promot").css("display","none");

Loading…
Cancel
Save