checkTask.jsp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. <%@ page language="java" contentType="text/html;charset=GBK"
  2. pageEncoding="GBK"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <%@ taglib prefix="tms" uri="http://fzywtx.com/jsp/yw/tms" %>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  6. <html>
  7. <head>
  8. <link rel="stylesheet" href="/shares/fullcalendar/jquery/themes/base/jquery.ui.all.css">
  9. <link rel="stylesheet" href="/shares/fullcalendar/fullcalendar/cupertino/theme.css">
  10. <link href="${ pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  11. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  12. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
  13. <link href='/shares/fullcalendar/fullcalendar/fullcalendar.css' rel='stylesheet' />
  14. <link href='/shares/fullcalendar/fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
  15. <script src='/shares/js/jquery-1.3.2.min.js'></script>
  16. <script src='/shares/fullcalendar/fullcalendar/fullcalendar.min.js'></script>
  17. <script src='${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js'></script>
  18. <script src='${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDialog.js'></script>
  19. <script src='${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js'></script>
  20. <script type="text/javascript" src="/shares/js/common.js"></script>
  21. <script src="/shares/jquery.progressbar/js/jquery.progressbar.js" type="text/javascript"></script>
  22. <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
  23. <style type="text/css">
  24. .workDiaryTable{margin: 5px auto}
  25. .workDiaryTable tr{height: 25px; padding-bottom: 2px; margin: 10px auto}
  26. .workDiaryTable .left-text {width: 80px; font-weight: bold;}
  27. .workDiaryTable .short-input {width: 40px;height:18px; line-height: 18px;border: 1px solid #cccccc}
  28. .workdiary-file-style input[type='file'] {width:200px ;height:22px;}
  29. .workdiary-file-style{width: 250px; margin-bottom: 8px;}
  30. </style>
  31. <script type="text/javascript">
  32. var infoDialog = null;
  33. var treatTaskDialog = null;
  34. $(function (){
  35. $("#procFinishPer").progressBar(this.innerHTML,{width:100,increment:5,speed:1});
  36. loadCalendar();
  37. $("#maingrid").ligerGrid({
  38. columns: [
  39. { display: '办理时间', name: 'submitdate', width: 200},
  40. { display: '报工时间(报哪天的工)', name: 'start', width: 150},
  41. { display: '报工内容', name: 'logdtaile', width: 910}
  42. ],
  43. pageSize:10,
  44. url:"mtTaskCenterMgr.do?task=listWorkLog&taskId=${taskInfo.taskid }"+"&time=" + new Date().getTime(),
  45. pageParmName: 'p', //页索引参数名,(提交给服务器)
  46. pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
  47. width: '99.8%',
  48. height: '300px'
  49. });
  50. });
  51. function loadTaskInfo(taskId){
  52. $.ajax({
  53. type:"POST",
  54. url:"mtTaskCenterMgr.do?task=loadTaskInfo&taskId=" + taskId + "&time=" + new Date().getTime(),
  55. dataType:"json",
  56. success:function(data){
  57. $("#tasktitle").html(data[0].tasktitle);
  58. $("#procFinishPer").html(data[0].progress);
  59. $("#createstaffer").html(data[0].createstaffer);
  60. $("#receiveid").html(data[0].receiveid);
  61. $("#createDate").html(data[0].createDate);
  62. $("#planjobtime").html(data[0].planjobtime);
  63. $("#worktime_count").html(data[0].worktime_count);
  64. $("#startDate").html(data[0].startDate);
  65. $("#prac_start_date").html(data[0].prac_start_date);
  66. $("#endDate").html(data[0].endDate);
  67. $("#prac_end_date").html(data[0].prac_end_date);
  68. }
  69. });
  70. }
  71. function loadCalendar(){
  72. $(document).ready(function() {
  73. var calendar = $('#calendar').fullCalendar({
  74. header: {
  75. left: '',
  76. center: 'prev, title, next, today',
  77. right: ''
  78. },
  79. theme: true,
  80. timeFormat:{agenda: 'HH:mm { - HH:mm }','': 'HH:mm { - HH:mm }' },
  81. columnFormat:{//每种视图每列显示的时间格式
  82. month: 'ddd',
  83. week: 'M/d(ddd)',
  84. day: 'M/d(ddd)'
  85. },
  86. titleFormat:{//视图标题时间显示的格式
  87. month: 'yyyy年 MMMM ',
  88. week: "yyyy年 MMM d{ '&#8212;'[ MMM] d日 }",
  89. day: 'dddd, MMM d, yyyy'
  90. },
  91. axisFormat:'HH:mm',//日视图左侧时间显示的格式
  92. allDaySlot:false,
  93. allDayText:'今天的任务',
  94. //contentHeight: 10000,
  95. //weekMode: "liquid",
  96. aspectRatio:1.9,
  97. minTime:'8:00',//在日视图和周视图显示起始时间的设置
  98. maxTime:'22:00',//在日视图和周视图显示结束时间的设置
  99. slotMinutes:30,//在日视图和周视图每一行间隔的分钟,目前设为30分钟
  100. defaultView: 'month',
  101. monthNames: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
  102. monthNamesShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
  103. dayNames: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
  104. dayNamesShort: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
  105. today: ["今天"],
  106. firstDay: 1,
  107. buttonText: {
  108. today: '今天',
  109. month: '月视图',
  110. week: '周视图',
  111. day: '日视图',
  112. prev: '<<',
  113. next: '>>'
  114. },
  115. eventSources: [
  116. {
  117. url: 'mtTaskCenterMgr.do?task=listUncompleteWorkLog&taskId=${taskInfo.taskid }' ,// 把从后台取出未完成的工作日志以fullCalendar的方式进行显示
  118. color:'green'
  119. },
  120. {
  121. url: 'mtTaskCenterMgr.do?task=listcompleteWorkLog&taskId=${taskInfo.taskid }', //把从后台取出已经完成的工作日志以fullCalendar的方式进行显示
  122. color:'green'
  123. }
  124. ],
  125. eventMouseover: function (event, jsEvent, view) {
  126. var logdate = $.fullCalendar.formatDate(event.start, "yyyy-MM-dd");
  127. var worktime = event.worktime;
  128. var progress = event.progress_;
  129. var tasktitle = event.tasktitle;
  130. var logdtaile = event.logdtaile;
  131. $(this).attr('title', "任务进度:" + progress + "%\n" + "用时:" + worktime + "小时\n工作内容:" + logdtaile );
  132. $(this).css('font-weight', 'normal');
  133. },
  134. selectable: true,
  135. selectHelper: true,
  136. });
  137. });
  138. }
  139. function toTreatTask(type,taskid){
  140. var planjobtime_ = "${taskInfo.planjobtime }";
  141. var planjobtime = planjobtime_ * 10;
  142. $("#is_credit").val(planjobtime);
  143. $("#type").val(type);
  144. treatTaskDialog=$.ligerDialog.open({width:380, target: $("#treatTask"),title:"同意" });
  145. }
  146. function treatTask(){
  147. var is_credit = $("#is_credit").val();
  148. var result_msg = "";
  149. if ($("#type").val() == "5"){
  150. result_msg = "审核已通过!";
  151. } else if ($("#type").val() == "-1"){
  152. result_msg = "审核已驳回!";
  153. }
  154. var rs = true;
  155. if ($("#is_credit").length != 0){
  156. $("#is_creditMsgBox").empty();
  157. rs = $.validate({
  158. name : "is_credit",
  159. model : [ {
  160. type : "isNumber",
  161. msg : "请输入数字!"
  162. } ,{
  163. type : "require",
  164. msg : "积分评定不能为空!"
  165. }]
  166. });
  167. if (rs){
  168. if ($("#is_credit").val().match(/^[1-9]\d*$/) == null && $("#is_credit").val().replace(/(^\s*)|(\s*$)/g, "") != ""){
  169. $("#is_creditMsgBox").append("<font color=\"red\"> 积分评定应为正整数!</font>");
  170. document.all.is_credit.focus();
  171. rs = false;
  172. } else {
  173. rs = true;
  174. }
  175. }
  176. }
  177. if (rs){
  178. $.ajax({
  179. type:"POST",
  180. url:"mtTaskCenterMgr.do?task=treatTask&taskId=${taskInfo.taskid }&time=" + new Date().getTime()
  181. + "&task_suggestion=" + encodeURI(encodeURI($("#task_suggestion").val()))
  182. + "&type=" + $("#type").val()+ "&is_credit=" + is_credit + "&credittype_id=" + "${taskInfo.credittype_id }"
  183. + "&receiveid=" + "${taskInfo.receiveid_ }"+ "&tasktitle=" + encodeURI(encodeURI("${taskInfo.tasktitle }")),
  184. timeout:30000,
  185. cache:false,
  186. dataType:"json",
  187. beforeSend:function(){
  188. if(treatTaskDialog != null){
  189. treatTaskDialog.hidden();
  190. }
  191. },
  192. success:function(data){
  193. var i = data[0].i;
  194. if(i>0){
  195. $.ligerDialog.open({content:result_msg, "title":result_msg, "type":"success",allowClose:false,
  196. buttons: [ { text: '确定', onclick: function (item, dialog) { location.href="mtTaskCenterMgr.do?task=task_check_list"; dialog.hidden(); } } ]
  197. });
  198. }else{
  199. showAjaxError(null, data.error);
  200. }
  201. },
  202. error:showAjaxError
  203. });
  204. }
  205. }
  206. function toBackTask(type,taskid){
  207. $("#type").val(type);
  208. if(confirm("您确定要驳回该任务吗?")){
  209. $.ajax({
  210. type: "POST", //使用post方法访问后台
  211. url: "mtTaskCenterMgr.do?task=operateTask&universalid="+taskid + "&status=" + type + "&receiveId=" + "${taskInfo.receiveid_ }", //要访问的后台地址
  212. success: function (data) {
  213. $.ligerDialog.open({content:"审核已驳回!", "title":"审核已驳回", "type":"success",allowClose:false,
  214. buttons: [ { text: '确定', onclick: function (item, dialog) { location.href="mtTaskCenterMgr.do?task=task_check_list"; dialog.hidden(); } } ]
  215. });
  216. },
  217. error : function() {
  218. showAjaxError(null, data.error);
  219. }
  220. });
  221. }
  222. }
  223. function reSendTask (universalid){
  224. item('mtTaskMgr.do?task=resource_view&universalid=' + universalid);
  225. }
  226. function backTask (id,status,receiveId){
  227. if(confirm("您确定要撤销该任务吗?")){
  228. $.ajax({
  229. type: "POST", //使用post方法访问后台
  230. url: "mtTaskCenterMgr.do?task=operateTask&universalid="+id + "&status=" + status + "&receiveId=" + receiveId, //要访问的后台地址
  231. success: function (data) {
  232. $.ligerDialog.open({content:"任务已撤销!", "title":"任务已撤销", "type":"success",allowClose:false,
  233. buttons: [ { text: '确定', onclick: function (item, dialog) { location.href="mtTaskCenterMgr.do?task=taskcenter"; dialog.hidden(); } } ]
  234. });
  235. },
  236. error : function() {
  237. alert("任务撤销失败!");
  238. }
  239. });
  240. }
  241. }
  242. </script>
  243. </head>
  244. <body>
  245. <div id="wrap">
  246. <div class="container-layout">
  247. <div id="title" class="form-button" >
  248. <input type="button" id="back" class="l-button" value="返回" onclick="history.back(-1);" />
  249. <c:if test="${taskInfo.status == '4'}">
  250. <input type="button" id="back" class="l-button" value="同意" onclick="toTreatTask('5',${taskInfo.taskid });" />
  251. <input type="button" id="back" class="l-button" value="驳回" onclick="toBackTask('-1',${taskInfo.taskid });" />
  252. </c:if>
  253. <c:if test="${taskInfo.status == '2'}">
  254. <input type="button" id="back" class="l-button" value="重派" onclick="reSendTask(${taskInfo.taskid });" />
  255. </c:if>
  256. <c:if test="${taskInfo.status == '0'}">
  257. <input type="button" id="back" class="l-button" value="修改" onclick="reSendTask(${taskInfo.taskid });" />
  258. <input type="button" id="back" class="l-button" value="撤销" onclick="backTask(${taskInfo.taskid },'3',${taskInfo.receiveid_ })" />
  259. </c:if>
  260. </div>
  261. </div>
  262. <div class="forum-container-2">
  263. <div class="l-title-bar">任务基本信息</div>
  264. <div style="padding-left: 10px;">
  265. <table class="l-default-panel">
  266. <tr>
  267. <td class="l-table-head" colspan="4" id="tasktitle">任务名称:${taskInfo.tasktitle }
  268. </td>
  269. </tr>
  270. <tr>
  271. <td class="l-table-edit-text ">任务状态:</td>
  272. <td class="l-table-edit-content">
  273. <c:if test="${taskInfo.status == '0' }"><font color="red" style="font-size: 14px; font-weight: bold;">待接收</font></c:if>
  274. <c:if test="${taskInfo.status == '1' }"><font color="blue" style="font-size: 14px; font-weight: bold;">进行中</font></c:if>
  275. <c:if test="${taskInfo.status == '2' }"><font color="red" style="font-size: 14px; font-weight: bold;">已退回</font></c:if>
  276. <c:if test="${taskInfo.status == '4' }"><font color="green" style="font-size: 14px; font-weight: bold;">待审核</font></c:if>
  277. <c:if test="${taskInfo.status == '5' }"><font color="gray" style="font-size: 14px; font-weight: bold;">已完成</font></c:if>
  278. <c:if test="${taskInfo.status == '-1' }"><font color="purple" style="font-size: 14px; font-weight: bold;">被驳回</font></c:if>
  279. </td>
  280. <td class="l-table-edit-text ">任务进度:</td>
  281. <td class="l-table-edit-content"><label id="procFinishPer">${taskInfo.progress }</label></td>
  282. </tr>
  283. <tr>
  284. <td class="l-table-edit-text ">任务类型:</td>
  285. <td class="">${taskInfo.tasktype }</td>
  286. <td class="l-table-edit-text ">指派人:</td>
  287. <td class="l-table-edit-content" id="createstaffer">${taskInfo.createstaffer }</td>
  288. </tr>
  289. <tr>
  290. <td class="l-table-edit-text ">负责人:</td>
  291. <td class="l-table-edit-content" id="receiveid">${taskInfo.receiveid }</td>
  292. <td class="l-table-edit-text ">创建时间:</td>
  293. <td class="l-table-edit-content" id="createDate">
  294. ${taskInfo.createDate }
  295. </td>
  296. </tr>
  297. <tr>
  298. <td colspan="4">&nbsp;</td>
  299. </tr>
  300. <tr>
  301. <td class="l-table-edit-text ">计划用时:</td>
  302. <td class="l-table-edit-content" id="planjobtime">${taskInfo.planjobtime }&nbsp;h</td>
  303. <td class="l-table-edit-text ">已用时:</td>
  304. <td class="" id="worktime_count">${taskInfo.worktime_count }&nbsp;h</td>
  305. </tr>
  306. <tr>
  307. <td class="l-table-edit-text ">计划开始时间:</td>
  308. <td class="l-table-edit-content" id="startDate">
  309. ${taskInfo.startDate }
  310. </td>
  311. <td class="l-table-edit-text ">实际开始时间:</td>
  312. <td class="" id="prac_start_date">
  313. ${taskInfo.prac_start_date }
  314. </td>
  315. </tr>
  316. <tr>
  317. <td class="l-table-edit-text ">计划完成时间:</td>
  318. <td class="l-table-edit-content" id="endDate">
  319. ${taskInfo.endDate }
  320. </td>
  321. <td class="l-table-edit-text ">实际完成时间:</td>
  322. <td class="" id="prac_end_date">
  323. ${taskInfo.prac_end_date }
  324. </td>
  325. </tr>
  326. </table>
  327. </div>
  328. <div class="l-title-bar">任务描述</div>
  329. <div class="l-default-panel" style="margin-top: 10px;margin-bottom: 20px;padding: 10px;" id="taskDetail">${taskInfo.taskDetail }</div>
  330. <div class="l-default-panel" style="margin-top: 10px;margin-bottom: 20px;padding: 10px;" id="taskFile">
  331. </div>
  332. <div class="l-title-bar" id="diaryPanel" >
  333. <a name="workDiaryPos" id="workDiaryPos" href="#"></a>
  334. <div class="text_left">工作日志</div>
  335. <!-- <div class="text_right"><a href="#" id="recordBtn">收缩</a></div> -->
  336. </div>
  337. </div>
  338. <div style="margin-bottom: 10px;"></div>
  339. <div id='calendar'></div>
  340. <div class="forum-container-2">
  341. <div class="l-title-bar" >
  342. <div class="text_left">办理过程</div>
  343. </div>
  344. </div>
  345. </div>
  346. <div id="maingrid" style="margin:0 auto "></div>
  347. <%--点击同意弹出页面框 --%>
  348. <div id="treatTask" class="forum-container2" style="display: none">
  349. <input type="hidden" name="wd_id" id="wd_id" />
  350. <table class="workDiaryTable">
  351. <c:if test="${taskInfo.is_credit=='1' }">
  352. <tr>
  353. <td class="left-text" >积分评定:<font color='red'><b>*</b></font></td>
  354. <td>
  355. <input id="is_credit" name="is_credit" class="short-input "/>
  356. <div id="is_creditMsgBox" style="display: inline;"></div>
  357. </td>
  358. </tr>
  359. </c:if>
  360. <tr>
  361. <td class="left-text" >意见:</td>
  362. <td>
  363. <textarea id="task_suggestion" name="task_suggestion" cols="34" rows="4"></textarea>
  364. </td>
  365. </tr>
  366. <tr>
  367. <td colspan="2" style="text-align: center" >
  368. <input type="button" value="确定" class="l-button" onclick="treatTask();" id="editWorkDiaryBtn"/>&nbsp;&nbsp;&nbsp;&nbsp;
  369. <input type="button" value="取消" class="l-button" onclick="treatTaskDialog.hidden()"/>
  370. <input type="hidden" id="type" />
  371. <input type="hidden" id="credittype_id" value="${taskInfo.credittype_id }"/>
  372. </td>
  373. </tr>
  374. </table>
  375. </div>
  376. </body>
  377. </html>