|
|
@ -3,6 +3,25 @@ import { getSalesReport } from "../../../api/saas" |
|
|
import util from '../../../utils/util' |
|
|
import util from '../../../utils/util' |
|
|
|
|
|
|
|
|
const app = getApp() |
|
|
const app = getApp() |
|
|
|
|
|
const columns1 = [ |
|
|
|
|
|
{ prop: 'productCategoryName', width: 200, label: '品类', color: '#55C355' }, |
|
|
|
|
|
{ prop: 'outboundDeliveryNetWeight', width: 180, label: '出货重量(吨)' }, |
|
|
|
|
|
{ prop: 'settleWeight', width: 180, label: '结算重量(吨)' }, |
|
|
|
|
|
{ prop: 'settleAvgPrice ', width: 220, label: '结算均价(元/吨)' }, |
|
|
|
|
|
{ prop: 'settlePrice', width: 180, label: '结算金额(元)' } |
|
|
|
|
|
] |
|
|
|
|
|
const columns2 = [ |
|
|
|
|
|
{ prop: 'productCategoryName', width: 200, label: '品类', color: '#55C355' }, |
|
|
|
|
|
{ prop: 'outboundDeliveryNetWeight ', width: 185, label: '出货重量(吨)' }, |
|
|
|
|
|
{ prop: 'netWeight', width: 180, label: '纸厂净重(吨)' }, |
|
|
|
|
|
{ prop: 'differenceWeight ', width: 185, label: '差异重量(吨)' } |
|
|
|
|
|
] |
|
|
|
|
|
const columns3 = [ |
|
|
|
|
|
{ prop: 'productCategoryName', width: 200, label: '品类', color: '#55C355' }, |
|
|
|
|
|
{ prop: 'netWeight', width: 185, label: '纸厂净重(吨)' }, |
|
|
|
|
|
{ prop: 'settleWeight', width: 185, label: '结算重量(吨)' }, |
|
|
|
|
|
{ prop: 'avgDeductPercent ', width: 180, label: '平均扣点(%)' } |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
Scene({ |
|
|
Scene({ |
|
|
/** |
|
|
/** |
|
|
@ -11,13 +30,8 @@ Scene({ |
|
|
data: { |
|
|
data: { |
|
|
height: app.globalData.fragmentHeight, |
|
|
height: app.globalData.fragmentHeight, |
|
|
form: {}, |
|
|
form: {}, |
|
|
columns: [ |
|
|
|
|
|
{ prop: 'productCategoryName', width: 200, label: '品类', color: '#55C355' }, |
|
|
|
|
|
{ prop: 'outboundDeliveryNetWeight', width: 180, label: '出货重量(吨)' }, |
|
|
|
|
|
{ prop: 'settleWeight', width: 180, label: '结算重量(吨)' }, |
|
|
|
|
|
{ prop: 'settleAvgPrice ', width: 220, label: '结算均价(元/吨)' }, |
|
|
|
|
|
{ prop: 'settlePrice', width: 180, label: '结算金额(元)' } |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
columnsList: [ columns1, columns2, columns3 ], |
|
|
|
|
|
columns: columns1, |
|
|
reportInfo:{ |
|
|
reportInfo:{ |
|
|
productSalesDailyReportList: [], |
|
|
productSalesDailyReportList: [], |
|
|
carNumber: 0, |
|
|
carNumber: 0, |
|
|
@ -45,7 +59,7 @@ Scene({ |
|
|
var vdateString = util.formatDate(new Date(), 'Y-M-D') + '至' + util.formatDate(max, 'Y-M-D') |
|
|
var vdateString = util.formatDate(new Date(), 'Y-M-D') + '至' + util.formatDate(max, 'Y-M-D') |
|
|
this.data.form.dimensionDateStart = util.formatDate(today, 'Y-M-D') |
|
|
this.data.form.dimensionDateStart = util.formatDate(today, 'Y-M-D') |
|
|
this.data.form.dimensionDateEnd = util.formatDate(max, 'Y-M-D') |
|
|
this.data.form.dimensionDateEnd = util.formatDate(max, 'Y-M-D') |
|
|
this.setData({ height: app.globalData.fragmentHeight - 404, minDate, maxDate, vdate, vdateString }) |
|
|
|
|
|
|
|
|
this.setData({ height: app.globalData.fragmentHeight - 484, minDate, maxDate, vdate, vdateString }) |
|
|
this.fetchStatisticsInfo() |
|
|
this.fetchStatisticsInfo() |
|
|
}, |
|
|
}, |
|
|
showCalendar: function(){ |
|
|
showCalendar: function(){ |
|
|
@ -54,6 +68,13 @@ Scene({ |
|
|
onClose: function() { |
|
|
onClose: function() { |
|
|
this.setData({ show: false }) |
|
|
this.setData({ show: false }) |
|
|
}, |
|
|
}, |
|
|
|
|
|
onTabChange: function ({ detail }) { |
|
|
|
|
|
if (this.data.tabIndex == Number(detail.index)) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.setData({ columns: this.data.columnsList[detail.index] }) |
|
|
|
|
|
this.data.tabIndex = Number(detail.index) |
|
|
|
|
|
}, |
|
|
onSelect: function({detail}) { |
|
|
onSelect: function({detail}) { |
|
|
var start = new Date(detail[0]) |
|
|
var start = new Date(detail[0]) |
|
|
var end = new Date(detail[1]) |
|
|
var end = new Date(detail[1]) |
|
|
|