Commit 592ec616 authored by Qingyu Deng's avatar Qingyu Deng

refactor: remove magic number

parent 8c7aaf41
......@@ -10,20 +10,24 @@
<el-tab-pane
v-if="isAllowedToAudit"
label="待审核"
name="0"
:name="TABS.pending"
@tab-click="handleTabChange"
></el-tab-pane>
<el-tab-pane
label="审核通过"
name="1"
:name="TABS.passed"
@tab-click="handleTabChange"
></el-tab-pane>
<el-tab-pane
label="审核驳回"
name="2"
:name="TABS.rejected"
@tab-click="handleTabChange"
></el-tab-pane>
<el-tab-pane label="提现失败" name="3" @tab-click="handleTabChange">
<el-tab-pane
label="提现失败"
:name="TABS.failed"
@tab-click="handleTabChange"
>
</el-tab-pane>
</el-tabs>
</div>
......@@ -136,18 +140,18 @@
<el-button
type="text"
@click="handleDetail('look', scope.row.id)"
v-if="searchProps.withdraw_apply_status !== '3'"
v-if="searchProps.withdraw_apply_status !== TABS.failed"
>查看</el-button
>
<el-button
type="text"
v-if="searchProps.withdraw_apply_status == '0'"
v-if="searchProps.withdraw_apply_status === TABS.pending"
@click="handleDetail('audit', scope.row.id)"
>审核</el-button
>
<el-button
type="text"
v-if="searchProps.withdraw_apply_status == '3'"
v-if="searchProps.withdraw_apply_status == TABS.failed"
@click="handleFinzingFind(scope.row.wallet_id)"
>解冻</el-button
>
......@@ -292,6 +296,14 @@ import {
getAll_role_list,
} from "../../../service/Withdrawal/withdrawal";
import { ElMessage } from "element-plus";
const TABS = {
pending: "0",
passed: "1",
rejected: "2",
failed: "3",
};
export default {
name: "Audit",
components: { Layout },
......@@ -318,7 +330,7 @@ export default {
searchProps: {
user_id: "", //用户id
page_size: 1, //页码
withdraw_apply_status: "0", //状态
withdraw_apply_status: TABS.pending, //状态
},
// 弹框
dialogData: {
......@@ -336,7 +348,10 @@ export default {
outerVisible: false, //外层弹框
page: 20,
count: 0, //总条数
loading: false, //加载中
loading: false, //加载中,
// constants
TABS,
};
},
created() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment