|
|
@@ -382,7 +382,7 @@
|
|
|
<van-tab title="属性信息" name="Planpic">
|
|
|
<!-- 同城分销店-属性信息 -->
|
|
|
<div v-if="dictTypeFormShow" style="background-color: #ffffff; padding: 10px">
|
|
|
- <p style="color: #666"><span class="van-f-red">*</span>属性</p>
|
|
|
+ <p style="color: #666; font-size: 14px"><span class="van-f-red">*</span>属性</p>
|
|
|
<div style="padding: 4px">
|
|
|
<van-radio-group v-model="fromValue.tcfxName" class="typeRadioStore1">
|
|
|
<van-row gutter="20">
|
|
|
@@ -399,6 +399,40 @@
|
|
|
</van-row>
|
|
|
</van-radio-group>
|
|
|
</div>
|
|
|
+ <!-- 主营竞品品牌 -->
|
|
|
+ <p style="color: #666; font-size: 14px">
|
|
|
+ <span class="van-f-red">*</span>主营竞品品牌
|
|
|
+ </p>
|
|
|
+ <div style="padding: 4px">
|
|
|
+ <van-checkbox-group
|
|
|
+ v-model="fromValue.storeCompetitorList"
|
|
|
+ direction="horizontal"
|
|
|
+ class="typeRadioStore1">
|
|
|
+ <van-row gutter="24">
|
|
|
+ <van-col
|
|
|
+ span="12"
|
|
|
+ v-for="(item, index) in storeCompetitorlist"
|
|
|
+ style="margin-bottom: 10px">
|
|
|
+ <van-checkbox
|
|
|
+ v-if="item.dictLabel != '其他'"
|
|
|
+ :name="item.dictValue"
|
|
|
+ shape="square"
|
|
|
+ :key="index">
|
|
|
+ {{ item.dictValue }}
|
|
|
+ </van-checkbox>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ </van-checkbox-group>
|
|
|
+ <van-field
|
|
|
+ name="otherCompetitor"
|
|
|
+ class="otherCompetitor"
|
|
|
+ v-model="fromValue.otherCompetitor"
|
|
|
+ autosize
|
|
|
+ type="textarea"
|
|
|
+ label="其他"
|
|
|
+ maxlength="20"
|
|
|
+ placeholder="请输入" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div v-if="dictTypeSJSFormShow" style="background-color: #ffffff; padding: 10px">
|
|
|
<p style="color: #666"><span class="van-f-red">*</span>属性</p>
|
|
|
@@ -755,6 +789,8 @@ export default {
|
|
|
managementModel: '',
|
|
|
mainProjectType: '',
|
|
|
mainRelationFrom: '',
|
|
|
+ storeCompetitorList: [],
|
|
|
+ otherCompetitor: '',
|
|
|
},
|
|
|
img: 'https://svs-test.oss-cn-shanghai.aliyuncs.com/1647398239620微信截图_20220315112921.png',
|
|
|
location: {
|
|
|
@@ -815,6 +851,9 @@ export default {
|
|
|
sfaStoreChainsContactList: [], //选中确定的经销商
|
|
|
activatedTCFXList: [], //选中的经销商
|
|
|
chainUser: false, //是否经销商用户 true
|
|
|
+ storeCompetitorlist: [], //主营竞品品牌
|
|
|
+ otherCompetitor: '', //主营竞品品牌-其他
|
|
|
+ activatedStoreCompetitor: [],
|
|
|
};
|
|
|
},
|
|
|
activated() {
|
|
|
@@ -824,6 +863,7 @@ export default {
|
|
|
// 授权
|
|
|
getTicketFun(['getLocation', 'chooseImage', 'uploadImage']).then(() => {
|
|
|
this.getTCFXList();
|
|
|
+ this.getTCompetitiveProduct();
|
|
|
this.getSJSList();
|
|
|
this.getQGJZist();
|
|
|
this.getDetail();
|
|
|
@@ -872,10 +912,8 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
searchFn(val) {
|
|
|
- debugger;
|
|
|
this.searchSHow = false;
|
|
|
getkeywordPoi({ latitude: this.pLat, longitude: this.pLot }, val).then((res) => {
|
|
|
- debugger;
|
|
|
// 不显示下拉选择
|
|
|
if (!res.data.length && !val) {
|
|
|
this.searchSHow = false;
|
|
|
@@ -895,7 +933,7 @@ export default {
|
|
|
styleId: 'abc',
|
|
|
position: new TMap.LatLng(
|
|
|
this.maplist[val].location.lat,
|
|
|
- this.maplist[val].location.lng
|
|
|
+ this.maplist[val].location.lng,
|
|
|
),
|
|
|
},
|
|
|
]);
|
|
|
@@ -1252,7 +1290,7 @@ export default {
|
|
|
}
|
|
|
this.provinceList = provinceList;
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
);
|
|
|
},
|
|
|
getDetail() {
|
|
|
@@ -1277,6 +1315,7 @@ export default {
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
this.fromValue = res.data;
|
|
|
+ this.fromValue.storeCompetitorList = this.fromValue.storeCompetitorList || [];
|
|
|
this.sfaStoreChainsContactList = this.fromValue.sfaStoreChainsContactList;
|
|
|
if (this.fromValue.imgSed && this.fromValue.imgSed != '') {
|
|
|
this.displayImg = this.fromValue.imgSed.split(',');
|
|
|
@@ -1501,6 +1540,12 @@ export default {
|
|
|
this.TCFXList = TCFXList;
|
|
|
});
|
|
|
},
|
|
|
+ // 竞品品牌
|
|
|
+ getTCompetitiveProduct() {
|
|
|
+ getDictOption({}, 'main_competitor_brands').then((res) => {
|
|
|
+ this.storeCompetitorlist = res.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
getSJSList() {
|
|
|
getSJSList({}).then((res) => {
|
|
|
var SJSList = [];
|
|
|
@@ -1700,7 +1745,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- var fromValue = this.fromValue;
|
|
|
+ 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('部门未选择');
|
|
|
@@ -1799,7 +1848,7 @@ export default {
|
|
|
this.verifyStoreType(this.fromValue.storeCategory).type == 'fxd'
|
|
|
) {
|
|
|
// 同城分销多经销商
|
|
|
- this.fromValue.sfaStoreChainsContactList = this.sfaStoreChainsContactList;
|
|
|
+ fromValue.sfaStoreChainsContactList = this.sfaStoreChainsContactList;
|
|
|
if (!this.sfaStoreChainsContactList || !this.sfaStoreChainsContactList.length) {
|
|
|
this.$toast('经销商未填写');
|
|
|
return;
|
|
|
@@ -1812,6 +1861,22 @@ export default {
|
|
|
this.$toast('图片未上传');
|
|
|
return;
|
|
|
}
|
|
|
+ if (!fromValue.storeCompetitorList.length && !fromValue.otherCompetitor) {
|
|
|
+ this.$toast('主营竞品品牌未填写');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.activatedStoreCompetitor = JSON.parse(
|
|
|
+ JSON.stringify(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 = JSON.parse(JSON.stringify(this.activatedStoreCompetitor));
|
|
|
} else {
|
|
|
// 非同城分销店 经销商必填校验
|
|
|
if (
|
|
|
@@ -1831,10 +1896,10 @@ export default {
|
|
|
forbidClick: true,
|
|
|
});
|
|
|
// 当前定位复制
|
|
|
- this.fromValue.myLat = this.location.lat;
|
|
|
- this.fromValue.myLon = this.location.lon;
|
|
|
- console.log(this.fromValue);
|
|
|
- updateStore(this.fromValue).then((res) => {
|
|
|
+ fromValue.myLat = this.location.lat;
|
|
|
+ fromValue.myLon = this.location.lon;
|
|
|
+ console.log(fromValue);
|
|
|
+ updateStore(fromValue).then((res) => {
|
|
|
loading1.clear();
|
|
|
if (res.code == 200) {
|
|
|
this.$dialog
|
|
|
@@ -2083,9 +2148,26 @@ export default {
|
|
|
color: #1989fa;
|
|
|
border-color: #1989fa !important;
|
|
|
}
|
|
|
+.typeRadioStore1 .van-radio .van-radio__label {
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
.typeRadioStore1 .van-radio[aria-checked='true'] .van-radio__label {
|
|
|
color: #1989fa;
|
|
|
}
|
|
|
+.typeRadioStore1 .van-checkbox__icon .van-icon {
|
|
|
+ border-color: #ccc !important;
|
|
|
+}
|
|
|
+.typeRadioStore1 .van-checkbox__icon--checked .van-icon {
|
|
|
+ background-color: transparent;
|
|
|
+ color: #1989fa;
|
|
|
+ border-color: #1989fa !important;
|
|
|
+}
|
|
|
+.typeRadioStore1 .van-checkbox .van-checkbox__label {
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
+.typeRadioStore1 .van-checkbox[aria-checked='true'] .van-checkbox__label {
|
|
|
+ color: #1989fa;
|
|
|
+}
|
|
|
.morelaji .van-cell {
|
|
|
padding: 10px 0;
|
|
|
}
|
|
|
@@ -2127,5 +2209,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .otherCompetitor {
|
|
|
+ padding: 10px 0px;
|
|
|
+ border-bottom: 1px solid #b6b6b6;
|
|
|
+ .van-cell__title {
|
|
|
+ width: 50px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|