Merge remote-tracking branch 'yudao/dev' into dev-to-dev
BIN
.image/Java监控.jpg
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
.image/MySQL.jpg
Normal file
After Width: | Height: | Size: 142 KiB |
BIN
.image/OA请假-列表.jpg
Normal file
After Width: | Height: | Size: 152 KiB |
BIN
.image/OA请假-发起.jpg
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
.image/OA请假-详情.jpg
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
.image/Redis.jpg
Normal file
After Width: | Height: | Size: 95 KiB |
BIN
.image/admin-uniapp/01.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
.image/admin-uniapp/02.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
.image/admin-uniapp/03.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
.image/admin-uniapp/04.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
BIN
.image/admin-uniapp/05.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
.image/admin-uniapp/06.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
.image/admin-uniapp/07.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
.image/admin-uniapp/08.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
.image/admin-uniapp/09.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
.image/common/mall-feature.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
.image/common/mall-preview.png
Normal file
After Width: | Height: | Size: 238 KiB |
BIN
.image/common/project-vs.png
Normal file
After Width: | Height: | Size: 139 KiB |
BIN
.image/common/ruoyi-vue-pro-architecture.png
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
.image/common/ruoyi-vue-pro-biz.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
.image/common/yudao-cloud-architecture.png
Normal file
After Width: | Height: | Size: 201 KiB |
BIN
.image/common/yudao-roadmap.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
.image/个人中心.jpg
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
.image/代码生成.jpg
Normal file
After Width: | Height: | Size: 130 KiB |
BIN
.image/令牌管理.jpg
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
.image/任务列表-审批.jpg
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
.image/任务列表-已办.jpg
Normal file
After Width: | Height: | Size: 160 KiB |
BIN
.image/任务列表-待办.jpg
Normal file
After Width: | Height: | Size: 150 KiB |
BIN
.image/任务日志.jpg
Normal file
After Width: | Height: | Size: 124 KiB |
BIN
.image/商户信息.jpg
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
.image/在线用户.jpg
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
.image/大屏设计器-列表.jpg
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
.image/大屏设计器-编辑.jpg
Normal file
After Width: | Height: | Size: 109 KiB |
BIN
.image/大屏设计器-预览.jpg
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
.image/字典数据.jpg
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
.image/字典类型.jpg
Normal file
After Width: | Height: | Size: 126 KiB |
BIN
.image/定时任务.jpg
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
.image/岗位管理.jpg
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
.image/应用信息-列表.jpg
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
.image/应用信息-编辑.jpg
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
.image/应用管理.jpg
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
.image/我的流程-列表.jpg
Normal file
After Width: | Height: | Size: 176 KiB |
BIN
.image/我的流程-发起.jpg
Normal file
After Width: | Height: | Size: 91 KiB |
BIN
.image/我的流程-详情.jpg
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
.image/报表设计器-图形报表.jpg
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
.image/报表设计器-打印设计.jpg
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
.image/报表设计器-数据报表.jpg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
.image/操作日志.jpg
Normal file
After Width: | Height: | Size: 98 KiB |
BIN
.image/支付订单.jpg
Normal file
After Width: | Height: | Size: 208 KiB |
BIN
.image/敏感词.jpg
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
.image/数据库文档.jpg
Normal file
After Width: | Height: | Size: 97 KiB |
BIN
.image/文件管理.jpg
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
.image/文件管理2.jpg
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
.image/文件配置.jpg
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
.image/日志中心.jpg
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
.image/流程模型-列表.jpg
Normal file
After Width: | Height: | Size: 173 KiB |
BIN
.image/流程模型-定义.jpg
Normal file
After Width: | Height: | Size: 125 KiB |
BIN
.image/流程模型-设计.jpg
Normal file
After Width: | Height: | Size: 125 KiB |
BIN
.image/流程表单.jpg
Normal file
After Width: | Height: | Size: 148 KiB |
BIN
.image/生成效果.jpg
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
.image/用户分组.jpg
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
.image/用户管理.jpg
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
.image/登录.jpg
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
.image/登录日志.jpg
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
.image/短信日志.jpg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
.image/短信模板.jpg
Normal file
After Width: | Height: | Size: 248 KiB |
BIN
.image/短信渠道.jpg
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
.image/租户套餐.png
Normal file
After Width: | Height: | Size: 96 KiB |
BIN
.image/租户管理.jpg
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
.image/系统接口.jpg
Normal file
After Width: | Height: | Size: 91 KiB |
BIN
.image/菜单管理.jpg
Normal file
After Width: | Height: | Size: 129 KiB |
BIN
.image/表单构建.jpg
Normal file
After Width: | Height: | Size: 102 KiB |
BIN
.image/角色管理.jpg
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
.image/访问日志.jpg
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
.image/退款订单.jpg
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
.image/通知公告.jpg
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
.image/部门管理.jpg
Normal file
After Width: | Height: | Size: 109 KiB |
BIN
.image/配置管理.jpg
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
.image/链路追踪.jpg
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
.image/错误日志.jpg
Normal file
After Width: | Height: | Size: 110 KiB |
BIN
.image/错误码管理.jpg
Normal file
After Width: | Height: | Size: 131 KiB |
BIN
.image/首页.jpg
Normal file
After Width: | Height: | Size: 62 KiB |
91
README.md
@ -66,6 +66,18 @@
|
|||||||
| ESLint | 脚本代码检查 |
|
| ESLint | 脚本代码检查 |
|
||||||
| DotENV | env 文件高亮 |
|
| DotENV | env 文件高亮 |
|
||||||
|
|
||||||
|
## 🔥 后端架构
|
||||||
|
|
||||||
|
支持 Spring Boot、Spring Cloud 两种架构:
|
||||||
|
|
||||||
|
① Spring Boot 单体架构:<https://github.com/YunaiV/ruoyi-vue-pro>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
② Spring Cloud 微服务架构:<https://github.com/YunaiV/yudao-cloud>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## 内置功能
|
## 内置功能
|
||||||
|
|
||||||
系统内置多种多种业务功能,可以用于快速你的业务系统:
|
系统内置多种多种业务功能,可以用于快速你的业务系统:
|
||||||
@ -174,62 +186,61 @@ ps:核心功能已经实现,正在对接微信小程序中...
|
|||||||
|
|
||||||
### 商城系统
|
### 商城系统
|
||||||
|
|
||||||
建设中...
|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|
_前端基于 crmeb uniapp 经过授权重构,优化代码实现,接入芋道快速开发平台_
|
||||||
|
|
||||||

|
演示地址:<https://doc.iocoder.cn/mall-preview/>
|
||||||
|
|
||||||
## 🐷 演示图
|
## 🐷 演示图
|
||||||
|
|
||||||
### 系统功能
|
### 系统功能
|
||||||
|
|
||||||
| 模块 | biu | biu | biu |
|
| 模块 | biu | biu | biu |
|
||||||
|------------|--------------------------------------------------------------------|------------------------------------------------------------------|------------------------------------------------------------------|
|
|----------|-----------------------------|---------------------------|--------------------------|
|
||||||
| 登录 & 首页 |  |  |  |
|
| 登录 & 首页 |  |  |  |
|
||||||
| 用户 & 应用 |  |  |  |
|
| 用户 & 应用 |  |  |  |
|
||||||
| 租户 & 套餐 |  |  | - |
|
| 租户 & 套餐 |  |  | - |
|
||||||
| 部门 & 岗位 |  |  | - |
|
| 部门 & 岗位 |  |  | - |
|
||||||
| 菜单 & 角色 |  |  | - |
|
| 菜单 & 角色 |  |  | - |
|
||||||
| 审计日志 |  |  | - |
|
| 审计日志 |  |  | - |
|
||||||
| 短信 |  |  |  |
|
| 短信 |  |  |  |
|
||||||
| 字典 & 敏感词 |  |  |  |
|
| 字典 & 敏感词 |  |  |  |
|
||||||
| 错误码 & 通知 |  |  | - |
|
| 错误码 & 通知 |  |  | - |
|
||||||
|
|
||||||
### 工作流程
|
### 工作流程
|
||||||
|
|
||||||
| 模块 | biu | biu | biu |
|
| 模块 | biu | biu | biu |
|
||||||
|---------|------------------------------------------------------------------------|------------------------------------------------------------------------|------------------------------------------------------------------------|
|
|---------|---------------------------------|---------------------------------|---------------------------------|
|
||||||
| 流程模型 |  |  |  |
|
| 流程模型 |  |  |  |
|
||||||
| 表单 & 分组 |  |  | - |
|
| 表单 & 分组 |  |  | - |
|
||||||
| 我的流程 |  |  |  |
|
| 我的流程 |  |  |  |
|
||||||
| 待办 & 已办 |  |  |  |
|
| 待办 & 已办 |  |  |  |
|
||||||
| OA 请假 |  |  |  |
|
| OA 请假 |  |  |  |
|
||||||
|
|
||||||
### 基础设施
|
### 基础设施
|
||||||
|
|
||||||
| 模块 | biu | biu | biu |
|
| 模块 | biu | biu | biu |
|
||||||
|---------------|----------------------------------------------------------------------|--------------------------------------------------------------------|------------------------------------------------------------------|
|
|---------------|-------------------------------|-----------------------------|---------------------------|
|
||||||
| 代码生成 |  |  | - |
|
| 代码生成 |  |  | - |
|
||||||
| 文档 |  |  | - |
|
| 文档 |  |  | - |
|
||||||
| 文件 & 配置 |  |  |  |
|
| 文件 & 配置 |  |  |  |
|
||||||
| 定时任务 |  |  | - |
|
| 定时任务 |  |  | - |
|
||||||
| API 日志 |  |  | - |
|
| API 日志 |  |  | - |
|
||||||
| MySQL & Redis |  |  | - |
|
| MySQL & Redis |  |  | - |
|
||||||
| 监控平台 |  |  |  |
|
| 监控平台 |  |  |  |
|
||||||
|
|
||||||
### 支付系统
|
### 支付系统
|
||||||
|
|
||||||
| 模块 | biu | biu | biu |
|
| 模块 | biu | biu | biu |
|
||||||
|---------|------------------------------------------------------------------|------------------------------------------------------------------------|------------------------------------------------------------------------|
|
|---------|---------------------------|---------------------------------|---------------------------------|
|
||||||
| 商家 & 应用 |  |  |  |
|
| 商家 & 应用 |  |  |  |
|
||||||
| 支付 & 退款 |  |  | --- |
|
| 支付 & 退款 |  |  | --- |
|
||||||
|
|
||||||
### 数据报表
|
### 数据报表
|
||||||
|
|
||||||
| 模块 | biu | biu | biu |
|
| 模块 | biu | biu | biu |
|
||||||
|-------|--------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
|
|-------|---------------------------------|---------------------------------|---------------------------------------|
|
||||||
| 报表设计器 |  |  |  |
|
| 报表设计器 |  |  |  |
|
||||||
| 大屏设计器 |  |  |  |
|
| 大屏设计器 |  |  |  |
|
||||||
|
34
src/api/pay/wallet/rechargePackage/index.ts
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
export interface WalletRechargePackageVO {
|
||||||
|
id: number
|
||||||
|
name: string
|
||||||
|
payPrice: number
|
||||||
|
bonusPrice: number
|
||||||
|
status: number
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询套餐充值列表
|
||||||
|
export const getWalletRechargePackagePage = async (params) => {
|
||||||
|
return await request.get({ url: '/pay/wallet-recharge-package/page', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询套餐充值详情
|
||||||
|
export const getWalletRechargePackage = async (id: number) => {
|
||||||
|
return await request.get({ url: '/pay/wallet-recharge-package/get?id=' + id })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增套餐充值
|
||||||
|
export const createWalletRechargePackage = async (data: WalletRechargePackageVO) => {
|
||||||
|
return await request.post({ url: '/pay/wallet-recharge-package/create', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改套餐充值
|
||||||
|
export const updateWalletRechargePackage = async (data: WalletRechargePackageVO) => {
|
||||||
|
return await request.put({ url: '/pay/wallet-recharge-package/update', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除套餐充值
|
||||||
|
export const deleteWalletRechargePackage = async (id: number) => {
|
||||||
|
return await request.delete({ url: '/pay/wallet-recharge-package/delete?id=' + id })
|
||||||
|
}
|
@ -0,0 +1,122 @@
|
|||||||
|
<template>
|
||||||
|
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||||
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
:model="formData"
|
||||||
|
:rules="formRules"
|
||||||
|
label-width="150px"
|
||||||
|
v-loading="formLoading"
|
||||||
|
>
|
||||||
|
<el-form-item label="套餐名" prop="name">
|
||||||
|
<el-input v-model="formData.name" placeholder="请输入套餐名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="支付金额(元)" prop="payPrice">
|
||||||
|
<el-input-number v-model="formData.payPrice" :min="0" :precision="2" :step="0.01" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赠送金额(元)" prop="bonusPrice">
|
||||||
|
<el-input-number v-model="formData.bonusPrice" :min="0" :precision="2" :step="0.01" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="开启状态" prop="status">
|
||||||
|
<el-radio-group v-model="formData.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>
|
||||||
|
{{ dict.label }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import * as WalletRechargePackageApi from '@/api/pay/wallet/rechargePackage'
|
||||||
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
|
import { fenToYuan, yuanToFen } from '@/utils'
|
||||||
|
const { t } = useI18n() // 国际化
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
|
const formData = ref({
|
||||||
|
id: undefined,
|
||||||
|
name: undefined,
|
||||||
|
payPrice: undefined,
|
||||||
|
bonusPrice: undefined,
|
||||||
|
status: undefined
|
||||||
|
})
|
||||||
|
const formRules = reactive({
|
||||||
|
name: [{ required: true, message: '套餐名不能为空', trigger: 'blur' }],
|
||||||
|
payPrice: [{ required: true, message: '支付金额不能为空', trigger: 'blur' }],
|
||||||
|
bonusPrice: [{ required: true, message: '赠送金额不能为空', trigger: 'blur' }],
|
||||||
|
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
|
||||||
|
})
|
||||||
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
|
/** 打开弹窗 */
|
||||||
|
const open = async (type: string, id?: number) => {
|
||||||
|
dialogVisible.value = true
|
||||||
|
dialogTitle.value = t('action.' + type)
|
||||||
|
formType.value = type
|
||||||
|
resetForm()
|
||||||
|
// 修改时,设置数据
|
||||||
|
if (id) {
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
formData.value = await WalletRechargePackageApi.getWalletRechargePackage(id)
|
||||||
|
formData.value.payPrice = fenToYuan(formData.value.payPrice)
|
||||||
|
formData.value.bonusPrice = fenToYuan(formData.value.bonusPrice)
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
|
/** 提交表单 */
|
||||||
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
|
const submitForm = async () => {
|
||||||
|
// 校验表单
|
||||||
|
if (!formRef) return
|
||||||
|
const valid = await formRef.value.validate()
|
||||||
|
if (!valid) return
|
||||||
|
// 提交请求
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
const data = formData.value as unknown as WalletRechargePackageApi.WalletRechargePackageVO
|
||||||
|
data.payPrice = yuanToFen(data.payPrice)
|
||||||
|
data.bonusPrice = yuanToFen(data.bonusPrice)
|
||||||
|
if (formType.value === 'create') {
|
||||||
|
await WalletRechargePackageApi.createWalletRechargePackage(data)
|
||||||
|
message.success(t('common.createSuccess'))
|
||||||
|
} else {
|
||||||
|
await WalletRechargePackageApi.updateWalletRechargePackage(data)
|
||||||
|
message.success(t('common.updateSuccess'))
|
||||||
|
}
|
||||||
|
dialogVisible.value = false
|
||||||
|
// 发送操作成功的事件
|
||||||
|
emit('success')
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置表单 */
|
||||||
|
const resetForm = () => {
|
||||||
|
formData.value = {
|
||||||
|
id: undefined,
|
||||||
|
name: undefined,
|
||||||
|
payPrice: undefined,
|
||||||
|
bonusPrice: undefined,
|
||||||
|
status: undefined
|
||||||
|
}
|
||||||
|
formRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
</script>
|
186
src/views/pay/wallet/rechargePackage/index.vue
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
<template>
|
||||||
|
<ContentWrap>
|
||||||
|
<!-- 搜索工作栏 -->
|
||||||
|
<el-form
|
||||||
|
class="-mb-15px"
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryFormRef"
|
||||||
|
:inline="true"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="套餐名" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.name"
|
||||||
|
placeholder="请输入套餐名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable class="!w-240px">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.createTime"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
type="daterange"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||||
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
@click="openForm('create')"
|
||||||
|
v-hasPermi="['pay:wallet-recharge-package:create']"
|
||||||
|
>
|
||||||
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</ContentWrap>
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<ContentWrap>
|
||||||
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||||
|
<el-table-column label="编号" align="center" prop="id" />
|
||||||
|
<el-table-column label="套餐名" align="center" prop="name" />
|
||||||
|
<el-table-column label="支付金额" align="center" prop="payPrice">
|
||||||
|
<template #default="{ row }"> {{ fenToYuan(row.payPrice) }} 元</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="赠送金额" align="center" prop="bonusPrice">
|
||||||
|
<template #default="{ row }"> {{ fenToYuan(row.bonusPrice) }} 元</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
align="center"
|
||||||
|
prop="createTime"
|
||||||
|
:formatter="dateFormatter"
|
||||||
|
width="180px"
|
||||||
|
/>
|
||||||
|
<el-table-column label="操作" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
@click="openForm('update', scope.row.id)"
|
||||||
|
v-hasPermi="['pay:wallet-recharge-package:update']"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
@click="handleDelete(scope.row.id)"
|
||||||
|
v-hasPermi="['pay:wallet-recharge-package:delete']"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<Pagination
|
||||||
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNo"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</ContentWrap>
|
||||||
|
|
||||||
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
|
<WalletRechargePackageForm ref="formRef" @success="getList" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
|
import * as WalletRechargePackageApi from '@/api/pay/wallet/rechargePackage'
|
||||||
|
import WalletRechargePackageForm from './WalletRechargePackageForm.vue'
|
||||||
|
import { fenToYuan } from '@/utils'
|
||||||
|
|
||||||
|
defineOptions({ name: 'WalletRechargePackage' })
|
||||||
|
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
const { t } = useI18n() // 国际化
|
||||||
|
|
||||||
|
const loading = ref(true) // 列表的加载中
|
||||||
|
const total = ref(0) // 列表的总页数
|
||||||
|
const list = ref([]) // 列表的数据
|
||||||
|
const queryParams = reactive({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: null,
|
||||||
|
payPrice: null,
|
||||||
|
bonusPrice: null,
|
||||||
|
status: null,
|
||||||
|
createTime: []
|
||||||
|
})
|
||||||
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
const exportLoading = ref(false) // 导出的加载中
|
||||||
|
|
||||||
|
/** 查询列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const data = await WalletRechargePackageApi.getWalletRechargePackagePage(queryParams)
|
||||||
|
list.value = data.list
|
||||||
|
total.value = data.total
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value.resetFields()
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 添加/修改操作 */
|
||||||
|
const formRef = ref()
|
||||||
|
const openForm = (type: string, id?: number) => {
|
||||||
|
formRef.value.open(type, id)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
const handleDelete = async (id: number) => {
|
||||||
|
try {
|
||||||
|
// 删除的二次确认
|
||||||
|
await message.delConfirm()
|
||||||
|
// 发起删除
|
||||||
|
await WalletRechargePackageApi.deleteWalletRechargePackage(id)
|
||||||
|
message.success(t('common.delSuccess'))
|
||||||
|
// 刷新列表
|
||||||
|
await getList()
|
||||||
|
} catch {}
|
||||||
|
}
|
||||||
|
/** 初始化 **/
|
||||||
|
onMounted(() => {
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
</script>
|
@ -15,7 +15,21 @@
|
|||||||
type="textarea"
|
type="textarea"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="接收人" prop="userId">
|
<el-form-item label="用户类型" prop="userType">
|
||||||
|
<el-radio-group v-model="formData.userType">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in getIntDictOptions(DICT_TYPE.USER_TYPE)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value as number"
|
||||||
|
>
|
||||||
|
{{ dict.label }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-show="formData.userType === 1" label="接收人ID" prop="userId">
|
||||||
|
<el-input v-model="formData.userId" style="width: 160px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-show="formData.userType === 2" label="接收人" prop="userId">
|
||||||
<el-select v-model="formData.userId" placeholder="请选择接收人">
|
<el-select v-model="formData.userId" placeholder="请选择接收人">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in userOption"
|
v-for="item in userOption"
|
||||||
@ -46,6 +60,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as UserApi from '@/api/system/user'
|
import * as UserApi from '@/api/system/user'
|
||||||
import * as NotifyTemplateApi from '@/api/system/notify/template'
|
import * as NotifyTemplateApi from '@/api/system/notify/template'
|
||||||
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
|
|
||||||
defineOptions({ name: 'SystemNotifyTemplateSendForm' })
|
defineOptions({ name: 'SystemNotifyTemplateSendForm' })
|
||||||
|
|
||||||
@ -57,6 +72,7 @@ const formData = ref({
|
|||||||
content: '',
|
content: '',
|
||||||
params: {},
|
params: {},
|
||||||
userId: null,
|
userId: null,
|
||||||
|
userType: 1,
|
||||||
templateCode: '',
|
templateCode: '',
|
||||||
templateParams: new Map()
|
templateParams: new Map()
|
||||||
})
|
})
|
||||||
@ -122,7 +138,8 @@ const resetForm = () => {
|
|||||||
params: {},
|
params: {},
|
||||||
mobile: '',
|
mobile: '',
|
||||||
templateCode: '',
|
templateCode: '',
|
||||||
templateParams: new Map()
|
templateParams: new Map(),
|
||||||
|
userType: 1
|
||||||
} as any
|
} as any
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|