Browse Source

fix bug decimal & abs

ethan 6 years ago
parent
commit
1309a59d42

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

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

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

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