|
|
@@ -11,60 +11,91 @@ Ext.define('saas.view.money.report.ProfitDetail', {
|
|
|
viewName: 'money-report-profitdetail',
|
|
|
|
|
|
groupField: null,
|
|
|
- listUrl: '/api/money/report/recDetail',
|
|
|
+ listUrl: '/api/money/report/profitdetails',
|
|
|
defaultCondition: null,
|
|
|
reportTitle: '毛利润分析表',
|
|
|
- QueryWidth: 0.25,
|
|
|
+ QueryWidth: 0.2,
|
|
|
searchItems: [{
|
|
|
xtype: 'customerDbfindTrigger',
|
|
|
name: 'pi_custname',
|
|
|
- fieldLabel: '客户名称',
|
|
|
- columnWidth: 0.25
|
|
|
+ emptyText: '客户',
|
|
|
+ columnWidth: 0.15,
|
|
|
+ dbfinds:[
|
|
|
+ {
|
|
|
+ from:'cu_name',to:'pi_custname'
|
|
|
+ }]
|
|
|
}, {
|
|
|
xtype : "remotecombo",
|
|
|
storeUrl:'/api/document/customerkind/getCombo',
|
|
|
name : "cu_type",
|
|
|
emptyText : "客户类型",
|
|
|
- columnWidth: 0.25,
|
|
|
+ columnWidth: 0.15,
|
|
|
hiddenBtn:true
|
|
|
}, {
|
|
|
xtype: 'condatefield',
|
|
|
- name: 'rb_date',
|
|
|
+ name: 'pi_date',
|
|
|
fieldLabel: '日期',
|
|
|
- columnWidth: 0.25
|
|
|
+ columnWidth: 0.5
|
|
|
}],
|
|
|
|
|
|
- reportColumns: [{
|
|
|
- text: '客户编号',
|
|
|
- dataIndex: 'pi_inoutno',
|
|
|
- width: 200
|
|
|
- }, {
|
|
|
+ reportColumns: [
|
|
|
+ {
|
|
|
+ text: '客户',
|
|
|
+ dataIndex: 'pi_custname',
|
|
|
+ width: 200,
|
|
|
+ },{
|
|
|
text: '客户类型',
|
|
|
- dataIndex: 'pi_custcode',
|
|
|
+ dataIndex: 'cu_type',
|
|
|
width: 200,
|
|
|
}, {
|
|
|
text: '业务员',
|
|
|
- dataIndex: 'pi_custname',
|
|
|
+ dataIndex: 'cu_sellername',
|
|
|
width: 200,
|
|
|
}, {
|
|
|
text: '销售总额',
|
|
|
- dataIndex: 'pi_class',
|
|
|
- width: 150
|
|
|
+ dataIndex: 'saamount',
|
|
|
+ width: 150,
|
|
|
+ renderer : function(v) {
|
|
|
+ var arr = (v + '.').split('.');
|
|
|
+ var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
|
|
|
+ var format = '0,000.' + xr.join();
|
|
|
+ return Ext.util.Format.number(v, format);
|
|
|
+ },
|
|
|
+ summaryType: 'sum',
|
|
|
+ summaryRenderer: function(v) {
|
|
|
+ var arr = (v + '.').split('.');
|
|
|
+ var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
|
|
|
+ var format = '0,000.' + xr.join();
|
|
|
+ return Ext.util.Format.number(v, format);
|
|
|
+ }
|
|
|
}, {
|
|
|
text: '不含税金额',
|
|
|
- dataIndex: 'pu_buyername',
|
|
|
+ dataIndex: 'netamount',
|
|
|
width: 150
|
|
|
}, {
|
|
|
text: '成本金额',
|
|
|
- dataIndex: 'rb_date',
|
|
|
+ dataIndex: 'costamount',
|
|
|
width: 150
|
|
|
}, {
|
|
|
text: '毛利润',
|
|
|
- dataIndex: 'pd_pdno',
|
|
|
+ dataIndex: 'profit',
|
|
|
width: 150,
|
|
|
+ renderer : function(v) {
|
|
|
+ var arr = (v + '.').split('.');
|
|
|
+ var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
|
|
|
+ var format = '0,000.' + xr.join();
|
|
|
+ return Ext.util.Format.number(v, format);
|
|
|
+ },
|
|
|
+ summaryType: 'sum',
|
|
|
+ summaryRenderer: function(v) {
|
|
|
+ var arr = (v + '.').split('.');
|
|
|
+ var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
|
|
|
+ var format = '0,000.' + xr.join();
|
|
|
+ return Ext.util.Format.number(v, format);
|
|
|
+ }
|
|
|
}, {
|
|
|
text: '毛利率',
|
|
|
- dataIndex: 'cu_beginaramount',
|
|
|
+ dataIndex: 'profitpresent',
|
|
|
width: 150
|
|
|
}]
|
|
|
});
|