|
|
|
|
236
|
|
236
|
|
237
|
let chipsLog = _.groupBy(member.GambleMemberChipsLogs, 'type')
|
237
|
let chipsLog = _.groupBy(member.GambleMemberChipsLogs, 'type')
|
238
|
console.log('type', chipsLog)
|
238
|
console.log('type', chipsLog)
|
239
|
- if (chipsLog['0']) {
|
|
|
|
|
239
|
+ if (chipsLog['0'] || chipsLog['2']) {
|
240
|
row.totalUp = _.sumBy(chipsLog['0'], (item) => {
|
240
|
row.totalUp = _.sumBy(chipsLog['0'], (item) => {
|
241
|
return item.chips > 0 ? item.chips : 0
|
241
|
return item.chips > 0 ? item.chips : 0
|
242
|
})
|
242
|
})
|
243
|
row.totalDown = _.sumBy(chipsLog['0'], (item) => {
|
243
|
row.totalDown = _.sumBy(chipsLog['0'], (item) => {
|
244
|
return item.chips < 0 ? item.chips : 0
|
244
|
return item.chips < 0 ? item.chips : 0
|
|
|
245
|
+ }) + _.sumBy(chipsLog['2'], (item) => {
|
|
|
246
|
+ return item.chips < 0 ? item.chips : 0
|
245
|
})
|
247
|
})
|
|
|
248
|
+
|
246
|
}
|
249
|
}
|
247
|
row.memberCheckOut = row.totalUp + row.totalDown - row.chips
|
250
|
row.memberCheckOut = row.totalUp + row.totalDown - row.chips
|
248
|
// TODO CHECK 是否需要
|
251
|
// TODO CHECK 是否需要
|