Commit 55c9c65a authored by 高宇's avatar 高宇

会员权益

parent 81a2e1eb
...@@ -3,7 +3,7 @@ import request from '@/utils/request' ...@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 获取金额和积分的列表 // 获取金额和积分的列表
export function queryIntegralList(params) { export function queryIntegralList(params) {
return request({ return request({
url: '/system/integral//queryintergras', url: '/system/integral/queryintergras',
method: 'get', method: 'get',
params params
}) })
...@@ -30,7 +30,7 @@ export function queryInfoById(id) { ...@@ -30,7 +30,7 @@ export function queryInfoById(id) {
// 编辑金额和积分的数据 // 编辑金额和积分的数据
export function updataInfo(data) { export function updataInfo(data) {
return request({ return request({
url: '/system/integral//update', url: '/system/integral/update',
method: 'put', method: 'put',
data, data,
headers: { headers: {
...@@ -61,7 +61,7 @@ export function queryMemberLevel() { ...@@ -61,7 +61,7 @@ export function queryMemberLevel() {
}) })
} }
// 新增会员等级 // 新增会员等级
export function addMemberBenefits(data){ export function addMemberBenefits(data) {
return request({ return request({
url: '/system/memberfits/add', url: '/system/memberfits/add',
method: 'put', method: 'put',
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<div v-if="!imgUrl" slot="tip" class="el-upload__tip">支持文件格式:.jpg .gpeg .png.单个文件不能超过4M</div> <div v-if="!imgUrl" slot="tip" class="el-upload__tip">支持文件格式:.jpg .gpeg .png.单个文件不能超过4M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="封面" prop="image"> <el-form-item label="横版封面" prop="image">
<el-upload <el-upload
class="upload-image" class="upload-image"
action="#" action="#"
......
...@@ -70,6 +70,11 @@ ...@@ -70,6 +70,11 @@
<el-table v-loading="loading" border :data="businessList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="businessList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />--> <!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" type="index" align="center" width="55" /> <el-table-column label="序号" type="index" align="center" width="55" />
<el-table-column label="竖版封面" :show-overflow-tooltip="true">
<template slot-scope="scope">
<img :src="replacesrc(scope.row)" style="width: 44px;height: 44px">
</template>
</el-table-column>
<el-table-column label="商家名称" prop="name" :show-overflow-tooltip="true"> <el-table-column label="商家名称" prop="name" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.name || '-' }} {{ scope.row.name || '-' }}
...@@ -85,22 +90,12 @@ ...@@ -85,22 +90,12 @@
{{ scope.row.address || '-' }} {{ scope.row.address || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="head" label="负责人" width="65" :show-overflow-tooltip="true" /> <el-table-column prop="head" label="负责人" :show-overflow-tooltip="true" />
<el-table-column label="联系方式" prop="phone" :show-overflow-tooltip="true"> <el-table-column label="联系方式" prop="phone" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.phone || '-' }} {{ scope.row.phone || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商家账号" prop="entryAccount" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.entryAccount || '-' }}
</template>
</el-table-column>
<el-table-column label="商家简介" prop="entryDetails" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.entryDetails || '-' }}
</template>
</el-table-column>
<el-table-column label="状态" prop="status" :show-overflow-tooltip="true"> <el-table-column label="状态" prop="status" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
...@@ -114,7 +109,7 @@ ...@@ -114,7 +109,7 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="300"> <el-table-column label="操作" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-hasPermi="['sys:dict:edit']" v-hasPermi="['sys:dict:edit']"
...@@ -247,8 +242,8 @@ ...@@ -247,8 +242,8 @@
</el-form> </el-form>
</el-dialog> </el-dialog>
<!-- 绑定管理员弹窗--> <!-- 绑定管理员弹窗-->
<el-dialog title="绑定会员 " :close-on-click-modal="false" class="memberDialog" :visible.sync="bindopen" width="779px" append-to-body @close="reset"> <el-dialog title="绑定会员 " :close-on-click-modal="false" class="memberDialog" :visible.sync="bindopen" width="60%" append-to-body @close="reset">
<el-form ref="query" style="padding: 0 0 0 0px" :model="query" :inline="true" label-width="68px"> <el-form ref="query" style="padding: 0 0 0 0px" :model="query" :inline="true" >
<el-form-item prop="phone"> <el-form-item prop="phone">
<el-input <el-input
v-model="query.phone" v-model="query.phone"
...@@ -256,7 +251,7 @@ ...@@ -256,7 +251,7 @@
clearable clearable
:maxlength="30" :maxlength="30"
size="small" size="small"
style="width: 143px" style="width: 200px"
@keyup.enter.native="handleQuerys" @keyup.enter.native="handleQuerys"
/> />
</el-form-item> </el-form-item>
...@@ -267,29 +262,7 @@ ...@@ -267,29 +262,7 @@
clearable clearable
:maxlength="30" :maxlength="30"
size="small" size="small"
style="width: 143px" style="width: 200px"
@keyup.enter.native="handleQuerys"
/>
</el-form-item>
<el-form-item prop="integral">
<el-input
v-model="query.integral"
placeholder="积分"
clearable
:maxlength="30"
size="small"
style="width: 143px"
@keyup.enter.native="handleQuerys"
/>
</el-form-item>
<el-form-item prop="level">
<el-input
v-model="query.level"
placeholder="会员等级"
clearable
:maxlength="30"
size="small"
style="width: 143px"
@keyup.enter.native="handleQuerys" @keyup.enter.native="handleQuerys"
/> />
</el-form-item> </el-form-item>
...@@ -331,7 +304,7 @@ ...@@ -331,7 +304,7 @@
@pagination="getListS" @pagination="getListS"
/> />
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" style="margin-right: 65%" @click="submitunBind">解除绑定</el-button> <el-button type="primary" style="margin-right: 77%" @click="submitunBind">解除绑定</el-button>
<el-button type="primary" :loading="manageLoading" :disabled="manageLoading" @click="submitBind">绑 定</el-button> <el-button type="primary" :loading="manageLoading" :disabled="manageLoading" @click="submitBind">绑 定</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
...@@ -451,6 +424,17 @@ export default { ...@@ -451,6 +424,17 @@ export default {
}) })
}, },
methods: { methods: {
replacesrc(row) {
const baseURL = 'http://192.144.239.97:20043/file/'
console.log('baseURL', baseURL)
if (row.imgUrl !== null) {
const url = baseURL + row.imgUrl
console.log('url', url)
return url
} else {
return 'http://192.144.239.97:20043/file/static/images/login/denglu_icon_logo.png'
}
},
handleChangeStatus(row) { handleChangeStatus(row) {
console.log('状态的变化', row) console.log('状态的变化', row)
const obj = { const obj = {
...@@ -467,7 +451,7 @@ export default { ...@@ -467,7 +451,7 @@ export default {
replaceImg(value) { replaceImg(value) {
console.log('img', value) console.log('img', value)
if (value === '') { if (value === '') {
return 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png' return 'http://192.144.239.97:20043/file/static/images/login/denglu_icon_logo.png'
} else { } else {
return value return value
} }
...@@ -781,9 +765,12 @@ export default { ...@@ -781,9 +765,12 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-table tr {
height: 59px;
}
.memberDialog{ .memberDialog{
::v-deep .el-table tr{ ::v-deep .el-table tr{
height: 48px; height: 59px;
} }
::v-deep .el-table__header-wrapper .el-checkbox { ::v-deep .el-table__header-wrapper .el-checkbox {
display: none display: none
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
{{ scope.row.dealTime || '-' }} {{ scope.row.dealTime || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="240"> <el-table-column label="操作" class-name="small-padding fixed-width" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-hasPermi="['sys:dict:edit']" v-hasPermi="['sys:dict:edit']"
......
<template> <template>
<div class="equityseting"> <div class="equityseting">
<div class="equityseting-title">会员权益设定</div>
<div class="form1"> <div class="form1">
<div style="margin-bottom: 20px;display: flex;justify-content: space-between"> <div style="margin-bottom: 20px;display: flex;justify-content: space-between">
<div>会员等级</div> <h5
style="margin: 0 0 12px 0;font-size: 14px;font-weight: bold;
color: #333333;"
>会员等级</h5>
<el-button type="primary" icon="el-icon-plus" @click="addDomain">新增</el-button> <el-button type="primary" icon="el-icon-plus" @click="addDomain">新增</el-button>
</div> </div>
<el-table border :data="membershiplevel"> <el-table border :data="membershiplevel">
...@@ -19,17 +21,17 @@ ...@@ -19,17 +21,17 @@
{{ scope.row.level || '-' }} {{ scope.row.level || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="积分条件" prop="integral" :show-overflow-tooltip="true"> <el-table-column label="所需积分" prop="integral" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.integral || '-' }} {{ scope.row.integral || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="折扣" prop="discount" :show-overflow-tooltip="true"> <el-table-column label="享受折扣" prop="discount" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.discount || '-' }} {{ scope.row.discount || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="240"> <el-table-column label="操作" class-name="small-padding fixed-width" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-hasPermi="['sys:dict:remove']" v-hasPermi="['sys:dict:remove']"
...@@ -50,7 +52,10 @@ ...@@ -50,7 +52,10 @@
</el-table> </el-table>
<el-divider style="margin-top: 53px" /> <el-divider style="margin-top: 53px" />
<div style="margin-bottom: 20px;display: flex;justify-content: space-between"> <div style="margin-bottom: 20px;display: flex;justify-content: space-between">
<div>积分兑换</div> <h5
style="margin: 0 0 12px 0;font-size: 14px;font-weight: bold;
color: #333333;"
>获取积分</h5>
<el-button type="primary" icon="el-icon-plus" @click="addDynamic">新增</el-button> <el-button type="primary" icon="el-icon-plus" @click="addDynamic">新增</el-button>
</div> </div>
<el-table border :data="dynamicValidate"> <el-table border :data="dynamicValidate">
...@@ -61,12 +66,12 @@ ...@@ -61,12 +66,12 @@
<span>{{ scope.row.amount || '' }}</span> <span>{{ scope.row.amount || '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="兑换积分" prop="level" :show-overflow-tooltip="true"> <el-table-column label="获取积分" prop="level" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.integral || '-' }} {{ scope.row.integral || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="240"> <el-table-column label="操作" class-name="small-padding fixed-width" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-hasPermi="['sys:dict:remove']" v-hasPermi="['sys:dict:remove']"
...@@ -100,12 +105,12 @@ ...@@ -100,12 +105,12 @@
<el-form-item prop="level" label="会员等级"> <el-form-item prop="level" label="会员等级">
<el-input v-model="form.level" disabled placeholder="请输入会员等级" :maxlength="10" /> <el-input v-model="form.level" disabled placeholder="请输入会员等级" :maxlength="10" />
</el-form-item> </el-form-item>
<el-form-item prop="integral" label="积分条件"> <el-form-item prop="integral" label="所需积分">
<el-input v-model="form.integral" placeholder="请输入积分条件" :maxlength="10" /> <el-input v-model="form.integral" placeholder="请输入所需积分" :maxlength="10" />
</el-form-item> </el-form-item>
<el-form-item prop="discount" label="折扣"> <el-form-item prop="discount" label="享受折扣">
<div style="display:flex;"> <div style="display:flex;">
<el-input v-model="form.discount" placeholder="请输入折扣" :maxlength="10" /> <el-input v-model="form.discount" placeholder="请输入享受折扣" :maxlength="10" />
<span style="margin-left: 12px">{{ '%' }}</span> <span style="margin-left: 12px">{{ '%' }}</span>
</div> </div>
</el-form-item> </el-form-item>
...@@ -125,8 +130,8 @@ ...@@ -125,8 +130,8 @@
:maxlength="10" :maxlength="10"
/> />
</el-form-item> </el-form-item>
<el-form-item prop="integral" label="兑换积分"> <el-form-item prop="integral" label="获取积分">
<el-input v-model="dynamicFrom.integral" placeholder="请输入兑换积分" :maxlength="10" /> <el-input v-model="dynamicFrom.integral" placeholder="请输入获取积分" :maxlength="10" />
</el-form-item> </el-form-item>
<div style="text-align: center"> <div style="text-align: center">
<el-button type="primary" @click="dynamicsubmitForm">提交</el-button> <el-button type="primary" @click="dynamicsubmitForm">提交</el-button>
...@@ -226,7 +231,7 @@ export default { ...@@ -226,7 +231,7 @@ export default {
this.opens = false this.opens = false
}, },
addDynamic() { addDynamic() {
this.dynamicTitle = '新增积分兑换' this.dynamicTitle = '新增获取积分'
this.dynamicFrom = { this.dynamicFrom = {
amount: '', amount: '',
integral: '' integral: ''
...@@ -401,7 +406,7 @@ export default { ...@@ -401,7 +406,7 @@ export default {
}, },
// 兑换积分编辑 // 兑换积分编辑
dynamicUpdate(row) { dynamicUpdate(row) {
this.dynamicTitle = '编辑兑换积分' this.dynamicTitle = '编辑获取积分'
const id = row.businessId const id = row.businessId
queryInfoById(id).then(res => { queryInfoById(id).then(res => {
console.log('查询信息', res) console.log('查询信息', res)
......
...@@ -81,9 +81,14 @@ ...@@ -81,9 +81,14 @@
{{ scope.row.nickName || '-' }} {{ scope.row.nickName || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="积分" prop="integral" :show-overflow-tooltip="true"> <el-table-column label="用户性别" prop="sex" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.integral || '-' }} {{ replaceSex(scope.row.sex) || '-' }}
</template>
</el-table-column>
<el-table-column label="用户邮箱" prop="email" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.email || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="level" label="会员等级" :show-overflow-tooltip="true"> <el-table-column prop="level" label="会员等级" :show-overflow-tooltip="true">
...@@ -91,12 +96,17 @@ ...@@ -91,12 +96,17 @@
{{ scope.row.level || '-' }} {{ scope.row.level || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="积分" prop="integral" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.integral || '-' }}
</template>
</el-table-column>
<el-table-column label="报名活动数" prop="count" :show-overflow-tooltip="true"> <el-table-column label="报名活动数" prop="count" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.count || '-' }} {{ scope.row.count || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="240"> <el-table-column label="操作" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-hasPermi="['sys:dict:edit']" v-hasPermi="['sys:dict:edit']"
...@@ -256,10 +266,17 @@ export default { ...@@ -256,10 +266,17 @@ export default {
// }) // })
}, },
methods: { methods: {
replaceSex(value) {
if (value === '0') {
return '女'
} else {
return '男'
}
},
replaceImg(value) { replaceImg(value) {
console.log('img', value) console.log('img', value)
if (value === '') { if (value === '') {
return 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png' return 'http://192.144.239.97:20043/file/static/images/login/denglu_icon_logo.png'
} else { } else {
return value return value
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment