tp3.2 模板标签eq volist switch , bootstrap模态框

<block name="main">
    <script src="__PUBLIC__/js/modules/materialadmin/libs/zclip/jquery.zclip.min.js"></script>
        <!-- BEGIN TABLE HOVER -->
        <section class="style-default-bright" style="padding-top: 24px">
            <div class="section-body">
                <h2 class="text-primary">财务个人中心</h2>
                <div class='main'>
                    <div class='block'>
                        <div class='thick'>{$amount}</div>
                        <div>累计收益</div>
                    </div>
                    <div class='block'>
                        <div class='thick'>{$money}</div>
                        <div>可提现收益    <button name="withdraw_cash" id="withdraw_cash" class="btn btn-primary" data-target="#myModal" data-toggle="modal">马上提现</button></div>
                    </div >
                    <div class='block'>
                        <div class='thick'>{$todayAmount}</div>
                        <div>今日预估收益</div>
                    </div>
                </div>
                <h3 class="text-primary">财务最近变化记录</h3>
                <table class="table table-hover">
                    <thead>
                        <th>编号</th>
                        <th>类型</th>
                        <th>金额</th>
                        <th>创建时间</th>
                        <th>驳回时间</th>
                        <th>审核时间</th>
                        <th>汇款时间</th>
                        <th>入账时间</th>
                        <th>状态</th>
                    </thead>
                    <tbody>
                        <empty name="recently">
                               <tr><td>暂时没有数据</td></tr>
                            <else />
                                <volist name="recently" id="item">
                                    <tr>
                                        <td>{$item.id}</td>
                                        <td>
                                            <eq name="item.type" value="1">
                                                入账
                                                <else/>
                                                提现
                                            </eq>
                                        </td>
                                        <td>{$item.amount}</td>
                                        <td>{$item.created_at}</td>
                                        <td>{$item.reject_at}</td>
                                        <td>{$item.audit_at}</td>
                                        <td>{$item.remit_at}</td>
                                        <td>{$item.entry_at}</td>
                                        <td>
                                            <switch name="item.status">
                                                <case value="0">驳回</case>
                                                <case value="1">审核中</case>
                                                <case value="2">待打款</case>
                                                <case value="3">已打款</case>
                                                <case value="4">已入账</case>
                                                <default />未知类型
                                            </switch>
                                        </td>
                                    </tr>
                                </volist>
                        </empty>
                    </tbody>
                </table>
                <div class="pagination">
                    {$_page}
                </div>
            </div>
            <div  class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
                <div class="modal-dialog">
                    <div class="modal-content" style="width:500px;margin-top: 250px;">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                            <h4 class="modal-title" id="myModalLabel">提现</h4>
                        </div>
                        <div class="modal-body">
                            <div class="tabs-container" style="text-align:center;padding:15px;" >
                                <div class="t_info">提现余额:<span id="money">{$money}</span>元</div>
                                <div class="t_info">收款信息:<span>{$recevieNumber}</span></div>
                            </div>
                        </div>
                        <div class="modal-footer" style="text-align:center;">
                            <button type="button" class="btn btn-primary t_cash" style="padding:6px 25px;">申请提现</button>
                            <button type="button" class="btn btn-default" data-dismiss="modal" style="width:100px;padding:6px 25px;">取消</button>
                        </div>
                    </div><!-- /.modal-content -->
                </div><!-- /.modal -->
            </div>
        </section>
        <!-- END TABLE HOVER -->
    <script>
        $(function () {
            //点击申请提现
            $('.t_cash').click(function () {
                var amount = $('#money').html();
                $.ajax({
                    type:"post",
                    url: "{:U('Finance/add')}",
                    data:{'amount':amount},
                    success:function(data){
                        alert(data.message);
                        if(data.status==1){
                            $('#myModal').modal('hide');
                            window.location.reload();
                        }
                    }
                });
            });
        });
    </script>
</block>

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值