dcc
2024-06-13 3616db170333df7d668c97323344335b52c4153c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<template>
  <!-- 认缴记录 -->
  <div class="lotteryRecord">
    <sharesHeader
      title1="zhongqianedu"
      title2="renjiaoedu"
      title3="keyongedu"
      :value1="headerList.winningQuota"
      :value2="headerList.subscriptionLimit"
      :value3="headerList.availableLimit"
    />
    <div class="lotteryRecord-table newShares-table">
      <el-table :data="tableData" style="width: 100%">
        <template #empty>
            <table-empty />
        </template>
        <el-table-column :label="t(`message.user.mingchengdaima10`)">
          <template #default="scope">
            <p>{{ scope.row.name }}</p>
            <p class="draw-title-color">{{ scope.row.productName }}</p>
          </template>
        </el-table-column>
        <el-table-column :label="t(`message.user.xianjiachengben`)">
          <template #default="scope">
            <p>{{ scope.row.subPrice }}</p>
            <p>{{ scope.row.subPrice }}</p>
          </template>
        </el-table-column>
        <el-table-column prop="winningNumber" :label="t(`message.user.zhongqianedu`)"/>
        <el-table-column prop="requiredNumber" :label="t(`message.user.renjiaojine`)"/>
        <el-table-column prop="createTime" :label="t(`message.user.shijian10`)"/>
        <el-table-column :label="t(`message.user.zhuangtai10`)">
          <template #default="scope">
            <p :class="scope.row.status === 2 ? 'isRed' : ''">
              {{ t(`message.user.${getStatus(scope.row.status)}`) }}
            </p>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <pagination
      :total="total"
      v-model:page="pagination.current"
      v-model:limit="pagination.size"
      @pagination="getList"
    />
  </div>
</template>
 
<script setup>
import sharesHeader from "../newShares/components/sharesHeader.vue";
import Pagination from "@/components/Pagination/index.vue";
import Axios from "@/api/newShares";
import { useI18n } from "vue-i18n";
import tableEmpty from "../newShares/components/tableEmpty.vue";
 
const { t } = useI18n();
const headerList = ref({});
 
onMounted(() => {
  getDataList();
 
  Axios.getPayOrderHeaderMessage().then((res) => {
    if (res.code === 0) {
      headerList.value = res.data;
    }
  });
});
 
const tableData = ref([]);
const total = ref(0);
const pagination = ref({
  current: 1,
  size: 10,
});
const getDataList = () => {
  Axios.getPayMessageOrderList({ ...pagination.value }).then((res) => {
    if (res.code === 0) {
      tableData.value = res.data;
      total.value = res.total;
    }
  });
};
 
// 状态
const getStatus = computed(() => {
  return function (value) {
    let result = "";
    switch (value) {
      case 1:
        result = "daiqueren";
        break;
      case 2:
        result = "yirenjiao";
        break;
      default:
        break;
    }
    return result;
  };
});
 
const getList = (val) => {
  getDataList();
};
</script>
 
<style lang="scss" scoped>
@import "../../assets/css/newShares/table.scss";
.lotteryRecord {
  :deep(.lotteryRecord-table) {
    min-height: 500px;
    .el-table__cell {
      border: 0;
    }
  }
}
.isRed {
  color: #f33368;
}
</style>