ResetSync.js 676 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * 刷新同步状态
  3. */
  4. Ext.define('erp.view.core.button.ResetSync', {
  5. extend : 'Ext.Button',
  6. alias : 'widget.erpResetSyncButton',
  7. text : $I18N.common.button.erpResetSyncButton,
  8. iconCls : 'x-button-icon-reset',
  9. cls : 'x-btn-gray',
  10. width : 110,
  11. style : {
  12. marginLeft : '10px'
  13. },
  14. initComponent : function() {
  15. this.callParent(arguments);
  16. },
  17. resetSyncStatus: function(url, id) {
  18. Ext.Ajax.request({
  19. url: url,
  20. params: {
  21. id: id
  22. },
  23. callback: function(opt, s, res) {
  24. var r = Ext.decode(res.responseText);
  25. if(r.success) {
  26. alert('刷新成功!');
  27. } else if(r.exceptionInfo) {
  28. showError(r.exceptionInfo);
  29. }
  30. }
  31. });
  32. }
  33. });