Consign.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /**
  2. * 转发货按钮
  3. */
  4. Ext.define('erp.view.core.button.Consign',{
  5. extend: 'Ext.Button',
  6. alias: 'widget.erpConsignButton',
  7. iconCls: 'x-button-icon-delete',
  8. cls: 'x-btn-gray',
  9. text: '转 出',
  10. id: 'consign',
  11. style: {
  12. marginLeft: '10px'
  13. },
  14. width: 80,
  15. menu: [/*{
  16. iconCls: 'main-msg',
  17. text: $I18N.common.button.erpConsignButton,
  18. listeners: {
  19. click: function(m){
  20. Ext.getCmp('consign').turn('Sale!ToProdIO!Deal', 'sd_said=' + Ext.getCmp('sa_id').value + ' AND nvl(sd_yqty,0)<sd_qty', 'scm/vastTurnProdIN2.action');
  21. }
  22. }
  23. },*/{
  24. iconCls: 'main-msg',
  25. text: $I18N.common.button.erpTurnNotifyButton,
  26. listeners: {
  27. click: function(m){
  28. Ext.getCmp('consign').turn('Sale!ToAccept!Deal', 'sd_said=' + Ext.getCmp('sa_id').value + ' AND nvl(sd_yqty,0)<sd_qty ', 'scm/sale/turnNotify.action');
  29. }
  30. }
  31. }],
  32. initComponent : function(){
  33. this.callParent(arguments);
  34. },
  35. turn: function(nCaller, condition, url){
  36. var win = new Ext.window.Window({
  37. id : 'win',
  38. height: "100%",
  39. width: "80%",
  40. maximizable : true,
  41. buttonAlign : 'center',
  42. layout : 'anchor',
  43. items: [{
  44. tag : 'iframe',
  45. frame : true,
  46. anchor : '100% 100%',
  47. layout : 'fit',
  48. html : '<iframe id="iframe_' + caller + '" src="' + basePath + 'jsps/common/editorColumn.jsp?caller=' + nCaller
  49. + "&condition=" + condition +'" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>'
  50. }],
  51. buttons : [{
  52. name: 'confirm',
  53. text : $I18N.common.button.erpConfirmButton,
  54. iconCls: 'x-button-icon-confirm',
  55. cls: 'x-btn-gray',
  56. listeners: {
  57. buffer: 500,
  58. click: function(btn) {
  59. var grid = Ext.getCmp('win').items.items[0].body.dom.getElementsByTagName('iframe')[0].contentWindow.Ext.getCmp("editorColumnGridPanel");
  60. btn.setDisabled(true);
  61. grid.updateAction(url);
  62. }
  63. }
  64. }, {
  65. text : $I18N.common.button.erpCloseButton,
  66. iconCls: 'x-button-icon-close',
  67. cls: 'x-btn-gray',
  68. handler : function(){
  69. Ext.getCmp('win').close();
  70. }
  71. }]
  72. });
  73. win.show();
  74. }
  75. });