Commit 6996faa5 by liuchenxi

update: 同步微盟弹窗提醒

parent 744fa657
...@@ -84,7 +84,8 @@ export default { ...@@ -84,7 +84,8 @@ export default {
optionsThree: [], optionsThree: [],
// 标签值列表的数据 // 标签值列表的数据
tagValTableData: [] tagValTableData: [],
preSyncWmStatus: 0
}; };
}, },
watch: { watch: {
...@@ -99,6 +100,9 @@ export default { ...@@ -99,6 +100,9 @@ export default {
this.ruleForm.tagName = ''; this.ruleForm.tagName = '';
this.getOptionsThree(newVal.tagTwoLevelGroupId); 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 { ...@@ -113,7 +117,20 @@ export default {
this.ruleForm.pending = true; this.ruleForm.pending = true;
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
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(); this.saveApi();
}).catch(() => this.ruleForm.pending = false);
} else {
this.saveApi();
}
} else { } else {
this.ruleForm.pending = false; this.ruleForm.pending = false;
} }
......
...@@ -301,7 +301,8 @@ export default { ...@@ -301,7 +301,8 @@ export default {
// tagId: '6285cee7e2e14dddae3e2322c6ef6089' // tagId: '6285cee7e2e14dddae3e2322c6ef6089'
tagId: '', tagId: '',
tagLevelGroupId: '', tagLevelGroupId: '',
tagTwoLevelGroupId: '' tagTwoLevelGroupId: '',
isSync: false
}, },
memberTagGradeEnsure: true, // 是否开启会员分层 memberTagGradeEnsure: true, // 是否开启会员分层
weimId: [ '3d11ac15963b4c0790762e6147ea9315', '5bdac971673b4f40a9af981e3c9215bf' ], weimId: [ '3d11ac15963b4c0790762e6147ea9315', '5bdac971673b4f40a9af981e3c9215bf' ],
...@@ -644,6 +645,7 @@ export default { ...@@ -644,6 +645,7 @@ export default {
isAutomaticSync({}).then(res => { isAutomaticSync({}).then(res => {
if(res.errorCode === 1) { if(res.errorCode === 1) {
this.isSync = res.result; 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