| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- 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:basePath + 'document/vendor/getVendorsByCondition',
- _saveUrl:basePath + 'document/vendor/save',
- _deleteUrl:basePath + '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);
- }
- });
|