Commit be08afc5 by 王志慧

flx:会员套餐修改

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