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,10 +17,10 @@
17 17
           </div>
18 18
       </div>
19 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 22
               <span>{{scope.row.name}}</span>
23
-            </template> -->
23
+            </template>
24 24
           </el-table-column>
25 25
           <el-table-column label="總上分額" align="center">
26 26
             <template slot-scope="scope">
@@ -179,11 +179,17 @@ export default {
179 179
       this.combine = []
180 180
       //  let combine = []
181 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 194
       // await fetchMemberList(this.data.secondLayer, this.listQuery).then(response => {
189 195
       //  console.log('response', response.data.rows)
@@ -366,6 +372,7 @@ export default {
366 372
         //   allEarned: sums[6],
367 373
         //   allServiceFees: sums[13],
368 374
         // });
375
+        // console.log('ewqewqeqweq', this.sums)
369 376
         return sums;
370 377
       }
371 378
   },