#@layout()

#define script()
<script>

    function process() {
        openlayer('处理提现申请','#(CPATH)/admin/finance/payoutprocess/#(payout.id)');
    }

    function refuse() {
        openlayer('拒绝提现','#(CPATH)/admin/finance/payoutrefuse/#(payout.id)');
    }

    function openlayer(title,url) {
        layer.data = {};
        layer.open({
            type: 2,
            title: title,
            anim: 2,
            shadeClose: true,
            shade: 0.5,
            area: ['70%', '60%'],
            content: url,
            end: function () {
                if (layer.data.needRefresh == true){
                    location.reload();
                }
            }
        });
    }

</script>

#end

#define content()
<div class="content-wrapper">

    <section class="content-header">
        <h1>
            提现申请
            <small>Payout Submit</small>
        </h1>
    </section>

    <section class="content">

        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">


                    <div class="box-header ">
                        <h3 class="box-title"></h3>
                    </div>
                    <!-- /.box-header -->
                    <!-- form start -->
                    <form class="form-horizontal" autocomplete="off">
                        <div class="box-body ">

                            <div class="form-group">
                                <label class="col-sm-2 control-label">当前状态</label>
                                <div class="col-sm-7 form-text">
                                    #(payout.statusStr ??)
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">用户当前余额</label>
                                <div class="col-sm-7">
                                    <input type="input" class="form-control" value="#number(userAmount,'0.00')" readonly>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-sm-2 control-label">提现金额</label>
                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#number(payout.amount,'0.00')" readonly>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-sm-2 control-label">身份证号码</label>
                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#(payout.user_idcard ??)" readonly>
                                </div>
                            </div>



                            <div class="form-group">
                                <label class="col-sm-2 control-label">身份证姓名</label>
                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#(payout.user_real_name ??)" readonly>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-sm-2 control-label">提现到</label>
                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#(payout.payTypeStr ??)" readonly>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-sm-2 control-label">收款账号</label>

                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#(payout.pay_to ??)" readonly>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-sm-2 control-label">用户备注</label>
                                <div class="col-sm-7">
                                    <textarea rows="3" class="form-control" readonly >#(payout.remarks ??)</textarea>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-sm-2 control-label">手续费</label>

                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#number(payout.fee,'0.00')" readonly>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">应转账</label>

                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#number(payout.amount - payout.fee,'0.00')" readonly>
                                </div>
                            </div>


                        </div>

                        <div class="box-footer">
                            <div class="col-sm-offset-2 col-sm-10 submit-block">
                                <div class="box-submit">
                                    <a href="#(CPATH)/admin/finance/payout" class="btn btn-primary">返回</a>
                                    #if(payout.isApplying())
                                    <button type="button" onclick="process()" class="btn btn-primary">处理</button>
                                    <button type="button" onclick="refuse()" class="btn btn-primary">拒绝</button>
                                    #end
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

        </div>

    </section>

</div>
#end
