Commit 64da95a7 by 王志慧

commit

1 parent 77c138c6
<template> <template>
<div class="marketing live-room"> <div class="marketing live-room">
<div class="memberCardWrap" v-if="showGh||!(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>
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
<div class="member-card"><img src="@/assets/silver.png" alt="" /></div> <div class="member-card"><img src="@/assets/silver.png" alt="" /></div>
</template> </template>
<template> <template>
<GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon" @click="openEditWrap" alt="" /></GLButton> <GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon"
@click="openEditWrap" alt="" /></GLButton>
</template> </template>
</div> </div>
<template v-if="showGh"> <template v-if="showGh">
...@@ -28,7 +29,6 @@ ...@@ -28,7 +29,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>
...@@ -49,44 +49,49 @@ ...@@ -49,44 +49,49 @@
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
<template v-if="!showGh"> <template v-if="!showGh">
<el-form-item label="会员卡名:" prop="cardName" size="small"> <el-form-item label="会员卡名:" prop="cardName" size="small">
<el-input v-model.trim="ruleForm.cardName" size="small" class="cardNameInput" show-word-limit placeholder="请输入会员卡名" maxlength="15"></el-input> <el-input v-model.trim="ruleForm.cardName" size="small" class="cardNameInput" show-word-limit
placeholder="请输入会员卡名" maxlength="15"></el-input>
</el-form-item> </el-form-item>
</template> </template>
<template v-else> <template v-else>
<el-form-item label="银卡" prop="cardName" size="small"> <el-form-item label="银卡" prop="cardName" size="small">
<el-input v-model.trim="ruleForm.cardName" size="small" class="cardNameInput" show-word-limit placeholder="请输入银卡名称" maxlength="15"></el-input> <el-input v-model.trim="ruleForm.cardName" size="small" class="cardNameInput" show-word-limit
placeholder="请输入银卡名称" maxlength="15"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="金卡" prop="goldCardClassName" size="small"> <el-form-item label="金卡" prop="goldCardClassName" size="small">
<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>
</div> </div>
<el-form-item :class="!ruleForm.tryNum ? 'is-error' : ''" class="memberTrial" label="会员卡试用" size="small"> <el-form-item :class="!ruleForm.tryNum ? 'is-error' : ''" class="memberTrial" label="会员卡试用" size="small">
<div class="trialMerge"> <div class="trialMerge">
<el-switch class="switchTag" active-value="1" inactive-value="0" v-model="ruleForm.tryAble" active-color="#5850FF" inactive-color="#E8E8EA" active-text="开" inactive-text="关"></el-switch> <el-switch class="switchTag" active-value="1" inactive-value="0" v-model="ruleForm.tryAble"
active-color="#5850FF" inactive-color="#E8E8EA" active-text="开" inactive-text="关"></el-switch>
<div class="trialDays" v-if="ruleForm.tryAble == 1"> <div class="trialDays" v-if="ruleForm.tryAble == 1">
<span>试用时长</span> <span>试用时长</span>
<el-input-number v-model="ruleForm.tryNum" :controls="false" :min="1" :max="365"></el-input-number> <el-input-number v-model="ruleForm.tryNum" :controls="false" :min="1" :max="365"></el-input-number>
<span>天试用</span> <span>天试用</span>
</div> </div>
<div class="el-form-item__error trialDays_error" v-if="ruleForm.tryAble == 1 && !ruleForm.tryNum">请输入试用时长</div> <div class="el-form-item__error trialDays_error" v-if="ruleForm.tryAble == 1 && !ruleForm.tryNum">请输入试用时长
</div>
</div> </div>
<!-- <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>
...@@ -96,22 +101,24 @@ ...@@ -96,22 +101,24 @@
</div> </div>
<div class="pageTitle">会员用户</div> <div class="pageTitle">会员用户</div>
<div class="live-room container"> <div class="live-room container">
<GLCombiForm class="p-t-20" ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm class="p-t-20" ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData"
@handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex-between m-b-10 m-t-10"> <div class="flex-between m-b-10 m-t-10">
<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"
<GLTable ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> :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>
</div> </div>
<span slot="accountName" slot-scope="scope"> <span slot="accountName" slot-scope="scope">
<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 slot="optionBtns" slot-scope="scope" v-if="scope.scope.goldMemberStatus == 1">
<span class="txt-blue hand" @click="chancelMember(scope.scope)">取消会员</span> <span class="txt-blue pointer" @click="chancelMember(scope.scope)">取消会员</span>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -147,7 +154,8 @@ ...@@ -147,7 +154,8 @@
</div> </div>
<el-form-item label="领取链接" style="margin-top: 20px"> <el-form-item label="领取链接" style="margin-top: 20px">
<div class="lineCtn"> <div class="lineCtn">
<el-input disabled="true" :value="`${promotionForm.QRurl}`" maxlength="14" placeholder="请输入链接" clearable></el-input> <el-input disabled="true" :value="`${promotionForm.QRurl}`" maxlength="14" placeholder="请输入链接"
clearable></el-input>
<el-button size="small" type="primary" @click="closeText(`${promotionForm.QRurl}`)">复制链接</el-button> <el-button size="small" type="primary" @click="closeText(`${promotionForm.QRurl}`)">复制链接</el-button>
</div> </div>
</el-form-item> </el-form-item>
...@@ -156,7 +164,6 @@ ...@@ -156,7 +164,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')
...@@ -178,7 +185,7 @@ export default { ...@@ -178,7 +185,7 @@ export default {
return { return {
mode: 'mid', mode: 'mid',
hasFooter: false, hasFooter: false,
showGh: true, showGh: false,
promotionForm: { promotionForm: {
QRurl: '', QRurl: '',
QRcode: '' QRcode: ''
...@@ -339,9 +346,7 @@ export default { ...@@ -339,9 +346,7 @@ export default {
} }
] ]
}, },
isShowEditWrap: false, isShowEditWrap: false,
ruleForm: { ruleForm: {
equityId: '', equityId: '',
cardName: '', cardName: '',
...@@ -374,7 +379,8 @@ export default { ...@@ -374,7 +379,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 // 取消判断
this.showGh = window.location.host.indexOf('cgacar') != -1
if (this.showGh) this.judgeGh() if (this.showGh) this.judgeGh()
this.getCardContentFun() this.getCardContentFun()
this.getCardtypeList() this.getCardtypeList()
...@@ -390,7 +396,6 @@ export default { ...@@ -390,7 +396,6 @@ export default {
dictLabel: '通过门店套餐赠送' dictLabel: '通过门店套餐赠送'
}) })
} }
this.tableParams.tableColumns.push({ this.tableParams.tableColumns.push({
label: '操作', label: '操作',
width: '140px', width: '140px',
...@@ -443,7 +448,6 @@ export default { ...@@ -443,7 +448,6 @@ export default {
}) })
} }
}, },
//门店会员开通方式 //门店会员开通方式
getCardtypeList() { getCardtypeList() {
getCardtypeList({}).then(res => { getCardtypeList({}).then(res => {
...@@ -616,7 +620,6 @@ export default { ...@@ -616,7 +620,6 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.centerTable { .centerTable {
padding-left: 10px; padding-left: 10px;
...@@ -773,7 +776,6 @@ export default { ...@@ -773,7 +776,6 @@ export default {
} }
} }
} }
.pageTitle { .pageTitle {
position: relative; position: relative;
padding: 15px 20px; padding: 15px 20px;
...@@ -798,7 +800,6 @@ export default { ...@@ -798,7 +800,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;
} }
...@@ -865,7 +866,6 @@ export default { ...@@ -865,7 +866,6 @@ export default {
overflow: hidden; overflow: hidden;
} }
} }
.pricesMerge { .pricesMerge {
display: flex; display: flex;
width: 1500px; width: 1500px;
...@@ -927,5 +927,4 @@ export default { ...@@ -927,5 +927,4 @@ export default {
color: #5850ff; color: #5850ff;
cursor: pointer; cursor: pointer;
} }
} }</style>
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="live-room marketing"> <div class="live-room marketing">
<div class="live-room container"> <div class="live-room container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData"
@handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- <div class="flex"> <!-- <div class="flex">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right"> <el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row> <el-row>
...@@ -46,12 +47,15 @@ ...@@ -46,12 +47,15 @@
</el-form> </el-form>
</div> --> </div> -->
<div class="choseRow m-b-10"> <div class="choseRow m-b-10">
<div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index + 1)"> <div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList"
:key="index" @click="tabClick(index + 1)">
{{ item }} {{ item }}
</div> </div>
<el-button :size="size" class="default-blue-btn m-l-20" type="default" @click="handleExport">导出</el-button> <el-button :size="size" class="default-blue-btn m-l-20" type="default" @click="handleExport">导出</el-button>
</div> </div>
<GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun"
:searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf"
:beforeSearchFn="beforeSearchFn">
<div slot="orderType" slot-scope="scope" style="width: 200px"> <div slot="orderType" slot-scope="scope" style="width: 200px">
<template v-if="scope.scope.orderType == 1"> <template v-if="scope.scope.orderType == 1">
<span>{{ scope.scope.packageType == 1 ? '门店套餐' : '集团套餐' }}</span> <span>{{ scope.scope.packageType == 1 ? '门店套餐' : '集团套餐' }}</span>
...@@ -68,7 +72,8 @@ ...@@ -68,7 +72,8 @@
</span> </span>
</GLTable> </GLTable>
</div> </div>
<GLDialog class="refund-fill-boxss" mode="small" okText="确定" title="提示" :hasFooter="hasFooter" :type="'error'" @onOk="isShow = false" @onCancel="isShow = false" :visible.sync="isShow"> <GLDialog class="refund-fill-boxss" mode="small" okText="确定" title="提示" :hasFooter="hasFooter" :type="'error'"
@onOk="isShow = false" @onCancel="isShow = false" :visible.sync="isShow">
<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>
...@@ -76,7 +81,8 @@ ...@@ -76,7 +81,8 @@
<div>暂不支持退款</div> <div>暂不支持退款</div>
</div> </div>
</GLDialog> </GLDialog>
<GLDialog class="refund-fill-box" mode="mid" title="退款确认" :hasFooter="hasFooter" :type="'error'" @onOk="refundConfirmDialog" @onCancel="refundVisible = false" :visible.sync="refundVisible"> <GLDialog class="refund-fill-box" mode="mid" title="退款确认" :hasFooter="hasFooter" :type="'error'"
@onOk="refundConfirmDialog" @onCancel="refundVisible = false" :visible.sync="refundVisible">
<div class="dialog-form"> <div class="dialog-form">
<label>说明:</label> <label>说明:</label>
<el-input v-model.trim="refund" type="textarea" :rows="3" placeholder="请输入退款说明"></el-input> <el-input v-model.trim="refund" type="textarea" :rows="3" placeholder="请输入退款说明"></el-input>
...@@ -84,7 +90,6 @@ ...@@ -84,7 +90,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,7 +107,7 @@ export default { ...@@ -102,7 +107,7 @@ export default {
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店 accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
url: url, url: url,
isReload: true, isReload: true,
showGh: true, showGh: false,
size: 'small', size: 'small',
searchForm: { searchForm: {
orderStatus: '', //默认查询全部 orderStatus: '', //默认查询全部
...@@ -291,8 +296,9 @@ export default { ...@@ -291,8 +296,9 @@ 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() 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)
...@@ -303,7 +309,8 @@ export default { ...@@ -303,7 +309,8 @@ export default {
}, },
methods: { methods: {
judgeGh() { judgeGh() {
this.searchFormData.push({ this.searchFormData.push(
{
label: '收款商户', label: '收款商户',
name: 'payMerchantName', name: 'payMerchantName',
type: 'input', type: 'input',
...@@ -320,8 +327,10 @@ export default { ...@@ -320,8 +327,10 @@ export default {
name: 'standNo', name: 'standNo',
type: 'input', type: 'input',
maxlength: 100 maxlength: 100
}) }
this.tableParams.tableColumns.push({ )
this.tableParams.tableColumns.push(
{
label: '收款商户', label: '收款商户',
width: '140px', width: '140px',
prop: 'payMerchantName' prop: 'payMerchantName'
...@@ -335,7 +344,8 @@ export default { ...@@ -335,7 +344,8 @@ export default {
label: '车架号', label: '车架号',
width: '140px', width: '140px',
prop: 'standNo' prop: 'standNo'
}) }
)
}, },
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
...@@ -362,7 +372,6 @@ export default { ...@@ -362,7 +372,6 @@ export default {
}) })
} }
}, },
tabClick(index) { tabClick(index) {
this.currentIndex = index this.currentIndex = index
switch (index) { switch (index) {
...@@ -393,7 +402,6 @@ export default { ...@@ -393,7 +402,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) {
...@@ -403,7 +411,6 @@ export default { ...@@ -403,7 +411,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()
...@@ -463,14 +470,12 @@ export default { ...@@ -463,14 +470,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()
}, },
...@@ -506,7 +511,6 @@ export default { ...@@ -506,7 +511,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;
...@@ -514,7 +518,6 @@ export default { ...@@ -514,7 +518,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 {
...@@ -581,5 +584,4 @@ export default { ...@@ -581,5 +584,4 @@ export default {
// ::v-deep .el-dialog__footer { // ::v-deep .el-dialog__footer {
// text-align: center; // text-align: center;
// } // }
} }</style>
</style>
\ No newline at end of file \ No newline at end of file
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
<div class="gift-content"> <div class="gift-content">
<div class="gift-item" v-for="(subItem, subIndex) in couponObj[item].list" :key="subIndex"> <div class="gift-item" v-for="(subItem, subIndex) in couponObj[item].list" :key="subIndex">
<span :class="['circle', subItem.status == '3' ? ' grey' : '']"></span> <span :class="['circle', subItem.status == '3' ? ' grey' : '']"></span>
<div :class="['gift-coupon-name', subItem.status == '3' ? ' txt-grey' : '']">{{ subItem.couponName }} × {{ subItem.couponAmount }}</div> <div :class="['gift-coupon-name', subItem.status == '3' ? ' txt-grey' : '']">{{ subItem.couponName }}
× {{ subItem.couponAmount }}</div>
<div v-show="subItem.status == '3'" class="gift-tips">已失效</div> <div v-show="subItem.status == '3'" class="gift-tips">已失效</div>
<i class="el-icon-delete" @click="handleGiftDelete(item, subIndex)"></i> <i class="el-icon-delete" @click="handleGiftDelete(item, subIndex)"></i>
</div> </div>
...@@ -29,7 +30,7 @@ ...@@ -29,7 +30,7 @@
</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-form-item label="赠送金卡会员:" prop="giveGoldFlag" v-if="showGh && accountLevel == 4">
<el-radio-group v-model="ruleForm.giveGoldFlag"> <el-radio-group v-model="ruleForm.giveGoldFlag">
<el-radio :label="2">赠送</el-radio> <el-radio :label="2">赠送</el-radio>
<el-radio :label="1">不赠送</el-radio> <el-radio :label="1">不赠送</el-radio>
...@@ -37,7 +38,8 @@ ...@@ -37,7 +38,8 @@
</el-form-item> </el-form-item>
<span class="give-tip">选择赠送,客户购买该套餐后即开通一年金卡会员权益</span> <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> -->
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -67,7 +69,8 @@ ...@@ -67,7 +69,8 @@
</div> </div>
</template> --> </template> -->
<el-form-item size="small" label="说明:" prop="notes"> <el-form-item size="small" label="说明:" prop="notes">
<el-input size="small" :rows="6" type="textarea" v-model="ruleForm.notes" placeholder="请输入" maxlength="200" show-word-limit></el-input> <el-input size="small" :rows="6" type="textarea" v-model="ruleForm.notes" placeholder="请输入" maxlength="200"
show-word-limit></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -75,11 +78,13 @@ ...@@ -75,11 +78,13 @@
<el-button @click="goBack" size="medium">取消</el-button> <el-button @click="goBack" size="medium">取消</el-button>
<el-button type="primary" @click="submitForm()" size="medium" :loading="sloading">提交</el-button> <el-button type="primary" @click="submitForm()" size="medium" :loading="sloading">提交</el-button>
</GLFooter> </GLFooter>
<GLDialog mode="small" type="warning" @onOk="handleTipConfirm" content="当前有内容信息未保存,是否继续返回?" @onCancel="handleTipClose" :visible.sync="isTipDialogVisible"></GLDialog> <GLDialog mode="small" type="warning" @onOk="handleTipConfirm" content="当前有内容信息未保存,是否继续返回?" @onCancel="handleTipClose"
<select-gift-dialog v-if="isSelectGiftVisible" :isSelectGiftVisible="isSelectGiftVisible" :selectedGiftList="selectedMealList" @handleGiftConfirm="handleGiftConfirm" @handleGiftClose="handleGiftClose"></select-gift-dialog> :visible.sync="isTipDialogVisible"></GLDialog>
<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'
...@@ -92,7 +97,7 @@ export default { ...@@ -92,7 +97,7 @@ 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.ruleForm.giveGoldFlag == 2 && 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()
...@@ -171,7 +176,7 @@ export default { ...@@ -171,7 +176,7 @@ export default {
copyTotalPrice: 0, //用于检查页面信息是否改动 copyTotalPrice: 0, //用于检查页面信息是否改动
id: this.$route.query.id || 0, id: this.$route.query.id || 0,
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店 accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
showGh: true showGh: false
} }
}, },
computed: { computed: {
...@@ -194,12 +199,10 @@ export default { ...@@ -194,12 +199,10 @@ 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
} }
this.showGh = window.location.host.indexOf('cgacar')!= -1
// this.showGh = window.location.host.indexOf('cgacar')!= -1
if (this.showGh) { if (this.showGh) {
this.getCardContentFun() this.getCardContentFun()
} }
if (this.id) { if (this.id) {
this.getServiceInfo() this.getServiceInfo()
} else { } else {
...@@ -207,7 +210,7 @@ export default { ...@@ -207,7 +210,7 @@ export default {
} }
// this.getSetmealServiceFun() //获取服务套餐,执行完了之后去获取编辑详情 // this.getSetmealServiceFun() //获取服务套餐,执行完了之后去获取编辑详情
}, },
mounted() {}, mounted() { },
methods: { methods: {
//获取会员卡上方卡片的相关信息 //获取会员卡上方卡片的相关信息
getCardContentFun() { getCardContentFun() {
...@@ -226,9 +229,9 @@ export default { ...@@ -226,9 +229,9 @@ export default {
this.choseItemList.push(k) this.choseItemList.push(k)
}) })
}) })
if (this.choseItemList.length> 0) { if (this.choseItemList.length > 0) {
this.setmealContentRules = false this.setmealContentRules = false
}else{ } else {
this.setmealContentRules = true this.setmealContentRules = true
} }
}, },
...@@ -282,7 +285,6 @@ export default { ...@@ -282,7 +285,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)) //深拷贝一份数据
...@@ -318,7 +320,6 @@ export default { ...@@ -318,7 +320,6 @@ export default {
} }
return return
} }
if (this.id) { if (this.id) {
//需要调config的接口???? //需要调config的接口????
// scrm.api.equity.package.service.config // scrm.api.equity.package.service.config
...@@ -418,7 +419,6 @@ export default { ...@@ -418,7 +419,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) {
...@@ -468,7 +468,6 @@ export default { ...@@ -468,7 +468,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 {
...@@ -510,13 +509,11 @@ export default { ...@@ -510,13 +509,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;
...@@ -561,7 +558,6 @@ export default { ...@@ -561,7 +558,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;
} }
...@@ -599,7 +595,7 @@ export default { ...@@ -599,7 +595,7 @@ export default {
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
margin-top: 10px; margin-top: 10px;
> span:first-child { >span:first-child {
display: inline-block; display: inline-block;
min-width: 165px; min-width: 165px;
text-align: right; text-align: right;
...@@ -700,5 +696,4 @@ export default { ...@@ -700,5 +696,4 @@ export default {
} }
/deep/ .el-form-item__error { /deep/ .el-form-item__error {
margin-left: 154px; 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!