Browse Source

fix ui bug

Unknown 6 years ago
parent
commit
3086775ac8

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

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

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

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

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

97
     }
97
     }
98
   },
98
   },
99
   created() {
99
   created() {
100
-    this.date = this.p_date
101
     this.getList()
100
     this.getList()
102
     this.SetVisible(1)
101
     this.SetVisible(1)
103
   },
102
   },