mydiary_list.jsp 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  3. <%@ taglib prefix="tms" uri="http://fzywtx.com/jsp/yw/tms" %>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  8. <title>我的报工</title>
  9. <link href="/shares/js/yw/master1/liger/skins/ynet/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  10. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  11. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  12. <script src="/shares/jquery.progressbar/js/jquery.progressbar.js" type="text/javascript"></script>
  13. <script type="text/javascript" src="/shares/js/common.js"></script>
  14. <script type="text/javascript" src="/shares/js/constant.js"></script>
  15. <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
  16. <link rel="stylesheet" href="/shares/fullcalendar/jquery/themes/base/jquery.ui.all.css">
  17. <link rel="stylesheet" href="/shares/fullcalendar/fullcalendar/cupertino/theme.css">
  18. <link href="${ pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  19. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  20. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
  21. <link href='/shares/fullcalendar/fullcalendar/fullcalendar.css' rel='stylesheet' />
  22. <link href='/shares/fullcalendar/fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
  23. <script src='/shares/fullcalendar/jquery/jquery-1.8.0.min.js'></script>
  24. <script src='/shares/fullcalendar/jquery/jquery-ui-1.10.2.custom.min.js'></script>
  25. <script src='/shares/fullcalendar/fullcalendar/fullcalendar.min.js'></script>
  26. <script src='${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js'></script>
  27. <script src='${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDialog.js'></script>
  28. <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
  29. <script type="text/javascript">
  30. var calendar = null;
  31. var infoDialog = null;
  32. var waittingDialog = null;
  33. $(function (){
  34. loadCalendar();
  35. setTimeout('cssFunction()',1);
  36. });
  37. function showWaittingDialog(){
  38. waittingDialog = $.ligerDialog.waitting("正在提交中,请稍后……");
  39. }
  40. function showSuccessDialog_submit(){
  41. $.ligerDialog.success('提交成功!');
  42. }
  43. function emptyCalendar(){
  44. $('#calendar').empty();
  45. }
  46. function closeWaittingDialog(){
  47. waittingDialog.close();
  48. }
  49. function showSuccessDialog(){
  50. $.ligerDialog.success('删除成功!');
  51. }
  52. function loadCalendar(){
  53. $(document).ready(function() {
  54. calendar = $('#calendar').fullCalendar({
  55. header: {
  56. left: '',
  57. center: 'title prev today next ',
  58. right: ''
  59. },
  60. theme: true,
  61. aspectRatio:2,
  62. columnFormat:{//每种视图每列显示的时间格式
  63. month: 'ddd'
  64. },
  65. titleFormat:{//视图标题时间显示的格式
  66. month: 'yyyy-MM '
  67. },
  68. allDaySlot:true,
  69. allDayText:'今天的任务',
  70. monthNames: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
  71. monthNamesShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
  72. dayNames: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
  73. dayNamesShort: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
  74. today: ["今天"],
  75. firstDay: 1,
  76. buttonText: {
  77. today: '本月',
  78. month: '月',
  79. week: '周',
  80. day: '日',
  81. prev: '上一月',
  82. next: '下一月'
  83. },
  84. eventSources: [
  85. {
  86. url:'mtDiaryMgr.do?task=diary_date_view&user_id=${loginId}',
  87. color:'#0033FF'
  88. },
  89. {
  90. url:'mtTaskCenterMgr.do?task=diary_date_view&user_id=${loginId}',
  91. color:'#00BCE2'
  92. },{
  93. url:'mtDiaryMgr.do?task=listUntask&user_id=${loginId}',
  94. color:'#56B10E'
  95. }
  96. ],
  97. eventMouseover: function (calEvent, jsEvent, view) {
  98. $(this).attr('title', "工作内容:"+calEvent.diary_name );
  99. },
  100. eventClick: function (event, jsEvent, view ) {
  101. if (event.unproject == "unproject"){
  102. $.ligerDialog.warn('修改非项目任务请前往任务管理修改');
  103. } else if (event.project == "project"){
  104. $.ligerDialog.warn('修改项目任务请前往任务管理修改!');
  105. } else {
  106. getTodayWorkTime($.fullCalendar.formatDate(event.start,"yyyy-MM-dd"));
  107. infoDialog = $.ligerDialog.open({url : 'mtDiaryMgr.do?task=unTaskDiary&type=edit&logdate=' + $.fullCalendar.formatDate(event.start,"yyyy-MM-dd")
  108. +"&today_worktime=" + today_worktime + "&time="+ new Date().getTime()
  109. +"&task_id=" + event.untask_universalid + "&untask_type="+ event.untask_type + "&untask_log_detail="+ encodeURI(encodeURI(event.untask_log_detail))
  110. +"&untask_remark=" + encodeURI(encodeURI(event.untask_remark)) + "&untask_worktime="+ event.untask_worktime,
  111. height: 430,width:700, title: '修改任务报工(非任务) ' });
  112. }
  113. },
  114. selectable: true,
  115. selectHelper: true,
  116. select: function(start, end, allDay, jsEvent, view) {
  117. var selecte_date = new Date(Date.parse($.fullCalendar.formatDate(start, "yyyy/MM/dd")));
  118. if (selecte_date > new Date()){
  119. $.ligerDialog.warn('报工时间不能早于今天!');
  120. return;
  121. }
  122. getTodayWorkTime($.fullCalendar.formatDate(start, "yyyy-MM-dd"));
  123. infoDialog = $.ligerDialog.open({url : 'mtDiaryMgr.do?task=unTaskDiary&logdate=' + $.fullCalendar.formatDate(start, "yyyy-MM-dd")
  124. +"&today_worktime=" + today_worktime + "&time="+ new Date().getTime(),
  125. height: 430,width:700, title: '新增任务报工(非任务) ' });
  126. }
  127. });
  128. });
  129. }
  130. function cssFunction(){
  131. $(".fc-header-right").append("<div style='float:left;background-color: #0033FF;width: 99px;height: 10px;margin-left:5px;margin-top:5px;margin-right:5px'></div><div style='float:left; margin:5px;'>项目任务</div>");
  132. $(".fc-header-right").append("<div style='float:left;background-color: #00BCE2;width: 99px;height: 10px;margin:5px'></div><div style='float:left; margin:5px;'>非项目任务</div>");
  133. $(".fc-header-right").append("<div style='float:left;background-color: #56B10E;width: 99px;height: 10px;margin:5px'></div><div style='float:left; margin:5px;'>非任务</div>");
  134. }
  135. function getTodayWorkTime (date_time){
  136. $.ajax({
  137. type:"POST",
  138. url:"mtDiaryMgr.do?task=getTodayWorkTime&time=" + new Date().getTime(),
  139. data : {"date_time":date_time},
  140. cache:false,
  141. async:false,
  142. dataType:"text",
  143. success:function(data){
  144. today_worktime = data;
  145. },
  146. error:showAjaxError
  147. });
  148. }
  149. </script>
  150. </head>
  151. <body>
  152. <div class="tc_b">
  153. <div id="left" style="float:left;width:100%;">
  154. <div class="tc_r">
  155. <div class="tr_con b5 f4">
  156. <div class="fl f4">
  157. &nbsp;<img src="/shares/images/master1/wdrw_ico.png" width="25" height="31" />&nbsp;我的报工
  158. </div>
  159. </div>
  160. <div class="tr_right_bg" id="calendar" style="position:relative;height:440px;overflow-y:auto;">
  161. </div>
  162. </div>
  163. </div>
  164. <%@ include file="/yw/master1_pm/task/diary/left_diary.jsp"%>
  165. </div>
  166. </body>
  167. </html>