feedbackbar.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. Ext.define('erp.view.opensys.feedback.feedbackbar',{
  2. extend: 'Ext.view.View',
  3. alias: 'widget.processview',
  4. border:false,
  5. style: {
  6. position: 'absolute'
  7. },
  8. itemSelector:'li',
  9. activeItem:0,
  10. /* '<h3><span>{fl_date}<br /> {fl_man}</span>',
  11. '<font color="blue">{fl_position:this.formatTitle} &nbsp;&nbsp;</font></h3>',
  12. '<p>处理方式 :<font color="green">{fl_kind:this.formatKind}</font> {fl_remark}</p>',*/
  13. listeners:{
  14. 'itemclick':function(view,record,item,index){
  15. /* if(item.getAttribute("class") && item.getAttribute("class").indexOf('normal')>-1)
  16. item.setAttribute("class","normal active");
  17. else item.setAttribute("class","active");
  18. var syspanel=Ext.getCmp('syspanel');
  19. syspanel.changeCard(syspanel,null,index); */
  20. }
  21. },
  22. initComponent : function(){
  23. var me=this,data=me.showdata||me.getData();
  24. data[0].type='start';
  25. data[data.length-1].type='end';
  26. Ext.apply(this,{
  27. tpl:Ext.create('Ext.XTemplate',
  28. '<div id="progress" class="progress"><div class="steps">',
  29. '<tpl for=".">',
  30. '<p class="{type} remark"><font color="blue">{fl_position} &nbsp;&nbsp;</font> &nbsp;&nbsp;{fl_date}</br>',
  31. '处理方式 :<font color="green">{fl_kind:this.formatKind}</font> {fl_remark}<p>',
  32. '<div >',
  33. '<tpl if="type != \'start\'">',
  34. '<span class="circle"></span>',
  35. '<tpl else>',
  36. '<span class="active circle"></span>',
  37. '</tpl>',
  38. '<tpl if="type != \'end\'">',
  39. '<span class="lines"></span>',
  40. '</tpl>',
  41. '</div>',
  42. '</tpl></div></div>',{formatKind: function(value){
  43. if(value=='PLAN') return '回复处理';
  44. else if(value=='CHANGEHANDLER') return '变更处理人';
  45. else if(value=='REVIEW') return '确认处理';}
  46. }),
  47. store: Ext.create('Ext.data.Store', {
  48. fields:[{name: 'fl_man' },
  49. {name: 'fl_date'},
  50. {name: 'fl_position'},
  51. {name: 'fl_remark'},
  52. {name: 'fl_kind'},
  53. {name: 'type'}],
  54. data:data
  55. })
  56. });
  57. this.callParent(arguments);
  58. },
  59. getData:function(dataview){
  60. var data=null,id=Ext.getCmp('fb_id').getValue();
  61. Ext.Ajax.request({
  62. url : basePath + "common/loadNewGridStore.action",
  63. params: {
  64. caller:'Feedback',
  65. condition:'fl_fbid='+id +' order by fl_date desc'
  66. },
  67. async:false,
  68. method : 'post',
  69. callback : function(options,success,response){
  70. var res = new Ext.decode(response.responseText);
  71. if(res.exceptionInfo){
  72. showError(res.exceptionInfo);return;
  73. }
  74. data = res.data;
  75. }
  76. });
  77. return data;
  78. }
  79. });