管理后台>推广员管理>公会分成管理--更新

master
chenxiaojun 5 years ago
parent 3e5588ff3d
commit 8fd8ae006a

@ -20,18 +20,15 @@ class PromoteGameRatioController extends ThinkController
public function lists()
{
$params = I('get.');
$promoteAccount = $params['promote_account'] ?? '';
$promoteId = $params['promote_id'] ?? 0;
$gameId = $params['game_id'] ?? 0;
$status = $params['status'] ?? '';
$page = $params['p'] ? intval($params['p']) : 1;
$row = $params['row'] ? intval($params['row']) : 10;
$map['_string'] = '1 = 1';
if ($promoteAccount) {
$promoteMap['account'] = trim($promoteAccount);
$promoteId = M('promote', 'tab_')->where($promoteMap)->getField('id');
$promoteId = $promoteId ?? 0;
$map['promote_id'] = $promoteId;
if ($promoteId) {
$map['promote_id'] = intval($promoteId);
}
if ($gameId) {
$map['game_id'] = intval($gameId);
@ -73,11 +70,10 @@ class PromoteGameRatioController extends ThinkController
$thisReviewer = $promoteGameRatio['reviewer_id'] ? getPromoteAccount($promoteGameRatio['reviewer_id']) : '待确认';
if ($promoteGameRatio['ratio'] > 0) {
$thisBeninTime = date('Y/m/d', $promoteGameRatio['begin_time']);
$thisEndTime = date('Y/m/d', $promoteGameRatio['end_time']);
} else {
$thisBeninTime = date('Y/m/d', $this->getPromoteApplyCreateTime($thisPromoteId, $thisGameId));
$thisEndTime = '永久';
}
$thisEndTime = $promoteGameRatio['end_time'] ? date('Y/m/d', $promoteGameRatio['end_time']) : '永久';
$validDate = $thisBeninTime . ' - ' . $thisEndTime;
if ($issetPromote) {
$thisPromoteAccount = $promotes[$thisPromoteId]['account'];
@ -117,10 +113,36 @@ class PromoteGameRatioController extends ThinkController
$this->assign('count', $count);
$this->assign('gameList', getAllGameList());
$this->assign('promoteList', getPromoteByLevel(1));
$this->assign('statusList', self::$statusList);
$this->meta_title = '公会分成管理';
$this->display();
}
public function applyRatio()
{
if ($_POST) {
} else {
$params = I('get.');
$id = $params['id'] ?? 0;
$id = intval($id);
if ($id) {
$field = 'promote_id, game_id, ratio, begin_time, end_time, remark';
$map['id'] = $id;
$promoteGameRatio = D(self::MODEL_NAME)->field($field)->where($map)->find();
if (empty($promoteGameRatio)) {
$this->error('数据异常');
}
$this->assign('record', $promoteGameRatio);
}
$this->assign('gameList', getAllGameList());
$this->assign('promoteList', getPromoteByLevel(1));
$this->meta_title = '游戏分成比例申请';
$this->display();
}
}
private function getPromoteApplyCreateTime($promoteId, $gameId)
{
$map['promote_id'] = $promoteId;

@ -0,0 +1,171 @@
<extend name="Public/base" />
<block name="body">
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$meta_title}</h3>
<!-- <p class="description_text">说明:此功是创建推广员时所需填写信息</p>-->
</div>
<!-- 标签页导航 -->
<div class="tab-wrap">
<div class="tab-content tabcon1711">
<!-- 表单 -->
<form id="form" action="{:U('applyRatio?model='.$model['id'])}" method="post" class="form-horizontal">
<!-- 基础文档模型 -->
<div id="tab1" class="tab-pane in tab1">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>会长账号:</td>
<td class="r">
<select name="promote_id" id="promote_id">
<option value="">会长账号</option>
<volist name="promoteList" id="vo">
<empty name="record">
<option value="{$vo.id}">{$vo.account}({$vo.real_name})</option>
<else/>
<option value="{$vo.id}" <if condition="$vo.id eq $record.promote_id">selected</if> >{$vo.account}({$vo.real_name})</option>
</empty>
</volist>
</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 id="game_id" name="game_id" class="select_gallery" >
<option value="">游戏名称</option>
<volist name="gameList" id="vo">
<empty name="record">
<option value="{$vo.id}">{$vo.game_name}</option>
<else/>
<option value="{$vo.id}" <if condition="$vo.id eq $record.game_id">selected</if> >{$vo.game_name}</option>
</empty>
</volist>
</select>
<span class="notice-text">密码长度必须大于6位</span>
</td>
</tr>
<tr>
<td class="l">账号状态:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label >
<input type="radio" value="1" name="status" checked="checked"> 开启
</label >
<label >
<input type="radio" value="2" name="status" > 锁定
</label>
</span>
<span class="notice-text">锁定状态下,推广员账号则无法登录</span>
</td>
</tr>
<tr>
<td class="l">真实姓名:</td>
<td class="r">
<input type="text" class="txt" name="real_name" value="" placeholder=" 输入推广员负责人姓名">
</td>
</tr>
<tr>
<td class="l">手机号:</td>
<td class="r">
<input type="text" class="txt" name="mobile_phone" value="" placeholder="输入推广员负责人手机号">
</td>
</tr>
<td class="l">邮箱:</td>
<td class="r">
<input type="text" class="txt" name="email" value="" placeholder="输入推广员邮箱">
</td>
</tr>
<tr>
<td class="l">商务专员</td>
<td class="r">
<select name="ba_id" id="admin">
<option value="0">请选择商务专员</option>
<volist name=":get_business_affairs_list()" id="vo">
<option value="{$vo.id}">{$vo.account}</option>
</volist>
</select>
<span class="notice-text">设置该推广员所属的商务专员组</span>
</td>
</tr>
</tbody>
</table>
</div>
<input type="hidden" name="id" value="{$data['id']}" />
<div class="form-item cf">
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">
保存
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();" >
返回
</a>
</div>
</form>
</div>
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="Promote/lists/type/1">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script><script type="text/javascript" src="__STATIC__/provincecityarea/area1.js"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('PromoteGameRatio/lists')}');
Think.setValue("game_type_id", {$data.game_type_id|default = 0});
Think.setValue("category", {$data.category|default = 0});
$(function(){
showTab();
prov="{:substr($data['bank_area'],0,2)}";
city="{:substr($data['bank_area'],2,2)}";
ciarea="{:substr($data['bank_area'],4,2)}";
});
//得到地区码
function getAreaID(){
var area = 0;
if($("#seachdistrict").val() != "0"){
area = $("#seachdistrict").val();
}else if ($("#seachcity").val() != "0"){
area = $("#seachcity").val();
}else{
area = $("#seachprov").val();
}
return area;
}
//根据地区码查询地区名
function getAreaNamebyID(areaID){
var areaName = "";
if(areaID.length == 2){
areaName = area_array[areaID];
}else if(areaID.length == 4){
var index1 = areaID.substring(0, 2);
areaName = area_array[index1] + " " + sub_array[index1][areaID];
}else if(areaID.length == 6){
var index1 = areaID.substring(0, 2);
var index2 = areaID.substring(0, 4);
areaName = area_array[index1] + " " + sub_array[index1][index2] + " " + sub_arr[index2][areaID];
}
return areaName;
}
</script>
</block>

@ -40,7 +40,7 @@
<div class="fl button_list">
<div class="tools">
<empty name="show_status">
<a class=" " href="{:U('add?model='.$model['id'])}"><span class="button_icon button_icon1"></span>游戏分成比例申请</a>
<a class=" " href="{:U('applyRatio?model='.$model['id'])}"><span class="button_icon button_icon1"></span>游戏分成比例申请</a>
<a class="ajax-post " target-form="ids" url="{:U('Promote/set_status',array('status'=>1,'msg_type'=>5,'field'=>'status'))}"><span class="button_icon button_icon9"></span>审核通过</a>
<a class="ajax-post " style="color: red;" target-form="ids" url="{:U('Promote/set_status',array('status'=>1,'msg_type'=>5,'field'=>'status'))}"><span class="button_icon button_icon9"></span>审核拒绝</a>
</empty>
@ -67,6 +67,14 @@
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="status" name="status" class="select_gallery" >
<option value="">审核状态</option>
<?php foreach ($statusList as $key => $status) :?>
<option value="{$key}" <if condition="$key heq I('status', '')">selected</if> >{$status}</option>
<?php endforeach ;?>
</select>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('PromoteGameRatio/lists','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
</div>
@ -134,80 +142,12 @@
</table>
</div>
</div>
<div class="page">
<a class="sch-btn" href="{:U('Export/promote_list',array_merge(['xlsname'=>'推广员管理_推广员列表'.((I('type',1)==2)?'_混服申请':'_推广员列表')],I('get.')))}">导出</a>
{$_page|default=''}
</div>
<div class="pro_promot" style="display:none">
<form action="{:U('Promote/savePromoteGame')}" id="ajaxForm" method="post" />
<input type="hidden" name="promote_id" id="se_promote_id" value="" />
<div class="pro_promot_main">
<div class="pro_promot_title">
<div class="fl pro_promot_title_text">
<div class="fl pro_promot_title_bigtext"> 可申请游戏</div> 选中的游戏将在对应的推广员后台进行展示,推广员可进行游戏申请</div>
<div class="pro_promot_close fr"><img src="__IMG__/icon_close.png"></div>
</div>
<div class="pro_promot_con">
<div class="pro_promot_account">推广员账号:<span class="pro_promot_number"></span></div>
<div class="pro_promot_select">
<div class="pro_promot_select_title fl">选择游戏:</div>
<div class="pro_promot_select_list fl">
<a class="pro_promot_select_list_con fl active pro_promot_all pro_promot_mr20">全部 </a>
<a class="pro_promot_select_list_con fl" data-index="A">A</a>
<a class="pro_promot_select_list_con fl" data-index="B">B</a>
<a class="pro_promot_select_list_con fl" data-index="C">C</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="D">D</a>
<a class="pro_promot_select_list_con fl" data-index="E">E</a>
<a class="pro_promot_select_list_con fl" data-index="F">F</a>
<a class="pro_promot_select_list_con fl" data-index="G">G</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="H">H</a>
<a class="pro_promot_select_list_con fl" data-index="I">I</a>
<a class="pro_promot_select_list_con fl" data-index="J">J</a>
<a class="pro_promot_select_list_con fl" data-index="K">K</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="L">L</a>
<a class="pro_promot_select_list_con fl" data-index="M">M</a>
<a class="pro_promot_select_list_con fl" data-index="N">N</a>
<a class="pro_promot_select_list_con fl" data-index="O">O</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="P">P</a>
<a class="pro_promot_select_list_con fl" data-index="Q">Q</a>
<a class="pro_promot_select_list_con fl" data-index="R">R</a>
<a class="pro_promot_select_list_con fl" data-index="S">S</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="T">T</a>
<a class="pro_promot_select_list_con fl" data-index="U">U</a>
<a class="pro_promot_select_list_con fl" data-index="V">V</a>
<a class="pro_promot_select_list_con fl" data-index="W">W</a>
<a class="pro_promot_select_list_con fl pro_promot_mr20" data-index="X">X</a>
<a class="pro_promot_select_list_con fl" data-index="Y">Y</a>
<a class="pro_promot_select_list_con fl" data-index="Z">Z</a>
</div>
</div>
<div class="clear"></div>
<div class="pro_promot_game">
<div class="jsgamecheckallbox z_clearfix" >
<label class="custom-label">
<input type="checkbox" checked="checked" class="form_control jsgamecheckall" >
<i class="label_icon"></i>
<span class="label_text">全选</span></label>
</div>
<ul id="game_list" class="z_clearfix game_list">
</ul>
</div>
<div class="clear"></div>
<div class="pro_promot_btn">
<div class="fl pro_promot_btn_confirm">确定</div>
<div class="fr pro_promot_btn_cancel">取消</div>
</div>
</div>
</div>
</form>
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="Promote/lists/type/{:I('type',1)}">
<input type="hidden" name="url" value="PromoteGameRatio/lists/type/{:I('type',1)}">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
@ -223,7 +163,7 @@ $(".select_gallery").select2();
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Promote/lists')}');
highlight_subnav('{:U('PromoteGameRatio/lists')}');
$(function(){
//搜索功能
$("#search").click(function(){

Loading…
Cancel
Save