充值流水恢复接口

This commit is contained in:
ctw committed 2025-01-23 16:44:55 +08:00
1 parent 03bbaa9ea9
commit 6cc4cd00f2
3 files changed
+25 -17

No files matched your search

+8
View File
@@ -46,3 +46,11 @@ export function putObj(obj?: Object) {
data: obj, data: obj,
}) })
} }
export function recover(params?: Object) {
return request({
url: "/wallet-recharge-import/recover",
method: "get",
params,
})
}
+8 -5
View File
@@ -36,7 +36,7 @@
<div <div
class="w-[12px] h-[56px] absolute left-0 top-[44vh] translate-y-[-50%] transition-all cursor-pointer" class="w-[12px] h-[56px] absolute left-0 top-[44vh] translate-y-[-50%] transition-all cursor-pointer"
@click="handleClickDepTreeDrawer(isOpen)" @click="handleClickDepTreeDrawer(isOpen)"
style="background-color: #e3e9ed; border-top-right-radius: 15px; border-bottom-right-radius: 15px" style="background-color: #e3e9ed; border-top-right-radius: 10px; border-bottom-right-radius: 10px"
> >
<i class="drawer-icon"> <i class="drawer-icon">
<el-icon> <el-icon>
@@ -390,15 +390,18 @@ const handleClickDepTreeDrawer = (isDrawerOpen: boolean) => {
<style> <style>
.splitpanes--vertical > .splitpanes__splitter { .splitpanes--vertical > .splitpanes__splitter {
background: #cccccc; background: var(--el-color-primary);
min-width: 2px; /* min-width: 2px; */
width: 2px;
transition: all 0.3s ease; transition: all 0.3s ease;
} }
.splitpanes--vertical > .splitpanes__splitter:active { .splitpanes--vertical > .splitpanes__splitter:active {
background: #1890ff; background: var(--el-color-primary);
opacity: 0.6;
} }
.splitpanes--vertical > .splitpanes__splitter:hover { .splitpanes--vertical > .splitpanes__splitter:hover {
background: #1890ff; background: var(--el-color-primary);
opacity: 0.6;
} }
.drawer-icon { .drawer-icon {
color: #b7bdc8; color: #b7bdc8;
@@ -109,9 +109,9 @@
<div class="color-success">{{ displayPrice(row.price) }}</div> <div class="color-success">{{ displayPrice(row.price) }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="false" label="操作" width="300"> <el-table-column label="操作" width="200">
<template #default="{ row }"> <template #default="{ row }">
<el-button <!-- <el-button
v-if="false" v-if="false"
icon="delete" icon="delete"
text text
@@ -120,7 +120,8 @@
@click="handleDelete([row.id])" @click="handleDelete([row.id])"
> >
删除</el-button 删除</el-button
> > -->
<el-button icon="RefreshRight" text type="primary" @click="handleRecover(row.id)">恢复</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -157,17 +158,13 @@ const state: BasicTableProps = reactive<BasicTableProps>({
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } =
useTable(state) useTable(state)
// 删除操作 // 恢复操作
const handleDelete = async (ids: string[]) => { const handleRecover = async (id: string) => {
try { try {
await useMessageBox().confirm("此操作将永久删除") await useMessageBox().confirm("确认恢复吗?")
} catch { await walletRechargeImportApi.recover({ id })
return
}
try {
// await walletRechargeApplyApi.delObjs(ids)
getDataList() getDataList()
useMessage().success("删除成功") useMessage().success("恢复成功")
} catch (err: any) { } catch (err: any) {
useMessage().error(err.msg) useMessage().error(err.msg)
} }