Ext.define('saas.view.money.recBalance.QueryPanel', { extend: 'saas.view.core.query.QueryPanel', xtype: 'money-recbalance-querypanel', controller: 'money-recbalance-querypanel', viewModel: 'money-recbalance-querypanel', viewName: 'money-recbalance-querypanel', queryFormItems: [{ xtype: 'textfield', name: 'rb_code', emptyText :'请输入单号或客户', style:{paddingLeft: '95px'}, getCondition: function(value) { if(value == 'ALL') { return '1=1'; }else { return ' (rb_code like\'%' + value + '%\' ' +' or rb_custcode like \'%'+value+'%\' ' +' or rb_custname like \'%'+value+'%\') '; } } },{ xtype: 'bandinfoDbfindTrigger', name: 'rd_bankname', fieldLabel: '资金账户', showDetail: true },{ xtype: 'condatefield', name: 'rb_date', fieldLabel: '日期', columnWidth: 0.5, operation: 'between' },{ xtype: 'combobox', name: 'rb_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 'rb_statuscode=\'' + value + '\''; } } }], moreQueryFormItems: [], queryGridConfig: { idField: 'id', codeField: 'rb_code', addTitle: '收款单', addXtype: 'money-recbalance-formpanel', defaultCondition:'', baseVastUrl: '/api/money/recbalance/', baseColumn: [{ text: 'id', dataIndex: 'id', width: 100, xtype: 'numbercolumn', hidden: true }, { text: '收款单号', dataIndex: 'rb_code', width: 150 }, { text: '日期', dataIndex: 'rb_date', xtype: 'datecolumn', width: 110 }, { text: '客户名称', dataIndex: 'rb_custname', width: 250, }, { text: '单据状态', dataIndex: 'rb_status', width: 90 }, { text: '收款人', dataIndex: 'rb_manname', width: 110 }, { text: '备注', dataIndex: 'rb_remark', width: 250 }], relativeColumn:[{ text: 'id', dataIndex: 'id', width: 100, xtype: 'numbercolumn', hidden: true }, { text: '收款单号', dataIndex: 'rb_code', width: 150 }, { text: '日期', dataIndex: 'rb_date', xtype: 'datecolumn', width: 110 }, { text: '单据状态', dataIndex: 'rb_status', width: 90 }, { text: '客户名称', dataIndex: 'rb_custname', width: 250, },{ text: '收款人', dataIndex: 'rb_manname', width: 110 },{ text: '资金账户', dataIndex: 'rd_bankname', width: 110 },{ text: '收款金额', xtype: 'numbercolumn', dataIndex: 'rd_amount', width: 120, 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: 'rd_paymethod', width: 90 }, { text: '结算号', dataIndex: 'rd_paycode', width: 90 },{ text: '备注', dataIndex: 'rb_remark', width: 250 }] } });