| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- Ext.define('uas.view.form.formpanel.Grid', {
- extend: 'Ext.grid.Panel',
- xtype: 'formpanel-grid',
- requires: [
- 'Ext.selection.CellModel',
- 'Ext.grid.feature.Summary'
- ],
- emptyText: '无数据',
- loadMask: true,
- bind:'{formGridStore}',
- features: [{
- ftype: 'summary',
- dock: 'bottom'
- }],
- selModel: {
- type: 'cellmodel'
- },
- plugins: {
- cellediting: {
- clicksToEdit: 1
- }
- },
- initComponent: function () {
- var me = this;
- Ext.apply(me, {
- store: Ext.create('uas.store.FormGridStore',{
- grid: me,
- autoLoad: true,
- autoDestroy: true
- })
- });
- me.callParent(arguments);
- },
- dockedItems: [{
- cls:'x-grid-operateToolbar',
- xtype: 'toolbar',
- dock: 'top',
- height:32,
- defaults:{
- cls:'x-btn-blue',
- xtype:'button',
- margin:'0 0 0 6',
- },
- items:[{
- text:'新增'
- },{
- text:'处理'
- },{
- text:'删除'
- },{
- text:'复制行'
- },{
- text:'粘贴行'
- }]
- }],
- columns: [{
- dataIndex: 'id',
- text: '序号',
- width:110,
- align:'center',
- locked: true,
- summaryType: 'count',
- summaryRenderer: function(value, summaryData, dataIndex) {
- return Ext.String.format('共{0}条', value);
- }
- }, {
- dataIndex: 'code',
- text: '采购单号(单选)',
- width:200,
- locked: true,
- filter: {
- type:'string'
- },
- editor: {
- name:'code',
- xtype:'producttrigger',
- allowBlank: false,
- selectOnFocus: false
- }
- },{
- dataIndex: 'vcode',
- text: '供应商编号(多选)',
- width:200,
- locked: true,
- filter: {
- type:'string'
- },
- editor: {
- name:'vcode',
- xtype:'vendormultitrigger',
- allowBlank: false,
- selectOnFocus: false
- }
- }, {
- dataIndex: 'status',
- text: '单据状态',
- width:100,
- filter: {
- type:'string'
- }
- }, {
- xtype: 'datecolumn',
- dataIndex: 'date',
- text: '下单日期',
- width: 200,
- filter: {
- type:'date'
- }
- }, {
- dataIndex: 'vendor',
- text: '供应商名',
- width: 220,
- filter: {
- type:'string'
- }
- }, {
- xtype:'numbercolumn',
- dataIndex: 'price',
- text: '含税金额',
- format:'0,000.00',
- width:190,
- filter: {
- type:'number'
- },
- summaryType: 'sum',
- summaryRenderer: function(value, summaryData, dataIndex) {
- return Ext.String.format('合计:{0} 元', value.toFixed(2));
- }
- },{
- dataIndex: 'special',
- text:'特殊采购',
- width:120,
- filter: {
- type:'combo',
- combo:[
- ["true", "是"],
- ["false", "否"]
- ]
- }
- },{
- dataIndex: 'currency',
- text: '币别',
- width:70
- },{
- dataIndex: 'recordman',
- text: '采购员',
- width:70
- },{
- dataIndex: 'auditman',
- text: '审核人',
- width:70
- }]
- });
|