<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="contextPath" value="${pageContext.request.contextPath}"></c:set>
<link rel="stylesheet" href="${contextPath}/static/assets/css/jquery-ui.css" />
<link rel="stylesheet" href="${contextPath}/static/assets/css/ui.jqgrid.css" />

<style>
    /*基本信息*/
    .div-1{
        border: 1px #E1E1E1 solid;
        width:800px;
        height:900px;
    }
    .title-p{
        width:500px;
        height:20px;
        font-size:14px;
        font-weight:bold;
        color:rgba(102,102,102,1);
        line-height:40px;
        position: absolute;
        left: 40px;
    }
    .title-t{
        width:800px;
        height:44px;
        background:rgba(188,224,255,1);
    }
    .inner-div1{
        position: absolute;
        margin: 10px 30px;
    }
    #inner-div1-orderId{
        top: 90px;
    }
    #inner-div-company{
        top: 90px;
        left: 230px;
    }
    #inner-div1-orderState{
        top: 85px;
        left: 460px;
    }
    #inner-div1-lawyerName{
        top: 140px;
    }
    #inner-div1-lawyerPhone{
        top: 140px;
        left: 230px;
    }
    #inner-div1-managerId{
        top: 140px;
        left: 460px;
    }
    #inner-div1-bf{
        top: 190px;
    }
    #inner-div1-commisionLawyer{
        top: 190px;
        left: 230px;
    }
    #inner-div1-isBusy{
        top: 190px;
        left: 460px;
    }
    .select-div1{
        width: 120px;
        height: 30px;
        border-radius: 5px;
    }
    .div-hr{
        width: 760px;
        height: 10px;
    }
    #div-1-hr-1{
        position: relative;
        top: 180px;
    }
    #inner-div1-court{
        top: 270px;
    }
    #inner-div1-sqbd{
        top: 270px;
        left: 340px;
    }
    #inner-div1-bdCode{
        top: 320px;
    }
    #inner-div1-plaintiff{
        top: 320px;
        left: 340px;
    }
    .div-1-input{
        position: relative;
        left: 25px;
    }
    .div-input{
        width: 180px;
        height: 30px;
        border-radius: 10px;
    }
    .div-1-6{
        position: relative;
        top: 270px;
        left: 30px;
        margin: 60px 0;
    }
    .xy-btn{
        width:200px;
        height:40px;
        border-radius: 5px;
    }
    #div-1-button{
        position: relative;
        top: 250px;
        left: 30px;
    }
    /*审核部分*/
    .div-2{
        border: 1px #E1E1E1 solid;
        width:800px;
        height:500px;
    }
    .inner-div2{
        position: absolute;
        margin: 10px 30px;
    }
    #inner-div2-createDate{
        top: 960px;
    }
    #inner-div2-checkCloseDate{
        top: 960px;
        left: 350px;
    }
    #inner-div2-checkDate{
        top: 1000px;
    }
    #inner-div2-checkHours{
        top: 1000px;
        left: 350px;
    }
    #div-2-hr-1{
        position: relative;
        top: 80px;
    }
    #inner-div2-pic{
        top: 1070px;
    }
</style>

<html>
<title><span id="title"></span></title>

<%--基本信息--%>
<div class="div-1 div-div">
    <div class="title-t">
        <div  class="title-p">基本信息</div>
    </div>
    <div class="div-1-1">
        <div class="inner-div1" id="inner-div1-orderId">
            订单号：<span id="div-1-orderId"></span>
        </div>
        <div class="inner-div1" id="inner-div-company">
            保险公司：<span id="div-1-company"></span>
        </div>
        <div class="inner-div1" id="inner-div1-orderState">
            订单状态：
            <select class="select-div1" id="div-1-orderState">
                <option value="0">审核中</option>
                <option value="10">已取消</option>
                <option value="20">审核失败</option>
                <option value="21">审核反馈</option>
                <option value="22">待付款</option>
                <option value="30">待确认</option>
                <option value="31">付款反馈</option>
                <option value="32">待出函</option>
                <option value="40">已出函</option>
                <option value="41">已配送</option>
                <option value="50">退保处理中</option>
                <option value="51">退保成功</option>
                <option value="52">退保失败</option>
            </select>
        </div>
    </div>
    <div class="div-1-2">
        <div class="inner-div1" id="inner-div1-lawyerName">
            律师：<span id="div-1-lawyerName"></span>
        </div>
        <div class="inner-div1" id="inner-div1-lawyerPhone">
            电话：<span id="div-1-lawyerPhone"></span>
        </div>
        <div class="inner-div1" id="inner-div1-managerId">
            客户经理：<span id="div-1-managerId"></span>
        </div>
    </div>
    <div class="div-1-3">
        <div class="inner-div1" id="inner-div1-bf">
            保费：<span id="div-1-bf"></span>
        </div>
        <div class="inner-div1" id="inner-div1-commisionLawyer">
            返点：<span id="div-1-commisionLawyer"></span>
        </div>
        <div class="inner-div1" id="inner-div1-isBusy">
            是否加急：
            <select class="select-div1" id="div-1-isBusy">
                <option value="-1">请选择</option>
                <option value="0">是</option>
                <option value="1">否</option>
            </select>
        </div>
    </div>
    <hr class="div-hr" id="div-1-hr-1">
    <div class="div-1-4">
        <div class="inner-div1" id="inner-div1-court">
            法院：<input type="text" class="div-1-input div-input"  id="div-1-court">
        </div>
        <div class="inner-div1" id="inner-div1-sqbd">
            保全金额：<input type="text" class="div-input" id="div-1-sqbd">
        </div>
    </div>
    <div class="div-1-5">
        <div class="inner-div1" id="inner-div1-bdCode">
            案件类型：<input type="text" class="div-input"  id="div-1-bdCode">
        </div>
        <div class="inner-div1" id="inner-div1-plaintiff">
            原告：<input type="text" class="div-1-input div-input" id="div-1-plaintiff">
        </div>
    </div>
    <div class="div-1-6">
        <p id="div-1-pic-1">起诉状</p>
        <div id="div-1-img-1"><img src=""></div>
    </div>
    <div class="div-1-6">
        <p id="div-1-pic-2">保全申请书</p>
        <div id="div-1-img-2"><img src=""></div>
    </div>
    <div class="div-1-6">
        <p id="div-1-pic-3">原/被告身份资料</p>
        <div id="div-1-img-3"><img src=""></div>
    </div>
    <div class="div-1-6">
        <p id="div-1-pic-4">证据资料</p>
        <div id="div-1-img-4"><img src=""></div>
    </div>
    <div class="div-1-7">
        <button id="div-1-button" onclick="editOrder()"  class="btn btn-sm btn-primary xy-btn">保存</button>
    </div>
</div>


<%--审核--%>

<div class="div-2 div-div">
    <div class="title-t">
        <div  class="title-p">审核</div>
    </div>
    <div class="div-2-1">
        <div class="inner-div2" id="inner-div2-createDate">
            提交时间：<span id="div-2-createDate"></span>
        </div>
        <div class="inner-div2" id="inner-div2-checkCloseDate">
            承诺首次审核时间：<span id="div-2-checkCloseDate"></span>
        </div>
    </div>
    <div class="div-2-2">
        <div class="inner-div2" id="inner-div2-checkDate">
            实际首次审核时间：<span id="div-2-checkDate"></span>
        </div>
        <div class="inner-div2" id="inner-div2-checkHours">
            审核时效：<span id="div-2-checkHours"></span>
        </div>
    </div>
    <hr class="div-hr" id="div-2-hr-1">
    <div class="div-2-3">
        <div class="inner-div2" id="inner-div2-pic">
            保险公司要求补充资料：
           <span id="div-2-pic"></span>
        </div>
    </div>
</div>

</html>


<script type="text/javascript">

    console.log(window.location.href);
    var str = window.location.href;
    let list =  str.split('?');
    var orderId = decodeURI(list[1]);
    $("#title").html(orderId);//将页面 title 改为订单号
    $("#div-1-orderId").html(orderId);

    //获取基本信息（未完成）
    function getSsdbOrder() {
        $.ajax({
            dataType : "json",
            url : "${contextPath}/ssdb/new/ssdbOrderDetails",
            type : "post",
            data : {
                'orderId' : orderId,
            },
            complete : function(ret) {
                console.log(ret);
                var ret = eval("(" + ret.responseText + ")");
                console.log(ret.updateRemark);
            }
        });
    }
    getSsdbOrder();

    var scripts = [ null,  "${contextPath}/static/assets/js/date-time/bootstrap-datepicker.js",
        "${contextPath}/static/assets/js/date-time/locales/bootstrap-datepicker.zh-CN.js",
        "${contextPath}/static/assets/js/jqGrid/jquery.jqGrid.js",
        "${contextPath}/static/assets/js/jqGrid/i18n/grid.locale-cn.js", null ];

    $('.page-content-area').ace_ajax('loadScripts', scripts, function() {

        jQuery(function ($) {

        });

    });

    //基本信息保存
    function editOrder() {

    }


</script>