| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- /**
- * 转出货按钮
- */
- Ext.define('erp.view.core.button.TurnProdIO',{
- extend: 'Ext.Button',
- alias: 'widget.erpTurnProdIOButton',
- iconCls: 'x-button-icon-submit',
- cls: 'x-btn-gray',
- id: 'turnout',
- text: $I18N.common.button.erpTurnProdIOButton,
- style: {
- marginLeft: '10px'
- },
- width: 110,
- initComponent : function(){
- this.callParent(arguments);
- },
- listeners: {
- click: function(m){
- Ext.getCmp('turnout').turn('SendNotify!ToProdIN!Deal', 'snd_snid=' + Ext.getCmp('sn_id').value +' and snd_yqty < snd_outqty', 'scm/sale/turnProdOut.action?type=ProdInOut!Sale');
- }
- },
- /*menu: [{
- iconCls: 'main-msg',
- text: $I18N.common.button.erpTurnProdIOButton,
- listeners: {
- click: function(m){
- Ext.getCmp('turnout').turn('SendNotify!ToProdIN!Deal', 'snd_snid=' + Ext.getCmp('sn_id').value +' and snd_yqty < snd_outqty', 'scm/sale/turnProdOut.action?type=ProdInOut!Sale');
- }
- }
- },{
- iconCls: 'main-msg',
- text: $I18N.common.button.erpTurnProdOtherButton,
- listeners: {
- click: function(m){
- Ext.getCmp('turnout').turn('SendNotify!ToProdIN!Deal', 'snd_snid=' + Ext.getCmp('sn_id').value +'and snd_yqty < snd_outqty', 'scm/sale/turnProdOut.action?type=ProdInOut!OtherOut');
- }
- }
- }*//*,{
- iconCls: 'main-msg',
- text: $I18N.common.button.erpTurnProdExButton,
- listeners: {
- click: function(m){
- Ext.getCmp('turnout').turn('SendNotify!ToProdIN!Deal', 'snd_snid=' + Ext.getCmp('sn_id').value +'and snd_yqty < snd_outqty', 'scm/sale/turnProdOut.action?type=ProdInOut!ExchangeOut');
- }
- }
- }],*/
- turn: function(nCaller, condition, url){
- var win = new Ext.window.Window({
- id : 'win',
- height: "100%",
- width: "80%",
- maximizable : true,
- buttonAlign : 'center',
- layout : 'anchor',
- items: [{
- tag : 'iframe',
- frame : true,
- anchor : '100% 100%',
- layout : 'fit',
- html : '<iframe id="iframe_' + caller + '" src="' + basePath + 'jsps/common/editorColumn.jsp?caller=' + nCaller
- + "&condition=" + condition +'" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>'
- }],
- buttons : [{
- name: 'confirm',
- text : $I18N.common.button.erpConfirmButton,
- iconCls: 'x-button-icon-confirm',
- cls: 'x-btn-gray',
- listeners: {
- buffer: 500,
- click: function(btn) {
- var grid = Ext.getCmp('win').items.items[0].body.dom.getElementsByTagName('iframe')[0].contentWindow.Ext.getCmp("editorColumnGridPanel");
- btn.setDisabled(true);
- grid.updateAction(url);
- window.location.reload();
- }
- }
- }, {
- text : $I18N.common.button.erpCloseButton,
- iconCls: 'x-button-icon-close',
- cls: 'x-btn-gray',
- handler : function(){
- Ext.getCmp('win').close();
- }
- }]
- });
- win.show();
- }
- });
|