zhangdan 4 vuotta sitten
vanhempi
commit
f1e4d4c8d9

+ 6 - 3
src/views/recoveryManage/riderOrderRecord.vue

@@ -144,6 +144,7 @@ export default {
         }
         return getOrderList(searchData).then(res => {
           if (res.status == 200) {
+          this.totalNum=res.data.count
             const no = (res.data.pageNo - 1) * res.data.pageSize
             for (let i = 0; i < res.data.list.length; i++) {
               const _item = res.data.list[i]
@@ -189,9 +190,11 @@ export default {
       getOrderTotal(params).then(res => {
         if (res.status == 200) {
           if (res.data) {
-            this.totalNum = res.data.orderCount || 0 // 总条数
-            this.weightTotal = (res.data.totalAllWeight / 1000).toFixed(3) / 1 || 0// 回收物总计
-            this.moneyTotal = res.data.originalAllAmount || 0 // 金额总计
+            this.weightTotal = (res.data.totalWeight / 1000).toFixed(3) / 1 || 0// 回收物总计
+            this.moneyTotal = res.data.originalAmount || 0 // 金额总计
+          }else{
+            this.weightTotal = 0// 回收物总计
+            this.moneyTotal =0
           }
         }
       })

+ 12 - 11
src/views/recoveryManage/riderRecoveryTotal.vue

@@ -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
         }
       })
     },