Commit 8ba8d6f8 by wangql
2 parents 38b85bba 8e23600b
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.1.7", "glsx-components": "^1.2.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
......
import { http } from '@/main'
const timePeriodStatistics = params => {
params.method = 'scrm.api.shopmall.order.timePeriodStatistics'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
const couponStatistical = params => {
params.method = 'scrm.api.coupon.statistical.marketing.effect'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
const equityStatistical = params => {
params.method = 'scrm.api.equity.statistical.marketing.effect'
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
const merchantStatistical = params => {
params.method = 'scrm.api.shopmall.activity.get.merchant.statistics'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
export default { timePeriodStatistics, couponStatistical, equityStatistical, merchantStatistical }
...@@ -12,11 +12,12 @@ let cfg = require('./conf.js') ...@@ -12,11 +12,12 @@ let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) { export const fetchConfig = function (isEnv = true) {
if (isEnv) { // console.log(1111111)
let { request } = cfg // if (isEnv) {
Object.assign(request, { timeout }) // let { request } = cfg
return Promise.resolve(cfg) // Object.assign(request, { timeout })
} // return Promise.resolve(cfg)
// }
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config') return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
......
...@@ -2,7 +2,13 @@ const staticRoutes = Object.freeze([ ...@@ -2,7 +2,13 @@ const staticRoutes = Object.freeze([
{ {
name: 'default', name: 'default',
path: '/', path: '/',
redirect: { name: 'zoneList' } redirect: { name: 'home' }
},
{
name: 'home',
path: '/home/index',
component: resolve => require([`@/views/home/index.vue`], resolve),
meta: {}
}, },
{ {
name: 'zoneList', name: 'zoneList',
......
...@@ -24,7 +24,7 @@ export async function start() { ...@@ -24,7 +24,7 @@ export async function start() {
// .forEach(item => { // .forEach(item => {
// urlParams[item.split('=')[0]] = item.split('=')[1] // urlParams[item.split('=')[0]] = item.split('=')[1]
// }) // })
var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-f4e9b4ba-b16f-491f-bf84-40f2b896dc93-rop' var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-983e626d-4250-42b0-be9c-a9845552ae20-rop'
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } }) Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } })
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes) render('/', routes)
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
v-model="basicForm.sendTime" v-model="basicForm.sendTime"
size="small" size="small"
type="date" type="date"
value-format="yyyy-MM-DD" value-format="yyyy-MM-dd"
placeholder="选择日期" placeholder="选择日期"
></el-date-picker>- ></el-date-picker>-
<el-time-picker <el-time-picker
...@@ -343,7 +343,7 @@ export default { ...@@ -343,7 +343,7 @@ export default {
// } // }
// }) // })
if (params.sendType == 2) { if (params.sendType == 2) {
params.sendTime = this.basicForm.sendTime + ' ' + this.basicForm.sendDate params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate
} }
console.log(params) console.log(params)
this.$apis.customerTransform this.$apis.customerTransform
...@@ -410,8 +410,8 @@ export default { ...@@ -410,8 +410,8 @@ export default {
} }
} }
if (this.basicForm.condition.date) { if (this.basicForm.condition.date) {
params.condition.startTime = dayjs(this.basicForm.condition.date[0]).format('YYYY-MM-DD') params.condition.sTime = dayjs(this.basicForm.condition.date[0]).format('YYYY-MM-DD')
params.condition.endTime = dayjs(this.basicForm.condition.date[1]).format('YYYY-MM-DD') params.condition.eTime = dayjs(this.basicForm.condition.date[1]).format('YYYY-MM-DD')
} }
params.userList = this.basicForm.userList.map(item => { params.userList = this.basicForm.userList.map(item => {
return { return {
...@@ -432,31 +432,10 @@ export default { ...@@ -432,31 +432,10 @@ export default {
return return
} }
const params = this.getSiftMembers() const params = this.getSiftMembers()
// const params = {
// selectType: this.basicForm.selectType,
// condition: {
// sex: this.basicForm.condition.sex,
// chatId: this.basicForm.condition.chatId
// }
// }
// if (this.basicForm.condition.date) {
// params.condition.startTime = dayjs(this.basicForm.condition.date[0]).format('YYYY-MM-DD')
// params.condition.endTime = dayjs(this.basicForm.condition.date[1]).format('YYYY-MM-DD')
// }
// params.userList = this.basicForm.userList.map(item => {
// return {
// staffId: item.staffId,
// staffName: item.staffName
// }
// })
console.log(params) console.log(params)
this.$apis.customerTransform.customerCount(params).then(res => { this.$apis.customerTransform.customerCount(params).then(res => {
console.log(res) console.log(res)
if (res) { this.groupNumber = res
this.groupNumber = res
} else {
this.groupNumber = '-'
}
this.isUpdate = false this.isUpdate = false
}) })
} }
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
v-model="basicForm.sendTime" v-model="basicForm.sendTime"
size="small" size="small"
type="date" type="date"
value-format="yyyy-MM-DD" value-format="yyyy-MM-dd"
placeholder="选择日期" placeholder="选择日期"
></el-date-picker>- ></el-date-picker>-
<el-time-picker <el-time-picker
...@@ -222,7 +222,7 @@ export default { ...@@ -222,7 +222,7 @@ export default {
} }
}) })
if (params.sendType == 2) { if (params.sendType == 2) {
params.sendTime = this.basicForm.sendTime + ' ' + this.basicForm.sendDate params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate
} }
console.log(params) console.log(params)
this.$apis.customerTransform this.$apis.customerTransform
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
mode="horizontal" mode="horizontal"
@select="handleSelect" @select="handleSelect"
> >
<el-menu-item index="0">全部</el-menu-item> <el-menu-item index>全部</el-menu-item>
<el-menu-item index="1">已发送员工</el-menu-item> <el-menu-item index="1">已发送员工</el-menu-item>
<el-menu-item index="2">未发送员工</el-menu-item> <el-menu-item index="0">未发送员工</el-menu-item>
<el-menu-item index="3">员工发送失败</el-menu-item> <el-menu-item index="2">员工发送失败</el-menu-item>
</el-menu> </el-menu>
<div class="detail-total">共 {{ employeelist.length || 0 }} 人</div> <div class="detail-total">共 {{ employeelist.length || 0 }} 人</div>
<div v-if="employeelist.length != 0" class="info-list"> <div v-if="employeelist.length != 0" class="info-list">
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<div class="info-name"> <div class="info-name">
{{ item.staffName }} {{ item.staffName }}
<span <span
:class="[item.status == 1 ? 'unsend' : 'send']" :class="[item.status == 0 ? 'unsend' : 'send']"
>{{ item.status == 1 ? '未' : '已' }}发送</span> >{{ item.status == 0 ? '未' : '已' }}发送</span>
</div> </div>
<div class="info-num">共{{ item.customerCount }}个客户</div> <div class="info-num">共{{ item.customerCount }}个客户</div>
</div> </div>
...@@ -54,10 +54,10 @@ ...@@ -54,10 +54,10 @@
mode="horizontal" mode="horizontal"
@select="handleCustomSelect" @select="handleCustomSelect"
> >
<el-menu-item index="0">全部</el-menu-item> <el-menu-item index>全部</el-menu-item>
<el-menu-item index="1">已发送客户</el-menu-item> <el-menu-item index="1">已发送客户</el-menu-item>
<el-menu-item index="2">未发送客户</el-menu-item> <el-menu-item index="0">未发送客户</el-menu-item>
<el-menu-item index="3">客户接受失败</el-menu-item> <el-menu-item index="2">客户接受失败</el-menu-item>
</el-menu> </el-menu>
<div class="detail-total">共 {{ customerlist.length || 0 }} 人</div> <div class="detail-total">共 {{ customerlist.length || 0 }} 人</div>
<div v-if="customerlist.length != 0" class="info-list"> <div v-if="customerlist.length != 0" class="info-list">
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
{{ item.customerName }} {{ item.customerName }}
<div <div
:class="[item.status == 0 ? 'unsend' : 'send']" :class="[item.status == 0 ? 'unsend' : 'send']"
>{{ item.status == 0 ? '未' : '已' }}发送</div> >{{ item.status == 0 ? '未' : '已' }}送达</div>
</div> </div>
</div> </div>
<div class="info-right"> <div class="info-right">
...@@ -104,52 +104,9 @@ export default { ...@@ -104,52 +104,9 @@ export default {
}, },
data() { data() {
return { return {
activeIndex: '0', activeIndex: '',
customIndex: '0', customIndex: '',
employeelist: [ employeelist: [],
{
id: 1,
name: 'anadf',
status: 1,
num: 1,
url: 'dfsa'
},
{
id: 2,
name: 'anadf',
status: 2,
num: 1,
url: 'dfsa'
},
{
id: 3,
name: 'anadf',
status: 2,
num: 1,
url: 'dfsa'
},
{
id: 4,
name: 'anadf',
status: 2,
num: 1,
url: 'dfsa'
},
{
id: 5,
name: 'anadf',
status: 2,
num: 1,
url: 'dfsa'
},
{
id: 6,
name: 'anadf',
status: 2,
num: 1,
url: 'dfsa'
}
],
customerlist: [], customerlist: [],
basicInfo: {}, basicInfo: {},
eventBus: new Vue() eventBus: new Vue()
...@@ -202,14 +159,14 @@ export default { ...@@ -202,14 +159,14 @@ export default {
const id = this.$route.params.id const id = this.$route.params.id
this.$apis.customerTransform.staffList({ id, status }).then(res => { this.$apis.customerTransform.staffList({ id, status }).then(res => {
console.log(res) console.log(res)
this.employeelist = res this.employeelist = res ? res : []
}) })
}, },
getCustomerList(status = 0) { getCustomerList(status = 0) {
const id = this.$route.params.id const id = this.$route.params.id
this.$apis.customerTransform.customerDetailList({ id, status }).then(res => { this.$apis.customerTransform.customerDetailList({ id, status }).then(res => {
console.log(res) console.log(res)
this.customerlist = res this.customerlist = res ? res : []
}) })
}, },
remindUserGroup() { remindUserGroup() {
...@@ -340,4 +297,13 @@ export default { ...@@ -340,4 +297,13 @@ export default {
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
z-index: 1; z-index: 1;
} }
.el-empty {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
text-align: center;
box-sizing: border-box;
padding: 40px 0;
}
</style> </style>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button <el-button
type="text" type="text"
:disabled="scope.scope.isRemind == 0" :disabled="scope.scope.isRemind == 1"
@click="btnClick('remind', 1, scope.scope)" @click="btnClick('remind', 1, scope.scope)"
>提醒发送</el-button> >提醒发送</el-button>
<el-button type="text" @click="btnClick('detail', 1, scope.scope)">详情</el-button> <el-button type="text" @click="btnClick('detail', 1, scope.scope)">详情</el-button>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button <el-button
type="text" type="text"
:disabled="scope.scope.isRemind == 0" :disabled="scope.scope.isRemind == 1"
@click="btnClick('remind', 2, scope.scope)" @click="btnClick('remind', 2, scope.scope)"
>提醒发送</el-button> >提醒发送</el-button>
<el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button> <el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button>
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs'
export default { export default {
name: 'SendAssistant', name: 'SendAssistant',
data() { data() {
...@@ -113,7 +114,14 @@ export default { ...@@ -113,7 +114,14 @@ export default {
{ {
label: '发送时间', label: '发送时间',
prop: 'sendTime', prop: 'sendTime',
line: 2 line: 2,
formatter: cellValue => {
if (cellValue.sendTime) {
return dayjs(cellValue.sendTime).format('YYYY-MM-DD HH:mm:ss')
} else {
return ''
}
}
}, },
{ {
label: '已发送员工', label: '已发送员工',
...@@ -245,6 +253,10 @@ export default { ...@@ -245,6 +253,10 @@ export default {
// if (type == 1) { // if (type == 1) {
this.$apis.customerTransform.listRemindOperate(params).then(res => { this.$apis.customerTransform.listRemindOperate(params).then(res => {
console.log(res) console.log(res)
this.$message({
type: 'success',
message: '操作成功!'
})
if (type == 1) { if (type == 1) {
this.$refs.customer.refreshTable() this.$refs.customer.refreshTable()
} else { } else {
...@@ -298,4 +310,11 @@ export default { ...@@ -298,4 +310,11 @@ export default {
} }
} }
} }
.entmicro {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
</style> </style>
<template>
<div class="chart-box">
<div id="bar" class="chart-bar"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'BarChart',
props: ['list'],
data() {
return {
myChart: {},
option: {
xAxis: {
max: 'dataMax'
},
yAxis: {
type: 'category',
data: [],
inverse: true,
animationDuration: 300,
animationDurationUpdate: 300,
max: 4 // only the largest 3 bars will be displayed
},
grid: {
x: 120,
y: 0,
x2: 50,
y2: 0
},
series: [
{
realtimeSort: true,
name: 'X',
type: 'bar',
data: [],
label: {
show: true,
position: 'right',
valueAnimation: true
},
itemStyle: {
normal: {
label: {
show: true,
textStyle: {
color: '#fff',
fontSize: 16
}
},
color: '#5850FF' // 修改柱状颜色
}
}
}
],
// legend: {
// show: true
// },
animationDuration: 0,
animationDurationUpdate: 3000,
animationEasing: 'linear',
animationEasingUpdate: 'linear'
}
}
},
watch: {
list(val) {
const yData = val.map(i => i.packageName)
const data = val.map(i => i.totalSales)
this.option.yAxis.data = yData
this.option.series[0].data = data
console.log(this.option)
this.option && this.myChart.setOption(this.option)
}
},
methods: {
getChart() {
let option
const data = []
for (let i = 0; i < 5; ++i) {
data.push(Math.round(Math.random() * 200))
}
}
},
mounted() {
// this.getChart()
let chartDom = document.getElementById('bar')
this.myChart = echarts.init(chartDom)
this.option && this.myChart.setOption(this.option)
}
}
</script>
<style lang="scss" scoped>
.chart-box {
width: 100%;
height: 207px;
}
.chart-bar {
height: 207px;
}
</style>
<template>
<div class="chart-box">
<div class="chart-line" id="line"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'LineChart',
props: ['list'],
data() {
return {
option: {
tooltip: {
trigger: 'axis',
// formatter: `{b}\r \n成交金额:{c}\n \n 订单总数:{d}单`
formatter: function(params) {
var tips = ''
console.log(params)
if (params != null && params.length > 0) {
tips += params[0].name + '<br />'
for (var i = 0; i < params.length; i++) {
params[i].marker = '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:#5850FF;"></span>'
tips += params[i].marker + '成交金额: ' + params[i].value + '元'
}
}
return tips
// var res = `<div>${params[0].name}</div>
// <div>成交金额:${params[0].data}元</div>
// <div>订单总数:${params[0].value}</div>`
// return res
}
},
xAxis: {
type: 'category',
data: []
},
yAxis: {
type: 'value'
},
// legend: {
// height: 260,
// width: 1184
// },
grid: {
x: 80,
y: 50,
x2: 50,
y2: 50
},
series: [
{
data: [],
type: 'line',
itemStyle: {
normal: {
lineStyle: {
color: '#5850FF' // 改变折线颜色
}
}
}
}
]
},
myChart: {}
}
},
watch: {
list(val) {
console.log(val)
const xData = val.map(i => i.dataDateStr)
const yData = val.map(i => i.amount)
this.option.xAxis.data = xData.reverse()
this.option.series[0].data = yData
this.option.series[0].count = val.map(i => i.count)
this.option && this.myChart.setOption(this.option)
}
},
methods: {},
mounted() {
let chartDom = document.getElementById('line')
this.myChart = echarts.init(chartDom)
// this.option && this.myChart.setOption(this.option)
}
}
</script>
<style lang="scss" scoped>
.chart-box {
height: 260px;
width: 100%;
}
.chart-line {
height: 260px;
}
</style>
<template>
<div class="chart-box">
<div id="pie" class="chart-pie"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
const DISCOUNT_TYPE = {
1: '满减券',
2: '折扣券',
3: '代金券',
4: '兑换券',
5: '购车代金券',
6: '商品折扣券',
7: '会员服务'
}
export default {
name: 'PieChart',
props: ['list'],
data() {
return {
DISCOUNT_TYPE,
option: {
tooltip: {
trigger: 'item',
formatter: '{b}\n \n{c} 张'
},
series: [
{
name: '券类营销',
type: 'pie',
radius: '50%',
label: {
formatter: '{b}\n \n{c} 张'
},
itemStyle: {
normal: {
color: function(params) {
var colorList = ['#5850FF', '#FE9C1C', '#FDB757', '#6495FA']
return colorList[params.dataIndex]
}
}
},
data: [],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
},
myChart: {}
}
},
watch: {
list(val) {
const arr = this.list.map(item => {
return {
name: this.DISCOUNT_TYPE[item.discountType],
value: item.totalIssue
}
})
this.option.series[0].data = arr
console.log(arr)
this.option && this.myChart.setOption(this.option)
}
},
methods: {},
mounted() {
let chartDom = document.getElementById('pie')
this.myChart = echarts.init(chartDom)
this.option && this.myChart.setOption(this.option)
}
}
</script>
<style lang="scss" scoped>
.chart-box {
width: 100%;
height: 185px;
}
.chart-pie {
height: 185px;
}
</style>
<template> <template>
<div class="report-home"> <div class="marketing-home">
HOME <div class="title">
<GLButton type="danger" @click="test()" class="test555" id="1-1-1-1" mode="link">权限按钮测试</GLButton> 营销效果概览页
<GLButton type="success" size="small" @click="test()" id="1-1-1-1" class="test">权限按钮测试2</GLButton> <span class="title-tips">根据门店日常的营销运营情况,可查看优惠券、秒杀活动营销,微店以及会员类的数据效果。</span>
<el-button class="test" @click="test()">东方网分</el-button> </div>
<div class="home-top">
<!-- 概览+客户分群 -->
<div class="home-left">
<div class="marketing">
<div class="marketing-item border" v-for="(item, index) in list" :key="index">
<div class="marketing-title">
<div>
{{item.title}}
<!-- <img class="marketing-icon" src="@/assets/edit.png" alt /> -->
</div>
<img class="marketing-img" src="@/assets/icon-d.png" alt />
</div>
<div class="marketing-content">{{item.content}}</div>
<div class="marketing-btn">
<el-button type="primary" size="small" @click="jumpPage(item.path)">{{item.linkName}}</el-button>
</div>
</div>
</div>
<!-- 客户分群 -->
<div class="customer-group">
<div class="title">客户分群</div>
<div class="customer-content">
<!-- 券类营销 -->
<div class="border coupons">
<div class="name">券类营销</div>
<div class="coupons-content">
<div class="coupons-left">
<div class="data-item">
<span class="data-title w-90">
优惠券总数
<img :src="iconUrl" alt />
</span>
<span class="date-content">
<span class="data-num">{{coupon.totalIssue}}</span>张
</span>
</div>
<div class="data-item">
<span class="data-title w-90">
发放总数
<img :src="iconUrl" alt />
</span>
<span class="date-content">
<span class="data-num">{{coupon.totalIssue}}</span>张
</span>
</div>
<div class="data-item">
<span class="data-title w-90">
核销总数
<img :src="iconUrl" alt />
</span>
<span class="date-content">
<span class="data-num">{{coupon.totalVerification}}</span>张
</span>
</div>
<div class="data-last">
<span class="data-name">核销总数</span>
<span class="data-percentage">{{coupon.verificationRate}}</span>
</div>
</div>
<div class="pie-box">
<PieChart :list.sync="coupon.list" class="coupons-right"></PieChart>
<!-- <div v-else class="no-data">暂无数据</div> -->
</div>
</div>
</div>
<!-- 秒杀活动 -->
<div class="border activity">
<div class="name">秒杀活动</div>
<div class="data-item">
<span class="data-title w-118">
参与活动总人数
<el-popover
placement="top-start"
title="参与活动总人数"
width="200"
trigger="hover"
content="购买活动商品的账号数量。"
>
<img slot="reference" :src="iconUrl" alt />
</el-popover>
<!-- <img :src="iconUrl" alt /> -->
</span>
<span class="date-content">
<span class="data-num">{{merchant.saleAmount}}</span>人
</span>
</div>
<div class="data-item">
<span class="data-title w-118">
浏览量
<el-popover
placement="top-start"
title="浏览量"
width="200"
trigger="hover"
content="购买活动商品的账号数量。"
>
<img slot="reference" :src="iconUrl" alt />
</el-popover>
<!-- <img :src="iconUrl" alt /> -->
</span>
<span class="date-content">
<span class="data-num">{{merchant.viewAmount}}</span>人
</span>
</div>
<div class="data-item">
<span class="data-title w-118">
累计销量
<el-popover
placement="top-start"
title="累计销量"
width="200"
trigger="hover"
content="购买活动商品的账号数量。"
>
<img slot="reference" :src="iconUrl" alt />
</el-popover>
<!-- <img :src="iconUrl" alt /> -->
</span>
<span class="date-content">
<span class="data-num">{{merchant.salePrice}}</span>元
</span>
</div>
</div>
</div>
</div>
</div>
<!-- 会员数据 -->
<div class="home-right border">
<div class="membership-data">
<div class="title">会员数据</div>
<div class="data-item" style="margin-top: 10px;">
<span class="data-title w-118">总会员数</span>
<span class="date-content">
<span class="data-num">{{equity.totalMembership}}</span>人
</span>
</div>
<div class="data-item" style="margin-top: 10px;">
<span class="data-title w-118">今日新增</span>
<span class="date-content">
<span class="data-num">{{equity.todayMembership}}</span>人
</span>
</div>
<div class="data-item" style="margin-top: 10px;">
<div class="data-half" style="margin-right: 20px;">
<span class="data-half-name">周同比</span>
<span
:class="[equity.weekFlag ? 'data-red-percentage data-half-red':'data-green-percentage data-half-green']"
>
<span :class="[equity.weekFlag ? 'data-red-triangle':'data-green-triangle']"></span>
<span>{{equity.lastWeekDayMemberShipCompared}}</span>
</span>
</div>
<div class="data-half">
<span class="data-half-name">日环比</span>
<span
:class="[equity.dayFlag ? 'data-red-percentage data-half-red':'data-green-percentage data-half-green']"
>
<span :class="[equity.dayFlag ? 'data-red-triangle':'data-green-triangle']"></span>
<span>{{equity.yesterdayMembershipSequential}}</span>
</span>
</div>
</div>
</div>
<div class="packages-sold">
<div class="title">
<span>套餐总售卖</span>
<span class="sold-num">
{{equity.totalSales}}
<span>单</span>
</span>
</div>
<div class="bar-box">
<BarChart :list.sync="equity.countMerchantOrderList"></BarChart>
<!-- <div v-else class="no-data">暂无数据</div> -->
</div>
<div>
<div class="data-item">
<span class="data-title w-118">累计产值</span>
<span class="date-content">
<span class="data-num orange">{{equity.totalProductionValue}}</span>元
</span>
</div>
<div class="data-tips">注:仅体现套餐售卖数最多的前5单</div>
</div>
</div>
</div>
</div>
<div class="border home-bottom">
<div class="title bottom-title">
<div>微店数据</div>
<div style="width: 32%;">
<el-button type="text" @click="storeData('week')">本周</el-button>
<el-button type="text" @click="storeData('month')">本月</el-button>
<el-button type="text" @click="storeData('year')">全年</el-button>
<el-date-picker
class="bottom-picker"
v-model="date"
type="daterange"
size="small"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="dateChange"
></el-date-picker>
</div>
</div>
<div class="bottom-content">
<div class="line-box">
<LineChart :list.sync="order.list"></LineChart>
<!-- <div v-else class="no-data">暂无数据</div> -->
</div>
<div class="bottom-right">
<div class="bottom-right-item">
<div class="item-content">
<img src="@/assets/icon-amount.png" alt />
<div>
<div>成交金额</div>
<div class="item-number">
{{order.totalAmount}}
<span>元</span>
</div>
</div>
</div>
<!-- <div class="item-chain">
<span>同比上月</span>
<span class="green-num">0.3%</span>
</div>-->
</div>
<div class="bottom-right-item">
<div class="item-content">
<img src="@/assets/icon-order.png" alt />
<div>
<div>订单总数</div>
<div class="item-number">
{{order.totalCount}}
<span>单</span>
</div>
</div>
</div>
<!-- <div class="item-chain">
<span>同比上月</span>
<span class="red-num">0.3%</span>
</div>-->
</div>
</div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
const iconUrl =
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAADqADAAQAAAABAAAADgAAAAC98Dn6AAAB7klEQVQoFVVSQUhUURQ9981sVFyYRRHuFFq1CGlZC3etnBlMRhMXQwhtCqIQJBA3gSSi1EpkNqkjCjOjm1YWuGojBVO7Fi0K2qQLF6H453bO+/ODLvz37z333PvOu+8BtImCf0K56J8VYKLoC9HRMlnwRxaRgB0kOHDDz5gl/0hZBaaFwGl3H65j577nygV/ITCM71pinRo1GiF4zm8jqzkr5dEtluiTJZ9zx8fYTEBmbP5D/tSY3wnaRUwB0rbdsAH5SYK3sW2l4r1/jnFIsUMElmsNmxdB7JGsUnGUWvQz+XkHXtXqNsxx/KL/Zg+oS5xxi8A2T8SqNe0az3NANyfVJD4N5ripZDTDrc1da8kn/i1QxGya4eq4Kl8aui7hblRLUd/JXCSxxXarBJ9T8fuYFLsztiqTv4NjXUTh2rZteEhiP8OKiiIez3+CFoWubdXtpUDe1XAbmJEfQLxpRxFPRz7T1ccz6BFkl6okRzHFOJ5ccbnkr8l5LF8mrl5Pnv5gJksJjmlD/wclv9121ClxeqthH4TJQh5fLhIMaa7LOrRuIk2la89lfO29ghuU/69IHBatqIZfOhgWv2OXhUIOi/FCnDpoZuYqaCaYpYJ5gvf+m6pInUE9Y5NRhoPCdGl80fscyFK1aqfCZH8B0rPa9foo7e4AAAAASUVORK5CYII='
import PieChart from './components/pieChart'
import BarChart from './components/barChart'
import LineChart from './components/lineChart'
import * as dayjs from 'dayjs'
export default { export default {
name: 'home', name: 'home',
components: {
PieChart,
BarChart,
LineChart
},
data() {
return {
iconUrl,
list: [
{
title: '日常关怀',
content: '可把通知、祝福、活动等消息批量发送给客户,员工可对客户进行后续的服务。',
linkName: '群发关怀信息',
path: '/customerTransform/index'
},
{
title: '会员服务',
content: '会员服务由门店根据自店服务项目创建的线上服务券,如“一年十二次洗车券”、“陶瓷镀膜”等,客户购买后可到店出示服务券享受服务,门店扫码进行次数核销。',
linkName: '设置会员服务',
path: '/memberCenter/center'
},
{
title: '商品销售',
content: '管理上下架门店自有的商品,可配置带货商品活动商品销售分润。',
linkName: '上架商品',
path: '/homeSet/index'
}
],
date: [],
order: {
list: []
},
coupon: {
list: []
},
equity: {
countMerchantOrderList: []
},
merchant: {}
}
},
mounted() {
const start = new Date()
this.$set(this.date, 0, start.setTime(start.getTime() - 3600 * 1000 * 24 * 14))
this.$set(this.date, 1, new Date())
this.init(this.date)
},
methods: { methods: {
test() { init(date) {
console.log('点击了按钮') this.couponStatistical()
this.$messenger.send({ message: { from: 11, message: '11111' } }) this.timePeriodStatistics({
dataStartDateStr: dayjs(date[0]).format('YYYY-MM-DD'),
dataEndDateStr: dayjs(date[1]).format('YYYY-MM-DD')
})
this.equityStatistical()
this.merchantStatistical()
},
dateChange(val) {
console.log(val)
const params = {
dataStartDateStr: dayjs(val[0]).format('YYYY-MM-DD'),
dataEndDateStr: dayjs(val[1]).format('YYYY-MM-DD')
}
this.timePeriodStatistics(params)
},
storeData(name) {
let startTime, endTime
let now = new Date()
let nowDayOfWeek = now.getDay()
let nowDay = now.getDate()
let nowMonth = now.getMonth()
let nowYear = now.getFullYear()
switch (name) {
case 'week':
startTime = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek)
endTime = new Date(nowYear, nowMonth, nowDay + 6 - nowDayOfWeek)
this.$set(this.date, 0, startTime)
this.$set(this.date, 1, endTime)
this.dateChange(this.date)
break
case 'month':
startTime = new Date(nowYear, nowMonth, 1)
endTime = new Date(nowYear, nowMonth + 1, 0)
this.$set(this.date, 0, startTime)
this.$set(this.date, 1, endTime)
this.dateChange(this.date)
break
case 'year':
startTime = new Date(nowYear, 0, 1)
endTime = new Date(nowYear, 11, 31)
this.$set(this.date, 0, startTime)
this.$set(this.date, 1, endTime)
this.dateChange(this.date)
break
}
},
jumpPage(path) {
console.log(path)
this.$router.push(path)
},
couponStatistical() {
const params = {
discountTypes: [2, 3, 4, 7]
}
this.$apis.home.couponStatistical(params).then(res => {
this.coupon = res
})
},
equityStatistical() {
this.$apis.home.equityStatistical({}).then(res => {
this.equity = res
this.equity.weekFlag = this.equity.lastWeekDayMemberShipCompared.indexOf('-') == -1
this.equity.dayFlag = this.equity.yesterdayMembershipSequential.indexOf('-') == -1
})
},
merchantStatistical() {
this.$apis.home.merchantStatistical({}).then(res => {
console.log(res)
this.merchant = res
})
},
timePeriodStatistics(params) {
this.$apis.home.timePeriodStatistics(params).then(res => {
if (res) {
this.order = res
}
})
} }
} }
} }
</script> </script>
<style lang="scss" scope>
.border {
padding: 20px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
}
.data {
&-item {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20px;
}
&-last {
display: flex;
align-items: center;
margin-top: 16px;
justify-content: flex-end;
}
&-title {
display: inline-flex;
align-items: center;
justify-content: flex-end;
font-size: 14px;
color: #666;
img {
margin-left: 6px;
}
}
&-content {
color: #333;
font-size: 12px;
}
&-num {
font-size: 22px;
font-weight: 500;
}
&-name {
font-size: 14px;
color: #a3a3a3;
}
&-tips {
font-size: 14px;
color: #a3a3a3;
margin-top: 14px;
}
&-percentage {
font-size: 14px;
color: #5850ff;
margin-left: 10px;
}
&-half {
display: inline-flex;
justify-content: space-between;
width: 50%;
font-size: 12px;
&-name {
color: #979797;
}
&-red {
color: #eb4e4e;
}
&-green {
color: #2cca74;
}
}
&-red-percentage {
display: inline-flex;
align-items: flex-start;
}
&-green-percentage {
display: inline-flex;
align-items: flex-end;
}
&-red-triangle {
display: inline-block;
margin-top: -4px;
border-width: 6.5px;
margin-right: 2px;
border-style: dashed dashed solid dashed;
border-color: transparent transparent #eb4e4e transparent;
}
&-green-triangle {
display: inline-block;
margin-bottom: -4px;
border-width: 6.5px;
margin-right: 2px;
border-style: solid dashed dashed dashed;
border-color: #2cca74 transparent transparent transparent;
}
.orange {
color: #fe9c1c;
}
}
.marketing-home {
.title {
font-size: 20px;
font-weight: 500;
color: #333;
line-height: 20px;
vertical-align: middle;
margin-bottom: 20px;
.title-tips {
margin-left: 10px;
color: #565656;
font-size: 14px;
}
}
.home-top {
display: flex;
width: 100%;
.home-left {
margin-right: 20px;
width: 75%;
.marketing {
display: flex;
margin-bottom: 20px;
&-item {
width: 33%;
// width: 275px;
box-sizing: border-box;
margin-right: 20px;
&:last-child {
margin-right: 0;
}
}
&-title {
display: flex;
justify-content: space-between;
font-size: 20px;
color: #333;
margin-bottom: 15px;
}
&-icon {
width: 16px;
height: 16px;
margin-left: 10px;
}
&-img {
width: 101px;
height: 57px;
}
&-content {
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 20px;
margin-bottom: 20px;
min-height: 80px;
}
&-btn {
text-align: center;
margin-bottom: 10px;
}
}
.customer-content {
display: flex;
justify-content: space-between;
}
.coupons {
// width: 570px;
width: 66.6%;
box-sizing: border-box;
&-content {
display: inline-flex;
width: 100%;
}
&-left {
width: 50%;
}
&-right {
// flex: 1;
// width: 50%;
display: inline-block;
}
}
.activity {
display: inline-block;
// width: 275px;
width: calc(33.3% - 20px);
box-sizing: border-box;
}
.name {
font-size: 16px;
color: #333;
}
.w-118 {
width: 118px;
}
.w-90 {
width: 90px;
}
}
.home-right {
// flex: 1;
width: 25%;
height: 555px;
box-sizing: border-box;
.membership-data {
padding-bottom: 20px;
border-bottom: 2px solid #f0f0f0;
}
.packages-sold {
.title {
display: flex;
justify-content: space-between;
font-size: 14px;
color: #666;
margin-top: 27px;
margin-bottom: 0;
.sold-num {
font-size: 22px;
color: #333;
span {
font-size: 12px;
}
}
}
}
}
}
.home-bottom {
// width: 1160px;
width: 100%;
box-sizing: border-box;
margin-top: 20px;
.bottom {
&-title {
display: flex;
justify-content: space-between;
}
&-picker {
// width: 240px;
// width: 25%;
margin-left: 20px;
}
&-content {
display: flex;
}
&-right {
width: 240px;
&-item {
font-size: 16px;
color: #333;
margin-bottom: 21px;
&:last-child {
margin-bottom: 0;
}
.item-content {
display: flex;
img {
width: 48px;
height: 48px;
margin-right: 10px;
}
.item-number {
margin-top: 6px;
font-size: 22px;
font-weight: 500;
span {
font-size: 12px;
}
}
}
.item-chain {
margin-left: 58px;
margin-top: 10px;
font-size: 12px;
color: #979797;
.green-num {
margin-left: 5px;
color: #2cca74;
&::before {
content: '';
margin-bottom: -6px;
display: inline-block;
border-width: 6.5px;
margin-right: 2px;
border-style: solid dashed dashed dashed;
border-color: #2cca74 transparent transparent transparent;
}
}
.red-num {
margin-left: 5px;
color: #eb4e4e;
&::before {
content: '';
margin-bottom: 1px;
display: inline-block;
border-width: 6.5px;
margin-right: 2px;
border-style: dashed dashed solid dashed;
border-color: transparent transparent #eb4e4e transparent;
}
}
}
}
}
}
}
}
.line-box {
position: relative;
height: 260px;
width: 77%;
}
.bar-box {
position: relative;
width: 100%;
height: 207px;
}
.pie-box {
position: relative;
width: 50%;
height: 185px;
}
.no-data {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%, -50%);
}
</style>
...@@ -21,14 +21,14 @@ ...@@ -21,14 +21,14 @@
</div> </div>
<div> <div>
<span>会员权益使用地址:</span> <span>会员权益使用地址:</span>
<span class="address">{{ ruleForm.linkUrl }}</span> <span class="address ellipsis-1" :title="ruleForm.linkUrl">{{ ruleForm.linkUrl }}</span>
</div> </div>
<el-button class="seeEquity" size="small" type="primary" @click="openDialog">查看权益</el-button> <el-button class="seeEquity" size="small" type="primary" @click="openDialog">查看权益</el-button>
</div> </div>
<div class="cardDetail editForm" v-else> <div class="cardDetail editForm" v-else>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="90px" class="demo-ruleForm" style="width: 500px"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="90px" class="demo-ruleForm" style="width: 500px">
<el-form-item label="会员卡名" prop="cardName" size="small"> <el-form-item label="会员卡名" prop="cardName" size="small">
<el-input v-model="ruleForm.cardName" size="small" placeholder="请输入会员卡名" maxlength="15"></el-input> <el-input v-model="ruleForm.cardName" class="cardNameInput" size="small" placeholder="请输入会员卡名" show-word-limit maxlength="15"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="售价" size="small" prop="price" style="width: 300px"> <el-form-item label="售价" size="small" prop="price" style="width: 300px">
<el-input v-model="ruleForm.price" size="small" placeholder="请输入合理价格" @keyup.native="ruleForm.price = oninput(ruleForm.price)"> <el-input v-model="ruleForm.price" size="small" placeholder="请输入合理价格" @keyup.native="ruleForm.price = oninput(ruleForm.price)">
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<GLTable ref="memberCenterRef" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable v-if="isReload" ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="accountName" slot-scope="scope"> <span slot="accountName" slot-scope="scope">
<div>{{ scope.scope.accountName }}</div> <div>{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div> <div>{{ scope.scope.mobile }}</div>
...@@ -84,26 +84,26 @@ ...@@ -84,26 +84,26 @@
</div> </div>
<glsx-dialog title="权益详情" width="712px" :noBtnOk="true" :noCancel="true" :noClose="false" btnCancelLabel="关闭" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose"> <glsx-dialog title="权益详情" width="712px" :noBtnOk="true" :noCancel="true" :noClose="false" btnCancelLabel="关闭" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<!-- <el-scrollbar> --> <!-- <el-scrollbar> -->
<div class="modal-body"> <div class="modal-body">
<div class="equity-name">汽车权益</div> <div class="equity-name">汽车权益</div>
<div class="equity-panel"> <div class="equity-panel">
<div class="equity-item" v-for="(item, index) in merchantData.carServiceList" :key="index"> <div class="equity-item" v-for="(item, index) in merchantData.carServiceList" :key="index">
<div class="equity-item-icon"><img :src="item.equityIcon" /></div> <div class="equity-item-icon"><img :src="item.equityIcon" /></div>
<div class="equity-item-name">{{ item.equityName }}</div> <div class="equity-item-name">{{ item.equityName }}</div>
<div class="equity-item-desc">{{ item.equityDesc }}</div> <div class="equity-item-desc">{{ item.equityDesc }}</div>
</div>
</div> </div>
<div v-for="(item, index) in merchantData.goodsServiceList" :key="index"> </div>
<div class="equity-name">{{ item.goodsCategory }}</div> <div v-for="(item, index) in merchantData.goodsServiceList" :key="index">
<div class="equity-panel"> <div class="equity-name">{{ item.goodsCategory }}</div>
<div class="equity-item" v-for="(v, xindex) in item.equityGoodsGroupDescDtos" :key="xindex"> <div class="equity-panel">
<div class="equity-item-icon"><img :src="v.equityIcon" /></div> <div class="equity-item" v-for="(v, xindex) in item.equityGoodsGroupDescDtos" :key="xindex">
<div class="equity-item-name">{{ v.equityName }}</div> <div class="equity-item-icon"><img :src="v.equityIcon" /></div>
<div class="equity-item-desc">{{ v.equityDesc }}</div> <div class="equity-item-name">{{ v.equityName }}</div>
</div> <div class="equity-item-desc">{{ v.equityDesc }}</div>
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- </el-scrollbar> --> <!-- </el-scrollbar> -->
</glsx-dialog> </glsx-dialog>
</div> </div>
...@@ -135,6 +135,7 @@ export default { ...@@ -135,6 +135,7 @@ export default {
// }, 1000) // }, 1000)
} }
return { return {
isReload: true,
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
...@@ -190,13 +191,12 @@ export default { ...@@ -190,13 +191,12 @@ export default {
}, },
{ {
label: '开通方式', label: '开通方式',
prop: 'activeTypeDesc', prop: 'activeTypeDesc'
}, },
{ {
label: '开通日期', label: '开通日期',
prop: 'activeTime', prop: 'activeTime'
// addHtml: 'activeTime' // addHtml: 'activeTime'
}, },
{ {
...@@ -281,12 +281,11 @@ export default { ...@@ -281,12 +281,11 @@ export default {
}, },
getCardContentFun() { getCardContentFun() {
getCardContent({ merchantId: this.merchantId }).then(res => { getCardContent({ merchantId: this.merchantId }).then(res => {
this.ruleForm.equityId = res[0].id this.ruleForm.equityId = res[0].id
this.ruleForm.cardName = res[0].cardClassName this.ruleForm.cardName = res[0].cardClassName
this.ruleForm.price = res[0].price this.ruleForm.price = res[0].price
this.ruleForm.marketPrice = res[0].marketPrice this.ruleForm.marketPrice = res[0].marketPrice
this.ruleForm.linkUrl = res[0].url this.ruleForm.linkUrl = res[0].url
}) })
}, },
openEditWrap() { openEditWrap() {
...@@ -333,16 +332,21 @@ export default { ...@@ -333,16 +332,21 @@ export default {
}) })
}, },
handleReset() { handleReset() {
// this.searchForm = { this.isReload = false
// name: '',
// status: '-1'
// }
this.searchForm = {} this.searchForm = {}
this.handleSearch() this.$nextTick(() => {
this.isReload = true
})
}, },
handleSearch() { handleSearch() {
this.$refs.memberCenterRef.refreshTable() this.$refs.memberCenterRef.refreshTable()
}, },
setTableFinishFun() {
//接收到的数据为空
if (!this.$refs.memberCenterRef.data.length) {
this.$refs.memberCenterRef.setTableHeightFun()
}
},
handleClose() { handleClose() {
this.isDialogVisible = !this.isDialogVisible this.isDialogVisible = !this.isDialogVisible
}, },
...@@ -374,15 +378,15 @@ export default { ...@@ -374,15 +378,15 @@ export default {
.masonry { .masonry {
position: absolute; position: absolute;
top: 40px; top: 40px;
left: 40px; left: 32px;
} }
.memberCardName { .memberCardName {
position: absolute; position: absolute;
font-size: 17px; font-size: 15px;
color: #8e5310; color: #8e5310;
font-weight: 700; font-weight: 700;
top: 54px; top: 54px;
left: 95px; left: 88px;
} }
} }
.cardDetail { .cardDetail {
...@@ -431,18 +435,23 @@ export default { ...@@ -431,18 +435,23 @@ export default {
color: #eb4e4e; color: #eb4e4e;
} }
.address { .address {
display: inline-block;
max-width: 600px;
color: #989898; color: #989898;
} }
} }
} }
.editForm { .editForm {
padding-top: 0px; padding-top: 0px;
.cardNameInput {
width: 423px;
}
} }
} }
.pageTitle { .pageTitle {
position: relative; position: relative;
padding: 0 40px; padding: 0 0px;
height: 20px; height: 20px;
font-size: 20px; font-size: 20px;
font-weight: 700; font-weight: 700;
...@@ -461,7 +470,7 @@ export default { ...@@ -461,7 +470,7 @@ export default {
.el-range-editor--small.el-input__inner { .el-range-editor--small.el-input__inner {
width: 215px; width: 215px;
} }
/deep/.el-input--small .el-input__inner { /deep/ .container .el-input--small .el-input__inner {
width: 215px; width: 215px;
} }
/deep/ .el-dialog__header .el-dialog__title { /deep/ .el-dialog__header .el-dialog__title {
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<div class="live-room"> <div class="live-room">
<div class="live-room container"> <div class="live-room container">
<div class="flex"> <div class="flex">
<el-form :inline="true" style="width:100%" :model="searchForm" label-width="70px" label-position="right"> <el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row> <el-row>
<el-form-item size="small" label="订单编号"> <el-form-item size="small" label="订单编号">
<el-input :size="size" v-model="searchForm.orderCode" placeholder="请输入订单编号" clearable></el-input> <el-input :size="size" v-model="searchForm.orderCode" placeholder="请输入订单编号" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="名称" style="margin-left:20px"> <el-form-item size="small" label="名称" style="margin-left: 20px">
<el-input :size="size" v-model="searchForm.packageName" placeholder="请输入名称" clearable></el-input> <el-input :size="size" v-model="searchForm.packageName" placeholder="请输入名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="类型" style="margin-left:-10px;"> <el-form-item size="small" label="类型" style="margin-left: -10px">
<el-select size="small" v-model="searchForm.orderType" placeholder="请选择"> <el-select size="small" v-model="searchForm.orderType" placeholder="请选择">
<el-option v-for="item in orderTypeList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option> <el-option v-for="item in orderTypeList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select> </el-select>
...@@ -20,23 +20,28 @@ ...@@ -20,23 +20,28 @@
<el-form-item size="small" label="用户信息"> <el-form-item size="small" label="用户信息">
<el-input :size="size" v-model="searchForm.userInfo" placeholder="请输入用户名或手机号" clearable></el-input> <el-input :size="size" v-model="searchForm.userInfo" placeholder="请输入用户名或手机号" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="下单时间" style="margin-left:20px"> <el-form-item size="small" label="下单时间" style="margin-left: 20px">
<el-date-picker :size="size" v-model="searchForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker> <el-date-picker :size="size" v-model="searchForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item size="small" style="float:right"> <el-form-item size="small" style="float: right">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleReset">重置</el-button> <el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<GLTable ref="memberOrderRef" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <div class="choseRow">
<div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index + 1)">
{{ item }}
</div>
</div>
<GLTable ref="memberOrderRef" v-if="isReload" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<!-- <span slot="shareImgUrl" slot-scope="scope"> <!-- <span slot="shareImgUrl" slot-scope="scope">
<img class="img-60" :src="scope.scope.shareImgUrl" /> <img class="img-60" :src="scope.scope.shareImgUrl" />
</span> --> </span> -->
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope"> <span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType==1">详情</el-button> <el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType == 1">详情</el-button>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -49,6 +54,7 @@ import { getOrderListApi } from '@/api/modules/order' ...@@ -49,6 +54,7 @@ import { getOrderListApi } from '@/api/modules/order'
export default { export default {
data() { data() {
return { return {
isReload: true,
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
...@@ -56,10 +62,13 @@ export default { ...@@ -56,10 +62,13 @@ export default {
}, },
size: 'small', size: 'small',
searchForm: { searchForm: {
orderStatus: '' //默认查询全部
// name: '', // name: '',
// daterange:'' // daterange:''
// orderType: '' // orderType: ''
}, },
choseList: ['全部', '待收货', '已完成', '退款|售后'],
currentIndex: 1,
searchFormTable: {}, searchFormTable: {},
orderTypeList: [ orderTypeList: [
{ {
...@@ -86,7 +95,7 @@ export default { ...@@ -86,7 +95,7 @@ export default {
{ {
label: '名称', label: '名称',
prop: 'packageName', prop: 'packageName',
width: '180', width: '180'
// formatter: cellValue => { // formatter: cellValue => {
// return cellValue.startTime + '-' + cellValue.endTime // return cellValue.startTime + '-' + cellValue.endTime
// } // }
...@@ -96,7 +105,7 @@ export default { ...@@ -96,7 +105,7 @@ export default {
prop: 'orderType', prop: 'orderType',
formatter: cellValue => { formatter: cellValue => {
return this.baseDataList.orderTypesList.find(item => item.confId == cellValue.orderType).confName return this.baseDataList.orderTypesList.find(item => item.confId == cellValue.orderType).confName
} }
}, },
{ {
label: '价格', label: '价格',
...@@ -104,8 +113,7 @@ export default { ...@@ -104,8 +113,7 @@ export default {
}, },
{ {
label: '实收金额', label: '实收金额',
prop: 'realPayPrice', prop: 'realPayPrice'
}, },
{ {
label: '订单状态', label: '订单状态',
...@@ -118,11 +126,11 @@ export default { ...@@ -118,11 +126,11 @@ export default {
{ {
label: '下单时间', label: '下单时间',
prop: 'createDate', prop: 'createDate',
width: 95 width: 95
}, },
{ {
label: '用户信息', label: '用户信息',
prop: 'accountName', prop: 'accountName'
}, },
{ {
label: '订单号', label: '订单号',
...@@ -136,7 +144,38 @@ export default { ...@@ -136,7 +144,38 @@ export default {
} }
} }
}, },
methods: { methods: {
tabClick(index) {
this.currentIndex = index
switch (index) {
case 1:
delete this.searchForm['orderStatus[0]']
delete this.searchForm['orderStatus[1]']
delete this.searchForm['orderStatus[2]']
this.searchForm.orderStatus = ''
break
case 2:
delete this.searchForm.orderStatus
delete this.searchForm['orderStatus[1]']
delete this.searchForm['orderStatus[2]']
this.searchForm['orderStatus[0]'] = 2
break
case 3:
delete this.searchForm.orderStatus
delete this.searchForm['orderStatus[1]']
delete this.searchForm['orderStatus[2]']
this.searchForm['orderStatus[0]'] = 3
break
case 4:
delete this.searchForm.orderStatus
this.searchForm['orderStatus[0]'] = 4
this.searchForm['orderStatus[1]'] = 5
this.searchForm['orderStatus[2]'] = 6
break
}
this.handleSearch()
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
...@@ -164,16 +203,28 @@ export default { ...@@ -164,16 +203,28 @@ export default {
handleSearch() { handleSearch() {
this.$refs.memberOrderRef.refreshTable() this.$refs.memberOrderRef.refreshTable()
}, },
setTableFinishFun() {
//接收到的数据为空
if (!this.$refs.memberOrderRef.data.length) {
this.$refs.memberOrderRef.setTableHeightFun()
}
},
handleReset() { handleReset() {
this.isReload = false
this.currentIndex = 1
this.searchForm = {} this.searchForm = {}
this.handleSearch() this.searchForm.orderStatus = '' //默认查询全部
// this.handleSearch()
this.$nextTick(() => {
this.isReload = true
})
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-input--small .el-input__inner{ /deep/.el-input--small .el-input__inner {
width: 215px; width: 215px;
} }
.el-range-editor.is-active, .el-range-editor.is-active,
...@@ -185,4 +236,24 @@ export default { ...@@ -185,4 +236,24 @@ export default {
.el-range-editor--small.el-input__inner { .el-range-editor--small.el-input__inner {
width: 215px; width: 215px;
} }
.container {
.choseRow {
display: flex;
height: 34px;
.choseItem {
width: 120px;
height: 34px;
line-height: 34px;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #333333;
}
.active {
color: #5850ff;
background-color: #f4f6fc;
}
}
}
</style> </style>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<GLTable ref="memberRecordRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberRecordRef" v-if="isReload" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="verificationTime" slot-scope="scope"> <span slot="verificationTime" slot-scope="scope">
<span>{{ dateFormatFun(scope.scope.verificationTime) }}</span> <span>{{ dateFormatFun(scope.scope.verificationTime) }}</span>
</span> </span>
...@@ -53,6 +53,7 @@ export default { ...@@ -53,6 +53,7 @@ export default {
name: 'record', name: 'record',
data() { data() {
return { return {
isReload:true,
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
...@@ -68,7 +69,7 @@ export default { ...@@ -68,7 +69,7 @@ export default {
userReq: '', userReq: '',
verificationOperator: '', verificationOperator: '',
orderCode: '', orderCode: '',
merchantId: 44184606 merchantId: 0
}, },
// 44187877 // 44187877
searchFormTable: {}, searchFormTable: {},
...@@ -115,10 +116,18 @@ export default { ...@@ -115,10 +116,18 @@ export default {
addHtml: 'verificationTime' addHtml: 'verificationTime'
} }
] ]
} },
merchantId: 0
} }
}, },
created () {
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
this.searchForm.merchantId=this.merchantId
}
},
methods: { methods: {
dateFormatFun(date) { dateFormatFun(date) {
return dateFormat(date) return dateFormat(date)
...@@ -143,15 +152,7 @@ export default { ...@@ -143,15 +152,7 @@ export default {
this.$refs.memberRecordRef.setTableHeightFun() this.$refs.memberRecordRef.setTableHeightFun()
} }
}, },
// handleShare(row) {
// getLiveShareApi({ id: row.id }).then(res => {
// console.log(res)
// this.isShareVisible = !this.isShareVisible
// this.shareForm = res
// })
// },
handleShareClose() { handleShareClose() {
// this.handleShare()
this.isShareVisible = !this.isShareVisible this.isShareVisible = !this.isShareVisible
}, },
...@@ -186,8 +187,13 @@ export default { ...@@ -186,8 +187,13 @@ export default {
this.$refs.memberRecordRef.refreshTable() this.$refs.memberRecordRef.refreshTable()
}, },
handleReset() { handleReset() {
this.searchForm = { merchantId: 44184606 } // this.searchForm = { merchantId: 44184606 }
this.handleSearch() // this.handleSearch()
this.isReload=false
this.searchForm={ merchantId: this.merchantId }
this.$nextTick(()=>{
this.isReload=true
})
} }
} }
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<GLTable ref="memberServiceRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable v-if="isReload" ref="memberServiceRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="effectiveType" slot-scope="scope"> <span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span> <span>{{ toLabelText(scope.scope) }}</span>
</span> </span>
...@@ -57,13 +57,15 @@ export default { ...@@ -57,13 +57,15 @@ export default {
}, },
data() { data() {
return { return {
isReload:true,
isFirstShow: false, isFirstShow: false,
panelContent: '会员服务:是由门店根据自店服务项目创建的线上服务券,如“一年十二次洗车券”、“陶瓷镀膜”等,客户购买后可到店出示服务券享受服务,门店扫码进行次数核销。', panelContent: '会员服务:是由门店根据自店服务项目创建的线上服务券,如“一年十二次洗车券”、“陶瓷镀膜”等,客户购买后可到店出示服务券享受服务,门店扫码进行次数核销。',
size: 'small', size: 'small',
getListApi: getServiceListApi, getListApi: getServiceListApi,
searchForm: { searchForm: {
couponName: '', couponName: '',
merchantId: 44184606 merchantId: 44184606,
discountType:7//6:商品折扣券,7:会员服务
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数 // 表格参数
...@@ -126,6 +128,7 @@ export default { ...@@ -126,6 +128,7 @@ export default {
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中 //运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId this.merchantId = this.$globalState.session.merchantId
this.searchForm.merchantId=this.merchantId
} }
this.getLoginCountFun() this.getLoginCountFun()
}, },
...@@ -162,14 +165,19 @@ export default { ...@@ -162,14 +165,19 @@ export default {
}, },
handleReset() { handleReset() {
this.searchForm = { couponName: '', merchantId: 44184606 } this.isReload=false
this.handleSearch() this.searchForm = { couponName: '', merchantId: this.merchantId, discountType:7 }
// this.handleSearch()
this.$nextTick(()=>{
this.isReload=true
})
}, },
handleSearch() { handleSearch() {
this.$refs.memberServiceRef.refreshTable() this.$refs.memberServiceRef.refreshTable()
}, },
setTableFinishFun(content) { setTableFinishFun(content) {
console.log(content, this.$refs.memberServiceRef.data.length, '获取数据') // console.log(content, this.$refs.memberServiceRef.data.length, '获取数据')
//接收到的数据为空 //接收到的数据为空
if (!this.$refs.memberServiceRef.data.length) { if (!this.$refs.memberServiceRef.data.length) {
this.$refs.memberServiceRef.setTableHeightFun() this.$refs.memberServiceRef.setTableHeightFun()
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
</div> </div>
<div class="live-room container"> <div class="live-room container">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
<el-form-item size="small" label="服务名称" prop="couponName" style="width: 420px"> <el-form-item size="small" label="服务名称" prop="couponName" style="width: 440px">
<el-input size="small" :disabled="disabledContent" v-model.trim="ruleForm.couponName" maxlength="20" placeholder="请输入服务名称,如“精洗轿车”"></el-input> <el-input size="small" :disabled="disabledContent" v-model.trim="ruleForm.couponName" maxlength="20" placeholder="请输入服务名称,如“精洗轿车”"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="有效期" prop="effectiveType"> <el-form-item size="small" label="有效期" prop="effectiveType">
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
<el-button type="primary" @click="goBack" size="small">取消</el-button> <el-button type="primary" @click="goBack" size="small">取消</el-button>
</div> </div>
<!-- :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" --> <!-- :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" -->
<glsx-dialog title="" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm"> <glsx-dialog title="" :hasScroll="false" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<div class="content-body"> <div class="content-body">
当前有内容信息未保存,是否继续取消 当前有内容信息未保存,是否继续取消
</div> </div>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<el-button :size="size" type="primary" @click="handleCreate" icon="el-icon-plus">创建套餐</el-button> <el-button :size="size" type="primary" @click="handleCreate" icon="el-icon-plus">创建套餐</el-button>
<el-button :size="size" @click="isDialogVisible = true">查看示例效果</el-button> <el-button :size="size" @click="isDialogVisible = true">查看示例效果</el-button>
</div> </div>
<GLTable ref="memberSetMealRef" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberSetMealRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="list" slot-scope="scope"> <span slot="list" slot-scope="scope">
<div v-for="(item, index) in scope.scope.list" :key="index">{{ item.couponName }}×{{ item.serviceQuantity }}</div> <div v-for="(item, index) in scope.scope.list" :key="index">{{ item.couponName }}×{{ item.serviceQuantity }}</div>
</span> </span>
...@@ -26,21 +26,17 @@ ...@@ -26,21 +26,17 @@
</span> </span>
</GLTable> </GLTable>
</div> </div>
<!-- btnCancelLabel="关闭" --> <!-- btnCancelLabel="关闭" -->
<glsx-dialog title="示例效果" width="1142px" :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose"> <glsx-dialog title="示例效果" width="1142px" :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="content-body"> <div class="content-body">
<div class="content-item col1"> <div class="content-item col1">
<div class="subTitle"> <div class="subTitle">1、管理后台先创建套餐</div>
1、管理后台先创建套餐
</div>
<div class="imageWrap"> <div class="imageWrap">
<img src="@/assets/table.png" alt="" /> <img src="@/assets/table.png" alt="" />
</div> </div>
</div> </div>
<div class="content-item col2"> <div class="content-item col2">
<div class="subTitle"> <div class="subTitle">2、小程序端进行展示</div>
2、小程序端进行展示
</div>
<div class="twoImageWrap"> <div class="twoImageWrap">
<img src="@/assets/card1.png" alt="" /> <img src="@/assets/card1.png" alt="" />
<img src="@/assets/card2.png" alt="" /> <img src="@/assets/card2.png" alt="" />
...@@ -120,11 +116,11 @@ export default { ...@@ -120,11 +116,11 @@ export default {
isDialogVisible: false isDialogVisible: false
} }
}, },
created () { created() {
this.getLoginCountFun() this.getLoginCountFun()
}, },
methods: { methods: {
getLoginCountFun() { getLoginCountFun() {
//loginType:5是查会员套餐浏览次数 //loginType:5是查会员套餐浏览次数
getLoginCount({ loginType: 5 }).then(res => { getLoginCount({ loginType: 5 }).then(res => {
//获取是否第一次点击该页面 //获取是否第一次点击该页面
...@@ -143,6 +139,13 @@ export default { ...@@ -143,6 +139,13 @@ export default {
handleSearch() { handleSearch() {
this.$refs.memberSetMealRef.refreshTable() this.$refs.memberSetMealRef.refreshTable()
}, },
setTableFinishFun() {
//接收到的数据为空
if (!this.$refs.memberSetMealRef.data.length) {
this.$refs.memberSetMealRef.setTableHeightFun()
}
},
//创建套餐 //创建套餐
handleCreate() { handleCreate() {
this.$router.push('/memberCenter/setmealAddUpdate') this.$router.push('/memberCenter/setmealAddUpdate')
...@@ -222,19 +225,18 @@ export default { ...@@ -222,19 +225,18 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
} }
/deep/ .el-dialog__header { /deep/ .el-dialog__header {
.main-title{ .main-title {
font-size: 16px; font-size: 16px;
font-weight: 700; font-weight: 700;
color: #000000; color: #000000;
} }
} }
/deep/ .el-dialog__body { /deep/ .el-dialog__body {
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
padding: 20px 25px; padding: 20px 25px;
.content-body { .content-body {
display: flex; display: flex;
...@@ -249,13 +251,14 @@ export default { ...@@ -249,13 +251,14 @@ export default {
font-weight: 700; font-weight: 700;
color: #000000; color: #000000;
} }
.imageWrap,.twoImageWrap{ .imageWrap,
margin-left: 25px; .twoImageWrap {
img{ margin-left: 25px;
border: 1.5px solid rgba(0, 0, 0, 0.03); img {
box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.03); border: 1.5px solid rgba(0, 0, 0, 0.03);
box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.03);
} }
img+img{ img + img {
margin-left: 22px; margin-left: 22px;
} }
} }
......
<template> <template>
<div class="live-room"> <div class="live-room">
<div class="topMsg"> <div class="topMsg">
<p class="pageTitle">创建套餐</p> <p class="pageTitle" v-if="!id">创建套餐</p>
<p class="pageTitle" v-else>编辑套餐</p>
<el-button type="primary" size="small" @click="goBack">返回</el-button> <el-button type="primary" size="small" @click="goBack">返回</el-button>
</div> </div>
<div class="live-room container"> <div class="live-room container">
<el-form ref="ruleForm" :rules="rules" :model="ruleForm" label-width="120px" class="demo-ruleForm"> <el-form ref="ruleForm" :rules="rules" :model="ruleForm" label-width="120px" class="demo-ruleForm">
<el-form-item size="small" label="套餐名称" prop="packageName" style="width: 420px"> <el-form-item size="small" label="套餐名称" prop="packageName" style="width: 440px">
<el-input size="small" v-model="ruleForm.packageName" placeholder="请输入套餐名称"></el-input> <el-input size="small" v-model="ruleForm.packageName" maxlength="20" placeholder="请输入套餐名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="套餐内容" class="is-required"> <el-form-item size="small" label="套餐内容" class="is-required">
<el-button @click="openDialog" size="small" icon="el-icon-plus">选择服务</el-button> <el-button @click="openDialog" size="small" icon="el-icon-plus">选择服务</el-button>
...@@ -46,6 +47,7 @@ ...@@ -46,6 +47,7 @@
<el-button type="primary" @click="submitForm('ruleForm')" size="small">创建</el-button> <el-button type="primary" @click="submitForm('ruleForm')" size="small">创建</el-button>
<el-button type="primary" @click="goBack" size="small">取消</el-button> <el-button type="primary" @click="goBack" size="small">取消</el-button>
</div> </div>
<!-- :modalAppendToBody="false" -->
<glsx-dialog title="套餐服务" class="setmealServiceDialog" width="1142px" :noCancel="true" :noClose="false" btnSize="small" :isVisible="setmealDialogVisible" @closeDialog="handleClose" @confirmDialog="handleConfirm"> <glsx-dialog title="套餐服务" class="setmealServiceDialog" width="1142px" :noCancel="true" :noClose="false" btnSize="small" :isVisible="setmealDialogVisible" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<div class="content-body"> <div class="content-body">
<div class="subTitle"> <div class="subTitle">
...@@ -95,7 +97,7 @@ ...@@ -95,7 +97,7 @@
</div> </div>
</div> </div>
</glsx-dialog> </glsx-dialog>
<glsx-dialog title="" class="tipDialog" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isTipDialogVisible" :showClose="false" @closeDialog="handleTipClose" @confirmDialog="handleTipConfirm"> <glsx-dialog title="" :hasScroll="false" class="tipDialog" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isTipDialogVisible" :showClose="false" @closeDialog="handleTipClose" @confirmDialog="handleTipConfirm">
<div class="content-body">当前有内容信息未保存,是否继续返回</div> <div class="content-body">当前有内容信息未保存,是否继续返回</div>
</glsx-dialog> </glsx-dialog>
</div> </div>
...@@ -144,10 +146,13 @@ export default { ...@@ -144,10 +146,13 @@ export default {
this.merchantId = this.$globalState.session.merchantId this.merchantId = this.$globalState.session.merchantId
this.merchantName = this.$globalState.session.merchantName this.merchantName = this.$globalState.session.merchantName
} }
this.getSetmealServiceFun()
if (this.id) { // if (this.id) {
this.getServiceInfo() //获取编辑详情 this.getSetmealServiceFun() //获取服务套餐,执行完了之后去获取编辑详情
}
// }else{
// this.getSetmealServiceFun()
// }
}, },
watch: { watch: {
// allItemList: { // allItemList: {
...@@ -190,6 +195,15 @@ export default { ...@@ -190,6 +195,15 @@ export default {
this.ruleForm = res.data this.ruleForm = res.data
this.choseItemList = res.data.list || [] this.choseItemList = res.data.list || []
this.totalPrice = res.data.referencePrice this.totalPrice = res.data.referencePrice
this.choseItemList.forEach(item => {
for (let i = 0; i < this.allItemList.length; i++) {
if (item.serviceId == this.allItemList[i].id) {
item.vipPrice = this.allItemList[i].vipPrice
}
}
})
this.copyTotalPrice = this.totalPrice this.copyTotalPrice = this.totalPrice
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据 this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据
this.copyChoseItemList = this.choseItemList this.copyChoseItemList = this.choseItemList
...@@ -211,6 +225,10 @@ export default { ...@@ -211,6 +225,10 @@ export default {
serviceQuantity: 0 serviceQuantity: 0
} }
}) })
if (this.id) {
this.getServiceInfo() //获取编辑详情
}
}) })
}, },
//选中该条服务套餐 //选中该条服务套餐
...@@ -502,141 +520,158 @@ export default { ...@@ -502,141 +520,158 @@ export default {
z-index: 999; z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
} }
/deep/.el-dialog__headerbtn { .setmealServiceDialog {
background-color: #d9e0f5; /deep/.el-dialog__headerbtn {
width: 25px; background-color: #d9e0f5;
height: 25px; width: 25px;
border-radius: 50%; height: 25px;
border-radius: 50%;
.el-dialog__close { .el-dialog__close {
color: #5850ff; color: #5850ff;
font-weight: bold; font-weight: bold;
}
} }
} /deep/ .el-dialog__header .el-dialog__title {
/deep/ .el-dialog__header .el-dialog__title { font-size: 16px;
font-size: 16px;
font-weight: 700; font-weight: 700;
color: #000000; color: #000000;
} }
/deep/ .el-dialog__body { /deep/ .el-dialog__body {
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
padding: 0px 25px; padding: 0px 25px;
.content-body { .content-body {
max-height: 446px; max-height: 446px;
.subTitle { .subTitle {
margin-top: 20px; margin-top: 20px;
margin-bottom: 20px; margin-bottom: 20px;
span:first-child { span:first-child {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
color: #000000; color: #000000;
} }
span:last-child { span:last-child {
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #5850ff; color: #5850ff;
cursor: pointer; cursor: pointer;
}
} }
} .itemWrap {
.itemWrap { display: grid;
display: grid; grid-template-columns: repeat(4, 1fr);
grid-template-columns: repeat(4, 1fr); .item {
.item { .itemBox {
.itemBox { margin-bottom: 10px;
margin-bottom: 10px; width: 240px;
width: 240px; height: 132px;
height: 132px; border-radius: 4px;
border-radius: 4px; border: 2px solid #e6e6e6;
border: 2px solid #e6e6e6; &:hover {
&:hover { border: 2px solid #5850ff;
border: 2px solid #5850ff; cursor: pointer;
cursor: pointer; }
} div {
div { text-align: center;
text-align: center; margin-bottom: 5px;
margin-bottom: 5px; }
} .name {
.name { margin-top: 15px;
margin-top: 15px; font-size: 18px;
font-size: 18px;
font-weight: 700; font-weight: 700;
color: #333333; color: #333333;
} }
.price { .price {
font-size: 24px; font-size: 24px;
font-weight: 700; font-weight: 700;
color: #ff5151; color: #ff5151;
> span { > span {
font-size: 16px; font-size: 16px;
}
} }
} .effectiveRange,
.effectiveRange, .useTime {
.useTime { font-size: 12px;
font-size: 12px;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
}
} }
} .s-checkd {
.s-checkd { border: 2px solid #5850ff;
border: 2px solid #5850ff;
}
.optionBtns {
text-align: center;
margin: 0 0 25px;
width: 240px;
.numWrap {
display: inline-block;
background-color: #fff;
border-radius: 3px;
border: 1px solid #e8e8ea;
min-width: 34px;
height: 22px;
text-align: center;
line-height: 22px;
margin: 0 2px;
padding: 1px 0;
} }
.addsubBtn { .optionBtns {
background-color: #fff; text-align: center;
color: #5850ff; margin: 0 0 25px;
padding: 5px 9px; width: 240px;
.numWrap {
display: inline-block;
background-color: #fff;
border-radius: 3px;
border: 1px solid #e8e8ea;
min-width: 34px;
height: 22px;
text-align: center;
line-height: 22px;
margin: 0 2px;
padding: 1px 0;
}
.addsubBtn {
background-color: #fff;
color: #5850ff;
padding: 5px 9px;
}
} }
} }
} }
} .amountTo {
.amountTo { margin-top: 17px;
margin-top: 17px; margin-bottom: 28px;
margin-bottom: 28px; text-align: center;
text-align: center; .bottomText {
.bottomText { font-size: 16px;
font-size: 16px; font-weight: 400;
font-weight: 400; color: #000000;
color: #000000; }
} .smallRedText {
.smallRedText { font-size: 16px;
font-size: 16px; color: #ff5151;
color: #ff5151; }
} .redText {
.redText { font-size: 24px;
font-size: 24px; font-family: PingFangSC-Medium, PingFang SC;
font-family: PingFangSC-Medium, PingFang SC; font-weight: 500;
font-weight: 500; color: #ff5151;
color: #ff5151; }
} }
} }
} }
/deep/ .el-dialog__footer {
text-align: center;
.el-button + .el-button {
margin-left: 40px;
}
}
} }
/deep/ .el-dialog__footer { .tipDialog {
text-align: center; /deep/ .el-dialog__body {
.el-button + .el-button { border-bottom: 1px solid #e6e6e6;
margin-left: 40px; padding: 20px 25px;
.content-body {
font-size: 18px;
text-align: center;
font-weight: 400;
color: #333333;
}
}
/deep/ .el-dialog__footer {
text-align: center;
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!