bucket 6 lat temu
rodzic
commit
4a835a6b8e

+ 6 - 2
src/views/agnetManagement/gambleMemberManagement/index.vue

@@ -178,7 +178,7 @@ export default {
178 178
       this.combine = []
179 179
        let combine = []
180 180
       await fetchMemberList(this.data.secondLayer, this.listQuery).then(response => {
181
-       
181
+       console.log('response', response.data.rows)
182 182
         response.data.rows.map(member => {
183 183
           let row = {
184 184
             id: member.id,
@@ -245,14 +245,18 @@ export default {
245 245
           }
246 246
           row.memberCheckOut = (row.totalUp + row.totalDown - row.chips)*(-1)
247 247
           // TODO CHECK 是否需要
248
+          let punishment =  _.sumBy(member['GambleGame-Bucket-PunishmentRecords'], item => {
249
+              return (item.chips)*(-1)
250
+          })
248 251
           if(chipsLog['1']) {
249 252
             row.totalReward = _.sumBy(chipsLog['1'], (item) => { 
250 253
               return item.chips > 0 ? item.chips : 0
251 254
             })
252 255
             row.totalPunishment = _.sumBy(chipsLog['1'], (item) => { 
253 256
               return item.chips < 0 ? item.chips : 0
254
-            })
257
+            });
255 258
           }
259
+          row.totalPunishment += punishment
256 260
           // console.log('www',row)
257 261
 
258 262
           combine.push(row)

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

@@ -184,7 +184,7 @@ export default {
184 184
             let allDown = _.sumBy(combine, 'totalDown')
185 185
             let allChips = _.sumBy(combine, 'chips')
186 186
             let allEarned = _.sumBy(combine, (item) => {return item.bookieEarned + item.memberEarned})
187
-            let allServiceFees = _.sumBy(combine, (item) => {return item.totalServiceFees})
187
+            let allServiceFees = _.sumBy(combine, (item) => {return item.totalServiceFees}).toFixed(2)
188 188
             agent.all = (allUp+allDown-allChips-allServiceFees)*(-1)
189 189
             this.list.push(agent)
190 190