level 1
Winnie_黄瓜
楼主
/** * 清单打印明细 */Ext.ns("Ext.ux.orca");Ext.ux.orca.BillPrintPanel = Ext.extend(Ext.Panel, {cm : null,sm : null,store : null,gridPanel : null,gridPanelId : null,storeMapping : null,height : null,applyTo : null,pageSize : null,UserText : null,beginTimeText : null,overTimeText : null,baseUrl : null,primaryKey : null,constructor : function(config) {config = config || {};this.primaryKey = 'printTime';this.pageSize = config.pageSize || 10;this.height = config.height || 500;this.applyTo = config.applyTo;this.baseUrl = 'control/
bp
t';this.gridPanelId = 'gridPanel' + this.primaryKey;this.storeMapping = ['area','city','bizShop','mobile', 'brandType', 'printTime', 'billType','printCount', 'printMonth', 'devId', 'divIP','cityName'];Ext.apply(Ext.form.VTypes, {daterange : function(val, field) {var date = field.parseDate(val);if (!date) {return;}if (field.startDateField&& (!this.dateRangeMax || (date.getTime() != this.dateRangeMax.getTime()))) {var start = Ext.getCmp(field.startDateField);start.setMaxValue(date);start.validate();this.dateRangeMax = date;} else if (field.endDateField&& (!this.dateRangeMin || (date.getTime() != this.dateRangeMin.getTime()))) {var end = Ext.getCmp(field.endDateField);end.setMinValue(date);end.validate();this.dateRangeMin = date;}return true;}});this.payType_Store = new Ext.data.SimpleStore({fields : ['payType', 'value'],data : [['现金', '10'], ['银行卡', '20']]});this.payType = new Ext.form.ComboBox({fieldLabel : '缴费方式',editable : false,allowBlank : true,width : 110,triggerAction : 'all',store : this.payType_Store,displayField : 'payType',valueField : 'value',hiddenName : 'payType',mode : 'local',forceSelecttion : true,resizeable : true,typeAhead : true,handleHeight : 10,value : '10'});this.statisticType_Store = new Ext.data.SimpleStore({fields : ['payType', 'value'],data : [['按市统计', '00'], ['按营业厅统计', '11']]});this.statisticType = new Ext.form.ComboBox({fieldLabel : '统计类型',editable : false,allowBlank : true,width : 110,triggerAction : 'all',store : this.statisticType_Store,displayField : 'payType',valueField : 'value',hiddenName : 'payType',mode : 'local',forceSelecttion : true,resizeable : true,typeAhead : true,handleHeight : 10,value : '00'});this.searchForm = new Ext.form.FormPanel({plain : true,layout : 'form',baseCls : 'x-plain',buttonAlign : 'center',bodyStyle : 'padding:20px 0px 0px 5px',autoHeight : true,labelAlign : 'right',border : false,frame : false,buttons : [{id : 'resetButton',text : '重置',pressed : true,handler : function() {this.searchForm.form.reset();this.on_SetDate();},scope : this}, {id : 'searchButton',text : '查询',pressed : true,iconCls : 'searchIcon',handler : this.on_search,scope : this}],ite***ayout : 'column',border : false,frame : false,items : [{width : 200,layout : 'form',border : false,frame : false,labelWidth : 80,labelAlign : 'center',defaultType : 'textfield',items : [{xtype : 'datefield',vtype : 'daterange',name : 'beginDate',id : 'beginDate',endDateField : 'endDate',fieldLabel : '开始时间',width : 90,editable : false,allowBlank : false,emptyText : '请选择日期',format : 'Y-m-d',invalidText : '日期格式无效'}, {xtype : 'datefield',name : 'endDate',id : 'endDate',vtype : 'daterange',startDateField : 'beginDate',fieldLabel : '结束时间',width : 90,editable : false,allowBlank : false,emptyText : '请选择日期',format : 'Y-m-d',invalidText : '日期格式无效'}]}, {width : 120,layout : 'form',border : false,frame : false,labelAlign : 'center',defaultType : 'textfield',items : [{xtype
2012年07月13日 09点07分
1
bp
t';this.gridPanelId = 'gridPanel' + this.primaryKey;this.storeMapping = ['area','city','bizShop','mobile', 'brandType', 'printTime', 'billType','printCount', 'printMonth', 'devId', 'divIP','cityName'];Ext.apply(Ext.form.VTypes, {daterange : function(val, field) {var date = field.parseDate(val);if (!date) {return;}if (field.startDateField&& (!this.dateRangeMax || (date.getTime() != this.dateRangeMax.getTime()))) {var start = Ext.getCmp(field.startDateField);start.setMaxValue(date);start.validate();this.dateRangeMax = date;} else if (field.endDateField&& (!this.dateRangeMin || (date.getTime() != this.dateRangeMin.getTime()))) {var end = Ext.getCmp(field.endDateField);end.setMinValue(date);end.validate();this.dateRangeMin = date;}return true;}});this.payType_Store = new Ext.data.SimpleStore({fields : ['payType', 'value'],data : [['现金', '10'], ['银行卡', '20']]});this.payType = new Ext.form.ComboBox({fieldLabel : '缴费方式',editable : false,allowBlank : true,width : 110,triggerAction : 'all',store : this.payType_Store,displayField : 'payType',valueField : 'value',hiddenName : 'payType',mode : 'local',forceSelecttion : true,resizeable : true,typeAhead : true,handleHeight : 10,value : '10'});this.statisticType_Store = new Ext.data.SimpleStore({fields : ['payType', 'value'],data : [['按市统计', '00'], ['按营业厅统计', '11']]});this.statisticType = new Ext.form.ComboBox({fieldLabel : '统计类型',editable : false,allowBlank : true,width : 110,triggerAction : 'all',store : this.statisticType_Store,displayField : 'payType',valueField : 'value',hiddenName : 'payType',mode : 'local',forceSelecttion : true,resizeable : true,typeAhead : true,handleHeight : 10,value : '00'});this.searchForm = new Ext.form.FormPanel({plain : true,layout : 'form',baseCls : 'x-plain',buttonAlign : 'center',bodyStyle : 'padding:20px 0px 0px 5px',autoHeight : true,labelAlign : 'right',border : false,frame : false,buttons : [{id : 'resetButton',text : '重置',pressed : true,handler : function() {this.searchForm.form.reset();this.on_SetDate();},scope : this}, {id : 'searchButton',text : '查询',pressed : true,iconCls : 'searchIcon',handler : this.on_search,scope : this}],ite***ayout : 'column',border : false,frame : false,items : [{width : 200,layout : 'form',border : false,frame : false,labelWidth : 80,labelAlign : 'center',defaultType : 'textfield',items : [{xtype : 'datefield',vtype : 'daterange',name : 'beginDate',id : 'beginDate',endDateField : 'endDate',fieldLabel : '开始时间',width : 90,editable : false,allowBlank : false,emptyText : '请选择日期',format : 'Y-m-d',invalidText : '日期格式无效'}, {xtype : 'datefield',name : 'endDate',id : 'endDate',vtype : 'daterange',startDateField : 'beginDate',fieldLabel : '结束时间',width : 90,editable : false,allowBlank : false,emptyText : '请选择日期',format : 'Y-m-d',invalidText : '日期格式无效'}]}, {width : 120,layout : 'form',border : false,frame : false,labelAlign : 'center',defaultType : 'textfield',items : [{xtype