<%@ 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" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    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/edit.action" method="post" role="form">
    <input type="hidden" id="requirement_id" name="id" value="${info.rqrmntId}"/>
    <div class="form-group">
        <label for="requirementName">需求名称：</label>
        <label id="requirementName">${info.rqrmntName} </label>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="requirementSummary">需求摘要：</label>
        <label id="requirementSummary">${info.rqrmntSummary} </label>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="dutyAmount">任务金额：</label>
        <label id="dutyAmount">${info.money} </label>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="publishat">发布时间：</label>
        <label id="publishat"><fmt:formatDate  value="${info.createdAt}" pattern="yyyy-MM-dd"/></label>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="endat">截止时间：</label>
        <label id="endat"><fmt:formatDate  value="${info.deadline}" pattern="yyyy-MM-dd"/> </label>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="contactor">联系人：</label>
        <label id="contactor">${info.contact} </label>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="contactorphone">联系电话：</label>
        <label id="contactorphone">${info.phone} </label>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="categoryName">分类：</label>
        <label id="categoryName">${info.catelogName} </label>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="user">需求用户：</label>
        <label id="user">${info.publishByString} </label>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="email">邮箱：</label>
        <label id="email">${info.email} </label>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="requirmentState">需求状态：</label>
        <label id="requirmentState">${info.rqrmntState} </label>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="auditedBy">审核用户：</label>
        <label id="auditedBy">${admin} </label>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="auditedAt">审核时间：</label>
        <label id="auditedAt"> <fmt:formatDate value="${datetime}" pattern="yyyy-MM-dd"/> </label>
        <span class="field-validation-valid help-block"></span>
    </div>
    <div class="form-group">
        <label for="auditOpinion">审核意见：</label>
        <textarea 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">
    <input type="hidden" name="id" value="${item.rqrmntId}"/>
    <button name="btnPass" id="btnPass" class="btn btn-sm btn-primary m-r-sm"><i class="fa fa-edit"></i>通过</button>
    <button name="btnNotPass" id="btnNotPass" class="btn btn-sm btn-danger"><i class="fa fa-trash-o"></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="auditStatus" value="1">')
        $('#formEdit').ajaxSubmit(function (data) {
            $(".close").click();
            window.parent.showInfo($("#requirement_id").val())
        });
    });
    $("#btnNotPass").click(function() {
        $('#formEdit').append('<input type="hidden" name="auditStatus" value="2">')
        $('#formEdit').ajaxSubmit(function (data) {
            window.parent.search();
            $(".close").click();
        });
    });
</script>
</script>