ExecuteECNAuto.js 820 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * 手动执行自然切换的ECN
  3. */
  4. Ext.define('erp.view.core.button.ExecuteECNAuto',{
  5. extend: 'Ext.Button',
  6. alias: 'widget.erpExecuteECNAutoButton',
  7. iconCls: 'x-button-icon-add',
  8. cls: 'x-btn-gray',
  9. id:'ExecuteECNAutobutton',
  10. text: "执行自然切换",
  11. style: {
  12. marginLeft: '10px'
  13. },
  14. width: 120,
  15. initComponent : function(){
  16. this.callParent(arguments);
  17. },
  18. handler:function(btn) {
  19. Ext.Ajax.request({
  20. url: basePath + '/pm/bom/executeAutoECN.action',
  21. params: { },
  22. callback: function(opt, s, r) {
  23. var rs = Ext.decode(r.responseText);
  24. if(rs.exceptionInfo) {
  25. showError(rs.exceptionInfo);
  26. } else {
  27. Ext.Msg.alert("提示","已执行成功自然切换ECN");
  28. window.location.reload();
  29. }
  30. }
  31. });
  32. }
  33. });