liyaozhi
2025-10-28 1320688354fd168c51cf2e05f29a2253f4ed9c00
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<template>
  <div class="product-list">
    <!--内容-->
    <div class="product-content">
      <div class="table-wrap">
        <el-table size="small" :data="tableData" border style="width: 100%" v-loading="loading">
         <el-table-column prop="money" label="提现金额">
           <template slot-scope="scope">
             <span class="fb red">{{scope.row.money}}</span>
           </template>
         </el-table-column>
          <el-table-column prop="pay_type" label="打款方式">
            <template slot-scope="scope">
              <span>{{scope.row.pay_type.text}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="start_day" label="提现周期">
            <template slot-scope="scope">
              <span>{{scope.row.start_day}} - {{scope.row.end_day}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="apply_status" label="状态">
            <template slot-scope="scope">
                <span>{{scope.row.apply_status.text}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="create_time" label="申请时间"></el-table-column>
        </el-table>
      </div>
    </div>
    <!--分页-->
    <div class="pagination">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        background
        :current-page="curPage"
        :page-size="pageSize"
        layout="total, prev, pager, next, jumper"
        :total="totalDataNumber"
      ></el-pagination>
    </div>
  </div>
</template>
 
<script>
import cashApi from '@/api/cash.js';
export default {
  components: {},
  data() {
    return {
      /*是否正在加载*/
      loading: true,
      /*一页多少条*/
      pageSize: 10,
      /*一共多少条数据*/
      totalDataNumber: 0,
      /*当前是第几页*/
      curPage: 1,
      /*搜索参数*/
      searchForm: {
        apply_status:0
      },
      /*列表数据*/
      tableData: [],
      /*全部分类*/
      categoryList: [
        {
          name:'待审核',
          apply_status:10
        },
        {
          name:'审核通过',
          apply_status:20
        },
        {
          name:'驳回',
          apply_status:30
        },
        {
          name:'已打款',
          apply_status:40
        }
      ]
    };
  },
  created() {
    /*获取列表*/
    this.getData();
  },
  methods: {
    /*选择第几页*/
    handleCurrentChange(val) {
      let self = this;
      self.loading = true;
      self.curPage = val;
      self.getData();
    },
 
    /*每页多少条*/
    handleSizeChange(val) {
      this.pageSize = val;
      this.getData();
    },
 
    /*切换菜单*/
    handleClick(tab, event) {
      let self = this;
      self.curPage = 1;
      self.getData();
    },
 
    /*获取列表*/
    getData() {
      let self = this;
      let Params = self.searchForm;
      Params.page = self.curPage;
      Params.list_rows = self.pageSize;
      self.loading = true;
      cashApi.lists(Params, true)
        .then(res => {
          self.loading = false;
          self.tableData = res.data.list.data;
          self.totalDataNumber = res.data.list.total;
        })
        .catch(error => {
          self.loading = false;
        });
    },
 
    /*搜索查询*/
    onSubmit() {
      this.curPage = 1;
      this.getData();
    },
 
    /*打开编辑*/
    editClick(row) {
      this.$router.push({
        path: '/product/product/edit',
        query: {
          product_id: row.product_id,
          scene: 'edit'
        }
      });
    },
 
    /*删除*/
    delClick: function(row) {
      let self = this;
      self
        .$confirm('删除后不可恢复,确认删除该记录吗?', '提示', {
          type: 'warning'
        })
        .then(() => {
          PorductApi.delProduct({
            product_id: row.product_id
          }).then(data => {
            self.$message({
              message: '删除成功',
              type: 'success'
            });
            self.getData();
          });
        });
    }
  }
};
</script>
 
<style></style>