<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>营业执照副本打印</title>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link href="/Content/css/zi.css" rel="stylesheet">

    <script src="/Content/static/js/jquery-2.0.3.min.js"></script>
    <script type="text/javascript">
        var JingYingCard = GetQuery('jyCord');//身份证号
        var BSID = GetQuery('BSID');

        //var JingYingCard = "130625199203224048";//身份证号
        //var BSID = "a0b494f2-6881-4919-8ada-4a768d99bc2a";


        $(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;

                    /* $.each(data.Table, function (i, item) {  })*/

                        $("#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 () {
                    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: 3508px;
            height: 4961px;
        }

        .box {
            position: relative;
            height: 40%;
            width: 120%;
            top: 33%;
            left: -8%;
        }

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

        }

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

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

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

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

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

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

        .box .content2 {
            font-family: "HYA6GJ";
            width: 1400px;
        }

        .code {
            position: relative;
            height: 70px;
            text-align: left;
            font-size: 80px;

            left: 0;
        }

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

        .number {
            height: 55px;
            text-align: right;
            font-size: 18px;

        }

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

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

        .date {
            position: absolute;
            height: 15%;
            width: 26%;
            top: 41%;
            right: 40px;

        }

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

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

        .er_con {
            font-size: 40px;
            width: 330px;
            position: absolute;
            top: -30px;
        ;
            float: right;
            width: 300px;
            right: 300px;
            text-align: left;
            line-height: 55px;
            font-weight: bold;
            height: 300px;
            word-wrap: break-word
        }
    </style>
</head>
<body style="transform: rotate(90deg);-ms-transform: rotate(90deg);-moz-transform: rotate(90deg);-webkit-transform: rotate(90deg);-o-transform: rotate(90deg);" >

<div id="myPrintArea" class="main">
    <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 class="twoName"></td>-->
                <td width="30%" valign="top">
                    <span style="letter-spacing: 9px; font-size: 75px; font-family: HYB1GJ"><strong>统一社会信用代码&nbsp;</strong></span><br />
                    <p id="XinYongCode" style="font-family:hya6gj"></p>
                </td>
                <td valign="bottom" style="text-align:right;">
                    <p style="font-size:60px; margin:0 600px 0 0;font-weight:bold">副本编号：1-1</p>
                </td>
                <td width="800px;" class="code" valign="top">
                    <div id="ErWeiMaBase64" style="position: absolute; top:-30px; float: right; right:250px;width: 100%;"></div>
                    <div class="er_con" style="font-family:hya6gj">扫描二维码登录“国家企业信用信息公示系统”了解更多登记、备案、许可、监管信息。</div>
                </td>
            </tr>
        </table>
        <table cellspacing="0" class="fontSize con_tab" align="center" border="0" style="margin-top: 250px;">
            <tr>
                <td width="380px" class="twoName" valign="top">名&nbsp;&nbsp;&nbsp;&nbsp;称</td>
                <td class="content content2" valign="top"><span id="zwzh"></span></td>
                <td width="380px" class="name" valign="top">组成形式</td>
                <td class="content" valign="top"><span id="ZuChengXingShi">个人经营</span></td>
            </tr>
            <tr>
                <td width="380px" class="twoName" valign="top">类&nbsp;&nbsp;&nbsp;&nbsp;型</td>
                <td class="content content2" valign="top"><span id="ScZtType"></span></td>
                <td width="380px" class="name" valign="top">注册日期</td>
                <td class="content" valign="top"><span id="ShenQingDate"></span></td>
            </tr>
            <tr>
                <td width="380px" class="threeName" valign="top">经&nbsp;营&nbsp;者</td>
                <td width="" class="content content2" valign="top"><span id="JingYingRen"></span></td>
                <td width="380px" class="name" valign="top">经营场所</td>
                <td width="" class="content " valign="top"><span id="JingYingChangSuo"></span></td>
            </tr>

            <tr>
                <td width="380px" class="name" valign="top">经营范围</td>
                <td class="content1 content2" 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:53px; margin-left: 9%; margin-top: 32%;font-weight:bold;">http://www.gsxt.gov.cn</div>
    <div style="font-family: 宋体; font-size:52px; margin-left:50%;width:1030px; margin-top:-2%;font-weight:bold;">市场主体应当于每年1月1日至6月30日通过国家企业信息公示系统报送公示年度报告。</div>
</div>
</body>
</html>
