Ext.define('saas.view.money.verification.QueryPanel', { extend: 'saas.view.core.query.QueryPanel', xtype: 'money-verification-querypanel', controller: 'money-verification-querypanel', viewModel: 'money-verification-querypanel', viewName: 'money-verification-querypanel', queryFormItems: [{ xtype: 'textfield', name: 'vc_code', fieldLabel: '', emptyText :'请输入单号或者供应商名或者客户名', getCondition: function(value) { if(value == 'ALL') { return '1=1'; }else { return ' (vc_code like\'%' + value + '%\' ' +' or vc_vendcode like \'%'+value+'%\' ' +' or vc_custcode like \'%'+value+'%\') '; } } },{ xtype: 'condatefield', name: 'vc_date', fieldLabel: '单据日期', columnWidth: 0.5, operation: 'between' },{ xtype: 'combobox', name: 'vc_statuscode', fieldLabel: '审核状态', queryMode: 'local', displayField: 'name', valueField: 'value', emptyText :'全部', editable:false, store: Ext.create('Ext.data.ArrayStore', { fields: ['value', 'name'], data: [ ["ALL", "全部"], ["AUDITED", "已审核"], ["UNAUDITED", "未审核"] ] }), getCondition: function(value) { if(value == 'ALL') { return '1=1'; }else { return 'vc_statuscode=\'' + value + '\''; } } },{ xtype: 'combobox', name: 'vc_kind', fieldLabel: '业务类型', queryMode: 'local', displayField: 'name', valueField: 'value', emptyText :'全部', editable:false, store: Ext.create('Ext.data.ArrayStore', { fields: ['value', 'name'], data: [ ["ALL", "全部"], ["预收冲应收", "预收冲应收"], ["预付冲应付", "预付冲应付"], ["应收冲应付", "应收冲应付"], ["应收转应收", "应收转应收"], ["应付转应付", "应付转应付"] ] }), getCondition: function(value) { if(value == 'ALL') { return '1=1'; }else { return 'vc_kind=\'' + value + '\''; } } }], moreQueryFormItems: [], queryGridConfig: { idField: 'vc_id', codeField: 'vc_code', addTitle: '核销单', addXtype: 'money-verification-formpanel', defaultCondition:'', baseVastUrl: '/api/money/verification/', baseColumn: [{ text: 'id', dataIndex: 'id', width: 100, xtype: 'numbercolumn', hidden: true }, { text: '单据编号', dataIndex: 'vc_code', width: 180 }, { text: '单据日期', dataIndex: 'vc_date', xtype: 'datecolumn', width: 100 },{ text: '审核状态', dataIndex: 'vc_status', width: 100 },{ text: '业务类型', dataIndex: 'vc_kind', width: 100 }, { text: '客户编号', dataIndex: 'vc_custcode', hidden: true }, { text: '客户名称', dataIndex: 'vc_custname', width: 130 }, { text: '供应商编号', dataIndex: 'vc_vendcode', hidden: true }, { text: '供应商名称', dataIndex: 'vc_vendname', width: 130 }, { text: '核销金额', dataIndex: 'vc_amount1', xtype: 'numbercolumn', width: 100, 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); } }] } });