Browse Source

fix ui bug

Unknown 6 years ago
parent
commit
3086775ac8

+ 13 - 11
src/views/agnetManagement/gambleMemberManagement/index.vue

@@ -54,7 +54,7 @@
54 54
           </el-table-column>
55 55
       </el-table>
56 56
       <el-table :data="combine" v-loading.body="listLoading" element-loading-text="Loading" border fit highlight-current-row>
57
-        <el-table-column :label="`${this.agent.GambleMember.name}的會員`" align="center">
57
+        <el-table-column :label="`${this.data.secondLayer.GambleMember.name}的會員`" align="center">
58 58
           <el-table-column label="名稱" align="center">
59 59
             <template slot-scope="scope">
60 60
               <span>{{scope.row.name}}</span>
@@ -126,7 +126,7 @@
126 126
       </el-table>
127 127
 
128 128
     </div>
129
-    <router-view :member="member"></router-view>
129
+    <router-view></router-view>
130 130
   </div>
131 131
 </template>
132 132
 
@@ -149,7 +149,7 @@ export default {
149 149
     //   chipLogList: [],
150 150
     //   gameRecordList: [],   
151 151
       list: [],
152
-      member: {}, 
152
+      // member: {}, 
153 153
       dialogList: null,
154 154
       total: null,
155 155
       listLoading: true,
@@ -189,19 +189,21 @@ export default {
189 189
   },
190 190
   computed: {
191 191
     ...mapGetters([
192
-      'visible'
192
+      'visible',
193
+      'data',
193 194
     ])
194 195
   },
195
-  props: ['agent'],
196
+  // props: ['agent'],
196 197
   methods: {
197 198
     ...mapActions([
198
-      'SetVisible'
199
+      'SetVisible',
200
+      'SetData',
199 201
     ]),
200 202
     getList() {
201 203
       this.listLoading = true
202 204
       this.allCombine = []
203 205
       this.combine = []
204
-      fetchMemberList(this.agent, this.listQuery).then(response => {
206
+      fetchMemberList(this.data.secondLayer, this.listQuery).then(response => {
205 207
         // this.memberRecord = response.data.rows
206 208
         console.log(response.data.rows)
207 209
         response.data.rows.map(member => {
@@ -224,11 +226,11 @@ export default {
224 226
           let bookie = _.groupBy(member['GambleGame-Bucket-MemberRecords'], 'isBookie')
225 227
           if (bookie.false) {
226 228
             row.memberEarned = _.sumBy(bookie.false, 'earned');
227
-            row.memberServiceFees = _.sumBy(bookie.false, 'serviceFees')*this.agent.feeRatio/100;
229
+            row.memberServiceFees = _.sumBy(bookie.false, 'serviceFees')*this.data.secondLayer.feeRatio/100;
228 230
           }
229 231
           if (bookie.true) {
230 232
             row.bookieEarned = _.sumBy(bookie.true, 'earned');
231
-            row.bookieServiceFees = _.sumBy(bookie.true, (item) => { return item.serviceFees-500; })*this.agent.feeRatio/100;
233
+            row.bookieServiceFees = _.sumBy(bookie.true, (item) => { return item.serviceFees-500; })*this.data.secondLayer.feeRatio/100;
232 234
           }
233 235
           row.totalServiceFees = new Decimal(row.bookieServiceFees).plus(row.memberServiceFees).valueOf()
234 236
 
@@ -258,7 +260,7 @@ export default {
258 260
         })
259 261
 
260 262
         this.allCombine.push({
261
-          name: this.agent.GambleMember.name,
263
+          name: this.data.secondLayer.GambleMember.name,
262 264
           allUp: _.sumBy(this.combine, 'totalUp'),
263 265
           allDown: _.sumBy(this.combine, 'totalDown'),
264 266
           allChips: _.sumBy(this.combine, 'chips'),
@@ -273,7 +275,7 @@ export default {
273 275
     handlePersonDetail(row) {
274 276
       const temp = Object.assign({}, row) // copy obj
275 277
       this.SetVisible(3)
276
-      this.member = temp
278
+      this.SetData({layer:3, data: temp})
277 279
     },
278 280
     handleFilter() {
279 281
       this.listQuery.page = 1

+ 8 - 5
src/views/agnetManagement/index.vue

@@ -59,7 +59,7 @@
59 59
         </div>
60 60
       </el-dialog>
61 61
     </div>
62
-    <router-view :agent="agent"></router-view>
62
+    <router-view></router-view>
63 63
   </div>
64 64
 </template>
65 65
 
@@ -89,7 +89,7 @@ export default {
89 89
       },
90 90
       dialogCreateFormVisible: false,
91 91
       dialogStatus: '',
92
-      agent: {},
92
+      // agent: {},
93 93
       rules: {
94 94
         // rewardChips: [{ pattern: /^-?\d+$/, required: true, message: '請輸入整數', trigger: 'change' }],        
95 95
         // depositChips: [{ pattern: /^-?\d+$/, required: true, message: '請輸入整數', trigger: 'change' }],                
@@ -108,12 +108,14 @@ export default {
108 108
   },
109 109
   computed: {
110 110
     ...mapGetters([
111
-      'visible'
111
+      'visible',
112
+      'data',
112 113
     ])
113 114
   },
114 115
   methods: {
115 116
     ...mapActions([
116
-      'SetVisible'
117
+      'SetVisible',
118
+      'SetData',
117 119
     ]),
118 120
     getList() {
119 121
       this.listLoading = true
@@ -237,7 +239,8 @@ export default {
237 239
     handlePage(row) {
238 240
       const temp = Object.assign({}, row) // copy obj
239 241
       this.SetVisible(2)
240
-      this.agent = temp
242
+      this.SetData({layer:2, data: temp})
243
+      // this.agent = temp
241 244
     },
242 245
     moneyColor(money) {
243 246
       return money >= 0 ? { color: '#67C23A' } : { color: '#FA5555' }

+ 0 - 1
src/views/gambleGameBucket/index.vue

@@ -97,7 +97,6 @@ export default {
97 97
     }
98 98
   },
99 99
   created() {
100
-    this.date = this.p_date
101 100
     this.getList()
102 101
     this.SetVisible(1)
103 102
   },