see.jsp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <%@ page language="java" contentType="text/html; charset=utf-8"
  2. pageEncoding="utf-8"%>
  3. <%
  4. String path = request.getContextPath();
  5. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  6. %>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-all-gray.css" type="text/css"></link>
  12. <!--[if IE]>
  13. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-ie-scoped.css" type="text/css"></link>
  14. <![endif]-->
  15. <link rel="stylesheet" href="<%=basePath %>resource/css/main.css" type="text/css"></link>
  16. <script type="text/javascript" src="<%=basePath %>resource/ext/ext-all.js"></script>
  17. <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js"></script>
  18. <script type="text/javascript">
  19. Ext.Loader.setConfig({
  20. enabled: true
  21. });//开启动态加载
  22. Ext.application({
  23. name: 'erp',//为应用程序起一个名字,相当于命名空间
  24. appFolder: basePath+'app',//app文件夹所在路径
  25. controllers: [//声明所用到的控制层
  26. 'oa.persontask.workPlan.See'
  27. ],
  28. launch: function() {
  29. Ext.create('erp.view.oa.persontask.workPlan.See');//创建视图
  30. }
  31. });
  32. //var caller = 'WorkPlanType';
  33. //var formCondition = '';
  34. //var gridCondition = '';
  35. var value = '';
  36. Ext.Ajax.request({//查询当月计划是否存在
  37. url : basePath + 'oa/persontask/workPlan/queryWorkPlan.action',
  38. method : 'post',
  39. params:{
  40. title: '吴伟的' + new Date().getFullYear() + '年' + ((new Date().getMonth()+1) > 9 ? (new Date().getMonth()+1):'0'+(new Date().getMonth()+1)) +'月个人计划'
  41. },
  42. async: false,
  43. callback : function(options,success,response){
  44. var rs = new Ext.decode(response.responseText);
  45. if(rs.exceptionInfo){
  46. showError(rs.exceptionInfo);return;
  47. }
  48. if(rs.success){
  49. if(rs.workplan){//当月计划存在且不为空,则列出当月计划条目
  50. Ext.Ajax.request({
  51. url : basePath + 'oa/persontask/workPlan/getWorkPlanDetail.action',
  52. params : {
  53. id: rs.workplan.wp_id
  54. },
  55. method : 'post',
  56. async: false,
  57. callback : function(options,success,response){
  58. // me.getActiveTab().setLoading(false);
  59. var res = new Ext.decode(response.responseText);
  60. if(res.success && res.workplandetaillist.length>0){//当月计划条目存在且不为空
  61. for(var i=0; i<res.workplandetaillist.length; i++){
  62. if(i==res.workplandetaillist.length-1){
  63. value += res.workplandetaillist[i].wpd_plan;
  64. } else {
  65. value += res.workplandetaillist[i].wpd_plan + '==###==';
  66. }
  67. }
  68. } else{
  69. saveFailure();//@i18n/i18n.js
  70. }
  71. }
  72. });
  73. }
  74. }
  75. }
  76. });
  77. </script>
  78. </head>
  79. <body >
  80. </body>
  81. </html>