Ext.define('saas.view.sale.saleIn.QueryPanel', { extend: 'saas.view.core.query.QueryPanel', xtype: 'sale-salein-querypanel', controller: 'sale-salein-querypanel', viewModel: 'sale-salein-querypanel', viewName: 'sale-salein-querypanel', queryFormItems: [{ xtype: 'hidden', name: 'id', fieldLabel: 'ID' }, { xtype: 'textfield', name: 'pi_inoutno', fieldLabel: '单据编号' }, { xtype: 'condatefield', name: 'pi_date', fieldLabel: '单据日期', columnWidth: 0.5 }, { xtype: 'hidden', name: 'pi_custcode', fieldLabel: '客户编号' }, { xtype: 'textfield', name: 'pi_custname', fieldLabel: '客户名称' }, { xtype: 'dbfindtrigger', name: 'pd_prodcode', fieldLabel: '物料编号', showDetail: true }, { xtype: 'textfield', name: 'pr_detail', fieldLabel: '物料名称', showDetail: true }, { xtype: 'combobox', name: 'pi_statuscode', fieldLabel: '审核状态', allowBlank: true, 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 + '\''; } } }], moreQueryFormItems: [], queryGridConfig: { idField:'id', codeField:'pi_inoutno', addTitle:'销售退货单', addXtype:'sale-salein-formpanel', defaultCondition:' pi_class = \'销售退货单\'', baseVastUrl: '/api/sale/prodinout/', baseColumn: [{ text: 'id', dataIndex: 'id', width: 0, xtype: 'numbercolumn' }, { text: '单据编号', dataIndex: 'pi_inoutno', width: 200 }, { text: '单据状态', dataIndex: 'pi_status', width: 120 }, { text: '单据类型', dataIndex: 'pi_class', width: 120 }, { text: '下单日期', dataIndex: 'pi_date', xtype:'datecolumn', width: 200 },{ text: '销售单号', dataIndex: 'pi_pucode', width: 200 },{ text: '客户名称', dataIndex: 'pi_custname', width: 120 },{ text: '含税金额', dataIndex: 'pi_total', xtype:'numbercolumn', width: 120 },{ text: '未税金额', dataIndex: 'pi_nettotal', xtype:'numbercolumn', width: 120, flex: 1 }], relativeColumn: [{ text: 'id', dataIndex: 'pu_id', width: 0, xtype: 'numbercolumn' }, { text: '单据编号', dataIndex: 'pd_inoutno', width: 200 }, { text: '单据状态', dataIndex: 'pi_status', width: 120 }, { text: '单据日期', dataIndex: 'pi_date', xtype:'datecolumn', width: 200 },{ text: '客户名称', dataIndex: 'pi_custname', width: 120 },{ text: '销售单号', dataIndex: 'pd_ordercode', width: 120 },{ text: '销售序号', dataIndex: 'pd_orderdetno', xtype:'numbercolumn', width: 120 },{ text: '物料编号', dataIndex: 'pd_prodcode', width: 120 },{ text: '验收数量', dataIndex: 'pd_inqty', xtype:'numbercolumn', width: 120 },{ text: '销售单价', dataIndex: 'pd_sendprice', xtype:'numbercolumn', width: 120 },{ text: '金额', dataIndex: 'pd_total', xtype:'numbercolumn', width: 120 },{ text: '税率', dataIndex: 'pd_taxrate', xtype:'numbercolumn', width: 120 },{ text: '成本单价', dataIndex: 'pd_price', xtype:'numbercolumn', width: 120, flex: 1 }] } });