| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260 |
- Ext.define('erp.view.fa.gs.MonthAccount',{
- extend: 'Ext.Viewport',
- layout: 'anchor',
- hideBorders: true,
- initComponent : function(){
- var me = this;
- Ext.apply(me, {
- items: [{
- xtype: 'form',
- anchor: '100% 10%',
- bodyStyle: 'background:#f1f1f1',
- layout: 'column',
- defaults: {
- xtype: 'displayfield',
- columnWidth: .3,
- margin: '5 10'
- },
- items: [{
- fieldLabel: '期间',
- id: 'info_ym',
- value: Ext.Date.format(new Date(), 'Ym')
- },{
- xtype: 'checkbox',
- id: 'chkun',
- boxLabel: '包括未记账凭证'
- },{
- xtype: 'checkbox',
- id: 'chkbalance',
- boxLabel: '只显示有差额科目'
- }],
- buttonAlign: 'center',
- buttons: [{
- name: 'query',
- id: 'query',
- text: $I18N.common.button.erpQueryButton,
- iconCls: 'x-button-icon-query',
- cls: 'x-btn-gray',
- margin: '0 4 0 0'
- },{
- text: $I18N.common.button.erpCloseButton,
- iconCls: 'x-button-icon-close',
- cls: 'x-btn-gray',
- margin: '0 4 0 0',
- handler: function(){
- var main = parent.Ext.getCmp("content-panel");
- main.getActiveTab().close();
- }
- }]
- },{
- xtype: 'grid',
- anchor: '100% 90%',
- columnLines: true,
- columns: [{
- text: '期间',
- cls: 'x-grid-header-1',
- dataIndex: 'yearmonth',
- xtype: 'numbercolumn',
- format: '0',
- width: 65
- },{
- text: '币别',
- cls: 'x-grid-header-1',
- dataIndex: 'currency',
- width: 50
- },{
- text: '编号',
- cls: 'x-grid-header-1',
- dataIndex: 'code',
- width: 110
- },{
- text: '名称',
- cls: 'x-grid-header-1',
- dataIndex: 'name',
- width: 150
- },{
- text: '期初余额',
- cls: 'x-grid-header-1',
- columns: [{
- text: '银行',
- cls: 'x-grid-header-1',
- dataIndex: 'beginamount',
- xtype: 'numbercolumn',
- format: '0,000.000',
- align: 'right',
- width: 120
- },{
- text: '总账系统',
- cls: 'x-grid-header-1',
- dataIndex: 'cm_beginamount',
- xtype: 'numbercolumn',
- format: '0,000.000',
- align: 'right',
- width: 120
- },{
- text: '差额',
- cls: 'x-grid-header-1',
- dataIndex: 'begindiff',
- align: 'right',
- width: 120,
- renderer: function(val, meta, record) {
- val = record.get('beginamount') - record.get('cm_beginamount');
- if(record.get('begindiff') != val) {
- record.set('begindiff', val);
- }
- return val == 0 ? '' : Ext.util.Format.number(val, '0,000.000');
- }
- }]
- },{
- text: '本期借方发生',
- cls: 'x-grid-header-1',
- columns: [{
- text: '银行',
- cls: 'x-grid-header-1',
- dataIndex: 'nowdebit',
- xtype: 'numbercolumn',
- format: '0,000.000',
- align: 'right',
- width: 120
- },{
- text: '总账系统',
- cls: 'x-grid-header-1',
- dataIndex: 'cm_nowdebit',
- xtype: 'numbercolumn',
- format: '0,000.000',
- align: 'right',
- width: 120
- },{
- text: '差额',
- cls: 'x-grid-header-1',
- dataIndex: 'debitdiff',
- align: 'right',
- width: 120,
- renderer: function(val, meta, record) {
- val = record.get('nowdebit') - record.get('cm_nowdebit');
- if(record.get('debitdiff') != val) {
- record.set('debitdiff', val);
- }
- return val == 0 ? '' : Ext.util.Format.number(val, '0,000.000');
- }
- }]
- },{
- text: '本期贷方发生',
- cls: 'x-grid-header-1',
- columns: [{
- text: '银行',
- cls: 'x-grid-header-1',
- dataIndex: 'nowcredit',
- xtype: 'numbercolumn',
- format: '0,000.000',
- align: 'right',
- width: 120
- },{
- text: '总账系统',
- cls: 'x-grid-header-1',
- dataIndex: 'cm_nowcredit',
- xtype: 'numbercolumn',
- format: '0,000.000',
- align: 'right',
- width: 120
- },{
- text: '差额',
- cls: 'x-grid-header-1',
- dataIndex: 'creditdiff',
- align: 'right',
- width: 120,
- renderer: function(val, meta, record) {
- val = record.get('nowcredit') - record.get('cm_nowcredit');
- if(record.get('creditdiff') != val) {
- record.set('creditdiff', val);
- }
- return val == 0 ? '' : Ext.util.Format.number(val, '0,000.000');
- }
- }]
- },{
- text: '期末余额',
- cls: 'x-grid-header-1',
- columns: [{
- text: '银行',
- cls: 'x-grid-header-1',
- dataIndex: 'endamount',
- xtype: 'numbercolumn',
- format: '0,000.000',
- align: 'right',
- width: 120
- },{
- text: '总账系统',
- cls: 'x-grid-header-1',
- dataIndex: 'cm_endamount',
- xtype: 'numbercolumn',
- format: '0,000.000',
- align: 'right',
- width: 120
- },{
- text: '差额',
- cls: 'x-grid-header-1',
- dataIndex: 'enddiff',
- align: 'right',
- width: 120,
- renderer: function(val, meta, record) {
- val = record.get('endamount') - record.get('cm_endamount');
- if(record.get('enddiff') != val) {
- record.set('enddiff', val);
- }
- return val == 0 ? '' : Ext.util.Format.number(val, '0,000.000');
- }
- }]
- }],
- store: Ext.create('Ext.data.Store', {
- fields: [{
- name: 'type'
- },{
- name: 'isCount', type: 'bool'
- },{
- name: 'yearmonth', type: 'number'
- },{
- name: 'currency', type: 'string'
- },{
- name: 'code', type: 'string'
- },{
- name: 'name', type: 'string'
- },{
- name: 'beginamount', type: 'number'
- },{
- name: 'nowdebit', type: 'number'
- },{
- name: 'nowcredit', type: 'number'
- },{
- name: 'endamount', type: 'number'
- },{
- name: 'cm_beginamount', type: 'number'
- },{
- name: 'cm_nowdebit', type: 'number'
- },{
- name: 'cm_nowcredit', type: 'number'
- },{
- name: 'cm_endamount', type: 'number'
- },{
- name: 'begindiff', type: 'number'
- },{
- name: 'debitdiff', type: 'number'
- },{
- name: 'creditdiff', type: 'number'
- },{
- name: 'enddiff', type: 'number'
- }],
- groupField: 'type'
- }),
- viewConfig: {
- getRowClass: function(record) {
- return record.get('isCount') ? 'isCount' : null;
- }
- },
- features : [Ext.create('Ext.grid.feature.Grouping',{
- groupHeaderTpl: '{name}'
- })]
- }]
- });
- me.callParent(arguments);
- }
- });
|