张延森 2 years ago
parent
commit
72ca78139c
2 changed files with 12 additions and 2 deletions
  1. 6
    1
      src/pages/broker/customer/index.jsx
  2. 6
    1
      src/pages/broker/list/index.jsx

+ 6
- 1
src/pages/broker/customer/index.jsx View File

@@ -89,7 +89,12 @@ export default (props) => {
89 89
       key: 'unsettledCommission',
90 90
       align: 'right',
91 91
       width: 120,
92
-      render: t => t && t > 0 ? `¥${Number(t / 100).toFixed(2)}元` : '-'
92
+      render: (_, row) => {
93
+        if (!row.totalCommission) return '-';
94
+        const settledCommission = row.settledCommission || 0;
95
+        const unsettledCommission = row.totalCommission - settledCommission;
96
+        return `¥${Number(unsettledCommission / 100).toFixed(2)}元`
97
+      }
93 98
     },
94 99
     {
95 100
       title: '时间',

+ 6
- 1
src/pages/broker/list/index.jsx View File

@@ -101,7 +101,12 @@ export default (props) => {
101 101
       key: 'unsettledCommission',
102 102
       align: 'right',
103 103
       width: 120,
104
-      render: t => t && t > 0 ? `¥${Number(t / 100).toFixed(2)}元` : '-'
104
+      render: (_, row) => {
105
+        if (!row.totalCommission) return '-';
106
+        const settledCommission = row.settledCommission || 0;
107
+        const unsettledCommission = row.totalCommission - settledCommission;
108
+        return `¥${Number(unsettledCommission / 100).toFixed(2)}元`
109
+      }
105 110
     },
106 111
     {
107 112
       title: '时间',