feat:充值bug
This commit is contained in:
1 parent
2de1be6e21
commit
f9b2e1ae4a
2 files changed
+28
-54
No files matched your search
@@ -46,7 +46,7 @@ import { useDict } from "/@/hooks/dict"
|
|||||||
import { useMessage } from "/@/hooks/message"
|
import { useMessage } from "/@/hooks/message"
|
||||||
import { getObj, addObj, putObj } from "/@/api/wallet/wallet-recharge-package"
|
import { getObj, addObj, putObj } from "/@/api/wallet/wallet-recharge-package"
|
||||||
import { rule } from "/@/utils/validate"
|
import { rule } from "/@/utils/validate"
|
||||||
import { storePrice } from "/@/utils/formatMoney"
|
import { storePrice, displayPrice } from "/@/utils/formatMoney"
|
||||||
const emit = defineEmits(["refresh"])
|
const emit = defineEmits(["refresh"])
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
@@ -112,16 +112,19 @@ const onSubmit = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 初始化表单数据
|
// 初始化表单数据
|
||||||
const getwalletRechargePackageData = (id: string) => {
|
const getwalletRechargePackageData = async (id: string) => {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
loading.value = true
|
loading.value = true
|
||||||
getObj(id)
|
try {
|
||||||
.then((res: any) => {
|
const { data } = await getObj(id)
|
||||||
Object.assign(form, res.data)
|
data.payPrice = displayPrice(data.payPrice, "")
|
||||||
})
|
data.bonusPrice = displayPrice(data.bonusPrice, "")
|
||||||
.finally(() => {
|
Object.assign(form, data)
|
||||||
loading.value = false
|
} catch (error) {
|
||||||
})
|
console.log("初始化表单数据意外的错误error:", error);
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 暴露变量
|
// 暴露变量
|
||||||
|
|||||||
@@ -3,46 +3,23 @@
|
|||||||
<div class="layout-padding-auto layout-padding-view">
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
<el-row>
|
<el-row>
|
||||||
<div class="mb8" style="width: 100%">
|
<div class="mb8" style="width: 100%">
|
||||||
<el-button
|
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||||
icon="folder-add"
|
v-auth="'wallet_walletRechargePackage_add'">
|
||||||
type="primary"
|
|
||||||
class="ml10"
|
|
||||||
@click="formDialogRef.openDialog()"
|
|
||||||
v-auth="'wallet_walletRechargePackage_add'"
|
|
||||||
>
|
|
||||||
新 增
|
新 增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button plain :disabled="multiple" icon="Delete" type="primary"
|
||||||
plain
|
v-auth="'wallet_walletRechargePackage_del'" @click="handleDelete(selectObjs)">
|
||||||
:disabled="multiple"
|
|
||||||
icon="Delete"
|
|
||||||
type="primary"
|
|
||||||
v-auth="'wallet_walletRechargePackage_del'"
|
|
||||||
@click="handleDelete(selectObjs)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<right-toolbar
|
<right-toolbar :search="false" :export="false" v-model:showSearch="showSearch"
|
||||||
:search="false"
|
@exportExcel="exportExcel" class="ml10 mr20" style="float: right"
|
||||||
:export="false"
|
@queryTable="getDataList"></right-toolbar>
|
||||||
v-model:showSearch="showSearch"
|
|
||||||
@exportExcel="exportExcel"
|
|
||||||
class="ml10 mr20"
|
|
||||||
style="float: right"
|
|
||||||
@queryTable="getDataList"
|
|
||||||
></right-toolbar>
|
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||||
:data="state.dataList"
|
:header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle"
|
||||||
v-loading="state.loading"
|
@sort-change="sortChangeHandle">
|
||||||
border
|
|
||||||
:cell-style="tableStyle.cellStyle"
|
|
||||||
:header-cell-style="tableStyle.headerCellStyle"
|
|
||||||
@selection-change="selectionChangHandle"
|
|
||||||
@sort-change="sortChangeHandle"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="40" align="center" />
|
<el-table-column type="selection" width="40" align="center" />
|
||||||
<el-table-column type="index" label="#" width="40" />
|
<el-table-column type="index" label="#" width="40" />
|
||||||
<el-table-column prop="name" label="套餐名" />
|
<el-table-column prop="name" label="套餐名" />
|
||||||
@@ -64,21 +41,15 @@
|
|||||||
<el-table-column prop="createTime" width="200" label="创建时间" show-overflow-tooltip />
|
<el-table-column prop="createTime" width="200" label="创建时间" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="150">
|
<el-table-column label="操作" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button icon="edit-pen" text type="primary" v-auth="'wallet_walletRechargePackage_edit'"
|
||||||
icon="edit-pen"
|
@click="formDialogRef.openDialog(scope.row.id)">编辑</el-button>
|
||||||
text
|
<el-button icon="delete" text type="primary" v-auth="'wallet_walletRechargePackage_del'"
|
||||||
type="primary"
|
@click="handleDelete([scope.row.id])">删除</el-button>
|
||||||
v-auth="'wallet_walletRechargePackage_edit'"
|
|
||||||
@click="formDialogRef.openDialog(scope.row.id)"
|
|
||||||
>编辑</el-button
|
|
||||||
>
|
|
||||||
<el-button icon="delete" text type="primary" v-auth="'wallet_walletRechargePackage_del'" @click="handleDelete([scope.row.id])"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
|
||||||
|
v-bind="state.pagination" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 编辑、新增 -->
|
<!-- 编辑、新增 -->
|
||||||
|
|||||||
Reference in new issue
Block a user