| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- /**
- * 打印按钮
- */
- 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 : '<iframe id="iframe_' + caller + '" src="' + basePath + 'jsps/scm/reserve/selPrintTemplate.jsp?whoami='+lps_barcaller+'" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>'
- }]
- });
- win.show();
- }else{
- showError("没有勾选需要打印的行,请勾选");
- }
- }
- });
|