Commit 065d09dd authored by 杨硕's avatar 杨硕
parents bdf0d9b4 0eb46d07
......@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 获取金额和积分的列表
export function queryIntegralList(params) {
return request({
url: '/system/integral//queryintergras',
url: '/system/integral/queryintergras',
method: 'get',
params
})
......@@ -30,7 +30,7 @@ export function queryInfoById(id) {
// 编辑金额和积分的数据
export function updataInfo(data) {
return request({
url: '/system/integral//update',
url: '/system/integral/update',
method: 'put',
data,
headers: {
......@@ -61,7 +61,7 @@ export function queryMemberLevel() {
})
}
// 新增会员等级
export function addMemberBenefits(data){
export function addMemberBenefits(data) {
return request({
url: '/system/memberfits/add',
method: 'put',
......
......@@ -47,14 +47,15 @@
:limit="1"
list-type="picture"
>
<img v-if="imgUrl" :src="imgUrl" class="avatar">
<!-- <el-button size="small" type="primary">点击上传</el-button>-->
<div class="upload-trademark">
<div v-if="!imgUrl" class="upload-trademark">
<i class="el-icon-plus" style="width: 20px;height: 20px;margin-top: 10px;" />
<div class="upload-trademark-title">上传竖版封面</div></div>
<div 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-form-item>
<el-form-item label="封面" prop="image">
<el-form-item label="横版封面" prop="image">
<el-upload
class="upload-image"
action="#"
......@@ -135,7 +136,7 @@ export default {
}
},
created() {
// const baseURL = 'http://192.144.239.97:20043/file/'
const baseURL = 'http://192.144.239.97:20043/file/'
if (this.type === 0) {
this.form = {}
} else if (this.type === 1) {
......@@ -144,6 +145,8 @@ export default {
queryDetailById(id).then(res => {
if (res.code === 200) {
this.form = res.data
this.imgUrl = baseURL + this.form.imgUrl
this.imgageUrl = baseURL + this.form.imageUrl
console.log('form', this.form)
}
})
......
......@@ -70,6 +70,11 @@
<el-table v-loading="loading" border :data="businessList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<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">
<template slot-scope="scope">
{{ scope.row.name || '-' }}
......@@ -85,22 +90,12 @@
{{ scope.row.address || '-' }}
</template>
</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">
<template slot-scope="scope">
{{ scope.row.phone || '-' }}
</template>
</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">
<template slot-scope="scope">
<el-switch
......@@ -110,10 +105,11 @@
:inactive-value="0"
active-text="启用"
inactive-text="停用"
@change="handleChangeStatus(scope.row)"
/>
</template>
</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">
<el-button
v-hasPermi="['sys:dict:edit']"
......@@ -152,73 +148,6 @@
:limit.sync="queryParams. rows"
@pagination="getList"
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="779px" append-to-body @close="reset">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="商家名称" prop="name">
<el-input v-model.trim="form.name" :maxlength="30" placeholder="请输入商家名称" />
</el-form-item>
<el-form-item label="入驻日期" prop="entryDate">
<el-date-picker
v-model="form.entryDate"
type="date"
placeholder="入驻日期"
style="width: 100%"
/>
</el-form-item>
<el-form-item label="商家地址" prop="address">
<el-input v-model.trim="form.address" :maxlength="30" placeholder="请输入商家地址" />
</el-form-item>
<el-form-item label="负责人" prop="head">
<el-input v-model.trim="form.head" :maxlength="30" placeholder="请输入负责人" />
</el-form-item>
<el-form-item label="联系方式" prop="phone">
<el-input v-model.trim="form.phone" :maxlength="30" placeholder="请输入联系方式" />
</el-form-item>
<el-form-item label="商家账号" prop="entryAccount">
<el-input v-model.trim="form.entryAccount" :maxlength="30" placeholder="请输入商家账号" />
</el-form-item>
<el-form-item label="商家简介" prop="entryDetails">
<el-input v-model.trim="form.entryDetails" type="textarea" placeholder="请输入商家简介" />
</el-form-item>
<el-form-item label="竖版封面" prop="img">
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
list-type="picture"
>
<!-- <el-button size="small" type="primary">点击上传</el-button>-->
<div class="upload-trademark">
<i class="el-icon-plus" style="width: 20px;height: 20px;margin-top: 10px;" />
<div class="upload-trademark-title">上传竖版封面</div></div>
<div slot="tip" class="el-upload__tip">支持文件格式:.jpg .gpeg .png.单个文件不能超过4M</div>
</el-upload>
</el-form-item>
<el-form-item label="封面" prop="image">
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
list-type="picture"
>
<!-- <el-button size="small" type="primary">点击上传</el-button>-->
<div class="upload-trademark">
<i class="el-icon-plus" style="width: 20px;height: 20px;margin-top: 10px;" />
<div class="upload-trademark-title">上传封面</div></div>
<div slot="tip" class="el-upload__tip">支持文件格式:.jpg .gpeg .png.单个文件不能超过4M</div>
</el-upload>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" :loading="manageLoading" :disabled="manageLoading" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 详情弹出框-->
<el-dialog title="商家详情" :close-on-click-modal="false" :visible.sync="detailopen" width="779px" append-to-body @close="reset">
<el-form :model="businessForm" label-width="100px">
......@@ -246,8 +175,8 @@
</el-form>
</el-dialog>
<!-- 绑定管理员弹窗-->
<el-dialog title="绑定会员 " :close-on-click-modal="false" class="memberDialog" :visible.sync="bindopen" width="779px" append-to-body @close="reset">
<el-form ref="query" style="padding: 0 0 0 0px" :model="query" :inline="true" label-width="68px">
<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">
<el-form-item prop="phone">
<el-input
v-model="query.phone"
......@@ -255,7 +184,7 @@
clearable
:maxlength="30"
size="small"
style="width: 143px"
style="width: 200px"
@keyup.enter.native="handleQuerys"
/>
</el-form-item>
......@@ -266,29 +195,7 @@
clearable
:maxlength="30"
size="small"
style="width: 143px"
@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"
style="width: 200px"
@keyup.enter.native="handleQuerys"
/>
</el-form-item>
......@@ -330,7 +237,7 @@
@pagination="getListS"
/>
<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 @click="cancel">取 消</el-button>
</div>
......@@ -344,7 +251,7 @@ import {
clearCache
} from '@/api/system/dict/type'
import dictCons from '@/utils/dictCons'
import { queryBussinessAll, queryDetailById, deleteBussiness, BingBussinss, UnBingBussiness } from '@/api/bussiness/bussiness'
import { queryBussinessAll, queryDetailById, deleteBussiness, BingBussinss, UnBingBussiness, updataBussinessInfo } from '@/api/bussiness/bussiness'
import { queryMemberList } from '@/api/member/member'
export default {
......@@ -443,34 +350,41 @@ export default {
}
},
/** 路由离开前存储筛选条件*/
// beforeRouteLeave(to, from, next) {
// this.$store.dispatch('searchSave/searchParamsSet', {
// path: this.$route.path,
// param: {
// ...this.queryParams
// }
// })
// next()
// },
created() {
// if (this.$store.getters.searchParams[this.$route.path]) {
// const { searchParams } = this.$store.getters; const { path } = this.$route
// const param = JSON.parse(searchParams[path]) // 保留着的查询条件
// this.queryParams = { ...param }
// }
this.getList()
this.getDicts(dictCons['NORMAL_DISABLE']).then(response => {
this.statusOptions = response.data
})
// optionselect().then(response => {
// this.options = response.data
// })
},
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) {
console.log('状态的变化', row)
const obj = {
businessId: row.businessId,
status: row.status
}
updataBussinessInfo(obj).then(res => {
if (res.code === 200) {
this.$message.success('操作成功')
}
})
console.log('obj', obj)
},
replaceImg(value) {
console.log('img', 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 {
return value
}
......@@ -711,8 +625,11 @@ export default {
} else {
this.memberId = ''
}
const obj = {
storeId: row.businessId
}
console.log('绑定的会员id为', this.memberId)
queryMemberList().then(respos => {
queryMemberList(obj).then(respos => {
console.log('会员列表', respos)
this.memberList = respos.rows
this.queryList.total = respos.total
......@@ -784,7 +701,13 @@ export default {
}
</script>
<style lang="scss" scoped>
::v-deep .el-table tr {
height: 59px;
}
.memberDialog{
::v-deep .el-table tr{
height: 59px;
}
::v-deep .el-table__header-wrapper .el-checkbox {
display: none
}
......
......@@ -107,7 +107,7 @@
{{ scope.row.dealTime || '-' }}
</template>
</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">
<el-button
v-hasPermi="['sys:dict:edit']"
......@@ -549,6 +549,9 @@ export default {
.el-switch .el-switch__label {
width: 57px!important;
}
::v-deep .el-table td .cell{
height: 48px;
}
</style>
<style lang="scss">
.app-container-dict {
......
<template>
<div class="equityseting">
<div class="equityseting-title">会员权益设定</div>
<div class="form1">
<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>
</div>
<el-table border :data="membershiplevel">
......@@ -19,17 +21,17 @@
{{ scope.row.level || '-' }}
</template>
</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">
{{ scope.row.integral || '-' }}
</template>
</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">
{{ scope.row.discount || '-' }}
</template>
</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">
<el-button
v-hasPermi="['sys:dict:remove']"
......@@ -50,7 +52,10 @@
</el-table>
<el-divider style="margin-top: 53px" />
<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>
</div>
<el-table border :data="dynamicValidate">
......@@ -61,12 +66,12 @@
<span>{{ scope.row.amount || '' }}</span>
</template>
</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">
{{ scope.row.integral || '-' }}
</template>
</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">
<el-button
v-hasPermi="['sys:dict:remove']"
......@@ -100,12 +105,12 @@
<el-form-item prop="level" label="会员等级">
<el-input v-model="form.level" disabled placeholder="请输入会员等级" :maxlength="10" />
</el-form-item>
<el-form-item prop="integral" label="积分条件">
<el-input v-model="form.integral" placeholder="请输入积分条件" :maxlength="10" />
<el-form-item prop="integral" label="所需积分">
<el-input v-model="form.integral" placeholder="请输入所需积分" :maxlength="10" />
</el-form-item>
<el-form-item prop="discount" label="折扣">
<el-form-item prop="discount" label="享受折扣">
<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>
</div>
</el-form-item>
......@@ -125,8 +130,8 @@
:maxlength="10"
/>
</el-form-item>
<el-form-item prop="integral" label="兑换积分">
<el-input v-model="dynamicFrom.integral" placeholder="请输入兑换积分" :maxlength="10" />
<el-form-item prop="integral" label="获取积分">
<el-input v-model="dynamicFrom.integral" placeholder="请输入获取积分" :maxlength="10" />
</el-form-item>
<div style="text-align: center">
<el-button type="primary" @click="dynamicsubmitForm">提交</el-button>
......@@ -226,7 +231,7 @@ export default {
this.opens = false
},
addDynamic() {
this.dynamicTitle = '新增积分兑换'
this.dynamicTitle = '新增获取积分'
this.dynamicFrom = {
amount: '',
integral: ''
......@@ -401,7 +406,7 @@ export default {
},
// 兑换积分编辑
dynamicUpdate(row) {
this.dynamicTitle = '编辑兑换积分'
this.dynamicTitle = '编辑获取积分'
const id = row.businessId
queryInfoById(id).then(res => {
console.log('查询信息', res)
......
......@@ -81,9 +81,14 @@
{{ scope.row.nickName || '-' }}
</template>
</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">
{{ replaceSex(scope.row.sex) || '-' }}
</template>
</el-table-column>
<el-table-column label="用户邮箱" prop="email" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.integral || '-' }}
{{ scope.row.email || '-' }}
</template>
</el-table-column>
<el-table-column prop="level" label="会员等级" :show-overflow-tooltip="true">
......@@ -91,12 +96,17 @@
{{ scope.row.level || '-' }}
</template>
</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">
<template slot-scope="scope">
{{ scope.row.count || '-' }}
</template>
</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">
<el-button
v-hasPermi="['sys:dict:edit']"
......@@ -256,10 +266,17 @@ export default {
// })
},
methods: {
replaceSex(value) {
if (value === '0') {
return '女'
} else {
return '男'
}
},
replaceImg(value) {
console.log('img', 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 {
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