update
This commit is contained in:
@@ -204,6 +204,14 @@ const admin = {
|
||||
method: Method.POST,
|
||||
});
|
||||
},
|
||||
getWithdrawalPlatform2: async () => {
|
||||
const {data} = await request({
|
||||
url: '/admin/withdrawal/getPlatform',
|
||||
method: Method.POST,
|
||||
});
|
||||
data.shift();
|
||||
return {data};
|
||||
},
|
||||
getWithdrawalList: async (data) => {
|
||||
return request({
|
||||
url: '/admin/withdrawal/getList',
|
||||
@@ -545,6 +553,20 @@ const admin = {
|
||||
data: {id},
|
||||
});
|
||||
},
|
||||
getWithdrawalInfo: async (id) => {
|
||||
return request({
|
||||
url: '/admin/Withdrawal/getInfo',
|
||||
method: Method.POST,
|
||||
data: {id},
|
||||
});
|
||||
},
|
||||
getWithdrawalSetRatio: async (data) => {
|
||||
return request({
|
||||
url: '/admin/Withdrawal/setRatio',
|
||||
method: Method.POST,
|
||||
data: data,
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
export default admin;
|
||||
|
||||
@@ -1,12 +1,43 @@
|
||||
<script setup>
|
||||
import {ref} from "vue";
|
||||
import {reactive, ref, watch} from "vue";
|
||||
import XSelect from '../../../../../components/XSelect/index.vue';
|
||||
import Api from "../../../../../api/index.js";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
const {id} = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
default: null,
|
||||
}
|
||||
});
|
||||
const emits = defineEmits(['success']);
|
||||
const visible = ref(false);
|
||||
const form = reactive({
|
||||
id: null,
|
||||
realname: null,
|
||||
account: null,
|
||||
id_card: null,
|
||||
ratio: null,
|
||||
mobile: null,
|
||||
type: null,
|
||||
});
|
||||
|
||||
const success = () => {
|
||||
watch(
|
||||
() => visible.value,
|
||||
(val) => {
|
||||
if (val) Api.admin.getWithdrawalInfo(id).then(({data}) => {
|
||||
Object.assign(form, data);
|
||||
form.ratio = Number(data.ratio);
|
||||
});
|
||||
},
|
||||
{deep: true}
|
||||
)
|
||||
|
||||
const success = async () => {
|
||||
const {msg} = await Api.admin.getWithdrawalSetRatio(form);
|
||||
Message.success(msg);
|
||||
visible.value = false;
|
||||
emits('success');
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -21,22 +52,27 @@ const success = () => {
|
||||
v-model:visible="visible">
|
||||
<a-form layout="vertical">
|
||||
<a-form-item label="提现方式">
|
||||
<XSelect :api="Api.system.getSelect" placeholder="请选择提现方式"></XSelect>
|
||||
<XSelect
|
||||
v-model:model-value="form.type"
|
||||
:init="true"
|
||||
:api="Api.admin.getWithdrawalPlatform2"
|
||||
placeholder="请选择提现方式">
|
||||
</XSelect>
|
||||
</a-form-item>
|
||||
<a-form-item label="卡号">
|
||||
<a-input placeholder="请输入卡号"></a-input>
|
||||
<a-input v-model:model-value="form.account" placeholder="请输入卡号"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="姓名">
|
||||
<a-input placeholder="请输入姓名"></a-input>
|
||||
<a-input v-model:model-value="form.realname" placeholder="请输入姓名"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="身份证号">
|
||||
<a-input placeholder="请输入身份证号"></a-input>
|
||||
<a-input v-model:model-value="form.id_card" placeholder="请输入身份证号"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="手机号">
|
||||
<a-input placeholder="请输入手机号"></a-input>
|
||||
<a-input v-model:model-value="form.mobile" placeholder="请输入手机号"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="费率">
|
||||
<a-input-number placeholder="请输入费率">
|
||||
<a-input-number v-model:model-value="form.ratio" placeholder="请输入费率" :precision="2" :max="100">
|
||||
<template #suffix>%</template>
|
||||
</a-input-number>
|
||||
</a-form-item>
|
||||
|
||||
@@ -12,40 +12,39 @@ const columns = [
|
||||
},
|
||||
{
|
||||
title: '身份',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'person_type_text',
|
||||
},
|
||||
{
|
||||
title: '身份ID',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'person_code',
|
||||
},
|
||||
{
|
||||
title: '提现方式',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'platform_type_text',
|
||||
},
|
||||
{
|
||||
title: '卡号',
|
||||
dataIndex: 'key',
|
||||
slotName: 'key',
|
||||
dataIndex: 'account',
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'realname',
|
||||
},
|
||||
{
|
||||
title: '身份证',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'id_card',
|
||||
},
|
||||
{
|
||||
title: '电话',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'mobile',
|
||||
},
|
||||
{
|
||||
title: '费率',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'ratio',
|
||||
},
|
||||
{
|
||||
title: '添加日期',
|
||||
dataIndex: 'key',
|
||||
dataIndex: 'createtime',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@@ -104,7 +103,7 @@ const vo = reactive({
|
||||
total: 0,
|
||||
});
|
||||
|
||||
const {loading, pagination, initFetchData} = useTableQuery({
|
||||
const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
||||
parameter: po,
|
||||
api: Api.admin.getWithdrawalList,
|
||||
callback: (data) => {
|
||||
@@ -129,8 +128,8 @@ const {loading, pagination, initFetchData} = useTableQuery({
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
class="flex-grow">
|
||||
<template v-slot:action>
|
||||
<EditWithdrawalModal></EditWithdrawalModal>
|
||||
<template v-slot:action="{record}">
|
||||
<EditWithdrawalModal :id="record.id" @success="fetchData"></EditWithdrawalModal>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
|
||||
@@ -3,7 +3,7 @@ import {reactive, ref} from "vue";
|
||||
import Api from "../../../../../api/index.js";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
const {id, api} = defineProps({
|
||||
const {id, api, disabled} = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
default: 0
|
||||
@@ -11,6 +11,10 @@ const {id, api} = defineProps({
|
||||
api: {
|
||||
type: Function,
|
||||
default: Api.admin.refuseTask
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
});
|
||||
const emits = defineEmits(['success']);
|
||||
@@ -30,7 +34,7 @@ const success = async () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-link :hoverable="false" status="danger" @click="visible=true">拒绝</a-link>
|
||||
<a-link :hoverable="false" status="danger" @click="visible=true" :disabled="disabled">拒绝</a-link>
|
||||
|
||||
<a-modal
|
||||
title-align="start"
|
||||
|
||||
@@ -120,9 +120,12 @@ const refuseTaskChildren = async (id) => {
|
||||
<div class="flex items-center gap-[20px] justify-between">
|
||||
<PreviewTaskModal :id="record.id" @success="fetchData"></PreviewTaskModal>
|
||||
<a-popconfirm content="确定通过?" @ok="passTaskChildren(record.id)">
|
||||
<a-link :hoverable="false" status="success">通过</a-link>
|
||||
<a-link :disabled="record.check_status === 1 || record.check_status === -2" :hoverable="false"
|
||||
status="success">通过
|
||||
</a-link>
|
||||
</a-popconfirm>
|
||||
<RejectTaskModal
|
||||
:disabled="record.check_status === 1 || record.check_status === -2"
|
||||
:api="Api.admin.refuseTaskChildren"
|
||||
:id="record.id"
|
||||
@success="fetchData">
|
||||
|
||||
Reference in New Issue
Block a user