Commit 82ee147b authored by 高宇's avatar 高宇

pc端修改

parent 37e2cc1e
...@@ -22,3 +22,11 @@ export function getDetailById(id) { ...@@ -22,3 +22,11 @@ export function getDetailById(id) {
method: 'get' method: 'get'
}) })
} }
// 查询会员参加活动的列表
export function getMemberOrder(params) {
return request({
url: '/system/order/selectMemberOrderByPagination',
method: 'get',
params
})
}
...@@ -79,3 +79,10 @@ export function getbusinessList(query) { ...@@ -79,3 +79,10 @@ export function getbusinessList(query) {
params: query params: query
}) })
} }
// 查看用户信息
export function getMemberDetaiByBusinessId(businessId) {
return request({
url: '/system/coupon/selectCouponById/' + businessId,
method: 'get'
})
}
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
<el-pagination <el-pagination
:background="background" :background="background"
:current-page.sync="currentPage" :current-page.sync="currentPage"
:page-size.sync=" rows" :page-size.sync="pageSize"
:layout="layout" :layout="layout"
:page-sizes="rows" :page-sizes="pageSizes"
:pager-count="pagerCount"
:total="total" :total="total"
v-bind="$attrs" v-bind="$attrs"
@size-change="handleSizeChange" @size-change="handleSizeChange"
...@@ -32,12 +33,17 @@ export default { ...@@ -32,12 +33,17 @@ export default {
type: Number, type: Number,
default: 20 default: 20
}, },
rows: { pageSizes: {
type: Array, type: Array,
default() { default() {
return [10, 20, 50, 100] return [10, 20, 50, 100]
} }
}, },
// 移动端页码按钮的数量端默认值5
pagerCount: {
type: Number,
default: document.body.clientWidth < 992 ? 5 : 7
},
layout: { layout: {
type: String, type: String,
default: 'total, sizes, prev, pager, next, jumper' default: 'total, sizes, prev, pager, next, jumper'
...@@ -55,6 +61,10 @@ export default { ...@@ -55,6 +61,10 @@ export default {
default: false default: false
} }
}, },
data() {
return {
}
},
computed: { computed: {
currentPage: { currentPage: {
get() { get() {
...@@ -64,7 +74,7 @@ export default { ...@@ -64,7 +74,7 @@ export default {
this.$emit('update:page', val) this.$emit('update:page', val)
} }
}, },
rows: { pageSize: {
get() { get() {
return this.limit return this.limit
}, },
...@@ -75,13 +85,16 @@ export default { ...@@ -75,13 +85,16 @@ export default {
}, },
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {
if (this.currentPage * val > this.total) {
this.currentPage = 1
}
this.$emit('pagination', { page: this.currentPage, limit: val }) this.$emit('pagination', { page: this.currentPage, limit: val })
if (this.autoScroll) { if (this.autoScroll) {
scrollTo(0, 800) scrollTo(0, 800)
} }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.$emit('pagination', { page: val, limit: this. rows }) this.$emit('pagination', { page: val, limit: this.pageSize })
if (this.autoScroll) { if (this.autoScroll) {
scrollTo(0, 800) scrollTo(0, 800)
} }
...@@ -93,8 +106,7 @@ export default { ...@@ -93,8 +106,7 @@ export default {
<style scoped> <style scoped>
.pagination-container { .pagination-container {
background: #fff; background: #fff;
padding: 15px; padding: 32px 16px;
text-align: right;
} }
.pagination-container.hidden { .pagination-container.hidden {
display: none; display: none;
......
...@@ -61,9 +61,9 @@ ...@@ -61,9 +61,9 @@
{{ scope.row.pushTime || '-' }} {{ scope.row.pushTime || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建人" prop="pushTime" :show-overflow-tooltip="true"> <el-table-column label="创建人" prop="createName" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.pushTime || '-' }} {{ scope.row.createName || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="公告状态" align="center" prop="status"> <el-table-column label="公告状态" align="center" prop="status">
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="small" size="small"
@click="handleAdd" @click="handleAdd"
>新增商家</el-button> >新增</el-button>
</div> </div>
</el-form> </el-form>
<div class="placeholder" /> <div class="placeholder" />
...@@ -211,14 +211,21 @@ ...@@ -211,14 +211,21 @@
<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 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="会员头像" prop="avatar" :show-overflow-tooltip="true" width="80"> <el-table-column label="会员头像" prop="avatar" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="replaceImg(scope.row.avatar)" style="width: 100%;height: 100%"> <img :src="replaceImg(scope.row.avatar)" style="width: 100%;height: 100%">
</template> </template>
</el-table-column> </el-table-column>
<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 || '-' }} <el-popover
placement="right"
width="400"
trigger="click"
>
<span>{{text}}</span>
<el-button slot="reference" @click="handleClick(scope.row)">{{ scope.row.phone }}</el-button>
</el-popover>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="用户昵称" prop="nickName" :show-overflow-tooltip="true"> <el-table-column label="用户昵称" prop="nickName" :show-overflow-tooltip="true">
...@@ -256,13 +263,14 @@ import { ...@@ -256,13 +263,14 @@ import {
} from '@/api/system/dict/type' } from '@/api/system/dict/type'
import dictCons from '@/utils/dictCons' 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 } from '@/api/member/member' import { queryMemberList, getDetailById } from '@/api/member/member'
export default { export default {
name: 'Dict', name: 'Dict',
// components: { Template }, // components: { Template },
data() { data() {
return { return {
text: '',
srcList: [ srcList: [
'http://192.144.239.97:20043/file/static/images/login/denglu_icon_logo.png' 'http://192.144.239.97:20043/file/static/images/login/denglu_icon_logo.png'
], ],
...@@ -365,19 +373,12 @@ export default { ...@@ -365,19 +373,12 @@ export default {
}) })
}, },
methods: { methods: {
vbs(val) { // 点击显示完整的会员账户
console.log('val信息', val) handleClick(row) {
const baseURL = 'http://192.144.239.97:20043/file/' console.log('row', row)
let url = baseURL + val getDetailById(row.businessId).then(res => {
console.log('url', url) console.log('res',res)
if (val === null) { this.text = res.data.phone
url = 'http://192.144.239.97:20043/file/static/images/login/denglu_icon_logo.png'
}
this.$nextTick().then(() => {
this.srcList = []
this.srcList.push(url)
this.$forceUpdate()
console.log('srcList', this.srcList)
}) })
}, },
replacesrc(row) { replacesrc(row) {
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<el-table v-loading="loading" border :data="memberList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="memberList" @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="会员头像" prop="avatar" width="85"> <el-table-column label="会员头像" prop="avatar" width="85">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image <el-image
style="width: 100%; height: 90%" style="width: 100%; height: 90%"
...@@ -86,10 +86,10 @@ ...@@ -86,10 +86,10 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="用户性别" prop="sex" :show-overflow-tooltip="true"> <el-table-column label="用户性别" prop="sex" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ replaceSex(scope.row.sex) || '-' }} {{ replaceSex(scope.row.sex) || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="用户邮箱" prop="email" :show-overflow-tooltip="true"> <el-table-column label="用户邮箱" prop="email" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ replaceEmil(scope.row.email) || '-' }} {{ replaceEmil(scope.row.email) || '-' }}
...@@ -107,7 +107,8 @@ ...@@ -107,7 +107,8 @@
</el-table-column> </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 || '-' }} <el-button type="text" @click="openDetail(scope.row)"> {{ scope.row.count || '-' }}</el-button>
<!-- {{ scope.row.count || '-' }}-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="100"> <el-table-column label="操作" class-name="small-padding fixed-width" width="100">
...@@ -117,7 +118,8 @@ ...@@ -117,7 +118,8 @@
size="mini" size="mini"
type="text" type="text"
@click="handleDetail(scope.row)" @click="handleDetail(scope.row)"
>详情</el-button> >详情
</el-button>
<!-- <el-button--> <!-- <el-button-->
<!-- v-hasPermi="['sys:dict:remove']"--> <!-- v-hasPermi="['sys:dict:remove']"-->
<!-- size="mini"--> <!-- size="mini"-->
...@@ -136,24 +138,31 @@ ...@@ -136,24 +138,31 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 会员详情对话框 --> <!-- 会员详情对话框 -->
<el-dialog title="会员信息" :visible.sync="open" width="500px" append-to-body @close="reset"> <el-dialog
title="会员信息"
:close-on-click-modal="false"
:visible.sync="open"
width="500px"
append-to-body
@close="reset"
>
<el-form ref="form" :model="form" label-width="100px"> <el-form ref="form" :model="form" label-width="100px">
<el-form-item label="头像" > <el-form-item label="头像">
<img :src="replaceImg(form.avatar)" style="width: 80px;height: 80px"> <img :src="replaceImg(form.avatar)" style="width: 80px;height: 80px">
</el-form-item> </el-form-item>
<el-form-item label="会员账号"> <el-form-item label="会员账号">
<span>{{ form.phone || '-' }}</span> <span>{{ form.phone || '-' }}</span>
</el-form-item> </el-form-item>
<el-form-item label="会员昵称" > <el-form-item label="会员昵称">
<span>{{ form.nickName || '-' }}</span> <span>{{ form.nickName || '-' }}</span>
</el-form-item> </el-form-item>
<el-form-item label="会员性别" > <el-form-item label="会员性别">
{{ replaceSex(form.sex) || '-' }} {{ replaceSex(form.sex) || '-' }}
</el-form-item> </el-form-item>
<el-form-item label="会员邮箱" > <el-form-item label="会员邮箱">
{{ form.email || '-' }} {{ form.email || '-' }}
</el-form-item> </el-form-item>
<el-form-item label="会员等级" > <el-form-item label="会员等级">
<span>{{ form.level || '-' }}</span> <span>{{ form.level || '-' }}</span>
</el-form-item> </el-form-item>
<el-form-item label="会员积分"> <el-form-item label="会员积分">
...@@ -164,11 +173,77 @@ ...@@ -164,11 +173,77 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-dialog> </el-dialog>
<!-- 会员参加活动列表对话框 -->
<el-dialog
title="会员参加活动列表"
class="activeDialog"
:close-on-click-modal="false"
:visible.sync="activity.open"
width="60%"
append-to-body
@close="reset"
>
<el-form ref="form" :model="form" :inline="true" label-width="68px">
<el-form-item>
<el-input
v-model="activityQuery.name"
placeholder="订单名称"
clearable
:maxlength="30"
size="small"
style="width: 200px"
/>
</el-form-item>
<el-form-item>
<el-input
v-model="activityQuery.price"
placeholder="订单金额"
clearable
:maxlength="30"
size="small"
style="width: 200px"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuerys">查询</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuerys">重置</el-button>
</el-form-item>
<el-table ref="table" style="margin-top: 16px" border :data="activityList">
<el-table-column label="订单名称" prop="name" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.name || '-' }}
</template>
</el-table-column>
<el-table-column label="订单金额" prop="price" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.price || '-' }}
</template>
</el-table-column>
<el-table-column label="支付数量" prop="num" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.num || '-' }}
</template>
</el-table-column>
<el-table-column label="下单时间" prop="createTime" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.createTime || '-' }}
</template>
</el-table-column>
</el-table>
<pagination
v-show="activity.total>0"
:total="activity.total"
:page.sync="activityQuery.page"
:limit.sync="activityQuery. rows"
@pagination="getActivityList"
/>
</el-form>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { queryMemberList, deleteMember, getDetailById } from '@/api/member/member' import { queryMemberList, deleteMember, getDetailById, getMemberOrder } from '@/api/member/member'
import { import {
addType, addType,
updateType, updateType,
...@@ -180,6 +255,21 @@ export default { ...@@ -180,6 +255,21 @@ export default {
name: 'Dict', name: 'Dict',
data() { data() {
return { return {
// 活动对象
activity: {
total: '',
page: 1,
rows: 10,
open: false
},
activityList: [],
activityQuery: {
name: '',
price: '',
businessId: undefined,
page: 1,
rows: 10
},
baseUrl: 'http://192.144.239.97:20043/file/static/images/login/denglu_icon_logo.png', baseUrl: 'http://192.144.239.97:20043/file/static/images/login/denglu_icon_logo.png',
value: true, value: true,
test: '', test: '',
...@@ -254,31 +344,46 @@ export default { ...@@ -254,31 +344,46 @@ export default {
manageLoading: false manageLoading: false
} }
}, },
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() { 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.getList()
// optionselect().then(response => {
// this.options = response.data
// })
}, },
methods: { methods: {
replaceEmil(value){ // 活动重置
if (value === '***'){ resetQuerys() {
this.activityQuery.name = ''
this.activityQuery.price = ''
this.activityQuery.page = 1
this.activityQuery.rows = 10
console.log('activityQuery', this.activityQuery)
this.getActivityList()
},
// 活动查询
handleQuerys() {
this.activityQuery.page = 1
this.getActivityList()
},
getActivityList() {
getMemberOrder(this.activityQuery).then(res => {
console.log('res', res)
this.activityList = res.rows
this.activity.total = res.total
this.activity.open = true
})
},
// 打开会员参加活动列表
openDetail(row) {
console.log(row)
this.activityQuery.businessId = row.businessId
console.log('activityQuery', this.activityQuery)
getMemberOrder(this.activityQuery).then(res => {
console.log('res', res)
this.activityList = res.rows
this.activity.total = res.total
this.activity.open = true
})
},
replaceEmil(value) {
if (value === '***') {
return '-' return '-'
} else { } else {
return value return value
...@@ -347,8 +452,12 @@ export default { ...@@ -347,8 +452,12 @@ export default {
if (flag) { if (flag) {
if (this.form.dataId) { if (this.form.dataId) {
// 如果找不到 下拉框选项中对应选中的选项 或者 下拉框选项中对应选中的选项 状态为1(停用)则将双向绑定的数据清空 // 如果找不到 下拉框选项中对应选中的选项 或者 下拉框选项中对应选中的选项 状态为1(停用)则将双向绑定的数据清空
if (!this.optionsDict.find(item => { return item.dictCode === this.form.dataId }) || if (!this.optionsDict.find(item => {
this.optionsDict.find(item => { return item.dictCode === this.form.dataId }).status === 1) { return item.dictCode === this.form.dataId
}) ||
this.optionsDict.find(item => {
return item.dictCode === this.form.dataId
}).status === 1) {
this.form.dataId = '' this.form.dataId = ''
} }
} }
...@@ -416,7 +525,7 @@ export default { ...@@ -416,7 +525,7 @@ export default {
/** 详情按钮操作 */ /** 详情按钮操作 */
handleDetail(row) { handleDetail(row) {
getDetailById(row.businessId).then(res => { getDetailById(row.businessId).then(res => {
console.log('详情',res) console.log('详情', res)
this.form = res.data this.form = res.data
this.open = true this.open = true
}) })
...@@ -427,7 +536,9 @@ export default { ...@@ -427,7 +536,9 @@ export default {
if (valid) { if (valid) {
this.manageLoading = true this.manageLoading = true
const temp = Object.assign({}, this.form) const temp = Object.assign({}, this.form)
if (!temp.parentId) { temp.dataId = '' } if (!temp.parentId) {
temp.dataId = ''
}
if (this.title === '修改字典类型') { if (this.title === '修改字典类型') {
updateType(temp).then(response => { updateType(temp).then(response => {
if (response.code === 200) { if (response.code === 200) {
...@@ -439,7 +550,9 @@ export default { ...@@ -439,7 +550,9 @@ export default {
this.getList() this.getList()
} }
this.manageLoading = false this.manageLoading = false
}).catch(() => { this.manageLoading = false }) }).catch(() => {
this.manageLoading = false
})
} else { } else {
addType(temp).then(response => { addType(temp).then(response => {
if (response.code === 200) { if (response.code === 200) {
...@@ -451,7 +564,9 @@ export default { ...@@ -451,7 +564,9 @@ export default {
this.getList() this.getList()
} }
this.manageLoading = false this.manageLoading = false
}).catch(() => { this.manageLoading = false }) }).catch(() => {
this.manageLoading = false
})
} }
} }
}) })
...@@ -519,15 +634,23 @@ export default { ...@@ -519,15 +634,23 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.activeDialog {
::v-deep .el-dialog .el-dialog__body {
max-height: 73vh;
}
}
.app-container-dict { .app-container-dict {
font-size: 18px; font-size: 18px;
padding: 0; padding: 0;
.placeholder{
height:1.3vh; .placeholder {
height: 1.3vh;
background-color: #F4F4F4; background-color: #F4F4F4;
margin-bottom:10px margin-bottom: 10px
} }
/deep/.el-table td .cell {
/deep/ .el-table td .cell {
font-size: 14px; font-size: 14px;
padding-left: 10px; padding-left: 10px;
height: 64px !important; height: 64px !important;
...@@ -536,12 +659,14 @@ export default { ...@@ -536,12 +659,14 @@ export default {
align-items: center; align-items: center;
display: flex; display: flex;
} }
} }
</style> </style>
<style lang="scss"> <style lang="scss">
.app-container-dict { .app-container-dict {
.el-form { .el-form {
padding: 0 0 0 10px; padding: 0 0 0 10px;
.el-form-item { .el-form-item {
margin-top: 0; margin-top: 0;
margin-left: 0; margin-left: 0;
......
...@@ -259,12 +259,8 @@ ...@@ -259,12 +259,8 @@
placement="right" placement="right"
width="400" width="400"
trigger="click"> trigger="click">
<el-table :data="gridData"> <span>{{test}}</span>
<el-table-column width="150" property="date" label="日期"></el-table-column> <el-button slot="reference" @click="handleClick(scope.row)" >{{scope.row.userName}}</el-button>
<el-table-column width="100" property="name" label="姓名"></el-table-column>
<el-table-column width="300" property="address" label="地址"></el-table-column>
</el-table>
<el-button slot="reference">{{scope.row.userName}}</el-button>
</el-popover> </el-popover>
</template> </template>
</el-table-column> </el-table-column>
...@@ -315,7 +311,7 @@ import { ...@@ -315,7 +311,7 @@ import {
clearCache clearCache
} from '@/api/system/dict/type' } from '@/api/system/dict/type'
import Template from '@/views/instance/Template' import Template from '@/views/instance/Template'
import { delvoucher, selectCouponPickByPagination, voucherdetail, voucherlist, voucherpublish } from '@/api/voucher' import { delvoucher, selectCouponPickByPagination, voucherdetail, voucherlist, voucherpublish, getMemberDetaiByBusinessId } from '@/api/voucher'
export default { export default {
name: 'Dict', name: 'Dict',
...@@ -440,6 +436,13 @@ export default { ...@@ -440,6 +436,13 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
handleClick(row) {
console.log('row',row)
getMemberDetaiByBusinessId(row.businessId).then(res => {
console.log('res',res)
this.test = res.data.userName
})
},
/** 查询字典类型列表 */ /** 查询字典类型列表 */
getList() { getList() {
this.loading = true this.loading = true
......
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