Ext.define('saas.view.purchase.report.Purchase', { extend: 'saas.view.core.report.ReportPanel', xtype: 'purchase-report-purchase', controller: 'purchase-report-purchase', viewModel: 'purchase-report-purchase', viewName: 'purchase-report-purchase', groupField: null, listUrl: '/api/purchase/report/purchaseDetail', defaultCondition: null, reportTitle: '采购明细报表', QueryWidth: 0.2, allowCust: true, searchItems: [{ xtype: 'vendorDbfindTrigger', name: 'pu_vendname', columnWidth: 0.2, emptyText:'请输入供应商名称' }, { xtype: 'condatefield', name: 'pu_date', fieldLabel: '日期', columnWidth: 0.4 }, { xtype: 'multicombo', name: 'pu_acceptstatuscode', fieldLabel: '业务状态', columnWidth: 0.2, datas: [ ["TURNIN", "已入库"], ["UNTURNIN", "未入库"], ["PART2IN", "部分入库"], ["CLOSE", "已关闭"] ] }], reportModel: 'saas.model.report.Purchase', reportColumns: [{ text: 'id', dataIndex: 'pu_id', hidden: true }, { text: '采购单号', dataIndex: 'pu_code', width: 150 }, { text: '供应商名称', dataIndex: 'pu_vendname', width: 200 }, { text: '业务状态', dataIndex: 'pu_acceptstatus', align: 'center', width: 80 }, { text: '采购员', dataIndex: 'pu_buyername', width: 80 }, { text: '单据日期', xtype: 'datecolumn', dataIndex: 'pu_date', width: 110 }, { text: '序号', xtype: 'numbercolumn', dataIndex: 'pd_detno', align: 'center', exportFormat: 'Integer', width: 65, renderer : function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 0, 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_pdacceptqty', xtype: 'numbercolumn', width: 110, exportFormat: 'Quantity', xtype: 'numbercolumn', renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 3, true); }, summaryType: 'sum', summaryRenderer: function(v, d, f, m) { return saas.util.BaseUtil.numberFormat(v, 3, true); } }, { text: '采购数量', dataIndex: 'pd_qty', xtype: 'numbercolumn', exportFormat: 'Quantity', width: 110, summaryType: 'sum', renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 3, false); }, summaryRenderer: function(v, d, f, m) { return saas.util.BaseUtil.numberFormat(v, 3, false); } }, { text: '单位', dataIndex: 'pr_unit', width: 65 }, { text: '单价(元)', dataIndex: 'pd_taxprice', width: 120, xtype: 'numbercolumn', exportFormat: 'Price', renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 4, true); } }, { text: '含税单价(元)', dataIndex: 'pd_price', width: 120, xtype: 'numbercolumn', exportFormat: 'Price', renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 4, true); } }, { text: '金额(元)', dataIndex: 'pd_taxtotal', width: 120, exportFormat: 'Amount', xtype: 'numbercolumn', renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 2, true); }, summaryLabel: '金额', summaryType: 'sum', summaryRenderer: function(v, d, f, m) { return saas.util.BaseUtil.numberFormat(v, 2, true); } }, { text: '税率(%)', dataIndex: 'pd_taxrate', exportFormat: 'Integer', xtype: 'numbercolumn', width: 80, renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 2, false); }, }, { text: '税额(元)', dataIndex: 'pd_total-pd_taxtotal', xtype: 'numbercolumn', width: 120, exportFormat: 'Amount', xtype: 'numbercolumn', renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 2, true); }, summaryLabel: '税额', summaryType: 'sum', summaryRenderer: function(v, d, f, m) { return saas.util.BaseUtil.numberFormat(v, 2, true); } }, { text: '价税合计(元)', dataIndex: 'pd_total', xtype: 'numbercolumn', width: 120, exportFormat: 'Amount', xtype: 'numbercolumn', renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 2, true); }, summaryLabel: '价税合计', summaryType: 'sum', summaryRenderer: function(v, d, f, m) { return saas.util.BaseUtil.numberFormat(v, 2, true); } }, { text: '备注', dataIndex: 'pd_remark', width: 250 }] });