tmsProjectSaturation.js 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. function openRemark(dayhour){
  2. var contengt = "1.每日应报工时为"+dayhour+"小时,系统会根据每日应报工时自动计算饱和度比率。<br/>";
  3. contengt += "2.饱和度分为4个级别:1、100%以上 <span style='color:#0000FF'>超负荷</span> 2、90%-100% <span style='color:#000000'>饱和</span> 3、60%-90% <span style='color:#008000'>基本饱和</span> 4、60%以下 <span style='color:#FF0000'>不饱和</span><br/>";
  4. contengt += " 3.工时数字会根据这四个级别进行变色 ";
  5. $.ligerDialog.open({ title:"统计说明",content:contengt,height: 150,width: 350, showMin: true, isResize: true, slide: false });
  6. }
  7. function senfe(o,a,b,c,d){
  8. var t=document.getElementById(o).getElementsByTagName("tr");
  9. for(var i=0;i<t.length;i++){
  10. t[i].onmouseover=function(){
  11. this.x="1";
  12. this.style.backgroundColor=d;
  13. var td = this.getElementsByTagName("td");
  14. for(var j=0;j<td.length;j++){
  15. td[j].style.backgroundColor=c;
  16. }
  17. }
  18. t[i].onmouseout=function(){
  19. this.x="0";
  20. this.style.backgroundColor="";
  21. var td = this.getElementsByTagName("td");
  22. for(var j=0;j<td.length;j++){
  23. td[j].style.backgroundColor="";
  24. }
  25. }
  26. }
  27. }
  28. function getWorkDiaryList(userId,day,userName,yearInt,monthInt){
  29. var projId = $("#projId").val();
  30. $.ajax({
  31. type: 'get',
  32. url: 'TmsSaturationAction.do?task=getWorkDiaryDetail&time=' + new Date().getTime(),
  33. data : {"userId" : userId, "projId":projId,"year":yearInt,"month":monthInt,"day":day},
  34. timeout:30000,
  35. cache:false,
  36. dataType: 'json',
  37. success: function (data) {
  38. var datas = eval(data);
  39. var total = datas.Total;
  40. var result = datas.Rows;
  41. var contengMsg = "";
  42. for(var i=0;i<total;i++){
  43. var task = result[i].task_name;
  44. if( task == null || task == 'null'){
  45. task = '非任务工作日志'
  46. }
  47. contengMsg += "任务"+(i+1)+"<br />";
  48. contengMsg += "----------------------------<br />";
  49. contengMsg += "任务名称:"+task+"<br />";
  50. contengMsg += "工时:"+result[i].man_hour+"<br />";
  51. contengMsg += "工作内容:"+result[i].remark+"<br /><br />";
  52. }
  53. f_open(userName,day,contengMsg,yearInt,monthInt);
  54. },
  55. error: function (request, status, error) {
  56. alert("对不起,连接异常,请稍后重试");
  57. return "";
  58. }
  59. });
  60. }
  61. function f_open(userName,day,contengMsg,yearInt,monthInt){
  62. $.ligerDialog.open({ title:userName+"("+yearInt+"-"+monthInt+"-"+day+")",content:contengMsg,height: 300,width: 350, showMin: true, isResize: true, slide: false });
  63. }