<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <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/f_css.css" rel="stylesheet" />
    <link href="/Content/css/style.css" rel="stylesheet" />

    <script src="/Content/static/js/jquery-2.0.3.min.js"></script>
    <script src="/Content/static/bootstrap/js/bootstrap.min.js"></script>

    <script src="/Content/static/icheck/icheck.js?v=1.0.2"></script>
    <script src="/Content/static/icheck/demo/js/custom.min.js?v=1.0.2"></script>
    <script src="/Content/static/bootstrap/js/bootstrap.min.js"></script>
    <script src="/Content/JS/Print.js"></script>
    <script src="/Content/JS/A4Print.js"></script>
    <script src="/Content/JS/main.js"></script>
    <script src="/Content/static/js/public.js"></script>


	<link rel="stylesheet" href="/Content/Alert/js/SyntaxHighlighter/shCoreDefault.css">
	<link rel="stylesheet" href="/Content/Alert/css/alert.css">
	<link rel="stylesheet" href="/Content/Alert/css/style.css">
	<script src='/Content/Alert/js/SyntaxHighlighter/shCore.js'></script>
	<script src='/Content/Alert/js/SyntaxHighlighter/makeSy.js'></script>
	<script src='/Content/Alert/js/alert.min.js'></script>
	<script src='/Content/Alert/js/alert-api.js'></script>

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

        var XinYongCode = "";
        var JingYingRen = "";
        var zwzh = "";
        var ScZtType = "";
        var JingYingChangSuo = "";
        var ZuChengXingShi = "";
        var ShenQingDate = "";
        var JingYingFanWei = "";
        var ErWeiMaBase64 = "";


        $(function () {
            // 判断是否已存在，如果已存在则直接显示
            GetGrid();
/*            var info = Get_PCinfo();//获取设备信息
            info = JSON.parse(info);
            $("#xxly").val(info.M_Tag);*/
        });
        //加载数据
        function GetGrid() {
            $.ajax({
                type: 'GET',
                contentType: 'application/json',
                url: '/Ytj/qyPrint/Printing?BSID=' + BSID +"&bs=3",
                dataType: 'json',
                cache:false,
                success: function (json) {
                    var data=json.data;
                    $("#XinYongCode").html(data.xinyongcode);
                    $("#frname").html(data.frname);
                    $("#qyname").html(data.qyname);
                    $("#qylx").html(data.qylx);
                    $("#qyjycs").html(data.qyjycs);
                    $("#cldate").html(ZhuanTime1(data.createdate));
                    if(data.qyjyqx!="长期") {
                        $("#yingyedate").html(Buildtime(data.qynx,data.createdate));
                    }
                    $("#zczj").html(SectionToChinese(data.qyzczj));
                    $("#JingYingFanWei").html(data.qyjyfw);
                    $("#ErWeiMaBase64").html("<img  src=\"data:image/png;base64," + data.erweimabase64 + "\" style=\"width:60px;height:60px;\"/>");

                    $("#XinYongCode1").html(data.xinyongcode);
                    $("#frname1").html(data.frname);
                    $("#qyname1").html(data.qyname);
                    $("#qylx1").html(data.qylx);
                    $("#qyjycs1").html(data.qyjycs);
                    $("#cldate1").html(ZhuanTime1(data.createdate));
                    if(data.qyjyqx!="长期") {
                        $("#yingyedate1").html(Buildtime(data.qynx,data.createdate));
                    }
                    $("#zczj1").html(SectionToChinese(data.qyzczj));
                    $("#JingYingFanWei1").html(data.qyjyfw);
                    $("#ErWeiMaBase641").html("<img  src=\"data:image/png;base64," + data.erweimabase64 + "\" style=\"width:60px;height:60px;\"/>");

                    if (data.isprint == "1") {
                        $("#printA").attr("disabled", true);
                        zbok = 1;
                    }

                    if (data.isprintF== "1") {
                        $("#printB").attr("disabled", true);
                    }
                            XinYongCode = data.xinyongcode;
                            JingYingRen = data.frname;
                            //zwzh = item.NsXzq + "" + item.Zwzh + "" + item.MingChengHangYe + "" + item.ZuZhiXingShi;
                            $("#zwzh1").html(data.qyname);
                            ScZtType = data.qylx;
                            JingYingChangSuo = data.qyjycs;
                            ZuChengXingShi = data.qyzclx;
                            ShenQingDate = data.shenqingdate;
                            JingYingFanWei = data.qyjyfw;
                            ErWeiMaBase64 = data.erweimabase64;
                            var PrintYinCang = "";
                              $("#YinCangPrint").html(PrintYinCang);

                    if (data.createdate != "" && data.createdate != "null") {
                        var Pdate = data.createdate;

                        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);
                    }
                },
                error: function () {
                    alert("页面加载失败");
                }
            });
        }


        function ZhuanTime(Time) {


            // var date = new Date(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 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 "";
        }



        //isStatus
        //100：成功
        //200：失败
        //300：模块未启用

        //isTypecode
        //0：就绪
        //1：正在打印
        //2：初始化中
        //4：睡眠
        //8：唤醒中

        //100：缺纸
        //200：缺墨
        //400：卡纸
        //800：打印机仓门被打开
        //65535：其它状态（typeinfo将返回状态信息）
        //============================副本========================
        function PrintStatar_F(BS, isOne) {
            //获取打印机状态信息
            send_command(
                "PrintInfo",
                function (receivedData) {
                    var data = JSON.parse(receivedData);
                    if (data.status == 100) {
                        var print_info;
                        var type = data.printerstatus.typecode;
                        if (type < 100) {

                            if (isOne == "1" && type == 0) {//打印机就绪，已经打印过
                              //  var dialog = jqueryAlert({
                                //    'style': 'wap',
                                  //  'icon': '/Content/Alert/img/right.png',
                                  //  'content': '副本打印完成！请取走您的执照',
                                  //  'closeTime': 2000,
                                //})
                                updatePrint(BS);
                                if (BS == "1") {//打印正本A3
                                    $("#printA").attr("disabled", true);
                                }
                                else if (BS == "0") {//打印副本A4
                                    $("#printB").attr("disabled", true);
                                }
                            }

                            if (type == 1) {//正在打印
                                if (isOne == "0") {
                                    var dialog = jqueryAlert({
                                        'style': 'wap',
                                        'icon': '/Content/Alert/img/wait.gif',
                                        'content': '副本正在打印,请等待',
                                        'closeTime': 5000,
                                    })
                                }
                                setTimeout("PrintStatar_F('" + BS + "','1')", 2000);
                            }
                            else if (type == 2) {//初始化中
                                var dialog = jqueryAlert({
                                    'style': 'wap',
                                    'icon': '/Content/Alert/img/wait.gif',
                                    'content': '打印机初始化中',
                                    'closeTime': 1000,
                                })
                            } else if (type == 8) {//唤醒中
                                setTimeout("PrintStatar_F('" + BS + "','1')", 2000);
                            } else {
                                setTimeout("PrintStatar_F('" + BS + "','1')", 2000);
                            }
                        }
                        //缺纸
                        else if (type == 100) {
                            var dialog = jqueryAlert({
                                'style': 'wap',
                                'icon': '/Content/Alert/img/warning.png',
                                'content': '打印机缺纸',
                                'closeTime': 2000,
                            })
                        }
                        //缺墨
                        else if (type == 200) {
                            var dialog = jqueryAlert({
                                'style': 'wap',
                                'icon': '/Content/Alert/img/warning.png',
                                'content': '打印机缺墨',
                                'closeTime': 2000,
                            })
                        }
                        //卡纸
                        else if (type == 400) {
                            var dialog = jqueryAlert({
                                'style': 'wap',
                                'icon': '/Content/Alert/img/warning.png',
                                'content': '打印机卡纸',
                                'closeTime': 2000,
                            })
                        }
                        //打印机仓门被打开
                        else if (type == 800) {
                            var dialog = jqueryAlert({
                                'style': 'wap',
                                'icon': '/Content/Alert/img/warning.png',
                                'content': '打印机仓门被打开',
                                'closeTime': 2000,
                            })
                        }
                        //其它状态（typeinfo将返回状态信息）
                        else if (type == 65535) {
                            var dialog = jqueryAlert({
                                'style': 'wap',
                                'icon': '/Content/Alert/img/warning.png',
                                'content': data.printerstatus.typeinfo,
                                'closeTime': 2000,
                            })
                        } else {
                            var dialog = jqueryAlert({
                                'style': 'wap',
                                'icon': '/Content/Alert/img/warning.png',
                                'content': data.printerstatus.typeinfo,
                                'closeTime': 2000,
                            })
                        }
                    }

                }
            );
        }



        //double = 1 双面打印，double = 2 单面打印
        //ChoicePaper = 1时：A3打印，ChoicePaper =0 时 ：A4打印
        // ChoiceTray  打印纸盒选择（0使用默认纸盒，1使用纸盒1，2使用纸盒2，3使用纸盒3，4使用纸盒4，5使用手动纸盒

        //开始打印副本
        //打印副本
        function printweb(BS) {
            var Url = getRootPath_web();
            var path = "";

            if (BS == "1") {//打印正本A3
                $("#printA").attr("disabled", true);
                path = Url + "/GtgshPrint/PrintLrForm?BSID=" + compileStr(BSID) + "&JingYingCard=" + compileStr(JingYingCard);
            }
            else if (BS == "0") {//打印副本A4
                $("#printB").attr("disabled", true);
                path = Url + "/GtgshPrint/PrintlrForm_F?BSID=" + compileStr(BSID) + "&JingYingCard=" + compileStr(JingYingCard);
            }

            isStatus_F = 50;
            isTypecode_F = 50;

            $.ajax({
                type: 'GET',
                contentType: 'application/json',
                url: 'GetFormLr?BSID=' + BSID + '&JingYingCard=' + JingYingCard,
                dataType: 'json',
                cache: false,
                success: function (data) {
                    if (data.Table.length > 0) {
                        $.each(data.Table, function (i, item) {
                            if (item.isPrint_F == "1") {
                                var dialog = jqueryAlert({
                                    'style': 'wap',
                                    'icon': '/Content/Alert/img/warning.png',
                                    'content': '副本已打印！',
                                    'closeTime': 2000,
                                })
                            } else {
                                updatePrint(BS);
                                var printurlChoiceTray = {
                                    "url": path,
                                    "ChoiceTray": 1,
                                    "isdouble": 0,
                                    "ChoicePaper": 0
                                };
                                var data = JSON.stringify(printurlChoiceTray);
                                send_command(
                                    "printUrl2",
                                    data,
                                    function (receivedData) {
                                        var dialog = jqueryAlert({
                                            'style': 'wap',
                                            'icon': '/Content/Alert/img/right.png',
                                            'content': '开始打印...',
                                            'closeTime': 2000,
                                        })
                                    });
                            }


                        });
                    }
                }
            });
        }
            //截取url
        function GetUrlRelativePath(){
            var url = document.location.toString();
            // http://localhost:8086/Ytj/qyPrint/PrintLr?BSID=57c39731-3d19-49f0-ab4c-b1b17f2d8395&JingYingCard=44xxxxxxxxxxxxxxxx
            var arrUrl = url.split("//");
            var start = arrUrl[1].indexOf("//");
            var relUrl = arrUrl[1].substring(start);//stop省略，截取从start开始到结尾的所有字符
            if(relUrl.indexOf("PrintLr") != -1){
                relUrl = relUrl.split("PrintLr")[0];
            }
            return relUrl;
        }

        //===========================正本=====================================
/*
旧一体机的正本配置。
        {
        "url": path,
        ChoiceTray: 5,
        ChoicePaper: 1
         };
旧一体机的副本配置。
        {
        "url": path,
        ChoiceTray: 1,
        ChoicePaper: 0
         };


新一体机的正本配置。
        {
        "url": path,
        ChoiceTray: 1,
        ChoicePaper: 1
         };
新一体机的副本配置。
        {
        "url": path,
        ChoiceTray: 0,
        ChoicePaper: 0
         };



*/

        //开始打印副本
        function Print(BS) {
           // var Url = "http://32.40.105.201:8086/Ytj/Printer";
            var Url = getRootPath_web();
             var path = "";
             path = Url + "/Ytj/qyPrint/fuben?XinYongCode=" +$("#XinYongCode").text() ;
           // var path = "32.40.107.110:8080/Ytj/qyPrint/fuben?BSID=b88619c0-9544-422b-948f-806242b5b653";
            $.ajax({
                type: 'GET',
                contentType: 'application/json',
                url: '/Ytj/qyPrint/Printing?BSID='+ BSID+"&bs=0",
                dataType: 'json',
                cache: false,
                success: function (json) {
                    if (json.code == 301) {
                                var dialog = jqueryAlert({
                                    'style': 'wap',
                                    'icon': '/Content/Alert/img/warning.png',
                                    'content': '副本已打印！',
                                    'closeTime': 2000,
                                })
                            } else {
                        $("#printB").attr("disabled", true);
                                var printurlChoiceTray = {
                                    "url": path,
                                    "ChoiceTray": 0,
                                    "isdouble": 0,
                                    "ChoicePaper": 0
                                };
                                var data = JSON.stringify(printurlChoiceTray);
                                send_command(
                                    "printUrl2",
                                    data,
                                    function (receivedData) {
                                        var dialog = jqueryAlert({
                                            'style': 'wap',
                                            'icon': '/Content/Alert/img/right.png',
                                            'content': '开始打印...',
                                            'closeTime': 2000,
                                        })
                                    });
                            }


                }
            });
        }





        //打印正本
        function printweb2(BS) {
            //var Url = "http://32.40.105.201:8086/Ytj/Printer";
            var Url = getRootPath_web();
            // var path = document.getElementById('printurl').value;
           var path = Url + "/Ytj/qyPrint/zhengben?XinYongCode=" +$("#XinYongCode").text()  ;
           // var path = "http://32.40.107.110:8080/Ytj/qyPrint/zhengben?BSID=b88619c0-9544-422b-948f-806242b5b653";

            $.ajax({
                type: 'GET',
                contentType: 'application/json',
                url: '/Ytj/qyPrint/Printing?BSID=' + BSID +"&bs=1",
                dataType: 'json',
                cache: false,
                success: function (json) {
                            if (json.code == 301) {
                                var dialog = jqueryAlert({
                                    'style': 'wap',
                                    'icon': '/Content/Alert/img/warning.png',
                                    'content': '正本已打印！',
                                    'closeTime': 2000,
                                })
                            } else {

                                $("#printA").attr("disabled", true);
                                var testfile =
                                    {
                                        "url": path,
                                        ChoiceTray: 1,
                                        ChoicePaper: 1
                                    };
                                var data = JSON.stringify(testfile);
                                send_command(
                                    "printUrl2",
                                    data,
                                    function (receivedData) {
                                        var dialog = jqueryAlert({
                                            'style': 'wap',
                                            'icon': '/Content/Alert/img/right.png',
                                            'content': '开始打印...',
                                            'closeTime': 2000,
                                        })
                                    });
                            }
                }
            });
        }


        //isStatus
        //100：成功
        //200：失败
        //300：模块未启用

        //isTypecode
        //0：就绪
        //1：正在打印
        //2：初始化中
        //4：睡眠
        //8：唤醒中

        //100：缺纸
        //200：缺墨
        //400：卡纸
        //800：打印机仓门被打开
        //65535：其它状态（typeinfo将返回状态信息）

        function PrintStatar(BS, isOne) {
            send_command(
                "PrintInfo",
                function (receivedData) {
                    var data = JSON.parse(receivedData);
                    if (data.status == 100) {
                        var print_info;
                        var type = data.printerstatus.typecode;
                        if (type < 100) {
                            if (isOne == "1" && type == 0) {//打印机就绪，已经打印过
                               // var dialog = jqueryAlert({
                               //     'style': 'wap',
                               //     'icon': '/Content/Alert/img/right.png',
                               //     'content': '正本打印完成！请取走您的执照',
                               //     'closeTime': 2000,
                               // })
                                updatePrint(BS);
                                if (BS == "1") {//打印正本A3
                                    $("#printA").attr("disabled", true);
                                }
                                else if (BS == "0") {//打印副本A4
                                    $("#printB").attr("disabled", true);
                                }
                            }

                            if (type == 1) {//正在打印
                                if (isOne == "0") {
                                    var dialog = jqueryAlert({
                                        'style': 'wap',
                                        'icon': '/Content/Alert/img/wait.gif',
                                        'content': '正本正在打印,请等待',
                                        'closeTime': 5000,
                                    })
                                }
                                setTimeout("PrintStatar('" + BS + "','1')", 2000);
                            }
                            else if (type == 2) {//初始化中
                                var dialog = jqueryAlert({
                                    'style': 'wap',
                                    'icon': '/Content/Alert/img/wait.gif',
                                    'content': '打印机初始化中',
                                    'closeTime': 1000,
                                })
                            } else if (type == 8) {//唤醒中
                                setTimeout("PrintStatar('" + BS + "','1')", 2000);
                            } else {
                                setTimeout("PrintStatar('" + BS + "','1')", 2000);
                            }
                        }
                        //缺纸
                        else if (type == 100) {
                            var dialog = jqueryAlert({
                                'style': 'wap',
                                'icon': '/Content/Alert/img/warning.png',
                                'content': '打印机缺纸',
                                'closeTime': 2000,
                            })
                        }
                        //缺墨
                        else if (type == 200) {
                            var dialog = jqueryAlert({
                                'style': 'wap',
                                'icon': '/Content/Alert/img/warning.png',
                                'content': '打印机缺墨',
                                'closeTime': 2000,
                            })
                        }
                        //卡纸
                        else if (type == 400) {
                            var dialog = jqueryAlert({
                                'style': 'wap',
                                'icon': '/Content/Alert/img/warning.png',
                                'content': '打印机卡纸',
                                'closeTime': 2000,
                            })
                        }
                        //打印机仓门被打开
                        else if (type == 800) {
                            var dialog = jqueryAlert({
                                'style': 'wap',
                                'icon': '/Content/Alert/img/warning.png',
                                'content': '打印机仓门被打开',
                                'closeTime': 2000,
                            })
                        }
                        //其它状态（typeinfo将返回状态信息）
                        else if (type == 65535) {
                            var dialog = jqueryAlert({
                                'style': 'wap',
                                'icon': '/Content/Alert/img/warning.png',
                                'content': data.printerstatus.typeinfo,
                                'closeTime': 2000,
                            })
                        } else {
                            var dialog = jqueryAlert({
                                'style': 'wap',
                                'icon': '/Content/Alert/img/warning.png',
                                'content': data.printerstatus.typeinfo,
                                'closeTime': 2000,
                            })
                        }
                    }

                }
            );
        }



        function getRootPath_web() {
            //获取当前网址
            var curWwwPath = window.document.location.href;
            //获取主机地址之后的目录，如： uimcardprj/share/meun.jsp
            var pathName = window.document.location.pathname;
            var pos = curWwwPath.indexOf(pathName);
            //获取主机地址，如： http://localhost:8083
            var localhostPaht = curWwwPath.substring(0, pos);
            //获取带"/"的项目名，如：/uimcardprj
            // var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
            return (localhostPaht);
        }



        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;
        }


        function getRadioVal(name) {
            var result;
            var radio = document.getElementsByName(name);
            for (var i = 0; i < radio.length; i++) {
                if (radio[i].checked) {
                    result = radio[i].value;
                }
            }
            return result;
        }

        //将时间分成两个时间段

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

            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;

        }
        //数字转中文金额start

        function SectionToChinese(n) {
            n=n*10000;
            if (n == 0) {
                return "零";
            }
            if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n))
                return "";
            var unit = "仟佰拾亿仟佰拾万仟佰拾元角分", str = "";
            n += "00";
            var p = n.indexOf('.');
            if (p >= 0)
                n = n.substring(0, p) + n.substr(p + 1, 2);
            unit = unit.substr(unit.length - n.length);
            for (var i = 0; i < n.length; i++)
                str += '零壹贰叁肆伍陆柒捌玖'.charAt(n.charAt(i)) + unit.charAt(i);
            return str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");

        }
        //数字转中文金额end


    </script>

    <style>
        .fontSize {
        font-size:12px;
        font-family:黑体;
        }
        #myPrintArea {
        float:left;
        }
         #myPrintArea1 {
        float:right;
        }
    </style>
</head>
<body>
 <input id="xxly" name="xxly" type="hidden"/>
    <header>
 <h2 class="title fl tit-con"th:text="${city}+'行政审批局企业业务自助终端'"></h2>
 <a class="fr fan" href="/Ytj/GsYw">返回首页</a>
</header>

<div class="text-left" style="display:none">
                <span style="color: darkred">打印纸盒选择？</span>
                <label>
                    <input type="radio" name="ChoiceTray" value="0"> 默认纸盒
                </label>
                <label>
                    <input type="radio" name="ChoiceTray" value="1" checked> 使用纸盒1
                </label>
                <label>
                    <input type="radio" name="ChoiceTray" value="2"> 使用纸盒2
                </label>
                <label>
                    <input type="radio" name="ChoiceTray" value="3"> 使用纸盒3
                </label>
                <label>
                    <input type="radio" name="ChoiceTray" value="4"> 使用纸盒4
                </label>
                <label>
                    <input type="radio" name="ChoiceTray" value="5"> 使用手动送纸盒
                </label>
            </div>
            <div class="text-left"  style="display:none">
                <span style="color: darkred">选择纸张规格？</span>
                <label>
                    <input type="radio" name="ChoicePaper" value="0" > A4
                </label>
                <label>
                    <input type="radio" name="ChoicePaper" value="1" checked> A3
                </label>
            </div>



    <div class="content">
        <div class="bg_white" id="PhotoContent">
            <div class="fl zheng" style="position:relative">
               <!-- <img src="/Content/images/zheng.png"/>-->
                <div id="myPrintArea" style="width:800px;height:600px;margin-top:50px;background-image:url(/Content/images/Print_YYZZNew.jpg);background-size:100% auto;background-repeat:no-repeat;padding-left:80px;padding-top:80px;">
                    <div id="content" style="margin-top:80px;margin-left:10px;text-align:left;width:90%">
                        <div style="margin-left:0px;" class="fontSize"><strong>统一社会信用代码</strong><br /><span id="XinYongCode"></span></div>

                        <div style="position: absolute; top: 210px; float: right; right:140px;"><div id="ErWeiMaBase64"></div></div>

                        <table cellspacing="0" class="fontSize" align="center" border="0" style="margin-bottom:20px;width:99%;margin-top:25px; ">
                            <tr>
                                <td style="height:10px;width:120px;"><strong>名&nbsp;&nbsp;&nbsp;&nbsp;称</strong></td>
                                <td align="left"><span id="qyname"></span></td>
                                <td style="height:10px;"><strong>注册资本</strong></td>
                                <td align="left"><span id="zczj"></span></td>
                            </tr>

                            <tr>
                                <td style="height:10px;"><strong>类&nbsp;&nbsp;&nbsp;&nbsp;型</strong></td>
                                <td align="left"><span id="qylx"></span></td>
                                <td style="height:10px;"><strong>成立日期</strong></td>
                                <td align="left"><span id="cldate"></span></td>
                            </tr>

                            <tr>
                                <td style="height:10px;"><strong>法定代表人</strong></td>
                                <td align="left"><span id="frname"></span></td>
                                <td style="height:10px;"><strong>营业期限</strong></td>
                                <td align="left"  ><span id="yingyedate"></span></td>
                            </tr>
                            <tr>
                                <td style="height:10px;"><strong>经营范围</strong></td>
                                <td align="left"><div style="width:200px;"><span id="JingYingFanWei"></span></div></td>
                                <td style="height:10px;"><strong>住&nbsp;&nbsp;&nbsp;&nbsp;所</strong></td>
                                <td align="left"><div style="width:200px;"><span id="qyjycs"></span></div></td>
                            </tr>
                        </table>



                        <div style="margin-left:496px;margin-top:128px;width:118px;" class="fontSize">
                            <div style="float:left;"><span id="Nian"></span></div>
                            <div style="float:left;margin-left:40px;"><span id="Yue"></span></div>
                            <div style="float:right;margin-left:10px;"><span id="Ri"></span></div>
                        </div>

                    </div>
                </div>
                <input type="button" class="btn-orange" style="margin-top:700px;" onclick="printweb2('1')" id="printA" value="打印正本" />
            </div>

            <div class="fl zheng" style="position:relative">
                <!--<img src="/Content/images/zheng.png"/>-->
                <div id="myPrintArea1" style="width:800px;height:600px;margin-top:50px;background-image:url(/Content/images/Print_YYZZNew.jpg);background-size:100% auto;background-repeat:no-repeat;padding-left:80px;padding-top:80px;">
                    <div id="content1" style="margin-top:50px;margin-left:10px;text-align:left;width:90%">
                        <div class="fontSize">副本编号:1-1</div>
                        <div style="margin-left:0px;" class="fontSize"><strong>统一社会信用代码</strong><br /><span id="XinYongCode1"></span></div>


                        <div style="position: absolute; top: 220px; float: right; right:140px;"><div id="ErWeiMaBase641"></div></div>


                        <table cellspacing="0" class="fontSize" align="center" border="0" style="margin-bottom:20px;width:99%;margin-top:25px; ">
                            <tr>
                                <td style="height:10px;width:120px;"><strong>名&nbsp;&nbsp;&nbsp;&nbsp;称</strong></td>
                                <td align="left"><span id="qyname1"></span></td>
                                <td style="height:10px;"><strong>注册资本</strong></td>
                                <td align="left"><span id="zczj1"></span></td>
                            </tr>

                            <tr>
                                <td style="height:10px;"><strong>类&nbsp;&nbsp;&nbsp;&nbsp;型</strong></td>
                                <td align="left"><span id="qylx1"></span></td>
                                <td style="height:10px;"><strong>成立日期</strong></td>
                                <td align="left"><span id="cldate1"></span></td>
                            </tr>

                            <tr>
                                <td style="height:10px;"><strong>法定代表人</strong></td>
                                <td align="left"><span id="frname1"></span></td>
                                <td style="height:10px;"><strong>营业期限</strong></td>
                                <td align="left"  ><span id="yingyedate1"></span></td>
                            </tr>
                            <tr>
                                <td style="height:10px;"><strong>经营范围</strong></td>
                                <td align="left"><div style="width:200px;"><span id="JingYingFanWei1"></span></div></td>
                                <td style="height:10px;"><strong>住&nbsp;&nbsp;&nbsp;&nbsp;所</strong></td>
                                <td align="left"><div style="width:200px;"><span id="qyjycs1"></span></div></td>
                            </tr>

                        </table>



                        <div style="margin-left:496px;margin-top:138px;width:118px;" class="fontSize">
                            <div style="float:left;"><span id="Nian1"></span></div>
                            <div style="float:left;margin-left:40px;"><span id="Yue1"></span></div>
                            <div style="float:right;margin-left: 0px;"><span id="Ri1"></span></div>
                        </div>

                    </div>
                </div>
                <input type="button" class="btn-orange" style="margin-top:700px;" onclick="Print('0')" id="printB" value="打印副本" />
            </div>
        </div>
    </div>

<div class="footer"> <span>技术支持：石家庄开发区亿网科技发展有限公司</span> </div>
<div style="position:absolute;right:5%;bottom:30px;">
    <span class="fl dao" id="agree_btn">本页将在60秒后返回首页</span>
<a class="btn-fan fl" onclick="goBack()">返回</a>
</div>


    <script>
        var secs = 180;
        //document.agree.agreeb.disabled=true;
        for (var i = 0; i <= secs; i++) {
            window.setTimeout("update(" + i + ")", i * 1000);
        }
        function update(num) {
            if (num == secs) {
                // 超时返回到首页
                // window.href = "../../index.html";
                location.href = "/Ytj/GsYw";

            }
            else {
                var printnr = secs - num;
                //document.agree.agreeb.value = "本页受理倒计时:" + printnr+"秒！";
                //document.agree.agreeb.innerHTML = "本页受理倒计时:" + printnr+"秒！";

                var testdiv = document.getElementById("agree_btn");
                testdiv.innerHTML = "本页将在" + printnr + "秒后返回首页";
            }
        }

        function showtime(t) {
            document.myform.phone.disabled = true;
            for (i = 0; i <= t; i++) {
                window.setTimeout("update_p(" + i + "," + t + ")", i * 1000);
            }

        }
        function goBack() {

            history.go(-1);
        }



</script>
    <div id="YinCangPrint" name="YinCangPrint" style="display:none"></div>
</body>
</html>
