<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title th:text="行政审批局企业业务自助终端"></title>
    <link href="/Content/css/f_css.css" rel="stylesheet" />
    <link href="/Content/css/style.css" rel="stylesheet" />
    <link href="/Content/css/dui.css" rel="stylesheet">
    <script src="/Content/Scripts/jquery/jquery-1.8.2.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>


    <!--弹出提示框 star-->
    <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>
    <!--弹出提示框 end-->

    

	<style>
	    .qian img {
	        width: 200px;
	    }

	    .chengnuo {
	        padding: 50px;
	        font-size: 24px;
	        line-height: 50px;
	        letter-spacing: 3px;
	        overflow: hidden;
	    }

	        .chengnuo li {
	            width: 100%;
	        }

	</style>

     <script>
         var htmls = '';
         var PageSize = 10; //每页条数10
         var PageIndex = 1;

         var Count = 0;

         var PageCount = 0;
         var totalPage = 0; //总页数

        //var SFZ = "130181199309228729";
          var SFZ = GetQuery('JingYingCard');

         $(function () {
             $.ajax({
                 url: '/Ytj/qyPrint/GetIndexList?SFZ=' + SFZ,
                 type: 'post',
                 dataType: "json",
                 success: function (json) {
                     var data=json.data;
                         if (data.length > 0) {
                             for (var i=0 ;i<data.length;i++){

                                 if (data[i].flg == "0" || data[i].flg == "1")//待审核
                                 {
                                     htmls += '   <div class="woo co1" data-ht="392" data-idx="1"><div class="j">';
                                     htmls += '      <div class="mbpho" style="height:62px">';
                                     htmls += '        <a target="_blank" class="a" >';
                                     htmls += '          <u style="margin-top:62px;height:60px">';
                                     htmls += '<img src="/Content/images/wait.png" style="width:50px;margin-top:5px;"/>';
                                     htmls += '          </u>';
                                     htmls += '        </a>';
                                     htmls += '      </div>';

                                     htmls += '      <div class="wooscr">';
                                     htmls += '        <div class="g">';
                                     htmls += '        <p><strong>企业名称</strong></p>';
                                     if (data[i].qyname == "***"){
                                         htmls += '        <p>' + data[i].qyname + '</p></div>';}
                                     else{
                                         htmls += '        <p>' + data[i].qyname + '</p></div>';}

                                     htmls += '        <div class="g"><strong>法定代表人：</strong>' + data[i].frname + '';
                                     //htmls += '        <p></p>';
                                     htmls += '        </div>';

                                     htmls += '        <div class="d">';
                                     htmls += '          <p><strong>申请日期：</strong>' + subTime(data[i].createdate) + '</p>';
                                     htmls += '        </div>';
                                     htmls += '        <div class="e">';
                                     htmls += '         <p class="or">待审核</p>';
                                     htmls += '       </div>';
                                     htmls += '      </div>';
                                     htmls += '    </div>';
                                     htmls += '</div>';
                                 }
                                 else if (data[i].flg == "2")//审核通过
                                 {
                                     htmls += '  <div class="woo co0" data-ht="675" data-idx="0"><div class="j">';
                                     htmls += '      <div class="mbpho" style="height:62px">';
                                     htmls += '        <a target="_blank" class="a" >';
                                     htmls += '         <!-- <img src="0.png" data-rootid="" data-iid="" height="150">-->';
                                     htmls += '          <u class="guo" style="margin-top:62px;height:60px">';
                                     htmls += '<img src="/Content/images/normal.png" style="width:50px;margin-top:5px;"/>';
                                     htmls += '          </u>';
                                     htmls += '        </a>';
                                     htmls += '      </div>';

                                     htmls += '      <div class="wooscr">';
                                     htmls += '        <div class="g">';
                                     htmls += '        <p><strong>企业名称</strong></p>';
                                     if (data[i].qyname == "***"){
                                         htmls += '        <p>' + data[i].qyname + '</p></div>';}
                                     else{
                                         htmls += '        <p>' + data[i].qyname + '</p></div>';}

                                     htmls += '        <div class="g">';
                                     htmls += '        <p><strong>统一社会信用代码</strong></p>';
                                     htmls += '        <p>' + data[i].xinyongcode + '</p></div>';
                                     htmls += '        <div class="g"><strong>法定代表人：</strong>' + data[i].frname + '';
                                     //htmls += '        <p></p>';
                                     htmls += '        </div>';

                                     htmls += '        <div class="d">';
                                     htmls += '          <p><strong>申请日期：</strong>' + subTime(data[i].createdate) + '</p>';
                                     htmls += '        </div>';
                                     htmls += '        <div class="e">';

                                     if(data[i].isprintZ=="1"&&data[i].isprintF=="1"){
                                        htmls += '         <a class="btn_dayin" href="#" disabled="true" style="background-color:#bfbfbf;">执照已打印</a>';
                                     }else{
                                        htmls += '         <a class="btn_dayin" href="#" onclick="opencns(\''+data[i].bsid+'\')">打印执照</a>';
                                     }

                                    
                                     htmls += '       </div>';
                                     htmls += '      </div>';
                                     htmls += '    </div>';
                                     htmls += ' </div>';
                                 }
                                 else if(data[i].flg == "3")//审核不通过
                                 {
                                     htmls += ' <div class="woo co2" data-ht="392" data-idx="2">';
                                     htmls += '    <div class="j">';
                                     htmls += '      <div class="mbpho" style="height:62px">';
                                     htmls += '        <a target="_blank" class="a" >';
                                     htmls += '          <u class="danger" style="margin-top:62px;height:60px">';
                                     htmls += '<img src="/Content/images/Print_No.png" style="width:50px;margin-top:5px;"/>';
                                     htmls += '          </u>';
                                     htmls += '        </a>   ';
                                     htmls += '      </div>';
                                     htmls += '      <div class="wooscr">';

                                     htmls += '        <div class="g">';
                                     htmls += '        <p><strong>企业名称</strong></p>';
                                     if (data[i].qyname == "***"){
                                         htmls += '        <p>' + data[i].qyname + '</p></div>';}
                                     else{
                                         htmls += '        <p>' + data[i].qyname + '</p></div>';}
                                     htmls += '        <div class="g"><strong>投资人：</strong>' + data[i].frname + '';
                                     //htmls += '        <p></p>';
                                     htmls += '        </div>';

                                     htmls += '        <div class="d">';
                                     htmls += '          <p><strong>申请日期：</strong>' + subTime(data[i].createdate) + '</p>';
                                     htmls += '        </div>';
                                     htmls += '        <div class="e red">';

                                     htmls += '审核不通过意见：';
                                     if (data[i].shenhenote != "" || data[i].shenhenote != null) {
                                         htmls += '         <p style="font-size:14px">' + data[i].shenhenote + '</p>';
                                     }
                                     htmls += '         <p style="font-size:14px">备注:请返回首页,点击企业设立,重新修改</p>';
                                     htmls += '       </div>';
                                     htmls += '      </div>';
                                     htmls += '    </div>';
                                     htmls += '</div>';
                                 }


                             }
                             $("#VoiceList").append(htmls);
                         }
                 },
                 error: function (xhr, errorType, error) {
                     console.log(error);
                 }
             });
         });

        function subTime(str){
            var subt= str.substring(0,10);
            return subt;
        }

         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 opencns(BSID) {     

             window.location.href = "/Ytj/qyPrint/CheckRen?BSID=" + BSID + "&JingYingCard=" + SFZ;
         }


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


        </script>
</head>

<body>
    <header>
        <h2 class="title fl tit-con"th:text="${city}+'行政审批局企业业务自助终端'"></h2>
        <a class="fr fan"  href="/Ytj/qygsdz">返回首页</a>
    </header>
    <div class="content">
        <div class="bg_white" style="height: 848px;">
            <div class="woo-pcont stpics clr woo-masned" data-wootemp="4" data-subpagenum="1" data-totalunits="24" style="position: relative; visibility: visible; height: 808px; overflow: auto;" id="VoiceList" name="VoiceList">
            </div>
        </div>
    </div>
    <div style="position: absolute; right: 5%; bottom: 10px;"><span class="fl dao" id="agree_btn">本页将在60秒后返回首页</span></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/qygsdz";

            }
            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() {
            //stopidcard();
            window.location.href = "/Ytj/qygsdz";
            //history.go(-1);
        }
    </script>
</body>
</html>
