feat: 页面修改
This commit is contained in:
parent
766e83f67e
commit
eba5e3fa54
|
@ -42,7 +42,7 @@ axios.interceptors.response.use(
|
||||||
// if the custom code is not 20000, it is judged as an error.
|
// if the custom code is not 20000, it is judged as an error.
|
||||||
if (res.code !== 200) {
|
if (res.code !== 200) {
|
||||||
Message.error({
|
Message.error({
|
||||||
content: res.msg || 'Error',
|
content: res.msg || res.message || 'Error',
|
||||||
duration: 5 * 1000,
|
duration: 5 * 1000,
|
||||||
});
|
});
|
||||||
console.log(response.status)
|
console.log(response.status)
|
||||||
|
|
|
@ -75,7 +75,8 @@
|
||||||
<a-table-column title="订单编号" data-index="order_number"></a-table-column>
|
<a-table-column title="订单编号" data-index="order_number"></a-table-column>
|
||||||
<a-table-column title="操作">
|
<a-table-column title="操作">
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-button v-if="record.status == '1'" @click="showConfirm(record)">审批</a-button>
|
<a-button @click="handleNotBlock(record)">拒绝</a-button>
|
||||||
|
<a-button @click="handleBlock(record)">同意</a-button>
|
||||||
</template>
|
</template>
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
</template>
|
</template>
|
||||||
|
@ -163,37 +164,71 @@ const handleTableChange = (page:number) => {
|
||||||
// queryParams.value.pageSize = pagination.pageSize;
|
// queryParams.value.pageSize = pagination.pageSize;
|
||||||
// getAll();
|
// getAll();
|
||||||
// }
|
// }
|
||||||
const showConfirm = (record) => {
|
// const showConfirm = (record) => {
|
||||||
Modal.confirm({
|
// Modal.confirm({
|
||||||
title: '操作提醒',
|
// title: '操作提醒',
|
||||||
content: '是否同意该用户的提现申请',
|
// content: '是否同意该用户的提现申请',
|
||||||
okText: '同意',
|
// okText: '同意',
|
||||||
cancelText: '拒绝',
|
// cancelText: '拒绝',
|
||||||
onOk: () => handleBlock(record),
|
// onOk: () => handleBlock(record),
|
||||||
onCancel: () => handleNotBlock(record),
|
// onCancel: () => handleNotBlock(record),
|
||||||
});
|
// });
|
||||||
};
|
// };
|
||||||
|
|
||||||
//同意提现
|
//同意提现
|
||||||
const handleBlock = async(record:any) => {
|
const handleBlock = async(record:any) => {
|
||||||
record.type = 0;
|
Modal.confirm({
|
||||||
const res = await pushMoney(record);
|
title: '操作提醒',
|
||||||
if(res.code === 200 ){
|
content: '是否确认该选择',
|
||||||
reset();
|
okText: '确认',
|
||||||
Message.success('操作成功')
|
cancelText: '取消',
|
||||||
}else{
|
onOk: async () => {
|
||||||
Message.error(res.msg)
|
record.type = 0;
|
||||||
}
|
const res = await pushMoney(record);
|
||||||
|
if (res.code === 200) {
|
||||||
|
reset();
|
||||||
|
Message.success('操作成功');
|
||||||
|
} else {
|
||||||
|
reset();
|
||||||
|
Message.error('操作失败');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onCancel: () => {
|
||||||
|
// 用户点击取消按钮时的操作(可选)
|
||||||
|
Message.info('操作已取消');
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//不同意提现
|
//不同意提现
|
||||||
const handleNotBlock = async(record:any) => {
|
const handleNotBlock = async(record:any) => {
|
||||||
record.type = 1;
|
Modal.confirm({
|
||||||
const res = await pushMoney(record);
|
title: '操作提醒',
|
||||||
if(res.code === 200 ){
|
content: '是否确认该选择',
|
||||||
reset();
|
okText: '确认',
|
||||||
Message.success('操作成功')
|
cancelText: '取消',
|
||||||
}
|
onOk: async () => {
|
||||||
|
record.type = 1;
|
||||||
|
const res = await pushMoney(record);
|
||||||
|
if (res.code === 200) {
|
||||||
|
reset();
|
||||||
|
Message.success('操作成功');
|
||||||
|
} else {
|
||||||
|
reset();
|
||||||
|
Message.error('操作失败');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onCancel: () => {
|
||||||
|
// 用户点击取消按钮时的操作(可选)
|
||||||
|
Message.info('操作已取消');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// const res = await pushMoney(record);
|
||||||
|
// if(res.code === 200 ){
|
||||||
|
// reset();
|
||||||
|
// Message.success('操作成功')
|
||||||
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
//显示合计
|
//显示合计
|
||||||
|
|
Loading…
Reference in New Issue