12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- Ext.define('erp.view.scm.reserve.MonthAccountDetail',{
- 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: .2
- },
- items: [{
- fieldLabel: '期间',
- margin: '0 0 0 8',
- id: 'info_ym',
- value: ym
- },{
- fieldLabel: '科目',
- value: catecode,
- id:'info_catecode'
- }]
- },{
- xtype: 'grid',
- anchor: '100% 90%',
- columnLines: true,
- columns: [{
- text: '类型',
- cls: 'x-grid-header-1',
- dataIndex: 'typename',
- width: 200
- },{
- text: '存货模块金额',
- cls: 'x-grid-header-1',
- dataIndex: 'pd_sumamount',
- xtype: 'numbercolumn',
- format: '0,000.000',
- align: 'right',
- width: 250
- },{
- text: '总账模块金额',
- cls: 'x-grid-header-1',
- dataIndex: 'vo_sumamount',
- xtype: 'numbercolumn',
- format: '0,000.000',
- align: 'right',
- width: 250
- },{
- text: '差额',
- cls: 'x-grid-header-1',
- dataIndex: 'sumbalance',
- align: 'right',
- width: 250,
- renderer: function(val, meta, record) {
- val = record.get('pd_sumamount') - record.get('vo_sumamount');
- if(record.get('sumbalance') != val) {
- record.set('sumbalance', val);
- }
- return val == 0 ? '' : Ext.util.Format.number(val, '0,000.000');
- }
- }],
- store: Ext.create('Ext.data.Store', {
- fields: [{
- name: 'isCount', type: 'bool'
- },{
- name: 'typename', type: 'string'
- },{
- name: 'pd_sumamount', type: 'number'
- },{
- name: 'vo_sumamount', type: 'number'
- },{
- name: 'sumbalance', type: 'number'
- }],
- viewConfig: {
- getRowClass: function(record) {
- return record.get('isCount') ? 'isCount' : null;
- }
- }
- })
- }]
- });
- me.callParent(arguments);
- }
- });
|