You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
4.5 KiB
HTML

<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
<style>
.form-group {
float: left;
margin-bottom: 10px;
}
.form-group label {
line-height: 34px;
height: 34px;
}
.pointer-hand {
cursor: pointer;
}
</style>
</block>
<block name="body">
<div class="page-list normal_list promote-mychlid-list">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>评级管理></span><span>评级设定</span></div>
</div>
<img src="__IMG__/20180207/icon_normal_game.png">
<span class="title_main">评级设定</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<div class="form-group">
<a class="submit normal_space" href="{:U('PromoteGrade/setting')}" style="line-height: 36px; display: inline-block; text-align: center; background: #409eff; color: #ffffff; cursor: pointer;">新增评级规则</a>
</div>
</div>
<div class="trunk-list list_normal">
<table class="table normal_table">
<tr class="odd">
<th>ID</th>
<th style="width: 200px;">规则名称</th>
<th style="width: 200px;">规则所属游戏</th>
<th style="width: 200px;">规则有效期</th>
<th style="width: 200px;">当月注册玩家角色达标等级</th>
<th>系数值</th>
<th>等级名称</th>
<th style="width: 150px;">操作</th>
</tr>
<empty name="records">
<tr><td colspan="6" style="text-align: center;height: 45vh;"><img src="__IMG__/20180207/icon_wushujv2.png"/><p style="line-height: 40px;color: #A5A5A5;">暂无数据</p></td></tr>
<else />
<?php foreach($records as $record):?>
<tr data-id="<?=$record['id']?>">
<?php if($record['grade_count'] > 0):?>
<td rowspan="<?=$record['grade_count']?>"><?=$record['id']?></td>
<td rowspan="<?=$record['grade_count']?>"><?=$record['name']?></td>
<td rowspan="<?=$record['grade_count']?>"><?=$record['game_name']?></td>
<td rowspan="<?=$record['grade_count']?>"><?=$record['month_range']?></td>
<td rowspan="<?=$record['grade_count']?>"><?=$record['reach_level']?></td>
<?php endif;?>
<td><?=$record['grade_value']?></td>
<td><?=$record['grade_name']?></td>
<?php if($record['grade_count'] > 0):?>
<td rowspan="<?=$record['grade_count']?>">
<a href="{:U('PromoteGrade/setting',['id'=>$record['id']])}" class="editbtn">编辑</a>
&nbsp;&nbsp;
<a href="javascript:;" style="color: red;" class="delete-btn editbtn">删除</a>
</td>
<?php endif;?>
</tr>
<?php endforeach;?>
</empty>
</table>
</div>
</div>
<div class="page-explain promote-mychlid-explain">
<div class="trunk-content article border_normal">
<!-- <table class="desccontent">
<tr><td class="title" style="width: 100px;display: inline-block;">二级渠道说明:</td><td class="det">推广员默认为一级渠道,一级渠道可通过推广员后台新增二级渠道;二级渠道由一级渠道管理开启权限,并由一级渠道给二级渠道结算,结算可到财务管理操作。</td></tr>
</table>-->
</div>
</div>
</div>
</block>
<block name="script">
<link rel="stylesheet" href="__STATIC__/flatpickr/flatpickr.min.css">
<script src="__STATIC__/flatpickr/flatpickr.min.js"></script>
<script src="__STATIC__/flatpickr/l10n/zh.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
$('.delete-btn').on({
click: function() {
var tr = $(this).parents('tr').eq(0)
var id = tr.attr('data-id')
layer.confirm('是否要删除该设置?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:U('PromoteGrade/delete')}",
data: {id: id},
type: 'post',
dataType: 'json',
success: function(response) {
layer.msg(response.info, {time: 1000}, function() {
window.location.href = window.location.href
})
}
})
})
}
})
</script>
</block>