Ext.define('saas.view.purchase.purchaseOut.QueryPanel', { extend: 'saas.view.core.query.QueryPanel', xtype: 'purchase-purchaseout-querypanel', controller: 'purchase-purchaseout-querypanel', viewModel: 'purchase-purchaseout-querypanel', viewName: 'purchase-purchaseout-querypanel', queryFormItems: [{ xtype: 'hidden', name: 'id', fieldLabel: 'ID', allowBlank: true, columnWidth: 0 }, { xtype: 'textfield', name: 'pi_inoutno', fieldLabel: '单据编号', allowBlank: true, columnWidth: 0.25 }, { xtype: 'condatefield', name: 'pi_date', fieldLabel: '单据日期', allowBlank: true, columnWidth: 0.5 }, { xtype: 'textfield', name: 'pi_vendcode', fieldLabel: '供应商编号', allowBlank: true, hidden:true, columnWidth: 0.25 },{ xtype: 'textfield', name: 'pi_vendcode', fieldLabel: '供应商编号', allowBlank: true, hidden:true, columnWidth: 0.25 }, { xtype: 'dbfindtrigger', name: 'pi_vendname', fieldLabel: '供应商名称', emptyText:'输入供应商编号或名称', allowBlank: true, columnWidth: 0.25 }, { xtype: 'dbfindtrigger', name: 'pd_prodcode', fieldLabel: '物料编号', hidden:true, showDetail: true }, { xtype: 'dbfindtrigger', name: 'pr_detail', fieldLabel: '物料名称', emptyText:'输入物料编号或名称', showDetail: true }, { xtype: 'combobox', name: 'pi_statuscode', fieldLabel: '审核状态', allowBlank: true, emptyText :'全部', editable:false, columnWidth: 0.25, 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 + '\''; } } }], queryGridConfig: { idField:'id', codeField:'pi_inoutno', addTitle:'采购验退单', addXtype:'purchase-purchaseout-formpanel', defaultCondition:' pi_class = \'采购验退单\'', baseVastUrl:'/api/purchase/prodinout/', // baseVastUrl:"http://localhost:8800/prodinout/", baseColumn: [{ text: 'id', dataIndex: 'id', hidden:true, xtype: 'numbercolumn' }, { text: '单据编号', dataIndex: 'pi_inoutno', width: 200 },{ text: '单据类型', dataIndex: 'pi_class', width: 120 },{ text: '单据日期', dataIndex: 'pi_date', xtype:'datecolumn', width: 200 },{ text: '审核状态', dataIndex: 'pi_status', width: 120 },{ text: '供应商名称', dataIndex: 'pi_vendname', width: 120 },{ text: '制单人', dataIndex: 'pi_recordman', width: 120 },{ text: '审核人', dataIndex: 'pi_auditman', width: 120 },{ text: '备注', dataIndex: 'pi_remark', width: 200 }], relativeColumn: [{ text: 'id', dataIndex: 'pu_id', xtype: 'numbercolumn', hidden:true }, { text: '单据编号', dataIndex: 'pi_inoutno', width: 200 }, { text: '单据类型', dataIndex: 'pd_piclass', width: 200 },{ text: '审核状态', dataIndex: 'pi_status', width: 120 },{ text: '供应商编号', dataIndex: 'pi_vendcode', width: 120 },{ text: '供应商名称', dataIndex: 'pi_vendname', width: 120 },{ text: '物料编号', dataIndex: 'pd_prodcode', width: 120 },{ text: '物料名称', dataIndex: 'pr_detail', width: 120 },{ text: '物料规格', dataIndex: 'pr_spec', width: 120 },{ text: '单位', dataIndex: 'pr_unit', width: 120 },{ text: '数量', dataIndex: 'pd_inqty', xtype:'numbercolumn', width: 120 },{ text: '仓库', dataIndex: 'pd_whname', width: 120 },{ text: '单位成本', dataIndex: 'pd_orderprice', xtype:'numbercolumn', width: 120 },{ text: '税率', dataIndex: 'pd_taxrate', xtype:'numbercolumn', width: 120 },{ text: '金额', dataIndex: 'pd_total', xtype:'numbercolumn', width: 120 },{ text: '相关单号', dataIndex: 'pd_ordercode', xtype:'numbercolumn', width: 120 }] } });