<%@ 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();
    String resourcePath = basePath + "/resource";
%>
<!DOCTYPE html>
<html>
<head>
    <title>我的服务接单列表</title>
    <jsp:include page="../../common/head.jsp"></jsp:include>
</head>
<jsp:include page="../../common/body_header.jsp"></jsp:include>
<jsp:include page="../../common/user_center_header.jsp"></jsp:include>
<body>
<div id="aa" class="clearfix"></div>
<div class="user-mid2">
    <div class="xinxi0">
        <div class="user-mid0">
            <div class="if">
                <span class="xx0"  onclick="app()" id="app"><a href="<%=basePath%>/open/MyMicroappRequirement/list.action">我的服务需求</a></span>

                <div class="xx-line0"></div>
            </div>
            <div class="xx-main">
                <table >
                    <tr bgcolor="#f2f2f2" class="biaotou1">
                        <td class="td5">时间</td>
                        <td class="td3">接单人</td>
                        <td class="td6">电话</td>
                        <td class="td3">操作</td>
                    </tr>
                    <c:forEach items="${list}" var="item">
                        <tr>
                            <td><fmt:formatDate value="${item.createdAt}" pattern="yyyy-MM-dd"></fmt:formatDate></td>
                            <td>${item.userName}</td>
                            <td>${item.phone}</td>
                            <td style="display: none">${item.solution}</td>
                            <td class="td3"><a onclick="dd(this)" class="qxbm">查看方案</a></td>
                        </tr>
                    </c:forEach>

                </table>


            </div>



        </div>
    </div>
</div>



<div id="solutionDiv" class="fade" style="display: none;">
    <div class="window" >
        <div class="top00">
            <span class="p">资源使用需求</span>
            <img src="<%=resourcePath%>/images/icon_guanbi.png" alt="" class="guanbi" onclick="offlineReceive()">
        </div>
        <div class="form">
            <form id="receiveForm">

                <div class="application-font-0">
                    <span class="application-font-2">方案概述：</span>
                    <textarea name="solution" id="usage" readonly cols="46" rows="3" class="area2" placeholder="接单人暂时没有填写使用意向"></textarea>
                </div>

                <div class="clearfix"></div>
                <div class="queding0">
                    <span class="queding" onclick="offlineReceive()">取消</span>
                </div>
            </form>
        </div>
    </div>
</div>

<div class="clearfix"></div>
<jsp:include page="../../common/body_footer.jsp"></jsp:include>
</body>
<script>
    //弹出方案页面
    function offlineReceive(){
        $("#solutionDiv").hide();
    }
    function dd(obj) {
        var solution =  $(obj).parent().parent().children('td:eq(3)').text();
        $("#usage").text(solution);
        $("#solutionDiv").show();
    }
</script>
</html>