<!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>
<style>
    .form-control {
        display: inline;
        width: 90%;
        height: 34px;
        padding: 6px 12px;
        font-size: 15px;
        line-height: 1.42857143;
        color: #555;
        background-color: #fff;
        background-image: none;
        border: 1px solid #ccc;
        border-radius: 4px;
        -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
        -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
        -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
        transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    }
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-pritn-add">
        <div class="form-group">
            <label class="col-sm-2 control-label"> 企业名称：</label>
            <div class="col-sm-3">
                <input name="qyname" class="form-control" type="text" required><em
                    style="color: red;font-size: 16px; display: inline"> *</em>
            </div>
            <label class="col-sm-2 control-label" id="frname"> 法定代表人：</label>
            <div class="col-sm-3">
                <input name="frname" class="form-control" type="text" required><em
                    style="color: red;font-size: 16px; display: inline"> *</em>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"> 信用代码：</label>
            <div class="col-sm-3">
                <input name="xinyongcode" id="xinyongcode" class="form-control" type="text" required><em
                    style="color: red;font-size: 16px; display: inline"> *</em>
            </div>
            <label class="col-sm-2 control-label">副本数量：</label>
            <div class="col-sm-3">
                <input name="fbnum" class="form-control" type="text">
            </div>
        </div>

        <div class="form-group personName">
            <label class="col-sm-2 control-label"> 成立日期：</label>
            <div class="col-sm-3">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="qyclrq" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                </div>

            </div>

            <label class="col-sm-2 control-label">核准日期：</label>
            <div class="col-sm-3">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="shenhedate"class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                </div>
            </div>
            </div>
            <div class="form-group">
            <label class="col-sm-2 control-label"> 营业期至：</label>
                  <div class="col-sm-3">
                      <div class="input-group date" id="qyyyqz" >
                          <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                          <input name="qyyyqz" class="form-control" placeholder="yyyy-MM-dd" type="text" >
                      </div>
                      <label class="checkbox-inline">
                          <input type="checkbox" name="qyjyqx" id="inlineCheckbox1"  value="长期" onclick="change()"> 长期
                      </label>
                  </div>


        </div>


        <div class="form-group">


            <label class="col-sm-2 control-label"> 登记类型：</label>
            <div class="col-sm-3">
                <select class="form-control" name="qylb" id="djlx" required>
                    <option>请选择</option>
                    <option value="1">内资公司</option>
                    <option value="2">内资分公司</option>
                    <option value="3">内资非公司企业法人</option>
                    <option value="4">内资非公司企业法人分支机构</option>
                    <option value="5">个人独资企业</option>
                    <option value="6">个人独资企业分支机构</option>
                    <option value="7">合伙企业</option>
                    <option value="8">合伙企业分支机构</option>
                    <option value="9">农民专业合作社</option>
                    <option value="10">农民专业合作社分支机构</option>
                </select><em style="color: red;font-size: 16px; display: inline"> *</em>
            </div>
            <label class="col-sm-2 control-label"> 企业类型：</label>
            <div class="col-sm-3">
                <input name="qylx" class="form-control" type="text" required><em
                    style="color: red;font-size: 16px; display: inline"> *</em>
            </div>

        </div>
        <div class="form-group">

            <label class="col-sm-2 control-label" id="qyjycs"> 企业经营场所：</label>
            <div class="col-sm-3">
                <input name="qyjycs" class="form-control" type="text" required><em
                    style="color: red;font-size: 16px; display: inline"> *</em>
            </div>
            <label class="col-sm-2  control-label" id="qyzczj">注册资本<a>(万元) </a>：</label>
            <div class="col-sm-3">
                <input name="qyzczj" class="form-control" type="text" required><em id="zczj"
                                                                                   style="color: red;font-size: 16px; display: inline">
                *</em>
            </div>
        </div>

        <div class="form-group draggable ui-draggable">
            <label class="col-sm-2 control-label" id="jyfw"> 企业经营范围：</label>
            <div class="col-lg-6">
                <textarea name="qyjyfw" class="form-control" type="text" placeholder="经营范围"></textarea>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">委托人身份证：</label>
            <div class="col-sm-3">
                <input name="wtrcardno" class="form-control" type="text" required><em
                    style="color: red;font-size: 16px; display: inline"> *</em>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">是否打印正本：</label>
            <div class="col-sm-3">
                <select name="isprintZ" class="form-control" type="text">
                    <option value="0">未打印</option>
                    <option value="1">已打印</option>
                </select>
            </div>
            <label class="col-sm-2 control-label">正本打印时间：</label>

            <div class="col-sm-3">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="printzdate" class="form-control" placeholder="yyyy-MM-dd" type="text">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">是否打印副本：</label>
            <div class="col-sm-3">
                <select name="isprintF" class="form-control" type="text">
                    <option value="0">未打印</option>
                    <option value="1">已打印</option>
                </select>
            </div>
            <label class="col-sm-2 control-label">副本打印时间：</label>
            <div class="col-sm-3">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="printfdate" class="form-control" placeholder="yyyy-MM-dd" type="text">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">领取人姓名：</label>
            <div class="col-sm-3">
                <input name="lqrname" class="form-control" type="text">
            </div>

            <label class="col-sm-2 control-label">领取人身份证：</label>
            <div class="col-sm-3">
                <input name="lqrcardno" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">领取人电话：</label>
            <div class="col-sm-3">
                <input name="lqrphone" class="form-control" type="text">
            </div>
            <label class="col-sm-2 control-label">领取时间：</label>
            <div class="col-sm-3">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="lqdate" class="form-control" placeholder="yyyy-MM-dd" type="text">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">二维码：</label>
            <div class="col-sm-3">
                <img name="erweimabase64" id="erweimabase64" th:src="*{erweimabase64}" class="img-lg" type="text">
            </div>
        </div>
    </form>
    <hr>
    <div style="text-align: center;">
        <button type="button" style="width: 10%" class="btn btn-outline btn-success" onclick="submitHandler()">保存
        </button>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script type="text/javascript">
    var prefix = ctx + "system/qypritn";
    $("#form-pritn-add").validate({
        focusCleanup: true
    });

      function submitHandler() {
        if ($.validate.form()) {
            $.operate.post(prefix + "/add", $('#form-pritn-add').serialize(),function (data) {
                if(data.code==0){
                    $.modal.msgSuccess("添加成功!")
                    $.modal.close();
                }else{
                    $.modal.msgSuccess("error!")
                }
            });
        }
    }
    // laydate.render({
    //     elem: '.input-group.date',
    //     type: 'date'
    // });

    $(".input-group.date").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
    function change(){
       if($("#inlineCheckbox1").is(":checked")){
           $("#qyyyqz").hide()
    }else {
           $("#qyyyqz").show()
       }
    };


    $("#xinyongcode").blur(function () {
        $.modal.loading("正在生成二维码，请稍后...");
        $.ajax({
            url: "/system/gtgsyw/auditpass",
            type: "post",
            data: {xycode: $("#xinyongcode").val()},
            success: function (data) {
                $.modal.closeLoading();
                if (msg.code == 0) {
                    $.modal.msgSuccess("二维码生成成功");
                    $("#erweimabase64").src(data)
                } else {
                    $.modal.msgError('二维码生成失败');
                }

            },
            error: function (error) {
                $.modal.closeLoading();
                $.modal.msgError("二维码生成失败");
            }
        });

    });
    $("#djlx").change(function () {
        //获取当前select选择的值
        var selectVal = $("#djlx option:selected").text();
        if (selectVal == '内资公司') {
            $("#qyjycs").text('住所');
            $("#frname").text('法定代表人');
            $("#zczj").text(' *');
            $("#jyfw").text('经营范围')
            $("#qyzczj").text('注册资本');
        } else if (selectVal == '内资分公司') {
            $("#frname").text('负责人');
            $("#qyjycs").text('营业场所');
            $("#zczj").text('');
            $("#jyfw").text('经营范围')
            $("#qyzczj").text('注册资本');
        } else if (selectVal == '内资非公司企业法人') {
            $("#frname").text('法定代表人');
            $("#qyjycs").text('住所');
            $("#zczj").text(' *');
            $("#jyfw").text('经营范围')
            $("#qyzczj").text('注册资本');
        } else if (selectVal == '内资非公司企业法人分支机构') {
            $("#frname").text('负责人');
            $("#qyjycs").text('营业场所');
            $("#zczj").text('');
            $("#jyfw").text('经营范围')
            $("#qyzczj").text('注册资本');
        } else if (selectVal == '个人独资企业') {
            $("#frname").text('投资人');
            $("#qyjycs").text('住所');
            $("#zczj").text('');
            $("#jyfw").text('经营范围')
            $("#qyzczj").text('注册资本');
        } else if (selectVal == '个人独资企业分支机构') {
            $("#frname").text('负责人');
            $("#qyjycs").text('营业场所');
            $("#zczj").text('');
            $("#jyfw").text('经营范围')
            $("#qyzczj").text('注册资本');
        } else if (selectVal == '合伙企业') {
            $("#frname").text('执行事务合伙人');
            $("#qyjycs").text('主要经营场所');
            $("#zczj").text('');
            $("#jyfw").text('经营范围')
            $("#qyzczj").text('注册资本');
        } else if (selectVal == '合伙企业') {
            $("#frname").text('执行事务合伙人');
            $("#qyjycs").text('主要经营场所');
            $("#zczj").text('');
            $("#jyfw").text('经营范围')
            $("#qyzczj").text('注册资本');
        } else if (selectVal == '合伙企业分支机构') {
            $("#frname").text('负责人');
            $("#qyjycs").text('营业场所');
            $("#zczj").text('');
            $("#jyfw").text('经营范围')
            $("#qyzczj").text('注册资本');
        } else if (selectVal == '农民专业合作社') {
            $("#frname").text('法定代表人');
            $("#qyjycs").text('住所');
            $("#zczj").text(' *');
            $("#qyzczj").text('成员出资总额');
            $("#jyfw").text('业务范围')
        } else if (selectVal == '农民专业合作社分支机构') {
            $("#frname").text('负责人');
            $("#qyjycs").text('住所');
            $("#zczj").text('');
            $("#jyfw").text('业务范围')
            $("#qyzczj").text('注册资本');
        }

    });


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