Ext.define('saas.view.money.othspendings.FormPanel', { extend: 'saas.view.core.form.FormPanel', xtype: 'money-othspendings-formpanel', controller: 'money-othspendings-formpanel', viewModel: 'money-othspendings-formpanel', viewName: 'money-othspendings-formpanel', caller:'OthSpendings', //字段属性 _title:'其它支出单', _idField: 'id', _codeField: 'os_code', _statusField: 'os_status', _statusCodeField: 'os_statuscode', _relationColumn: 'osd_orid', _readUrl:'/api/money/othspendings/read/', _saveUrl:'/api/money/othspendings/save/', _auditUrl:'/api/money/othspendings/audit/', _unAuditUrl: '/api/money/othspendings/unAudit/', _deleteUrl:'/api/money/othspendings/delete/', initId:0, defaultItems: [{ xtype: 'hidden', name: 'id', fieldLabel: 'id' }, { xtype : 'hidden', name : 'os_vendid', fieldLabel : '供应商ID' }, { xtype : 'hidden', name : 'os_vendcode', fieldLabel : '供应商编号' }, { xtype : "dbfindtrigger", name : "os_vendname", fieldLabel : "供应商名称", allowBlank : false }, { xtype : 'hidden', name : 'os_bankid', fieldLabel : '结算账户ID' }, { xtype : 'hidden', name : 'os_bankcode', fieldLabel : '结算账户编号' }, { xtype : "dbfindtrigger", name : "os_bankname", fieldLabel : "账户名称", allowBlank : false }, { xtype:'datefield', name : 'os_date', fieldLabel : '单据日期' },{ name : "detailGridField", xtype : "detailGridField", storeModel:'saas.model.money.Othspendings', detnoColumn: 'osd_detno', deleteDetailUrl:'/api/money/othspendings/deleteDetail/', columnWidth : 1, columns : [ { text : "id", dataIndex : "id", xtype : "numbercolumn", width:0 }, { text : "期间", dataIndex : "osd_ym", editor : { xtype : "numberfield", readOnly:true }, // defaultValue: Ext.Date.format(new Date(), 'Ym'), width : 120.0, hidden: true, items : null }, { text : "支出类别", width : 200.0, dataIndex : "osd_type", items : null, editor : { xtype : "remotecombo", storeUrl:'/api/document/fundinouttype/getCombo?condition=支出', addHandler:function(b){ var document = Ext.create('saas.view.document.kind.Kind',{}); var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt; this.dialog = form.getController().getView().add({ xtype: 'document-kind-childwin', bind: { title: '新增收入类别' }, dataKind:'inoutkind', belong:document.etc['inoutkind'], _parent:form, _combo:this.ownerCmp, record:null, session: true }); this.dialog.show(); } } }, { text : "金额", dataIndex : "osd_nowbalance", width : 120.0, editor : { xtype : "numberfield", decimalPrecision: 2 }, renderer : function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length)).fill('0'); var format = '0,000.' + xr.join(); return Ext.util.Format.number(v, format); }, summaryType: 'sum', summaryRenderer: function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length)).fill('0'); var format = '0,000.' + xr.join(); return Ext.util.Format.number(v, format); } }, { text : "备注", dataIndex : "osd_remark", width : 250, editor : { xtype : "textfield" }, } ] },{ xtype : 'numberfield', name : 'os_amount', fieldLabel : '付款金额', readOnly:true },{ xtype : "textfield", name : "os_remark", fieldLabel : "备注", allowBlank : true, columnWidth : 0.75 }, { xtype : "textfield", name : "os_recorder", fieldLabel : "录入人", readOnly:true }, { xtype : "datefield", name : "os_recorddate", fieldLabel : "录入日期", readOnly:true } ] });