| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- Ext.define('saas.view.sale.report.SaleProfit', {
- extend: 'saas.view.core.report.ReportPanel',
- xtype: 'sale-report-saleprofit',
- controller: 'sale-report-saleprofit',
- viewModel: 'sale-report-saleprofit',
- viewName: 'sale-report-saleprofit',
- groupField: null,
- listUrl: '/api/sale/report/saleProfit',
- defaultCondition: null,
- reportTitle: '销售毛利润表',
- QueryWidth:0.2,
- searchItems: [{
- xtype: 'textfield',
- name: 'pr_detail',
- emptyText:'请输入物料编号、品牌、型号或规格',
- columnWidth: 0.2,
- getCondition: function(value) {
- return ' (pr_code like\'%' + value + '%\' or pr_brand like \'%'+value+'%\' or pr_spec like \'%'+value+'%\' or pr_orispeccode like \'%'+value+'%\' ) ';
- }
- }, {
- xtype: 'customerDbfindTrigger',
- name: 'sa_custname',
- emptyText:'请输入客户编号或名称',
- columnWidth: 0.2
- }, {
- xtype: 'condatefield',
- name: 'pi_date',
- fieldLabel: '日期',
- columnWidth: 0.4
- }],
- reportModel: 'saas.model.report.SaleProfit',
- reportColumns: [
- {
- text: 'id',
- dataIndex: 'sa_id',
- hidden: true
- }, {
- text: '单据日期',
- xtype: 'datecolumn',
- dataIndex: 'pi_date',
- width: 110
- }, {
- text: '客户名称',
- dataIndex: 'sa_custname',
- width: 200
- }, {
- text: '业务员',
- dataIndex: 'sa_seller',
- width: 80
- }, {
- text: '单据编号',
- dataIndex: 'pd_inoutno',
- width: 150
- }, {
- text: '业务类型',
- dataIndex: 'pd_piclass',
- width: 100
- }, {
- text: '物料编号',
- dataIndex: 'pr_code',
- 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',
- exportFormat: 'Quantity',
- xtype: 'numbercolumn',
- width: 110,
- renderer : function(v) {
- return saas.util.BaseUtil.numberFormat(v, 3, false);
- }
- }, {
- text: '单位',
- dataIndex: 'pr_unit',
- width: 65
- }, {
- text: '单价(元)',
- dataIndex: 'pd_netprice',
- exportFormat: 'Price',
- xtype: 'numbercolumn',
- width: 120,
- renderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 4, true);
- }
- }, {
- text: '含税单价(元)',
- dataIndex: 'pd_sendprice',
- exportFormat: 'Price',
- xtype: 'numbercolumn',
- width: 120,
- renderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 4, true);
- }
- }, {
- text: '金额(元)',
- dataIndex: 'pd_nettotal',
- xtype: 'numbercolumn',
- exportFormat: 'Amount',
- renderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- }
- }, {
- text: '税率(%)',
- dataIndex: 'pd_taxrate',
- exportFormat: 'Integer',
- xtype: 'numbercolumn',
- width: 80,
- renderer: function (v) {
- return saas.util.BaseUtil.numberFormat(v, 2, false);
- }
- }, {
- text: '税额(元)',
- exportFormat: 'Amount',
- dataIndex: 'pd_ordertotal-pd_nettotal',
- xtype: 'numbercolumn',
- width:120,
- renderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- }
- }, {
- text: '价税合计(元)',
- exportFormat: 'Amount',
- dataIndex: 'pd_ordertotal',
- xtype: 'numbercolumn',
- width:120,
- renderer : function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- },
- summaryType: 'sum',
- summaryLabel: '价税合计',
- summaryRenderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- }
- }, {
- text: '成本单价(元)',
- dataIndex: 'pd_price',
- exportFormat: 'Price',
- xtype: 'numbercolumn',
- width:120,
- renderer : function(v) {
- return saas.util.BaseUtil.numberFormat(v, 4, true);
- }
- }, {
- text: '成本金额(元)',
- dataIndex: 'pd_total',
- exportFormat: 'Amount',
- xtype: 'numbercolumn',
- renderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- }
- }, {
- text: '毛利润(元)',
- dataIndex: 'pd_profit',
- exportFormat: 'Amount',
- xtype: 'numbercolumn',
- renderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- },
- summaryType: 'sum',
- summaryLabel: '毛利润',
- summaryRenderer: function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- }
- }, {
- text: '毛利率(%)',
- dataIndex: 'pd_profitpresent',
- xtype: 'numbercolumn',
- renderer : function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- }
- }, {
- text : "备注",
- dataIndex : "pd_remark",
- width : 250
- }]
- });
|