Browse Source

enhance version 2

Encore 6 years ago
parent
commit
30fdfe77ce
1 changed files with 14 additions and 7 deletions
  1. 14 7
      src/views/agnetManagement/gambleMemberManagement/index.vue

+ 14 - 7
src/views/agnetManagement/gambleMemberManagement/index.vue

17
           </div>
17
           </div>
18
       </div>
18
       </div>
19
       <el-table :data="allCombine" v-loading.body="listLoading" element-loading-text="Loading" border fit highlight-current-row>
19
       <el-table :data="allCombine" v-loading.body="listLoading" element-loading-text="Loading" border fit highlight-current-row>
20
-          <el-table-column label="代理商名稱" prop="data.secondLayer.GambleMember.name).slice(19)" align="center">
21
-            <!-- <template slot-scope="scope">
20
+          <el-table-column label="代理商名稱"  align="center">
21
+            <template slot-scope="scope">
22
               <span>{{scope.row.name}}</span>
22
               <span>{{scope.row.name}}</span>
23
-            </template> -->
23
+            </template>
24
           </el-table-column>
24
           </el-table-column>
25
           <el-table-column label="總上分額" align="center">
25
           <el-table-column label="總上分額" align="center">
26
             <template slot-scope="scope">
26
             <template slot-scope="scope">
179
       this.combine = []
179
       this.combine = []
180
       //  let combine = []
180
       //  let combine = []
181
        await fetchGroupDetail(this.data.secondLayer, this.listQuery).then(response => {
181
        await fetchGroupDetail(this.data.secondLayer, this.listQuery).then(response => {
182
-
183
-         console.log('combine', response.data)
184
-         
185
-         this.combine = response.data
182
+        console.log('combine', response.data)
186
          
183
          
184
+        this.combine = response.data
185
+        this.allCombine.push({
186
+          name: (this.data.secondLayer.GambleMember.name).slice(19),
187
+          allUp: _.sumBy(response.data, 'totalUp'),
188
+          allDown: _.sumBy(response.data, 'totalDown'),
189
+          allChips: _.sumBy(response.data, 'chips'),
190
+          allEarned: _.sumBy(response.data, item => {return item.effectiveTotal}),
191
+          allServiceFees: _.sumBy(response.data, item => {return Number(item.totalServiceFees) }).toFixed(1),
192
+        })
187
        });
193
        });
188
       // await fetchMemberList(this.data.secondLayer, this.listQuery).then(response => {
194
       // await fetchMemberList(this.data.secondLayer, this.listQuery).then(response => {
189
       //  console.log('response', response.data.rows)
195
       //  console.log('response', response.data.rows)
366
         //   allEarned: sums[6],
372
         //   allEarned: sums[6],
367
         //   allServiceFees: sums[13],
373
         //   allServiceFees: sums[13],
368
         // });
374
         // });
375
+        // console.log('ewqewqeqweq', this.sums)
369
         return sums;
376
         return sums;
370
       }
377
       }
371
   },
378
   },