|
@@ -82,8 +82,8 @@ export default {
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
columns: [{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
|
|
|
{ title: '骑手信息', dataIndex: 'stationName', width: 200, align: 'center', scopedSlots: { customRender: 'stationName' } },
|
|
|
- { title: '回收重量(kg)', dataIndex: 'totalAlWeight', width: 50, align: 'center', sorter: true, customRender: (text) => { return (text / 1000).toFixed(3) / 1 || 0 } },
|
|
|
- { title: '交易金额(元)', dataIndex: 'originalAlAmount', width: 100, align: 'center', sorter: true, customRender: (text) => { return text || 0 } }],
|
|
|
+ { title: '回收重量(kg)', dataIndex: 'totalWeight', width: 50, align: 'center', sorter: true, customRender: (text) => { return (text / 1000).toFixed(3) / 1 || 0 } },
|
|
|
+ { title: '交易金额(元)', dataIndex: 'originalAmount', width: 100, align: 'center', sorter: true, customRender: (text) => { return text || 0 } }],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
const searchData = Object.assign(parameter, this.queryParam)
|
|
@@ -94,11 +94,11 @@ export default {
|
|
|
searchData.beginDate = null
|
|
|
searchData.endDate = null
|
|
|
}
|
|
|
- if (searchData.sortField == 'totalAlWeight') {
|
|
|
- searchData.sortField = 'totalAlWeight'
|
|
|
+ if (searchData.sortField == 'totalWeight') {
|
|
|
+ searchData.sortField = 'totalWeight'
|
|
|
}
|
|
|
- if (searchData.sortField == 'originalAlAmount') {
|
|
|
- searchData.sortField = 'originalAlAmount'
|
|
|
+ if (searchData.sortField == 'originalAmount') {
|
|
|
+ searchData.sortField = 'originalAmount'
|
|
|
}
|
|
|
return getOrderTotalList(searchData).then(res => {
|
|
|
if (res.status == 200) {
|
|
@@ -151,12 +151,13 @@ export default {
|
|
|
}
|
|
|
getOrderTotalNum(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- if (res.data != 0 || null) {
|
|
|
- this.weightTotal = (res.data.totalAllWeight / 1000).toFixed(3) / 1 || 0
|
|
|
- this.moneyTotal = res.data.originalAllAmount || 0
|
|
|
+ if (res.data != null) {
|
|
|
+ this.weightTotal = (res.data.totalWeight / 1000).toFixed(3) / 1 || 0
|
|
|
+ this.moneyTotal = res.data.originalAmount || 0
|
|
|
+ } else {
|
|
|
+ this.weightTotal = 0
|
|
|
+ this.moneyTotal = 0
|
|
|
}
|
|
|
- } else {
|
|
|
- this.weightTotal = 0
|
|
|
}
|
|
|
})
|
|
|
},
|