Compare commits
14 Commits
22bb6ff90a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9247f5eb83 | ||
|
|
f4f5954e17 | ||
|
|
a388f85dee | ||
|
|
78ffecc94f | ||
|
|
ea7e3fb721 | ||
|
|
fd5623f696 | ||
|
|
1bdb911f15 | ||
|
|
ebac3a6ff7 | ||
|
|
b1a934793e | ||
|
|
43f9e82c74 | ||
|
|
95419a51f5 | ||
|
|
48f404a1bc | ||
|
|
85cf804aaf | ||
|
|
e137e573d2 |
@@ -22,4 +22,4 @@ VUE_APP_XXL_JOB_ADMIN = 'http://localhost:9100/xxl-job-admin'
|
|||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|
||||||
VUE_APP_LOGO_PRE = 'leyan'
|
VUE_APP_LOGO_PRE = 'qiumu'
|
||||||
|
|||||||
24
.env.muyu
@@ -1,24 +0,0 @@
|
|||||||
# 页面标题
|
|
||||||
|
|
||||||
# 生产环境配置
|
|
||||||
NODE_ENV = 'production'
|
|
||||||
BABEL_ENV = 'production'
|
|
||||||
ENV = 'muyu'
|
|
||||||
# 若依管理系统/生产环境
|
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
|
||||||
|
|
||||||
# 应用访问路径 例如使用前缀 /admin/
|
|
||||||
VUE_APP_CONTEXT_PATH = '/'
|
|
||||||
|
|
||||||
# 监控地址
|
|
||||||
VUE_APP_MONITRO_ADMIN = '/admin/applications'
|
|
||||||
|
|
||||||
# xxl-job 控制台地址
|
|
||||||
VUE_APP_XXL_JOB_ADMIN = '/xxl-job-admin'
|
|
||||||
|
|
||||||
# 花荷
|
|
||||||
VUE_APP_SYSTEM_HOME = '沐雨'
|
|
||||||
VUE_APP_TITLE = 沐雨后台管理系统
|
|
||||||
VUE_APP_LOGO_PRE = 'muyu'
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
NODE_ENV = 'production'
|
NODE_ENV = 'production'
|
||||||
BABEL_ENV = 'production'
|
BABEL_ENV = 'production'
|
||||||
ENV = 'leyan'
|
ENV = 'qiumu'
|
||||||
# 若依管理系统/生产环境
|
# 若依管理系统/生产环境
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
VUE_APP_BASE_API = '/prod-api'
|
||||||
|
|
||||||
@@ -17,8 +17,8 @@ VUE_APP_MONITRO_ADMIN = '/admin/applications'
|
|||||||
VUE_APP_XXL_JOB_ADMIN = '/xxl-job-admin'
|
VUE_APP_XXL_JOB_ADMIN = '/xxl-job-admin'
|
||||||
|
|
||||||
# 花荷
|
# 花荷
|
||||||
VUE_APP_SYSTEM_HOME = '乐妍'
|
VUE_APP_SYSTEM_HOME = '秋沐'
|
||||||
VUE_APP_TITLE = 乐妍后台管理系统
|
VUE_APP_TITLE = 秋沐后台管理系统
|
||||||
VUE_APP_LOGO_PRE = 'leyan'
|
VUE_APP_LOGO_PRE = 'qiumu'
|
||||||
|
|
||||||
|
|
||||||
23
.env.wanyan
@@ -1,23 +0,0 @@
|
|||||||
# 页面标题
|
|
||||||
|
|
||||||
# 生产环境配置
|
|
||||||
NODE_ENV = 'production'
|
|
||||||
BABEL_ENV = 'production'
|
|
||||||
ENV = 'wanyan'
|
|
||||||
|
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
|
||||||
|
|
||||||
# 应用访问路径 例如使用前缀 /admin/
|
|
||||||
VUE_APP_CONTEXT_PATH = '/'
|
|
||||||
|
|
||||||
# 监控地址
|
|
||||||
VUE_APP_MONITRO_ADMIN = '/admin/applications'
|
|
||||||
|
|
||||||
# xxl-job 控制台地址
|
|
||||||
VUE_APP_XXL_JOB_ADMIN = '/xxl-job-admin'
|
|
||||||
|
|
||||||
VUE_APP_SYSTEM_HOME = '婉妍'
|
|
||||||
VUE_APP_TITLE = 婉妍后台管理系统
|
|
||||||
VUE_APP_LOGO_PRE = 'wanyan'
|
|
||||||
|
|
||||||
|
|
||||||
24
.env.yuan
@@ -1,24 +0,0 @@
|
|||||||
# 页面标题
|
|
||||||
|
|
||||||
# 生产环境配置
|
|
||||||
NODE_ENV = 'production'
|
|
||||||
BABEL_ENV = 'production'
|
|
||||||
ENV = 'yuan'
|
|
||||||
# 若依管理系统/生产环境
|
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
|
||||||
|
|
||||||
# 应用访问路径 例如使用前缀 /admin/
|
|
||||||
VUE_APP_CONTEXT_PATH = '/'
|
|
||||||
|
|
||||||
# 监控地址
|
|
||||||
VUE_APP_MONITRO_ADMIN = '/admin/applications'
|
|
||||||
|
|
||||||
# xxl-job 控制台地址
|
|
||||||
VUE_APP_XXL_JOB_ADMIN = '/xxl-job-admin'
|
|
||||||
|
|
||||||
# 花荷
|
|
||||||
VUE_APP_SYSTEM_HOME = '予安'
|
|
||||||
VUE_APP_TITLE = 予安后台管理系统
|
|
||||||
VUE_APP_LOGO_PRE = 'yuan'
|
|
||||||
|
|
||||||
|
|
||||||
@@ -7,10 +7,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vue-cli-service serve",
|
"dev": "vue-cli-service serve",
|
||||||
"build:prod": "vue-cli-service build",
|
"build:prod": "vue-cli-service build",
|
||||||
"build:yuan": "vue-cli-service build --mode yuan",
|
"build:qiumu": "vue-cli-service build --mode qiumu",
|
||||||
"build:leyan": "vue-cli-service build --mode leyan",
|
|
||||||
"build:muyu": "vue-cli-service build --mode muyu",
|
|
||||||
"build:wanyan": "vue-cli-service build --mode wanyan",
|
|
||||||
"build:yanyu": "vue-cli-service build --mode yanyu",
|
"build:yanyu": "vue-cli-service build --mode yanyu",
|
||||||
"preview": "node build/index.js --preview",
|
"preview": "node build/index.js --preview",
|
||||||
"lint": "eslint --ext .js,.vue src"
|
"lint": "eslint --ext .js,.vue src"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 17 KiB |
BIN
public/favicon-qiumu.ico
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
@@ -25,3 +25,11 @@ export function updateAccountCoin(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function changePointsAccount(data) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/account/changePoints',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
10
src/api/cai/loginLog.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询ip访问记录列表
|
||||||
|
export function listLoginLog(query) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/loginLog/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
44
src/api/cai/pointChangeLog.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询积分记录列表
|
||||||
|
export function listPointChangeLog(query) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/pointChangeLog/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询积分记录详细
|
||||||
|
export function getPointChangeLog(id) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/pointChangeLog/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增积分记录
|
||||||
|
export function addPointChangeLog(data) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/pointChangeLog',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改积分记录
|
||||||
|
export function updatePointChangeLog(data) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/pointChangeLog',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除积分记录
|
||||||
|
export function delPointChangeLog(id) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/pointChangeLog/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
51
src/api/cai/prizeInfo.js
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询抽奖奖品列表
|
||||||
|
export function listPrizeInfo(query) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/prizeInfo/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询抽奖奖品详细
|
||||||
|
export function getPrizeInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/prizeInfo/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增抽奖奖品
|
||||||
|
export function addPrizeInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/prizeInfo',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改抽奖奖品
|
||||||
|
export function updatePrizeInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/prizeInfo',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除抽奖奖品
|
||||||
|
export function delPrizeInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/prizeInfo/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function prizeInfoAll() {
|
||||||
|
return request({
|
||||||
|
url: '/cai/prizeInfo/all',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
27
src/api/cai/prizeOnline.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询已发布奖品列表
|
||||||
|
export function listPrizeOnline(query) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/prizeOnline/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询已发布奖品详细
|
||||||
|
export function getPrizeOnline(id) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/prizeOnline/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增已发布奖品
|
||||||
|
export function resetPrizeOnline(gender,data) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/prizeOnline/reset/'+gender,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
35
src/api/cai/prizeWinningRecord.js
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询中奖记录列表
|
||||||
|
export function listPrizeWinningRecord(query) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/prizeWinningRecord/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询中奖记录详细
|
||||||
|
export function getPrizeWinningRecord(id) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/prizeWinningRecord/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改中奖记录
|
||||||
|
export function givePrizeWinningRecord(data) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/prizeWinningRecord/give',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除中奖记录
|
||||||
|
export function delPrizeWinningRecord(id) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/prizeWinningRecord/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -7,6 +7,17 @@ export function listBusinessConfigList() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function listBusinessConfigV2List(businessType) {
|
||||||
|
return request({
|
||||||
|
url: '/cai/systemConfig/business/v2/all',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
businessType: businessType
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function updateBusinessConfig(data) {
|
export function updateBusinessConfig(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/cai/systemConfig/business/update',
|
url: '/cai/systemConfig/business/update',
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 132 KiB |
BIN
src/assets/logo/logo-qiumu.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 71 KiB |
@@ -338,3 +338,36 @@ export const topStatusList = [
|
|||||||
{ value: 2, label: '过期', listClass: listClass.info},
|
{ value: 2, label: '过期', listClass: listClass.info},
|
||||||
{ value: 3, label: '待生效', listClass: listClass.warning},
|
{ value: 3, label: '待生效', listClass: listClass.warning},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PAY("1","充值"),
|
||||||
|
* SYSTEM("2","系统调整"),
|
||||||
|
* INVITE("3","分销"),
|
||||||
|
* USE("4","抽奖"),
|
||||||
|
*/
|
||||||
|
export const pointChangeLogActionTypeList = [
|
||||||
|
{ value: "1", label: '充值',listClass: listClass.info},
|
||||||
|
{ value: "2", label: '系统调整',listClass: listClass.danger},
|
||||||
|
{ value: "3", label: '分销',listClass: listClass.primary},
|
||||||
|
{ value: "4", label: '抽奖',listClass: listClass.primary},
|
||||||
|
]
|
||||||
|
|
||||||
|
// 奖品类型 1-谢谢惠顾 2-普通奖 3-大奖
|
||||||
|
export const prizeTypeList = [
|
||||||
|
{ value: 1, label: '谢谢惠顾', listClass: listClass.warning },
|
||||||
|
{ value: 2, label: '普通奖', listClass: listClass.primary },
|
||||||
|
{ value: 3, label: '大奖', listClass: listClass.danger }
|
||||||
|
]
|
||||||
|
|
||||||
|
export const prizeAutoGiveList = [
|
||||||
|
{ value: false, label: '手工派发',listClass: listClass.warning},
|
||||||
|
{ value: true, label: '自动派发',listClass: listClass.primary},
|
||||||
|
]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 奖品兑换情况 0-未兑换 1-已兑换
|
||||||
|
*/
|
||||||
|
export const winningRecordGiveStatusList= [
|
||||||
|
{ value: 0, label: '未兑换',listClass: listClass.danger},
|
||||||
|
{ value: 1, label: '已兑换',listClass: listClass.primary},
|
||||||
|
]
|
||||||
|
|||||||
124
src/views/cai/account/add-account-points-dialog.vue
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<el-form-item label="是否执行分销" prop="distribution">
|
||||||
|
<el-radio-group v-model="form.distribution">
|
||||||
|
<el-radio :label="false">不执行</el-radio>
|
||||||
|
<el-radio :label="true">执行</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="调整积分" prop="changePoints">
|
||||||
|
<el-input v-model="form.changePoints" placeholder="请输入调整积分" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="systemName+'号'" prop="usercode">
|
||||||
|
<el-autocomplete
|
||||||
|
class="inline-input"
|
||||||
|
v-model="form.usercode"
|
||||||
|
:fetch-suggestions="querySearch"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
@select="handleSelect"
|
||||||
|
></el-autocomplete>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="昵称" v-if="info.nickname">
|
||||||
|
{{ info.nickname }} 【{{ info.usercode }}】
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="头像" v-if="info.avatar">
|
||||||
|
<image-avatar :src="info.avatar"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
注意:调整积分为负减余额,正则加积分, 请保证积分不能减为负数
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="open = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getUserByUsercode, listUserByUserCode} from "@/api/cai/user";
|
||||||
|
import {changePointsAccount} from "@/api/cai/account";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
systemName: process.env.VUE_APP_SYSTEM_HOME,
|
||||||
|
open: false,
|
||||||
|
title: '',
|
||||||
|
form:{
|
||||||
|
usercode: undefined,
|
||||||
|
changePoints: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
distribution: false
|
||||||
|
},
|
||||||
|
info:{
|
||||||
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
distribution: [
|
||||||
|
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
usercode: [
|
||||||
|
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
changePoints: [
|
||||||
|
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
buttonLoading: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init () {
|
||||||
|
this.open = true;
|
||||||
|
this.title = "调整用户积分"
|
||||||
|
this.info = {};
|
||||||
|
this.form.usercode = undefined
|
||||||
|
this.form.rechargeCoin = undefined
|
||||||
|
this.form.remark = undefined
|
||||||
|
},
|
||||||
|
querySearch(querySearch,cb){
|
||||||
|
listUserByUserCode(querySearch).then(res => {
|
||||||
|
cb(res.data.map((terminal) => {
|
||||||
|
return {
|
||||||
|
value: terminal,
|
||||||
|
name: terminal,
|
||||||
|
};
|
||||||
|
}))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSelect(item){
|
||||||
|
getUserByUsercode(item.value).then(res => {
|
||||||
|
this.info = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
submitForm () {
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.buttonLoading = true;
|
||||||
|
changePointsAccount(this.form).then(data => {
|
||||||
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
this.buttonLoading = false;
|
||||||
|
this.open = false
|
||||||
|
this.$emit('refreshDataList')
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -34,6 +34,16 @@
|
|||||||
v-hasPermi="['cai:account:add']"
|
v-hasPermi="['cai:account:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAddPoints"
|
||||||
|
v-hasPermi="['cai:account:add']"
|
||||||
|
>新增积分</el-button>
|
||||||
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@@ -60,7 +70,7 @@
|
|||||||
<el-table-column label="余额" align="center" prop="coin" sortable="custom" :sort-orders="['descending', 'ascending']" />
|
<el-table-column label="余额" align="center" prop="coin" sortable="custom" :sort-orders="['descending', 'ascending']" />
|
||||||
<el-table-column label="收益" align="center" prop="incomeCoin" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
<el-table-column label="收益" align="center" prop="incomeCoin" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
||||||
<el-table-column label="积分" align="center" prop="points" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
<el-table-column label="积分" align="center" prop="points" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
||||||
<el-table-column label="非原生充值" align="center" prop="totalTrdMoney" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
<!-- <el-table-column label="非原生充值" align="center" prop="totalTrdMoney" sortable="custom" :sort-orders="['descending', 'ascending']"/>-->
|
||||||
<el-table-column label="充值总额" align="center" prop="totalBuyMoney" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
<el-table-column label="充值总额" align="center" prop="totalBuyMoney" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
||||||
<el-table-column label="充值总紫贝" align="center" prop="totalBuyCoin" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
<el-table-column label="充值总紫贝" align="center" prop="totalBuyCoin" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
||||||
<el-table-column label="聊天总收入" align="center" prop="messageIncomeCoin" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
<el-table-column label="聊天总收入" align="center" prop="messageIncomeCoin" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
||||||
@@ -92,8 +102,10 @@
|
|||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<add-account-dialog v-if="addAccountDialogVisible" ref="addAccountDialog" @refreshDataList="getList"/>
|
||||||
<add-account-dialog v-if="addAccountDialogVisible" ref="addAccountDialog" @refreshDataList="getList"/>
|
<add-account-dialog v-if="addAccountDialogVisible" ref="addAccountDialog" @refreshDataList="getList"/>
|
||||||
<account-change-info v-if="accountChangeInfoVisible" ref="accountChangeInfo" />
|
<account-change-info v-if="accountChangeInfoVisible" ref="accountChangeInfo" />
|
||||||
|
<add-account-points-dialog v-if="addAccountPointsVisible" ref="addAccountPoints" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -102,11 +114,14 @@ import {listAccount} from "@/api/cai/account";
|
|||||||
import {genderList, isAnchorList, userStatusList, yesOrNoList} from "@/constant/statusMap";
|
import {genderList, isAnchorList, userStatusList, yesOrNoList} from "@/constant/statusMap";
|
||||||
import AddAccountDialog from "@/views/cai/account/add-account-dialog";
|
import AddAccountDialog from "@/views/cai/account/add-account-dialog";
|
||||||
import AccountChangeInfo from "@/views/cai/account/account-change-info";
|
import AccountChangeInfo from "@/views/cai/account/account-change-info";
|
||||||
|
import AddAccountPointsDialog from "@/views/cai/account/add-account-points-dialog.vue";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Account",
|
name: "Account",
|
||||||
components:{
|
components:{
|
||||||
|
AddAccountPointsDialog,
|
||||||
AccountChangeInfo,
|
AccountChangeInfo,
|
||||||
AddAccountDialog
|
AddAccountDialog
|
||||||
},
|
},
|
||||||
@@ -115,6 +130,7 @@ export default {
|
|||||||
genderList, userStatusList, yesOrNoList, isAnchorList,
|
genderList, userStatusList, yesOrNoList, isAnchorList,
|
||||||
addAccountDialogVisible: false,
|
addAccountDialogVisible: false,
|
||||||
accountChangeInfoVisible: false,
|
accountChangeInfoVisible: false,
|
||||||
|
addAccountPointsVisible: false,
|
||||||
systemName: process.env.VUE_APP_SYSTEM_HOME,
|
systemName: process.env.VUE_APP_SYSTEM_HOME,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
@@ -187,6 +203,12 @@ export default {
|
|||||||
this.$refs.addAccountDialog.init(row?.usercode)
|
this.$refs.addAccountDialog.init(row?.usercode)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleAddPoints(row) {
|
||||||
|
this.addAccountPointsVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addAccountPoints.init(row?.usercode)
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
145
src/views/cai/businessConfig/config-table.vue
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
size="mini"
|
||||||
|
@click="getList"
|
||||||
|
>重新查询</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="configList" >
|
||||||
|
<el-table-column label="名称" align="center" prop="desc" />
|
||||||
|
<el-table-column label="数值" align="center" prop="value" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<span v-if="scope.row.inputType !== 'textarea'">{{ scope.row.value }}</span>
|
||||||
|
<span v-if="scope.row.inputType === 'textarea'" v-html="scope.row.valueTextArea"></span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
v-hasPermi="['cai:businessConfig:edit']"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>修改</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="名称" prop="desc">
|
||||||
|
<el-input v-model="form.desc" placeholder="请输入" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数值" prop="value">
|
||||||
|
<el-input v-model="form.value" placeholder="请输入数值" v-if="form.inputType !== 'textarea'" />
|
||||||
|
<el-input v-model="form.value" placeholder="请输入数值" type="textarea" autosize v-if="form.inputType === 'textarea'" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {listBusinessConfigV2List, updateBusinessConfig} from "@/api/cai/systemConfig";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
businessType: {
|
||||||
|
type: String,
|
||||||
|
required: true, // 必填
|
||||||
|
default: "base" // 默认值
|
||||||
|
},
|
||||||
|
},
|
||||||
|
name: "BusinessConfig",
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
buttonLoading: false,
|
||||||
|
loading: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
queryParams:{},
|
||||||
|
form:{},
|
||||||
|
// 轮播表格数据
|
||||||
|
configList: [],
|
||||||
|
title: "",
|
||||||
|
open: false,
|
||||||
|
rules:[]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询轮播列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listBusinessConfigV2List(this.businessType).then(response => {
|
||||||
|
response.data.forEach(i => {
|
||||||
|
if(i.inputType === 'textarea'){
|
||||||
|
i.valueTextArea = i.value.replace(/\n/g, "<br/>");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.configList = response.data;
|
||||||
|
}).finally(()=>{
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
key: undefined,
|
||||||
|
desc: undefined,
|
||||||
|
value: undefined,
|
||||||
|
inputType: undefined
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
this.form = {
|
||||||
|
key: row.key,
|
||||||
|
desc: row.desc,
|
||||||
|
value: row.value,
|
||||||
|
inputType: row.inputType
|
||||||
|
};
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改业务设置";
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.buttonLoading = true;
|
||||||
|
updateBusinessConfig(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
129
src/views/cai/businessConfig/index-old.vue
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="configList" >
|
||||||
|
<el-table-column label="名称" align="center" prop="desc" />
|
||||||
|
<el-table-column label="数值" align="center" prop="value" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<span v-if="scope.row.inputType !== 'textarea'">{{ scope.row.value }}</span>
|
||||||
|
<span v-if="scope.row.inputType === 'textarea'" v-html="scope.row.valueTextArea"></span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
v-hasPermi="['cai:businessConfig:edit']"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>修改</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="名称" prop="desc">
|
||||||
|
<el-input v-model="form.desc" placeholder="请输入" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数值" prop="value">
|
||||||
|
<el-input v-model="form.value" placeholder="请输入数值" v-if="form.inputType !== 'textarea'" />
|
||||||
|
<el-input v-model="form.value" placeholder="请输入数值" type="textarea" autosize v-if="form.inputType === 'textarea'" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {listBusinessConfigList, updateBusinessConfig} from "@/api/cai/systemConfig";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "BusinessConfig",
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
buttonLoading: false,
|
||||||
|
loading: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
queryParams:{},
|
||||||
|
form:{},
|
||||||
|
// 轮播表格数据
|
||||||
|
configList: [],
|
||||||
|
title: "",
|
||||||
|
open: false,
|
||||||
|
rules:[]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询轮播列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listBusinessConfigList().then(response => {
|
||||||
|
response.data.forEach(i => {
|
||||||
|
if(i.inputType === 'textarea'){
|
||||||
|
i.valueTextArea = i.value.replace(/\n/g, "<br/>");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.configList = response.data;
|
||||||
|
}).finally(()=>{
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
key: undefined,
|
||||||
|
desc: undefined,
|
||||||
|
value: undefined,
|
||||||
|
inputType: undefined
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
this.form = {
|
||||||
|
key: row.key,
|
||||||
|
desc: row.desc,
|
||||||
|
value: row.value,
|
||||||
|
inputType: row.inputType
|
||||||
|
};
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改业务设置";
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.buttonLoading = true;
|
||||||
|
updateBusinessConfig(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -1,130 +1,47 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-tabs v-model="activeTabs" @tab-click="handleClick">
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<el-tab-pane label="业务配置" name="business">
|
||||||
</el-row>
|
<config-table business-type="business" />
|
||||||
|
</el-tab-pane>
|
||||||
<el-table v-loading="loading" :data="configList" >
|
<el-tab-pane label="安全配置" name="security">
|
||||||
<el-table-column label="名称" align="center" prop="desc" />
|
<config-table business-type="security" />
|
||||||
<el-table-column label="数值" align="center" prop="value" >
|
</el-tab-pane>
|
||||||
<template v-slot="scope">
|
<el-tab-pane label="支付配置" name="pay">
|
||||||
<span v-if="scope.row.inputType !== 'textarea'">{{ scope.row.value }}</span>
|
<config-table business-type="pay" />
|
||||||
<span v-if="scope.row.inputType === 'textarea'" v-html="scope.row.valueTextArea"></span>
|
</el-tab-pane>
|
||||||
</template>
|
<el-tab-pane label="域名配置" name="domain">
|
||||||
</el-table-column>
|
<config-table business-type="domain" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
</el-tab-pane>
|
||||||
<template v-slot="scope">
|
<el-tab-pane label="抽奖配置" name="DRAW">
|
||||||
<el-button
|
<config-table business-type="DRAW" />
|
||||||
size="mini"
|
</el-tab-pane>
|
||||||
type="text"
|
<el-tab-pane label="系统配置" name="system">
|
||||||
icon="el-icon-edit"
|
<config-table business-type="system" />
|
||||||
v-hasPermi="['cai:businessConfig:edit']"
|
</el-tab-pane>
|
||||||
@click="handleUpdate(scope.row)"
|
</el-tabs>
|
||||||
>修改</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="名称" prop="desc">
|
|
||||||
<el-input v-model="form.desc" placeholder="请输入" disabled/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="数值" prop="value">
|
|
||||||
<el-input v-model="form.value" placeholder="请输入数值" v-if="form.inputType !== 'textarea'" />
|
|
||||||
<el-input v-model="form.value" placeholder="请输入数值" type="textarea" autosize v-if="form.inputType === 'textarea'" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BannerAddUpdateDialog from '@/views/cai/banner/banner-add-update-dialog.vue'
|
|
||||||
import {listBusinessConfigList, updateBusinessConfig, updateSystemConfig} from "@/api/cai/systemConfig";
|
import ConfigTable from "@/views/cai/businessConfig/config-table.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Banner",
|
name: "SystemConfig",
|
||||||
components: {
|
components: {
|
||||||
BannerAddUpdateDialog
|
ConfigTable
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
activeTabs: "business",
|
||||||
buttonLoading: false,
|
|
||||||
loading: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
queryParams:{},
|
|
||||||
form:{},
|
|
||||||
// 轮播表格数据
|
|
||||||
configList: [],
|
|
||||||
title: "",
|
|
||||||
open: false,
|
|
||||||
rules:[]
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询轮播列表 */
|
handleClick(tab, event){
|
||||||
getList() {
|
console.log(tab, event);
|
||||||
this.loading = true;
|
|
||||||
listBusinessConfigList().then(response => {
|
|
||||||
response.data.forEach(i => {
|
|
||||||
if(i.inputType === 'textarea'){
|
|
||||||
i.valueTextArea = i.value.replace(/\n/g, "<br/>");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.configList = response.data;
|
|
||||||
}).finally(()=>{
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
key: undefined,
|
|
||||||
desc: undefined,
|
|
||||||
value: undefined,
|
|
||||||
inputType: undefined
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
this.form = {
|
|
||||||
key: row.key,
|
|
||||||
desc: row.desc,
|
|
||||||
value: row.value,
|
|
||||||
inputType: row.inputType
|
|
||||||
};
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改业务设置";
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
this.buttonLoading = true;
|
|
||||||
updateBusinessConfig(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
}).finally(() => {
|
|
||||||
this.buttonLoading = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
<el-form-item label="微信云贝数量" prop="wxAmount">
|
<el-form-item label="微信云贝数量" prop="wxAmount">
|
||||||
<el-input v-model="form.wxAmount" placeholder="请输入微信云贝数量" />
|
<el-input v-model="form.wxAmount" placeholder="请输入微信云贝数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="赠送积分" prop="givePoint">
|
||||||
|
<el-input v-model="form.givePoint" placeholder="请输入赠送积分数量" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="说明" prop="remark">
|
<el-form-item label="说明" prop="remark">
|
||||||
<el-input v-model="form.remark" placeholder="请输入说明" type="textarea" :rows="2"/>
|
<el-input v-model="form.remark" placeholder="请输入说明" type="textarea" :rows="2"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -42,10 +45,14 @@ export default {
|
|||||||
price: undefined,
|
price: undefined,
|
||||||
amount: undefined,
|
amount: undefined,
|
||||||
wxAmount: undefined,
|
wxAmount: undefined,
|
||||||
|
givePoint: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
givePoint: [
|
||||||
|
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
amount: [
|
amount: [
|
||||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
{{scope.row.amount - scope.row.wxAmount}}
|
{{scope.row.amount - scope.row.wxAmount}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="赠送积分" align="center" prop="givePoint" />
|
||||||
<el-table-column label="状态" align="center" prop="status" >
|
<el-table-column label="状态" align="center" prop="status" >
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
|
|||||||
87
src/views/cai/loginLog/index.vue
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="手机号" prop="mobile">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.mobile"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" v-loading="loading">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<span style="color: red">请输入手机号可以查询单日的最近10条原始登录记录,请勿一直查询,查询比较慢</span>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="ipRecordList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column label="详情" align="left" prop="info" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {listLoginLog} from "@/api/cai/loginLog";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "IpRecord",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 按钮loading
|
||||||
|
buttonLoading: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// ip访问记录表格数据
|
||||||
|
ipRecordList: [],
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
mobile: undefined
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询ip访问记录列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listLoginLog(this.queryParams).then(response => {
|
||||||
|
this.ipRecordList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -121,9 +121,6 @@ export default {
|
|||||||
name: [
|
name: [
|
||||||
{ required: true, message: "支付名称不能为空", trigger: "blur" }
|
{ required: true, message: "支付名称不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
notifyUrl: [
|
|
||||||
{ required: true, message: "回调域名不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
mchId: [
|
mchId: [
|
||||||
{ required: true, message: "商户ID不能为空", trigger: "blur" }
|
{ required: true, message: "商户ID不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
|||||||
199
src/views/cai/pointChangeLog/draw-winning-record-tabs.vue
Normal file
@@ -0,0 +1,199 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item :label="systemName+'号'" prop="usercode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.usercode"
|
||||||
|
:placeholder="'请输入'+systemName+'号'"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="手机号" prop="mobile">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.mobile"
|
||||||
|
placeholder="请输入手机号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="奖品名称" prop="prizeName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.prizeName"
|
||||||
|
placeholder="请输入奖品名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="自动兑奖" prop="autoGive">
|
||||||
|
<el-select v-model="queryParams.autoGive" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in prizeAutoGiveList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="giveStatus">
|
||||||
|
<el-select v-model="queryParams.giveStatus" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in winningRecordGiveStatusList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="prizeWinningRecordList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column label="抽奖时间" align="center" prop="createTime" width="140"/>
|
||||||
|
<el-table-column :label="systemName+'号'" align="center" prop="usercode"/>
|
||||||
|
<el-table-column label="手机号" align="center" prop="mobile"/>
|
||||||
|
<el-table-column label="昵称" align="center" prop="nickname"/>
|
||||||
|
<el-table-column label="奖品类型" align="center" prop="prizeType" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<cai-dict-tag :options="prizeTypeList" :value="scope.row.prizeType" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="奖品名称" align="center" prop="prizeName" />
|
||||||
|
<el-table-column label="奖品描述" align="center" prop="prizeDesc" />
|
||||||
|
<el-table-column label="奖品图片" align="center" prop="prizeImg" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<image-avatar :src="scope.row.prizeImg"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="奖品价值" align="center" prop="prizePrice" />
|
||||||
|
<el-table-column label="自动兑奖" align="center" prop="autoGive" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<cai-dict-tag :options="prizeAutoGiveList" :value="scope.row.autoGive" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" align="center" prop="giveStatus" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<cai-dict-tag :options="winningRecordGiveStatusList" :value="scope.row.giveStatus" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="兑奖备注" align="center" prop="giveRemark" />
|
||||||
|
<el-table-column label="中奖率" align="center" prop="winProbability" />
|
||||||
|
<el-table-column label="保底抽数" align="center" prop="guaranteeDraws" />
|
||||||
|
<el-table-column label="最低抽数" align="center" prop="minWinDraws" />
|
||||||
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['cai:prizeWinningRecord:edit']"
|
||||||
|
>已领奖</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {givePrizeWinningRecord, listPrizeWinningRecord} from "@/api/cai/prizeWinningRecord";
|
||||||
|
import {prizeAutoGiveList, prizeTypeList, winningRecordGiveStatusList} from "@/constant/statusMap";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "PrizeWinningRecord",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
winningRecordGiveStatusList,prizeTypeList, prizeAutoGiveList,
|
||||||
|
systemName: process.env.VUE_APP_SYSTEM_HOME,
|
||||||
|
// 按钮loading
|
||||||
|
buttonLoading: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 中奖记录表格数据
|
||||||
|
prizeWinningRecordList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
usercode: undefined,
|
||||||
|
mobile: undefined,
|
||||||
|
prizeName: undefined,
|
||||||
|
autoGive: undefined,
|
||||||
|
giveStatus: undefined,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询中奖记录列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPrizeWinningRecord(this.queryParams).then(response => {
|
||||||
|
this.prizeWinningRecordList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.$prompt('可输入的备注', "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
closeOnClickModal: false,
|
||||||
|
}).then(({ value }) => {
|
||||||
|
givePrizeWinningRecord({
|
||||||
|
id: row.id,
|
||||||
|
giveRemark: value,
|
||||||
|
}).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
38
src/views/cai/pointChangeLog/index.vue
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-tabs v-model="activeTabs" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="中奖记录" name="drawWinningRecordTabs">
|
||||||
|
<draw-winning-record-tabs />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="积分记录" name="pointRecordTabs">
|
||||||
|
<point-change-log-tabs />
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import DrawWinningRecordTabs from "@/views/cai/pointChangeLog/draw-winning-record-tabs.vue";
|
||||||
|
import PointChangeLogTabs from "@/views/cai/pointChangeLog/point-change-log-tabs.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "PrizeInfo",
|
||||||
|
components: {
|
||||||
|
DrawWinningRecordTabs,
|
||||||
|
PointChangeLogTabs,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeTabs: "drawWinningRecordTabs",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClick(tab, event){
|
||||||
|
console.log(tab, event);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
153
src/views/cai/pointChangeLog/point-change-log-tabs.vue
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item :label="systemName+'号'" prop="usercode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.usercode"
|
||||||
|
:placeholder="'请输入'+systemName+'号'"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="来源" prop="actionType">
|
||||||
|
<el-select v-model="queryParams.actionType" placeholder="来源" clearable size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in pointChangeLogActionTypeList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="链路号" prop="traceId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.traceId"
|
||||||
|
placeholder="请输入链路号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table v-loading="loading" :data="pointChangeLogList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column :label="systemName+'号'" align="center" prop="usercode" />
|
||||||
|
<el-table-column label="来源" align="center" prop="actionType" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<cai-dict-tag :options="pointChangeLogActionTypeList" :value="scope.row.actionType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="变动" align="center" prop="changeValue" >
|
||||||
|
<template v-slot="scope" >
|
||||||
|
<span :class="scope.row.changeValue >= 0 ?'font-red':'font-green'">{{scope.row.changeValue}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="说明" align="center" prop="message" min-width="200">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<div class="context-avatar-center">
|
||||||
|
<span>{{scope.row.message}}</span><image-preview v-if="scope.row.tarImg" :src="scope.row.tarImg" :width="32" :height="32"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="后台操作" align="center" prop="isAdmin" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<cai-dict-tag :options="yesOrNoList" :value="scope.row.isAdmin?1:0"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作时间" align="center" prop="createTime" width="160" />
|
||||||
|
<el-table-column label="链路号" align="center" prop="traceId" show-overflow-tooltip/>
|
||||||
|
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-info"
|
||||||
|
v-if="scope.row.traceId"
|
||||||
|
@click="handleInfo(scope.row)"
|
||||||
|
>关联业务</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>-->
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {listPointChangeLog} from "@/api/cai/pointChangeLog";
|
||||||
|
import {pointChangeLogActionTypeList, yesOrNoList} from "@/constant/statusMap";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "PointChangeLog",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
systemName: process.env.VUE_APP_SYSTEM_HOME,
|
||||||
|
pointChangeLogActionTypeList,yesOrNoList,
|
||||||
|
// 按钮loading
|
||||||
|
buttonLoading: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 积分记录表格数据
|
||||||
|
pointChangeLogList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
usercode: undefined,
|
||||||
|
actionType: undefined,
|
||||||
|
traceId:undefined
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询积分记录列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPointChangeLog(this.queryParams).then(response => {
|
||||||
|
this.pointChangeLogList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -1,181 +1,70 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
<el-form-item label="用户" prop="userId">
|
<el-form-item :label="'消费方'+systemName+'号'" prop="sourceUsercode">
|
||||||
<el-input
|
|
||||||
v-model="queryParams.userId"
|
|
||||||
placeholder="请输入用户"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="积分" prop="points">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.points"
|
|
||||||
placeholder="请输入积分"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="消费方用户" prop="sourceUserId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.sourceUserId"
|
|
||||||
placeholder="请输入消费方用户"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="消费方用户" prop="sourceUsercode">
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.sourceUsercode"
|
v-model="queryParams.sourceUsercode"
|
||||||
placeholder="请输入消费方用户"
|
:placeholder="'请输入'+systemName+'号'"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="消费方用户" prop="sourcePhone">
|
<el-form-item :label="'邀请方'+systemName+'号'" prop="oneUsercode">
|
||||||
<el-input
|
|
||||||
v-model="queryParams.sourcePhone"
|
|
||||||
placeholder="请输入消费方用户"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="分销方" prop="oneUserId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.oneUserId"
|
|
||||||
placeholder="请输入分销方"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="分销方" prop="oneUsercode">
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.oneUsercode"
|
v-model="queryParams.oneUsercode"
|
||||||
placeholder="请输入分销方"
|
:placeholder="'请输入邀请方'+systemName+'号'"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="分销方" prop="onePhone">
|
<el-form-item label="分销" prop="status">
|
||||||
<el-input
|
<el-select v-model="queryParams.status" clearable size="small">
|
||||||
v-model="queryParams.onePhone"
|
<el-option
|
||||||
placeholder="请输入分销方"
|
v-for="dict in consumeLogStatusList"
|
||||||
clearable
|
:key="dict.value"
|
||||||
@keyup.enter.native="handleQuery"
|
:label="dict.label"
|
||||||
/>
|
:value="dict.value"
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="分销方提成比例" prop="oneRate">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.oneRate"
|
|
||||||
placeholder="请输入分销方提成比例"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="分销方积分" prop="onePoints">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.onePoints"
|
|
||||||
placeholder="请输入分销方积分"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="来源ID" prop="sourceId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.sourceId"
|
|
||||||
placeholder="请输入来源ID"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['cai:pointRecordLog:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['cai:pointRecordLog:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['cai:pointRecordLog:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['cai:pointRecordLog:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="pointRecordLogList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="pointRecordLogList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column label="状态" align="center" prop="status" width="80" >
|
||||||
<el-table-column label="" align="center" prop="id" v-if="true"/>
|
<template v-slot="scope">
|
||||||
<el-table-column label="用户" align="center" prop="userId" />
|
<cai-dict-tag :options="consumeLogStatusList" :value="scope.row.status"/>
|
||||||
<el-table-column label="积分" align="center" prop="points" />
|
</template>
|
||||||
<el-table-column label="消费方用户" align="center" prop="sourceUserId" />
|
</el-table-column>
|
||||||
<el-table-column label="消费方用户" align="center" prop="sourceUsercode" />
|
<el-table-column label="消费方" align="center" prop="sourceUser" width="200">
|
||||||
<el-table-column label="消费方用户" align="center" prop="sourcePhone" />
|
<template v-slot="scope">
|
||||||
<el-table-column label="分销方" align="center" prop="oneUserId" />
|
<span style="font-weight: bold">{{systemName}}号:</span><span>{{scope.row.sourceUsercode}}</span> <br>
|
||||||
<el-table-column label="分销方" align="center" prop="oneUsercode" />
|
<span style="font-weight: bold">手机号:</span><span>{{scope.row.sourcePhone}}</span><br>
|
||||||
<el-table-column label="分销方" align="center" prop="onePhone" />
|
</template>
|
||||||
<el-table-column label="分销方提成比例" align="center" prop="oneRate" />
|
</el-table-column>
|
||||||
<el-table-column label="分销方积分" align="center" prop="onePoints" />
|
<el-table-column label="发生积分" align="center" prop="points" />
|
||||||
<el-table-column label="状态 -1-无须分销 0-待分销 1-已分销" align="center" prop="status" />
|
<el-table-column label="邀请方" align="center" prop="invite" min-width="200" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<div v-if="scope.row.oneUsercode">
|
||||||
|
<span style="font-weight: bold">邀请人:</span><span>{{scope.row.oneUsercode}}({{scope.row.onePhone}})</span> <br>
|
||||||
|
<span style="font-weight: bold">分销:</span><span :class="joinColor(scope.row.oneJoin)">{{scope.row.oneJoin ? '参与' : '不参与'}}</span><br>
|
||||||
|
<span style="font-weight: bold">费率/金额:</span>
|
||||||
|
<span>
|
||||||
|
<span class="font-green">{{scope.row.oneRate}}</span>
|
||||||
|
/
|
||||||
|
<span class="font-red">{{scope.row.onePoints}}</span>
|
||||||
|
</span> <br>
|
||||||
|
</div>
|
||||||
|
<span v-if="!scope.row.oneUsercode">-</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||||
<el-table-column label="来源" align="center" prop="sourceType" />
|
<el-table-column label="来源" align="center" prop="sourceType" />
|
||||||
<el-table-column label="来源ID" align="center" prop="sourceId" />
|
<el-table-column label="来源ID" align="center" prop="sourceId" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['cai:pointRecordLog:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['cai:pointRecordLog:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
@@ -185,62 +74,19 @@
|
|||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改用户积分分销对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="用户" prop="userId">
|
|
||||||
<el-input v-model="form.userId" placeholder="请输入用户" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="积分" prop="points">
|
|
||||||
<el-input v-model="form.points" placeholder="请输入积分" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="消费方用户" prop="sourceUserId">
|
|
||||||
<el-input v-model="form.sourceUserId" placeholder="请输入消费方用户" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="消费方用户" prop="sourceUsercode">
|
|
||||||
<el-input v-model="form.sourceUsercode" placeholder="请输入消费方用户" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="消费方用户" prop="sourcePhone">
|
|
||||||
<el-input v-model="form.sourcePhone" placeholder="请输入消费方用户" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="分销方" prop="oneUserId">
|
|
||||||
<el-input v-model="form.oneUserId" placeholder="请输入分销方" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="分销方" prop="oneUsercode">
|
|
||||||
<el-input v-model="form.oneUsercode" placeholder="请输入分销方" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="分销方" prop="onePhone">
|
|
||||||
<el-input v-model="form.onePhone" placeholder="请输入分销方" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="分销方提成比例" prop="oneRate">
|
|
||||||
<el-input v-model="form.oneRate" placeholder="请输入分销方提成比例" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="分销方积分" prop="onePoints">
|
|
||||||
<el-input v-model="form.onePoints" placeholder="请输入分销方积分" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="来源ID" prop="sourceId">
|
|
||||||
<el-input v-model="form.sourceId" placeholder="请输入来源ID" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listPointRecordLog, getPointRecordLog, delPointRecordLog, addPointRecordLog, updatePointRecordLog } from "@/api/cai/pointRecordLog";
|
import {listPointRecordLog} from "@/api/cai/pointRecordLog";
|
||||||
|
import {consumeLogCalculateStatusList, consumeLogStatusList, consumeLogTypeList} from "@/constant/statusMap";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PointRecordLog",
|
name: "PointRecordLog",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
systemName: process.env.VUE_APP_SYSTEM_HOME,
|
||||||
|
consumeLogTypeList,consumeLogStatusList,consumeLogCalculateStatusList,
|
||||||
// 按钮loading
|
// 按钮loading
|
||||||
buttonLoading: false,
|
buttonLoading: false,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@@ -257,87 +103,23 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
// 用户积分分销表格数据
|
// 用户积分分销表格数据
|
||||||
pointRecordLogList: [],
|
pointRecordLogList: [],
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
userId: undefined,
|
|
||||||
points: undefined,
|
|
||||||
sourceUserId: undefined,
|
|
||||||
sourceUsercode: undefined,
|
sourceUsercode: undefined,
|
||||||
sourcePhone: undefined,
|
|
||||||
oneUserId: undefined,
|
|
||||||
oneUsercode: undefined,
|
oneUsercode: undefined,
|
||||||
onePhone: undefined,
|
|
||||||
oneRate: undefined,
|
|
||||||
onePoints: undefined,
|
|
||||||
status: undefined,
|
status: undefined,
|
||||||
sourceType: undefined,
|
|
||||||
sourceId: undefined,
|
|
||||||
},
|
},
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
id: [
|
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
userId: [
|
|
||||||
{ required: true, message: "用户不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
points: [
|
|
||||||
{ required: true, message: "积分不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
sourceUserId: [
|
|
||||||
{ required: true, message: "消费方用户不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
sourceUsercode: [
|
|
||||||
{ required: true, message: "消费方用户不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
sourcePhone: [
|
|
||||||
{ required: true, message: "消费方用户不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
oneUserId: [
|
|
||||||
{ required: true, message: "分销方不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
oneUsercode: [
|
|
||||||
{ required: true, message: "分销方不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
onePhone: [
|
|
||||||
{ required: true, message: "分销方不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
oneRate: [
|
|
||||||
{ required: true, message: "分销方提成比例不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
onePoints: [
|
|
||||||
{ required: true, message: "分销方积分不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
status: [
|
|
||||||
{ required: true, message: "状态 -1-无须分销 0-待分销 1-已分销不能为空", trigger: "change" }
|
|
||||||
],
|
|
||||||
sourceType: [
|
|
||||||
{ required: true, message: "来源不能为空", trigger: "change" }
|
|
||||||
],
|
|
||||||
sourceId: [
|
|
||||||
{ required: true, message: "来源ID不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
remark: [
|
|
||||||
{ required: true, message: "备注不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
joinColor(join){
|
||||||
|
return join ? 'font-blue' : 'font-red'
|
||||||
|
},
|
||||||
/** 查询用户积分分销列表 */
|
/** 查询用户积分分销列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@@ -347,33 +129,6 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: undefined,
|
|
||||||
userId: undefined,
|
|
||||||
points: undefined,
|
|
||||||
sourceUserId: undefined,
|
|
||||||
sourceUsercode: undefined,
|
|
||||||
sourcePhone: undefined,
|
|
||||||
oneUserId: undefined,
|
|
||||||
oneUsercode: undefined,
|
|
||||||
onePhone: undefined,
|
|
||||||
oneRate: undefined,
|
|
||||||
onePoints: undefined,
|
|
||||||
status: undefined,
|
|
||||||
sourceType: undefined,
|
|
||||||
sourceId: undefined,
|
|
||||||
remark: undefined,
|
|
||||||
createTime: undefined
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
@@ -390,70 +145,17 @@ export default {
|
|||||||
this.single = selection.length!==1
|
this.single = selection.length!==1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加用户积分分销";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.loading = true;
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getPointRecordLog(id).then(response => {
|
|
||||||
this.loading = false;
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改用户积分分销";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
this.buttonLoading = true;
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updatePointRecordLog(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
}).finally(() => {
|
|
||||||
this.buttonLoading = false;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addPointRecordLog(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
}).finally(() => {
|
|
||||||
this.buttonLoading = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除用户积分分销编号为"' + ids + '"的数据项?').then(() => {
|
|
||||||
this.loading = true;
|
|
||||||
return delPointRecordLog(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {
|
|
||||||
}).finally(() => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('cai/pointRecordLog/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `pointRecordLog_${new Date().getTime()}.xlsx`)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.font-red {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
.font-green {
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
.font-blue {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
41
src/views/cai/prizeInfo/index.vue
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-tabs v-model="activeTabs" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="奖品模板" name="prizeInfoTab">
|
||||||
|
<prize-info-tab business-type="prizeInfoTab" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="男用户奖品" name="prizeOnlineManTab">
|
||||||
|
<prize-online-man-tab business-type="prizeOnlineManTab" :gender="2" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="女用户奖品" name="pay">
|
||||||
|
<prize-online-man-tab business-type="prizeOnlineManTab" :gender="1" />
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import PrizeInfoTab from "@/views/cai/prizeInfo/prize-info-tab.vue";
|
||||||
|
import PrizeOnlineManTab from "@/views/cai/prizeInfo/prize-online-man-tab.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "PrizeInfo",
|
||||||
|
components: {
|
||||||
|
PrizeInfoTab,
|
||||||
|
PrizeOnlineManTab,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeTabs: "prizeInfoTab",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClick(tab, event){
|
||||||
|
console.log(tab, event);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
156
src/views/cai/prizeInfo/prize-info-add-update-dialog.vue
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="奖品类型" prop="prizeType">
|
||||||
|
<el-select v-model="form.prizeType" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in prizeTypeList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="奖品名称" prop="prizeName">
|
||||||
|
<el-input v-model="form.prizeName" placeholder="请输入奖品名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="奖品描述" prop="prizeDesc">
|
||||||
|
<el-input v-model="form.prizeDesc" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="奖品图片" prop="prizeImg">
|
||||||
|
<image-upload2 v-model="form.prizeImg"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="中奖率" prop="winProbability">
|
||||||
|
<el-input-number v-model="form.winProbability" placeholder="请输入中奖率" min="0" max="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="保底抽数" prop="guaranteeDraws" v-if="form.prizeType == 3">
|
||||||
|
<el-input v-model="form.guaranteeDraws" placeholder="请输入保底抽数" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="最低中奖抽数" prop="minWinDraws" v-if="form.prizeType == 3" >
|
||||||
|
<el-input v-model="form.minWinDraws" placeholder="请输入最低中奖抽数" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="奖品价值" prop="prizePrice">
|
||||||
|
<el-input v-model="form.prizePrice" placeholder="请输入奖品价值估算" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="自动兑奖" prop="autoGive">
|
||||||
|
<el-select v-model="form.autoGive" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in prizeAutoGiveList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="open = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {prizeAutoGiveList, prizeTypeList} from '@/constant/statusMap'
|
||||||
|
import {addPrizeInfo, getPrizeInfo, updatePrizeInfo} from "@/api/cai/prizeInfo";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
prizeTypeList,prizeAutoGiveList,
|
||||||
|
open: false,
|
||||||
|
title: '',
|
||||||
|
form:{
|
||||||
|
id: undefined,
|
||||||
|
prizeName: undefined,
|
||||||
|
prizeDesc: undefined,
|
||||||
|
prizeImg: undefined,
|
||||||
|
winProbability: undefined,
|
||||||
|
guaranteeDraws: undefined,
|
||||||
|
minWinDraws: undefined,
|
||||||
|
prizeType: undefined,
|
||||||
|
prizePrice: undefined,
|
||||||
|
autoGive: undefined,
|
||||||
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
prizeName: [
|
||||||
|
{ required: true, message: "奖品名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
prizeDesc: [
|
||||||
|
{ required: true, message: "奖品描述不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
prizeImg: [
|
||||||
|
{ required: true, message: "奖品图片不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
winProbability: [
|
||||||
|
{ required: true, message: "中奖率不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
guaranteeDraws: [
|
||||||
|
{ required: true, message: "保底抽数不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
minWinDraws: [
|
||||||
|
{ required: true, message: "中奖抽数不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
prizeType: [
|
||||||
|
{ required: true, message: "奖品类型不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
prizePrice: [
|
||||||
|
{ required: true, message: "奖品价值不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
autoGive: [
|
||||||
|
{ required: true, message: "自动兑奖不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
buttonLoading: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init (id) {
|
||||||
|
this.form.id = id || undefined;
|
||||||
|
this.title = (id ? "修改" : "新增") + "奖品库";
|
||||||
|
this.open = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['form'].resetFields();
|
||||||
|
if(this.form.id){
|
||||||
|
getPrizeInfo(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
submitForm () {
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.buttonLoading = true;
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updatePrizeInfo(this.form).then(data => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.$modal.buttonLoading = false;
|
||||||
|
this.open = false
|
||||||
|
this.$emit('refreshDataList')
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
addPrizeInfo(this.form).then(data => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.buttonLoading = false;
|
||||||
|
this.open = false
|
||||||
|
this.$emit('refreshDataList')
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
220
src/views/cai/prizeInfo/prize-info-tab.vue
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="奖品名称" prop="prizeName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.prizeName"
|
||||||
|
placeholder="请输入奖品名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="奖品描述" prop="prizeDesc">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.prizeDesc"
|
||||||
|
placeholder="请输入奖品描述"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="奖品类型" prop="prizeType">
|
||||||
|
<el-select v-model="queryParams.prizeType" placeholder="奖品类型" clearable size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in prizeTypeList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['cai:prizeInfo:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['cai:prizeInfo:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="prizeInfoList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="奖品类型" align="center" prop="prizeType" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<cai-dict-tag :options="prizeTypeList" :value="scope.row.prizeType" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="奖品名称" align="center" prop="prizeName" />
|
||||||
|
<el-table-column label="奖品描述" align="center" prop="prizeDesc" />
|
||||||
|
<el-table-column label="奖品图片" align="center" prop="prizeImg" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<image-avatar :src="scope.row.prizeImg"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="中奖率" align="center" prop="winProbability" />
|
||||||
|
<el-table-column label="保底抽数" align="center" prop="guaranteeDraws" />
|
||||||
|
<el-table-column label="最低抽数" align="center" prop="minWinDraws" />
|
||||||
|
<el-table-column label="奖品价值" align="center" prop="prizePrice" />
|
||||||
|
<el-table-column label="自动兑奖" align="center" prop="autoGive" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<cai-dict-tag :options="prizeAutoGiveList" :value="scope.row.autoGive" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.id != 1"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['cai:prizeInfo:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.id != 1"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['cai:prizeInfo:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<prize-info-add-update-dialog v-if="prizeInfoAddUpdateDialogVisible" ref="prizeInfoAddUpdateDialog" @refreshDataList="getList" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {delPrizeInfo, listPrizeInfo} from "@/api/cai/prizeInfo";
|
||||||
|
import {prizeAutoGiveList, prizeTypeList} from "@/constant/statusMap";
|
||||||
|
import PrizeInfoAddUpdateDialog from "@/views/cai/prizeInfo/prize-info-add-update-dialog.vue";
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "PrizeInfo",
|
||||||
|
components: {
|
||||||
|
PrizeInfoAddUpdateDialog,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
prizeTypeList, prizeAutoGiveList,
|
||||||
|
prizeInfoAddUpdateDialogVisible: false,
|
||||||
|
// 按钮loading
|
||||||
|
buttonLoading: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 抽奖奖品表格数据
|
||||||
|
prizeInfoList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
prizeName: undefined,
|
||||||
|
prizeDesc: undefined,
|
||||||
|
prizeType: undefined,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询抽奖奖品列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPrizeInfo(this.queryParams).then(response => {
|
||||||
|
this.prizeInfoList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.prizeInfoAddUpdateDialogVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.prizeInfoAddUpdateDialog.init()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.prizeInfoAddUpdateDialogVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.prizeInfoAddUpdateDialog.init(row.id)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除抽奖奖品编号为"' + ids + '"的数据项?').then(() => {
|
||||||
|
this.loading = true;
|
||||||
|
return delPrizeInfo(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
131
src/views/cai/prizeInfo/prize-online-man-tab.vue
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleReset"
|
||||||
|
v-hasPermi="['cai:prizeOnline:add']"
|
||||||
|
>调整</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="prizeOnlineList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="奖品类型" align="center" prop="prizeType" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<cai-dict-tag :options="prizeTypeList" :value="scope.row.prizeType" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="奖品名称" align="center" prop="prizeName" />
|
||||||
|
<el-table-column label="奖品描述" align="center" prop="prizeDesc" />
|
||||||
|
<el-table-column label="奖品图片" align="center" prop="prizeImg" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<image-avatar :src="scope.row.prizeImg"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="中奖率" align="center" prop="winProbability" />
|
||||||
|
<el-table-column label="保底抽数" align="center" prop="guaranteeDraws" />
|
||||||
|
<el-table-column label="最低抽数" align="center" prop="minWinDraws" />
|
||||||
|
<el-table-column label="奖品价值" align="center" prop="prizePrice" />
|
||||||
|
<el-table-column label="自动兑奖" align="center" prop="autoGive" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<cai-dict-tag :options="prizeAutoGiveList" :value="scope.row.autoGive" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<prize-online-reset-dialog v-if="prizeOnlineResetDialogVisible" ref="prizeOnlineResetDialog" @refreshDataList="getList" :gender="this.gender"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {listPrizeOnline} from "@/api/cai/prizeOnline";
|
||||||
|
import {prizeAutoGiveList, prizeTypeList} from "@/constant/statusMap";
|
||||||
|
import PrizeOnlineResetDialog from "@/views/cai/prizeInfo/prize-online-reset-dialog.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
gender: {
|
||||||
|
type: Number, // 参数类型
|
||||||
|
required: true // 是否必传
|
||||||
|
},
|
||||||
|
},
|
||||||
|
name: "PrizeOnline",
|
||||||
|
components: {
|
||||||
|
PrizeOnlineResetDialog
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
prizeTypeList, prizeAutoGiveList,
|
||||||
|
// 按钮loading
|
||||||
|
buttonLoading: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 已发布奖品表格数据
|
||||||
|
prizeOnlineList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
gender: this.gender
|
||||||
|
},
|
||||||
|
prizeOnlineResetDialogVisible: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询已发布奖品列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPrizeOnline(this.queryParams).then(response => {
|
||||||
|
this.prizeOnlineList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
handleReset() {
|
||||||
|
this.prizeOnlineResetDialogVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.prizeOnlineResetDialog.init()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
312
src/views/cai/prizeInfo/prize-online-reset-dialog.vue
Normal file
@@ -0,0 +1,312 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-dialog title="调整奖品" :close-on-click-modal="false" :visible.sync="open" width="1000px" append-to-body>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="prizeOnlineList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="奖品类型" align="center" prop="prizeType" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<cai-dict-tag :options="prizeTypeList" :value="scope.row.prizeType" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="奖品名称" align="center" prop="prizeName" />
|
||||||
|
<el-table-column label="奖品描述" align="center" prop="prizeDesc" />
|
||||||
|
<el-table-column label="奖品图片" align="center" prop="prizeImg" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<image-avatar :src="scope.row.prizeImg"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="中奖率" align="center" prop="winProbability" />
|
||||||
|
<el-table-column label="保底抽数" align="center" prop="guaranteeDraws" />
|
||||||
|
<el-table-column label="最低抽数" align="center" prop="minWinDraws" />
|
||||||
|
<el-table-column label="奖品价值" align="center" prop="prizePrice" />
|
||||||
|
<el-table-column label="自动兑奖" align="center" prop="autoGive" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<cai-dict-tag :options="prizeAutoGiveList" :value="scope.row.autoGive" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.prizeId != 1"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['cai:prizeInfo:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.prizeId != 1"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['cai:prizeInfo:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="open = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog title="新增奖品" :close-on-click-modal="false" :visible.sync="addOpen" width="700px" append-to-body>
|
||||||
|
<el-form ref="addForm" :model="addForm" label-width="80px" >
|
||||||
|
<el-form-item label="奖品模板" prop="prizeInfoTemplate">
|
||||||
|
<el-select v-model="addForm.prizeInfoTemplate" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in prizeInfoSelectList"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.prizeName"
|
||||||
|
:value="dict.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="addSubmitForm">确 定</el-button>
|
||||||
|
<el-button @click="addOpen = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog title="修改奖品" :close-on-click-modal="false" :visible.sync="updateOpen" width="700px" append-to-body>
|
||||||
|
<el-form ref="updateForm" :model="updateForm" :rules="updateRules" label-width="80px">
|
||||||
|
<el-form-item label="奖品类型" prop="prizeType">
|
||||||
|
<el-select v-model="updateForm.prizeType" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in prizeTypeList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="奖品名称" prop="prizeName">
|
||||||
|
<el-input v-model="updateForm.prizeName" placeholder="请输入奖品名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="奖品描述" prop="prizeDesc">
|
||||||
|
<el-input v-model="updateForm.prizeDesc" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="奖品图片" prop="prizeImg">
|
||||||
|
<image-upload2 v-model="updateForm.prizeImg"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="中奖率" prop="winProbability">
|
||||||
|
<el-input-number v-model="updateForm.winProbability" placeholder="请输入中奖率" min="0" max="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="保底抽数" prop="guaranteeDraws" v-if="updateForm.prizeType == 3">
|
||||||
|
<el-input v-model="updateForm.guaranteeDraws" placeholder="请输入保底抽数" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="最低中奖抽数" prop="minWinDraws" v-if="updateForm.prizeType == 3" >
|
||||||
|
<el-input v-model="updateForm.minWinDraws" placeholder="请输入最低中奖抽数" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="奖品价值" prop="prizePrice">
|
||||||
|
<el-input v-model="updateForm.prizePrice" placeholder="请输入奖品价值估算" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="自动兑奖" prop="autoGive">
|
||||||
|
<el-select v-model="updateForm.autoGive" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in prizeAutoGiveList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<!-- <el-button :loading="buttonLoading" type="primary" @click="updateSubmitForm">确 定</el-button>-->
|
||||||
|
<el-button @click="updateOpen = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {listPrizeOnline, resetPrizeOnline} from "@/api/cai/prizeOnline";
|
||||||
|
import {prizeAutoGiveList, prizeTypeList} from "@/constant/statusMap";
|
||||||
|
import {prizeInfoAll} from "@/api/cai/prizeInfo";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
gender: {
|
||||||
|
type: Number, // 参数类型
|
||||||
|
required: true // 是否必传
|
||||||
|
},
|
||||||
|
},
|
||||||
|
name: "PrizeOnline",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
prizeTypeList, prizeAutoGiveList,
|
||||||
|
// 按钮loading
|
||||||
|
buttonLoading: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 已发布奖品表格数据
|
||||||
|
prizeOnlineList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
gender: this.gender
|
||||||
|
},
|
||||||
|
open: false,
|
||||||
|
// add
|
||||||
|
addOpen: false,
|
||||||
|
addForm:{
|
||||||
|
prizeInfoTemplate: undefined
|
||||||
|
},
|
||||||
|
prizeInfoSelectList: [],
|
||||||
|
// update
|
||||||
|
updateOpen: false,
|
||||||
|
updateForm: {},
|
||||||
|
updateRules: {
|
||||||
|
prizeName: [
|
||||||
|
{ required: true, message: "奖品名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
prizeDesc: [
|
||||||
|
{ required: true, message: "奖品描述不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
prizeImg: [
|
||||||
|
{ required: true, message: "奖品图片不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
winProbability: [
|
||||||
|
{ required: true, message: "中奖率不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
guaranteeDraws: [
|
||||||
|
{ required: true, message: "保底抽数不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
minWinDraws: [
|
||||||
|
{ required: true, message: "中奖抽数不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
prizeType: [
|
||||||
|
{ required: true, message: "奖品类型不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
prizePrice: [
|
||||||
|
{ required: true, message: "奖品价值不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
autoGive: [
|
||||||
|
{ required: true, message: "自动兑奖不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init (id) {
|
||||||
|
this.open = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.getList();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 查询已发布奖品列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPrizeOnline(this.queryParams).then(response => {
|
||||||
|
this.prizeOnlineList = response.data;
|
||||||
|
this.prizeOnlineList.forEach(item => {
|
||||||
|
item.uuid = item.id;
|
||||||
|
})
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.addOpen = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['addForm'].resetFields();
|
||||||
|
this.refreshPrizeInfoAll();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleUpdate(row){
|
||||||
|
this.updateOpen = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.updateForm = row;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleDelete(row){
|
||||||
|
// 找到目标项的索引
|
||||||
|
const index = this.prizeOnlineList.findIndex(item => item.uuid === row.uuid);
|
||||||
|
// 只有找到索引(index !== -1)时才执行删除
|
||||||
|
if (index !== -1) {
|
||||||
|
// splice(起始索引, 删除数量),返回被删除的项
|
||||||
|
return this.prizeOnlineList.splice(index, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
refreshPrizeInfoAll(){
|
||||||
|
prizeInfoAll().then(response => {
|
||||||
|
this.prizeInfoSelectList = response.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addSubmitForm(){
|
||||||
|
let find = this.prizeInfoSelectList.find(item => item.id === this.addForm.prizeInfoTemplate);
|
||||||
|
if(find){
|
||||||
|
const newObj = Object.assign({}, find);
|
||||||
|
newObj.uuid = this.generateUUID()
|
||||||
|
newObj.prizeId = newObj.id
|
||||||
|
newObj.id = undefined
|
||||||
|
this.prizeOnlineList.push(newObj);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
submitForm() {
|
||||||
|
resetPrizeOnline(this.gender,this.prizeOnlineList).then(response => {
|
||||||
|
this.$modal.msgSuccess("调整成功");
|
||||||
|
this.$modal.buttonLoading = false;
|
||||||
|
this.open = false
|
||||||
|
this.$emit('refreshDataList')
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
generateUUID() {
|
||||||
|
// UUID v4 的格式为:xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
|
||||||
|
// 其中 4 是版本号固定位,y 只能是 8/9/a/b 中的一个
|
||||||
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
||||||
|
const r = Math.random() * 16 | 0; // 生成 0-15 的随机数
|
||||||
|
const v = c === 'x' ? r : (r & 0x3 | 0x8); // 处理 y 位的规则
|
||||||
|
return v.toString(16); // 转换为 16 进制字符串
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -92,6 +92,7 @@
|
|||||||
<el-table-column label="商品名称" align="center" prop="rechargeName" />
|
<el-table-column label="商品名称" align="center" prop="rechargeName" />
|
||||||
<el-table-column label="充值紫贝" align="center" prop="rechargeCoin" />
|
<el-table-column label="充值紫贝" align="center" prop="rechargeCoin" />
|
||||||
<el-table-column label="价格" align="center" prop="price" />
|
<el-table-column label="价格" align="center" prop="price" />
|
||||||
|
<el-table-column label="积分" align="center" prop="givePoint" />
|
||||||
<el-table-column label="平台" align="center" prop="platformType">
|
<el-table-column label="平台" align="center" prop="platformType">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<cai-dict-tag :options="platformTypeList" :value="scope.row.platformType" />
|
<cai-dict-tag :options="platformTypeList" :value="scope.row.platformType" />
|
||||||
|
|||||||
@@ -165,7 +165,7 @@
|
|||||||
<el-tag v-if="!scope.row.enableIm && !scope.row.imSpeck" :disable-transitions="true" type="danger">封禁+禁言</el-tag>
|
<el-tag v-if="!scope.row.enableIm && !scope.row.imSpeck" :disable-transitions="true" type="danger">封禁+禁言</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" fixed="right">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140" fixed="right">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
<el-table-column label="好友礼物分成" align="center" prop="giftIncomeRate" />
|
<el-table-column label="好友礼物分成" align="center" prop="giftIncomeRate" />
|
||||||
<el-table-column label="好友视频分成" align="center" prop="videoIncomeRate" />
|
<el-table-column label="好友视频分成" align="center" prop="videoIncomeRate" />
|
||||||
<el-table-column label="好友充值分成" align="center" prop="payIncomeRate" />
|
<el-table-column label="好友充值分成" align="center" prop="payIncomeRate" />
|
||||||
|
<el-table-column label="好友积分充值分成" align="center" prop="pointRate" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
|||||||
@@ -16,6 +16,9 @@
|
|||||||
<el-form-item label="好友充值分成" prop="payIncomeRate">
|
<el-form-item label="好友充值分成" prop="payIncomeRate">
|
||||||
<el-input-number v-model="form.payIncomeRate" :precision="2" :step="0.01" :min="0" :max="0.6" style="width: 90%"/>
|
<el-input-number v-model="form.payIncomeRate" :precision="2" :step="0.01" :min="0" :max="0.6" style="width: 90%"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="好友积分充值分成" prop="pointRate">
|
||||||
|
<el-input-number v-model="form.pointRate" :precision="2" :step="0.01" :min="0" :max="0.6" style="width: 90%"/>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
@@ -44,9 +47,13 @@ export default {
|
|||||||
giftIncomeRate: undefined,
|
giftIncomeRate: undefined,
|
||||||
videoIncomeRate: undefined,
|
videoIncomeRate: undefined,
|
||||||
payIncomeRate: undefined,
|
payIncomeRate: undefined,
|
||||||
|
pointRate: undefined,
|
||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
pointRate: [
|
||||||
|
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
guardIncomeRate: [
|
guardIncomeRate: [
|
||||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
|||||||