Browse Source

fix bug decimal & abs

ethan 6 years ago
parent
commit
1309a59d42

+ 4 - 4
src/views/agnetManagement/gambleMemberManagement/index.vue

@@ -107,7 +107,7 @@
107 107
           </el-table-column>
108 108
           <el-table-column label="莊家總投注量退水" align="center">
109 109
             <template slot-scope="scope">
110
-              <span>{{scope.row.bookieWagerFee * scope.row.feeRatio}}</span>
110
+              <span>{{scope.row.feeRatio.times(scope.row.bookieWagerFee).valueOf()}}</span>
111 111
             </template>
112 112
           </el-table-column>
113 113
           <el-table-column label="莊家總抽水" align="center">
@@ -117,7 +117,7 @@
117 117
           </el-table-column>
118 118
           <el-table-column label="莊家退水" align="center">
119 119
             <template slot-scope="scope">
120
-              <span>{{scope.row.bookieServiceFees * scope.row.feeRatio}}</span>
120
+              <span>{{scope.row.feeRatio.times(scope.row.bookieServiceFees).valueOf()}}</span>
121 121
             </template>
122 122
           </el-table-column>
123 123
           <el-table-column label="閒家總抽水" align="center">
@@ -127,7 +127,7 @@
127 127
           </el-table-column>
128 128
           <el-table-column label="閒家退水" align="center">
129 129
             <template slot-scope="scope">
130
-              <span>{{scope.row.memberServiceFees * scope.row.feeRatio}}</span>
130
+              <span>{{scope.row.feeRatio.times(scope.row.memberServiceFees).valueOf()}}</span>
131 131
             </template>
132 132
           </el-table-column>
133 133
           <el-table-column label="總退水" align="center">
@@ -245,7 +245,7 @@ export default {
245 245
             memberServiceFees: 0,
246 246
             totalServiceFees: 0,
247 247
             memberCheckOut: 0,
248
-            feeRatio: this.data.secondLayer.feeRatio/100,
248
+            feeRatio: new Decimal(this.data.secondLayer.feeRatio/100),
249 249
           }
250 250
         
251 251
           let bookie = _.groupBy(member['GambleGame-Bucket-MemberRecords'], 'isBookie')

+ 1 - 1
src/views/gambleGameBucket/detail/index.vue

@@ -320,7 +320,7 @@ export default {
320 320
         }, [])
321 321
         console.log('eee', this.detail)
322 322
         this.bookie[0].effectiveWagger = _.sumBy(this.detail, item => {
323
-          return Math.abs(item.MemberRecord.earned) ;
323
+          return item.MemberRecord.earned;
324 324
         })
325 325
         this.bookie[0].effectiveServiceFees = _.sumBy(this.detail, item => {
326 326
           return Math.abs(item.MemberRecord.serviceFees) ;