Ext.define('saas.view.stock.appropriationInOut.QueryPanel', { extend: 'saas.view.core.query.QueryPanel', xtype: 'stock-appropriationinout-querypanel', controller: 'stock-appropriationinout-querypanel', viewModel: 'stock-appropriationinout-querypanel', viewName: 'stock-appropriationinout-querypanel', queryFormItems: [{ xtype: 'textfield', name: 'pi_inoutno', emptyText:'请输入单号', getCondition: function(value) { if(value == ''|| value ==null) { return '1=1'; }else { return ' (pi_inoutno like\'%' + value + '%\' ) '; } } }, { xtype: 'productDbfindTrigger', name: 'pr_detail', emptyText:'请输入物料编号或名称', margin:'0 0 0 20' }, { xtype: 'condatefield', name: 'pi_date', fieldLabel: '日期', allowBlank: true, columnWidth: 0.5 }, { xtype: 'combobox', name: 'pi_statuscode', fieldLabel: '单据状态', allowBlank: true, editable:false, columnWidth: 0.25, queryMode: 'local', emptyText :'全部', editable:false, showDetail: true, displayField: 'pi_status', valueField: 'pi_statuscode', store: Ext.create('Ext.data.ArrayStore', { fields: ['pi_statuscode', 'pi_status'], data: [ ["ALL", "全部"], ["AUDITED", "已审核"], ["UNAUDITED", "未审核"] ] }), getCondition: function(value) { if(value == 'ALL') { return '1=1'; }else { return 'pi_statuscode=\'' + value + '\''; } } },{ xtype: 'warehouseDbfindTrigger', name: 'pd_whname', fieldLabel: '拨出仓', emptyText :'请输入仓库名或仓库编号', showDetail: true, getCondition: function(value) { if(value == '' || value == null) { return '1=1'; }else { return ' (pd_whcode like\'%' + value + '%\' or pd_whname like \'%'+value+'%\' ) '; } } },{ xtype: 'warehouseDbfindTrigger', name: 'pd_inwhname', fieldLabel: '拨入仓', emptyText :'请输入仓库名或仓库编号', showDetail: true, getCondition: function(value) { if(value == '' || value == null) { return '1=1'; }else { return ' (pd_inwhcode like\'%' + value + '%\' or pd_inwhname like \'%'+value+'%\') '; } } }, { xtype: 'accountDbfindTrigger', name: 'creatorName', fieldLabel: '录入人', emptyText:'请输入账户名称或姓名', getCondition: function(value) { if(!value) { return '1=1'; }else { return 'prodinout.creatorName like\'%' + value + '%\''; } } }, { xtype: 'accountDbfindTrigger', name: 'pi_auditman', fieldLabel: '审核人', emptyText:'请输入账户名称或姓名' }], moreQueryFormItems: [], queryGridConfig: { idField:'id', codeField:'pi_inoutno', addTitle:'调拨单', addXtype:'stock-appropriationinout-formpanel', defaultCondition:' pi_class = \'调拨单\'', baseVastUrl:'/api/storage/prodinout/', caller:'AppropriationInOut', baseColumn: [{ text: 'id', dataIndex: 'id', hidden:true, xtype: 'numbercolumn' }, { text: '调拨单号', dataIndex: 'pi_inoutno', width: 150 }, { text: '单据类型', dataIndex: 'pi_class', width: 0 }, { text: '单据日期', dataIndex: 'pi_date', xtype:'datecolumn', width: 110 }, { text: '状态', align: 'center', dataIndex: 'pi_status', width: 90 }, { text: '备注', dataIndex: 'pi_remark', width: 250 }], relativeColumn: [{ text: 'id', dataIndex: 'pi_id', xtype: 'numbercolumn', hidden:true }, { text: '调拨单号', dataIndex: 'pi_inoutno', width: 150 }, { text: '单据日期', dataIndex: 'pi_date', xtype:'datecolumn', width: 110 },{ text: '审核状态', align: 'center', dataIndex: 'pi_status', width: 80 },{ text: '序号', dataIndex: 'pd_pdno', hidden: true },{ text: '物料编号', dataIndex: 'pd_prodcode', width: 150 },{ text: '品牌', dataIndex: 'pr_brand', width: 100 },{ text: '物料名称', dataIndex: 'pr_detail', width: 150 },{ text: '型号', dataIndex: 'pr_orispeccode', width: 200 },{ text: '规格', dataIndex: 'pr_spec', width: 200 },{ text: '数量', dataIndex: 'pd_outqty', xtype:'numbercolumn', width: 110, renderer : function(v) { return saas.util.BaseUtil.numberFormat(v, 3, false); } }, { text: '单位', dataIndex: 'pr_unit', width: 65 }, { text: '拨出仓库', dataIndex: 'pd_whname', width: 80 },{ text: '拨入仓库', dataIndex: 'pd_inwhname', width: 80 },{ text: '备注', dataIndex: 'pd_remark', width:250 }] }, getQueryMode: function() { return 'DETAIL'; } });