Commit 6996faa5 by liuchenxi

update: 同步微盟弹窗提醒

parent 744fa657
......@@ -84,7 +84,8 @@ export default {
optionsThree: [],
// 标签值列表的数据
tagValTableData: []
tagValTableData: [],
preSyncWmStatus: 0
};
},
watch: {
......@@ -99,6 +100,9 @@ export default {
this.ruleForm.tagName = '';
this.getOptionsThree(newVal.tagTwoLevelGroupId);
}
// 获取初始化分类是否同步至微盟的状态
const initData = this.optionsThree.find(el => el.tagLevelGroupId == this.ruleForm.tagLevelGroupId);
if(initData) this.preSyncWmStatus = initData.syncWmFlag;
}
}
},
......@@ -113,7 +117,20 @@ export default {
this.ruleForm.pending = true;
this.$refs.ruleForm.validate((valid) => {
if (valid) {
this.saveApi();
const isSyncWm = this.optionsThree.find(el => el.tagLevelGroupId == this.ruleForm.tagLevelGroupId).syncWmFlag;
const isAutoSync = this.options.isSync;
// 开启手动同步且移动前已同步至微盟,移动后未同步至微盟
if(!isAutoSync && this.preSyncWmStatus && !isSyncWm) {
this.$confirm('该分类未开启微盟标签同步,修改后标签将不会再同步至微盟,并且已同步至微盟侧的会员标签将从微盟侧删除,是否继续保存?','提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.saveApi();
}).catch(() => this.ruleForm.pending = false);
} else {
this.saveApi();
}
} else {
this.ruleForm.pending = false;
}
......
......@@ -301,7 +301,8 @@ export default {
// tagId: '6285cee7e2e14dddae3e2322c6ef6089'
tagId: '',
tagLevelGroupId: '',
tagTwoLevelGroupId: ''
tagTwoLevelGroupId: '',
isSync: false
},
memberTagGradeEnsure: true, // 是否开启会员分层
weimId: [ '3d11ac15963b4c0790762e6147ea9315', '5bdac971673b4f40a9af981e3c9215bf' ],
......@@ -644,6 +645,7 @@ export default {
isAutomaticSync({}).then(res => {
if(res.errorCode === 1) {
this.isSync = res.result;
this.manualTagPop.isSync = res.result;
}
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment