| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- Ext.define('erp.view.fa.ars.SmQuery', {
- extend : 'Ext.Viewport',
- layout : 'fit',
- initComponent : function() {
- var me = this;
- Ext.apply(me, {
- items : [ {
- xtype: 'erpGridPanel2',
- bbar: null,
- tbar: [{
- name: 'query',
- text: $I18N.common.button.erpQueryButton,
- iconCls: 'x-button-icon-query',
- cls: 'x-btn-gray',
- margin: '0 0 0 3'
- }, {
- xtype: 'tbtext',
- name: 'info',
- tpl: Ext.create('Ext.XTemplate',
- '<span>{cm_yearmonth:this.getYearmonth}</span>', {
- getYearmonth: function(v) {
- if(v instanceof Object) {
- var v1 = String(v.begin), v2 = String(v.end);
- return ' 期间: 从' + v1.substr(0, 4) + '年' + v1.substr(4) + '月 到 ' +
- v2.substr(0, 4) + '年' + v2.substr(4) + '月';
- }
- }
- })
- } ,'->',{
- name: 'refresh',
- text: $I18N.common.button.erpRefreshButton,
- iconCls: 'x-button-icon-reset',
- cls: 'x-btn-gray'
- },'-',{
- name: 'export',
- text: $I18N.common.button.erpExportButton,
- iconCls: 'x-button-icon-excel',
- cls: 'x-btn-gray',
- margin: '0 4 0 0'
- },'-',{
- name: 'print',
- text: $I18N.common.button.erpPrintButton,
- iconCls: 'x-button-icon-print',
- margin: '0 4 0 0',
- cls: 'x-btn-gray'
- },'-',{
- text: $I18N.common.button.erpCloseButton,
- iconCls: 'x-button-icon-close',
- id:'close',
- cls: 'x-btn-gray',
- margin: '0 5 0 0',
- handler: function(){
- var main = parent.Ext.getCmp("content-panel");
- main.getActiveTab().close();
- }
- }],
- setLoading : function(b) {
- var mask = this.mask;
- if (!mask) {
- this.mask = mask = new Ext.LoadMask(Ext.getBody(), {
- msg : "处理中,请稍后...",
- msgCls : 'z-index:10000;'
- });
- }
- if (b)
- mask.show();
- else
- mask.hide();
- },
- cls: 'custom-grid',
- viewConfig: {
- getRowClass: function(record) {
- var s = null, t = record.get('sm_showtype');
- switch(t) {
- case '1':
- s = 'custom';break;
- case '2':
- s = 'custom';break;
- case '3':
- s = null;break;
- case '4':
- s = null;break;
- case '5':
- s = null;break;
- }
- return s;
- }
- }
- } ]
- });
- me.callParent(arguments);
- }
- });
|