|
|
@@ -788,6 +788,7 @@ export default {
|
|
|
mainProjectType: '',
|
|
|
mainRelationFrom: '',
|
|
|
storeCompetitorList: [],
|
|
|
+ otherCompetitor: '',
|
|
|
},
|
|
|
img: 'https://svs-test.oss-cn-shanghai.aliyuncs.com/1647398239620微信截图_20220315112921.png',
|
|
|
location: {
|
|
|
@@ -850,6 +851,7 @@ export default {
|
|
|
chainUser: false, //是否经销商用户 true
|
|
|
storeCompetitorlist: [], //主营竞品品牌
|
|
|
otherCompetitor: '', //主营竞品品牌-其他
|
|
|
+ activatedStoreCompetitor: [],
|
|
|
};
|
|
|
},
|
|
|
activated() {
|
|
|
@@ -1740,13 +1742,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- var fromValue = this.fromValue;
|
|
|
- if (
|
|
|
- this.fromValue.storeCompetitorList == null ||
|
|
|
- this.fromValue.storeCompetitorList == undefined
|
|
|
- ) {
|
|
|
- this.fromValue.storeCompetitorList = [];
|
|
|
+ var fromValue = JSON.parse(JSON.stringify(this.fromValue));
|
|
|
+ if (fromValue.storeCompetitorList == null || fromValue.storeCompetitorList == undefined) {
|
|
|
+ fromValue.storeCompetitorList = [];
|
|
|
}
|
|
|
+ this.activatedStoreCompetitor = [];
|
|
|
var telrg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
|
|
|
if (fromValue.orgId == '') {
|
|
|
this.$toast('部门未选择');
|
|
|
@@ -1862,6 +1862,16 @@ export default {
|
|
|
this.$toast('主营竞品品牌未填写');
|
|
|
return;
|
|
|
}
|
|
|
+ this.activatedStoreCompetitor = this.fromValue.storeCompetitorList;
|
|
|
+ if (this.fromValue.otherCompetitor) {
|
|
|
+ if (this.fromValue.otherCompetitor.length < 2) {
|
|
|
+ this.$toast('主营竞品品牌其他文本信息最少2个字');
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ this.activatedStoreCompetitor.push(this.fromValue.otherCompetitor);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ fromValue.storeCompetitorList = this.activatedStoreCompetitor;
|
|
|
} else {
|
|
|
// 非同城分销店 经销商必填校验
|
|
|
if (
|
|
|
@@ -1884,14 +1894,6 @@ export default {
|
|
|
this.fromValue.myLat = this.location.lat;
|
|
|
this.fromValue.myLon = this.location.lon;
|
|
|
console.log(this.fromValue);
|
|
|
- if (this.fromValue.otherCompetitor) {
|
|
|
- if (this.fromValue.otherCompetitor.length < 2) {
|
|
|
- this.$toast('主营竞品品牌其他文本信息最少2个字');
|
|
|
- return;
|
|
|
- } else {
|
|
|
- this.fromValue.storeCompetitorList.push(this.fromValue.otherCompetitor);
|
|
|
- }
|
|
|
- }
|
|
|
updateStore(this.fromValue).then((res) => {
|
|
|
loading1.clear();
|
|
|
if (res.code == 200) {
|