Commit 7f66b73f by 王志慧

bug修复

1 parent 94144ad9
......@@ -78,6 +78,15 @@ const getCardtypeList = params => {
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}
......@@ -603,6 +603,9 @@ html {
.marketing .pd-20 {
padding: 0 20px;
}
.marketing .hand {
cursor: pointer;
}
.el-tooltip__popper.is-light {
background: #ffffff;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08);
......
......@@ -156,7 +156,7 @@ export default {
},
watch: {
basicInfo(val) {
if (val.userList.length > 4) {
if (val.userList?.length > 4) {
this.limitUserList = val.userList.slice(0, 4)
} else {
this.limitUserList = val.userList
......
......@@ -134,7 +134,7 @@ export default {
}
},
{
label: '已发送客户',
label: '已送达客户',
prop: 'customerCount',
addHtml: 'customerCount'
// formatter: cellValue => {
......@@ -144,33 +144,42 @@ export default {
{
label: '互动客户',
prop: 'sendStaffCount',
prop: 'interactCount',
width: '110'
},
{
label: '互动率',
prop: 'sendStaffCount',
width: '110'
prop: 'interactRatio',
width: '110',
formatter: cellValue => {
return (cellValue.interactRatio*100).toFixed(0)+'%'
}
},
{
label: '点赞客户',
prop: 'unSendStaffCount',
prop: 'likeCount',
width: '110'
},
{
label: '点赞率',
prop: 'copyCustomerCount',
width: '110'
prop: 'likeRatio',
width: '110',
formatter: cellValue => {
return (cellValue.likeRatio*100).toFixed(0)+'%'
}
},
{
label: '评论客户',
prop: 'copyCustomerCount',
prop: 'commentCount',
width: '110'
},
{
label: '评论率',
prop: 'copyCustomerCount',
width: '110'
prop: 'commentRatio',
width: '110',
formatter: cellValue => {
return (cellValue.commentRatio*100).toFixed(0)+'%'
}
},
{
label: '操作',
......@@ -299,7 +308,7 @@ export default {
params.isFollowerStaff = isFollowerStaff
this.$apis.customerTransform.listDepartmentTree(params).then(res => {
if (res) {
this.tableEmpData = this.getEmployee(res)
this.tableEmpData =[{staffName:'全部',staffId:''}].concat(this.getEmployee(res))
} else {
this.treeData = []
}
......@@ -371,14 +380,14 @@ export default {
})
},
getStatistics(data) {
console.log(data)
//朋友圈id
this.drawerSearchForm.scrmMomentId = this.$refs.basicInfo.basicInfo.id
this.drawerSearchForm.type = ''
this.drawerSearchForm.isInteract = ''
this.drawerSearchForm.momentStaffId = ''
this.activeName = data.activeName
const titleArray=['已送达客户','点赞客户','评论客户','已送达客户']
this.infoTitle = titleArray[data.activeName-1]
if (data.activeName == 2) {
this.drawerSearchForm.type = 1
}
......
<template>
<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">
<img src="@/assets/memberCard.png" alt="" />
<div class="memberCardName">{{ ruleForm.cardName }}</div>
......@@ -16,7 +16,9 @@
<template v-if="showGh">
<div class="member-card"><img src="@/assets/silver.png" alt="" /></div>
</template>
<GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon" @click="openEditWrap" alt="" /></GLButton>
<template v-if="showGh && accountLevel != 4">
<GLButton @click="openEditWrap" fn="编辑" mode="div"><img src="@/assets/editBlue.png" class="editIcon" @click="openEditWrap" alt="" /></GLButton>
</template>
</div>
<template v-if="showGh">
<div class="flex-1 mt-10 line-20">
......@@ -61,12 +63,12 @@
<div class="pricesMerge">
<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> -->
</el-input>
</el-form-item>
<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> -->
</el-input>
</el-form-item>
......@@ -108,6 +110,9 @@
<div>{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div>
</span>
<span slot="optionBtns" slot-scope="scope">
<span class="txt-blue hand" @click="chancelMember(scope.scope)">取消会员</span>
</span>
</GLTable>
</div>
<GLDialog :mode="mode" title="权益详情" :hasFooter="hasFooter" :type="'error'" :visible.sync="isDialogVisible">
......@@ -161,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 } 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: {
......@@ -173,7 +178,7 @@ export default {
return {
mode: 'mid',
hasFooter: false,
showGh: false,
showGh: true,
promotionForm: {
QRurl: '',
QRcode: ''
......@@ -257,7 +262,6 @@ export default {
{
label: '会员用户',
prop: 'accountName',
width: '180',
addHtml: 'accountName'
},
{
......@@ -371,6 +375,7 @@ export default {
this.accountLevel = this.$globalState.session.accountLevel
}
this.showGh = window.location.host.indexOf('cgacar') != -1
this.judgeGh()
this.getCardContentFun()
this.getCardtypeList()
},
......@@ -378,6 +383,39 @@ export default {
this.getOptionsList('searchFormData')
},
methods: {
judgeGh() {
this.baseData.openModeList.push({
dictValue: 13,
dictLabel: '通过门店套餐赠送'
})
this.tableParams.tableColumns.push({
label: '操作',
width: '140px',
addHtml: 'optionBtns'
})
},
chancelMember(data) {
console.log(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' ? '取消成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleSearch()
}
})
}
}
})
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
......
......@@ -72,7 +72,7 @@
<div class="dialog-refund">
<img class="img" src="../../images/warn.png" />
<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>
</GLDialog>
......@@ -102,6 +102,7 @@ export default {
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
url: url,
isReload: true,
showGh: true,
size: 'small',
searchForm: {
orderStatus: '', //默认查询全部
......@@ -157,7 +158,7 @@ export default {
name: 'shareStaffName',
type: 'input',
maxlength: 100
},
}
],
choseList: ['全部', '待收货', '已完成', '退款|售后'],
currentIndex: 1,
......@@ -290,6 +291,8 @@ export default {
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
}
this.showGh = window.location.host.indexOf('cgacar') != -1
this.judgeGh()
// if (this.$isGroupUp) {
// let idx = this.tableParams.tableColumns.findIndex(item => item.label == '推荐人')
// this.tableParams.tableColumns.splice(idx, 1)
......@@ -299,6 +302,19 @@ export default {
this.getOptionsList('searchFormData')
},
methods: {
judgeGh() {
this.searchFormData.push({
label: '收款商户',
name: 'merchantName',
type: 'input',
maxlength: 100
})
this.tableParams.tableColumns.push({
label: '收款商户',
width: '140px',
prop: 'merchantName'
})
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
......
......@@ -29,7 +29,13 @@
</div>
<div class="el-form-item__error" v-if="setmealContentRules">请选择套餐</div>
</el-form-item>
<el-form-item label="赠送金卡会员:" prop="giveGoldFlag" v-if="showGh">
<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-input size="small" v-model="ruleForm.packagePrice" placeholder="请输入套餐售价" @keyup.native="ruleForm.packagePrice = oninput(ruleForm.packagePrice)">
<!-- <span slot="suffix" class="suffix-label">元</span> -->
......@@ -86,8 +92,8 @@ export default {
var validatePrice = (rule, value, callback) => {
if (!value) {
return callback(new Error('请输入售价'))
} else if (value < this.memberPrice && this.accountLevel !== 4 && this.showGh) {
return callback(new Error('套餐售价需大于会员卡的售价'))
} else if (value < this.memberPrice && this.ruleForm.giveGoldFlag == 2 && this.showGh) {
return callback(new Error('套餐售价不能低于会员卡价格'))
} else {
callback()
}
......@@ -100,12 +106,14 @@ export default {
packagePrice: '',
switchStatus: true,
// couponList:[],
notes: ''
notes: '',
giveGoldFlag: 2
},
copyRuleForm: {}, //用于检查页面信息是否改动
rules: {
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: [],
choseItemList: [], //['一年12次洗车券×1', '车身打蜡×2', '全车镀膜×1'],
......@@ -163,7 +171,7 @@ export default {
copyTotalPrice: 0, //用于检查页面信息是否改动
id: this.$route.query.id || 0,
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
showGh: false
showGh: true
}
},
computed: {
......@@ -186,8 +194,8 @@ export default {
this.merchantName = this.$globalState.session.merchantName
this.accountLevel = this.$globalState.session.accountLevel
}
let href = window.location.host
this.showGh = href.indexOf('cgacar') != -1
// this.showGh = window.location.host.indexOf('cgacar')= -1
if (this.showGh) {
this.getCardContentFun()
}
......@@ -195,18 +203,16 @@ export default {
this.getServiceInfo()
// this.getSetmealServiceFun() //获取服务套餐,执行完了之后去获取编辑详情
},
mounted() { },
mounted() {},
methods: {
//获取会员卡上方卡片的相关信息
getCardContentFun() {
if (this.accountLevel !== 4) {
getCardContent({ merchantId: this.merchantId }).then(res => {
if (!res) {
return
}
this.memberPrice = res.goodPrice
})
}
},
// 礼包
recoveryGiftList() {
......@@ -322,6 +328,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
let lists = this.choseItemList
for (var k in lists) {
param[`lists[${k}].serviceQuantity`] = lists[k].couponAmount
......@@ -357,6 +364,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
let list = this.choseItemList
for (var i in list) {
params[`list[${i}].serviceQuantity`] = list[i].couponAmount
......@@ -677,5 +685,15 @@ export default {
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>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!