| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324 |
- <%@ 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="${pageContext.request.contextPath}/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css"></link>
- <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
- <script type=text/javascript src="/shares/js/jquery-1.3.2.min.js"></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/page.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/searchBox.js"></script>
- <script type="text/javascript">
- var task_sort = "";
- var url="mtTaskCenterMgr.do?task=mytask";
- $(function(){
- $("#task_sort").val("1");
- $("#task_title").html("我的任务");
- search_ing(url);
- });
-
- function operateMyTask(id,status){
- if (status != '-1'){
- var boo = "";
- var msg_success = "";
- var msg_error = "";
- if (status == '1'){
- msg_success = "任务已接收!";
- msg_error = "任务接收失败!";
- boo = confirm("您确定要接收该任务吗?");
- } else if (status == '2'){
- msg_success = "任务已退回!";
- msg_error = "任务退回失败!";
- boo = confirm("您确定要退回该任务吗?");
- }
- if(boo){
- $.ajax({
- type: "POST", //使用post方法访问后台
- url: "mtTaskCenterMgr.do?task=operateTask&universalid="+id + "&status=" + status, //要访问的后台地址
- success: function (data) {
- searchByKword();
- $.ligerDialog.open({content:msg_success, "title":msg_success, "type":"success",allowClose:false,
- buttons: [ { text: '确定', onclick: function (item, dialog) { dialog.hidden(); } } ]
- });
- },
- error : function() {
- alert(msg_error);
- }
- });
- }
- }
-
- }
-
- function backTask (id,status,receiveId){
- if(confirm("您确定要撤销该任务吗?")){
- $.ajax({
- type: "POST", //使用post方法访问后台
- url: "mtTaskCenterMgr.do?task=operateTask&universalid="+id + "&status=" + status + "&receiveId=" + receiveId, //要访问的后台地址
- success: function (data) {
- searchByKword();
- alert("任务已撤销!");
- },
- error : function() {
- alert("任务撤销失败!");
- }
- });
- }
- }
-
-
- function reSendTask (universalid){
- item('mtTaskMgr.do?task=resource_view&universalid=' + universalid);
- }
-
-
- function myTaskWrok(universalid){
- item('mtTaskCenterMgr.do?task=taskWrok&universalid=' + universalid);
- }
-
- function checkTask(universalid){
- item('mtTaskCenterMgr.do?task=toCheckTask&universalid=' + universalid);
- }
-
- function reBackTask(id,status,receiveId){
- if(confirm("您确定要驳回该任务吗?")){
- $.ajax({
- type: "POST", //使用post方法访问后台
- url: "mtTaskCenterMgr.do?task=operateTask&universalid="+id + "&status=" + status + "&receiveId=" + receiveId, //要访问的后台地址
- success: function (data) {
- searchByKword();
- alert("任务已驳回!");
- },
- error : function() {
- alert("任务驳回失败!");
- }
- });
- }
- }
-
- function search_ing(url,s){
- var p = $("#p").val();
- var pSize = $("#pSize").val();
- var param={"p":p,"pSize":pSize};
- sendAsyncAjax(param, url+"&time="+ new Date().getTime()+s, "json", function(data) {
- var num = data.Total;
- page(num,pSize,p);
- var datas = data.Rows;
- var item_name = $('#contentDiv');
- $(item_name).empty();//初始化table,清空table
- var html = '';
- if(datas.length == 0){
- html = notquery();
- }else{
- var j=0;
- for (var i = 0; i < datas.length; i++){
- var arr = datas[i];
- var bdiv = 1;
- bdiv = 1 + j;
- if (j < 7) {
- j++
- } else {
- j = 0;
- }
- if (task_sort == '3'){ // 可领取的任务
- html+= '<div class="tr_cont_new mar4 f5_new">';
- html+= '<a href="#" onclick="checkTask('+arr.universalid+')">';
- html+= '<div class="wdrw_tiao_new bn'+bdiv+' fl"></div>';
- html += '<div class="tr_rw_d_new fl">';
- html+= '<p><img src="/shares/images/master1/rw_ico_menu.png" width="17" height="15" />';
- html+='[非项目任务] ';
- html+= '[任务名称:'+arr.tasktitle+']</p>';
- html+='<p class=\'mar5\'>';
- html+='[<font color="red">可领取</font>] 派发人:'+arr.createstaffer+',计划开始时间'+arr.startdate+', 计划结束时间'+arr.enddate;
- html+='</p>';
- html+= '</div>';
- html+= '</a>';
- html+= '<div class="tr_rw_btn_new fr" >';
- if(arr.taskstatus=="1"){
- html+= '<div class="div_btn">';
- html+='<input type="button" class="btn_c" value="接收" onclick="receiveTask('+arr.universalid+')" />';
- html+='</div>';
- }else if(arr.taskstatus=="5"){
- html+= '<div class="div_btn">';
- html+='<input type="button" class="btn_c" value="报工" onclick="resource_view('+arr.universalid+')" />';
- html+='</div>';
- }
- html+= '</div>';
- html+= '</div>';
- } else if (task_sort == '2'){ // 我分配的任务
- html+= '<div class="tr_cont_new mar4 f5_new">';
- html+= '<a href="#" onclick="checkTask('+arr.universalid+')">';
- html+= '<div class="wdrw_tiao_new bn'+bdiv+' fl"></div>';
- html += '<div class="tr_rw_d_new fl">';
- html+= '<p><img src="/shares/images/master1/rw_ico_menu.png" width="17" height="15" />';
- html+='[非项目任务] ';
- html+= '[任务名称:'+arr.tasktitle+'] [任务进度:<font color="red">'+ (arr.progress == null ? 0 : arr.progress)+'%</font>]</p>';
- html+='<p class=\'mar5\'>';
- if (arr.status == '0'){
- html+='[<font color="red">待接收</font>] ';
- } else if (arr.status == '1'){
- html+='[<font color="blue">进行中</font>] ';
- } else if (arr.status == '2'){
- html+='[<font color="red">已退回</font>] ';
- } else if (arr.status == '3'){
- html+='[<font color="red">已撤销</font>] ';
- } else if (arr.status == '4'){
- html+='[<font color="purple">待审核</font>] ';
- } else if (arr.status == '5'){
- html+='[<font color="green">审核通过</font>] ';
- } else if (arr.status == '-1'){
- html+='[<font color="red">被驳回</font>] ';
- }
- html+='任务负责人:'+arr.receivestaffer;
- if (arr.startdate != null && arr.enddate != null) {
- html+= ',计划开始时间'+arr.startdate+', 计划结束时间'+arr.enddate;
- } else {
- html+= ' <font color="red">(手机派发)</font>';
- }
- html+='</p>';
- html+= '</div>';
- html+= '</a>';
- html+= '<div class="tr_rw_btn_new fr" >';
- if(arr.status=="0"){
- html+= '<div class="div_btn">';
- html+='<input type="button" class="btn_c" value="撤销" onclick="backTask('+arr.universalid+',\'3\','+arr.receiveid + ')" />';
- html+='</div>';
- html+= '<div class="div_btn">';
- html+='<input type="button" class="btn_c" value="修改" onclick="reSendTask('+arr.universalid+',\'3\','+arr.receiveid + ')" />';
- html+='</div>';
- } else if (arr.status == '2'){
- html+= '<div class="div_btn">';
- html+='<input type="button" class="btn_c" value="重派" onclick="reSendTask('+arr.universalid + ')" />';
- html+='</div>';
- } else if (arr.status == '4'){
- html+= '<div class="div_btn">';
- html+='<input type="button" class="btn_c" value="驳回" onclick="reBackTask('+arr.universalid+',\'-1\','+arr.receiveid + ')" />';
- html+='</div>';
- html+= '<div class="div_btn">';
- html+='<input type="button" class="btn_c" value="审核" onclick="checkTask('+arr.universalid + ')" />';
- html+='</div>';
- }
- html+= '</div>';
- html+= '</div>';
- } else { // 我负责的任务
- html+= '<div class="tr_cont_new mar4 f5_new">';
- html+= '<a href="#" onclick="myTaskWrok('+arr.universalid+')">';
- html+= '<div class="wdrw_tiao_new bn'+bdiv+' fl"></div>';
- html += '<div class="tr_rw_d_new fl">';
- html+= '<p><img src="/shares/images/master1/rw_ico_menu.png" width="17" height="15" />';
- html+='[非项目任务] ';
- html+= '[任务名称:'+arr.tasktitle+'] [任务进度:<font color="red">'+ (arr.progress == null ? 0 : arr.progress)+'%</font>]</p>';
- html+='<p class=\'mar5\'>';
- if (arr.status == '0'){
- html+='[<font color="red">待接收</font>] ';
- } else if (arr.status == '1'){
- html+='[<font color="blue">进行中</font>] ';
- } else if (arr.status == '2'){
- html+='[<font color="red">已退回</font>] ';
- } else if (arr.status == '4'){
- html+='[<font color="purple">待审核</font>] ';
- } else if (arr.status == '5'){
- html+='[<font color="green">审核通过</font>] ';
- } else if (arr.status == '-1'){
- html+='[<font color="red">被驳回</font>] ';
- }
- html+='派发人:'+arr.createstaffer;
- if (arr.startdate != null && arr.enddate != null) {
- html+= ',计划开始时间'+arr.startdate+', 计划结束时间'+arr.enddate;
- } else {
- html+= ' <font color="red">(手机派发)</font>';
- }
- html+='</p>';
- html+= '</div>';
- html+= '</a>';
- html+= '<div class="tr_rw_btn_new fr" >';
- if(arr.status=="0"){
- html+= '<div class="div_btn">';
- html+='<input type="button" class="btn_c" value="退回" onclick="operateMyTask('+arr.universalid+',\'2\')" />';
- html+='</div>';
- html+= '<div class="div_btn">';
- html+='<input type="button" class="btn_c" value="接收" onclick="operateMyTask('+arr.universalid+',\'1\')" />';
- html+='</div>';
- }else if(arr.status=="1"){
- html+= '<div class="div_btn">';
- html+='<input type="button" class="btn_c" value="退回" onclick="operateMyTask('+arr.universalid+',\'2\')" />';
- html+='</div>';
- html+= '<div class="div_btn">';
- html+='<input type="button" class="btn_c" value="报工" onclick="myTaskWrok('+arr.universalid+')" />';
- html+='</div>';
- }
- html+= '</div>';
- html+= '</div>';
- }
-
- }
- }
- $(item_name).html(html);
- });
- }
-
- //条件查询
- function searchByKword(){
- var s = "";
- var insName = $("#conf_model_name").val();
- task_sort = $("#task_sort").val();
- if (insName != "" && typeof (insName) != "undefined" && insName !="输入任务名称") {
- s += "&task_name=" + encodeURI(encodeURI(insName));
- }
- if (task_sort != "" && typeof (task_sort) != "undefined") {
- s += "&task_sort=" + encodeURI(encodeURI(task_sort));
- }
- search_ing(url,s);
- $("#task_title").html("我的任务");
- }
-
- function changeSort(){
- $("#conf_model_name").val("输入任务名称");
- searchByKword();
- }
-
- </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" /> <span id="task_title"></span>
- </div>
- <div class="fl f4" style="margin-left:30px;">
- 任务分类:
- </div>
- <div class="fl mar6">
- <select style="width:150px; height:25px;" name="task_sort" id="task_sort" onchange="changeSort();">
- <option value="1">我负责的任务</option>
- <option value="2">我分配的任务</option>
- </select>
- </div>
- <div class="div_ck_k fr">
- <input class="div_cx fl" name="conf_model_name" id="conf_model_name" type="text" value="输入任务名称" />
- <input class="btn_ck fl" type="button" id="button" onclick="searchByKword();"/>
- </div>
- </div>
- <div class="tr_right_bg">
- <div id="contentDiv"></div>
- <jsp:include page="/yw/master1/page.jsp">
- <jsp:param name="functionName" value="searchByKword"/>
- </jsp:include>
- </div>
- </div>
- </div>
- <%@ include file="/yw/master1_ytpm/taskcenter/info/left_taskcenter.jsp"%>
- </div>
- </body>
- </html>
|