Ext.define('saas.view.stock.otherIn.QueryPanel', { extend: 'saas.view.core.query.QueryPanel', xtype: 'stock-otherin-querypanel', controller: 'stock-otherin-querypanel', viewModel: 'stock-otherin-querypanel', viewName: 'stock-otherin-querypanel', queryFormItems: [{ xtype: 'textfield', name: 'pi_inoutno', emptyText:'请输入单号', getCondition: function(value) { if(value == 'ALL') { return '1=1'; }else { return ' (pi_inoutno like\'%' + value + '%\') '; } } }, { xtype: 'productDbfindTrigger', name: 'pr_detail', emptyText:'输入物料编号或名称', margin:'0 0 0 20', showDetail: true }, { xtype: 'condatefield', name: 'pi_date', fieldLabel: '日期', columnWidth: 0.5, operation: 'between' }, { xtype: 'vendorDbfindTrigger', name: 'pi_vendcode', fieldLabel: '供应商', emptyText:'输入供应商编号或名称' }, { xtype: 'combobox', name: 'pi_statuscode', fieldLabel: '单据状态', allowBlank: true, emptyText :'全部', editable:false, queryMode: 'local', 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: '仓库', showDetail: true, emptyText:'请输入仓库编号或名称' }, { 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:'请输入账户名称或姓名' }], queryGridConfig: { idField:'id', codeField:'pi_inoutno', addTitle:'其它入库单', addXtype:'stock-otherin-formpanel', defaultCondition:' pi_class = \'其它入库单\'', baseVastUrl:'/api/storage/prodinout/', caller:'OtherIn', baseColumn: [{ text: 'id', dataIndex: 'id', hidden:true, xtype: 'numbercolumn' }, { text: '入库单号', dataIndex: 'pi_inoutno', width: 150 }, { text: '单据日期', dataIndex: 'pi_date', xtype:'datecolumn', width: 110 }, { text: '金额(元)', xtype: 'numbercolumn', dataIndex: 'pi_costtotal', width: 110, renderer : function(v) { return saas.util.BaseUtil.numberFormat(v, 2, true); }, }, { text: '审核状态', align: 'center', dataIndex: 'pi_status', width: 80 }, { text: '供应商名称', dataIndex: 'pi_vendname', width: 200 },{ 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: '供应商名称', dataIndex: 'pi_vendname', width: 200 }, { text: '审核状态', align: 'center', dataIndex: 'pi_status', width: 80 }, { 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_whname', width: 120 }, { text: '数量', dataIndex: 'pd_inqty', xtype:'numbercolumn', width: 110, renderer : function(v) { return saas.util.BaseUtil.numberFormat(v, 3, false); }, }, { text: '单位', dataIndex: 'pr_unit', width: 65 },{ text: '单价(元)', dataIndex: 'pd_price', xtype:'numbercolumn', width: 110, renderer : function(v) { return saas.util.BaseUtil.numberFormat(v, 4, true); } },{ text: '金额(元)', dataIndex: 'pd_total', xtype:'numbercolumn', width: 110, renderer : function(v) { return saas.util.BaseUtil.numberFormat(v, 2, true); } },{ text: '备注', dataIndex: 'pd_remark', width:250 }] } });