Commit be08afc5 by 王志慧

flx:会员套餐修改

1 parent 429ac7f9
...@@ -2,7 +2,7 @@ import { http } from '@/main' ...@@ -2,7 +2,7 @@ import { http } from '@/main'
// const defaultPath = 'scrm.api.live.' // const defaultPath = 'scrm.api.live.'
const getSetMealListApi = params => { const getghSetMealListApi = params => {
// params.method = `${defaultPath}goods.list` // 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` params.method = `scrm.api.equity.package.gh.list.with.page`
...@@ -115,4 +115,4 @@ const updateToTop = params=>{ ...@@ -115,4 +115,4 @@ const updateToTop = params=>{
}) })
} }
export { getSetMealListApi,getSetMealstoreListApi, deleteSetMeal, getSetmealService, getServiceInfo, createSetMeal, upDownPackage, updateSetMeal, configSetMeal ,updateToTop} export { getghSetMealListApi,getSetMealstoreListApi, deleteSetMeal, getSetmealService, getServiceInfo, createSetMeal, upDownPackage, updateSetMeal, configSetMeal ,updateToTop}
<!-- 选择礼包弹窗 --> <!-- 选择礼包弹窗 -->
<template> <template>
<glsx-dialog class="muti-gift" title="选择礼包内容" :isVisible.sync="isSelectGiftVisible" width="70%" @confirmDialog="handleGiftConfirm" @closeDialog="handleGiftClose" v-loading="loading"> <glsx-dialog class="muti-gift" title="选择服务内容" :isVisible.sync="isSelectGiftVisible" width="70%" @confirmDialog="handleGiftConfirm" @closeDialog="handleGiftClose" v-loading="loading">
<!-- <div class="nogiftDiv" v-show="!giftList.length && fnCallBack"> <!-- <div class="nogiftDiv" v-show="!giftList.length && fnCallBack">
<img src="@/assets/noPro.png" /> <img src="@/assets/noPro.png" />
<p class="nogiftP">系统暂无已创建的礼包</p> <p class="nogiftP">系统暂无已创建的礼包</p>
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
addHtml: 'effectiveType' addHtml: 'effectiveType'
}, },
{ {
label: '可用次数', label: '使用限制',
prop: 'useType', prop: 'useType',
addHtml: 'useType' addHtml: 'useType'
}, },
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<script> <script>
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { getSetMealListApi, getSetMealstoreListApi, deleteSetMeal, upDownPackage, updateToTop } from '@/api/modules/setmeal' import { getghSetMealListApi, getSetMealstoreListApi, deleteSetMeal, upDownPackage, updateToTop } from '@/api/modules/setmeal'
import { getLoginCount } from '@/api/modules/service' import { getLoginCount } from '@/api/modules/service'
import { stateList } from '@/common/constant' import { stateList } from '@/common/constant'
...@@ -110,7 +110,6 @@ export default { ...@@ -110,7 +110,6 @@ export default {
isFirstShow: false, isFirstShow: false,
panelContent: '会员套餐将会展示在小程序端【会员开通】页,客户开通会员时可选择性通过购买套餐方式开通会员或直接付费开通会员。', panelContent: '会员套餐将会展示在小程序端【会员开通】页,客户开通会员时可选择性通过购买套餐方式开通会员或直接付费开通会员。',
size: 'small', size: 'small',
// getListApi: getSetMealListApi,
searchForm: { searchForm: {
merchantId: 44184606 merchantId: 44184606
// merchantName // merchantName
...@@ -118,14 +117,14 @@ export default { ...@@ -118,14 +117,14 @@ export default {
tabList: [ tabList: [
{ {
text: '本店套餐', text: '本店套餐',
checked: false checked: true
}, },
{ {
text: '集团套餐', text: '集团套餐',
checked: true checked: false
} }
], ],
activetab: 1, activetab: 0,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数 // 表格参数
tableParams: { tableParams: {
...@@ -186,9 +185,9 @@ export default { ...@@ -186,9 +185,9 @@ export default {
computed: { computed: {
getListApi() { getListApi() {
const { activetab } = this const { activetab } = this
let listApi = getSetMealListApi let listApi = ''
if (activetab == 1) { if (activetab == 1) {
listApi = getSetMealListApi listApi = getghSetMealListApi
} else { } else {
listApi = getSetMealstoreListApi listApi = getSetMealstoreListApi
} }
...@@ -202,21 +201,14 @@ export default { ...@@ -202,21 +201,14 @@ export default {
this.merchantId = this.$globalState.session.merchantId this.merchantId = this.$globalState.session.merchantId
this.merchantModel = this.$globalState.session.merchantModel this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
// this.userType = this.$globalState.session.userType if (this.accountLevel != 4) {
if (this.merchantModel == 2) { this.activetab = 1
this.activetab = 0
} }
} }
this.searchForm = { this.searchForm = {
merchantId: this.merchantId merchantId: this.merchantId
// merchantName // merchantName
} }
if (this.$route.query && this.$route.query.activetab) {
this.activetab = 0
// this.changeTab(this.activetab)
this.tabList.forEach(item => (item.checked = false))
this.tabList[this.activetab].checked = true
}
this.dynamicFile() this.dynamicFile()
this.getLoginCountFun() this.getLoginCountFun()
}, },
...@@ -233,7 +225,6 @@ export default { ...@@ -233,7 +225,6 @@ export default {
prop: 'referencePrice' prop: 'referencePrice'
} }
if ((activetab == 1 && accountLevel == 4) || accountLevel != 4) { if ((activetab == 1 && accountLevel == 4) || accountLevel != 4) {
this.tableParams.tableColumns.splice(4, 1, saleParam) this.tableParams.tableColumns.splice(4, 1, saleParam)
} else if (activetab == 0 && accountLevel == 4) { } else if (activetab == 0 && accountLevel == 4) {
...@@ -437,7 +428,7 @@ export default { ...@@ -437,7 +428,7 @@ export default {
.setmeal-tabs { .setmeal-tabs {
cursor: pointer; cursor: pointer;
position: relative; position: relative;
width:200px; width: 200px;
left: calc(100% - 196px); left: calc(100% - 196px);
.tab { .tab {
background: #fafafa; background: #fafafa;
......
...@@ -67,8 +67,8 @@ ...@@ -67,8 +67,8 @@
</div> </div>
<div class="footer-panel"> <div class="footer-panel">
<div> <div>
<el-button type="primary" @click="submitForm()" size="medium" :loading="sloading">创建</el-button> <el-button type="primary" @click="submitForm()" size="medium" :loading="sloading">提交</el-button>
<el-button type="primary" @click="goBack" size="medium">取消</el-button> <el-button @click="goBack" size="medium">取消</el-button>
</div> </div>
</div> </div>
<!-- :modalAppendToBody="false" --> <!-- :modalAppendToBody="false" -->
...@@ -241,12 +241,16 @@ export default { ...@@ -241,12 +241,16 @@ export default {
} }
let href = window.location.host let href = window.location.host
this.showGh = href.indexOf('cgacar') != -1 this.showGh = href.indexOf('cgacar') != -1
this.getCardContentFun() if (this.showGh) {
this.getSetmealServiceFun() //获取服务套餐,执行完了之后去获取编辑详情 this.getCardContentFun()
}, }
mounted() {
this.getServiceInfo()
// this.getSetmealServiceFun() //获取服务套餐,执行完了之后去获取编辑详情
}, },
mounted() {},
methods: { methods: {
//获取会员卡上方卡片的相关信息
getCardContentFun() { getCardContentFun() {
if (this.accountLevel !== 4) { if (this.accountLevel !== 4) {
getCardContent({ merchantId: this.merchantId }).then(res => { getCardContent({ merchantId: this.merchantId }).then(res => {
...@@ -310,16 +314,13 @@ export default { ...@@ -310,16 +314,13 @@ export default {
if (res.code == '0') { if (res.code == '0') {
this.ruleForm = res.data this.ruleForm = res.data
this.ruleForm.switchStatus = res.data.switchStatus == 1 ? true : false this.ruleForm.switchStatus = res.data.switchStatus == 1 ? true : false
const choseItemList = res.data.list this.choseItemList = res.data.list
this.totalPrice = res.data.referencePrice this.totalPrice = res.data.referencePrice
this.choseItemList.forEach(item => {
choseItemList.forEach(item => { item.couponAmount = item.serviceQuantity
for (let i = 0; i < this.allItemList.length; i++) { item.id = item.serviceId
if (item.serviceId == this.allItemList[i].id) {
this.choseItemList.push(Object.assign(this.allItemList[i], { couponAmount: item.serviceQuantity }))
}
}
}) })
this.recoveryCoupon() this.recoveryCoupon()
this.copyTotalPrice = this.totalPrice this.copyTotalPrice = this.totalPrice
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据 this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据
...@@ -331,7 +332,7 @@ export default { ...@@ -331,7 +332,7 @@ export default {
getSetmealServiceFun() { getSetmealServiceFun() {
let params = {} let params = {}
params.merchantId = this.merchantId params.merchantId = this.merchantId
params.status = 2 params.status = ''
params.discountType = '' params.discountType = ''
params.pageSize = 1000 params.pageSize = 1000
params.currentPage = 1 params.currentPage = 1
...@@ -419,7 +420,7 @@ export default { ...@@ -419,7 +420,7 @@ export default {
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
}) })
if (res.code == '0') { if (res.code == '0') {
this.$router.push('/memberCenter/setmeal?activetab=0') this.$router.push('/memberCenter/setmeal')
} }
}) })
.catch(err => { .catch(err => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!