<%@ page import="com.lightinit.hsdataplatform.dictionary.DicResourceCatelogType" %>
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String basePath = request.getContextPath();
%>
<jsp:include page="../../../common/admin/modal_content_pre.jsp"><jsp:param name="modal_title" value="审核"/></jsp:include>
<form id="formEdit" action="<%=basePath%>/admin/microapp_publish/doAduit.action" method="post" class="form-horizontal">
    <input type="hidden" name="publishInfoId" value="${publishInfo.id}" />
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label" >微应用名称：</label>

        <div class="col-md-7 col-sm-7">
            ${resource.resourceName}
            <%--<input type="hidden" name="serviceId" value="${resource.resourceName}"/>--%>
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label" >微应用标示：</label>
        <div class="col-md-7 col-sm-7">
            ${resource.resourceIdentity}
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">微应用简介：</label>
        <div class="col-md-7 col-sm-7">
            ${resource.resourceSummary}
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label" >注册日期：</label>
        <div class="col-md-7 col-sm-7">

            <fmt:formatDate value="${resource.registerDate}" pattern="yyyy-MM-dd"/>
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>

    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">提供单位：</label>
        <div  >
            ${dic.provider}
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">服务方式：</label>
        <div class="col-md-7 col-sm-7">
            ${microapp.serviceMethod}
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">服务渠道：</label>
        <div class="col-md-7 col-sm-7">
            ${microapp.serviceChannel}
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label">演示地址：</label>
        <div class="col-md-7 col-sm-7">
            ${microapp.demoUrl}
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">访问URL：</label>
        <div class="col-md-7 col-sm-7">
            ${microapp.url}
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">页面截图：</label>
        <div class="col-md-7 col-sm-7">
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>

    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">主题分类：</label>
        <div >
            ${dic.themename}
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>




    <div class="form-group">
        <label  class="col-md-3 col-sm-3 control-label">服务标签：</label>
        <div class="col-md-7 col-sm-7">
            ${microapp.serviceTag}
        </div>
        <span class="field-validation-valid help-block"></span>
    </div>
    <hr>
    <h4>发布渠道：</h4>
         <div class="form-group">
            <label  class="col-md-3 col-sm-3 control-label">共享类型：</label>
            <div class="col-md-7 col-sm-7">
                ${resource.shareType}
            </div>
            <span class="field-validation-valid help-block"></span>
        </div>
        <div class="form-group">
            <label  class="col-md-3 col-sm-3 control-label">共享条件：</label>
            <div class="col-md-7 col-sm-7">
                ${resource.shareType}
            </div>
            <span class="field-validation-valid help-block"></span>
        </div>
        <div class="form-group">
            <label  class="col-md-3 col-sm-3 control-label">开放类型：</label>
            <div class="col-md-7 col-sm-7">
                ${resource.openType}
            </div>
            <span class="field-validation-valid help-block"></span>
        </div>
        <div class="form-group">
            <label  class="col-md-3 col-sm-3 control-label">开放条件：</label>
            <div class="col-md-7 col-sm-7">
                ${resource.openType}
            </div>
            <span class="field-validation-valid help-block"></span>
        </div>
    <table style="width: 68%" class="table table-hover  table-condensed table-bordered "
           align="center">
        <thead>
            <tr>
                <td>套餐名称</td>
                <td>套餐价格</td>
                <td>购买限制</td>
                <td>使用限制</td>
                <td>生效日期</td>
                <td>失效日期</td>
            </tr>
            <c:forEach items="${publishSettingList}" var="item" >
            <tr>
                <td>${item.packageName}</td>
                <td>${item.packagePrice    }</td>
                <td>${item.buyTimesLimit}</td>
                <td>${item.useTimesLimit}</td>
                <td>${item.effectiveDate}</td>
                <td>${item.expiriedDate}</td>
            </tr>
            </c:forEach>
        <thead>
    </table>
    <%--<jsp:include page="../../admin/api_toExamine/addRouter.jsp"/>--%>

    <%--<div class="form-group">--%>
        <%--<label for="lesseeId" class="col-sm-2 control-label">租户</label>--%>
        <%--<div class="col-md-7 col-sm-7">--%>
            <%--<select id="lesseeId" name="lesseeId" class="form-control">--%>
                <%--<c:if test="${tenant.data.size()>0 }">--%>
                    <%--<c:forEach items="${tenant.data}" var="item">--%>
                        <%--<option value="${item.id}">${item.namespaceName}</option>--%>
                    <%--</c:forEach>--%>
                <%--</c:if>--%>
            <%--</select>--%>
        <%--</div>--%>
        <%--<span class="field-validation-valid help-block"></span>--%>
    <%--</div>--%>
    <div class="form-group">
        <label class="col-md-3 col-sm-3 control-label"for="auditOpinion">审核意见：</label>
        <textarea style="width: 300px" id="auditOpinion" name="auditOpinion" style="width: 100%;height: 30px;"></textarea>
        <span class="field-validation-valid help-block"></span>
    </div>

</form>
<jsp:include page="../../../common/admin/modal_content_post.jsp"></jsp:include>
<jsp:include page="../../../common/admin/modal_footer_pre.jsp"></jsp:include>
<td class="btn-table hidden-print">
    <button name="btnPass" id="btnPass" class="btn btn-sm btn-primary m-r-sm"><i class="fa fa-edit"></i>通过</button>
    <button name="btnNoPass" id="btnNoPass" class="btn btn-sm btn-primary m-r-sm"><i class="fa fa-edit"></i>驳回</button>
</td>
<jsp:include page="../../../common/admin/modal_footer_post.jsp"></jsp:include>
<script type="text/javascript">
    $("#btnPass").click(function() {
        $('#formEdit').append('<input type="hidden" name="aduitState" value="1">')
        $('#formEdit').ajaxSubmit(function (data) {
            $(".close").click();
            window.parent.search();
        });
    });
    $("#btnNoPass").click(function() {
        $('#formEdit').append('<input type="hidden" name="aduitState" value="2">')
        $('#formEdit').ajaxSubmit(function (data) {
            window.parent.search();
            $(".close").click();
        });
    });
</script>