<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="security" uri="http://www.ccpit.org/"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>中国国际贸易促进委员会原产地证申报系统</title>
<link href="/resource/front/css/bootstrap.min.css" rel="stylesheet">
<link href="/resource/front/css/style.css" rel="stylesheet">
<link rel="stylesheet" type="text/css"
	href="/resource/front/css/costom_css_tongzhigonggao.css">
<link rel="stylesheet" type="text/css"
	href="/resource/front/css/page.css">
<link rel="stylesheet" href="/resource/front/css/layui.css" media="all">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
  <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css">
.title {
height: 32px;
margin-top: 50px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #cdcdcd;
font-size: 18px;
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #333333;
}
.content01 {
    line-height: 22px;
    margin-top: 10px;
    }
</style>
</head>
<body>
	<jsp:include page="header.jsp" />
	<div class="row content">
		<div class="col-sm-12 col-md-12 ">
			<!-- <div class="thumbnail"> -->
			<!-- <div class="caption"> -->
			<img src="/resource/front/images/jinchukoumaoyi.png"
				CLASS="costom_title_img_div" style="width: 100%">
			<!-- </div> -->
			<!-- </div> -->
		</div>
	</div>
	<button type="button" class="btn  btn-lg costom_middle_button"
		style="font-width: bold; cursor: default; color: #fff; width: 780px;">
		<!-- 原产地证查询 -->
		Online Verification of Certification of Original China</button>
	<div class="row content">
		<div class="col-sm-12 col-md-12">
			<div class="thumbnail">
			<div class="title">Search</div> 
				<div class="caption costom_table_captionDiv"
					style="margin-left: 0px; margin-right: 0px;">
					<section class="content-wrapper main-content clear-fix"  >

					<form class="layui-form" action="" style="background: #f4f4f6;padding-top:20px;">
					<div style="margin-left: 70px; margin-right: 150px;">
						<div class="layui-form-item" style="margin-bottom: 0px;">
							<label style="width: 240px;" class="layui-form-label certificate">CO
								Certificate No(申请号):</label>
							<div class="layui-input-block"  >
								<input name="tbApplyNumber" id="tbApplyNumber" type="text"
									class="layui-input" style="width: 43%; margin-top: 30px;"
									datatype="*" nullmsg="Please enter CO Certificate No(请录入申请号)"
									errormsg="Input error"
									placeholder="请输入申请号" 
									onmouseover="MM_showHideLayers('left_tip01','','show')"
									onmouseout="MM_showHideLayers('left_tip01','','hide')">
							</div>
							<div style="float: right; margin-top: -90px;visibility: hidden;" class="user"
								id="left_tip01" 
                                onmousemove="MM_showHideLayers('left_tip01','','show')"
								onmouseout="MM_showHideLayers('left_tip01','','hide')">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tbody>
										<tr>
											<td><img src="/resource/front/images/tip01.gif"></td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<div class="layui-form-item" style="margin-bottom: 0px;">
							<label style="width: 240px;" class="layui-form-label certificate">CO
								Serial No(印刷号):</label>
							<div class="layui-input-block">
								<input name="tbPrintNumber" id="tbPrintNumber" type="text"
									class="layui-input" style="width: 43%" datatype="*"
									nullmsg="Please enter CO&nbsp;Serial No(请录入印刷号)"
									placeholder="请输入印刷号" 
									errormsg="Input error"
									onmouseover="MM_showHideLayers('left_tip02','','show')"
									onmouseout="MM_showHideLayers('left_tip02','','hide')">
							</div>
							<div class="user" id="left_tip02"
								style="float: right; margin-top: -90px;visibility:hidden;"
								onmousemove="MM_showHideLayers('left_tip02','','show')"
								onmouseout="MM_showHideLayers('left_tip02','','hide')">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tbody>
										<tr>
											<td><img src="/resource/front/images/tip02.gif"></td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<div class="layui-form-item"  style="margin-bottom: 0px;height:89px;">
							<label style="width: 240px;" class="layui-form-label certificate">Security
								Code(验证码):</label>
							<div class="layui-input-inline"  style="width:110px;">
								<input style="width: 99%;" id="validateCode" name="validateCode"
									class="layui-input" type="text" autocomplete="off"
									placeholder="请输入验证码" lay-verify=""companyName"">
							</div>
							<div class="validate-img-wrapper margin-top-10" style="height:38px;">
							<!-- <div style="boder:1px solid #666666;"> -->
								<img src="/validate/code.do?0.058341759684060523"
									style="height: 28px;margin-top:5px;margin-bottom: 5px;" onclick="changeCode()"> <a
									id="change-img" href="javascript:changeCode();"  style="text-decoration: underline;">Load new image</a>
							<!-- </div> -->
							</div>
						</div>
						<div class="layui-form-item" style="margin-bottom: 0px;height:89px;" >
						<label style="width: 240px;" class="layui-form-label certificate"  ></label>
							<div class="layui-input-block" >
								<button type="button" id="submit" class="layui-btn" lay-submit lay-filter="formDemo" >SEARCH(查询)</button>
								<button type="reset" class="layui-btn layui-btn-primary" >RESET(重置)</button>
							</div>
						</div>
						</div>
					</form>
				</div>
                <div style="display: none" class="content01" id="divhead"><table class="table" width="100%" border="0" cellspacing="0" cellpadding="8">
                <tbody>
                <tr>
                <td width="25%" align="right" valign="top">Exporter(出口商):</td>
                <td id="exporter" width="75%" class="yellow_font" style="word-wrap:break-word;word-break:break-all;overflow:hidden;">INFOARK CO.,LTD VIA DR CHEMICAL CO.,LTD 
                SUITE 2,3 FLOOR,NO.10 EVE STREET,BELIZE CITY,BELIZE</td></tr>
                <tr>
                <td width="25%" align="right" valign="top">Invoice No(发票号):</td>
                <td id="invoiceNumber" width="75%" class="yellow_font" style="word-wrap:break-word;word-break:break-all;overflow:hidden;">21713400**</td></tr>
                <tr>
                <td width="25%" align="right" valign="top">Country(目的国):</td>
                <td id="countryOrRegionOfDestination" width="75%" class="yellow_font" style="word-wrap:break-word;word-break:break-all;overflow:hidden;">VIETNAM</td>
                </tr>
                <tr>
                <td width="25%" align="right" valign="top">H.S.Code(税则号):</td>
                <td id="hsCode" width="75%" class="yellow_font" style="word-wrap:break-word;word-break:break-all;overflow:hidden;">29413020</td>
                </tr>
                <tr>
                <td width="25%" align="right" valign="top">Authorized by(签证人名称):</td>
                <td id="issuer" width="75%" class="yellow_font" style="word-wrap:break-word;word-break:break-all;overflow:hidden;">王莹</td></tr>
                <tr><td width="25%" align="right" valign="top">Issue date(签证日期):</td>
                <td id="issueDate" width="75%" class="yellow_font" style="word-wrap:break-word;word-break:break-all;overflow:hidden;">SEP.20,2017</td>
                </tr>
                </tbody></table></div>
				</section>
			<div  class="title">
			Contact us
			</div>
			<div class="content01">
			Tel : 86-010-82217032 82217078
			<br/>
			Fax : 86-010-82217099-7032
			<br/>
			Email : flningpei@ccpit.org
			<br/>
            Address:xicheng district Huapichang hutong 2#,international chamber of commerce building,Beijing China
			</div>
			</div>
			
		</div>
	</div>
	</div>
	</div>


	<!-- 客服文件 -->
	<jsp:include page="customerService.jsp" />

	<jsp:include page="footer.jsp" />

	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src="/resource/front/js/jquery.min.js"></script>
	<!-- Include all compiled plugins (below), or include individual files as needed -->
	<script src="/resource/front/js/bootstrap.min.js"></script>
	<script src="/resource/front/js/layui.js" charset="utf-8"></script>
	<script rel="script" type="text/javascript">
	$(function() {
		$("#footerAID").css("display","none");
	});
	
		function MM_showHideLayers() { //v9.0
			var i, p, v, obj, args = MM_showHideLayers.arguments;
			for (i = 0; i < (args.length - 2); i += 3)
				with (document)
					if (getElementById
							&& ((obj = getElementById(args[i])) != null)) {
						v = args[i + 2];
						if (obj.style) {
							obj = obj.style;
							v = (v == 'show') ? 'visible'
									: (v == 'hide') ? 'hidden' : v;
						}
						obj.visibility = v;
					}
		}
	    
		function changeCode() {
            var link = "/validate/code.do";
            var param = "?" + Math.random();
            $(".validate-img-wrapper img").attr("src", link+param);
        }
		
		$(document).ready(function() {
			$("#search").click(function() {
				$("#popsearch").slideDown("slow");
			});
			$("#popsearch .gb_btn").click(function() {
				$("#popsearch").slideUp("slow");
			});
		});

		$(function() {
			$('[data-toggle="popover"]').popover()
			changeCode();
		})
		
		  layui.use('form', function() {
            var form = layui.form();
            //自定义验证规则
            
            //监听提交
            form.on('submit(formDemo)', function(data) {
                flag =true;
                var tbApplyNumber = $("#tbApplyNumber").val()
                if (tbApplyNumber == undefined || tbApplyNumber == '') {
                    layer.open({
                        title : "提示信息",
                        content : "请填写证书申请号"
                    });
                    flag = false;
                }
                var tbPrintNumber = $("#tbPrintNumber").val()
                if (tbPrintNumber == undefined || tbPrintNumber == '') {
                    layer.open({
                        title : "提示信息",
                        content : "请填写证书印刷号"
                    });
                    flag = false;
                }
                var validateCode = $("#validateCode").val()
                if (validateCode == undefined || validateCode == '') {
                    layer.open({
                        title : "提示信息",
                        content : "请填写验证码"
                    });
                    flag = false;
                }
                //Ajax获取
                if (flag) {
                $.post('/front/findCertificate', $('.layui-form')
                        .serialize(), function(result) {
                    if (result.status=='success') {
                        $("#exporter").html(result.exporter)
                        $("#countryOrRegionOfDestination").html(result.countryOrRegionOfDestination)
                        $("#hsCode").html(result.hsCode)
                        $("#invoiceNumber").html(result.invoiceNumber)
                        $("#issueDate").html(result.issueDate)
                        $("#issuer").html(result.issuer)
                        $("#divhead").show();
                        changeCode();
                    } else {
                           layer.open({
                               title : "提示信息",
                               content : result.message
                           });
                           changeCode();
                    }
                });
              }
                return false;
            });
        });
	</script>
	<script src="/resource/front/js/aside_fade.js"></script>
</body>
</html>