/** * 打印按钮 */ Ext.define('erp.view.core.button.BatchPrint',{ id:'print', extend: 'Ext.Button', alias: 'widget.erpBatchPrintButton', iconCls: 'x-button-icon-print', cls: 'x-btn-gray', text: $I18N.common.button.erpBatchPrintButton, style: { marginLeft: '10px' }, width: 100, initComponent : function(){ this.callParent(arguments); }, handler : function (){ if(caller == 'NewBar!BaPrint'){ lps_barcaller = 'PdaBarcodePrint'; } var bool = false; var grid = Ext.getCmp('batchDealGridPanel'); var items = grid.selModel.getSelection(); Ext.each(items, function(item, index){ if(this.data[grid.keyField] != null && this.data[grid.keyField] != '' && this.data[grid.keyField] != '0' && this.data[grid.keyField] != 0){ bool = true; } }); if(bool){ var win = new Ext.window.Window({ id : 'win', maximizable : true, buttonAlign : 'center', layout : 'anchor', title: '打印模板选择', modal : true, items: [{ tag : 'iframe', frame : true, anchor : '100% 100%', layout : 'fit', html : '' }] }); win.show(); }else{ showError("没有勾选需要打印的行,请勾选"); } } });