Bladeren bron

add effectiveWagger

EthnaYeh 6 jaren geleden
bovenliggende
commit
2d234daf36
1 gewijzigde bestanden met toevoegingen van 12 en 21 verwijderingen
  1. 12 21
      src/views/gambleGameBucket/detail/index.vue

+ 12 - 21
src/views/gambleGameBucket/detail/index.vue

@@ -27,7 +27,12 @@
27 27
               <span>{{`${scope.row.DealingRecord.point1} | ${scope.row.DealingRecord.point2} / ${point(scope.row.DealingRecord)}`}}</span>
28 28
             </template>
29 29
           </el-table-column>
30
-          <el-table-column label="上莊分數" prop="bidChips"></el-table-column>      
30
+          <el-table-column label="上莊分數" prop="bidChips"></el-table-column>  
31
+          <el-table-column label="有效下注量">
32
+            <template slot-scope="scope">
33
+              <div :style="moneyColor(scope.row.effectiveWagger)">{{scope.row.effectiveWagger}}</div>
34
+            </template>
35
+          </el-table-column>     
31 36
           <el-table-column label="莊輸贏">
32 37
             <template slot-scope="scope">
33 38
               <div :style="moneyColor(scope.row.MemberRecord.earned)">{{scope.row.MemberRecord.earned}}</div>
@@ -79,26 +84,6 @@
79 84
         </el-table-column>
80 85
       </el-table-column>      
81 86
     </el-table>
82
-    <el-table :data="bookie" v-loading.body="listLoading" element-loading-text="Loading" border fit highlight-current-row
83
-      style="width: 100%">      
84
-      <el-table-column label="莊家紀錄" align="center">            
85
-        <el-table-column label="莊家" prop="MemberRecord.GambleMember.name"></el-table-column>
86
-        <el-table-column label="點數">
87
-          <template slot-scope="scope">
88
-            <span>{{`${scope.row.DealingRecord.point1} | ${scope.row.DealingRecord.point2} / ${point(scope.row.DealingRecord)}`}}</span>
89
-          </template>
90
-        </el-table-column>
91
-        <el-table-column label="上莊分數" prop="bidChips"></el-table-column>      
92
-        <el-table-column label="莊輸贏">
93
-          <template slot-scope="scope">
94
-            <div :style="moneyColor(scope.row.MemberRecord.earned)">{{scope.row.MemberRecord.earned}}</div>
95
-          </template>
96
-        </el-table-column>      
97
-        <el-table-column label="抽水" prop="MemberRecord.serviceFees"></el-table-column>
98
-        <el-table-column prop="ass" label="服務費">
99
-        </el-table-column>     
100
-      </el-table-column>                   
101
-    </el-table>
102 87
     <el-table :data="detail" :span-method="objectSpanMethod"  v-loading.body="listLoading" element-loading-text="Loading" border fit highlight-current-row
103 88
       style="width: 100%">
104 89
       <el-table-column label="此關結果" align="center">
@@ -283,6 +268,7 @@ export default {
283 268
             record.MemberRecord.door === -1 &&
284 269
             record.MemberRecord.door === record.DealingRecord.door
285 270
         })
271
+        console.log('this', this.bookie)
286 272
         this.bidChips ? this.bookie[0].bidChips = this.bidChips : false        
287 273
         this.group = _.groupBy(detailTemp, record => {
288 274
           return record.MemberRecord.GambleMember.name
@@ -292,6 +278,11 @@ export default {
292 278
         this.detail = this.group.reduce((arr, element) => {
293 279
           return arr.concat(element)
294 280
         }, [])
281
+
282
+        this.bookie[0].effectiveWagger = _.sumBy(this.detail, item => {
283
+          return Math.abs(item.MemberRecord.earned);
284
+        })
285
+        console.log('bookie', this.bookie[0].effectiveWagger)
295 286
         this.group.map((item, itemIndex) => {
296 287
           let totalChips = 0
297 288
           item.map((person, personIndex) => {