JprocessGrid.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. Ext.define('erp.view.sys.hr.JprocessGrid',{
  2. extend: 'Ext.grid.Panel',
  3. //store:Ext.data.StoreMgr.lookup('employeeStore'),
  4. alias: 'widget.jprocessgrid',
  5. id:'jprocessgrid',
  6. //selModel: new Ext.selection.CheckboxModel(),
  7. //title:'人事资料<span style="color:gray">(所有)</span>',
  8. columnLines: true,
  9. viewConfig: {
  10. stripeRows: true,
  11. enableTextSelection: true
  12. },
  13. forceFit:true,
  14. dockedItems: [{
  15. xtype: 'toolbar',
  16. ui: 'footer',
  17. items: [{
  18. xtype:'tbtext',
  19. text:'<span style="font-weight:bold;" >审批流程定义</span>'
  20. },{ xtype: 'tbseparator' },{
  21. text:'载入标准流程',
  22. itemId:'loadprocess',
  23. tooltip:'获取标准流程',
  24. iconCls:'btn-get'
  25. },'-',{
  26. text:'设计流程',
  27. href :basePath+'workfloweditor/workfloweditor.jsp',
  28. tooltip:'添加新记录',
  29. iconCls:'btn-add'
  30. },'-',{
  31. text:'刷新',
  32. iconCls:'btn-refresh',
  33. tooltip:'刷新数据',
  34. handler:function(btn){
  35. btn.ownerCt.up('grid').getStore().load();
  36. }
  37. },'-',{
  38. text:'帮助',
  39. iconCls:'btn-help',
  40. tooltip:'帮助简介'
  41. }]
  42. }],
  43. columns:[/*Ext.create('Ext.grid.RowNumberer',{
  44. width:35
  45. }),*/{
  46. dataIndex:'jd_id',
  47. width:0,
  48. text:'ID'
  49. },{
  50. dataIndex:'jd_caller',
  51. width:200,
  52. text:'页面CALLER'
  53. },{
  54. dataIndex:'jd_processdefinitionname',
  55. width:200,
  56. flex:1,
  57. text:'流程名称',
  58. renderer:function(val, meta, record){
  59. return '<a href="'+basePath+'jsps/common/jprocessDeploy.jsp?formCondition=jd_idIS'+record.get('jd_id')+'" target="_blank">'+val+'</a>';
  60. }
  61. }],
  62. store:Ext.create('Ext.data.Store',{
  63. fields:[{name:'jd_id',type:'number'},
  64. {name:'jd_caller',type:'string'},
  65. {name:'jd_processdefinitionname',type:'string'},
  66. {name:'jd_processdefinitionid',type:'string'}],
  67. proxy: {
  68. type: 'ajax',
  69. extraParams:{
  70. condition:'1=1'
  71. },
  72. url: basePath+'/common/getProcessInfoByCondition.action',
  73. reader: {
  74. type: 'json',
  75. root: 'data'
  76. }
  77. },
  78. autoLoad: true
  79. }),
  80. initComponent : function(){
  81. var me=this;
  82. //me.plugins = [me.cellEditingPlugin = Ext.create('Ext.grid.plugin.CellEditing')];
  83. this.callParent(arguments);
  84. }
  85. })