|
@@ -1,22 +1,127 @@
|
|
|
<template>
|
|
|
- <div id="index">
|
|
|
+ <div id="card-1">
|
|
|
<el-row>
|
|
|
- <el-col :span="24" class="main"> test </el-col>
|
|
|
+ <el-col :span="24" class="main animate__animated animate__backInRight">
|
|
|
+ <el-col :span="24" class="one"> <span>提现审核</span> </el-col>
|
|
|
+ <el-col :span="24" class="two">
|
|
|
+ <search-1 :form="searchForm" :statusList="statusList" @onSubmit="search" @toReset="toClos"> </search-1>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="four">
|
|
|
+ <data-table :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @exam="toExam"> </data-table>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
+ <e-dialog :dialog="dialog" @toClose="toClose">
|
|
|
+ <template v-slot:info>
|
|
|
+ <data-form :span="24" :fields="fieldsForm" :rules="fieldRules" v-model="fieldform" labelWidth="150px" @save="onSubmit">
|
|
|
+ <template #status>
|
|
|
+ <el-option v-for="i in statusList" :key="i.model" :label="i.label" :value="i.value"></el-option>
|
|
|
+ </template>
|
|
|
+ </data-form>
|
|
|
+ </template>
|
|
|
+ </e-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+const _ = require('lodash');
|
|
|
+const moment = require('moment');
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions } = createNamespacedHelpers('cashOut');
|
|
|
+const { mapActions: dictData } = createNamespacedHelpers('dictData');
|
|
|
export default {
|
|
|
- name: 'index',
|
|
|
+ name: 'card-1',
|
|
|
props: {},
|
|
|
- components: {},
|
|
|
+ components: { search1: () => import('./parts/search-1.vue') },
|
|
|
data: function () {
|
|
|
- return {};
|
|
|
+ const that = this;
|
|
|
+ return {
|
|
|
+ searchForm: {},
|
|
|
+ list: [],
|
|
|
+ total: 0,
|
|
|
+ opera: [{ label: '审核', method: 'exam' }],
|
|
|
+ fields: [
|
|
|
+ { label: '申请人姓名', model: 'customer.name' },
|
|
|
+ { label: '提现金额', model: 'money' },
|
|
|
+ { label: '申请时间', model: 'apply_time' },
|
|
|
+ {
|
|
|
+ label: '审核状态',
|
|
|
+ model: 'status',
|
|
|
+ format: (i) => {
|
|
|
+ let data = this.statusList.find((f) => f.value == i);
|
|
|
+ if (data) return data.label;
|
|
|
+ else return '暂无';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { label: '审核处理人', model: 'deal_person.name' },
|
|
|
+ { label: '审核时间', model: 'exam_time' },
|
|
|
+ ],
|
|
|
+ statusList: [],
|
|
|
+ // 弹框
|
|
|
+ dialog: { title: '信息管理', show: false, type: '1' },
|
|
|
+ fieldform: {},
|
|
|
+ fieldsForm: [
|
|
|
+ { label: '申请理由', model: 'apply_reason', readonly: true },
|
|
|
+ { label: '是否通过', model: 'status', type: 'select' },
|
|
|
+ { label: '审核理由', model: 'exam_reason', type: 'textarea' },
|
|
|
+ ],
|
|
|
+ fieldRules: {
|
|
|
+ status: [{ required: true, message: '请选择是否通过', trigger: 'change' }],
|
|
|
+ exam_reason: [{ required: true, message: '请输入审核理由', trigger: 'blur' }],
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ await this.search();
|
|
|
+ await this.searchOther();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...dictData({ dictQuery: 'query' }),
|
|
|
+ ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
|
|
|
+ // 查询
|
|
|
+ async search({ skip = 0, limit = this.$limit, ...info } = {}) {
|
|
|
+ let condition = _.cloneDeep(this.searchForm);
|
|
|
+ let res = await this.query({ skip, limit, ...condition, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, 'list', res.data);
|
|
|
+ this.$set(this, 'total', res.total);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ toExam({ data }) {
|
|
|
+ this.$set(this, 'fieldform', data);
|
|
|
+ this.dialog = { title: '信息管理', show: true, type: '1' };
|
|
|
+ },
|
|
|
+ // 保存
|
|
|
+ async onSubmit({ data }) {
|
|
|
+ data.exam_time = moment().format('YYYY-MM-DD HH:mm:ss');
|
|
|
+ let res;
|
|
|
+ if (data.id) res = await this.update(data);
|
|
|
+ else res = await this.create(data);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$message({ type: `success`, message: `维护信息成功` });
|
|
|
+ this.toClose();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 关闭
|
|
|
+ toClose() {
|
|
|
+ this.fieldform = {};
|
|
|
+ this.dialog = { title: '信息管理', show: false, type: '1' };
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ toClos() {
|
|
|
+ this.searchForm = {};
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ // 查询其他信息
|
|
|
+ async searchOther() {
|
|
|
+ let res;
|
|
|
+ // 提现审核状态
|
|
|
+ res = await this.dictQuery({ code: 'withdrawal_exam_status' });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `statusList`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
- created() {},
|
|
|
- methods: {},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
},
|
|
@@ -33,4 +138,11 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped></style>
|
|
|
+<style lang="less" scoped>
|
|
|
+.one {
|
|
|
+ margin: 0 0 10px 0;
|
|
|
+}
|
|
|
+.two {
|
|
|
+ margin: 0 0 10px 0;
|
|
|
+}
|
|
|
+</style>
|