Commit 5ab3b7c9 authored by 高宇's avatar 高宇

会员权益添加等级卡片和描述卡片

parent a164611d
......@@ -172,6 +172,7 @@ export default {
}
}
return {
srcList: [],
pickoptions: {
disabledDate: time => {
const oneDay = 60 * 60 * 24 * 1000
......@@ -285,6 +286,8 @@ export default {
this.formdisable = true
// this.endtimedisable = true
this.numinputdisable = true
this.uploaddisable = true
this.srcList.push(this.imageUrl)
this.form.activityDetails = this.form.activityDetails.replace(/\<p/gi,
'<p style=" margin: 0px;" ')
this.form.activityDetails = this.form.activityDetails.replace(/\<img/gi,
......
......@@ -118,6 +118,9 @@ export default {
validMobile(value) ? callback() : callback(new Error('手机号格式不正确'))
}
return {
baseURL: 'http://192.144.239.97:20043/file/',
imgageList: [],
imgList: [],
imgUrl: '',
imgageUrl: '',
// 表单数据
......@@ -174,6 +177,8 @@ export default {
queryDetailById(id).then(res => {
if (res.code === 200) {
this.form = res.data
this.uploaddisable1 = true
this.uploaddisable = true
// this.imgUrl = baseURL + this.form.imgUrl
if (this.form.imgUrl === null) {
this.imgUrl = baseURL + '/static/images/login/denglu_icon_logo.png'
......
......@@ -58,7 +58,8 @@
icon="el-icon-plus"
size="small"
@click="handleAdd"
>新增</el-button>
>新增
</el-button>
</div>
</el-form>
<div class="placeholder" />
......@@ -120,27 +121,31 @@
size="mini"
type="text"
@click="handleDetail(scope.row)"
>详情</el-button>
>详情
</el-button>
<el-button
v-if="scope.row.status === 0"
v-hasPermi="['sys:dict:edit']"
size="mini"
type="text"
@click="handleUpdate(scope.row)"
>编辑</el-button>
>编辑
</el-button>
<el-button
v-if="scope.row.status === 0"
v-hasPermi="['sys:dict:remove']"
size="mini"
type="text"
@click="handleDelete(scope.row)"
>删除</el-button>
>删除
</el-button>
<el-button
v-hasPermi="['sys:dict:remove']"
size="mini"
type="text"
@click="bindmember(scope.row)"
>绑定管理员</el-button>
>绑定管理员
</el-button>
</template>
</el-table-column>
</el-table>
......@@ -153,7 +158,14 @@
@pagination="getList"
/>
<!-- 详情弹出框-->
<el-dialog title="商家详情" :close-on-click-modal="false" :visible.sync="detailopen" width="779px" append-to-body @close="reset">
<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">
<el-form-item label="商家名称">
<span>{{ businessForm.name || '-' }}</span>
......@@ -176,10 +188,32 @@
<el-form-item label="商家简介">
<span>{{ businessForm.entryDetails || '-' }}</span>
</el-form-item>
<el-form-item label="横版封面">
<el-image
class="avatar"
:src="businessForm.imageUrl"
:preview-src-list="imgageList"
/>
</el-form-item>
<el-form-item label="竖版封面">
<el-image
class="avatar"
:src="businessForm.imgUrl"
:preview-src-list="imgList"
/>
</el-form-item>
</el-form>
</el-dialog>
<!-- 绑定管理员弹窗-->
<el-dialog title="绑定会员 " :close-on-click-modal="false" class="memberDialog" :visible.sync="bindopen" width="60%" 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">
<el-form-item prop="phone">
<el-input
......@@ -192,9 +226,9 @@
@keyup.enter.native="handleQuerys"
/>
</el-form-item>
<el-form-item prop="nickName">
<el-form-item prop="name">
<el-input
v-model="query.nickName"
v-model="query.name"
placeholder="用户昵称"
clearable
:maxlength="30"
......@@ -208,7 +242,14 @@
<el-button icon="el-icon-refresh" size="small" @click="resetQuerys">重置</el-button>
</el-form-item>
</el-form>
<el-table ref="table" style="margin-top: 16px" :header-cell-class-name="cellClass" border :data="memberList" @selection-change="handleSelectionChange">
<el-table
ref="table"
style="margin-top: 16px"
:header-cell-class-name="cellClass"
border
:data="memberList"
@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="会员头像" prop="avatar" width="80">
......@@ -223,7 +264,7 @@
width="400"
trigger="click"
>
<span>{{text}}</span>
<span>{{ text }}</span>
<el-button slot="reference" @click="handleClick(scope.row)">{{ scope.row.phone }}</el-button>
</el-popover>
</template>
......@@ -262,7 +303,14 @@ import {
clearCache
} from '@/api/system/dict/type'
import dictCons from '@/utils/dictCons'
import { queryBussinessAll, queryDetailById, deleteBussiness, BingBussinss, UnBingBussiness, updataBussinessInfo } from '@/api/bussiness/bussiness'
import {
queryBussinessAll,
queryDetailById,
deleteBussiness,
BingBussinss,
UnBingBussiness,
updataBussinessInfo
} from '@/api/bussiness/bussiness'
import { queryMemberList, getDetailById } from '@/api/member/member'
export default {
......@@ -322,6 +370,8 @@ export default {
// 日期范围
dateRange: [],
baseURL: 'http://192.144.239.97:20043/file/',
imgageList: [],
imgList: [],
// 查询参数
queryParams: {
page: 1,
......@@ -377,7 +427,7 @@ export default {
handleClick(row) {
console.log('row', row)
getDetailById(row.businessId).then(res => {
console.log('res',res)
console.log('res', res)
this.text = res.data.phone
})
},
......@@ -494,8 +544,12 @@ export default {
if (flag) {
if (this.form.dataId) {
// 如果找不到 下拉框选项中对应选中的选项 或者 下拉框选项中对应选中的选项 状态为1(停用)则将双向绑定的数据清空
if (!this.optionsDict.find(item => { return item.dictCode === this.form.dataId }) ||
this.optionsDict.find(item => { return item.dictCode === this.form.dataId }).status === 1) {
if (!this.optionsDict.find(item => {
return item.dictCode === this.form.dataId
}) ||
this.optionsDict.find(item => {
return item.dictCode === this.form.dataId
}).status === 1) {
this.form.dataId = ''
}
}
......@@ -571,6 +625,8 @@ export default {
this.getList()
},
getListS() {
const storeId = JSON.parse(localStorage.getItem('storeId'))
this.query.storeId = storeId
queryMemberList(this.query).then(respos => {
console.log('会员列表', respos)
this.memberList = respos.rows
......@@ -593,8 +649,16 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = []
this.resetForm('queryForm')
this.queryParams = {
page: 1,
rows: 10,
name: undefined,
head: undefined,
phone: undefined,
beginTime: '',
endTime: ''
// status: undefined
}
this.handleQuery()
},
resetQuerys() {
......@@ -641,7 +705,21 @@ export default {
const id = row.businessId
queryDetailById(id).then(res => {
console.log('商家信息', res)
if (res.data.imageUrl != null) {
res.data.imageUrl = this.baseURL + res.data.imageUrl
} else {
res.data.imageUrl = 'http://192.144.239.97:20043/file/static/images/login/denglu_icon_logo.png'
}
if (res.data.imgUrl !== null) {
res.data.imgUrl = this.baseURL + res.data.imgUrl
} else {
res.data.imgUrl = 'http://192.144.239.97:20043/file/static/images/login/denglu_icon_logo.png'
}
this.imgageList = []
this.imgList = []
this.businessForm = res.data
this.imgList.push(this.businessForm.imgUrl)
this.imgageList.push(this.businessForm.imageUrl)
this.detailopen = true
})
},
......@@ -700,11 +778,12 @@ export default {
}).then(function() {
deleteBussiness(id).then(res => {
if (res.code === 200) {
this.$message.success('操作成功')
this.getList()
this.$message.success('操作成功')
}
})
}).catch(() => {})
}).catch(() => {
})
},
/** 导出按钮操作 */
handleExport() {
......@@ -746,27 +825,33 @@ export default {
::v-deep .el-table tr {
height: 59px;
}
.memberDialog{
::v-deep .el-dialog .el-dialog__body{
.memberDialog {
::v-deep .el-dialog .el-dialog__body {
max-height: 85vh;
}
::v-deep .el-table tr{
::v-deep .el-table tr {
height: 59px;
}
::v-deep .el-table__header-wrapper .el-checkbox {
::v-deep .el-table__header-wrapper .el-checkbox {
display: none
}
}
.app-container-dict {
font-size: 18px;
padding: 0;
.placeholder{
height:1.3vh;
.placeholder {
height: 1.3vh;
background-color: #F4F4F4;
margin-bottom:10px
margin-bottom: 10px
}
}
.upload-trademark{
.upload-trademark {
width: 56px;
height: 56px;
display: flex;
......@@ -774,7 +859,7 @@ export default {
align-items: center;
border: 1px dashed #E5E5E5;
.upload-trademark-title{
.upload-trademark-title {
font-size: 10px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
......@@ -782,39 +867,46 @@ export default {
line-height: 10px !important;
}
}
::v-deep .el-switch__label * {
font-size: 12px !important;
}
::v-deep .el-switch__label {
::v-deep .el-switch__label {
position: absolute;
display: none;
color: #fff;
font-size: 12px !important;
line-height: unset !important;
}
/*打开时文字位置设置*/
::v-deep .el-switch__label--right {
z-index: 1;
right: 20px;
}
/*关闭时文字位置设置*/
::v-deep .el-switch__label--left {
z-index: 1;
left: 20px;
}
/*显示文字*/
::v-deep .el-switch__label.is-active {
display: block;
}
::v-deep .el-switch .el-switch__core,
.el-switch .el-switch__label {
width: 57px!important;
width: 57px !important;
}
</style>
<style lang="scss">
.app-container-dict {
.el-form {
padding: 0 0 0 10px;
.el-form-item {
margin-top: 0;
margin-left: 0;
......
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