Commit 507fe535 by 王志慧 Committed by chenwq

feat:会员权益(会员中心,会员套餐,会员订单)

1 parent bc1dd45c
......@@ -4,8 +4,8 @@ import { http } from '@/main'
const getCenterListApi = params => {
// params.method = `${defaultPath}goods.list`
params.method = `scrm.api.equity.card.merchant.record.get`
// params.method = `scrm.api.equity.card.merchant.record.get`
params.method = `scrm.api.equity.card.merchant.record.page`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
......@@ -48,9 +48,11 @@ const updateCardContent = params => {
}
const memberExportApi = params => {
params.method = `scrm.api.equity.card.merchant.record.export`
// params.method = `scrm.api.equity.card.merchant.record.export`
params.method = `scrm.api.equity.card.merchant.record.page.export`
return http({
url: 'rop-scrm-equity/router',
url: '/rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
......
......@@ -77,7 +77,8 @@ const exportGiftInfoApi = params => {
// 编辑-选择定向礼包列表
const getDirectionalGiftListApi = params => {
params.method = 'scrm.api.coupon.directional.gift.coupon.list'
// params.method = 'scrm.api.coupon.directional.gift.coupon.list'
params.method = 'scrm.api.coupon.gh.group.equity.coupon.list'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
......
......@@ -3,9 +3,8 @@ import { http } from '@/main'
// const defaultPath = 'scrm.api.live.'
const getOrderListApi = params => {
// params.method = `${defaultPath}goods.list`
params.method = `scrm.api.equity.merchant.order.list.with.page`
// params.method = `scrm.api.equity.merchant.order.list.with.page`
params.method = 'scrm.api.equity.merchant.order.gh.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
......@@ -34,4 +33,25 @@ const orderExportApi = params => {
sign: true
})
}
export { getOrderListApi, getOrderPageDetail, orderExportApi }
// 门店订单申请退款
const orderRefund = params => {
params.method = 'scrm.api.equity.merchant.order.refund'
return http({
url: '/rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
//套餐使用详情
const getCouponList = params => {
params.method = 'scrm.api.equity.merchant.order.package.coupon.list'
return http({
url: '/rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
export { getOrderListApi, getOrderPageDetail, orderExportApi ,orderRefund,getCouponList}
......@@ -4,18 +4,31 @@ import { http } from '@/main'
const getSetMealListApi = params => {
// params.method = `${defaultPath}goods.list`
params.method = `scrm.api.equity.package.info.list.with.page`
// params.method = `scrm.api.equity.package.info.list.with.page`//旧
params.method = `scrm.api.equity.package.gh.list.with.page`
return http({
url: 'rop-scrm-equity/router',
url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getSetMealstoreListApi = params => {
// params.method = `${defaultPath}goods.list`
params.method = `scrm.api.equity.package.info.list.with.page`//旧
return http({
url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//
const deleteSetMeal = params => {
params.method = `scrm.api.equity.package.info.delete`
// params.method = `scrm.api.equity.package.info.delete`
params.method = `scrm.api.equity.package.gh.delete`
return http({
url: 'rop-scrm-equity/router',
url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
......@@ -26,7 +39,7 @@ const deleteSetMeal = params => {
const getSetmealService = params => {
params.method = `scrm.api.coupon.list.merchant`
return http({
url: 'rop-scrm-coupon/router',
url: '/rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
......@@ -88,4 +101,18 @@ const upDownPackage = params => {
returnAll: true
})
}
export { getSetMealListApi, deleteSetMeal, getSetmealService, getServiceInfo, createSetMeal, upDownPackage, updateSetMeal, configSetMeal }
//置顶推荐
const updateToTop = params=>{
params.method = `scrm.api.equity.package.gh.updateToTop`
return http({
url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export { getSetMealListApi,getSetMealstoreListApi, deleteSetMeal, getSetmealService, getServiceInfo, createSetMeal, upDownPackage, updateSetMeal, configSetMeal ,updateToTop}
......@@ -139,7 +139,7 @@ html {
}
.marketing .color-transparent {
background-color: transparent;
background-color: transparent;
}
.marketing .default-blue-btn {
......@@ -157,26 +157,26 @@ html {
}
.marketing .table-title {
line-height: 32px;
line-height: 32px;
}
.marketing .table-cicle {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 4px;
display: inline-block;
width: 6px;
height: 6px;
border-radius: 4px;
}
.marketing .back-orange {
background-color: #FDB757;
background-color: #fdb757;
}
.marketing .back-blue {
background-color: #5850ff;
background-color: #5850ff;
}
.marketing .back-grey {
background-color: #999999;
background-color: #999999;
}
.marketing .back-green {
......@@ -263,6 +263,9 @@ html {
.marketing .m-t-10 {
margin-top: 10px;
}
.marketing .m-t-20 {
margin-top: 20px;
}
.marketing .m-b-8 {
margin-bottom: 8px;
}
......@@ -283,7 +286,7 @@ html {
}
.marketing .m-r-8 {
margin-right: 8px;
margin-right: 8px;
}
.marketing .m-r-10 {
......@@ -332,7 +335,9 @@ html {
.marketing .txt-grey {
color: #999999;
}
.marketing .text-e8{
color: #EB4E4E!important;
}
.marketing .txt-center {
text-align: center;
}
......@@ -392,7 +397,7 @@ html {
}
.marketing .flex-between {
display: flex;
justify-content:space-between;
justify-content: space-between;
align-items: center;
}
.marketing .flex-grow {
......@@ -542,6 +547,9 @@ html {
.marketing .text-14 {
font-size: 14px;
}
.marketing .text-16 {
font-size: 16px;
}
.marketing .color-3 {
color: #333333;
}
......@@ -554,4 +562,17 @@ html {
.marketin .weight-4 {
font-weight: 400;
}
.el-tooltip__popper.is-light {
background: #ffffff;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08);
border: 1px solid #e4e7ed!important;
width: 177px;
box-sizing: border-box;
}
.el-tooltip__popper[x-placement^="top"] .popper__arrow {
border-top-color: #e4e7ed !important;
}
.el-tooltip__popper[x-placement^="top"] .popper__arrow:after {
border-top-color: #e4e7ed !important;
}
/* tab */

18.1 KB | W: | H:

108 KB | W: | H:

src/assets/memberCard.png
src/assets/memberCard.png
src/assets/memberCard.png
src/assets/memberCard.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<div class="el-descriptions">
<div class="el-descriptions__body">
<table class="el-descriptions__table is-bordered">
<tbody v-for="(item, index) in tableModel" :key="index">
<tr class="el-descriptions-row">
<template v-for="(trTtem, idx) in item.colList">
<th :key="idx" :colspan="trTtem.thColspan" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label">{{ trTtem.label }}</th>
<td :key="idx" :colspan="trTtem.tdColspan" class="el-descriptions-item__cell el-descriptions-item__content" :style="{ color: trTtem.color }">
<slot v-if="trTtem.addHtml" :name="trTtem.addHtml" :scope="list"></slot>
<span v-else>
{{ list[trTtem.name] ? list[trTtem.name] : ' — ' }}
</span>
</td>
</template>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
export default {
name: 'ylDescriptions',
props: {
tableModel: {
type: Array,
default: () => []
},
showData: {
type: Object,
default: () => {}
}
},
computed: {
list() {
return this.showData
}
}
}
</script>
<style lang="scss" scoped>
.el-descriptions .is-bordered {
table-layout: auto;
}
.el-descriptions__body .el-descriptions__table {
border-collapse: collapse;
table-layout: fixed;
}
.el-descriptions :not(.is-bordered) .el-descriptions-item__cell {
padding-bottom: 12px;
}
.el-descriptions .is-bordered .el-descriptions-item__cell {
border: 1px solid #ebeef5;
padding: 12px 10px;
}
.el-descriptions-item__label.is-bordered-label {
font-weight: 700;
color: #333333;
background: #f4f6fc;
}
.el-descriptions :not(.is-bordered) .el-descriptions-item__cell {
padding-bottom: 12px;
}
.el-descriptions .is-bordered .el-descriptions-item__cell {
border: 1px solid #e8e8ea;
padding: 7px 10px;
}
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell {
box-sizing: border-box;
text-align: left;
font-weight: 400;
line-height: 1.5;
width: 118px;
vertical-align: middle;
font-size: 14px;
}
.el-descriptions-item__content {
word-break: break-word;
overflow-wrap: break-word;
min-width: 238px;
}
</style>
<template>
<div>
<template v-if="rowParams.length > 0">
<div class="layout-wrap">
<el-row :gutter="30">
<template v-for="(params, index) in rowParams">
<!-- <template v-if="params.isHidden && params.isHidden(list)">
<el-col :span="params.span" :key="index">
<div class="label-wrap">
<label>{{ params.label }}</label>
<slot v-if="params.addHtml" :name="params.addHtml" :scope="list"></slot>
<span v-else>
{{ list[params.prop] }}
</span>
</div>
</el-col>
</template> -->
<template>
<el-col :span="params.span" :key="index">
<div class="label-wrap">
<label>{{ params.label }}</label>
<slot v-if="params.addHtml" :name="params.addHtml" :scope="list"></slot>
<span v-else>
{{ list[params.prop] }}
</span>
</div>
</el-col>
</template>
</template>
</el-row>
</div>
</template>
</div>
</template>
<script>
export default {
name: 'glsx-rows',
data() {
return {
list: '',
rowParams: ''
}
},
props: {
//获取的数据
layoutData: {
type: Object,
default: () => {}
},
layoutParams: {
type: Array,
default: () => []
}
},
watch: {
layoutData(val) {
this.list = val
let { layoutParams } = this
for (let i = 0; i < layoutParams.length; i++) {
if (layoutParams[i].isHidden && !layoutParams[i].isHidden(val)) {
layoutParams.splice(i--, 1)
}
}
this.rowParams = layoutParams
}
},
created() {}
}
</script>
<style scoped lang="scss">
.layout-wrap {
.el-row {
&:last-child {
margin-bottom: -20px;
}
.el-col {
margin-bottom: 20px;
}
.label-wrap {
display: flex;
align-items: center;
min-width: 80%;
label {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
text-align: right;
min-width: 70px;
display: inline-block;
}
span {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
text-align: left;
// max-width: 228px;
// white-space: nowrap;
// overflow: hidden;
// text-overflow: ellipsis;
// display: inline-block;
}
}
}
}
</style>
......@@ -15,6 +15,8 @@ import selectSingleProDialog from '@/components/selectSingleProDialog/index.vue'
import relateStoreDialog from '@/components/relate-store-dialog'
import selectMutiProForcouponDialog from '@/components/selectMutiProDialog/indexForCoupon.vue'
import tableTooltip from '@/components/table-tooltip/index.vue'
import glsxRows from '@/components/glsx-rows/index.vue'
import glsxDescriptions from '@/components/glsx-descriptions/index.vue'
Vue.component('glsx-combi-form', glsxCombiForm)
Vue.component('glsx-dialog', glsxDialog)
......@@ -23,3 +25,5 @@ Vue.component('select-single-pro-dialog', selectSingleProDialog)
Vue.component('relate-store-dialog', relateStoreDialog)
Vue.component('select-muti-pro-forcoupon-dialog', selectMutiProForcouponDialog)
Vue.component('table-tooltip', tableTooltip)
Vue.component('glsx-rows', glsxRows)
Vue.component('glsx-descriptions', glsxDescriptions)
......@@ -329,6 +329,7 @@ export default {
this.editForm.couponList.forEach(item => {
this.couponObj[this.numToCoupon[item.discountType]].list.push(item)
})
console.log(this.couponObj,'this.couponObj')
this.currentCoupons = this.$common.utils.deepClone(this.editForm.couponList)
this.currentPeople = this.$common.utils.deepClone(this.editForm.staffList)
this.hasCouponBlock(false)
......
<template>
<div class="live-room">
<div class="marketing live-room">
<div class="memberCardWrap" v-if="!(merchantModel == 2 && accountLevel == 1)">
<div class="cardBoxWrap">
<img src="@/assets/memberCard.png" alt="" />
<div class="masonry">
<!-- <div class="masonry">
<img src="@/assets/masonry.png" alt="" />
</div>
</div> -->
<div class="memberCardName">{{ ruleForm.cardName }}</div>
</div>
<div class="cardDetail" v-if="!isShowEditWrap">
<div class="flex-1">
<p>{{ ruleForm.cardName }}</p>
<p>
{{ ruleForm.cardName }}
<el-tooltip content="会员已包含基础权益:生活权益、商城折扣" effect="light" placement="top">
<img class="icon-circle-question" src="@/assets/icon-circle-question.png" alt="" @click="isshow = true" />
</el-tooltip>
</p>
<GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon" @click="openEditWrap" alt="" /></GLButton>
</div>
<!-- <img src="@/assets/edit.png" class="editIcon" @click="openEditWrap" alt="" /> -->
<div class="row">
<span>售价:</span>
<span class="price" v-if="ruleForm.price">¥{{ ruleForm.price }}</span>
<span class="price text-e8" v-if="ruleForm.price">¥{{ ruleForm.price }}</span>
</div>
<div class="row">
<span>市场价:</span>
......@@ -31,7 +36,7 @@
<span>会员卡试用:</span>
<span class="membershipDays" v-if="ruleForm.tryAble == 1">{{ ruleForm.tryNum }}天试用</span>
<span class="membershipDays" v-else>已关闭</span>
<span class="lookQR" @click="extensionQR" v-if="ruleForm.tryAble == 1">查看小程序推广码</span>
<span class="lookQR" @click="extensionQR" v-if="ruleForm.tryAble == 1">生成小程序码推广码></span>
<!-- <el-button class="lookQR" size="small" type="primary" @click="extensionQR" v-if="ruleForm.tryAble==1">生成小程序推广码</el-button> -->
</div>
<el-button class="seeEquity" size="small" type="primary" @click="openDialog">查看权益</el-button>
......@@ -78,9 +83,9 @@
</div>
</div>
</div>
<p class="pageTitle" v-if="!(merchantModel == 2 && accountLevel == 1)">会员中心</p>
<div class="live-room container">
<!-- <div class="pageTitle" v-if="!(merchantModel == 2 && accountLevel == 1)">会员用户</div> -->
<div class="pageTitle">会员用户</div>
<div class="live-room container p-t-20 ">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row>
<el-form-item size="small" label="会员用户">
......@@ -111,12 +116,19 @@
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
<el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item>
</el-row>
</el-form>
<div class="flex-between m-b-10 m-t-10">
<div class="text-16 color-3 weight-5">会员列表</div>
<div class="export" @click="handleExport">全部导出</div>
</div>
<GLTable ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="cardInfo" slot-scope="scope">
<GLTable ref="cardListRef" :hasNum="false" :hasPage="false" :noDataImg="url" :tableParams="cardParams" :tableData="scope.scope.list"></GLTable>
</div>
<span slot="accountName" slot-scope="scope">
<div>{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div>
......@@ -184,6 +196,11 @@ import glsxDialog from '@/components/glsx-dialog'
import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi, getQrUrl } from '@/api/modules/center'
import { statusList, memberTypeList, exportFn } from '@/common/constant'
export default {
filters: {
filterTable(list, data) {
return data
}
},
components: {
glsxDialog
},
......@@ -278,21 +295,39 @@ export default {
tableOption: false,
tableColumns: [
{
label: '',
prop: '',
columnattrs: {
type: 'expand'
},
addHtml: 'cardInfo'
},
{
label: '会员用户',
prop: 'accountName',
width: '180',
addHtml: 'accountName'
// formatter: cellValue => {
// return cellValue.startTime + '-' + cellValue.endTime
// }
},
// {
// label: '会员类型',
// prop: 'memberType',
// formatter: cellValue => {
// return this.baseDataList.memberTypeList.find(item => item.confId == cellValue.memberType).confName
// }
// },
{
label: '会员类型',
prop: 'memberType',
label: '状态',
prop: 'status',
formatter: cellValue => {
return this.baseDataList.memberTypeList.find(item => item.confId == cellValue.memberType).confName
return this.baseDataList.statusList.find(item => item.confId == cellValue.memberStatus).confName
}
},
}
]
},
cardParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '开通门店',
prop: 'merchantName'
......@@ -304,14 +339,6 @@ export default {
{
label: '开通日期',
prop: 'activeTime'
// addHtml: 'activeTime'
},
{
label: '状态',
prop: 'status',
formatter: cellValue => {
return this.baseDataList.statusList.find(item => item.confId == cellValue.status).confName
}
}
]
},
......@@ -536,7 +563,7 @@ export default {
</script>
<style lang="scss" scoped>
/deep/ .el-input-number--small{
/deep/ .el-input-number--small {
width: 53px;
margin: 0 3px;
}
......@@ -587,13 +614,17 @@ export default {
.memberCardWrap {
display: flex;
background-color: #fff;
height: 172px;
height: 190px;
box-sizing: border-box;
margin: 20px 0px;
padding: 15px 20px;
margin-top: 20px;
padding: 10px 8px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1);
.cardBoxWrap {
position: relative;
img {
width: 321px;
height: 174px;
}
.masonry {
position: absolute;
top: 40px;
......@@ -601,11 +632,13 @@ export default {
}
.memberCardName {
position: absolute;
font-size: 15px;
color: #8e5310;
font-weight: 700;
top: 54px;
left: 88px;
font-size: 17px;
font-weight: 600;
color: #ffd690;
line-height: 24px;
background: radial-gradient(125deg, #fde8bf 0%, #dda15f 100%);
top: 116px;
margin: 0 28px;
}
}
.cardDetail {
......@@ -614,6 +647,11 @@ export default {
padding-top: 8px;
margin-left: 10px;
position: relative;
.icon-circle-question {
width: 16px;
height: 16px;
}
.seeEquity {
position: absolute;
right: 0;
......@@ -637,9 +675,10 @@ export default {
bottom: 0;
}
.editIcon {
margin-left: 10px;
margin-left: 6px;
vertical-align: middle;
cursor: pointer;
width: 12.8px;
}
.flex-1 {
display: flex;
......@@ -679,14 +718,28 @@ export default {
.pageTitle {
position: relative;
padding: 0 0px;
height: 20px;
font-size: 20px;
font-weight: 700;
padding: 15px 20px;
margin-bottom: -20px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
line-height: 28px;
border-bottom: 1px solid #d8d8d8;
background-color: #fff;
margin-top:20px;
}
.export {
height: 32px;
border-radius: 4px;
border: 1px solid #5850ff;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 14px;
padding: 9px 20px;
box-sizing: border-box;
}
.el-form-item {
margin-bottom: 15px;
}
......
<template>
<div>
<template v-for="(item, index) in orderShow">
<div class="flex-top m-b-8" v-show="coupontData[item].list.length" :key="index">
<div class="content-meal-logo" :key="item.discountType">
<img :src="coupontData[item].logo" alt="" />
</div>
<div class="flex-align content-meal-list">
<template v-for="(subItem, subIndex) in coupontData[item].list">
<div class="every color-3 text-14 weight-4 line-20" :key="subIndex">{{ subItem.couponName }} × {{ subItem.serviceQuantity }}</div>
</template>
</div>
</div>
</template>
</div>
</template>
<script>
export default {
data() {
return {
orderShow: ['service', 'cash', 'discount', 'exchange'],
couponObj: {
// 折扣券
discount: {
label: '折扣券',
discountType: 2,
list: [],
logo: require('../../../assets/coupon/icon-discount.png')
},
// 代金券
cash: {
label: '代金券',
discountType: 3,
list: [],
logo: require('../../../assets/coupon/icon-cash.png')
},
// 兑换券
exchange: {
label: '兑换券',
discountType: 4,
list: [],
logo: require('../../../assets/coupon/icon-exchange.png')
},
service: {
label: '会员服务',
discountType: 7,
list: [],
logo: require('../../../assets/coupon/icon-service.png')
}
},
numToCoupon: {
2: 'discount',
3: 'cash',
4: 'exchange',
7: 'service'
}
}
},
computed: {
coupontData() {
let { couponObj, orderShow, choseItemList, numToCoupon } = this
orderShow.forEach(item => {
couponObj[item].list = []
})
choseItemList.forEach(item => {
couponObj[numToCoupon[item.discountType]].list.push(item)
})
return couponObj
}
},
props: {
choseItemList: {
type: Array,
default: () => []
}
}
}
</script>
<style lang="scss" scoped>
.content-meal-logo {
width: 58px;
height: 22px;
margin-right: 20px;
img {
width: 100%;
}
}
.content-meal-list {
width: calc(100% - 86px);
flex-wrap: wrap;
.every {
margin-right: 80px;
display: flex;
align-items: center;
}
.every::before {
content: '';
width: 6px;
height: 6px;
background: #5850ff;
border-radius: 50%;
margin-right: 7px;
display: inline-block;
}
}
</style>
<template>
<div class="live-room">
<div class="live-room marketing">
<div class="live-room container">
<div class="flex">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
......@@ -23,7 +23,9 @@
<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-form-item>
<el-form-item size="small" label="开通门店" style="margin-left: -10px">
<el-input :size="size" v-model="searchForm.merchantName" placeholder="请输入门店" clearable></el-input>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
......@@ -32,33 +34,40 @@
</el-row>
</el-form>
</div>
<div class="choseRow">
<div class="choseRow m-b-10">
<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" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<!-- <span slot="shareImgUrl" slot-scope="scope">
<img class="img-60" :src="scope.scope.shareImgUrl" />
</span> -->
<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" style="color:#eee" v-else>详情</el-button> -->
<GLButton @click="handleDetail(scope.scope)" fn="订单详情" type="text" v-if="scope.scope.orderType == 1">详情</GLButton>
<GLButton style="color: #eee" fn="订单详情" type="text" v-else>详情</GLButton>
<GLButton fn="退款" v-if="scope.scope.refundFlag == 1" type="text" @click="handleRefund(scope.scope)">退款</GLButton>
</span>
</GLTable>
</div>
<glsx-dialog class="refund-fill-box" :width="'720px'" title="退款确认" :isVisible="refundVisible" @confirmDialog="refundConfirmDialog" @closeDialog="refundVisible = false" :isShowCloseBtn="true">
<div class="dialog-form">
<label>说明:</label>
<el-input v-model.trim="refund" type="textarea" :rows="3" placeholder="请输入退款说明"></el-input>
</div>
</glsx-dialog>
</div>
</template>
<script>
import { orderTypesList, orderStatusList, exportFn } from '@/common/constant'
import url from '@/assets/empty.png'
import { getOrderListApi, orderExportApi } from '@/api/modules/order'
import { getOrderListApi, orderExportApi, orderRefund } from '@/api/modules/order'
export default {
data() {
return {
orderCode: '',
refund: '',
refundVisible: false,
merchantModel: 1, //集团:1,门店:2
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
url: url,
......@@ -104,9 +113,6 @@ export default {
label: '名称',
prop: 'packageName',
width: '180'
// formatter: cellValue => {
// return cellValue.startTime + '-' + cellValue.endTime
// }
},
{
label: '类型',
......@@ -134,15 +140,22 @@ export default {
{
label: '下单时间',
prop: 'createDate',
width: 95
width: 160
},
{
label: '开通门店',
prop: 'merchantName',
width: '180'
},
{
label: '用户信息',
prop: 'accountName'
},
{
label: '订单号',
prop: 'orderCode'
prop: 'orderCode',
width: 190
}
]
},
......@@ -213,7 +226,27 @@ export default {
resolve()
})
},
handleRefund(data) {
this.orderCode = data.orderCode
this.refundVisible = !this.refundVisible
},
refundConfirmDialog() {
const params = {
reason: this.refund,
orderCode: this.orderCode
}
//申请退款
orderRefund(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功,正在为该客户进行退款' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.refundVisible = !this.refundVisible
this.handleSearch()
}
})
},
handleDetail(row) {
this.$router.push({
path: '/memberCenter/orderDetail',
......@@ -268,21 +301,42 @@ export default {
.container {
.choseRow {
display: flex;
height: 34px;
height: auto;
width: auto;
position: relative;
left: calc(100% - 285px);
.choseItem {
cursor: pointer;
width: 120px;
height: 34px;
line-height: 34px;
text-align: center;
font-size: 14px;
font-size: 12px;
font-weight: 400;
color: #333333;
color: rgba(0, 0, 0, 0.65);
line-height: 32px;
width: 70px;
height: 32px;
background: #ffffff;
border-right: 1px solid #d5d5d5;
border-top: 1px solid #d5d5d5;
border-bottom: 1px solid #d5d5d5;
// border-left: 1px solid #d5d5d5;
}
.active {
color: #5850ff;
background-color: #f4f6fc;
color: #ffffff;
background: #5850ff;
}
}
.choseItem:nth-child(1) {
border-left: 1px solid #d5d5d5;
}
}
.refund-fill-box {
height: 320px;
.dialog-form {
padding: 26px 36px 46px 36px;
box-sizing: border-box;
display: flex;
label {
white-space: nowrap;
}
}
}
......
......@@ -16,7 +16,7 @@
/>
</div>
<tip-panel class="list-panel" panelMinHeight="40px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel>
<template v-if="merchantModel == 1 && accountLevel == 4">
<template v-if="accountLevel == 4">
<div class="setmeal-tabs flex-default m-t-10">
<template v-for="(tab, index) in tabList">
<div :class="['tab', tab.checked ? 'active' : '']" @click="changeTab(index)" :key="index">{{ tab.text }}</div>
......@@ -29,23 +29,17 @@
<span slot="list" slot-scope="scope">
<div class="content-meal">
<div class="text-14 color-3 line-20 weight-5 m-b-10">套餐内容</div>
<template v-for="(item, index) in scope.scope.list">
<div class="flex-top m-b-8" :key="index">
<div class="content-meal-logo"><img src="@/assets/setmeal/serve.png" alt="" /></div>
<div class="flex-align content-meal-list">
<div class="every color-3 text-14 weight-4 line-20" v-for="i in 2" :key="i">{{ item.couponName }}×{{ item.serviceQuantity }}</div>
<div class="every color-3 text-14 weight-4 line-20" v-for="i in 2" :key="i">终身机油套餐券 ×1</div>
</div>
</div>
</template>
<ticket :choseItemList="scope.scope.list"></ticket>
</div>
</span>
<span class="table-btns" slot="optionsFun" slot-scope="scope" :data="scope.scope">
<GLButton type="text" @click="handleDelete(scope.scope)" fn="置顶推荐">置顶推荐</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="取消置顶">取消置顶</GLButton>
<!-- 是否置顶推荐:1 是;2 否 -->
<el-button type="text" v-if="scope.scope.topFlag == 1">已指定推荐</el-button>
<GLButton type="text" @click="handleUpdateToTop(scope.scope)" v-if="scope.scope.topFlag == 2" fn="置顶推荐">置顶推荐</GLButton>
<template v-if="scope.scope.state === 0">
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleUpOption(scope.scope)">上架</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
......@@ -92,15 +86,17 @@
<script>
import glsxDialog from '@/components/glsx-dialog'
import url from '@/assets/empty.png'
import { getSetMealListApi, deleteSetMeal, upDownPackage } from '@/api/modules/setmeal'
import { getSetMealListApi, getSetMealstoreListApi, deleteSetMeal, upDownPackage, updateToTop } from '@/api/modules/setmeal'
import { getLoginCount } from '@/api/modules/service'
import { stateList } from '@/common/constant'
import tipPanel from '@/components/tipPanel/index.vue'
import ticket from './components/ticket.vue'
export default {
components: {
tipPanel,
glsxDialog,
ticket,
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer')
},
data() {
......@@ -112,7 +108,7 @@ export default {
isFirstShow: false,
panelContent: '会员套餐将会展示在小程序端【会员开通】页,客户开通会员时可选择性通过购买套餐方式开通会员或直接付费开通会员。',
size: 'small',
getListApi: getSetMealListApi,
// getListApi: getSetMealListApi,
searchForm: {
merchantId: 44184606
// merchantName
......@@ -150,7 +146,7 @@ export default {
{
label: '套餐售价/元',
prop: 'packagePrice',
line: 1
width: 140
},
{
label: '说明',
......@@ -160,7 +156,7 @@ export default {
},
{
label: '购买人数',
prop: 'packagePrice',
prop: 'buyNumber',
line: 1
},
{
......@@ -193,14 +189,30 @@ export default {
accountLevel: 0 //1,2,3,4工厂,省代,市代,门店
}
},
computed: {
getListApi() {
const { activetab, merchantModel, accountLevel } = this
let listApi = getSetMealListApi
if (activetab == 1) {
listApi = getSetMealListApi
} else {
listApi = getSetMealstoreListApi
}
return listApi
}
},
created() {
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
// this.merchantId = this.$globalState.session.merchantId
this.merchantId = this.$globalState.session.merchantId
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
// this.userType = this.$globalState.session.userType
}
this.searchForm = {
merchantId: this.merchantId
// merchantName
}
this.dynamicFile()
this.getLoginCountFun()
},
......@@ -210,14 +222,16 @@ export default {
const { activetab, merchantModel, accountLevel } = this
const saleParam = {
label: '在本店售出数量',
prop: 'packagePrice'
prop: 'buyNumber',
width: 140
}
const referencePrice = {
label: '套餐总价',
prop: 'referencePrice'
}
//&& merchantModel == 1 && accountLevel == 4
if (activetab == 1) {
// accountLevel == 4
if (activetab == 1 && accountLevel == 4) {
this.tableParams.tableColumns.splice(5, 1, saleParam)
} else {
this.tableParams.tableColumns.splice(5, 1, referencePrice)
......@@ -227,6 +241,7 @@ export default {
this.activetab = index
this.tabList.forEach(item => (item.checked = false))
this.tabList[index].checked = true
this.handleSearch()
this.dynamicFile()
},
previewPic() {
......@@ -310,6 +325,19 @@ export default {
handleEdit(row) {
this.$router.push({ path: '/memberCenter/setmealAddUpdate', query: { id: row.id, $title: encodeURI('编辑套餐') } })
},
//置顶推荐
handleUpdateToTop(row) {
updateToTop({ id: row.id }).then(res => {
console.log(res)
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleSearch()
}
})
},
// 查看示例效果
handleLook(row) {},
handleDelete(row) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!