<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>个体工商户</title>
    <link href="/Content/css/zi.css" rel="stylesheet"/>
    <script src="/Content/static/js/jquery-2.0.3.min.js"></script>
</head>

<script type="text/javascript">
    //var JingYingCard = "130723198301053519";
    var JingYingCard = GetQuery('jyCord');//身份证号
    var BSID = GetQuery('BSID');


    jQuery(function () {
        GetGrid();
    });


    //加载数据
    function GetGrid() {

        $.ajax({
            type: 'GET',
            contentType: 'application/json',
            url: '/Ytj/Printer/Printing?BSID=' + BSID + '&jyCord=' + JingYingCard+"&bs=3",
            dataType: 'json',
            success: function (json) {
                var data = json.data;
                $("#XinYongCode").html(data.xinyongcode);
                $("#JingYingRen").html(data.jingyingren);
                //$("#zwzh").html(item.NsXzq + "" + item.Zwzh + "" + item.MingChengHangYe + "" + item.ZuZhiXingShi);
                if (data.zwzh == "***") {
                    $("#zwzh").html(data.zwzh);
                } else {
                    $("#zwzh").html(data.nsxzq + "" + data.zwzh + "" + data.mingchenghangye + "" + data.zuzhixingshi);
                }
                $("#ScZtType").html(data.sczttype);
                $("#JingYingChangSuo").html(data.jingyingchangsuo);
                $("#ZuChengXingShi").html(data.zuchengxingshi);
                $("#ShenQingDate").html(ZhuanTime(data.zhucetime));
                $("#JingYingFanWei").html(data.jingyingfanwei);
                $("#ErWeiMaBase64").html("<img src=\"data:image/png;base64," + data.erweimabase64 + "\" style=\"width:360px;height:360px;\"/>");
                if (data.shenhedate != "" && data.shenhedate != "null") {
                    var Pdate = data.shenhedate;

                    var result, year, month, day;
                    year = Pdate.replace().substring(0,4);
                    var tty = Pdate.replace().substring(5,7);
                    if(parseInt(tty)<10){
                        month=Pdate.replace().substring(6,7);
                    }else{
                        month=tty;
                    }
                    var tty1 = Pdate.replace().substring(8,10);
                    if(parseInt(tty1)<10){
                        day=Pdate.replace().substring(9,10);
                    }else{
                        day=tty1;
                    }
                    $("#Nian").html(year);
                    $("#Yue").html(month);
                    $("#Ri").html(day);

                    $("#Nian1").html(year);
                    $("#Yue1").html(month);
                    $("#Ri1").html(day);


                $("#zzcode").html(data.zzcode);
                }

            },
            error: function () {
                $("#XinYongCode").html("123456789000");
                alert("页面加载失败");
            }
        });



        // $.ajax({
        //     type: 'GET',
        //     contentType: 'application/json',
        //     url: 'GetFormData?BSID=' + BSID + '&JingYingCard=' + JingYingCard + '&isPrintA=Z',
        //     dataType: 'json',
        //     success: function (data) {
        //         $.each(data.Table, function (i, item) {
        //             $("#XinYongCode").html(item.xinyongcode);
        //             $("#JingYingRen").html(item.jingyingren);
        //             //$("#zwzh").html(item.NsXzq + "" + item.Zwzh + "" + item.MingChengHangYe + "" + item.ZuZhiXingShi);
        //             if (item.zwzh == "***") {
        //                 $("#zwzh").html(item.zwzh);
        //             } else {
        //                 $("#zwzh").html(item.nsnzq + "" + item.zwzh + "" + item.MingChengHangYe + "" + item.ZuZhiXingShi);
        //             }
        //             $("#ScZtType").html(item.ScZtType);
        //
        //             $("#JingYingChangSuo").html(item.JingYingChangSuo);
        //             $("#ZuChengXingShi").html(item.ZuChengXingShi);
        //             $("#ShenQingDate").html(ZhuanTime(item.zhuceTime));
        //             $("#JingYingFanWei").html(item.JingYingFanWei);
        //             $("#ErWeiMaBase64").html("<img src=\"data:image/png;base64," + item.ErWeiMaBase64 + "\" style=\"width:280px;height:280px;\"/>");
        //             if (item.ShenHeDate != "" && item.ShenHeDate != "null") {
        //                 var Pdate = new Date(item.ShenHeDate);
        //
        //                 var Pyear = Pdate.getYear() + 1900;
        //                 var Pmonth = Pdate.getMonth() + 1;
        //                 var Pday = Pdate.getDate();
        //
        //                 $("#Nian").html(Pyear);
        //                 $("#Yue").html(Pmonth);
        //                 $("#Ri").html(Pday);
        //             }
        //
        //             $("#zzcode").html(item.ZzCode);
        //         })
        //
        //
        //     },
        //     error: function () {
        //         alert("页面加载失败");
        //     }
        // });


    }


    function GetQuery(key) {
        var search = location.search.slice(1); //得到get方式提交的查询字符串
        var arr = search.split("&");
        for (var i = 0; i < arr.length; i++) {
            var ar = arr[i].split("=");
            if (ar[0] == key) {
                if (unescape(ar[1]) == 'undefined') {
                    return "";
                } else {
                    return unescape(ar[1]);
                }
            }
        }
        return "";
    }

    function ZhuanTime(Time) {
        var result, year, month, day;
        year = Time.replace().substring(0,4);
        var tty = Time.replace().substring(5,7);
        if(parseInt(tty)<10){
            month=Time.replace().substring(6,7);
        }else{
            month=tty;
        }
        var tty1 = Time.replace().substring(8,10);
        if(parseInt(tty1)<10){
            day=Time.replace().substring(9,10);
        }else{
            day=tty1;
        }
        result = year + "年" + month + "月" + day + "日";
        return result;

    }


    function compileStr(code) { //对字符串进行加密
        var c = String.fromCharCode(code.charCodeAt(0) + code.length);
        for (var i = 1; i < code.length; i++) {
            c += String.fromCharCode(code.charCodeAt(i) + code.charCodeAt(i - 1));
        }
        return escape(c);
    }


    function uncompileStr(code) {       //对字符串进行解密
        code = unescape(code);
        var c = String.fromCharCode(code.charCodeAt(0) - code.length);
        for (var i = 1; i < code.length; i++) {
            c += String.fromCharCode(code.charCodeAt(i) - c.charCodeAt(i - 1));
        }
        return c;
    }
</script>

<style>
    body {
        width: 100%;
        height: 100%;
    }

    .main {
        width: 120%;
        height: 4961px;
        position: absolute;
        left: -1%;
    }

    .box {
        position: relative;
        height: 41%;
        width: 100%;
        top: 42%;
        left: 2%;
    }

    .box table {
        width: 100%;
        font-size: 80px;
    }

    .box .twoName {
        font-family: "HYB1GJ";
        letter-spacing: 42px;
        font-weight: bold;
    }

    .box .threeName {
        font-family: "HYB1GJ";
        letter-spacing: 42px;
        font-weight: bold;
    }

    .box .name {
        font-family: "HYB1GJ";
        letter-spacing: 45px;
        font-weight: bold;
    }

    .box .txt {
        letter-spacing: 20px;
        font-weight: bold;
    }

    .box .content {
        font-family: "HYA6GJ";
        text-align: left;
        font-size: 70px;
        font-weight: bold;
    }

    .box .content1 {
        font-family: "HYA6GJ";
        text-align: left;
        font-size: 60px;
        font-weight: bold;
    }

    .code {
        height: 130px;
        text-align: left;
        font-size: 75px;
        font-weight: bold;
    }

    #XinYongCode {
        font-size: 60px;
        margin-top: 70px;
    }

    .number {
        height: 55px;
        text-align: right;
        font-size: 70px;
        font-weight: bold;
    }

    .footer {
        position: relative;
        height: 20%;
        width: 100%;
        top: 27.8%;
        left: 13%;
    }

    .footer img {
        width: 580px;
        height: 580px;
    }

    .date {
        position: absolute;
        top: 65%;
        right: 15%;
        height: 15%;
        width: 700px;
        font-weight: bold;
    }

    .date span {
        margin-left: 180px;
        float: left;
        font-size: 80px;
    }

    .con_tab tr, .con_tab td {
        min-height: 60px;
        padding: 0;
        margin: 0;
        padding-bottom: 100px;
    }

    .er_con {
        font-size: 37px;
        width: 400px;
        position: absolute;
        top: 0px;
        float: right;
        right: 0;
        height: 300px;
        word-wrap: break-word;
        font-weight: bold;
        text-align: left;
        line-height: 60px;
    }
</style>
<body>
<div class="main" style="transform: rotate(90deg);-ms-transform: rotate(90deg);-moz-transform: rotate(90deg);-webkit-transform: rotate(90deg);-o-transform: rotate(90deg);">
    <div style="float:right;position:absolute;top:100px;right:200px;" id="zzcode"></div>
    <div class="box">

        <table cellspacing="0" class="fontSize" align="center" border="0" style="width: 100%; height: 340px;">
            <tr>

                <td width="40%" class="code" valign="top">
                    <span style="letter-spacing: 9px; font-family:HYB1GJ"><strong>统一社会信用代码</strong></span><br />
                    <p id="XinYongCode" style="font-family:hya6gj"></p>
                </td>

                <td class="code" valign="top" style="text-align: right;">
                    <div id="ErWeiMaBase64" style="position: absolute; top: -10px; float: right;right:450px;width: 80%;"></div>
                    <div class="er_con" style="font-family:hya6gj"><strong>扫描二维码登录“国家企业信用信息公示系统”了解更多登记、备案、许可、监管信息。</strong></div>
                </td>

            </tr>

        </table>

        <table cellspacing="0" class="fontSize con_tab" align="center" border="0" style="margin-top:250px;">
            <tr>
                <td width="520px" class="twoName" valign="top">名&nbsp;&nbsp;&nbsp;&nbsp;称</td>
                <td class="content" width="1800px;" valign="top"><span id="zwzh"></span></td>

                <td width="520px" class="name" valign="top">组成形式</td>
                <td class="content" width="1300px;" valign="top"><span id="ZuChengXingShi">个人经营</span></td>
            </tr>
            <tr>
                <td width="520px" class="twoName" valign="top">类&nbsp;&nbsp;&nbsp;&nbsp;型</td>
                <td class="content" width="1800px;" valign="top"><span id="ScZtType"></span></td>

                <td width="520px" class="name" valign="top">注册日期</td>
                <td class="content" width="1300px;" valign="top"><span id="ShenQingDate"></span></td>
            </tr>

            <tr>
                <td width="520px" class="threeName" valign="top">经&nbsp;营&nbsp;者</td>
                <td class="content" width="1800px;" valign="top"><span id="JingYingRen"></span></td>

                <td width="520px" class="name" valign="top">经营场所</td>
                <td class="content1" width="1300px;" valign="top"><span id="JingYingChangSuo"></span></td>
            </tr>
            <tr>
                <td width="520px"  class="name" valign="top">经营范围</td>
                <td class="content1" valign="top">
                    <span id="JingYingFanWei"></span>
                </td>
            </tr>
        </table>
    </div>
    <div class="footer">
        <div class="date">
            <span id="Nian" class="fontfamily" style="margin-left: -20px;"></span>
            <span id="Yue" class="fontfamily"></span>
            <span id="Ri" class="fontfamily"></span>
        </div>
    </div>

    <div style="font-family: 宋体; font-size:50px; margin-left:11%; margin-top:33%;font-weight:bold;">http://www.gsxt.gov.cn</div>



</div>

</body>
</html>
