| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422 |
- <%@page import="org.apache.jasper.tagplugins.jstl.core.ForEach"%>
- <%@ page language="java" import="java.util.*,com.yw.tms.common.util.TmsDataDictionaryManager,com.yw.tms.report.model.TmsTaskWorkDiaryReport,com.yw.tms.report.model.TmsSaturationReport" contentType="text/html;charset=GBK"
- pageEncoding="GBK"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
- <%@ taglib prefix="tms" uri="http://fzywtx.com/jsp/yw/tms" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>施工工作饱和度统计</title>
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <link href="${pageContext.request.contextPath }/main.css" rel="stylesheet" type="text/css"/>
- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerTab.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
-
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/yw/tms/tms-common.js"></script>
- <script type="text/javascript" src="/shares/js/yw/tms/tmsProjectSaturation.js"></script>
- <script type="text/javascript">
- $(function() {
-
- $("#year").ligerComboBox({
- slide:false,
- width : 60
- });
- $("#month").ligerComboBox({
- slide:false,
- width : 40
- });
- $("#projId").ligerComboBox({
- slide:false,
- width : 148
- });
- $('#projId').change(function(){
- userTree();
- });
- firstUserTree();
- var height = $(window).height() - 233;
- $("#changecolor").css("height", height);
- $("#changecolor").css("overflow", "auto");
- senfe("changecolor","#f8fbfc","#e5f1f4","#ecfbd4","#bce774");
- });
- $(document).ready(function(){
- $(window).resize(function (){
- var height = $(window).height() - 233;
- $("#changecolor").css("height", height);
- $("#changecolor").css("overflow", "auto");
-
- });
- });
- </script>
- <style type="text/css">
- .l-text-wrapper{width: 100px;}
- .default_search li input[type='text']{height:28px; line-height:28px}
- .tdSix {border: #A3C0E8 1px solid;text-align:center;width: 2.9%;height: 24px;background-color: #F5F5F5;}
- .td{border: #A3C0E8 1px solid;text-align:center;width: 2.9%;height: 24px;background-color: #FFFFFF;}
- </style>
- <%
- String userAgent = request.getHeader("User-Agent");
- %>
- </head>
- <body >
- <div class="">
- <div class="default_search" style="margin-bottom: 0px;">
-
- <ul class="list_search" >
- <li class="title">选择施工:</li>
- <li class="text">
- <select style="width:150px;" name="projId" id="projId" >
-
- <c:forEach items="${requestScope.projList}" var="proj" >
- <option value="${proj.universalid }">${proj.proj_name }</option>
- </c:forEach>
- </select>
- </li>
- </ul>
-
- <ul class="list_search" style="width:600px;">
- <li class="title">选择月份:</li>
- <li class="text" style="width: 80px">
- <select id="year" name="year" style="">
- <option value="${currentYear-1}">${currentYear-1}</option>
- <option value="${currentYear}">${currentYear}</option>
- <option value="${currentYear+1}">${currentYear+1}</option>
- </select>
- </li>
- <li class="text" style="width: 60px">
- <select id="month" name="month" style="">
- <option value="1" >1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- <option value="5">5</option>
- <option value="6">6</option>
- <option value="7">7</option>
- <option value="8">8</option>
- <option value="9">9</option>
- <option value="10">10</option>
- <option value="11">11</option>
- <option value="12">12</option>
-
- </select>
- </li>
- </ul>
- <ul class="list_search" style="width:500px;">
- <li class="title">选择人员:</li>
- <li class="text" style="">
- <input type="text" id="userName" name="userName" style="width: 150px" readonly="readonly" />
- <input type="hidden" id="userId" name="userId" />
- </li>
- <li class="text" style="width: 90px;padding-left:10px;">
- <input type="button" value="请选择" class="l-button" id="userBtn" />
- </li>
- </ul>
- <ul style="width: 220px;">
- <li class="title" style="">
- <input type="button" class='l-button' name="search" onclick="serarch()" value="开始统计"/>
- </li>
- <li class="title" style="">
- <input type="button" class='l-button' name="search" onclick="openRemark('<%=TmsDataDictionaryManager.getValueByCode("DEFAULT_DAY_NORMAL_MAN_HOUR")%>')" value="统计说明"/>
- </li>
- </ul>
- </div>
- <%
- int monthDay = (Integer)request.getAttribute("monthDay");
- int monthDayDiWeek = (Integer)request.getAttribute("monthDayDiWeek");
- int count = (Integer)request.getAttribute("count");
- int dayInt = (Integer)request.getAttribute("dayInt");
-
- %>
-
- <div id="projectSaturationTab" >
- <div style="width:100%;overflow-y: scroll;overflow-x:hidden;">
- <%if(userAgent.indexOf("compatible; MSIE 7.0;")>0){ %>
- <table style="width: 98%;" >
- <%}else{ %>
- <table style="width: 100%;" >
- <%} %>
-
- <tr>
- <td style="width: 8%;border: #A3C0E8 1px solid; text-align: center;" rowspan="3">平均工时</td>
- <td style="width: 92%;border: #A3C0E8 1px solid;height: 24px;padding-left: 8px;" colspan="<%=monthDay%>">
- <%if(dayInt == -1){ %>
- ${yearInt}年${monthInt}月份(无数据统计)
- <% }else{%>
- ${yearInt}年${monthInt}月份(<span style="color:#2A00E1; ">统计数据截止到本月<%=dayInt %>日</span>)
- <%} %>
- </td>
- </tr>
- <tr>
- <% for(int i = 1;i<=monthDay;i++){
- if((i+(monthDayDiWeek-1))%7 == 0 || ((i-1)+(monthDayDiWeek-1))%7== 0){
- %>
- <td class="tdSix"><%=i %></td>
- <% }else{ %>
- <td class="td"><%=i %></td>
- <% }
- }
- %>
- </tr>
- <tr>
- <%
- LinkedHashMap daySumtask = (LinkedHashMap)request.getAttribute("daySumtask");
- for(int i = 1;i<=monthDay;i++){
- if(daySumtask == null){
- if((i+(monthDayDiWeek-1))%7 == 0 || ((i-1)+(monthDayDiWeek-1))%7== 0){
- %>
- <td class="tdSix">0</td>
- <%}else{ %>
- <td class="td">0</td>
- <%}
- }else{
- String iString = "";
- if( (i) < 10){
- iString = "0"+(i);
- }else{
- iString = ""+(i);
- }
- TmsTaskWorkDiaryReport tmsWorkDiary1 = (TmsTaskWorkDiaryReport)daySumtask.get(iString);
- if(tmsWorkDiary1 == null){
- if((i+(monthDayDiWeek-1))%7 == 0 || ((i-1)+(monthDayDiWeek-1))%7== 0){
- %>
- <td class="tdSix" >0</td>
- <%}else{ %>
- <td class="td" >0</td>
- <%}
- }else{
- float avgS = tmsWorkDiary1.getManHour()/count;
- float avg = (float)(Math.round(avgS*10))/10;
- if((i+(monthDayDiWeek-1))%7 == 0 || ((i-1)+(monthDayDiWeek-1))%7== 0){
- %>
- <td class="tdSix"><%=avg %></td>
- <%}else{ %>
- <td class="td"><%=avg %></td>
- <%}
- }
- }
- } %>
- </tr>
- <tr>
- <td style="border: #A3C0E8 1px solid;text-align: center;" rowspan="2">员工列表<br/>(饱和度)</td>
- <td style="border: #A3C0E8 1px solid;height: 24px;padding-left: 8px;" colspan="<%=monthDay%>">${yearInt}年${monthInt}月份</td>
- </tr>
- <tr>
- <% for(int i = 1;i<=monthDay;i++){
- if((i+(monthDayDiWeek-1))%7 == 0 || ((i-1)+(monthDayDiWeek-1))%7== 0){
- %>
- <td class="tdSix"><%=i %></td>
- <% }else{ %>
- <td class="td"><%=i %></td>
- <% }
- %>
- <% } %>
- </tr>
- </table>
- </div>
- <div style="width:100%; overflow-y: scroll; overflow-x:hidden">
- <%if(userAgent.indexOf("compatible; MSIE 7.0;")>0){ %>
- <table style="width: 98%;" id="changecolor">
- <%}else{ %>
- <table style="width: 100%;" id="changecolor">
- <%} %>
-
- <% List<TmsSaturationReport> list = (List)request.getAttribute("list");
- for(TmsSaturationReport projectUser : list ){
- %>
- <tr>
- <td style="width: 8%;border: #A3C0E8 1px solid;border-top-width:0px;text-align:center;height: 24px;"><%=projectUser.getUserName() %>(<font style="color: <%=projectUser.getColor()%>;"><%=projectUser.getSumDec() %>%</font>)</td>
- <% for(int j=1; j<=monthDay;j++){
- String jString = "";
- if( j < 10){
- jString = "0"+j;
- }else{
- jString = ""+j;
- }
- if((j+(monthDayDiWeek-1))%7 == 0 || ((j-1)+(monthDayDiWeek-1))%7== 0){
- %>
- <td class="tdSix" style="border-top-width:0px;" title="${yearInt}-${monthInt}-<%=jString%>">
- <%}else{ %>
- <td class="td" style="border-top-width:0px;" title="${yearInt}-${monthInt}-<%=jString%>">
- <%}
-
- if(projectUser.getWorkDiaryDayMap().get(""+projectUser.getUserId()+jString) == null){
- %><span class="info" style="" >
-
- </span><%
- }else{
- TmsTaskWorkDiaryReport tmsWorkDiary = (TmsTaskWorkDiaryReport)projectUser.getWorkDiaryDayMap().get(""+projectUser.getUserId()+jString);
- %><%-- <span style="" onclick="f_open(<%=""+projectUser.getUserId()+jString%>,'<%=projectUser.getUserName()%>','<%=jString%>');"><%=tmsWorkDiary.getManHour() %></span>--%>
-
- <span style="cursor: pointer;color: <%=tmsWorkDiary.getColor()%>" onclick="getWorkDiaryList(<%=""+projectUser.getUserId()%>,'<%=jString%>','<%=projectUser.getUserName()%>','${yearInt}','${monthInt}');"><%=tmsWorkDiary.getManHour() %></span>
-
- <%} %>
- </td>
- <%} %>
- </tr>
- <%} %>
- </table>
- </div>
- <div class="l-panel-bar">
- <div class="l-panel-bbar-inner">
- <div class="l-bar-group l-bar-message">
- <c:if test="${(curPage)*pageSize < count }">
- <span class="l-bar-text">显示从${(curPage-1)*pageSize+1 }到${(curPage)*pageSize },总 ${count} 条 。每页显示:${pageSize}</span>
- </c:if>
- <c:if test="${(curPage)*pageSize >= count }">
- <span class="l-bar-text">显示从${(curPage-1)*pageSize+1 }到${count},总 ${count} 条 。每页显示:${pageSize}</span>
- </c:if>
- </div>
- <div class="l-bar-group l-bar-selectpagesize">
- <select name="rp" id="rp">
- <option value="10">10</option>
- <option value="20">20</option>
- <option value="30">30</option>
- <option value="40">40</option>
- <option value="50">50</option>
- </select>
- </div>
- <div class="l-bar-separator"></div>
- <div class="l-bar-group">
- <c:if test="${curPage eq '1' }">
- <div class="l-bar-button l-bar-btnfirst" >
- <span class="l-disabled" ></span>
- </div>
- <div class="l-bar-button l-bar-btnprev" >
- <span class="l-disabled"></span>
- </div>
- </c:if>
- <c:if test="${curPage ne '1' }">
- <div class="l-bar-button l-bar-btnfirst" onclick='javascript:go(1);return false;'>
- <span class="" onclick='javascript:go(1);return false;'></span>
- </div>
- <div class="l-bar-button l-bar-btnprev" onclick='javascript:go(${curPage-1});return false;'>
- <span class="" onclick='javascript:go(${curPage-1});return false;'></span>
- </div>
- </c:if>
- </div>
- <div class="l-bar-separator"></div>
- <div class="l-bar-group">
- <span class="pcontrol"><input name="pagenav" id="pagenav" style="width: 20px;" maxLength="3" value="${curPage}" size="4" type="text" onkeypress="javaScript:if(event.keyCode==13){go(this.value);}"> / <span>${maxPage}</span></span>
- </div>
- <div class="l-bar-separator"></div>
- <div class="l-bar-group">
- <c:if test="${curPage eq maxPage }">
- <div class="l-bar-button l-bar-btnnext" >
- <span class="l-disabled" ></span>
- </div>
- <div class="l-bar-button l-bar-btnlast">
- <span class="l-disabled" ></span>
- </div>
- </c:if>
- <c:if test="${curPage ne maxPage }">
- <div class="l-bar-button l-bar-btnnext" onclick='javascript:go(${curPage+1});return false;'>
- <span class="" onclick='javascript:go(${curPage+1});return false;'></span>
- </div>
- <div class="l-bar-button l-bar-btnlast" onclick='javascript:go(${maxPage});return false;'>
- <span class="" onclick='javascript:go(${maxPage});return false;'></span>
- </div>
- </c:if>
- </div>
- <div class="l-bar-separator"></div>
- <div class="l-bar-group">
- <div class="l-bar-button l-bar-btnload" onclick="javascript:go(document.getElementById('pagenav').value);return false;"></div>
- </div>
- <div class="l-bar-separator"></div>
- <div class="l-clear"></div>
- </div>
- </div>
- <script language="JavaScript">
- var docUrl = document.location.href;
- var maxPage = ${maxPage};//#maxpage#;
- var curPage = ${curPage};//#currentpage#;
- var end = docUrl.lastIndexOf("/");
- var u=docUrl.substring(0,end);
- if(isNaN(curPage)){
- curPage = 1;
- }
- function go(page){
- try{
- var projId = $("#projId").val();
- var year = $("#year").val();
- var month = $("#month").val();
- var userId = $("#userId").val();
- var userName = $("#userName").val();
- var baseUrl = u+'/TmsSaturationAction.do?task=tmsProjectSaturation&projId='+projId+'&year='+year+'&month='+month+'&userId='+userId+'&userName='+userName;
- var url = '';
- if (page >0){
- if(page >= maxPage){
- url = baseUrl+'&curPage='+(maxPage)+'&pageSize='+$("#rp").val();
- document.location.href=url;
- return true;
- }else{
- url = baseUrl+'&curPage='+page+'&pageSize='+$("#rp").val();
- document.location.href=url;
- return true;
- }
- }else{
- return false;
- }
- }catch(e){
- alert("Sorry:"+e);
- }
- return false;
- }
- </script>
-
- </div>
- <%@ include file="/include/message.jsp"%>
-
- </div>
- </body>
- <script type="text/javascript">
- <!--
- $("#year").val('${yearInt}');
- $("#month").val('${monthInt}');
- $("#projId").val('${projId}');
- $("#rp").val('${pageSize}');
- $("#userName").val('${userName}');
- $("#userId").val('${userId}');
- //-->
- function serarch(){
- var projId = $("#projId").val();
- if(!projId){
- $.ligerDialog.warn("请选择施工!");
- return;
- }
- go(1);
- }
- function firstUserTree(){
- var projId = document.getElementById("projId").value;
- if(!projId){
-
- return;
- }
- loadTypeTree("userBtn",{type:"user",backId:"userId",tab:"7",backName:"userName",tabParam:[{tab:"7",root:projId}]});
- }
- function userTree(){
- var projId = document.getElementById("projId").value;
- if(!projId){
- $.ligerDialog.warn("请选择施工!");
- return;
- }
- loadTypeTree("userBtn",{type:"user",backId:"userId",tab:"7",backName:"userName",tabParam:[{tab:"7",root:projId}]});
- }
- </script>
- </html>
|