Commit 81e85a1f by 胡悦

Merge branch 'v2.4.0' into huy_dev_v2.4.0

2 parents eadd4d5c 260c82a3
......@@ -62,10 +62,22 @@ const memberExportApi = params => {
const getQrUrl = params => {
params.method = 'scrm.api.equity.card.class.generate.try.url'
return http({
url: 'rop-scrm-equity/router',
url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
returnAll: true
})
}
export { getCenterListApi, getMoreMerchant, updateCardContent, getCardContent, memberExportApi, getQrUrl }
//门店会员开通方式
const getCardtypeList = params => {
params.method ='scrm.api.equity.card.active.type.list'
return http({
url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
returnAll: true
})
}
export { getCenterListApi, getMoreMerchant, updateCardContent, getCardContent, memberExportApi, getQrUrl ,getCardtypeList}
......@@ -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}
......@@ -134,7 +134,7 @@ const orderTypesList = [
},
{
confId: 2,
confName: '会员卡'
confName: '权益卡'
}
]
const orderStatusList = [
......
......@@ -526,28 +526,24 @@ export default {
}
},
getSiftMembers() {
const chatFlag = this.basicForm.condition.chat && this.basicForm.condition.chat.length
const tagFlag = this.tagging && this.tagging.length
const params = {
selectType: this.basicForm.selectType,
condition: {
selectType: this.basicForm.selectType
}
if (params.selectType == 2) {
const chatFlag = this.basicForm.condition.chat && this.basicForm.condition.chat.length
params.condition = {
sex: this.basicForm.condition.sex,
chatId: chatFlag ? this.basicForm.condition.chat.map(item => item.id).join(',') : '',
chatName: chatFlag ? this.basicForm.condition.chat.map(item => item.groupName).join(',') : '',
// tagId: "328,329,330",
// tagName: "一般,重要,核心"
// tagId: tagFlag ? this.tagging.map(item => item.id).join(',') : '',
// tagName: tagFlag ? this.tagging.map(item => item.name).join(',') : ''
// tagId: JSON.stringify(this.tagging)
labelList: this.taggingList,
combineType: 2
}
}
if (this.basicForm.condition.date) {
let endTime = new Date(this.basicForm.condition.date[1])
endTime = endTime.setDate(endTime.getDate() + 1)
params.condition.sTime = dayjs(this.basicForm.condition.date[0]).format('YYYY-MM-DD')
params.condition.eTime = dayjs(endTime).format('YYYY-MM-DD')
if (this.basicForm.condition.date) {
let endTime = new Date(this.basicForm.condition.date[1])
endTime = endTime.setDate(endTime.getDate() + 1)
params.condition.sTime = dayjs(this.basicForm.condition.date[0]).format('YYYY-MM-DD')
params.condition.eTime = dayjs(endTime).format('YYYY-MM-DD')
}
}
params.userList = this.basicForm.userList.map(item => {
return {
......
......@@ -351,11 +351,15 @@ export default {
margin-left: 40px;
display: flex;
flex-wrap: wrap;
.el-checkbox {
width: 40%;
margin-bottom: 6px;
display: flex;
align-items: center;
.radio-tag {
display: inline-block;
width: 50%;
.el-checkbox {
width: 40%;
margin-bottom: 6px;
display: flex;
align-items: center;
}
}
}
}
......
......@@ -111,7 +111,7 @@
</el-form-item>
<el-form-item size="small" label="开通方式" style="margin-left: -10px">
<el-select size="small" v-model="searchForm.activeType" placeholder="请选择">
<el-option v-for="item in openModeLists" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
<el-option v-for="item in openModeLists" :key="item.activeType" :label="item.activeTypeDesc" :value="item.activeType"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
......@@ -193,7 +193,7 @@ const cloneText = message => {
document.body.removeChild(input)
}
import glsxDialog from '@/components/glsx-dialog'
import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi, getQrUrl } from '@/api/modules/center'
import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi, getQrUrl, getCardtypeList } from '@/api/modules/center'
import { statusList, memberTypeList, exportFn } from '@/common/constant'
export default {
filters: {
......@@ -386,9 +386,18 @@ export default {
this.accountLevel = this.$globalState.session.accountLevel
}
this.getCardContentFun()
this.getCardtypeList()
},
mounted() {},
methods: {
//门店会员开通方式
getCardtypeList() {
getCardtypeList({}).then(res => {
if (res.code == 0) {
this.openModeLists = res.data
}
})
},
// 复制链接按钮
closeText(val) {
cloneText(val)
......@@ -396,7 +405,7 @@ export default {
},
// 查看小程序推广码
extensionQR() {
console.log(this.ruleForm.equityId)
// console.log(this.ruleForm.equityId)
const params = {
id: this.ruleForm.equityId
......@@ -425,7 +434,7 @@ export default {
} //限制只能输入一个小数点
if (value !== '' && value == 0) {
// return (str = 1)
return (str = 0.01)
return (str = 0.01)
}
if (Number(value) >= 99999) {
return (str = 99999)
......@@ -727,7 +736,7 @@ export default {
line-height: 28px;
border-bottom: 1px solid #d8d8d8;
background-color: #fff;
margin-top:20px;
margin-top: 20px;
}
.export {
height: 32px;
......@@ -739,6 +748,7 @@ export default {
line-height: 14px;
padding: 9px 20px;
box-sizing: border-box;
cursor: pointer;
}
.el-form-item {
......
......@@ -227,6 +227,7 @@ export default {
},
handleRefund(data) {
this.orderCode = data.orderCode
this.refund =''
this.refundVisible = !this.refundVisible
},
refundConfirmDialog() {
......@@ -307,7 +308,6 @@ export default {
.choseRow {
display: flex;
height: auto;
width:auto;
position: relative;
width:285px;
left: calc(100% - 285px);
......
<!-- 选择礼包弹窗 -->
<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>
......@@ -132,7 +132,7 @@ export default {
},
searchFormData: [
{
label: '礼包名称',
label: '优惠券名称',
name: 'couponName',
type: 'input',
maxlength: 30,
......@@ -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,55 +67,10 @@
</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" -->
<!-- <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="subTitle">
<span>请选择套餐服务:</span>
<span @click="$router.push('/memberCenter/serviceAddUpdateLook')">没有服务?去新建</span>
</div>
<el-scrollbar>
<div class="itemWrap">
<div class="item" v-for="(item, index) in allItemList" :key="index">
<div class="itemBox" :class="{ 's-checkd': item.serviceQuantity > 0 }" @click="handlePackage(item, index)">
<div class="name">{{ item.couponName }}</div>
<div class="price">
<span>¥</span>
{{ item.vipPrice }}
</div>
<div class="effectiveRange" v-if="item.effectiveType == 3">有效期:无有效期</div>
<div class="effectiveRange" v-if="item.effectiveType == 1">有效期:{{ item.effectiveDays }}天</div>
<div class="effectiveRange" v-if="item.effectiveType == 2">有效期:{{ item.effectiveStartTime.split(' ')[0] }} - {{ item.effectiveEndTime.split(' ')[0] }}</div>
<div class="useTime" v-if="item.useType == 0">有效期内无限制</div>
<div class="useTime" v-if="item.useType == 1">有效期内可使用{{ item.useAmount }}次</div>
<div class="useTime" v-if="item.useType == 2">每{{ item.useLimitDays }}天可以使用{{ item.useAmount }}次</div>
</div>
<div class="optionBtns" v-if="item.serviceQuantity > 0">
<el-button @click="cutPackage(item, index)" class="addsubBtn">-</el-button>
<span class="numWrap">{{ item.serviceQuantity }}</span>
<el-button @click="addPackage(item, index)" class="addsubBtn">+</el-button>
</div>
</div>
</div>
</el-scrollbar>
<div class="amountTo" v-if="selectNum">
<span class="bottomText">
已选
<span class="redText">{{ selectNum }}</span>
项
</span>
<span class="bottomText" style="margin-left: 20px">合计:</span>
<span class="smallRedText">¥</span>
<span class="redText">{{ totalPrice }}</span>
</div>
</div>
</glsx-dialog> -->
<glsx-dialog title="" top="30vh" :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">
<img src="@/assets/icon-warning.png" alt="" />
......@@ -241,12 +196,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 +269,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 +287,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 +375,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!