toTaskCheckList.jsp 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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="${pageContext.request.contextPath}/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css"></link>
  10. <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
  11. <script type=text/javascript src="/shares/js/jquery-1.3.2.min.js"></script>
  12. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  13. <script src="/shares/jquery.progressbar/js/jquery.progressbar.js" type="text/javascript"></script>
  14. <script type="text/javascript" src="/shares/js/common.js"></script>
  15. <script type="text/javascript" src="/shares/js/constant.js"></script>
  16. <script type="text/javascript" src="/shares/js/yw/master1/page.js"></script>
  17. <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
  18. <script type="text/javascript" src="/shares/js/yw/master1/searchBox.js"></script>
  19. <script type="text/javascript">
  20. var task_sort = "";
  21. var url="mtTaskCenterMgr.do?task=mytask";
  22. $(function(){
  23. url ="mtTaskCenterMgr.do?task=taskCheckList";
  24. $("#task_title").html("任务审核");
  25. $("#task_status_name").ligerComboBox({ isShowCheckBox: true, isMultiSelect: true,
  26. data: [
  27. { text: '待审核', id: '4' },
  28. { text: '审核通过', id: '5' },
  29. { text: '已驳回', id: '-1' },
  30. { text: '进行中', id: '1' }
  31. ],
  32. valueFieldID: 'task_status_id',
  33. initValue : '4',
  34. split :',',
  35. onSelected : function (value, text){
  36. $('#conf_model_name').val("输入任务名称");
  37. searchByKword();
  38. }
  39. });
  40. searchByKword();
  41. });
  42. function operateMyTask(id,status){
  43. if (status != '-1'){
  44. var boo = "";
  45. var msg_success = "";
  46. var msg_error = "";
  47. if (status == '1'){
  48. msg_success = "任务已接收!";
  49. msg_error = "任务接收失败!";
  50. boo = confirm("您确定要接收该任务吗?");
  51. } else if (status == '2'){
  52. msg_success = "任务已退回!";
  53. msg_error = "任务退回失败!";
  54. boo = confirm("您确定要退回该任务吗?");
  55. }
  56. if(boo){
  57. $.ajax({
  58. type: "POST", //使用post方法访问后台
  59. url: "mtTaskCenterMgr.do?task=operateTask&universalid="+id + "&status=" + status, //要访问的后台地址
  60. success: function (data) {
  61. searchByKword();
  62. $.ligerDialog.open({content:msg_success, "title":msg_success, "type":"success",allowClose:false,
  63. buttons: [ { text: '确定', onclick: function (item, dialog) { dialog.hidden(); } } ]
  64. });
  65. },
  66. error : function() {
  67. alert(msg_error);
  68. }
  69. });
  70. }
  71. }
  72. }
  73. function backTask (id,status,receiveId){
  74. if(confirm("您确定要驳回该任务吗?")){
  75. $.ajax({
  76. type: "POST", //使用post方法访问后台
  77. url: "mtTaskCenterMgr.do?task=operateTask&universalid="+id + "&status=" + status + "&receiveId=" + receiveId, //要访问的后台地址
  78. success: function (data) {
  79. searchByKword();
  80. $.ligerDialog.open({content:"任务已驳回!", "title":"任务已驳回!", "type":"success",allowClose:false,
  81. buttons: [ { text: '确定', onclick: function (item, dialog) { dialog.hidden(); } } ]
  82. });
  83. },
  84. error : function() {
  85. alert("任务驳回失败!");
  86. }
  87. });
  88. }
  89. }
  90. function reSendTask (universalid){
  91. item('mtTaskMgr.do?task=resource_view&universalid=' + universalid);
  92. }
  93. function myTaskWrok(universalid){
  94. item('mtTaskCenterMgr.do?task=taskWrok&universalid=' + universalid);
  95. }
  96. function checkTask(universalid){
  97. item('mtTaskCenterMgr.do?task=toCheckTask&universalid=' + universalid);
  98. }
  99. function search_ing(url,s){
  100. var p = $("#p").val();
  101. var pSize = $("#pSize").val();
  102. var param={"p":p,"pSize":pSize};
  103. sendAsyncAjax(param, url+"&time="+ new Date().getTime()+s, "json", function(data) {
  104. var num = data.Total;
  105. page(num,pSize,p);
  106. var datas = data.Rows;
  107. var item_name = $('#contentDiv');
  108. $(item_name).empty();//初始化table,清空table
  109. var html = '';
  110. if(datas.length == 0){
  111. html = notquery();
  112. }else{
  113. var j=0;
  114. for (var i = 0; i < datas.length; i++){
  115. var arr = datas[i];
  116. var bdiv = 1;
  117. bdiv = 1 + j;
  118. if (j < 7) {
  119. j++
  120. } else {
  121. j = 0;
  122. }
  123. html+= '<div class="tr_cont_new mar4 f5_new">';
  124. html+= '<a href="#" onclick="checkTask('+arr.universalid+')">';
  125. html+= '<div class="wdrw_tiao_new bn'+bdiv+' fl"></div>';
  126. html += '<div class="tr_rw_d_new fl">';
  127. html+= '<p><img src="/shares/images/master1/rw_ico_menu.png" width="17" height="15" />';
  128. html+='[非项目任务]&nbsp;&nbsp;';
  129. html+= '[任务名称:'+arr.tasktitle+']&nbsp;&nbsp;[任务进度:<font color="red">'+ (arr.progress == null ? 0 : arr.progress)+'%</font>]</p>';
  130. html+='<p class=\'mar5\'>';
  131. if (arr.status == '4'){
  132. html+='[<font color="purple">待审核</font>]&nbsp;&nbsp;';
  133. } else if (arr.status == '5'){
  134. html+='[<font color="green">审核通过</font>]&nbsp;&nbsp;';
  135. } else if (arr.status == '-1'){
  136. html+='[<font color="red">被驳回</font>]&nbsp;&nbsp;';
  137. } else if (arr.status == '1'){
  138. html+='[<font color="blue">进行中</font>]&nbsp;&nbsp;';
  139. }
  140. html+='任务负责人:'+arr.receivestaffer;
  141. if (arr.startdate != null && arr.enddate != null) {
  142. html+= ',计划开始时间'+arr.startdate+',&nbsp;&nbsp;计划结束时间'+arr.enddate;
  143. } else {
  144. html+= '&nbsp;&nbsp;<font color="red">(手机派发)</font>';
  145. }
  146. html+='</p>';
  147. html+= '</div>';
  148. html+= '</a>';
  149. html+= '<div class="tr_rw_btn_new fr" >';
  150. if (arr.status == '4') {
  151. html+= '<div class="div_btn">';
  152. html+='<input type="button" class="btn_c" value="驳回" onclick="backTask('+arr.universalid+',\'-1\','+arr.receiveid + ')" />';
  153. html+='</div>';
  154. html+= '<div class="div_btn">';
  155. html+='<input type="button" class="btn_c" value="审核" onclick="checkTask('+arr.universalid + ')" />';
  156. html+='</div>';
  157. }
  158. html+= '</div>';
  159. html+= '</div>';
  160. }
  161. }
  162. $(item_name).html(html);
  163. });
  164. }
  165. //条件查询
  166. function searchByKword(){
  167. var s = "";
  168. var task_status_id = $("#task_status_id").val();
  169. var conf_model_name = $("#conf_model_name").val();
  170. if (conf_model_name != "" && typeof (conf_model_name) != "undefined" && conf_model_name !="输入任务名称") {
  171. s += "&task_name=" + encodeURI(encodeURI(conf_model_name));
  172. }
  173. if (task_status_id != "" && typeof (task_status_id) != "undefined") {
  174. s += "&status=" + encodeURI(encodeURI(task_status_id));
  175. }
  176. search_ing(url,s);
  177. $("#task_title").html("任务审核");
  178. }
  179. </script>
  180. </head>
  181. <body>
  182. <div class="tc_b">
  183. <div id="left" style="float:left;width:100%;">
  184. <div class="tc_r">
  185. <div class="tr_con b5 f4">
  186. <div class="fl f4">
  187. <img src="/shares/images/master1/wdrw_ico.png" width="25" height="31" />&nbsp;<span id="task_title"></span>
  188. </div>
  189. <div class="fl f4" style="margin-left:30px;">
  190. 任务状态:
  191. </div>
  192. <div class="fl mar6">
  193. <input type="text" id="task_status_name" name="task_status_name" />
  194. <input type="hidden" id="task_status_id" name="task_status_id"/>
  195. </div>
  196. <div class="div_ck_k fr">
  197. <input class="div_cx fl" name="conf_model_name" id="conf_model_name" type="text" value="输入任务名称" />
  198. <input class="btn_ck fl" type="button" id="button" onclick="searchByKword();"/>
  199. </div>
  200. </div>
  201. <div class="tr_right_bg">
  202. <div id="contentDiv"></div>
  203. <jsp:include page="/yw/master1/page.jsp">
  204. <jsp:param name="functionName" value="searchByKword"/>
  205. </jsp:include>
  206. </div>
  207. </div>
  208. </div>
  209. <%@ include file="/yw/master1_pm/taskcenter/info/left_taskcenter.jsp"%>
  210. </div>
  211. </body>
  212. </html>