MeetingSignIn.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /**
  2. * 会议签到
  3. */
  4. Ext.define('erp.view.core.button.MeetingSignIn',{
  5. extend: 'Ext.Button',
  6. alias: 'widget.erpMeetingSignInButton',
  7. iconCls: 'x-button-icon-submit',
  8. cls: 'x-btn-gray',
  9. id:'MeetingSignIn',
  10. text: $I18N.common.button.erpMeetingSignInButton,
  11. style: {
  12. marginLeft: '10px'
  13. },
  14. width: 110,
  15. initComponent : function(){
  16. this.callParent(arguments);
  17. },
  18. listeners: {
  19. click: function(m){
  20. Ext.getCmp('MeetingSignIn').turn('Meeting!SignIn', 'md_maid=(select ma_id from Meetingroomapply where ma_code=\'' + Ext.getCmp('md_meetingcode').value + '\' )', 'oa/meeting/meetingSignIn.action');
  21. }
  22. },
  23. turn: function(nCaller, condition, url){
  24. var win = new Ext.window.Window({
  25. id : 'win',
  26. height: "100%",
  27. width: "80%",
  28. maximizable : true,
  29. buttonAlign : 'center',
  30. layout : 'anchor',
  31. items: [{
  32. tag : 'iframe',
  33. frame : true,
  34. anchor : '100% 100%',
  35. layout : 'fit',
  36. html : '<iframe id="iframe_' + caller + '" src="' + basePath + 'jsps/common/editorColumn.jsp?caller=' + nCaller
  37. + "&condition=" + condition +'" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>'
  38. }],
  39. buttons : [{
  40. name: 'confirm',
  41. text : $I18N.common.button.erpConfirmButton,
  42. iconCls: 'x-button-icon-confirm',
  43. cls: 'x-btn-gray',
  44. listeners: {
  45. buffer: 500,
  46. click: function(btn) {
  47. var grid = Ext.getCmp('win').items.items[0].body.dom.getElementsByTagName('iframe')[0].contentWindow.Ext.getCmp("editorColumnGridPanel");
  48. btn.setDisabled(true);
  49. grid.updateAction(url);
  50. }
  51. }
  52. }, {
  53. text : $I18N.common.button.erpCloseButton,
  54. iconCls: 'x-button-icon-close',
  55. cls: 'x-btn-gray',
  56. handler : function(){
  57. Ext.getCmp('win').close();
  58. }
  59. }]
  60. });
  61. win.show();
  62. }
  63. });