commission.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <a-card :bordered="false">
  3. <a-tabs v-model="activeKey" type="card" @change="tabsClick">
  4. <a-tab-pane key="1" tab="未返"> </a-tab-pane>
  5. <a-tab-pane key="2" tab="已返"> </a-tab-pane>
  6. </a-tabs>
  7. <div v-if="activeKey === '1'">
  8. <unrefunded-commission-list :agreementModel="agreementModel"></unrefunded-commission-list>
  9. </div>
  10. <div v-if="activeKey === '2'">
  11. <refunded-commission-list :agreementModel="agreementModel"></refunded-commission-list>
  12. </div>
  13. </a-card>
  14. </template>
  15. <script>
  16. import UnrefundedCommissionList from './unRefundedCommissionList'
  17. import RefundedCommissionList from './refundedCommissionList'
  18. export default {
  19. name: 'commission',
  20. components: { RefundedCommissionList, UnrefundedCommissionList },
  21. props: {
  22. agreementModel:{
  23. type: Object,
  24. required: false,
  25. default: () => {
  26. }
  27. }
  28. },
  29. data(){
  30. return {
  31. activeKey: "1",
  32. refundedList: [],//已返佣金记录
  33. unRefundedList: [],//未返佣金记录
  34. }
  35. },
  36. methods:{
  37. tabsClick(e) {
  38. if (e == "1") {
  39. this.loadData();
  40. }
  41. },
  42. loadData() {
  43. this.checkInBtnDis = false;
  44. this.scheduleBtnDis = false;
  45. getAction("/rooms/cesRooms/realtime-rooms", {}).then((res) => {
  46. if (res.success) {
  47. res.result.forEach((row) => {
  48. this.$set(row, "collapse", 1);
  49. });
  50. this.roomList = res.result;
  51. this.oldRoomList = JSON.parse(JSON.stringify(res.result));
  52. }
  53. });
  54. },
  55. }
  56. }
  57. </script>
  58. <style scoped>
  59. </style>