新增游戏分成比例
parent
1c8ef3493d
commit
6a3b9b6da3
@ -0,0 +1,277 @@
|
|||||||
|
<?php
|
||||||
|
// 游戏默认分成比例模板
|
||||||
|
namespace Admin\Controller;
|
||||||
|
|
||||||
|
class CompanyGameRatioController extends AdminController
|
||||||
|
{
|
||||||
|
public $admininfo;
|
||||||
|
public $DBModel;
|
||||||
|
public $Status = [
|
||||||
|
"-2"=>"管理员拒绝",
|
||||||
|
"-1"=>"市场部拒绝",
|
||||||
|
"0"=>"待审核",
|
||||||
|
"1"=>"市场部通过",
|
||||||
|
"2"=>"管理员通过"
|
||||||
|
];
|
||||||
|
public function _initialize()
|
||||||
|
{
|
||||||
|
$this->admininfo = $_SESSION['onethink_admin']['user_auth'];
|
||||||
|
$this->DBModel = M("company_game_ratio","tab_");
|
||||||
|
parent::_initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
dd(MODULE_NAME."/".CONTROLLER_NAME );
|
||||||
|
$params = I('get.');
|
||||||
|
$page = $params['p'] ? intval($params['p']) : 1;
|
||||||
|
$row = $params['row'] ? intval($params['row']) : 10;
|
||||||
|
|
||||||
|
$gamewhere['_string'] = '1 = 1';
|
||||||
|
$where['_string'] = '1 = 1';
|
||||||
|
if(isset($params['relation_game_id'])){
|
||||||
|
$gamewhere['relation_game_id'] = $params['relation_game_id'];
|
||||||
|
$where['m.relation_game_id'] = $params['relation_game_id'];
|
||||||
|
}
|
||||||
|
if(isset($params['company_id'])){
|
||||||
|
$where['m.company_id'] = $params['company_id'];
|
||||||
|
}
|
||||||
|
if(isset($params['status'])){
|
||||||
|
$where['m.status'] = $params['status'];
|
||||||
|
}
|
||||||
|
//TODO:未计算公司类型
|
||||||
|
$this->checkListOrCountAuthRestMap($where);
|
||||||
|
$gameres = M("game","tab_")->field("tab_game.relation_game_id,tab_game.relation_game_name,IF(tab_game.original_package_name='','未配置',tab_game.original_package_name) original_package_name,tab_game_type.type_name game_type_name")->where($gamewhere)->join("tab_game_type on tab_game.game_type_id = tab_game_type.id")->group("tab_game.relation_game_id")->select(false);
|
||||||
|
$dbres = M("company_game_ratio_log","tab_")
|
||||||
|
->alias('m')
|
||||||
|
->field("m.*,g.*,p.company_name,p.company_belong")
|
||||||
|
->join("left JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")
|
||||||
|
->join("left JOIN tab_promote_company p ON m.company_id = p.id")
|
||||||
|
->where($where)
|
||||||
|
->order('create_time desc, id desc');
|
||||||
|
if(isset($params['export'])){
|
||||||
|
$dbres = $dbres->select();
|
||||||
|
}else{
|
||||||
|
$dbres = $dbres->page($page, $row)->select();
|
||||||
|
}
|
||||||
|
foreach($dbres as $k=>&$v){
|
||||||
|
$v['settlement_type'] ='--';
|
||||||
|
$v['begin_time'] = date("Y-m-d",$v['begin_time']);
|
||||||
|
$v['end_time'] = $v['end_time'] ? date('Y-m-d', $v['end_time']) : '永久';
|
||||||
|
$v['company_belong'] ="下游".getCompanyBlong($v['company_belong']);
|
||||||
|
$v['verify_log'] = json_decode($v['verify_log'], true);
|
||||||
|
$v["create"]= "{$v['verify_log']['create_user']} <br/> {$v['verify_log']['create_time']}";
|
||||||
|
if(isset($v['verify_log']['market_user'])){
|
||||||
|
if($v['status'] == -1){
|
||||||
|
$ts = "审核拒绝";
|
||||||
|
}else{
|
||||||
|
$ts = "审核通过";
|
||||||
|
}
|
||||||
|
$v["market"]= "{$ts}({$v['verify_log']['market_user']}) <br/> {$v['verify_log']['market_time']}";
|
||||||
|
}else{
|
||||||
|
$v["market"] = '--';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($v['verify_log']['admin_user'])){
|
||||||
|
if($v['status'] == -2){
|
||||||
|
$ts = "审核拒绝";
|
||||||
|
}else{
|
||||||
|
$ts = "审核通过";
|
||||||
|
}
|
||||||
|
$v["admin"]= "{$ts}({$v['verify_log']['admin_user']}) <br/> {$v['verify_log']['admin_time']}";
|
||||||
|
}else{
|
||||||
|
$v["admin"] = '--';
|
||||||
|
}
|
||||||
|
//新
|
||||||
|
$thisTurnoverRatios = $v['turnover_ratio'] ? json_decode($v['turnover_ratio'], true) : [];
|
||||||
|
$thisRatioDtl = "默认:{$v['ratio']}%";
|
||||||
|
if ($thisTurnoverRatios) {
|
||||||
|
if (I('export', 0) == 1) {
|
||||||
|
$symbol = "\n";
|
||||||
|
} else {
|
||||||
|
$symbol = "<br>";
|
||||||
|
}
|
||||||
|
foreach ($thisTurnoverRatios as $thisTurnoverRatio) {
|
||||||
|
$thisIntervalClosedStatusText = isset($thisTurnoverRatio['instanceof']) ? ($thisTurnoverRatio['instanceof'] == 1 ? '≥' : '>') : '≥';
|
||||||
|
$thisRatioDtl .= "{$symbol}月流水{$thisIntervalClosedStatusText}{$thisTurnoverRatio['turnover']},比例:{$thisTurnoverRatio['ratio']}%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$v['turnover_ratio_str'] = $thisRatioDtl;
|
||||||
|
//旧
|
||||||
|
$lastTurnoverRatios = $v['last_turnover_ratio'] ? json_decode($v['last_turnover_ratio'], true) : [];
|
||||||
|
$lastRatioDtl = "默认:{$v['last_ratio']}%";
|
||||||
|
if ($lastTurnoverRatios) {
|
||||||
|
if (I('export', 0) == 1) {
|
||||||
|
$symbol = "\n";
|
||||||
|
} else {
|
||||||
|
$symbol = "<br>";
|
||||||
|
}
|
||||||
|
foreach ($lastTurnoverRatios as $thisTurnoverRatio) {
|
||||||
|
$thisIntervalClosedStatusText = isset($thisTurnoverRatio['instanceof']) ? ($thisTurnoverRatio['instanceof'] == 1 ? '≥' : '>') : '≥';
|
||||||
|
$lastRatioDtl .= "{$symbol}月流水{$thisIntervalClosedStatusText}{$thisTurnoverRatio['turnover']},比例:{$thisTurnoverRatio['ratio']}%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$v['last_turnover_ratio_str'] = $lastRatioDtl;
|
||||||
|
|
||||||
|
}
|
||||||
|
$count = M("company_game_ratio_log","tab_")->alias('m')->field("count(id) count")->where($where)->find()['count'];
|
||||||
|
$this->assign('data', $dbres);
|
||||||
|
$page = set_pagination($count, $row);
|
||||||
|
if($page) {
|
||||||
|
$this->assign('_page', $page);
|
||||||
|
}
|
||||||
|
$this->assign('status',$this->Status);
|
||||||
|
|
||||||
|
$this->assign("companyList",D("PromoteCompany")->getList());
|
||||||
|
$this->assign("gameList",D("Game")->getRelationGameLits());
|
||||||
|
$this->display();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function add()
|
||||||
|
{
|
||||||
|
if ($_POST) {
|
||||||
|
$params = I('post.');
|
||||||
|
if (empty($params['begin_time'])) {
|
||||||
|
$this->error('请选择开始时间');
|
||||||
|
}
|
||||||
|
if (!empty($params['end_time'])) {
|
||||||
|
if (strtotime($params['end_time']) < strtotime($params['begin_time'])) {
|
||||||
|
$this->error('结束时间不得小于开始时间');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isset($params['ratio']) || $params['ratio'] === '') {
|
||||||
|
$this->error('默认分成比例不能为空');
|
||||||
|
}
|
||||||
|
$save['turnover_ratio'] = $this->setTurnoverRatio($params);
|
||||||
|
$save['ratio'] = $params['ratio'] ?? 0;
|
||||||
|
$save['relation_game_id'] = $params['relation_game_id'] ?? 0;
|
||||||
|
$save['company_id'] = $params['company_id'] ?? 0;
|
||||||
|
$save['begin_time'] = strtotime($params['begin_time']);
|
||||||
|
$save['end_time'] = $params['end_time'] ? strtotime($params['end_time'])+86399 : 0;
|
||||||
|
$save['remark'] = $params['remark'] ?? '';
|
||||||
|
$save['status'] = 0;
|
||||||
|
$save['verify_log']=json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y-m-d H:i:s")]);
|
||||||
|
//获取旧比例
|
||||||
|
$this->getOldRatio($save);
|
||||||
|
//判断已有未审核
|
||||||
|
$where = [
|
||||||
|
"relation_game_id"=>$save['company_id'],
|
||||||
|
"company_id"=>$save['company_id'],
|
||||||
|
"status"=>["LT",2]//管理员未确认
|
||||||
|
];
|
||||||
|
$hasdb = M("company_game_ratio_log","tab_")->field("count(id) count")->where($where)->find()['count'];
|
||||||
|
if($hasdb > 0){
|
||||||
|
$this->error('已经有审批单,请直接搜索后修改');
|
||||||
|
}
|
||||||
|
|
||||||
|
$id = M("company_game_ratio_log","tab_")->add($save);
|
||||||
|
addOperationLog(['op_type'=>0,'key'=>$id,'op_name'=>'新增','url'=>U('index')]);
|
||||||
|
$this->ajaxReturn(["msg"=>"添加成功","code"=>1,"url"=>U("index")]);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$companyList = D("PromoteCompany")->getList();
|
||||||
|
$this->assign("companyList",$companyList);
|
||||||
|
$this->assign("gameList",D("Game")->getRelationGameLits());
|
||||||
|
$this->display();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public function edit()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public function del()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public function setTurnoverRatio($params)
|
||||||
|
{
|
||||||
|
$save['turnover_ratio'] = [];
|
||||||
|
if (!empty(array_filter($params['turnover'])) || !empty(array_filter($params['turnover_ratio'])) ) {
|
||||||
|
if (is_array($params['turnover']) && is_array($params['turnover_ratio']) && is_array($params['instanceof'])) {
|
||||||
|
foreach ($params['turnover'] as $turnover) {
|
||||||
|
if (empty($turnover)) {
|
||||||
|
$this->error('月流水不能为空');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach ($params['turnover_ratio'] as $turnoverRatio) {
|
||||||
|
if (empty($turnoverRatio)) {
|
||||||
|
$this->error('月流水分成比例不能为空');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach ($params['instanceof'] as $intervalClosedStatus) {
|
||||||
|
if (!in_array($intervalClosedStatus, [1, 2])) {
|
||||||
|
$this->error('月流水分符号不能为空');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$turnoverCount = count($params['turnover']);
|
||||||
|
$sortTurnover = $params['turnover'];
|
||||||
|
sort($sortTurnover);
|
||||||
|
if ($params['turnover'] != $sortTurnover || $turnoverCount != count(array_unique($params['turnover']))) {
|
||||||
|
$this->error('月流水必须以正序的方式填写,且必须大于上一个月流水');
|
||||||
|
}
|
||||||
|
$ratio = $params['ratio'] ?? 0;
|
||||||
|
if ($params['turnover_ratio'][0] <= $ratio) {
|
||||||
|
$this->error('月流水分成比例必须大于默认分成比例');
|
||||||
|
}
|
||||||
|
$turnoverRatioCount = count($params['turnover_ratio']);
|
||||||
|
$sortTurnoverRatio = $params['turnover_ratio'];
|
||||||
|
sort($sortTurnoverRatio);
|
||||||
|
if ($params['turnover_ratio'] != $sortTurnoverRatio || $turnoverRatioCount != count(array_unique($params['turnover_ratio']))) {
|
||||||
|
$this->error('月流水分成比例必须以正序的方式填写,且必须大于上一个月流水分成比例');
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($params['turnover'] as $key => $turnover) {
|
||||||
|
$save['turnover_ratio'][] = [
|
||||||
|
'turnover' => bcdiv($turnover, 1, 2),
|
||||||
|
'ratio' => bcdiv($params['turnover_ratio'][$key], 1, 2),
|
||||||
|
'instanceof' => (isset($params['instanceof'][$key]) ? $params['instanceof'][$key] : 1),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
$save['turnover_ratio'] = json_encode($save['turnover_ratio']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $save['turnover_ratio'];
|
||||||
|
|
||||||
|
}
|
||||||
|
public function getOldRatio(&$save)
|
||||||
|
{
|
||||||
|
$tmap = [
|
||||||
|
"company_id"=>$save['company_id'],
|
||||||
|
"relation_game_id"=>$save['relation_game_id'],
|
||||||
|
];
|
||||||
|
$ratio_dbres = $this->DBModel->where($tmap)->find();
|
||||||
|
if(isset($ratio_dbres['ratio'])){
|
||||||
|
$save['last_ratio']=$ratio_dbres['ratio'];
|
||||||
|
$save['last_turnover_ratio']=$ratio_dbres['turnover_ratio'];
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
$cmap = [
|
||||||
|
"id"=>$save['company_id'],
|
||||||
|
];
|
||||||
|
$com = M("promote_company","tab_")->field("company_belong")->where($cmap)->find();
|
||||||
|
if(!isset($com['company_belong'])){
|
||||||
|
$save['last_ratio']=0;
|
||||||
|
$save['last_turnover_ratio']="";
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
//查询模板
|
||||||
|
$mmap = [
|
||||||
|
"company_belong"=>$com['company_belong'],
|
||||||
|
"relation_game_id"=>$save['relation_game_id']
|
||||||
|
];
|
||||||
|
$mould = M("game_ratio_mould","tab_")->where($mmap)->find();
|
||||||
|
if(isset($mould['ratio'])){
|
||||||
|
$save['last_ratio']=$mould['ratio'];
|
||||||
|
$save['last_turnover_ratio']=$mould['turnover_ratio'];
|
||||||
|
}else{
|
||||||
|
$save['last_ratio']=0;
|
||||||
|
$save['last_turnover_ratio']="";
|
||||||
|
}
|
||||||
|
return ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
//推广公司模型
|
||||||
|
namespace Admin\Model;
|
||||||
|
use Think\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文档基础模型
|
||||||
|
*/
|
||||||
|
class PromoteCompanyModel extends Model{
|
||||||
|
/**
|
||||||
|
* 构造函数
|
||||||
|
* @param string $name 模型名称
|
||||||
|
* @param string $tablePrefix 表前缀
|
||||||
|
* @param mixed $connection 数据库连接信息
|
||||||
|
*/
|
||||||
|
public function __construct($name = '', $tablePrefix = '', $connection = '') {
|
||||||
|
/* 设置默认的表前缀 */
|
||||||
|
$this->tablePrefix ='tab_';
|
||||||
|
/* 执行构造方法 */
|
||||||
|
parent::__construct($name, $tablePrefix, $connection);
|
||||||
|
}
|
||||||
|
//
|
||||||
|
public function getList()
|
||||||
|
{
|
||||||
|
return $this->field("id,company_name")->where("status=1")->select();
|
||||||
|
# code...
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,296 @@
|
|||||||
|
<extend name="Public/base"/>
|
||||||
|
|
||||||
|
<block name="body">
|
||||||
|
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
|
||||||
|
<script src="__STATIC__/jquery.form.js"></script>
|
||||||
|
<script src="__STATIC__/layer/layer.js"></script>
|
||||||
|
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||||
|
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
||||||
|
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js"></script>
|
||||||
|
<link rel="stylesheet" href="__CSS__/promote.css" type="text/css"/>
|
||||||
|
<style>
|
||||||
|
.select2-container--default .select2-selection--single {
|
||||||
|
color: #000;
|
||||||
|
resize: none;
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
|
||||||
|
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
|
||||||
|
height:28px;border-radius:3px;font-size:12px;
|
||||||
|
}
|
||||||
|
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||||
|
line-height:35px;
|
||||||
|
line-height:28px;
|
||||||
|
}
|
||||||
|
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||||
|
height:26px;
|
||||||
|
}
|
||||||
|
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||||
|
height:26px;line-height:26px;font-size:12px;
|
||||||
|
}
|
||||||
|
.select2-results__option[aria-selected] {font-size:12px;}
|
||||||
|
.layui-layer-dialog .layui-layer-content{color:red}
|
||||||
|
.butnbox {padding:10px 0 10px;}
|
||||||
|
.butnbox .butnlist {overflow:hidden;clear:both;}
|
||||||
|
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
|
||||||
|
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
|
||||||
|
.butnbox .butnlist .butn.last {background:#009900;}
|
||||||
|
.butnbox .butnlist .butn~.butn {margin-left:20px;}
|
||||||
|
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
|
||||||
|
.layui-layer-title {
|
||||||
|
text-align: center;
|
||||||
|
height: 80px;
|
||||||
|
line-height: 80px;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="cf top_nav_list">
|
||||||
|
<div class="cf main-place top_nav_list navtab_list">
|
||||||
|
<h3 class="page_title">推广游戏分成管理</h3>
|
||||||
|
<p class="description_text"></p>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="fl button_list">
|
||||||
|
<div class="tools">
|
||||||
|
<a class=" " href="{:U('add')}"><span class="button_icon button_icon1"></span>新增推广游戏分成</a>
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
|
<!-- 高级搜索 -->
|
||||||
|
<div class="jssearch fl cf search_list" style="margin-bottom:12px">
|
||||||
|
<div class="input-list search-title-box">
|
||||||
|
<label>搜索:</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-list input-list-promote search_label_rehab">
|
||||||
|
<select id="company_id" name="company_id" class="select_gallery" >
|
||||||
|
<option value="">请选择公司</option>
|
||||||
|
<volist name="companyList" id="vo">
|
||||||
|
<option value="{$vo.id}" <if condition="$vo.id eq I('company_id')">selected</if> >{$vo.company_name}</option>
|
||||||
|
</volist>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="input-list input-list-game search_label_rehab">
|
||||||
|
<select id="relation_game_id" name="relation_game_id" class="select_gallery" >
|
||||||
|
<option value="">现包名</option>
|
||||||
|
<volist name="gameList" id="vo">
|
||||||
|
<option value="{$vo.relation_game_id}" <if condition="$vo.relation_game_id eq I('relation_game_id')">selected</if> >{$vo.relation_game_name}</option>
|
||||||
|
</volist>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-list input-list-game search_label_rehab">
|
||||||
|
<select id="status" name="status" class="select_gallery" >
|
||||||
|
<option value="">请选择审核状态</option>
|
||||||
|
<volist name="status" id="vo">
|
||||||
|
<option value="{$key}" <if condition="isset($_GET['status']) && $key eq I('status')">selected</if> >{$vo}</option>
|
||||||
|
</volist>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-list">
|
||||||
|
<a class="sch-btn" href="javascript:;" id="search" url="{:U('index','&row='.I('row'),false)}">搜索</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="butnbox" style="margin-bottom: 10px;">
|
||||||
|
<div class="butnlist jscheckbutn" style="margin-left: 2px">
|
||||||
|
<a class="butn" href="{:U('add')}">新增推广游戏分成</a>
|
||||||
|
|
||||||
|
<a class="butn" id="downstream">市场部审批通过</a>
|
||||||
|
<a class="butn" id="persondownstream" style="width: 150px;background-color: red;">市场部审批拒绝</a>
|
||||||
|
<a class="butn" id="shenhe" >管理员审批通过</a>
|
||||||
|
<a class="butn" id="reject" style="background-color: red;">管理员审批拒绝</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 数据列表 -->
|
||||||
|
<div class="data_list">
|
||||||
|
<div class="">
|
||||||
|
<table>
|
||||||
|
<!-- 表头 -->
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<input class="check-all" type="checkbox">
|
||||||
|
</th>
|
||||||
|
<th>公司名称</th>
|
||||||
|
<th>内外团</th>
|
||||||
|
<th>结算周期</th>
|
||||||
|
<th>游戏类型</th>
|
||||||
|
<th>原游戏名称</th>
|
||||||
|
<th>现游戏名称</th>
|
||||||
|
<th>生效时间</th>
|
||||||
|
<th>原比例</th>
|
||||||
|
<th>申请比例</th>
|
||||||
|
<th>创建记录</th>
|
||||||
|
<th>市场部审批</th>
|
||||||
|
<th>管理员审批</th>
|
||||||
|
<th>备注</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<tbody>
|
||||||
|
<if condition = "empty($data)">
|
||||||
|
<tr>
|
||||||
|
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
|
||||||
|
</tr>
|
||||||
|
<else/>
|
||||||
|
<volist name="data" id="data">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<eq name="record.status" value="0">
|
||||||
|
<input class="ids" type="checkbox" value="{$record['id']}" name="ids[]">
|
||||||
|
<else />
|
||||||
|
<input class="ids disabled" disabled="disabled" type="checkbox" value="{$record['id']}" name="ids[]">
|
||||||
|
</eq>
|
||||||
|
</td>
|
||||||
|
<td>{$data.company_name}</td>
|
||||||
|
<td>{$data.company_belong}</td>
|
||||||
|
<td>{$data.settlement_type}</td>
|
||||||
|
<td>{$data.game_type_name}</td>
|
||||||
|
<td>{$data.original_package_name}</td>
|
||||||
|
<td>{$data.relation_game_name}</td>
|
||||||
|
<td>{$data.begin_time} ~~ {$data.end_time}</td>
|
||||||
|
<td style="line-height: 16px;text-indent: 0;">
|
||||||
|
<div style="text-align: left;width: 90%;margin-left: 5%;margin-top: 10px;margin-bottom: 10px;">
|
||||||
|
{$data.last_turnover_ratio_str}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td style="line-height: 16px;text-indent: 0;">
|
||||||
|
<div style="text-align: left;width: 90%;margin-left: 5%;margin-top: 10px;margin-bottom: 10px;">
|
||||||
|
{$data.turnover_ratio_str}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<div style="line-height: 2;">
|
||||||
|
{$data.create}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<if condition="$data.status eq -1 ">
|
||||||
|
<div style="line-height: 2;color: red;">
|
||||||
|
{$data.market}
|
||||||
|
</div>
|
||||||
|
<else />
|
||||||
|
<div style="line-height: 2;">
|
||||||
|
{$data.market}
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<if condition="$data.status eq -2 ">
|
||||||
|
<div style="line-height: 2;color: red;">
|
||||||
|
{$data.admin}
|
||||||
|
</div>
|
||||||
|
<else />
|
||||||
|
<div style="line-height: 2;">
|
||||||
|
{$data.admin}
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{$data.remark}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="{:U('edit', array('id'=>$data['id']))}" class="">编辑</a>
|
||||||
|
<a data-url="{:U('del', array('id'=>$data['id']))}" class="ratio_del">删除</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</volist>
|
||||||
|
</if>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<if condition="$role_export_check eq true ">
|
||||||
|
<a class="sch-btn export-btn"
|
||||||
|
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
|
||||||
|
</if>
|
||||||
|
{$_page|default=''}
|
||||||
|
</div>
|
||||||
|
<!--弹出层-->
|
||||||
|
<div class="promote-layer mb20">
|
||||||
|
<form id="ajaxForm" action="{:U('set_withdraw')}" method="post">
|
||||||
|
<ol class="promote-con">
|
||||||
|
<li class="promote-con-con " id="deny">
|
||||||
|
<div class="mb20">
|
||||||
|
<span class="promote-name">备注:</span>
|
||||||
|
<textarea class="textarea-style" name="remark" id="remark"></textarea>
|
||||||
|
</div>
|
||||||
|
<a class="ajax-post pack" style="cursor: pointer;" target-form="ids" url="{:U('setStatus',array('status'=>-1))}"><div class="promote-btn">拒绝</div></a>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</block>
|
||||||
|
|
||||||
|
<block name="script">
|
||||||
|
<script>
|
||||||
|
<volist name=":I('get.')" id="vo">
|
||||||
|
Think.setValue('{$key}',"{$vo}");
|
||||||
|
</volist>
|
||||||
|
$(".select_gallery").select2();
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
//导航高亮
|
||||||
|
highlight_subnav("{:U('index')}");
|
||||||
|
$(function(){
|
||||||
|
//搜索功能
|
||||||
|
$("#search").click(function(){
|
||||||
|
var url = $(this).attr('url');
|
||||||
|
var query = $('.jssearch').find('input').serialize();
|
||||||
|
query += "&"+$('.jssearch').find('select').serialize();
|
||||||
|
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
||||||
|
query = query.replace(/^&/g,'');
|
||||||
|
if( url.indexOf('?')>0 ){
|
||||||
|
url += '&' + query;
|
||||||
|
}else{
|
||||||
|
url += '?' + query;
|
||||||
|
}
|
||||||
|
window.location.href = url;
|
||||||
|
});
|
||||||
|
//回车自动提交
|
||||||
|
$('.jssearch').find('input').keyup(function(event){
|
||||||
|
if(event.keyCode===13){
|
||||||
|
$("#search").click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$(".ratio_del").on("click",function(){
|
||||||
|
var url = $(this).data("url");
|
||||||
|
layer.confirm('删除后将无法恢复,请慎重选择', {
|
||||||
|
btn: ['取消','删除'] //按钮
|
||||||
|
}, function(index){
|
||||||
|
layer.close(index);
|
||||||
|
}, function(){
|
||||||
|
$.get(url,function(data){
|
||||||
|
if(data.code == 1){
|
||||||
|
layer.msg('<span style="color:white">'+data.msg+'<span>',{time: 1000},function(){
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
|
|
||||||
|
}else{
|
||||||
|
layer.msg(data.msg,{icon: 2});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</block>
|
Loading…
Reference in New Issue