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.

201 lines
8.2 KiB
HTML

5 years ago
<extend name="Public/manage" />
<block name="head">
<link href="__CSS__/user_zxy.css" rel="stylesheet">
<script src="__JS__/bootstrap-datetimepicker.min.js"></script>
<script src="__JS__/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="__JS__/bootstrap-select.min.js"></script>
<style type="text/css">
.table>tbody>tr>td{padding-top: 6px;padding-bottom: 6px;}
</style>
</block>
<block name="location">
<a class="z_nav curt_nav" href="{:U('Gift/index')}">礼包管理</a>
</block>
<block name="body" >
<div class="matter_right_content">
<form action="" method="get">
<div class="jssearch matter_right_search server_search clearfix">
<div class="mrc_colum0_8_3 mrc form-group" style="margin-right: 0;">
<a class="sch-btn btn btn_primary user_btn" href="javascript:;" id="search" url="{:U('Gift/index','model='.$model['name'],false)}">搜索</a>
</div>
<div class="mrc_colum1_6_6 mrc form-group">
<input type="text" name="giftbag_name" value="" class="form-control egretFormFont13" placeholder="礼包名称">
</div>
<div class="mrc_colum1_3_3 mrc form-group">
<select class="form-control egretFormFont13" name="status" id="stutasId">
<option value="-1">显示状态</option>
<option value="0">已关闭</option>
<option value="1">已开启</option>
</select>
</div>
<div class="mrc_colum1_3_3 mrc form-group">
<select class="form-control " name="systems" id="systemsId">
<option value="">运营系统</option>
<volist name=":get_systems_list()" id="vo">
<option value="{$key}">{$vo}</option>
</volist>
</select>
</div>
<div class="mrc_colum1_6_6 mrc form-group">
<select id="gameId" name="game_id" class="form-control selectpicker" data-live-search="true" >
<option value="">全部游戏</option>
<volist name=":getDevelopGameList(UID)" id="vo">
<option value="{$vo.id}" data-version="{$vo.sdk_version}">{$vo.game_name}</option>
</volist>
</select>
</div>
<div class=" mrc form-group matter_create_right">
<a href="{:U('add')}" class="btn btn_primary user_btn matter_create btn_adds"><i class="icon-adds"></i><span>添加礼包</span></a>
</div>
<div class=" mrc form-group matter_create_right">
<a href="#del" class="btn user_btn_del_w jsallubd" data-toggle="modal" data-target="#delModal">批量删除</a>
</div>
</div>
</form>
<div class="table_container server_table">
<div class="table_responsive">
<table class="table table_striped table_hover table_control control table_new" >
<thead>
<tr>
<th>
<label class="checked">
<input type="checkbox" name="ids[]" class="check-all">
<i class="check_icon"></i>
</label>
</th>
<th>游戏名称</th>
<th>礼包名称</th>
<th>运行平台</th>
<th>剩余数量</th>
<th>有效期</th>
<th>创建时间</th>
<th>显示状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<volist name="data" id="vo">
<tr>
<td>
<label class="checked">
<input type="checkbox" name="ids[]" class="ids" value="{$vo.id}" >
<i class="check_icon"></i>
</label>
</td>
<td>{$vo.game_name}</td>
<td>{$vo.giftbag_name}</td>
<td>{:get_info_status($vo['giftbag_version'],23)}</td>
<td>{$vo.novice_num}</td>
<td>{:time_format($vo['end_time'])}</td>
<td>{:time_format($vo['create_time'])}</td>
<td>
<eq name="vo.status" value="1">
已开启
<else />
<span style="color:red;">已关闭</span>
</eq>
</td>
<td>
<a href="{:U('giftdetail',array('id'=>$vo['id']))}" class="btn user_btn_see">查看
<a href="#del" class="btn user_btn_del jsubd" data-ga-id="{$vo.id}" data-toggle="modal" data-target="#delModal">删除</a>
</td>
</tr>
</volist>
</tbody>
</table>
<div class="pagination_wrap">
<ul class="pagination pagination_change pagination_center">
{$_page}
</ul>
</div>
<empty name="data">
<div class="text_format">
<img src="__IMG__/zwmimages/gamemanagement_icon_matadata.png">
<p class="p_lineh30">暂无数据</p>
</div>
</empty>
</div>
</div>
</div>
{:W('Department/del',array('model'=>'Giftbag'))}
<script>
Think.setValue('game_id',"{:I('game_id')}");
Think.setValue('systems',"{:I('systems')}");
Think.setValue('status',"{:I('status')}");
Think.setValue('giftbag_name',"{:I('giftbag_name')}");
$("#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();
}
});
$.VMenu.show('#menu');
$.VMenu.open('m2.2');
$(function(){
$('#stutasId').selectpicker({
size: 15
});
$('#systemsId').selectpicker({
size: 15
});
$('#gameId').selectpicker({
size: 15
}).change(function() {
var that = $(this);
var val = $.trim(that.val());
var systemsId = $('#systemsId');
if(val) {
var version = $.trim(that.find('option:selected').attr('data-version'));
if(1==version) {
systemsId.find('option[value=1]').prop('selected',true).siblings().prop('selected',false);
}else if(2==version) {
systemsId.find('option[value=2]').prop('selected',true).siblings().prop('selected',false);
}else {
systemsId.find('option').prop('selected',false);
}
} else {
systemsId.find('option').prop('selected',false).eq(0).prop('selected',true);
}
systemsId.selectpicker('refresh');
return false;
});
$('.check-all').click(function(){
var allId = this.checked;
$("input[name='ids[]']").each(function(){
this.checked = allId;
});
});
//批量删除
$(".btn_delete").click(function () {
layer.confirm('确定要执行改操作吗?', {
btn: ['确认','取消'], //按钮
title: '提示信息'
}, function(){
layer.msg('删除成功!', {icon: 1});
});
});
});
</script>
</block>