|
@@ -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 }) {
|