StandMeetingMan.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. Ext.define('erp.view.oa.meeting.StandMeetingMan',{
  2. extend:'Ext.grid.Panel',
  3. alias:'widget.StandMeetingMan',
  4. requires:['erp.view.oa.meeting.StandMeetingManbar'],
  5. layout:'fit',
  6. id:'StandMeetingMan',
  7. emptyText : $I18N.common.grid.emptyText,
  8. columnLines : true,
  9. autoScroll : true,
  10. detno:'smm_detno',
  11. keyField:'smm_id',
  12. mainField:'smm_smid',
  13. columns:[],
  14. bodyStyle:'bachgroud-color:#f1f1f1;',
  15. plugins:Ext.create('Ext.grid.plugin.CellEditing',{
  16. clicksToEdit:1
  17. }),
  18. bbar:{
  19. xtype: 'StandMeetingManbar',
  20. id:'StandMeetingManbar'
  21. },
  22. test:0,
  23. GridUtil:Ext.create('erp.util.GridUtil'),
  24. BaseUtil:Ext.create('erp.util.BaseUtil'),
  25. initComponent:function(){
  26. this.callParent(arguments);
  27. // console.log(urlCondition);
  28. //得到页面上显示的formCondition属性
  29. var urlCondition = this.BaseUtil.getUrlParam('formCondition');
  30. //定义通过IS拆分后的数值
  31. var cons=null;
  32. //存在urlCondition的情况下
  33. if(urlCondition){
  34. //对urlCondition进行拆分 urlCondition的格式一半为pp_idIS1
  35. if(urlCondition.indexOf('IS')>=0){
  36. cons = urlCondition.split("IS");
  37. }else{
  38. cons = urlCondition.split("=");
  39. if(cons[1].indexOf('\'')>=0){
  40. cons[1]=cons[1].slice(1,cons[1].length-1);
  41. }
  42. }
  43. }
  44. var pp_id=0;
  45. if(cons!=null){
  46. if(cons[0]&&cons[1]){
  47. if(cons[0]!=null&&cons[0]!=''){
  48. if(cons[1]>0){
  49. pp_id=cons[1];
  50. }else{
  51. pp_id=0;
  52. }
  53. }
  54. }
  55. }
  56. var condition = " smm_smid='"+pp_id+"'";
  57. this.getMyData(condition);
  58. },
  59. getMyData:function(condition){
  60. // console.log(condition);
  61. var me = this;
  62. var params = {
  63. caller:"StandMeetingMan",
  64. condition:condition
  65. };
  66. if(me.columns && me.columns.length > 2){
  67. me.GridUtil.loadNewStore(me,params);
  68. } else {
  69. me.GridUtil.getGridColumnsAndStore(me,'common/singleGridPanel.action',params);
  70. }
  71. }
  72. });