
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String basePath = request.getContextPath();
%>
<!DOCTYPE html>
<html>
<head>
    <jsp:include page="../../../common/admin/head.jsp"></jsp:include>
</head>
<body>
<jsp:include page="../../../common/admin/body_pre.jsp"></jsp:include>
<div class="row hidden-print">
    <div class="col-lg-12">
        <div class="ibox">
            <div class="ibox-title">
                <h2>合同详情</h2>
                <ol class="breadcrumb">
                    <li>
                        <a href="javascript:void(0);">流通管理</a>
                    </li>
                    <li>
                        <a href="<%=basePath%>/admin/contract/index.htm">合同管理</a>
                    </li>
                    <li class="active">
                        <strong>合同详情</strong>
                    </li>
                </ol>
            </div>
        </div>
    </div>

    <div class="col-md-12 column">
        <form class="form-horizontal" id="contractResource" method="post" class="form-horizontal"
              action="<%=basePath%>/admin/contract/addFinally.action">
            <input type="hidden" name="api_badge" id="api_badge" value=0>
            <div class="form-group">
                <label for="contractNumber" class="col-lg-2  text-right">合同编号</label>
                <div id="contractNumber">
                    ${contract.contractNumber}
                </div>
            </div>
            <div class="form-group">
                <label for="contractName" class="col-lg-2  text-right">合同名称</label>
                <div id="contractName">
                    ${contract.contractName}
                </div>
            </div>
            <div class="form-group">
                <label for="partnerName" class="col-lg-2  text-right">合作方名称</label>
                <div id="partnerName">
                    ${contract.partnerName}
                </div>
            </div>
            <div class="form-group">
                <label for="effectiveTime" class="col-lg-2  text-right">生效时间</label>
                <div id="effectiveTime">
                        <fmt:formatDate value="${contract.effectiveTime}" pattern="yyyy-MM-dd"/>
                </div>
            </div>

            <div class="form-group">
                <label for="expiredTime" class="col-lg-2  text-right">到期时间</label>
                <div id="expiredTime">
                    <fmt:formatDate value="${contract.expiredTime}" pattern="yyyy-MM-dd"/>
                </div>
            </div>

            <div class="form-group">
                <label for="contractAmount" class="col-lg-2  text-right">合同总金额</label>
                <div id="contractAmount">
                    ${contract.contractAmount}
                </div>
            </div>

            <div class="form-group">
                <label for="contact" class="col-lg-2  text-right">联系人</label>
                <div id="contact">
                    ${contract.contact}
                </div>
            </div>

            <div class="form-group">
                <label for="contactInfo" class="col-lg-2  text-right">联系信息</label>
                <div id="contactInfo">
                    ${contract.contactInfo}
                </div>
            </div>
            <div class="form-group">
                <table id="contactResource" class="table table-hover  table-condensed table-bordered "
                       style="width: 66%;margin-left:10%" align="center">
                    <thead>
                    <tr>
                        <th>合同资源信息</th>
                        <th>计费方式</th>
                        <th>费用</th>
                        <th>月数限制</th>
                        <th>次数限制</th>
                    </tr>
                    <c:if test="${contract.contractAddResourceModelList.size()>0}">
                        <c:forEach var="contractAddResource" items="${contract.contractAddResourceModelList}">
                            <tr>
                                <th>${contractAddResource.contractResourceName}</th>
                                <th>${contractAddResource.chargeMethod}</th>
                                <th>${contractAddResource.price}</th>
                                <th>${contractAddResource.useMonthsLimit}</th>
                                <th>${contractAddResource.useTimesLimit}</th>
                            </tr>
                        </c:forEach>
                    </c:if>
                    </thead>
                </table>
            </div>

            <div class="form-group">
                <label for="attachmentName" class="col-lg-2  text-right">电子版合同</label>
                <div id="attachmentName">
                    ${attachmentName}
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-7 text-center">
                    <button type="button" id="cancel" class="btn btn-default" data-dismiss="modal"><i
                            class="fa fa-close"></i>返回
                    </button>
                </div>
            </div>
            <input type="hidden" id="resourceBadge" value=0>
        </form>
    </div>
</div>
<jsp:include page="../../../common/admin/body_post.jsp"></jsp:include>
<script type="text/javascript">

    $(".input-group.date").datetimepicker({
        format: "YYYY-MM-DD",
        locale: "zh-cn"
    });

    $("#cancel").click(function () {
        window.location.href = "<%=basePath%>/admin/contract/index.htm";
    });


</script>
</body>
</html>