Commit eda9e05c authored by 杨硕's avatar 杨硕

Merge branch 'master' of http://gitlab.91isoft.com:90/yangshuo/longhui_web

 Conflicts:
	src/views/business/businessadd.vue
parents 28d23b61 0257f324
...@@ -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) {
......
This diff is collapsed.
...@@ -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