Blame view

src/views/order/rechargeList.vue 2.77 KB
1de913cf   ren   sdf
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
  <template>
    <div class="app-container">
  
      <el-table :data="orderList" id="QuestionTable" border
        style="width: 100%;border-radius: 5px;box-shadow: 0 0 10px #efefef;margin-top: 10px;" :stripe='true'>
        <el-table-column type="index" prop="date" width="50" align="center"></el-table-column>
        <el-table-column prop="date" label="用户昵称">
          <template slot-scope="scope">
            <span>{{ scope.row.UserName }}</span>
          </template>
        </el-table-column>
  
        <el-table-column prop="date" label="订单号">
          <template slot-scope="scope">
              <span>{{ scope.row.OrderId }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="PayPrice" label="价格">
          <template slot-scope="scope">
              <span>{{ scope.row.PayPrice *0.01}}</span>
          </template>
        </el-table-column>
  
  
        <el-table-column prop="date" label="支付方式">
          <template slot-scope="scope">
            <span >微信支付</span>
          </template>
        </el-table-column>
        <el-table-column prop="date" label="购买时间">
          <template slot-scope="scope">
            <span v-if="scope.row.PayTime">{{ scope.row.PayTime.replace('T',' ') }}</span>
          </template>
        </el-table-column>
  
      </el-table>
      <el-pagination background @current-change="currentchange"
        style="position:static;bottom: 3px;text-align: center;margin-top: 5px;" :page-size="this.query.PageSize"
        layout="total,prev, pager, next" :total="Count">
      </el-pagination>
  
    </div>
  </template>
  
  <script>
    import {
      OrderGetOrderList
    } from '@/api/order.js'
    import {
      formatTime
    } from '@/utils/util.js'
    export default {
      data() {
  
        return {
          orderList: [],
  
          Count: 0,
          query: {
            PurchaseContent: 1, //1:余额充值,3:试卷购买
            PageIndex: 1,
            PageSize: 10,
          },
  
        }
      },
      created() {
        this.GetOrder()
      },
      methods: {
        currentchange(page) {
          this.query.PageIndex = page;
          this.GetOrder();
        },
  
        GetOrder() {
          OrderGetOrderList(this.query).then(res => {
            this.orderList = res.data.data.rows.map(t => {
              if (t.phone) {
                t.phone1 = t.phone.replace(t.phone.substring(3, 7), '****')
              }
              return t
            })
            this.Count = res.data.data.total
          })
        },
  
      }
    }
  </script>
  
  <style>
    .seetingsDiv {
      width: 100%;
      height: 60px;
      background: #efefef;
      line-height: 60px;
      border-radius: 5px;
      box-shadow: 0 0 5px #cdcdcd;
    }
  
    .seetingsDiv button {
      background-color: #304156;
      border: 0px;
      margin-left: 10px;
      box-shadow: 0 0 5px #cdcdcd;
      float: right;
      margin-top: 12px;
      margin-right: 10px;
    }
  </style>