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 => { ...@@ -62,10 +62,22 @@ const memberExportApi = params => {
const getQrUrl = params => { const getQrUrl = params => {
params.method = 'scrm.api.equity.card.class.generate.try.url' params.method = 'scrm.api.equity.card.class.generate.try.url'
return http({ return http({
url: 'rop-scrm-equity/router', url: '/rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
returnAll: true 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' ...@@ -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}
...@@ -134,7 +134,7 @@ const orderTypesList = [ ...@@ -134,7 +134,7 @@ const orderTypesList = [
}, },
{ {
confId: 2, confId: 2,
confName: '会员卡' confName: '权益卡'
} }
] ]
const orderStatusList = [ const orderStatusList = [
......
...@@ -526,28 +526,24 @@ export default { ...@@ -526,28 +526,24 @@ export default {
} }
}, },
getSiftMembers() { getSiftMembers() {
const chatFlag = this.basicForm.condition.chat && this.basicForm.condition.chat.length
const tagFlag = this.tagging && this.tagging.length
const params = { const params = {
selectType: this.basicForm.selectType, selectType: this.basicForm.selectType
condition: { }
if (params.selectType == 2) {
const chatFlag = this.basicForm.condition.chat && this.basicForm.condition.chat.length
params.condition = {
sex: this.basicForm.condition.sex, sex: this.basicForm.condition.sex,
chatId: chatFlag ? this.basicForm.condition.chat.map(item => item.id).join(',') : '', chatId: chatFlag ? this.basicForm.condition.chat.map(item => item.id).join(',') : '',
chatName: chatFlag ? this.basicForm.condition.chat.map(item => item.groupName).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, labelList: this.taggingList,
combineType: 2 combineType: 2
} }
} if (this.basicForm.condition.date) {
if (this.basicForm.condition.date) { let endTime = new Date(this.basicForm.condition.date[1])
let endTime = new Date(this.basicForm.condition.date[1]) endTime = endTime.setDate(endTime.getDate() + 1)
endTime = endTime.setDate(endTime.getDate() + 1) params.condition.sTime = 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.eTime = dayjs(endTime).format('YYYY-MM-DD')
params.condition.eTime = dayjs(endTime).format('YYYY-MM-DD') }
} }
params.userList = this.basicForm.userList.map(item => { params.userList = this.basicForm.userList.map(item => {
return { return {
......
...@@ -351,11 +351,15 @@ export default { ...@@ -351,11 +351,15 @@ export default {
margin-left: 40px; margin-left: 40px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.el-checkbox { .radio-tag {
width: 40%; display: inline-block;
margin-bottom: 6px; width: 50%;
display: flex; .el-checkbox {
align-items: center; width: 40%;
margin-bottom: 6px;
display: flex;
align-items: center;
}
} }
} }
} }
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
</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.activeType" placeholder="请选择"> <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-select>
</el-form-item> </el-form-item>
<el-form-item size="small" class="fr-mr0"> <el-form-item size="small" class="fr-mr0">
...@@ -193,7 +193,7 @@ const cloneText = message => { ...@@ -193,7 +193,7 @@ const cloneText = message => {
document.body.removeChild(input) document.body.removeChild(input)
} }
import glsxDialog from '@/components/glsx-dialog' 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' import { statusList, memberTypeList, exportFn } from '@/common/constant'
export default { export default {
filters: { filters: {
...@@ -386,9 +386,18 @@ export default { ...@@ -386,9 +386,18 @@ export default {
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
} }
this.getCardContentFun() this.getCardContentFun()
this.getCardtypeList()
}, },
mounted() {}, mounted() {},
methods: { methods: {
//门店会员开通方式
getCardtypeList() {
getCardtypeList({}).then(res => {
if (res.code == 0) {
this.openModeLists = res.data
}
})
},
// 复制链接按钮 // 复制链接按钮
closeText(val) { closeText(val) {
cloneText(val) cloneText(val)
...@@ -396,7 +405,7 @@ export default { ...@@ -396,7 +405,7 @@ export default {
}, },
// 查看小程序推广码 // 查看小程序推广码
extensionQR() { extensionQR() {
console.log(this.ruleForm.equityId) // console.log(this.ruleForm.equityId)
const params = { const params = {
id: this.ruleForm.equityId id: this.ruleForm.equityId
...@@ -425,7 +434,7 @@ export default { ...@@ -425,7 +434,7 @@ export default {
} //限制只能输入一个小数点 } //限制只能输入一个小数点
if (value !== '' && value == 0) { if (value !== '' && value == 0) {
// return (str = 1) // return (str = 1)
return (str = 0.01) return (str = 0.01)
} }
if (Number(value) >= 99999) { if (Number(value) >= 99999) {
return (str = 99999) return (str = 99999)
...@@ -727,7 +736,7 @@ export default { ...@@ -727,7 +736,7 @@ export default {
line-height: 28px; line-height: 28px;
border-bottom: 1px solid #d8d8d8; border-bottom: 1px solid #d8d8d8;
background-color: #fff; background-color: #fff;
margin-top:20px; margin-top: 20px;
} }
.export { .export {
height: 32px; height: 32px;
...@@ -739,6 +748,7 @@ export default { ...@@ -739,6 +748,7 @@ export default {
line-height: 14px; line-height: 14px;
padding: 9px 20px; padding: 9px 20px;
box-sizing: border-box; box-sizing: border-box;
cursor: pointer;
} }
.el-form-item { .el-form-item {
......
...@@ -227,6 +227,7 @@ export default { ...@@ -227,6 +227,7 @@ export default {
}, },
handleRefund(data) { handleRefund(data) {
this.orderCode = data.orderCode this.orderCode = data.orderCode
this.refund =''
this.refundVisible = !this.refundVisible this.refundVisible = !this.refundVisible
}, },
refundConfirmDialog() { refundConfirmDialog() {
...@@ -307,7 +308,6 @@ export default { ...@@ -307,7 +308,6 @@ export default {
.choseRow { .choseRow {
display: flex; display: flex;
height: auto; height: auto;
width:auto;
position: relative; position: relative;
width:285px; width:285px;
left: calc(100% - 285px); left: calc(100% - 285px);
......
<!-- 选择礼包弹窗 --> <!-- 选择礼包弹窗 -->
<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>
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
}, },
searchFormData: [ searchFormData: [
{ {
label: '礼包名称', label: '优惠券名称',
name: 'couponName', name: 'couponName',
type: 'input', type: 'input',
maxlength: 30, maxlength: 30,
...@@ -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,55 +67,10 @@ ...@@ -67,55 +67,10 @@
</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" -->
<!-- <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"> <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"> <div class="content-body">
<img src="@/assets/icon-warning.png" alt="" /> <img src="@/assets/icon-warning.png" alt="" />
...@@ -241,12 +196,16 @@ export default { ...@@ -241,12 +196,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 +269,13 @@ export default { ...@@ -310,16 +269,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 +287,7 @@ export default { ...@@ -331,7 +287,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 +375,7 @@ export default { ...@@ -419,7 +375,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!