|
|
@@ -0,0 +1,165 @@
|
|
|
+<template>
|
|
|
+ <div class="app-list-content">
|
|
|
+ <x-crud class="liu-crud-wrap" @load="onLoad">
|
|
|
+ <!-- 审核 -->
|
|
|
+ <template #slot-apply="{scope}">
|
|
|
+
|
|
|
+ <template v-if="scope.row.status == 1">
|
|
|
+ <el-button type="text" @click="showModalFn(scope.row)">待审核</el-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-else-if="scope.row.status == 2">
|
|
|
+ <!-- <el-button type="text">审核通过</el-button> success_color -->
|
|
|
+ <span class="success_color">审核通过</span>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="scope.row.status == 3">
|
|
|
+ <!-- <el-button type="text" style="color: '#ff2842'">审核通过</el-button> -->
|
|
|
+ <span class="error_color">审核通过</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ </x-crud>
|
|
|
+ <!-- 审核弹窗 -->
|
|
|
+ <el-dialog
|
|
|
+ title="审核"
|
|
|
+ :visible.sync="applyDialog"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ width="500px"
|
|
|
+ >
|
|
|
+ <div class="ad-modal-content">
|
|
|
+ <el-form
|
|
|
+ :model="form"
|
|
|
+ :rules="rule"
|
|
|
+ ref="form"
|
|
|
+ label-width="100px"
|
|
|
+ class="demo-form"
|
|
|
+ >
|
|
|
+ <el-form-item label="状态" prop="status">
|
|
|
+ <el-radio-group v-model="form.status">
|
|
|
+ <el-radio label="1">通过</el-radio>
|
|
|
+ <el-radio label="3">拒绝</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注" prop="remark">
|
|
|
+ <el-input type="textarea" v-model="form.remark"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="resetForm">取 消</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="applyFn">确认</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // x-crud
|
|
|
+ app: null,
|
|
|
+ // 审核
|
|
|
+ applyDialog: false,
|
|
|
+ form: {
|
|
|
+ id: '',
|
|
|
+ status: '1',
|
|
|
+ remark: ''
|
|
|
+ },
|
|
|
+ rule: {}
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {},
|
|
|
+ methods: {
|
|
|
+ showModalFn(item) {
|
|
|
+ this.form.id = item.id;
|
|
|
+ this.applyDialog = true;
|
|
|
+ },
|
|
|
+ applyFn() {
|
|
|
+ this.$service.cash.check(this.form).then(res => {
|
|
|
+ this.app.refresh();
|
|
|
+ this.$message.success('审核成功!');
|
|
|
+ this.resetForm();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ resetForm() {
|
|
|
+ this.$refs['form'].resetFields();
|
|
|
+ this.applyDialog = false;
|
|
|
+ },
|
|
|
+ // crud
|
|
|
+ onLoad({ ctx, app }) {
|
|
|
+ this.app = app;
|
|
|
+ ctx.service(this.$service.cash)
|
|
|
+ .set('table', {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ prop: 'id',
|
|
|
+ label: 'ID',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'sjId',
|
|
|
+ label: '商家ID',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'shopId',
|
|
|
+ label: '门店ID',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'amount',
|
|
|
+ label: '提现金额',
|
|
|
+ align: 'center',
|
|
|
+ emptyText: '无'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ label: '状态',
|
|
|
+ align: 'center',
|
|
|
+ emptyText: '无'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'addTime',
|
|
|
+ label: '提交时间',
|
|
|
+ align: 'center',
|
|
|
+ emptyText: '无'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ // 操作列
|
|
|
+ op: {
|
|
|
+ visible: true, // 是否显示
|
|
|
+ // 同 element-ui Table-column Attributes
|
|
|
+ props: {
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'right',
|
|
|
+ label: '操作'
|
|
|
+ },
|
|
|
+ // 布局,请移步 `layout`
|
|
|
+ layout: ['slot-apply']
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .set('layout', [
|
|
|
+ ['slot-tabs'],
|
|
|
+ ['flex1', 'refresh-btn'],
|
|
|
+ ['data-table'],
|
|
|
+ ['flex1', 'pagination']
|
|
|
+ ])
|
|
|
+ .done();
|
|
|
+ app.refresh();
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.success_color{
|
|
|
+ color: #09bb07!important;
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
+.error_color{
|
|
|
+ color: #ff2842!important;
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
+</style>
|