|
|
@@ -87,9 +87,10 @@
|
|
|
<template #empty>
|
|
|
<el-empty :image-size="40" description="暂无配置项" />
|
|
|
</template>
|
|
|
- <el-table-column label="充值金额" prop="rechargeAmount" width="140">
|
|
|
+ <el-table-column label="充值金额" prop="rechargeAmount" width="170">
|
|
|
<template #default="{ row }">
|
|
|
{{ u.fmt.fmtMoney(row.rechargeAmount) }}
|
|
|
+ <el-tag v-if="row.isDefault" type="warning" size="small" effect="light" style="margin-left:4px">默认</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="赠款金额" prop="grantsAmount" width="140">
|
|
|
@@ -102,8 +103,9 @@
|
|
|
{{ row.label || '-' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" prop="action" width="160" align="center" fixed="right">
|
|
|
+ <el-table-column label="操作" prop="action" width="220" align="center" fixed="right">
|
|
|
<template #default="{ row }">
|
|
|
+ <el-button v-if="!row.isDefault" v-auth="'rechargeConfig.modify'" type="primary" size="small" text @click="handleSetDefault(row)">设为默认</el-button>
|
|
|
<el-button v-auth="'rechargeConfig.modify'" type="warning" size="small" text @click="handleItemEdit(g.group.id, row)">编辑</el-button>
|
|
|
<el-button v-auth="'rechargeConfig.remove'" type="danger" size="small" text @click="handleItemRemove(row)">删除</el-button>
|
|
|
</template>
|
|
|
@@ -219,4 +221,13 @@ const handleItemRemove = (row: any) => {
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
+
|
|
|
+const handleSetDefault = (row: any) => {
|
|
|
+ $body('/rechargeConfig/item/modify', { ...row, isDefault: true }).then(() => {
|
|
|
+ Msg.message("已设为默认", 'success');
|
|
|
+ loadData();
|
|
|
+ }).catch(() => {
|
|
|
+ Msg.message("操作失败", 'error');
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|