<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}"></c:set>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="wap-font-scale" content="no">
<title>保函在线</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="${contextPath}/static/weixin/ssdb/css/common.css" rel="stylesheet">
<link href="${contextPath}/static/weixin/ssdb/css/main.css" rel="stylesheet">
<link href="${contextPath}/static/weixin/ssdb/css/ssdb.css" rel="stylesheet">
<script src="${contextPath}/static/js/flexible.min.js"></script>
<style>
.btn-heder{
  width: 1.2rem;
  height: 0.6rem;
  border: 2px solid #ff9900;
  background: #ccc;
  border-radius: 5px 5px 5px 5px / 10px 10px 10px 10px;
  background-color: white;
	}
</style>
</head>
<body class="bg-grey page">
		<header class="bc53a2 fc-white ub ub-ac">
		<p class="ub-f1 fs-16 text-center">保函在线</p>
		<img id="orderListID" src="${contextPath}/static/weixin/ssdb/images/baohan_header_1.png" style="width: 65%;height: 100%;margin-top:0.15rem;padding-bottom:0.3rem;margin-right:0.1rem;" />
	</header>
	<section class="mar-t-40 fs-14 list-block">
		<a href="#" id="lastOrderID" class="mar-b-25 pad-r-20 bg-white ub ub-ac ub-pj search-top" attr-id="" attr-step="" >
			<span class="mar-l-15 br br-orange br-radius5 text-center fc-orange search-state" id="dfkID">待付款</span>
			<p class="mar-l-15 pad-lr-5 fs-12 fc-grey ub-f1 text-overflow" id="timeID">11-17 15:33</p>
			<div class="pad-l-5">
				<span class="mar-r-5 fc-xxxlgrey" id="detailID">订单详情</span>
				<span class="icon icon-list-arrow3"></span>
			</div>
		</a>
		<input type="hidden" id="errorMsg" value="${param.message}"/>
		<form class="pad-l-20 mar-b-10 bg-white br-tb online-letter-form" method="post" action="${contextPath}/web/ssdb/searchCompany">
			<input type="hidden" id="courtId" name="courtId" value=""/>
			<input type="hidden" id="stage" name="stage" value=""/>
			<input type="hidden" id="bdCode" name="bdCode" value=""/>
			<input type="hidden" id="token" name="token" value=""/>
			<input type="hidden" id="bdCode1" name="bdCode1" value=""/>
			<input type="hidden" id="bdCode2" name="bdCode2" value=""/>
			<div class="pad-r-35 ub ub-ac ub-pj fc-black list-item online-letter-court">
				<label class="mar-r-25">选择法院</label>
				<input type="text" class="ub-f1 form-control fs-14" readonly="readonly" id="cityCourtName" name="courtName">
				<span class="icon icon-list-arrow"></span>
			</div>
			<div class="pad-r-35 ub ub-ac ub-pj fc-black list-item">
				<label class="mar-r-25">选择诉讼阶段</label>
				<input type="text" class="ub-f1 form-control online-letter-step fs-14" readonly="readonly" id="stageName">
				<span class="icon icon-list-dropdown"></span>
			</div>
			<div class="pad-r-35 ub ub-ac ub-pj fc-black list-item">
				<label class="mar-r-25">输入担保金额</label>
				<input  type="number" class="ub-f1 form-control" id="online-letter-money" name="targetAmount">
				<p class="fc-red mar-r-10 hide online-letter-money-tips">*请输入整数</p>
				<p class="fc-dgrey">(元)</p>
			</div>
			<div class="pad-r-35 ub ub-ac ub-pj fc-black list-item online-letter-type-wrapper">
				<label class="mar-r-25">选择标的类型</label>
				<input type="text" class="ub-f1 form-control online-letter-type fs-14" readonly="readonly" id="targetTypeName">
				<span class="icon icon-list-dropdown"></span>
			</div>
		</form>
		<div class="ub">
			<div class="mar-l-20 br fc-dgrey fs-12 ub ub-ac ub-pc online-letter-add-type">
				<span class="fs-16 mar-r-5">+</span><span>混合标的</span>
			</div>
			<div class="mar-l-20 br fc-dgrey fs-12 ub ub-ac ub-pc online-letter-minus-type hide">
				<span class="fs-16 mar-r-5">-</span><span>混合标的</span>
			</div>
		</div>
		<a href="#" class="btn bc53a2 btn-lar fs-16 online-letter-filter-btn">查询法院认可的担保机构</a>
	</section>
	<div class="pad-l-20 mar-t-30 mar-b-20 fs-12 fc-xlgrey">
			<span class="radio icon3 icon-radio2 icon-top3 on" data-radio="read" data-value="0"></span>
			<span class="mar-l-10">已阅读并同意</span>
			<span class="fc-blue">《诉讼保全担保服务协议》</span>
			<input type="hidden" name="read" data-type="read">
		</div>
		<div class="mar-lr-auto black-line"></div>
		<div class="mar-lr-20 pad-t-10 fs-12 fc-xxlgrey">
			<div class="mar-tb-10">
				<span class="icon3 icon-top3 icon-flag3"></span>
				<span>已覆盖全国所有省份的重要城市</span>
			</div>
			<div class="mar-tb-10">
				<span class="icon3 icon-top3 icon-zhipai3"></span>
				<span>由平台指派合作律师，服务标准又快速</span>
			</div>
			<div class="mar-tb-10">
				<span class="icon3 icon-top3 icon-price3"></span>
				<span>服务一口价工商外档250元，其他都是500元</span>
			</div>
			<div class="mar-tb-10">
				<span class="icon3 icon-top3 icon-secret3"></span>
				<span>阿里云提供技术支持，保证资料安全性和隐私性</span>
			</div>
	</div>
	<div class="modal-layout hide" data-target="online-letter-step">
		<div class="pad-lr-20 modal-wrapper">
			<div class="pad-tb-15 fs-12 fc-lgrey modal-header">
				选择诉讼阶段
			</div>
			<div class="fs-14 modal-content">
				<ul class="modal-radio-list">
					<li>诉讼前</li>
					<li>诉讼中</li>
				</ul>
			</div>
		</div>
	</div>
	<div class="modal-layout hide" data-target="online-letter-type">
		<div class="pad-lr-20 modal-wrapper">
			<div class="pad-tb-15 fs-12 fc-lgrey modal-header">
				选择标的类型
			</div>
			<div class="fs-14 modal-content">
				<ul class="modal-radio-list">
					<li>房产</li>
					<li>银行账户类</li>
					<li>土地使用权</li>
					<li>非上市公司股权</li>
					<li>应收债权</li>
					<li>采矿权</li>
					<li>车辆</li>
					<li>船舶</li>
					<li>不易腐朽损坏货物</li>
					<li>机器设备</li>
					<li>商标专利</li>
					<li>上市公司股票</li>
					<li>非固定收益基金账户</li>
					<li>上市公司股票</li>
				</ul>
			</div>
		</div>
	</div>
	<div class="bg-grey select-area-layout hide">
		<div class="pad-lr-20 bg-blue fc-white ub ub-ac dialog-header">
			<span class="icon icon-placeholder"></span>
			<p class="ub-f1 fs-16 text-center">选择地区</p>
			<span class="header-back area-back">取消</span>
		</div>
		<div class="pad-tb-15 pad-l-20 pad-r-50 ub area-search-form">
			<input type="text" class="ub-f1 fs-12 form-control" placeholder="请输入城市名称" id="searchCityText">
			<a href="#" class="fs-12 bg-white br-l area-search-form-btn" id="searchCity">搜索</a>
		</div>
		<p class="pad-tb-5 pad-l-30 fs-12 fc-xlgrey">定位城市</p>
		<div class="pad-l-20 pad-r-50 pad-tb-30 br-tb bg-white fs-14 ub ub-ac ub-pj select-court-btn">
			<p id="currentCity"></p>
			<div class="ub ub-ac">
				<p class="fc-dgrey mar-r-20">查看法院</p>
				<span class="icon icon-list-arrow"></span>
			</div>
		</div>
		<p class="pad-tb-5 pad-l-30 fs-12 fc-xlgrey">最近访问</p>
		<ul class="pad-l-20 pad-r-50 pad-t-25 fs-14 clear br-tb area-recent-list">
		</ul>
		<div class="bg-white" id="citySelect">
			
		</div>
	</div>
	<div class="bg-grey select-court-layout hide">
		<div class="pad-lr-20 bg-blue fc-white ub ub-ac dialog-header">
			<span class="icon icon-placeholder"></span>
			<p class="ub-f1 fs-16 text-center">选择法院</p>
			<span class="header-back court-back">取消</span>
		</div>
		<div class="pad-lr-20 pad-tb-30 br-tb bg-white fs-14 ub ub-ac ub-pj court-back-btn">
			<div class="ub ub-ac">
				<span class="icon icon-list-arrow2"></span>
				<p class="fc-dgrey mar-l-20">切换城市</p>
			</div>
			<p>当前: <span id="currentCitySpan">广州</span></p>
		</div>
		<p class="pad-tb-5 pad-l-30 fs-12 fc-xlgrey">法院列表</p>
		<ul class="bg-white fs-14 court-list" id="cityCourtList">
		</ul>
	</div>
	<script src="${contextPath}/static/js/jquery-1.12.0.min.js"></script>
    <script type="text/javascript" src="${contextPath}/static/js/layer/layer.js"></script>
    <script src="${contextPath}/static/weixin/ssdb/js/util.js"></script>
    <script type="text/javascript" src="${contextPath}/static/js/jstorage.js"></script>
    <script src="${contextPath}/static/weixin/common/js/citys.js"></script>
    <script src="${contextPath}/static/weixin/ssdb/js/search.js"></script>
    <script type="text/javascript" src="${contextPath}/static/js/requestutil.js"></script>
    <script type="text/javascript">
    	var baseUrl = '<%=com.fadu.app.util.AppConfig.url_duowenapp_b%>';
    	$(document).ready(function() {
  			token=$.jStorage.get("token");
  			if(token){
  				$("#token").val(token);
  			}
 			var jsonReq={};
	  		jsonReq.token=token;
	  		jsonReq.actionCode="B516";
	  		var url=baseUrl+"/B/android/";
	  		console.log(jsonReq);
	  		requestData(url,jsonReq,success,fail);
	  		function success(json){
 				console.log(json);
 				 if(json){
  					if(json.success==true){
  						var orderStateName=json.orderStateName;
  						var orderID=json.orderId;
  						var maxStep=json.maxStep;
  						var time=json.time;
  						if(orderID){
	  						$("#dfkID").text(orderStateName);
	  						$("#timeID").text(time);
	  						$("#lastOrderID").attr("attr-id",orderID);
	  						$("#lastOrderID").attr("attr-step",maxStep);
  						}else{
  							$("#lastOrderID").addclass("hide");
	  					}
  					}else{
  						layer.msg(json.message);	
  					}
  				}else{
  					layer.msg("获取信息失败!!");
  				}	
 			}
 			$("#lastOrderID").click(function(){
				var _this=$(this);
				var orderId=_this.attr("attr-id");
				var step=_this.attr("attr-step");
				if(step==3){
					var url="${contextPath}/web/ssdb/ssdbpay/"+orderId+"/"+token;
			  		location.href=url;
				}else if(step==4){
					var url="${contextPath}/web/ssdb/toLetter?orderId="+orderId;
			  		location.href=url;
				}else if(step==2){
					var url="${contextPath}/web/ssdb/toConfirm?orderId="+orderId;
	  				location.href=url;
				}else{
					var url="${contextPath}/web/ssdb/search";
		  			location.href=url;
				}		
 			});
 			//订单列表
 			$("#orderListID").click(function(){
				if(token){
 					var url="${contextPath}/web/ssdb/toOrderList";
				}else{
					var url="${contextPath}/web/ssdb/toLogin";
				}				
 				location.href=url;
 			});
 			function fail(resp){
 				console.log(resp);
 			}
  				//radio多
	$('.radio').click(function(){
		var _this = $(this);
		var radio = _this.attr('data-radio');
		var value = _this.attr('data-value');
		if (!_this.hasClass('on')) {
			_this.addClass('on');
			$('input[data-type='+radio+']').val(value);
			radio_if = false;
		}else{
			_this.removeClass('on');
			$('input[data-type='+radio+']').val('');
			radio_if = true;
		}
	});
});
</script>
</body>
</html>
