<div class="modal-header"> 
    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
    <h4 class="modal-title">确认打款成功</h4>
</div>
<form id="form" class="form-horizontal" autocomplete="off">
    <input type="hidden" name="batch_no" value="<?= $batch_no ?>" />
    <div class="modal-body">
        <div class="input-group">
            <span class="input-group-addon">打款状态为打款中的批次，打款<?= $daysAfterPayTime ?>天后才可操作打款成功或打款不成功</span>
        </div>
        <div class="hr-line-dashed"></div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-white" data-dismiss="modal">取消</button>
        <button id="submit" type="submit" class="btn btn-primary">确认</button>
    </div>
</form>


<script type="text/javascript">
$("#form").on("submit",function(){
    $('#submit').attr('disabled', 'disabled');
    $.ajax({
        type: "POST",
        url: "/admin/remit/success",
        data: $('#form').serialize(),
        dataType: "json",
        beforeSend: function() {},
        success: function(data) {
            if(data.code == 1){
                toastr.success(data.message, "提示");
                setTimeout(function () {
                    location.reload();
                }, 3000);
            }else{
                $('#submit').attr('disabled', 'disabled');
                toastr.error(data.message, "提示");
            }

        },
        complete: function(XMLHttpRequest, textStatus) {},
        error: function() {}
    });
    return false;
});

</script>
