Ext.define('saas.view.document.vendor.FormPanel', { extend: 'saas.view.core.baseform.FormPanel', xtype: 'document-vendor-formpanel', controller: 'document-vendor-formpanel', viewModel: 'document-vendor-formpanel', //工具类 FormUtil: Ext.create('saas.util.FormUtil'), BaseUtil: Ext.create('saas.util.BaseUtil'), //基础属性 layout: 'fit', autoScroll: true, border: 1, bodyPadding: 5, fieldDefaults: { margin: '0 5 5 0', labelAlign: 'right', labelWidth: 90, blankText: '该字段不能为空' }, //字段属性 _title:'供应商管理', _dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition', _saveUrl:'http://192.168.253.228:8800/api/document/vendor/save', _deleteUrl:'http://192.168.253.228:8800/api/document/vendor/delete', initComponent: function () { var me = this; Ext.apply(me, { items: [{ name : "vendorGrid", xtype : "core-baseform-gridpanel", layout:'fit', dataUrl:me._dataUrl, columns : [ { text : "序号", dataIndex : "pd_detno", width : 100, xtype : "numbercolumn", align : 'center', format:'0', summaryType: 'count', summaryRenderer: function(value, summaryData, dataIndex) { return Ext.String.format('合计: {0}条', value); }, }, { editor : { displayField : "display", editable : true, format : "", hideTrigger : false, maxLength : 100.0, minValue : null, positiveNum : false, queryMode : "local", store : null, valueField : "value", xtype : "multidbfindtrigger" }, text : "物料编号", width : 200.0, dataIndex : "pd_prodcode", xtype : "", items : null }, { text : "单位", editor : { xtype : "textfield" }, dataIndex : "pd_unit", width : 120.0, xtype : "", items : null }, { text : "数量", dataIndex : "pd_yqty", editor : { xtype : "numberfield" }, width : 120.0, xtype : "numbercolumn", format:'0', items : null, summaryType: 'sum' }, { text : "单价", editor : { xtype : "numberfield" }, format:'0,000.00', dataIndex : "pd_price", width : 120.0, xtype : "numbercolumn", items : null, summaryType: 'sum' }, { text : "总额", dataIndex : "pd_total", width : 120.0, xtype : "numbercolumn", summaryType: 'sum' }, { text : "税额", dataIndex : "pd_taxtotal", flex : 1.0, xtype : "numbercolumn", summaryType: 'sum' } ] }] }); me.callParent(arguments); } });