| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305 |
- <include file="public@header" />
- <style>
- .layui-layer-page {
- z-index: 998 !important;
- }
- .refund {
- padding: 20px;
- }
- .refund span {
- min-width: 70px;
- display: inline-block;
- }
- .refund .remark span {
- vertical-align: top;
- }
- </style>
- </head>
- <body>
- <div class="wrap js-check-wrap">
- <ul class="nav nav-tabs">
- <li><a href="{:url('activity/index')}">{:lang('ADMIN_ACTIVITY_LIST')}</a></li>
- <li ><a href="{:url('activity/add')}">添加活动</a></li>
- <li class="active"><a href="#">报名列表</a></li>
- </ul>
- <form class="well form-inline margin-top-20" method="get" action="{:url('books/index')}">
- 关键字:
- <input type="text" class="form-control" name="keyword" style="width: 250px;" value="" placeholder="请输入昵称/报名编号">
- <input type="hidden" name="id" value="{$Request.param.id}">
- <input type="submit" class="btn btn-primary" value="搜索" />
- <a class="btn btn-danger" href="{:url('books/index',array('id'=>$Request.param.id))}">清空</a>
- <a class="btn btn-warning" href="{:url('books/export',array('aid'=>$Request.param.id))}">导出</a>
- <a class="btn btn-danger" style="border-color:#8000FF;background-color:#8000FF" onclick="alltosignin()">批量签到</a>
-
- </form>
- <form method="post" class="js-ajax-form">
- <table class="table table-hover table-bordered">
- <thead>
- <tr>
- <th width="16">
- <label>
- <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
- </label>
- </th>
- <th width="50">ID</th>
- <th>活动名称</th>
- <th>交易单号</th>
- <th>昵称</th>
- <th>报名金额</th>
- <th>守时金</th>
- <th>报名编号</th>
- <th>报名时间</th>
- <th width="60">是否签到</th>
- <!-- <th width="60">是否审核</th> -->
- <th width="60">{:lang('STATUS')}</th>
- <th width="150">{:lang('ACTIONS')}</th>
- </tr>
- </thead>
-
- <tbody>
-
- <foreach name="books" item="vo">
- <tr>
- <td>
- <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}">
-
- </td>
-
- <td>{$vo.id}</td>
- <td>{$vo.title}</td>
- <td>{$vo.transaction_id}</td>
- <if condition='$vo.is_vip eq 1'>
- <td><a href="{:url('user/adminIndex/edit',array('id'=>$vo['uids'],'u'=>2))}">{$vo.user_nickname}</a></td>
- <else/>
- <td><a href="{:url('user/adminIndex/edit',array('id'=>$vo['uids']))}">{$vo.user_nickname}</a></td>
- </if>
-
- <td><font style="color: red">{$vo.money}</font></td>
- <td>{$vo.credit}<font style="color: red">{$vo.refund_credit? '(已退款)': ''}</font></td>
- <td style="text-align: center;">{$vo.book_num}</td>
-
- <td>{$vo['book_at']}</td>
-
- <td>
- <switch name="vo.is_signin">
-
- <case value="1"><font style="color: red">待签到</font></case>
- <case value="2"><font style="color: green"> 正常签到 </font></case>
- <case value="3"><font style="color: #FF0080"> 迟到签到 </font></case>
- </switch>
- </td>
-
- <td>
-
- <switch name="vo.status">
- <case value="1"><font style="color: red"> 待支付 </font></case>
- <case value="2"><font style="color: #8000FF"> 已支付 </font></case>
- <case value="3"><font style="color: green"> 已报名 </font></case>
- <case value="4"><font style="color: blue"> 已取消 </font></case>
- <case value="5"><font style="color: blue"> 已退款 </font></case>
- </switch>
- </td>
- <td style="">
- <if condition="($vo.status eq 3) or ($vo.status eq 2)">
- <a class="btn btn-xs btn-danger" onclick="refund({$vo['id']}, {$vo['money']}, 1)" class="js-ajax-delete">
- <!-- <a class="btn btn-xs btn-danger" href="{:url('books/refund',array('id'=>$vo['id'],'aid'=>$Request.param.id,'uid'=>$vo['uid']))}" onclick="if(!confirm('是否确定已退款?')) return false;" class="js-ajax-delete">-->
- 退全款
- </a>
- </if>
- <if condition="$vo.refund_credit eq 0">
- <a class="btn btn-xs btn-warning" onclick="refund({$vo['id']}, {$vo['credit']}, 2)">
- 退守时金
- </a>
- </if>
- <if condition="$vo.status eq 3">
- <a class="btn btn-xs btn-primary" disabled="disabled" class="js-ajax-delete">
- 已审核
- </a>
- <a class="btn btn-xs btn-danger" id="qiandao" style="border-color:#8000FF;background-color:#8000FF" onclick="getPaike({$vo['id']})" class="btn btn-xs btn-primary">
- 签到
- </a>
- </if>
- <if condition="$vo.status eq 2">
- <a class="btn btn-xs btn-primary" onclick="getPaike2({$vo['id']})" >
- 审核</a>
-
- <!-- <button class="btn btn-primary btn-sm js-ajax-submit" type="submit" data-action="{:url('books/shenhe',array('id'=>$vo['id']))}" onclick="if(!confirm('是否确定审核?')) return false;" >审核
- </button> -->
- </if>
-
- <if condition="$vo.status eq 5 || $vo.status eq 1">
- <!-- <a class="btn btn-xs btn-danger" href="{:url('books/shenhe',array('id'=>$vo['id'],'aid'=>$Request.param.id))}" onclick="if(!confirm('是否要删除?')) return false;" >
- 删除
- </a> -->
-
- <a class="btn btn-xs btn-danger" href="{:url('books/delbooks',array('id'=>$vo['id'],'aid'=>$Request.param.id,'uid'=>$vo['uid']))}" onclick="if(!confirm('是否确定删除?')) return false;" class="js-ajax-delete">
- 删除
- </a>
- </if>
-
- </td>
-
- </tr>
- </foreach>
- </tbody>
-
- </table>
-
- <div class="pagination">{$page}</div>
- </form>
- </div>
- <script src="__STATIC__/js/admin.js"></script>
- <script src="__STATIC__/js/layer/layer.js"></script>
- <script >
- // function getPaike(id){
- // openIframeLayer("{:url('Books/gosignin')}?id=" + id , "", {
- // area: ['380px', '260px'],
-
- // })
- // }
- // $("#edit").on("click", function(){
- // var id = getIdSelections(); //debugger;
- // var addUrl = ;
- // layer.open({
- // type: 2, //1:页面层,2:iframe层,3:加载层,4:tips层。
- // title: '客户自运编辑',
- // shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
- // shade: 0.8, //遮罩
- // area: ['90%', '70%'],
- // content: addUrl,
- // end: function () { //最后执行reload
- // location.reload();
- // }
- // });
- // });
- function getPaike(id){
- var addUrl = "{:url('Books/gosignin')}?id="+id;
- layer.open({
- type: 2, //1:页面层,2:iframe层,3:加载层,4:tips层。
- title: '签到选择',
- shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
- shade: 0.8, //遮罩
- area: ['380px', '260px'],
- content: addUrl,
- end: function () { //最后执行reload
- location.reload();
- }
- });
- }
- function getPaike2(id){
- var addUrl = "{:url('Books/goconfrom')}?id="+id;
- layer.open({
- type: 2, //1:页面层,2:iframe层,3:加载层,4:tips层。
- title: '审核操作',
- shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
- shade: 0.8, //遮罩
- area: ['380px', '260px'],
- content: addUrl,
- end: function () { //最后执行reload
- location.reload();
- }
- });
- }
- /**
- * 退款
- * @param info 数据
- * @param type 类型:1-全款,2-守时金
- */
- function refund(id, money, type){
- var title = type == 1? '退报名费用确认' : '退守时金确认';
- var name = type==1? "报名费用" : '守时金';
- layer.closeAll();
- layer.open({
- type: 1 //此处以iframe举例
- ,title: title
- ,class: 'refund'
- ,area: ['480px', '360px']
- ,shade: 0
- ,maxmin: true
- ,zIndex: 90
- ,content: '<div id="refund" class="refund"><p><span>'+name+':</span>'+money+'元</p><p><span>退款金额:</span><input id="money" type="text" value="'+money+'"></p><p class="remark"><span>退款备注:</span><textarea id="remark" name="" id="" cols="30" rows="6" maxlength="100" placeholder="请填写退款备注"></textarea></p></div>'
- ,btn: ['确认退款', '取消'] //只是为了演示
- ,yes: function(){
- if(confirm('确认提交?')){
- var money = $("#money").val();
- var remark = $("#remark").val();
- var params = {id:id, money:money, remark: remark, type: type};
- $.post('/admin/books/refundPay', params,function(res){
- if(res.code == 1){
- showMsg(res.msg,3);
- setTimeout(function () {
- location.reload();
- }, 2000)
- }else{
- showMsg(res.msg,3);
- }
- },"json")
- }
- }
- ,btn2: function(){
- layer.closeAll();
- }
- ,success: function(layero){
- layer.setTop(layero); //重点2
- }
- });
- }
- //批量签到
- function alltosignin(){
- var ids=[];
- $('.js-check:checked').each(function(){
- var id = $(this).val();
- if(id>0){
- ids.push($(this).val());
- }
- });
- if(ids.length<=0){
- showMsg('请先选择操作项!');
- return;
- }
- if (confirm('确定要进行批量签到吗?')) {
- $.post('/admin/books/allqiandao',{id:ids},function(res){
- if(res.code == 1){
- showMsg(res.msg);
- setTimeout(function () {
- location.reload();
- }, 800)
- }else{
- showMsg(res.msg);
- }
- },"json")
- }
- //console.log(ids);
- }
- </script>
- </body>
- </html>
|