Commit badb0566 by 王志慧

广汇需求开发

1 parent 5c7adb19
...@@ -78,6 +78,17 @@ const getCardtypeList = params => { ...@@ -78,6 +78,17 @@ const getCardtypeList = params => {
returnAll: true returnAll: true
}) })
} }
// 重置会员权益卡
const resetCard = params => {
params.method ='scrm.api.equity.card.reset'
return http({
url: '/rop-scrm-equity/router',
method: 'POST',
data: params,
returnAll: true
})
}
export { getCenterListApi, getMoreMerchant, updateCardContent, getCardContent, memberExportApi, getQrUrl ,getCardtypeList} export {resetCard, getCenterListApi, getMoreMerchant, updateCardContent, getCardContent, memberExportApi, getQrUrl ,getCardtypeList}
<template> <template>
<div class="marketing live-room"> <div class="marketing live-room">
<div class="memberCardWrap" v-if="!(merchantModel == 2 && accountLevel == 1)"> <div class="memberCardWrap" v-if="showGh||!(merchantModel == 2 && accountLevel == 1)">
<div class="cardBoxWrap"> <div class="cardBoxWrap">
<img src="@/assets/memberCard.png" alt="" /> <img src="@/assets/memberCard.png" alt="" />
<div class="memberCardName">{{ ruleForm.cardName }}</div> <div class="memberCardName">{{ ruleForm.cardName }}</div>
...@@ -16,7 +16,9 @@ ...@@ -16,7 +16,9 @@
<template v-if="showGh"> <template v-if="showGh">
<div class="member-card"><img src="@/assets/silver.png" alt="" /></div> <div class="member-card"><img src="@/assets/silver.png" alt="" /></div>
</template> </template>
<GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon" @click="openEditWrap" alt="" /></GLButton> <template>
<GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon" @click="openEditWrap" alt="" /></GLButton>
</template>
</div> </div>
<template v-if="showGh"> <template v-if="showGh">
<div class="flex-1 mt-10 line-20"> <div class="flex-1 mt-10 line-20">
...@@ -26,7 +28,6 @@ ...@@ -26,7 +28,6 @@
<div class="member-card"><img src="@/assets/gold.png" alt="" /></div> <div class="member-card"><img src="@/assets/gold.png" alt="" /></div>
</div> </div>
</template> </template>
<div class="row"> <div class="row">
<span>售价:</span> <span>售价:</span>
<span class="price text-e8" v-if="ruleForm.price">¥{{ ruleForm.price }}</span> <span class="price text-e8" v-if="ruleForm.price">¥{{ ruleForm.price }}</span>
...@@ -58,15 +59,14 @@ ...@@ -58,15 +59,14 @@
<el-input v-model.trim="ruleForm.goldCardClassName" size="small" class="cardNameInput" show-word-limit placeholder="请输入金卡名称" maxlength="15"></el-input> <el-input v-model.trim="ruleForm.goldCardClassName" size="small" class="cardNameInput" show-word-limit placeholder="请输入金卡名称" maxlength="15"></el-input>
</el-form-item> </el-form-item>
</template> </template>
<div class="pricesMerge"> <div class="pricesMerge">
<el-form-item label="售价/元:" size="small" prop="price" style="width: 300px"> <el-form-item label="售价/元:" size="small" prop="price" style="width: 300px">
<el-input v-model="ruleForm.price" size="small" style="width: 136px;" placeholder="请输入售价" @keyup.native="ruleForm.price = oninput(ruleForm.price)"> <el-input v-model="ruleForm.price" size="small" style="width: 136px" placeholder="请输入售价" @keyup.native="ruleForm.price = oninput(ruleForm.price)">
<!-- <span slot="suffix" class="suffix-label">元</span> --> <!-- <span slot="suffix" class="suffix-label">元</span> -->
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="市场价/元:" prop="marketPrice" size="small" style="width: 300px"> <el-form-item label="市场价/元:" prop="marketPrice" size="small" style="width: 300px">
<el-input v-model="ruleForm.marketPrice" size="small" style="width: 136px;" placeholder="请输入市场价" @keyup.native="ruleForm.marketPrice = oninput(ruleForm.marketPrice)"> <el-input v-model="ruleForm.marketPrice" size="small" style="width: 136px" placeholder="请输入市场价" @keyup.native="ruleForm.marketPrice = oninput(ruleForm.marketPrice)">
<!-- <span slot="suffix" class="suffix-label">元</span> --> <!-- <span slot="suffix" class="suffix-label">元</span> -->
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
<!-- <div v-if="ruleForm.tryAble" class="promoteQR">生成小程序码推广</div> --> <!-- <div v-if="ruleForm.tryAble" class="promoteQR">生成小程序码推广</div> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="display: flex"> <div style="display: flex">
<el-button size="small" class="cancelBtn" @click="cancelEdit">取消</el-button> <el-button size="small" class="cancelBtn" @click="cancelEdit">取消</el-button>
<el-button size="small" class="saveBtn" type="primary" @click="submitRuleForm('ruleForm')">保存</el-button> <el-button size="small" class="saveBtn" type="primary" @click="submitRuleForm('ruleForm')">保存</el-button>
...@@ -99,7 +98,6 @@ ...@@ -99,7 +98,6 @@
<div class="text-16 color-3 weight-5">会员列表</div> <div class="text-16 color-3 weight-5">会员列表</div>
<div class="export" @click="handleExport">全部导出</div> <div class="export" @click="handleExport">全部导出</div>
</div> </div>
<GLTable ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="cardInfo" slot-scope="scope"> <div slot="cardInfo" slot-scope="scope">
<GLTable class="centerTable" ref="cardListRef" :hasNum="false" :hasPage="false" :noDataImg="url" :tableParams="cardParams" :tableData="scope.scope.list"></GLTable> <GLTable class="centerTable" ref="cardListRef" :hasNum="false" :hasPage="false" :noDataImg="url" :tableParams="cardParams" :tableData="scope.scope.list"></GLTable>
...@@ -108,6 +106,9 @@ ...@@ -108,6 +106,9 @@
<div>{{ scope.scope.accountName }}</div> <div>{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div> <div>{{ scope.scope.mobile }}</div>
</span> </span>
<span slot="optionBtns" slot-scope="scope" v-if="scope.scope.goldMemberStatus == 1">
<span class="txt-blue pointer" @click="chancelMember(scope.scope)">取消会员</span>
</span>
</GLTable> </GLTable>
</div> </div>
<GLDialog :mode="mode" title="权益详情" :hasFooter="hasFooter" :type="'error'" :visible.sync="isDialogVisible"> <GLDialog :mode="mode" title="权益详情" :hasFooter="hasFooter" :type="'error'" :visible.sync="isDialogVisible">
...@@ -151,7 +152,6 @@ ...@@ -151,7 +152,6 @@
</GLDialog> </GLDialog>
</div> </div>
</template> </template>
<script> <script>
const cloneText = message => { const cloneText = message => {
let input = document.createElement('input') let input = document.createElement('input')
...@@ -161,7 +161,7 @@ const cloneText = message => { ...@@ -161,7 +161,7 @@ const cloneText = message => {
input.setSelectionRange(0, input.value.length), document.execCommand('Copy') input.setSelectionRange(0, input.value.length), document.execCommand('Copy')
document.body.removeChild(input) document.body.removeChild(input)
} }
import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi, getQrUrl, getCardtypeList } from '@/api/modules/center' import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi, getQrUrl, getCardtypeList, resetCard } from '@/api/modules/center'
import { statusList, memberTypeList, exportFn } from '@/common/constant' import { statusList, memberTypeList, exportFn } from '@/common/constant'
export default { export default {
filters: { filters: {
...@@ -257,7 +257,6 @@ export default { ...@@ -257,7 +257,6 @@ export default {
{ {
label: '会员用户', label: '会员用户',
prop: 'accountName', prop: 'accountName',
width: '180',
addHtml: 'accountName' addHtml: 'accountName'
}, },
{ {
...@@ -335,9 +334,7 @@ export default { ...@@ -335,9 +334,7 @@ export default {
} }
] ]
}, },
isShowEditWrap: false, isShowEditWrap: false,
ruleForm: { ruleForm: {
equityId: '', equityId: '',
cardName: '', cardName: '',
...@@ -371,6 +368,7 @@ export default { ...@@ -371,6 +368,7 @@ export default {
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
} }
this.showGh = window.location.host.indexOf('cgacar') != -1 this.showGh = window.location.host.indexOf('cgacar') != -1
if (this.showGh) this.judgeGh()
this.getCardContentFun() this.getCardContentFun()
this.getCardtypeList() this.getCardtypeList()
}, },
...@@ -378,6 +376,40 @@ export default { ...@@ -378,6 +376,40 @@ export default {
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}, },
methods: { methods: {
judgeGh() {
if (this.accountLevel == 4) {
this.baseData.openModeList.push({
dictValue: 13,
dictLabel: '通过门店套餐赠送'
})
}
this.tableParams.tableColumns.push({
label: '操作',
width: '140px',
addHtml: 'optionBtns'
})
},
chancelMember(data) {
this.$messageBox.confirm('此操作会将该会员用户的剩余会员有效天数扣减1年或归0,是否确认继续操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
// type: 'error',
callback: action => {
if (action == 'confirm') {
resetCard({ mobile: data.mobile }).then(res => {
this.$message({
message: res.code == '0' ? '将该用户的会员有效天数扣减365天,不足365天则直接将会员身份变更为普通会员' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleSearch()
}
})
}
}
})
},
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
...@@ -403,7 +435,6 @@ export default { ...@@ -403,7 +435,6 @@ export default {
}) })
} }
}, },
//门店会员开通方式 //门店会员开通方式
getCardtypeList() { getCardtypeList() {
getCardtypeList({}).then(res => { getCardtypeList({}).then(res => {
...@@ -576,7 +607,6 @@ export default { ...@@ -576,7 +607,6 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.centerTable { .centerTable {
padding-left: 10px; padding-left: 10px;
...@@ -628,9 +658,9 @@ export default { ...@@ -628,9 +658,9 @@ export default {
.memberCardWrap { .memberCardWrap {
display: flex; display: flex;
background-color: #fff; background-color: #fff;
height: 190px; height: auto;
box-sizing: border-box; box-sizing: border-box;
padding: 10px 8px; padding: 20px 8px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1); box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.1);
.cardBoxWrap { .cardBoxWrap {
position: relative; position: relative;
...@@ -733,7 +763,6 @@ export default { ...@@ -733,7 +763,6 @@ export default {
} }
} }
} }
.pageTitle { .pageTitle {
position: relative; position: relative;
padding: 15px 20px; padding: 15px 20px;
...@@ -758,7 +787,6 @@ export default { ...@@ -758,7 +787,6 @@ export default {
box-sizing: border-box; box-sizing: border-box;
cursor: pointer; cursor: pointer;
} }
.el-form-item { .el-form-item {
margin-bottom: 15px; margin-bottom: 15px;
} }
...@@ -825,7 +853,6 @@ export default { ...@@ -825,7 +853,6 @@ export default {
overflow: hidden; overflow: hidden;
} }
} }
.pricesMerge { .pricesMerge {
display: flex; display: flex;
width: 1500px; width: 1500px;
...@@ -888,4 +915,4 @@ export default { ...@@ -888,4 +915,4 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<div class="dialog-refund"> <div class="dialog-refund">
<img class="img" src="../../images/warn.png" /> <img class="img" src="../../images/warn.png" />
<div>该会员在升级黑卡会员期间,已购买过生活权益</div> <div>该会员在升级黑卡会员期间,已购买过生活权益</div>
<div style="color: #FF4D4F;padding: 6px 0;">(时间:{{ orderDate }} 金额:{{ orderPrice }}元)</div> <div style="color: #ff4d4f; padding: 6px 0">(时间:{{ orderDate }} 金额:{{ orderPrice }}元)</div>
<div>暂不支持退款</div> <div>暂不支持退款</div>
</div> </div>
</GLDialog> </GLDialog>
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
</GLDialog> </GLDialog>
</div> </div>
</template> </template>
<script> <script>
import { orderTypesList, orderStatusList, exportFn } from '@/common/constant' import { orderTypesList, orderStatusList, exportFn } from '@/common/constant'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
...@@ -102,6 +101,7 @@ export default { ...@@ -102,6 +101,7 @@ export default {
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店 accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
url: url, url: url,
isReload: true, isReload: true,
showGh: false,
size: 'small', size: 'small',
searchForm: { searchForm: {
orderStatus: '', //默认查询全部 orderStatus: '', //默认查询全部
...@@ -157,7 +157,7 @@ export default { ...@@ -157,7 +157,7 @@ export default {
name: 'shareStaffName', name: 'shareStaffName',
type: 'input', type: 'input',
maxlength: 100 maxlength: 100
}, }
], ],
choseList: ['全部', '待收货', '已完成', '退款|售后'], choseList: ['全部', '待收货', '已完成', '退款|售后'],
currentIndex: 1, currentIndex: 1,
...@@ -290,6 +290,8 @@ export default { ...@@ -290,6 +290,8 @@ export default {
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.showGh = window.location.host.indexOf('cgacar') != -1
if(this.showGh) this.judgeGh()
// if (this.$isGroupUp) { // if (this.$isGroupUp) {
// let idx = this.tableParams.tableColumns.findIndex(item => item.label == '推荐人') // let idx = this.tableParams.tableColumns.findIndex(item => item.label == '推荐人')
// this.tableParams.tableColumns.splice(idx, 1) // this.tableParams.tableColumns.splice(idx, 1)
...@@ -299,6 +301,41 @@ export default { ...@@ -299,6 +301,41 @@ export default {
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}, },
methods: { methods: {
judgeGh() {
this.searchFormData.push({
label: '收款商户',
name: 'payMerchantName',
type: 'input',
maxlength: 100
},
{
label: '车牌号',
name: 'plateNum',
type: 'input',
maxlength: 100
},
{
label: '车架号',
name: 'standNo',
type: 'input',
maxlength: 100
})
this.tableParams.tableColumns.push({
label: '收款商户',
width: '140px',
prop: 'payMerchantName'
},
{
label: '车牌号',
width: '140px',
prop: 'plateNum'
},
{
label: '车架号',
width: '140px',
prop: 'standNo'
})
},
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
...@@ -324,7 +361,6 @@ export default { ...@@ -324,7 +361,6 @@ export default {
}) })
} }
}, },
tabClick(index) { tabClick(index) {
this.currentIndex = index this.currentIndex = index
switch (index) { switch (index) {
...@@ -355,7 +391,6 @@ export default { ...@@ -355,7 +391,6 @@ export default {
} }
this.handleSearch() this.handleSearch()
}, },
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) { if (params.daterange) {
...@@ -365,7 +400,6 @@ export default { ...@@ -365,7 +400,6 @@ export default {
delete params.daterange delete params.daterange
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams() this.searchFormTable = this.getParams()
...@@ -425,14 +459,12 @@ export default { ...@@ -425,14 +459,12 @@ export default {
} }
}) })
}, },
handleExport(row) { handleExport(row) {
var params = this.getParams() var params = this.getParams()
orderExportApi(params).then(res => { orderExportApi(params).then(res => {
exportFn(res) exportFn(res)
}) })
}, },
handleSearch() { handleSearch() {
this.$refs.memberOrderRef.refreshTable() this.$refs.memberOrderRef.refreshTable()
}, },
...@@ -468,7 +500,6 @@ export default { ...@@ -468,7 +500,6 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// /deep/.el-input--small .el-input__inner { // /deep/.el-input--small .el-input__inner {
// width: 215px; // width: 215px;
...@@ -476,7 +507,6 @@ export default { ...@@ -476,7 +507,6 @@ export default {
.el-range-editor.is-active, .el-range-editor.is-active,
.el-range-editor.is-active:hover { .el-range-editor.is-active:hover {
border-color: #5850ff; border-color: #5850ff;
width: 215px; width: 215px;
} }
.el-range-editor--small.el-input__inner { .el-range-editor--small.el-input__inner {
...@@ -544,4 +574,4 @@ export default { ...@@ -544,4 +574,4 @@ export default {
// text-align: center; // text-align: center;
// } // }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -29,7 +29,13 @@ ...@@ -29,7 +29,13 @@
</div> </div>
<div class="el-form-item__error" v-if="setmealContentRules">请选择套餐</div> <div class="el-form-item__error" v-if="setmealContentRules">请选择套餐</div>
</el-form-item> </el-form-item>
<el-form-item label="赠送金卡会员:" prop="giveGoldFlag" v-if="showGh&&accountLevel == 4">
<el-radio-group v-model="ruleForm.giveGoldFlag">
<el-radio :label="2">赠送</el-radio>
<el-radio :label="1">不赠送</el-radio>
</el-radio-group>
</el-form-item>
<span class="give-tip">选择赠送,客户购买该套餐后即开通一年金卡会员权益</span>
<el-form-item size="small" label="套餐售价/元:" prop="packagePrice"> <el-form-item size="small" label="套餐售价/元:" prop="packagePrice">
<el-input size="small" v-model="ruleForm.packagePrice" placeholder="请输入套餐售价" @keyup.native="ruleForm.packagePrice = oninput(ruleForm.packagePrice)"> <el-input size="small" v-model="ruleForm.packagePrice" placeholder="请输入套餐售价" @keyup.native="ruleForm.packagePrice = oninput(ruleForm.packagePrice)">
<!-- <span slot="suffix" class="suffix-label">元</span> --> <!-- <span slot="suffix" class="suffix-label">元</span> -->
...@@ -73,7 +79,6 @@ ...@@ -73,7 +79,6 @@
<select-gift-dialog v-if="isSelectGiftVisible" :isSelectGiftVisible="isSelectGiftVisible" :selectedGiftList="selectedMealList" @handleGiftConfirm="handleGiftConfirm" @handleGiftClose="handleGiftClose"></select-gift-dialog> <select-gift-dialog v-if="isSelectGiftVisible" :isSelectGiftVisible="isSelectGiftVisible" :selectedGiftList="selectedMealList" @handleGiftConfirm="handleGiftConfirm" @handleGiftClose="handleGiftClose"></select-gift-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getSetmealService, createSetMeal, getServiceInfo, updateSetMeal, configSetMeal } from '@/api/modules/setmeal' import { getSetmealService, createSetMeal, getServiceInfo, updateSetMeal, configSetMeal } from '@/api/modules/setmeal'
import { getCardContent } from '@/api/modules/center' import { getCardContent } from '@/api/modules/center'
...@@ -86,8 +91,8 @@ export default { ...@@ -86,8 +91,8 @@ export default {
var validatePrice = (rule, value, callback) => { var validatePrice = (rule, value, callback) => {
if (!value) { if (!value) {
return callback(new Error('请输入售价')) return callback(new Error('请输入售价'))
} else if (value < this.memberPrice && this.accountLevel !== 4 && this.showGh) { } else if (value < this.memberPrice && this.ruleForm.giveGoldFlag == 2 &&this.accountLevel==4&& this.showGh) {
return callback(new Error('套餐售价需大于会员卡的售价')) return callback(new Error('套餐售价不能低于会员卡价格'))
} else { } else {
callback() callback()
} }
...@@ -100,12 +105,14 @@ export default { ...@@ -100,12 +105,14 @@ export default {
packagePrice: '', packagePrice: '',
switchStatus: true, switchStatus: true,
// couponList:[], // couponList:[],
notes: '' notes: '',
giveGoldFlag: ''
}, },
copyRuleForm: {}, //用于检查页面信息是否改动 copyRuleForm: {}, //用于检查页面信息是否改动
rules: { rules: {
packageName: [{ required: true, message: '请输入套餐名称', trigger: 'blur' }], packageName: [{ required: true, message: '请输入套餐名称', trigger: 'blur' }],
packagePrice: [{ required: true, validator: validatePrice, trigger: 'blur' }] packagePrice: [{ required: true, validator: validatePrice, trigger: 'blur' }],
giveGoldFlag: [{ required: true, message: '请选择金卡会员', trigger: 'change' }]
}, },
allItemList: [], allItemList: [],
choseItemList: [], //['一年12次洗车券×1', '车身打蜡×2', '全车镀膜×1'], choseItemList: [], //['一年12次洗车券×1', '车身打蜡×2', '全车镀膜×1'],
...@@ -186,27 +193,27 @@ export default { ...@@ -186,27 +193,27 @@ export default {
this.merchantName = this.$globalState.session.merchantName this.merchantName = this.$globalState.session.merchantName
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
} }
let href = window.location.host this.showGh = window.location.host.indexOf('cgacar')!= -1
this.showGh = href.indexOf('cgacar') != -1
if (this.showGh) { if (this.showGh) {
this.getCardContentFun() this.getCardContentFun()
} }
if (this.id) {
this.getServiceInfo() this.getServiceInfo()
} else {
this.ruleForm.giveGoldFlag = 2
}
// this.getSetmealServiceFun() //获取服务套餐,执行完了之后去获取编辑详情 // this.getSetmealServiceFun() //获取服务套餐,执行完了之后去获取编辑详情
}, },
mounted() { }, mounted() {},
methods: { methods: {
//获取会员卡上方卡片的相关信息 //获取会员卡上方卡片的相关信息
getCardContentFun() { getCardContentFun() {
if (this.accountLevel !== 4) { getCardContent({ merchantId: this.merchantId }).then(res => {
getCardContent({ merchantId: this.merchantId }).then(res => { if (!res) {
if (!res) { return
return }
} this.memberPrice = res.goodPrice
this.memberPrice = res.goodPrice })
})
}
}, },
// 礼包 // 礼包
recoveryGiftList() { recoveryGiftList() {
...@@ -216,6 +223,11 @@ export default { ...@@ -216,6 +223,11 @@ export default {
this.choseItemList.push(k) this.choseItemList.push(k)
}) })
}) })
if (this.choseItemList.length> 0) {
this.setmealContentRules = false
}else{
this.setmealContentRules = true
}
}, },
handleGiftDelete(attr, idx) { handleGiftDelete(attr, idx) {
this.couponObj[attr].list.splice(idx, 1) this.couponObj[attr].list.splice(idx, 1)
...@@ -267,7 +279,6 @@ export default { ...@@ -267,7 +279,6 @@ export default {
item.couponAmount = item.serviceQuantity item.couponAmount = item.serviceQuantity
item.id = item.serviceId item.id = item.serviceId
}) })
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)) //深拷贝一份数据
...@@ -303,11 +314,6 @@ export default { ...@@ -303,11 +314,6 @@ export default {
} }
return return
} }
if (this.choseItemList.length <= 0) {
this.setmealContentRules = true
return
}
if (this.id) { if (this.id) {
//需要调config的接口???? //需要调config的接口????
// scrm.api.equity.package.service.config // scrm.api.equity.package.service.config
...@@ -322,6 +328,7 @@ export default { ...@@ -322,6 +328,7 @@ export default {
param.packagePrice = this.ruleForm.packagePrice param.packagePrice = this.ruleForm.packagePrice
param.notes = this.ruleForm.notes param.notes = this.ruleForm.notes
param.switchStatus = this.ruleForm.switchStatus ? 1 : 0 param.switchStatus = this.ruleForm.switchStatus ? 1 : 0
if (this.showGh) param.giveGoldFlag = this.ruleForm.giveGoldFlag
let lists = this.choseItemList let lists = this.choseItemList
for (var k in lists) { for (var k in lists) {
param[`lists[${k}].serviceQuantity`] = lists[k].couponAmount param[`lists[${k}].serviceQuantity`] = lists[k].couponAmount
...@@ -357,6 +364,7 @@ export default { ...@@ -357,6 +364,7 @@ export default {
params.packagePrice = this.ruleForm.packagePrice params.packagePrice = this.ruleForm.packagePrice
params.notes = this.ruleForm.notes params.notes = this.ruleForm.notes
params.switchStatus = this.ruleForm.switchStatus ? 1 : 0 params.switchStatus = this.ruleForm.switchStatus ? 1 : 0
if (this.showGh) params.giveGoldFlag = this.ruleForm.giveGoldFlag
let list = this.choseItemList let list = this.choseItemList
for (var i in list) { for (var i in list) {
params[`list[${i}].serviceQuantity`] = list[i].couponAmount params[`list[${i}].serviceQuantity`] = list[i].couponAmount
...@@ -405,7 +413,6 @@ export default { ...@@ -405,7 +413,6 @@ export default {
}) })
}) })
}, },
goBack() { goBack() {
// this.$router.go(-1) // this.$router.go(-1)
if (JSON.stringify(this.ruleForm) == JSON.stringify(this.copyRuleForm) && this.choseItemList.length == this.copyChoseItemList.length && this.totalPrice == this.copyTotalPrice) { if (JSON.stringify(this.ruleForm) == JSON.stringify(this.copyRuleForm) && this.choseItemList.length == this.copyChoseItemList.length && this.totalPrice == this.copyTotalPrice) {
...@@ -455,7 +462,6 @@ export default { ...@@ -455,7 +462,6 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.live-room { .live-room {
/deep/ .el-icon-warning { /deep/ .el-icon-warning {
...@@ -497,13 +503,11 @@ export default { ...@@ -497,13 +503,11 @@ export default {
padding-top: 5px; padding-top: 5px;
padding-left: 10px; padding-left: 10px;
box-sizing: border-box; box-sizing: border-box;
.choseItem { .choseItem {
position: relative; position: relative;
min-width: 90px; min-width: 90px;
padding: 0 22px 0 6px; padding: 0 22px 0 6px;
box-sizing: border-box; box-sizing: border-box;
height: 26px; height: 26px;
line-height: 22px; line-height: 22px;
// background: #e6e9ff; // background: #e6e9ff;
...@@ -548,7 +552,6 @@ export default { ...@@ -548,7 +552,6 @@ export default {
margin-bottom: -5px; margin-bottom: -5px;
span { span {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
} }
...@@ -677,5 +680,15 @@ export default { ...@@ -677,5 +680,15 @@ export default {
margin-left: -110px; margin-left: -110px;
} }
} }
.give-tip {
font-weight: 400;
font-size: 12px;
color: #999999;
display: block;
margin: -15px 0 20px 154px;
}
}
/deep/ .el-form-item__error {
margin-left: 154px;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!