Unknown 6 年之前
父节点
当前提交
564a7b6b8c

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

@@ -85,12 +85,12 @@
85 85
               <span :style="moneyColor(scope.row.totalPunishment)">{{scope.row.totalDown}}</span>
86 86
             </template>
87 87
           </el-table-column>
88
-          <el-table-column label="有效投注量(莊家)" align="center">
88
+          <el-table-column label="莊家贏錢" align="center">
89 89
             <template slot-scope="scope">
90 90
               <span :style="moneyColor(scope.row.bookieEarned)">{{scope.row.bookieEarned}}</span>
91 91
             </template>
92 92
           </el-table-column>
93
-          <el-table-column label="有效投注量(閒家)" align="center">
93
+          <el-table-column label="閒家贏錢" align="center">
94 94
             <template slot-scope="scope">
95 95
               <span :style="moneyColor(scope.row.memberEarned)">{{scope.row.memberEarned}}</span>
96 96
             </template>
@@ -107,12 +107,12 @@
107 107
           </el-table-column>
108 108
           <el-table-column label="總退水" align="center">
109 109
             <template slot-scope="scope">
110
-              <span :style="moneyColor(scope.row.wallet)">{{scope.row.totalServiceFees}}</span>
110
+              <span :style="moneyColor(scope.row.totalServiceFees)">{{scope.row.totalServiceFees}}</span>
111 111
             </template>
112 112
           </el-table-column>
113 113
           <el-table-column label="會員結帳" align="center">
114 114
             <template slot-scope="scope">
115
-              <span :style="moneyColor(scope.row.memberCheckOut)">{{scope.row.memberCheckOut}}</span>
115
+              <span :style="moneyColor((scope.row.memberCheckOut)*(-1))">{{(scope.row.memberCheckOut)*(-1)}}</span>
116 116
             </template>
117 117
           </el-table-column>
118 118
           <el-table-column align="center" label="操作" width="100">
@@ -319,7 +319,7 @@ export default {
319 319
       return money >= 0 ? { color: '#67C23A' } : { color: '#FA5555' }
320 320
     },
321 321
     all(scope) {
322
-      return scope.row.allUp+scope.row.allDown-scope.row.allChips-scope.row.allServiceFees
322
+      return (scope.row.allUp+scope.row.allDown-scope.row.allChips-scope.row.allServiceFees)*(-1)
323 323
     }
324 324
   },
325 325
   destroyed() {

+ 1 - 1
src/views/agnetManagement/index.vue

@@ -176,7 +176,7 @@ export default {
176 176
             let allEarned = _.sumBy(combine, (item) => {return item.bookieEarned + item.memberEarned})
177 177
             let allServiceFees = _.sumBy(combine, (item) => {return item.bookieServiceFees + item.
178 178
             memberServiceFees})
179
-            agent.all = allUp+allDown-allChips-allServiceFees
179
+            agent.all = (allUp+allDown-allChips-allServiceFees)*(-1)
180 180
             this.list.push(agent)
181 181
             
182 182
             this.listLoading = false

+ 43 - 37
src/views/gambleGameBucket/detail/index.vue

@@ -27,7 +27,11 @@
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="上莊分數">
31
+            <template slot-scope="scope">
32
+              <span>{{memberRecord[memberRecord.length-1][0].wager}}</span>
33
+            </template>
34
+          </el-table-column>  
31 35
           <el-table-column label="有效下注量">
32 36
             <template slot-scope="scope">
33 37
               <div :style="moneyColor(scope.row.effectiveWagger)">{{scope.row.effectiveWagger}}</div>
@@ -44,7 +48,7 @@
44 48
               <div :style="moneyColor(scope.row.bookieResult)">{{scope.row.bookieResult}}</div>
45 49
             </template>
46 50
           </el-table-column>  
47
-          <el-table-column prop="ass" label="服務費">
51
+          <el-table-column prop="MemberRecord.FixedServiceFees" label="服務費">
48 52
           </el-table-column>     
49 53
         </el-table-column>             
50 54
       </el-table-column>                   
@@ -176,20 +180,17 @@ export default {
176 180
       bookie: [],
177 181
       memberRecord: [],
178 182
       door: 0,
179
-      bidChips: 0,
183
+      // bidChips: 0,
180 184
       wagerRecord: [],
181 185
     }
182 186
   },
183 187
   created() {
184
-    fetchWagerRecord(this.data.secondLayer, this.query.secondLayer).then(response => {
185
-      this.wagerRecord = response.data
186
-    })
187 188
     fetchRoundRecord(this.data.secondLayer, this.query.secondLayer).then(response => {
188 189
       this.door = response.data.initialDoor
189 190
     })
190
-    fetchGameBid(this.data.secondLayer).then(response => {
191
-      this.bidChips = response.data
192
-    })
191
+    // fetchGameBid(this.data.secondLayer).then(response => {
192
+    //   this.bidChips = response.data
193
+    // })
193 194
     fetchRoundCount(this.data.secondLayer).then((response) => {
194 195
       for (let i = 1; i <= response.data; i++) {
195 196
         this.roundOptions.push({ label: `第 ${i} 關`, key: i })
@@ -197,31 +198,6 @@ export default {
197 198
     })
198 199
     this.SetVisible(2)
199 200
     this.getList()
200
-    fetchGambleMemberList({ page: 1, limit: 9999999999, chipsSort: 'DESC' }).then(response => {
201
-      const { rows } = response.data
202
-      let members = {}
203
-      // TODO refactor
204
-      rows.map((person, index) => {
205
-        if (index % 4 === 0) {
206
-          members.name_0 = person.name
207
-          members.chips_0 = person.chips
208
-          index === response.data.count - 1 ? this.members.push(members) : false
209
-        } else if (index % 4 === 1) {
210
-          members.name_1 = person.name
211
-          members.chips_1 = person.chips
212
-          index === response.data.count - 1 ? this.members.push(members) : false
213
-        } else if (index % 4 === 2) {
214
-          members.name_2 = person.name
215
-          members.chips_2 = person.chips
216
-          index === response.data.count - 1 ? this.members.push(members) : false
217
-        } else if (index % 4 === 3) {
218
-          members.name_3 = person.name
219
-          members.chips_3 = person.chips
220
-          this.members.push(members)
221
-          members = {}
222
-        }
223
-      })
224
-    })
225 201
   },
226 202
   computed: {
227 203
     ...mapGetters([
@@ -240,6 +216,9 @@ export default {
240 216
       this.listLoading = true
241 217
       let detailTemp, dealingTemp, memberRecordTemp
242 218
       this.detail = []
219
+      fetchWagerRecord(this.data.secondLayer, this.query.secondLayer).then(response => {
220
+        this.wagerRecord = response.data
221
+      })
243 222
       fetchDealingRecords(this.data.secondLayer, this.query.secondLayer).then(response => {
244 223
         dealingTemp = response.data.rows.filter(record => {
245 224
           return record.door !== -1
@@ -277,8 +256,8 @@ export default {
277 256
             record.MemberRecord.door === -1 &&
278 257
             record.MemberRecord.door === record.DealingRecord.door
279 258
         })
280
-        console.log('this', this.bookie)
281
-        this.bidChips ? this.bookie[0].bidChips = this.bidChips : false        
259
+        // console.log('this', this.memberRecord)
260
+        // this.bidChips ? this.bookie[0].bidChips = this.bidChips : false        
282 261
         this.group = _.groupBy(detailTemp, record => {
283 262
           return record.MemberRecord.GambleMember.name
284 263
         })
@@ -287,7 +266,6 @@ export default {
287 266
         this.detail = this.group.reduce((arr, element) => {
288 267
           return arr.concat(element)
289 268
         }, [])
290
-
291 269
         this.bookie[0].effectiveWagger = _.sumBy(this.detail, item => {
292 270
           return Math.abs(item.MemberRecord.earned) ;
293 271
         })
@@ -327,6 +305,34 @@ export default {
327 305
         this.func = eval(`(function() {${this.statement}})`)
328 306
       })
329 307
 
308
+      fetchGambleMemberList({ page: 1, limit: 9999999999, chipsSort: 'DESC' }).then(response => {
309
+        const { rows } = response.data
310
+        console.log('sss', this.detail)
311
+
312
+        let members = {}
313
+        // TODO refactor
314
+        rows.map((person, index) => {
315
+          if (index % 4 === 0) {
316
+            members.name_0 = person.name
317
+            members.chips_0 = person.chips
318
+            index === response.data.count - 1 ? this.members.push(members) : false
319
+          } else if (index % 4 === 1) {
320
+            members.name_1 = person.name
321
+            members.chips_1 = person.chips
322
+            index === response.data.count - 1 ? this.members.push(members) : false
323
+          } else if (index % 4 === 2) {
324
+            members.name_2 = person.name
325
+            members.chips_2 = person.chips
326
+            index === response.data.count - 1 ? this.members.push(members) : false
327
+          } else if (index % 4 === 3) {
328
+            members.name_3 = person.name
329
+            members.chips_3 = person.chips
330
+            this.members.push(members)
331
+            members = {}
332
+          }
333
+        })
334
+      })
335
+
330 336
       this.listLoading = false
331 337
     },
332 338
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {