<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('审核')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-zx-edit" th:object="${gtgsZx}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">统一社会信用代码：</label>
            <div class="col-sm-8">
                <input name="uniformSocialCreditCode" th:field="*{uniformSocialCreditCode}" class="form-control"
                       type="text" >
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">清税证明文号：</label>
            <div class="col-sm-8">
                <input name="clearTaxProve" th:field="*{clearTaxNumber}" class="form-control" type="text" >
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">单位名称：</label>
            <div class="col-sm-8">
                <input name="companyName" th:field="*{companyName}" class="form-control" type="text" >
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">注册号：</label>
            <div class="col-sm-8">
                <input name="registrationNumber" th:field="*{registrationNumber}" class="form-control" type="text"
                       >
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">经营者：</label>
            <div class="col-sm-8">
                <input name="operatorName" th:field="*{operatorName}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">经营者身份证号：</label>
            <div class="col-sm-8">
                <input name="operatorIdCard" th:field="*{operatorIdCard}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">经营者身份证正面：</label>
            <div class="col-sm-8">
                <img  style=" height: 168px;width:267px; "  class="form-control" th:src="*{operatorIdCardFront}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">经营者身份证反面：</label>
            <div class="col-sm-8">
                <img  style=" height: 168px;width:267px; "  class="form-control" th:src="*{operatorIdCardBack}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">经营者身份证头像：</label>
            <div class="col-sm-8">
                <img  style=" height: 168px;width:164px;"  class="form-control" th:src="*{operatorIdCardAvatar}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">经营者签名：</label>
            <div class="col-sm-8">
                <img  style=" height: 168px;width:267px; "  class="form-control" th:src="*{operatorSignature}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">填写人拍照：</label>
            <div class="col-sm-8">
                <img  style=" height: 168px;width:164px;"  class="form-control" th:src="*{operatorPhoto}">
            </div>
        </div>
        <div class="form-group" th:if="${businessLicenseProve!=null}">
            <label class="col-sm-3 control-label">营业执照丢失声明：</label>
            <div class="col-sm-8">
                <img  style=" height: 168px;width:267px;"  class="form-control"  th:src="*{businessLicenseProve}">
            </div>
        </div>
        <div class="form-group" th:if="${clearTaxProve!=null}">
            <label class="col-sm-3 control-label">清税证明：</label>
            <div class="col-sm-8">
                <img  style=" height: 168px;width:267px;"  class="form-control" th:src="*{clearTaxProve}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">经营者手机号：</label>
            <div class="col-sm-8">
                <input name="operatorPhone" th:field="*{operatorPhone}" class="form-control" type="text" >
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">经营者住所地址：</label>
            <div class="col-sm-8">
                <input name="operatorAddress" th:field="*{operatorAddress}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">经营者邮编：</label>
            <div class="col-sm-8">
                <input name="operatorZipCode" th:field="*{operatorZipCode}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">组成形式：</label>
            <div class="col-sm-8">
                <input name="organizationType" th:field="*{organizationType}" class="form-control" type="text" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">注销原因：</label>
            <div class="col-sm-8">
                <textarea name="cancellationReason" class="form-control" rows="3"
                          readonly>[[*{cancellationReason}]]</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">经营范围：</label>
            <div class="col-sm-8">
                    <textarea name="businessScope" class="form-control" rows="3"
                              readonly>[[*{businessScope}]]</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">主管税务机关：</label>
            <div class="col-sm-8">
                <input name="taxAuthoritiesInCharge" th:field="*{taxAuthoritiesInCharge}" class="form-control" readonly
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">准予注销登记通知书文号：</label>
            <div class="col-sm-3">
                <input id="docnumleft" class="form-control" type="text" readonly>
            </div>
            <div class="col-sm-2">
                <input name="documentNumber" id="documentNumber" class="form-control" type="number" >
            </div>
            <div class="col-sm-1">
                <input id="docnumright" class="form-control" type="text" readonly value="号">
            </div>

        </div>
        <div class="form-group">
            <div class="col-sm-offset-5 col-sm-10">
                <button type="button" class="btn btn-sm btn-primary" onclick="submitChangeFlag('2')"><i
                        class="fa fa-check"></i>通 过
                </button>&nbsp;
                <button type="button" class="btn btn-sm btn-danger" onclick="submitChangeFlag('3')"><i
                        class="fa fa-reply-all"></i>退 回
                </button>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var year = "[[${year}]]";
    var prefix = ctx + "system/ytj/zx";
    $("#docnumleft").val("(宁)登记个注核字〔" + year + "〕第");
    $("#form-zx-edit").validate({
        focusCleanup: true
    });

    function submitChangeFlag(flag) {
        if ($.validate.form()) {
            var actionStr = flag == '2' ? '通过审核' : '退回申请';
            $.modal.confirm("确定要" + actionStr + "吗？", function () {
                $.modal.loading("请求中，请稍后...");
                var data = new FormData();
                data.append("id", $("#id").val());
                data.append("flag", flag);
                data.append("documentNumber", $("#docnumleft").val() + $("#documentNumber").val() + $("#docnumright").val());
                // data.append("archiveBy", $("#archiveBy").val());
                $.ajax({
                    type: "POST",
                    url: prefix + "/update",
                    data: data,
                    cache: false,
                    contentType: false,
                    processData: false,
                    dataType: 'json',
                    success: function (result) {
                        $.modal.closeLoading();
                        if (result.code == web_status.SUCCESS) {
                            $.modal.close();
                            parent.$.modal.msgSuccess(result.msg);
                        } else {
                            parent.$.modal.msgError(result.msg);
                        }
                        parent.$.table.refresh();
                    },
                    error: function (error) {
                        $.modal.closeLoading();
                        parent.$.modal.msgWarning(result.msg);
                    }
                });
            });
        }
    }


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