Commit e167c5ad by 王志慧

fixed

1 parent 52323c41
...@@ -31,13 +31,12 @@ ...@@ -31,13 +31,12 @@
<div> <div>
<p class="hint-text color-6"> <p class="hint-text color-6">
<span class="color-3">说明:</span> <span class="color-3">说明:</span>
仅支持{{ '企业' | tagType }}标签 仅支持自店标签
<span v-if="merchantModel == 1">和自店标签</span> <!-- <span v-if="merchantModel == 1">和自店标签</span> -->
进行人工维护和设置 进行人工维护和设置
</p> </p>
<p class="hint-text mg10">系统标签通过大数据算法进行自动更新,不支持人工维护和编辑</p> <p class="hint-text mg10">系统标签通过大数据算法进行自动更新,不支持人工维护和编辑</p>
<div class="labels-wrap" v-for="(group, index) in allTagsList" :key="index"> <div class="labels-wrap" v-for="(group, index) in allTagsList" :key="index">
<template v-if="(merchantModel == 2 && group.labelType != '自店标签') || merchantModel == 1">
<div class="label-wrap"> <div class="label-wrap">
<div class="label-group-name">{{ group.labelType }}</div> <div class="label-group-name">{{ group.labelType }}</div>
<div class="labels" v-for="(labels, ids) in group.children" :key="ids"> <div class="labels" v-for="(labels, ids) in group.children" :key="ids">
...@@ -57,7 +56,6 @@ ...@@ -57,7 +56,6 @@
</div> </div>
</div> </div>
</div> </div>
</template>
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -160,7 +158,8 @@ export default { ...@@ -160,7 +158,8 @@ export default {
'labelTreeReq.shopId': this.merchantId, 'labelTreeReq.shopId': this.merchantId,
'labelTreeReq.edition': this.merchantModel, 'labelTreeReq.edition': this.merchantModel,
'labelTreeReq.pageNum': 1, 'labelTreeReq.pageNum': 1,
'labelTreeReq.pageSize': 3000 'labelTreeReq.pageSize': 3000,
"labelTreeReq.belongType":2
}) })
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
...@@ -175,6 +174,7 @@ export default { ...@@ -175,6 +174,7 @@ export default {
} }
] ]
res.data.labelTreeRets.forEach(labels => { res.data.labelTreeRets.forEach(labels => {
console.log(labels)
labels.labelList.forEach(ele => { labels.labelList.forEach(ele => {
ele.checked = false ele.checked = false
ele.original = false ele.original = false
...@@ -185,10 +185,7 @@ export default { ...@@ -185,10 +185,7 @@ export default {
} }
}) })
}) })
if (labels.labelType == '企业标签') { if (labels.labelType == '自店标签') {
allTagsList[0].labelType = this.$globalState.session.merchantModel == 1 ? '集团标签' : '企业标签'
allTagsList[0].children.push(labels)
} else if (labels.labelType == '自店标签') {
allTagsList[1].labelType = '自店标签' allTagsList[1].labelType = '自店标签'
allTagsList[1].children.push(labels) allTagsList[1].children.push(labels)
} }
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
最多3000个 最多3000个
</span> </span>
<span class="tagTipMsg" v-if="tagDialogTitle == '添加标签组' && tagForm.initTagsGroup == 1"> <span class="tagTipMsg" v-if="tagDialogTitle == '添加标签组' && tagForm.initTagsGroup == 1">
{{ '企业' | tagType }}标签已创建 自店标签已创建
<span class="pure-blue-text">{{ numberObj.bizLabelCount }}</span> <span class="pure-blue-text">{{ numberObj.bizLabelCount }}</span>
个 个
</span> </span>
...@@ -459,7 +459,7 @@ export default { ...@@ -459,7 +459,7 @@ export default {
groupVisible: false, groupVisible: false,
tagForm: { tagForm: {
tagsName: '', tagsName: '',
initTagsGroup: 1, initTagsGroup: 2,
mode: '人工', mode: '人工',
tagsList: [] tagsList: []
}, },
...@@ -498,7 +498,7 @@ export default { ...@@ -498,7 +498,7 @@ export default {
// tagsList: [{ required: true }] // tagsList: [{ required: true }]
}, },
tagsGroupList: [ tagsGroupList: [
{ id: 1, name: this.$globalState.session.merchantModel == 1 ? '集团标签' : '企业标签' }, // { id: 1, name: this.$globalState.session.merchantModel == 1 ? '集团标签' : '企业标签' },
{ id: 2, name: '自店标签' } { id: 2, name: '自店标签' }
], ],
modeList: [{ id: 1, name: '人工' }], modeList: [{ id: 1, name: '人工' }],
...@@ -529,31 +529,6 @@ export default { ...@@ -529,31 +529,6 @@ 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.userType = this.$globalState.session.userType this.userType = this.$globalState.session.userType
// if (this.merchantModel == 1) {
// if (!(this.accountLevel == 1 && this.userType == 1)) this.tagsGroupList.splice(0, 1) //只能创建自店标签
// }
//1.0.1集团下的省代、市代,门店只能创建自店标签
if (this.merchantModel == 1) {
if (this.accountLevel == 2 || this.accountLevel == 3 || this.accountLevel == 4) {
this.tagsGroupList.splice(0, 1) //只能创建自店标签
// this.tagsPartFormList[0].options.splice(0, 1)
}
}
if (this.merchantModel == 1) {
if (this.accountLevel == 1) {
//集团下的工厂只能创建企微标签,自店标签不要了
this.tagsGroupList.splice(1, 1)
// this.tagsPartFormList[0].options.splice(1, 1)
}
}
// 集团授权模式下的门店账号,拥有标签管理模块权限,修改为:去掉门店的“标签管理”模块权限
// 单店授权模式下的门店账号,创建标签组时,可创建企业标签和自店标签,修改为:创建标签组时,仅能选择企业标签,去掉自店标签选项;
if (this.merchantModel == 2) {
if (this.accountLevel == 4) {
this.tagsGroupList.splice(1, 1)
// this.tagsPartFormList[0].options.splice(1, 1)
}
}
} }
this.searchForm = { 'labelTreeReq.shopId': this.merchantId, 'labelTreeReq.edition': this.merchantModel } this.searchForm = { 'labelTreeReq.shopId': this.merchantId, 'labelTreeReq.edition': this.merchantModel }
this.getLoginCountFun() this.getLoginCountFun()
...@@ -686,10 +661,6 @@ export default { ...@@ -686,10 +661,6 @@ export default {
case 'create': case 'create':
this.tagDialogTitle = '添加标签组' this.tagDialogTitle = '添加标签组'
this.tagForm.tagsForm = '' this.tagForm.tagsForm = ''
this.tagForm.initTagsGroup = 1 //默认改成,企业标签
if (this.merchantModel == 1 && (this.accountLevel == 2 || this.accountLevel == 3 || this.accountLevel == 4)) {
this.tagForm.initTagsGroup = 2
}
this.$set(this.tagDialogData[0], 'disabled', false) this.$set(this.tagDialogData[0], 'disabled', false)
this.handleClose() this.handleClose()
break break
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!