<!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">
        <input  id="input_status"  th:value="${companyReviewed.status}" type="hidden">
        <!-- 提交信息查看-->
        <form class="form-horizontal m" id="form-companyReviewed" th:object="${companyReviewed}">
            <div class="row">
                <div class="col-sm-6"></div>
                <div class="col-sm-6"></div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">商户名称：</label>
                        <div class="col-sm-8">
                            <input name="companyName" th:field="*{companyName}"  class="form-control" type="text" disabled required>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">企业类型：</label>
                        <div class="col-sm-8">
                            <select name="sex" class="form-control m-b" th:with="type=${@dict.getType('company_type')}" disabled>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{companyType}"></option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>


            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">详细地址：</label>
                        <div class="col-sm-8">
                            <input name="detailAddress" th:field="*{detailAddress}" class="form-control" type="text" disabled>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">企业法人：</label>
                        <div class="col-sm-8">
                            <input name="legalPerson" th:field="*{legalPerson}" class="form-control" type="text" disabled>
                        </div>
                    </div>
                </div>
            </div>


            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">经度：</label>
                        <div class="col-sm-8">
                            <input name="longitude" th:field="*{longitude}" class="form-control" type="text" disabled>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">纬度：</label>
                        <div class="col-sm-8">
                            <input name="latitude" th:field="*{latitude}" class="form-control" type="text" disabled>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">联系电话：</label>
                        <div class="col-sm-8">
                            <input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" disabled>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">成立日期：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                <input name="establishDate" th:value="${#dates.format(companyReviewed.establishDate, 'yyyy-MM-dd')}"
                                       class="form-control" placeholder="yyyy-MM-dd" type="text" disabled>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">统一社会信用代码：</label>
                        <div class="col-sm-8">
                            <input name="unifiedSocialCreditCode" th:field="*{unifiedSocialCreditCode}" class="form-control" type="text" disabled>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">主营业务：</label>
                        <div class="col-sm-8">
                            <input name="primaryBusiness" th:field="*{primaryBusiness}" class="form-control" type="text" disabled>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">营业执照：</label>
                        <div class="col-sm-8">
                            <div class="fileinput fileinput-new">
                                <div class="fileinput-new thumbnail" style="width: 140px; height: 140px;" onclick="openImg(this)">
                                    <img th:src="@{*{businessLicenseUrl}}" >
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">企业默认图片：</label>
                        <div class="col-sm-8">
                            <div class="fileinput fileinput-new">
                                <div class="fileinput-new thumbnail" style="width: 140px; height: 140px;" onclick="openImg(this)">
                                    <img th:src="@{*{defaultImgUrl}}"  style="width: 100%;height: 100%">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                    <label class="col-sm-4 control-label">企业宣传图片：</label>
                    <div class="col-sm-8">
                        <div class="fileinput fileinput-new">
                            <div class="fileinput-new thumbnail" style="max-width: 140px; max-width: 140px;" onclick="openImg(this)">
                                <img th:src="@{*{propagandaImgUrl}}"   style="max-width: 100%;max-width: 100%">
                            </div>
                        </div>
                    </div>
                </div></div>
                <div class="col-sm-6"></div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">企业介绍：</label>
                <div class="col-sm-10">
                    <textarea name="companyIntroduce" class="form-control" disabled>[[*{companyIntroduce}]]</textarea>
                </div>
            </div>

        </form>
        <div th:if="@{${companyReviewed.status}!='0'}">
            <h4  class="form-header h4">审核信息 </h4>
            <!--已审核信息回显-->
            <form class="form-horizontal m" id="form-status1">
                <div class="row">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-4 control-label">审核结果：</label>
                            <div class="col-sm-8" id="div_status">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label class="col-sm-4 control-label">审核人：</label>
                            <label class="col-sm-4">
                                <input name="primaryBusiness" th:field="${companyReviewed.companyExamine.createBy}" class="form-control" type="text" disabled>
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">审核时间：</label>
                    <div class="col-sm-2">
                        <input name="establishDate" th:value="${companyReviewed.companyExamine.examineDate}"
                               class="form-control" placeholder="yyyy-MM-dd" type="text" disabled>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">审核结论：</label>
                    <div class="col-sm-10">
                        <textarea name="rejectReason" class="form-control" disabled>[[${companyReviewed.companyExamine.rejectReason}]]</textarea>
                    </div>
                </div>
            </form>

        </div>


    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var datas = [[${@dict.getType('examine_status')}]];
        var prefix = ctx + "company/enterexamine";


        $(function() {

        })


        function submitHandler(){
            $.modal.close()
        }

        function openImg(self){
            var img = $(self).children("img")
            layer.open({
                type: 1,
                title: false,
                shade: 0.0001,
                area: ['auto    '],
                shadeClose: true,
                content: $(img)
            });
        }

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