123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <template>
- <div class="container">
- <el-card class="box-card">
- <el-table
- :data="tableData"
- v-loading="listLoading"
- highlight-current-row
- fit
- class="table-list"
- :cell-style="{ padding: '6px 0' }"
- >
- <el-table-column prop="id" label="ID" width="100"></el-table-column>
- <el-table-column
- prop="title"
- label="title"
- width="120"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- prop="amount"
- label="amount"
- width="100"
- ></el-table-column>
- <el-table-column
- prop="description"
- label="description"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- prop="category"
- label="category"
- width="100"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- prop="coffee"
- label="coffee"
- width="100"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- prop="discount"
- label="discount"
- width="100"
- ></el-table-column>
- <el-table-column
- prop="startdate"
- label="startdate"
- width="120"
- ></el-table-column>
- <el-table-column
- prop="duedate"
- label="duedate"
- width="120"
- ></el-table-column>
- <el-table-column
- prop="phone"
- label="phone"
- width="120"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column prop="used" label="used" width="100"></el-table-column>
- <el-table-column
- prop="useropenid"
- label="useropenid"
- show-overflow-tooltip
- ></el-table-column>
- </el-table>
- <div class="pd-30">
- <el-pagination
- v-show="total > 0"
- background
- layout="prev, pager, next"
- :total="total"
- @current-change="handleCurrentChange"
- :current-page.sync="listQuery.page"
- :page-size="listQuery.limit"
- ></el-pagination>
- </div>
- </el-card>
- </div>
- </template>
- <script>
- import { getTicketList } from "@/api/order";
- export default {
- name: "ticket",
- data() {
- return {
- total: 0,
- listLoading: true,
- listQuery: {
- page: 1,
- limit: 100
- },
- tableData: []
- };
- },
- created() {
- this.getList();
- },
- methods: {
- getList() {
- this.listLoading = true;
- getTicketList({
- page: this.listQuery.page
- }).then(res => {
- this.tableData = res.tickets;
- this.total = res.total;
- this.listLoading = false;
- });
- },
- handleCurrentChange(val) {
- this.listQuery.page = val;
- this.getList();
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .box-card {
- overflow: hidden;
- }
- .container {
- padding: 20px;
- }
- .pd-30 {
- padding: 30px 0;
- }
- .filter-container {
- overflow: hidden;
- padding: 10px 0;
- }
- .table-list {
- font-size: 12px;
- }
- </style>
|