| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <%@ taglib prefix="tms" uri="http://fzywtx.com/jsp/yw/tms" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=GBK">
- <title>我的报工</title>
- <link href="/shares/js/yw/master1/liger/skins/ynet/css/ligerui-all.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/ligerui.all.js" type="text/javascript"></script>
- <script src="/shares/jquery.progressbar/js/jquery.progressbar.js" type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
- <link rel="stylesheet" href="/shares/fullcalendar/jquery/themes/base/jquery.ui.all.css">
- <link rel="stylesheet" href="/shares/fullcalendar/fullcalendar/cupertino/theme.css">
- <link href="${ pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
- <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 }/liger/lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
- <link href='/shares/fullcalendar/fullcalendar/fullcalendar.css' rel='stylesheet' />
- <link href='/shares/fullcalendar/fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
- <script src='/shares/fullcalendar/jquery/jquery-1.8.0.min.js'></script>
- <script src='/shares/fullcalendar/jquery/jquery-ui-1.10.2.custom.min.js'></script>
- <script src='/shares/fullcalendar/fullcalendar/fullcalendar.min.js'></script>
- <script src='${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js'></script>
- <script src='${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDialog.js'></script>
- <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript">
- var calendar = null;
- var infoDialog = null;
- var waittingDialog = null;
- $(function (){
- loadCalendar();
- setTimeout('cssFunction()',1);
-
- });
- function showWaittingDialog(){
- waittingDialog = $.ligerDialog.waitting("正在提交中,请稍后……");
- }
- function showSuccessDialog_submit(){
- $.ligerDialog.success('提交成功!');
- }
- function emptyCalendar(){
- $('#calendar').empty();
- }
- function closeWaittingDialog(){
- waittingDialog.close();
- }
- function showSuccessDialog(){
- $.ligerDialog.success('删除成功!');
- }
- function loadCalendar(){
- $(document).ready(function() {
- calendar = $('#calendar').fullCalendar({
- header: {
- left: '',
- center: 'title prev today next ',
- right: ''
- },
- theme: true,
- aspectRatio:2,
- columnFormat:{//每种视图每列显示的时间格式
- month: 'ddd'
- },
- titleFormat:{//视图标题时间显示的格式
- month: 'yyyy-MM '
- },
- allDaySlot:true,
- allDayText:'今天的任务',
- monthNames: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
- monthNamesShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
- dayNames: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
- dayNamesShort: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
- today: ["今天"],
- firstDay: 1,
- buttonText: {
- today: '本月',
- month: '月',
- week: '周',
- day: '日',
- prev: '上一月',
- next: '下一月'
- },
- eventSources: [
- {
- url:'mtDiaryMgr.do?task=diary_date_view&user_id=${loginId}',
- color:'#0033FF'
- },
- {
- url:'mtTaskCenterMgr.do?task=diary_date_view&user_id=${loginId}',
- color:'#00BCE2'
- },{
- url:'mtDiaryMgr.do?task=listUntask&user_id=${loginId}',
- color:'#56B10E'
- }
- ],
- eventMouseover: function (calEvent, jsEvent, view) {
- $(this).attr('title', "工作内容:"+calEvent.diary_name );
-
- },
- eventClick: function (event, jsEvent, view ) {
- if (event.unproject == "unproject"){
- $.ligerDialog.warn('修改非项目任务请前往任务管理修改');
- } else if (event.project == "project"){
- $.ligerDialog.warn('修改项目任务请前往任务管理修改!');
- } else {
- getTodayWorkTime($.fullCalendar.formatDate(event.start,"yyyy-MM-dd"));
- infoDialog = $.ligerDialog.open({url : 'mtDiaryMgr.do?task=unTaskDiary&type=edit&logdate=' + $.fullCalendar.formatDate(event.start,"yyyy-MM-dd")
- +"&today_worktime=" + today_worktime + "&time="+ new Date().getTime()
- +"&task_id=" + event.untask_universalid + "&untask_type="+ event.untask_type + "&untask_log_detail="+ encodeURI(encodeURI(event.untask_log_detail))
- +"&untask_remark=" + encodeURI(encodeURI(event.untask_remark)) + "&untask_worktime="+ event.untask_worktime,
- height: 430,width:700, title: '修改任务报工(非任务) ' });
- }
- },
- selectable: true,
- selectHelper: true,
- select: function(start, end, allDay, jsEvent, view) {
- var selecte_date = new Date(Date.parse($.fullCalendar.formatDate(start, "yyyy/MM/dd")));
- if (selecte_date > new Date()){
- $.ligerDialog.warn('报工时间不能早于今天!');
- return;
- }
- getTodayWorkTime($.fullCalendar.formatDate(start, "yyyy-MM-dd"));
- infoDialog = $.ligerDialog.open({url : 'mtDiaryMgr.do?task=unTaskDiary&logdate=' + $.fullCalendar.formatDate(start, "yyyy-MM-dd")
- +"&today_worktime=" + today_worktime + "&time="+ new Date().getTime(),
- height: 430,width:700, title: '新增任务报工(非任务) ' });
- }
- });
-
- });
- }
-
- function cssFunction(){
- $(".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>");
- $(".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>");
- $(".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>");
- }
-
- function getTodayWorkTime (date_time){
- $.ajax({
- type:"POST",
- url:"mtDiaryMgr.do?task=getTodayWorkTime&time=" + new Date().getTime(),
- data : {"date_time":date_time},
- cache:false,
- async:false,
- dataType:"text",
- success:function(data){
- today_worktime = data;
- },
- error:showAjaxError
- });
- }
- </script>
- </head>
- <body>
- <div class="tc_b">
- <div id="left" style="float:left;width:100%;">
- <div class="tc_r">
- <div class="tr_con b5 f4">
- <div class="fl f4">
- <img src="/shares/images/master1/wdrw_ico.png" width="25" height="31" /> 我的报工
- </div>
-
- </div>
- <div class="tr_right_bg" id="calendar" style="position:relative;height:440px;overflow-y:auto;">
-
- </div>
- </div>
- </div>
- <%@ include file="/yw/master1_pm/task/diary/left_diary.jsp"%>
- </div>
- </body>
- </html>
|