| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292 |
- <%@ page language="java" contentType="text/html;charset=GBK"
- pageEncoding="GBK"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <!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="${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 type="text/javascript" src="/shares/js/jquery-1.3.2.min.js"></script>
- <script type="text/javascript" src="/shares/js/constant.js"></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/ligerDialog.js" type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/file.js"></script>
- <style type="text/css">
- .file-style input[type='file'] {
- width:385px ;
- height:24px;
- line-height:22px;
- vertical-align: bottom;
- background-color: #fff;
- border: 1px solid #cccccc;
- margin-top: 2px;
- margin-bottom: 2px;
- }
- </style>
- <script type="text/javascript">
- $(function () {
- });
- function refresh(type,userId){
- //alert(type + "==" + userId);
- if(type == "1"){
- if(userId != null && userId != ""){
- window.parent.window.$('#calendar').empty();
- window.parent.window.loadSelect(userId,"text");
- window.parent.dialog3.hidden();
- } else {
- window.parent.window.grid.loadData();
- /* window.parent.window.emptyCalendar();
- window.parent.window.loadCalendar("${session.loginID}");; */
- window.parent.window.calendar.fullCalendar('refetchEvents');
- window.parent.window.closeWaittingDialog();
- window.parent.window.infoDialog.close();
- }
- }
- }
- function deleteWorkLog(){
- var universalid = $("#universalid").val();
- var taskId = $("#taskId").val();
- if(confirm("您确定要删除该任务日志吗?")){
- window.parent.infoDialog.hidden();
- window.parent.window.showWaittingDialog();
- $.ajax({
- type: "POST", //使用post方法访问后台
- url: "mtTaskCenterMgr.do?task=del&universalid="+universalid + "&taskId="+taskId, //要访问的后台地址
- success: function (data) {
- window.parent.window.showSuccessDialog();
- window.parent.window.grid.loadData();
- /* window.parent.window.emptyCalendar();
- window.parent.window.loadCalendar("${session.loginID}");; */
- window.parent.window.calendar.fullCalendar('refetchEvents');
- window.parent.window.closeWaittingDialog();
- window.parent.window.infoDialog.close();
- }
- });
- }
- }
- function checkForm(){
- $("#task_isfinished_").val($("#task_isfinished").val());
- $("#worktime_msg").empty();
- $("#cost_msg").empty();
- $("#remark_msg").empty();
- /* $("#progress_msg").empty(); */
- var rs = $.validate({
- name : "worktime",
- model : [ {
- type : "require",
- msg : "工时不能为空!"
- },{
- type : "isNumber",
- msg : "请输入数字!"
- } ]
- });
- /* rs = $.validate({
- name : "progress",
- model : [ {
- type : "require",
- msg : "请填写进度!"
- },{
- type : "isNumber",
- msg : "请输入数字!"
- } ]
- }) && rs; */
- rs = $.validate({
- name : "logdtaile",
- model : [ {
- type : "len",
- min:0,
- max:300,
- msg : "详细描述300个字!"
- },{
- type : "require",
- msg : "请填写详细描述!"
- } ]
- }) && rs;
- rs = $.validate({
- name : "remark",
- model : [ {
- type : "len",
- min:0,
- max:200,
- msg : "备注200个字!"
- } ]
- }) && rs;
- rs = $.validate({
- name : "cost",
- model : [ {
- type : "isNumber",
- msg : "请输入数字!"
- } ]
- }) && rs;
-
- if (rs) {
- var pattern =/^[0-9]+([.]\d{1,2})?$/;
- if(!pattern.test($("#cost").val()) && $("#cost").val().replace(/(^\s*)|(\s*$)/g, "") != ""){
- $("#cost_msg").append("<font color='red'>最多保留两位小数</font>");
- document.all.cost.focus();
- return;
- }
-
- if ($("#cost").val().replace(/(^\s*)|(\s*$)/g, "") > 0 &&
- $("#remark").val().replace(/(^\s*)|(\s*$)/g, "") == "") {
- $("#remark_msg").append("<font color='red'>请填写费用说明!</font>");
- document.all.remark.focus();
- return false;
- }
-
- var temp = 100 - parseInt($("#progress_count").val()) + parseInt($("#progress_").val());
- if ($("#worktime").val() > 24){
- $("#worktime_msg").append("<font color=\"red\"> 工时不能大于24小时!</font>");
- document.all.worktime.focus();
- return false;
- } else if ($("#worktime").val() < 0.5){
- $("#worktime_msg").append("<font color=\"red\"> 工时不能小于0.5小时!</font>");
- document.all.worktime.focus();
- return false;
- }else if ((24 - ($("#today_worktime").val() - $("#worktime_").val())) < $("#worktime").val()){
- alert("一天的总工时不能超过24个小时!");
- return false;
- } else {
- var t = 7.5 - ($("#today_worktime").val() - $("#worktime_").val());
- if ($("#worktime").val() > t){
- if (!confirm("您本日的报工已超过7.5个小时,您确定要提交吗?")){
- return false;
- }
- }
- var sfz = document.getElementsByName("task_affix_id_edit");
- var sfzEvalue = "";
- for(var i=0;i<sfz.length;i++){
- if(""!=sfz[i].value){
- sfzEvalue=sfzEvalue + sfz[i].value +",";
- }
- }
- $("#log_affix").val(sfzEvalue);
- window.parent.infoDialog.hidden();
- window.parent.window.showWaittingDialog();
- return true;
- }
- } else {
- return false;
- }
-
-
- }
- </script>
- </head>
- <body onload="refresh('${type}', '${userId}');">
- <form action="mtTaskCenterMgr.do" method="post" onsubmit="return checkForm();" >
- <div id="title" class="form-button">
- <input type="submit" id="defineLog" class="l-button" value="确定"/>
- <input type="button" id="deleteLog" class="l-button" value="删除" onclick="deleteWorkLog();" />
- <input type="hidden" id="today_worktime" name="today_worktime" value="${requestScope.workLog.today_worktime }"/>
- <input type="hidden" id="worktime_" name="worktime_" value="${requestScope.workLog.worktime }"/>
- <input type="hidden" id="progress_" name="progress_" value="${requestScope.workLog.progress }"/>
- <input type="hidden" id="progress_count" name="progress_count" value="${requestScope.workLog.progress_count }"/>
- </div>
- <div >
- <div class="container-layout">
- <div class="forum-container">
-
- <center>
- <table class="l-table-edit line" >
- <tr>
- <th colspan="2">修改任务日志</th>
- </tr>
- <tr height="25" align="left">
- <td width="30%" ><b>日期<FONT COLOR="red">*</FONT>:</b></td>
- <td align="left" height="30">
- ${requestScope.workLog.logdate }
- <input type="hidden" id="dateTime" name="dateTime" value="${requestScope.workLog.logdate }">
- </td>
- </tr>
- <tr height="25" align="left">
- <td width="30%" ><b>任务名称<FONT COLOR="red">*</FONT>:</b></td>
- <td align="left" height="30">
- ${requestScope.workLog.tasktitle }
- <font color="red">(已完成:${requestScope.workLog.progress_count }%)</font>
- <input type="hidden" id="tasktitle" name="tasktitle" value="${requestScope.workLog.tasktitle }">
- </td>
- </tr>
- <tr height="25" align="left">
- <td width="30%" ><b>工时<FONT COLOR="red">*</FONT>:</b></td>
- <td align="left" height="30">
- <input type="text" autocomplete="off" style="width:40px;height:15px;" name="worktime" id="worktime" value="${requestScope.workLog.worktime }"> h
- <font color="blue">[本日已报工${requestScope.workLog.today_worktime }个小时]</font>
- <div id="worktime_msg" style="display: inline;"></div>
- </td>
- </tr>
- <tr height="25" align="left">
- <td width="30%" ><b>进度<FONT COLOR="red">*</FONT>:</b></td>
- <td align="left" height="30">
- <select id="task_isfinished">
- <option value="0" selected="selected">进行中</option>
- <option value="1">已完成</option>
- </select>
- </td>
- </tr>
- <%-- <tr height="25" align="left">
- <td width="30%" ><b>进度<FONT COLOR="red">*</FONT>:</b></td>
- <td align="left" height="30">
- <input type="text" style="width:40px;height:15px;" name="progress" id="progress" value="${requestScope.workLog.progress }"> %
- <div id="progress_msg" style="display: inline;"></div>
- </td>
- </tr> --%>
- <tr height="25" align="left">
- <td width="30%" ><b>详细描述<FONT COLOR="red">*</FONT>:</b></td>
- <td align="left" height="30">
- <textarea rows="5" cols="50" name="logdtaile" id="logdtaile">${requestScope.workLog.logdtaile }</textarea>
- </td>
- </tr>
-
- <tr height="25" align="left">
- <td width="30%" ><b>费用总计:</b></td>
- <td align="left" height="30">
- <input type="text" autocomplete="off" style="width:40px;height:15px;" name="cost" id="cost" value="${requestScope.workLog.cost }"> 元
- <div id="cost_msg" style="display: inline;"></div>
- </td>
- </tr>
-
- <tr height="25" align="left">
- <td width="30%" ><b>费用说明:</b></td>
- <td align="left" height="30">
- <textarea rows="5" cols="50" name="remark" id="remark">${requestScope.workLog.remark }</textarea>
- <div id="remark_msg" style="display: inline;"></div>
- </td>
- </tr>
- <tr>
- <td width="30%" ><b>附件:</b></td>
- <td>
- <jsp:include page="/include/file.jsp">
- <jsp:param name="fieldName" value="task_affix_id_edit" />
- <jsp:param name="folder" value="pm/bug" />
- <jsp:param name="documentId" value="${requestScope.workLog.log_affix }" />
- <jsp:param name="size" value="15" />
- <jsp:param name="isView" value="1" />
- <jsp:param name="isDelFile" value="1" />
- <jsp:param name="definedCss" value="file-style" />
- </jsp:include>
- <input type="hidden" id="log_affix" name="log_affix" />
- </td>
- </tr>
- </table>
- <input type="hidden" id="task" name="task" value="ceditWorkLog">
- <input type="hidden" id="task_isfinished_" name="task_isfinished_">
- <input type="hidden" id="taskId" name="taskId" value="${requestScope.workLog.taskid }"> <!-- 任务id -->
- <input type="hidden" id="universalid" name="universalid" value="${requestScope.workLog.id }"> <!-- 任务日志id -->
- </center>
- </div>
- </div>
- </div>
- </form>
- <%@ include file="/include/message.jsp"%>
- </body>
- </html>
|