Ext.define('saas.view.money.othreceipts.QueryPanel', { extend: 'saas.view.core.query.QueryPanel', xtype: 'money-othreceipts-querypanel', controller: 'money-othreceipts-querypanel', viewModel: 'money-othreceipts-querypanel', viewName: 'money-othreceipts-querypanel', queryFormItems: [ { xtype: 'textfield', name: 'or_code', emptyText:'请输入单号或客户或账号', getCondition: function(value) { return ' (or_code like\'%' + value + '%\'' +' or or_custcode like \'%'+value+'%\'' +' or or_custname like \'%'+value+'%\'' +' or or_bankcode like \'%'+value+'%\'' +' or or_bankname like \'%'+value+'%\'' +') '; } }, { xtype: 'condatefield', name: 'or_date', fieldLabel: '日期', columnWidth: 0.5, operation: 'between' } , { name: 'ord_type', fieldLabel: '收入类别', xtype : "remotecombo", columnWidth: 0.25, emptyText :'全部', storeUrl:'/api/document/fundinouttype/getCombo?condition=收入', hiddenBtn:true,//true 则会关闭新增按钮功能 getCondition: function(value) { if(!value) { return '1=1'; }else { return 'ord_type like \'%' + value + '%\''; } } }, { xtype: 'combobox', name: 'or_statuscode', fieldLabel: '状态', queryMode: 'local', displayField: 'or_status', valueField: 'or_statuscode', emptyText :'全部', columnWidth: 0.25, editable:false, store: Ext.create('Ext.data.ArrayStore', { fields: ['or_statuscode', 'or_status'], data: [ ["ALL", "全部"], ["AUDITED", "已审核"], ["UNAUDITED", "未审核"] ] }), getCondition: function(value) { if(value == 'ALL') { return '1=1'; }else { return 'or_statuscode=\'' + value + '\''; } } }], moreQueryFormItems: [], queryGridConfig: { idField: 'id', codeField: 'or_code', addTitle: '其它收入单', addXtype: 'money-othreceipts-formpanel', defaultCondition:'', baseVastUrl: '/api/money/othreceipts/', baseColumn: [{ text: 'id', dataIndex: 'id', hidden:true }, { text: '单据编号', dataIndex: 'or_code', width: 150 } ,{ text: '日期', dataIndex: 'or_date', xtype: 'datecolumn', width: 110 }, { text: '客户名称', dataIndex: 'or_custname', width: 250 }, { text: '结算账户', dataIndex: 'or_bankname', width: 150 }, { text: '收款金额', xtype: 'numbercolumn', dataIndex: 'or_amount', width: 110, renderer : function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0'); var format = '0,000.' + xr.join(); return Ext.util.Format.number(v, format); } }, { text: '单据状态', dataIndex: 'or_status', width: 90 }, { text: '录入人', dataIndex: 'creatorName', width: 110 },{ text: '审核人', dataIndex: 'or_auditman', width: 110 }, { text: '备注', dataIndex: 'or_remark', width: 250 }], relativeColumn: [] } });