Commit eb04935d by 王志慧

广汇需求

1 parent 7f66b73f
......@@ -16,7 +16,7 @@
<template v-if="showGh">
<div class="member-card"><img src="@/assets/silver.png" alt="" /></div>
</template>
<template v-if="showGh && accountLevel != 4">
<template v-if="(showGh && accountLevel != 4) || !showGh">
<GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon" @click="openEditWrap" alt="" /></GLButton>
</template>
</div>
......@@ -110,7 +110,7 @@
<div>{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div>
</span>
<span slot="optionBtns" slot-scope="scope">
<span slot="optionBtns" slot-scope="scope" v-if="scope.scope.memberStatus == 1">
<span class="txt-blue hand" @click="chancelMember(scope.scope)">取消会员</span>
</span>
</GLTable>
......@@ -166,7 +166,7 @@ const cloneText = message => {
input.setSelectionRange(0, input.value.length), document.execCommand('Copy')
document.body.removeChild(input)
}
import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi, getQrUrl, getCardtypeList,resetCard } from '@/api/modules/center'
import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi, getQrUrl, getCardtypeList, resetCard } from '@/api/modules/center'
import { statusList, memberTypeList, exportFn } from '@/common/constant'
export default {
filters: {
......@@ -178,7 +178,7 @@ export default {
return {
mode: 'mid',
hasFooter: false,
showGh: true,
showGh: false,
promotionForm: {
QRurl: '',
QRcode: ''
......@@ -375,7 +375,7 @@ export default {
this.accountLevel = this.$globalState.session.accountLevel
}
this.showGh = window.location.host.indexOf('cgacar') != -1
this.judgeGh()
if (this.showGh) this.judgeGh()
this.getCardContentFun()
this.getCardtypeList()
},
......@@ -384,10 +384,13 @@ export default {
},
methods: {
judgeGh() {
this.baseData.openModeList.push({
dictValue: 13,
dictLabel: '通过门店套餐赠送'
})
if (this.accountLevel == 4) {
this.baseData.openModeList.push({
dictValue: 13,
dictLabel: '通过门店套餐赠送'
})
}
this.tableParams.tableColumns.push({
label: '操作',
width: '140px',
......@@ -395,7 +398,6 @@ export default {
})
},
chancelMember(data) {
console.log(data)
this.$messageBox.confirm('此操作会将该会员用户的剩余会员有效天数扣减1年或归0,是否确认继续操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -403,9 +405,9 @@ export default {
// type: 'error',
callback: action => {
if (action == 'confirm') {
resetCard({mobile:data.mobile}).then(res => {
resetCard({ mobile: data.mobile }).then(res => {
this.$message({
message: res.code == '0' ? '取消成功' : res.message,
message: res.code == '0' ? '取消成功' : '将该用户的会员有效天数扣减365天,不足365天则直接将会员身份变更为普通会员',
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
......
......@@ -102,7 +102,7 @@ export default {
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
url: url,
isReload: true,
showGh: true,
showGh: false,
size: 'small',
searchForm: {
orderStatus: '', //默认查询全部
......@@ -292,7 +292,7 @@ export default {
this.accountLevel = this.$globalState.session.accountLevel
}
this.showGh = window.location.host.indexOf('cgacar') != -1
this.judgeGh()
if(this.showGh) this.judgeGh()
// if (this.$isGroupUp) {
// let idx = this.tableParams.tableColumns.findIndex(item => item.label == '推荐人')
// this.tableParams.tableColumns.splice(idx, 1)
......@@ -305,14 +305,36 @@ export default {
judgeGh() {
this.searchFormData.push({
label: '收款商户',
name: 'merchantName',
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: 'merchantName'
prop: 'payMerchantName'
},
{
label: '车牌号',
width: '140px',
prop: 'plateNum'
},
{
label: '车架号',
width: '140px',
prop: 'standNo'
})
},
getOptionsList(formName, hasAll = true, refreshSigle) {
......
......@@ -107,7 +107,7 @@ export default {
switchStatus: true,
// couponList:[],
notes: '',
giveGoldFlag: 2
giveGoldFlag: ''
},
copyRuleForm: {}, //用于检查页面信息是否改动
rules: {
......@@ -171,7 +171,7 @@ export default {
copyTotalPrice: 0, //用于检查页面信息是否改动
id: this.$route.query.id || 0,
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
showGh: true
showGh: false
}
},
computed: {
......@@ -195,24 +195,28 @@ export default {
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.getCardContentFun()
}
this.getServiceInfo()
if (this.id) {
this.getServiceInfo()
} else {
this.ruleForm.giveGoldFlag = 2
}
// this.getSetmealServiceFun() //获取服务套餐,执行完了之后去获取编辑详情
},
mounted() {},
methods: {
//获取会员卡上方卡片的相关信息
getCardContentFun() {
getCardContent({ merchantId: this.merchantId }).then(res => {
if (!res) {
return
}
this.memberPrice = res.goodPrice
})
getCardContent({ merchantId: this.merchantId }).then(res => {
if (!res) {
return
}
this.memberPrice = res.goodPrice
})
},
// 礼包
recoveryGiftList() {
......@@ -328,7 +332,7 @@ export default {
param.packagePrice = this.ruleForm.packagePrice
param.notes = this.ruleForm.notes
param.switchStatus = this.ruleForm.switchStatus ? 1 : 0
param.giveGoldFlag = this.ruleForm.giveGoldFlag
if(this.showGh) param.giveGoldFlag = this.ruleForm.giveGoldFlag
let lists = this.choseItemList
for (var k in lists) {
param[`lists[${k}].serviceQuantity`] = lists[k].couponAmount
......@@ -364,7 +368,7 @@ export default {
params.packagePrice = this.ruleForm.packagePrice
params.notes = this.ruleForm.notes
params.switchStatus = this.ruleForm.switchStatus ? 1 : 0
params.giveGoldFlag = this.ruleForm.giveGoldFlag
if(this.showGh) params.giveGoldFlag = this.ruleForm.giveGoldFlag
let list = this.choseItemList
for (var i in list) {
params[`list[${i}].serviceQuantity`] = list[i].couponAmount
......@@ -693,7 +697,7 @@ export default {
margin: -15px 0 20px 154px;
}
}
/deep/ .el-form-item__error{
margin-left:154px;
/deep/ .el-form-item__error {
margin-left: 154px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!