AttentionFunction.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. Ext.define('erp.view.oa.attention.AttentionFunction', {
  2. height:0.33,
  3. width: 0.33,
  4. setWidth: function(width){
  5. this.width = width;
  6. },
  7. setHeight: function(height){
  8. this.height = height;
  9. },
  10. WorkDaily:function(){
  11. var me = this.workbench || this;
  12. return Ext.create('Ext.panel.Panel', {
  13. title: '<font color=green>工作日报</font>',
  14. bodyStyle: 'background: #f1f1f1',
  15. //style: 'margin: 2px;',
  16. id: 'bench_email1',
  17. iconCls: 'main-news',
  18. columnWidth: me.width,
  19. eight: me.height
  20. });
  21. },
  22. Agenda:function(){
  23. var me = this.workbench || this;
  24. return Ext.create('Ext.panel.Panel', {
  25. title: '<font color=green>工作日程</font>',
  26. bodyStyle: 'background: #f1f1f1',
  27. //style: 'margin: 2px;',
  28. id: 'bench_email2',
  29. iconCls: 'main-news',
  30. columnWidth: me.width,
  31. height: me.height
  32. });
  33. },
  34. WorkAttendance:function(){
  35. var me = this.workbench || this;
  36. return Ext.create('Ext.panel.Panel', {
  37. title: '<font color=green>考勤</font>',
  38. bodyStyle: 'background: #f1f1f1',
  39. id: 'bench_email3',
  40. iconCls: 'main-news',
  41. columnWidth: me.width,
  42. height: me.height
  43. });
  44. },
  45. JProcess2DealByMe:function(){
  46. var me = this.workbench || this;
  47. return Ext.create('Ext.panel.Panel', {
  48. title: '<font color=green>待审批的流程</font>',
  49. bodyStyle: 'background: #f1f1f1',
  50. id: 'bench_email4',
  51. iconCls: 'main-news',
  52. columnWidth: me.width,
  53. height: me.height
  54. });
  55. },
  56. JProcessDeal:function(){
  57. var me = this.workbench || this;
  58. return Ext.create('Ext.panel.Panel', {
  59. title: '<font color=green>发起的流程</font>',
  60. bodyStyle: 'background: #f1f1f1',
  61. id: 'bench_email5',
  62. iconCls: 'main-news',
  63. columnWidth: me.width,
  64. height: me.height
  65. });
  66. },
  67. ProjectPlan:function(){
  68. var me = this.workbench || this;
  69. return Ext.create('Ext.panel.Panel', {
  70. title: '<font color=green>未完成的项目</font>',
  71. bodyStyle: 'background: #f1f1f1',
  72. id: 'bench_email6',
  73. iconCls: 'main-news',
  74. columnWidth: me.width,
  75. height: me.height
  76. });
  77. },
  78. WorkRecord:function(){
  79. return Ext.create('Ext.panel.Panel', {
  80. title: '<font color=green>未完成的项目</font>',
  81. bodyStyle: 'background: #f1f1f1',
  82. id: 'WorkRecord',
  83. contentEl: 'mytask',
  84. iconCls: 'main-news',
  85. columnWidth: 0.33,
  86. height: 0.33
  87. });
  88. },
  89. newSynergy:function(){
  90. var me = this.workbench || this;
  91. return Ext.create('Ext.panel.Panel', {
  92. title: '<font color=green> 内部协同</font>',
  93. bodyStyle: 'background: #f1f1f1',
  94. id: 'bench_email8',
  95. iconCls: 'main-news',
  96. columnWidth: me.width,
  97. height: me.height
  98. });
  99. },
  100. ProjectFeePlease:function(){
  101. var me = this.workbench || this;
  102. return Ext.create('Ext.panel.Panel', {
  103. title: '<font color=green> 内部协同</font>',
  104. bodyStyle: 'background: #f1f1f1',
  105. id: 'bench_email9',
  106. iconCls: 'main-news',
  107. columnWidth: me.width,
  108. height: me.height
  109. });
  110. },
  111. ProjectFeeClaim:function(){
  112. var me = this.workbench || this;
  113. return Ext.create('Ext.panel.Panel', {
  114. title: '<font color=green> 内部协同</font>',
  115. bodyStyle: 'background: #f1f1f1',
  116. id: 'bench_email99',
  117. iconCls: 'main-news',
  118. columnWidth: me.width,
  119. height: me.height
  120. });
  121. },
  122. Meeting:function(){
  123. var me = this.workbench || this;
  124. return Ext.create('Ext.panel.Panel', {
  125. title: '<font color=green> 内部协同</font>',
  126. bodyStyle: 'background: #f1f1f1',
  127. id: 'bench_email91',
  128. iconCls: 'main-news',
  129. columnWidth: me.width,
  130. height: me.height
  131. });
  132. },
  133. _WorkRecord: function(emid,days){
  134. alert('Yes');
  135. var me = this.workbench || this;
  136. Ext.Ajax.request({
  137. url : basePath + 'common/datalist.action',
  138. params: {
  139. caller: 'ResourceAssignment',
  140. condition: 'ra_emid=' + 3014,
  141. page: 1,
  142. pageSize: parseInt(100*0.3/12)
  143. },
  144. method : 'post',
  145. callback : function(options,success,response){
  146. var res = new Ext.decode(response.responseText);
  147. if(res.exception || res.exceptionInfo){
  148. showError(res.exceptionInfo);
  149. return;
  150. }
  151. var task = res.data != null ? Ext.decode(res.data.replace(/,}/g, '}').replace(/,]/g, ']')) : new Array();
  152. if(task == [] || task.length == 0){
  153. Ext.get("mytask").insertHtml('afterBegin', '<span style="color:gray;font-size:26px; padding: 5 5 5 5;">(暂无任务)</span>');
  154. } else {
  155. Ext.create('Ext.grid.Panel', {
  156. autoScroll: true,
  157. store: Ext.create('Ext.data.Store', {
  158. fields:['ra_id', 'ra_taskname', 'ra_startdate', 'ra_enddate', 'surplus', 'ra_taskpercentdone'],
  159. data: task
  160. }),
  161. height: me.height*1.8,
  162. bodyStyle: 'background: #f1f1f1;border: none;',
  163. columns: [
  164. { header: 'ID', dataIndex: 'ra_id', hidden: true},
  165. { header: '任务名称', dataIndex: 'ra_taskname', flex: 2 },
  166. { header: '开始时间', dataIndex: 'ra_startdate', flex: 1 },
  167. { header: '结束时间', dataIndex: 'ra_enddate', flex: 1 },
  168. { header: '剩余时间', dataIndex: 'surplus', flex: 1.5 },
  169. { header: '完成率(%)', dataIndex: 'ra_taskpercentdone', flex: 1}
  170. ],
  171. renderTo: Ext.get("mytask")
  172. });
  173. }
  174. }
  175. });
  176. },
  177. });