| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311 |
- 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',
- _auditmanField: 'os_auditman',
- _auditdateField: 'os_auditdate',
- _relationColumn: 'osd_osid',
- _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,
- initComponent: function () {
- Ext.apply(this, {
- defaultItems: [{
- xtype: 'hidden',
- name: 'id',
- fieldLabel: 'id'
- }, {
- xtype: 'hidden',
- name: 'os_vendid',
- fieldLabel: '供应商ID'
- }, {
- xtype: 'hidden',
- name: 'os_vendcode',
- fieldLabel: '供应商编号'
- }, {
- xtype: "vendorDbfindTrigger",
- name: "os_vendname",
- fieldLabel: "供应商名称",
- // allowBlank : false
- }, {
- xtype: 'hidden',
- name: 'os_bankid',
- fieldLabel: '结算账户ID'
- }, {
- xtype: 'hidden',
- name: 'os_bankcode',
- fieldLabel: '结算账户编号'
- }, {
- xtype: "bandinfoDbfindTrigger",
- name: "os_bankname",
- fieldLabel: "账户名称",
- allowBlank: false
- }, {
- xtype: 'condbfindtrigger',
- fieldLabel: '币别汇率',
- allowBlank: false,
- dbType: 'currencyDbfindTrigger',
- dbfinds: [{
- from: 'cr_name', to: 'os_currency'
- }, {
- from: 'cr_rate', to: 'os_rate'
- }],
- // defaultValue: {
- // os_currency: 'RMB',
- // os_rate: 1
- // },
- mainFieldConfig: {
- readOnly: true,
- defaultReadOnly: false,
- },
- supFieldConfig: {
- xtype: 'numberfield',
- readOnly: false,
- defaultReadOnly: false,
- defaultValue: 1,
- decimalPrecision: 6,
- vtype: 'positiveNumber'
- }
- // },{
- // xtype: "currencyDbfindTrigger",
- // name: "os_currency",
- // fieldLabel: "币别",
- // defaultValue: 'RMB'
- // }, {
- // xtype: "numberfield",
- // name: "os_rate",
- // fieldLabel: "汇率",
- // defaultValue: 1,
- // decimalPrecision: 6,
- // vtype: 'positiveNumber'
- }, {
- xtype: 'datefield',
- name: 'os_date',
- fieldLabel: '单据日期',
- defaultValue: new Date(),
- allowBlank: false
- }, {
- name: "detailGridField",
- xtype: "detailGridField",
- storeModel: 'saas.model.money.Othspendings',
- detnoColumn: 'osd_detno',
- deleteDetailUrl: '/api/money/othspendings/deleteDetail',
- columns: [{
- text: "id",
- dataIndex: "id",
- xtype: "numbercolumn",
- hidden: true
- }, {
- text: "期间",
- dataIndex: "osd_ym",
- editor: {
- xtype: "numberfield",
- readOnly: true
- },
- // defaultValue: Ext.Date.format(new Date(), 'Ym'),
- width: 110.0,
- hidden: true,
- items: null
- }, {
- text: "支出类别",
- width: 150.0,
- dataIndex: "osd_type",
- items: null,
- allowBlank: false,
- hiddenBtn: false, //true 则会关闭新增按钮功能
- 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: "金额(元)",
- xtype: 'numbercolumn',
- dataIndex: "osd_nowbalance",
- width: 110.0,
- allowBlank: false,
- editor: {
- xtype: "numberfield",
- decimalPrecision: 2
- },
- renderer: function(v, m, r) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- },
- summaryType: 'sum',
- summaryRenderer: function(v, d, f, m) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- }
- }, {
- text: "备注",
- dataIndex: "osd_remark",
- width: 250,
- editor: {
- xtype: "textfield"
- },
- }, {
- dataIndex: "osd_text1",
- text: "自定义字段1",
- width: 100,
- hidden: true,
- initHidden: false,
- editor: {
- xtype: "textfield"
- },
- }, {
- dataIndex: "osd_text2",
- text: "自定义字段2",
- width: 100,
- hidden: true,
- initHidden: false,
- editor: {
- xtype: "textfield"
- },
- }, {
- dataIndex: "osd_text3",
- text: "自定义字段3",
- width: 100,
- hidden: true,
- initHidden: false,
- editor: {
- xtype: "textfield"
- },
- }, {
- dataIndex: "osd_text4",
- text: "自定义字段4",
- width: 100,
- hidden: true,
- initHidden: false,
- editor: {
- xtype: "textfield"
- },
- }, {
- dataIndex: "osd_text5",
- text: "自定义字段5",
- width: 100,
- hidden: true,
- initHidden: false,
- editor: {
- xtype: "textfield"
- },
- }]
- }, {
- xtype: 'numberfield',
- name: 'os_amount',
- fieldLabel: '付款金额(元)',
- readOnly: true
- }, {
- xtype: "textfield",
- name: "os_remark",
- fieldLabel: "备注",
- allowBlank: true,
- columnWidth: 0.75
- }, {
- xtype: "hidden",
- name: "creatorId",
- fieldLabel: "录入人ID",
- readOnly: true
- }, {
- xtype: "textfield",
- name: "creatorName",
- fieldLabel: "录入人",
- readOnly: true
- }, {
- xtype: "datefield",
- name: "createTime",
- fieldLabel: "录入日期",
- readOnly: true,
- defaultValue: new Date()
- }, {
- xtype: "hidden",
- name: "updaterId",
- fieldLabel: "更新人ID",
- readOnly: true
- }, {
- xtype: "hidden",
- name: "updaterName",
- fieldLabel: "更新人",
- readOnly: true
- }, {
- xtype: "hidden",
- name: "updateTime",
- fieldLabel: "更新日期",
- readOnly: true,
- defaultValue: new Date()
- }, {
- xtype: 'textfield',
- name: 'os_auditman',
- fieldLabel: '审核人',
- readOnly: true
- }, {
- xtype: "datefield",
- name: "os_auditdate",
- fieldLabel: "审核日期",
- readOnly: true
- }, {
- xtype: "textfield",
- name: "os_text1",
- fieldLabel: "自定义字段1",
- hidden: true,
- initHidden: false
- }, {
- xtype: "textfield",
- name: "os_text2",
- fieldLabel: "自定义字段2",
- hidden: true,
- initHidden: false
- }, {
- xtype: "textfield",
- name: "os_text3",
- fieldLabel: "自定义字段3",
- hidden: true,
- initHidden: false
- }, {
- xtype: "textfield",
- name: "os_text4",
- fieldLabel: "自定义字段4",
- hidden: true,
- initHidden: false
- }, {
- xtype: "textfield",
- name: "os_text5",
- fieldLabel: "自定义字段5",
- hidden: true,
- initHidden: false
- }]
- });
- this.callParent(arguments);
- },
- });
|