<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改商户审核')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <!-- 提交信息查看-->


        <form class="form-horizontal m" id="form-examine-edit">
            <input name="companyReviewedId" th:value="*{companyReviewed.id}" type="hidden">
            <input name="status" id="input_status" type="hidden">
            <div class="form-group">

            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">审核结论：</label>
                <div class="col-sm-8">
                    <textarea name="rejectReason" class="form-control" maxlength="250"></textarea>
                </div>
            </div>
        </form>
        <div class="col-sm-8">
            <a class="btn btn-primary single " href="javascript:void(0)" onclick="approve(1)" >
                <i class="fa fa-edit"></i> 通过
            </a>
            <a class="btn btn-danger multiple " href="javascript:void(0)" onclick="approve(0)" >
                <i class="fa fa-remove"></i> 拒绝
            </a>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "company/enterexamine";


        function approve(status){
            $("#input_status").val(status);
            $.ajax({
                type: "POST",
                url: prefix + "/approve",
                data: $('#form-examine-edit').serialize(),
                processData: false,
                dataType: 'json',
                success: function(result) {
                    if (result.code == web_status.SUCCESS) {

                    } else {
                        $.modal.alertError(result.msg);
                    }
                },
                error: function(error) {
                    $.modal.alertWarning("审核失败。");
                }
            });
        }

    </script>
</body>
</html>