{% extends '../../layout.server.view.html' %} {% block cssFile %}
<link rel="stylesheet" href="/css/search.min.css">

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
{% endblock %} {% block content %}
<!-- banner -->
<div class="banner-tracuu">
    <img src="/img/banner-tracuu.jpg" alt="tra cứu hóa đơn điện tử hoadonviet.vn">
</div>
<!-- content -->
<div class="main-tracuu">
    <div class="container">
        <div class="row">
            <!-- Thông tin tra cứu -->
            <div class="col-md-12">
                <h2 class="title-info-tracuu text-center" title="Tra cứu hóa đơn việt"
                    style="color:#e27a17;font-size:24px">TRA CỨU HỢP ĐỒNG</h2>
            </div>
            <div class="col-md-8 col-md-offset-2">
                <!-- form tra cuu -->
                <form class="form-tracuu" role="form" name="formSearch" id="formSearch" autocomplete="off">
                    <h3 class="tttc" title="Thông tin tra cứu">Thông tin tra cứu</h3>
                    <div class="content-form-tracuu">
                        <div class="form-group">
                            <label for="contractTaxCode">Mã số thuế người mua <span style="color:red">*</span></label>
                            <input class="form-control" id="contractTaxCode" name="contractTaxCode" type="text" class=""
                                placeholder="Nhập mã số thuế..">
                            <span style="color:red;display: none;" id="invalidContractTaxCode">Mã số thuế không tồn
                                tại</span>
                        </div>

                        <div class="form-group">
                            <label for="contractCode">Số hợp đồng <span style="color:red">*</span></label>
                            <input class="form-control" id="contractCode" name="contractCode" type="text" class=""
                                placeholder="Nhập số hợp đồng..">
                            <span style="color:red;display: none;" id="invalidNumberCode">Số hợp đồng không hợp
                                lệ</span>
                        </div>
                        <div class="form-group">
                            <label for="tc_code">Mã bảo mật <span style="color:red">*</span></label>
                            <input class="form-control" id="tc_code" name="tc_code" type="text" class=""
                                placeholder="Nhập mã bảo mật..">
                            <input class="form-control" id="hopdong_id" name="hopdong_id" type="text"
                                style="display: none;">
                            <span style="color:red;display: none;" id="invalidNumberCode">Mã bảo mật không hợp lệ</span>
                        </div>
                        <span style="color:red;display: none;" id="errorTraCuu"></span>

                        <!-- Button modal -->
                        <button id="btnContractCode" type="button" class=" button btn btn-primary">
                            <i class="fa fa-search" aria-hidden="true"></i>
                            Xem hợp đồng
                        </button>

                        <button id="btnContractCodeFinish" type="button" class=" button btn btn-primary" data-toggle="modal"
                            data-target="#tracuu" data-backdrop="static" data-keyboard="false" style="display: none;">
                            <i class="fa fa-search" aria-hidden="true"></i>
                            Xem hợp đồng
                        </button>

                        <!-- Modal -->
                        <div class="modal fade" id="tracuu" tabindex="-1" role="dialog" aria-labelledby="tracuuLabel"
                            aria-hidden="true">
                            <div class="modal-dialog" role="document">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <div class="title-popup" style="">
                                            <div class="tthd" style="font-weight: 500;">
                                                Thông tin hợp đồng
                                            </div>
                                        </div>
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"
                                            style="">
                                            <span aria-hidden="true">
                                                <i class="fa fa-times" aria-hidden="true"></i>
                                            </span>
                                        </button>
                                    </div>
                                    <div class="modal-body">
                                        <div class="popup">
                                            <iframe id="frameHopDong" src="" width="70%" height="500px">
                                            </iframe>

                                            <div class="button-signature">
                                                <button class="button sg" title="Ký hợp đồng">Ký hợp đồng</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %} {% block jsFile %}
<script type="text/javascript" src="/assets/frontend/layout/scripts/contract.js"></script>
<script
    src="https://www.jqueryscript.net/demo/jQuery-Plugin-To-Beautify-File-Inputs-with-Custom-Styles-Dropify/dist/js/dropify.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script>
<script>
    $('#contractCode').bind("keypress", function (e) {
        if (e.keyCode == 13) {
            e.preventDefault();
            return false;
        }
    });
    $('#tc_code').bind("keypress", function (e) {
        if (e.keyCode == 13) {
            e.preventDefault();
            return false;
        }
    });

//</script>
{% endblock %}