quanwei
2 days ago 73b874c72ad55eb9eef21c36160ac0de58f0189e
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<template>
  <!--
        作者:
        时间:2025-11-18
        描述:插件中心-VIP专区-提现申请
      -->
  <div class="table-wrap">
    <div class="table-search">
      <el-form :inline="true" :model="formInline" class="demo-form-inline">
        <el-form-item label="用户昵称">
          <el-input v-model="formInline.nick_name" placeholder="用户昵称"></el-input>
        </el-form-item>
        <el-form-item label="申请状态">
          <el-select v-model="formInline.apply_status" placeholder="申请状态">
            <el-option label="全部" value="-1"></el-option>
            <el-option label="待审核" value="10"></el-option>
            <el-option label="审核通过" value="20"></el-option>
            <el-option label="驳回" value="30"></el-option>
            <el-option label="已打款" value="40"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">查询</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="table-content">
      <el-table :data="list.data" style="width: 100%">
        <el-table-column type="index" label="序号" width="50"> </el-table-column>
        <el-table-column prop="user.nickName" label="用户信息">
          <template slot-scope="scope">
            <div class="d-s-c">
              <div class="head-img mr10">
                <img :src="scope.row.user.avatarUrl" width="30" height="30" alt="" />
              </div>
              <div>
                <p>{{ scope.row.user.nickName }}</p>
                <p class="gray9">ID: {{ scope.row.user_id }}</p>
              </div>
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="money" label="提现金额">
          <template slot-scope="scope">
            <span class="orange">¥{{ scope.row.money }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="pay_type" label="打款方式">
          <template slot-scope="scope">
            <span>{{ scope.row.pay_type | payTypeFilter }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="apply_status" label="申请状态">
          <template slot-scope="scope">
            <el-tag :type="scope.row.apply_status | statusTypeFilter">{{ scope.row.apply_status.text }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="create_time" label="申请时间" width="140"> </el-table-column>
        <el-table-column prop="audit_time" label="审核时间" width="140"> </el-table-column>
        <el-table-column fixed="right" label="操作" width="150">
          <template slot-scope="scope">
            <el-button v-if="scope.row.apply_status.value == 10" @click="editClick(scope.row)" type="text" size="small">去审核</el-button>
            <el-button v-if="scope.row.apply_status.value == 20" @click="payClick(scope.row)" type="text" size="small">确认打款</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <!--分页-->
    <div class="pagination">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="curPage"
        :page-sizes="[10, 20, 50, 100]"
        :page-size="pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="list.total"
      >
      </el-pagination>
    </div>
 
    <!-- 审核弹窗 -->
    <el-dialog title="审核" :visible.sync="dialogFormVisible" width="500px">
      <el-form :model="form" label-width="80px">
        <el-form-item label="审核状态">
          <el-radio-group v-model="form.apply_status">
            <el-radio :label="20">审核通过</el-radio>
            <el-radio :label="30">驳回</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="驳回原因" v-if="form.apply_status == 30">
          <el-input type="textarea" v-model="form.reject_reason" placeholder="请输入驳回原因"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="submitAudit">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>
 
<script>
import PlusApi from '@/api/plus/vip.js';
 
export default {
  data() {
    return {
      formInline: {
        nick_name: '',
        apply_status: '-1'
      },
      /*列表*/
      list: [],
      /*分页*/
      curPage: 1,
      pageSize: 10,
      /*弹窗*/
      dialogFormVisible: false,
      /*表单*/
      form: {
        id: 0,
        apply_status: 20,
        reject_reason: ''
      }
    };
  },
  filters: {
    payTypeFilter(val) {
      const payTypeMap = {
        10: '微信',
        20: '支付宝',
        30: '银行卡'
      };
      return payTypeMap[val];
    },
    statusTypeFilter(val) {
      const statusTypeMap = {
        10: 'warning',
        20: 'success',
        30: 'danger',
        40: 'success'
      };
      return statusTypeMap[val];
    }
  },
  created() {
    this.getData();
  },
  methods: {
    /*获取数据*/
    getData() {
      let self = this;
      let params = {
        list_rows: self.pageSize,
        page: self.curPage,
        nick_name: self.formInline.nick_name,
        apply_status: self.formInline.apply_status
      };
      PlusApi.cash(params, true)
        .then(data => {
          self.list = data.data.list;
        })
        .catch(error => {});
    },
 
    /*查询*/
    onSubmit() {
      this.curPage = 1;
      this.getData();
    },
 
    /*分页*/
    handleSizeChange(val) {
      this.pageSize = val;
      this.getData();
    },
    handleCurrentChange(val) {
      this.curPage = val;
      this.getData();
    },
 
    /*审核*/
    editClick(item) {
      this.form.id = item.id;
      this.form.apply_status = 20;
      this.form.reject_reason = '';
      this.dialogFormVisible = true;
    },
 
    /*确认打款*/
    payClick(item) {
      let self = this;
      this.$confirm('确认已打款?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        let params = {
          id: item.id,
          apply_status: 40
        };
        PlusApi.money(params, true)
          .then(data => {
            self.$message({
              message: '操作成功',
              type: 'success'
            });
            self.getData();
          })
          .catch(error => {});
      });
    },
 
    /*提交审核*/
    submitAudit() {
      let self = this;
      let params = {
        id: self.form.id,
        apply_status: self.form.apply_status,
        reject_reason: self.form.reject_reason
      };
      PlusApi.audit(params, true)
        .then(data => {
          self.$message({
            message: '操作成功',
            type: 'success'
          });
          self.dialogFormVisible = false;
          self.getData();
        })
        .catch(error => {});
    }
  }
};
</script>
 
<style>
</style>