| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- /**
- *
- */
- Ext.define('erp.view.fa.arp.QueryGrid',{
- extend: 'Ext.grid.Panel',
- alias: 'widget.querygrid',
- layout : 'fit',
- id: 'querygrid',
- emptyText : $I18N.common.grid.emptyText,
- columnLines : true,
- autoScroll : true,
- store: Ext.create('Ext.data.Store', {
- fields:[{
- name: 'vm_yearmonth',
- type: 'string'
- },{
- name: 'vm_vendcode',
- type: 'string'
- },{
- name: 'vm_vendname',
- type: 'string'
- },{
- name: 'vm_currency',
- type: 'string'
- },{
- name: 'asl_date',
- type: 'string'
- },{
- name: 'asl_source',
- type: 'string'
- },{
- name: 'asl_othercode',
- type: 'string'
- },{
- name: 'asl_action',
- type: 'string'
- },{
- name: 'asl_explanation',
- type: 'string'
- },{
- name: 'asl_apamount',
- type: 'number'
- },{
- name: 'asl_payamount',
- type: 'number'
- },{
- name: 'asl_balance',
- type: 'number'
- },{
- name: 'index',
- type: 'number'
- },{
- name: 'vm_esamount',
- type: 'number'
- }],
- data: []
- }),
- defaultColumns: [{
- dataIndex: 'vm_yearmonth',
- cls: 'x-grid-header-1',
- width: 100,
- text: '期间'
- },{
- dataIndex: 'vm_vendcode',
- cls: 'x-grid-header-1',
- text: '供应商号',
- width: 120
- },{
- dataIndex: 'vm_vendname',
- cls: 'x-grid-header-1',
- text: '供应商名',
- width: 200
- },{
- dataIndex: 'vm_currency',
- cls: 'x-grid-header-1',
- text: '币别',
- width: 70
- },{
- dataIndex: 'asl_date',
- cls: 'x-grid-header-1',
- text: '日期',
- width: 100
- },{
- dataIndex: 'asl_source',
- cls: 'x-grid-header-1',
- text: '单据类型',
- width: 100
- },{
- dataIndex: 'asl_othercode',
- cls: 'x-grid-header-1',
- text: '单据编号',
- width: 150
- },{
- dataIndex: 'asl_action',
- cls: 'x-grid-header-1',
- text: '操作',
- width: 100
- },{
- dataIndex: 'asl_explanation',
- cls: 'x-grid-header-1',
- text: '说明',
- width: 150
- },{
- dataIndex: 'asl_apamount',
- cls: 'x-grid-header-1',
- text: '应付金额',
- xtype: 'numbercolumn',
- format: '0,000.00',
- align: 'right',
- width: 100
- },{
- dataIndex: 'asl_payamount',
- cls: 'x-grid-header-1',
- text: '付款金额',
- xtype: 'numbercolumn',
- format: '0,000.00',
- align: 'right',
- width: 100
- },{
- dataIndex: 'vm_esamount',
- cls: 'x-grid-header-1',
- text: '暂估金额',
- xtype: 'numbercolumn',
- format: '0,000.00',
- align: 'right',
- width: 100
- },{
- dataIndex: 'asl_balance',
- cls: 'x-grid-header-1',
- text: '余额',
- xtype: 'numbercolumn',
- format: '0,000.00',
- align: 'right',
- width: 100
- }],
-
- bodyStyle:'background-color:#f1f1f1;',
- cls: 'custom-grid',
- GridUtil: Ext.create('erp.util.GridUtil'),
- initComponent : function(){
- this.columns = this.defaultColumns;
- this.callParent(arguments);
- },
- viewConfig: {
- getRowClass: function(record) {
- return record.get('index')%2 == 0 ? (!Ext.isEmpty(record.get('cm_id')) ? 'custom-first' : 'custom') :
- (!Ext.isEmpty(record.get('cm_id')) ? 'custom-alt-first' : 'custom-alt');
- }
- }
- });
|