FormBook.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /**
  2. * 使用条例与规则按钮
  3. */
  4. Ext.define('erp.view.core.button.FormBook',{
  5. extend: 'Ext.Button',
  6. alias: 'widget.erpFormBookButton',
  7. iconCls: 'x-button-icon-preview',
  8. cls: 'x-btn-gray',
  9. text: $I18N.common.button.erpFormBookButton,
  10. id: 'formbook',
  11. style: {
  12. marginLeft: '10px'
  13. },
  14. width: 130,
  15. listeners: {
  16. click: function(m){
  17. var form = Ext.getCmp('form'), foid = form.fo_id;
  18. Ext.Ajax.request({//拿到grid的columns
  19. url : basePath + "common/getFieldData.action",
  20. params: {
  21. caller: 'FormBook',
  22. field: 'fb_content',
  23. condition: "fb_foid='" + foid + "'"
  24. },
  25. method : 'post',
  26. async: false,
  27. callback : function(options,success,response){
  28. var res = new Ext.decode(response.responseText);
  29. if(res.exceptionInfo){
  30. showError(res.exceptionInfo);return;
  31. }
  32. if(res.success){
  33. var win = new Ext.window.Window({
  34. title: '使用条例与规则',
  35. height: "90%",
  36. width: "95%",
  37. maximizable : true,
  38. buttonAlign : 'center',
  39. layout : 'anchor',
  40. items: [{
  41. xtype : 'container',
  42. anchor : '100% 100%',
  43. html : res.data,
  44. style: 'padding: 20px;background: #fff'
  45. }]
  46. });
  47. win.show();
  48. }
  49. }
  50. });
  51. }
  52. },
  53. initComponent : function(){
  54. this.callParent(arguments);
  55. }
  56. });