|
|
@@ -1698,16 +1698,7 @@ export default {
|
|
|
});
|
|
|
var fromValue = this.fromValue;
|
|
|
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.chainName == '' &&
|
|
|
- fromValue.ifJzStoreType != 1 &&
|
|
|
- fromValue.storeCategory != 'C912' &&
|
|
|
- fromValue.storeCategory != 'C917'
|
|
|
- ) {
|
|
|
- // fromValue.storeCategory!='C912'
|
|
|
- this.$toast('经销商未填写');
|
|
|
- return;
|
|
|
- } else if (fromValue.orgId == '') {
|
|
|
+ if (fromValue.orgId == '') {
|
|
|
this.$toast('部门未选择');
|
|
|
return;
|
|
|
} else if (fromValue.storeName == '') {
|
|
|
@@ -1782,71 +1773,66 @@ export default {
|
|
|
this.$toast('照片未上传');
|
|
|
}
|
|
|
return;
|
|
|
- } else if (
|
|
|
- fromValue.imgSed == '' &&
|
|
|
- fromValue.ifJzStoreType != 1 &&
|
|
|
- this.storeTypePOP &&
|
|
|
- fromValue.storeCategory != 'C917' &&
|
|
|
- this.verifyStoreType(this.fromValue.storeCategory) &&
|
|
|
- !this.verifyStoreType(this.fromValue.storeCategory).tcfx
|
|
|
- ) {
|
|
|
- this.$toast('图片未上传');
|
|
|
- return;
|
|
|
} else if (fromValue.lon == '') {
|
|
|
this.$toast('请获取定位坐标');
|
|
|
return;
|
|
|
} else if (
|
|
|
- ((this.verifyStoreType(this.fromValue.storeCategory) &&
|
|
|
- this.verifyStoreType(this.fromValue.storeCategory).tcfx) ||
|
|
|
- fromValue.storeCategory == 'sjs61' ||
|
|
|
- fromValue.storeCategory == 'zyjz63') &&
|
|
|
+ (fromValue.storeCategory == 'sjs61' || fromValue.storeCategory == 'zyjz63') &&
|
|
|
fromValue.tcfxName == ''
|
|
|
) {
|
|
|
this.$toast('属性未填写');
|
|
|
return;
|
|
|
- } else if (
|
|
|
- this.verifyStoreType(this.fromValue.storeCategory) &&
|
|
|
- this.verifyStoreType(this.fromValue.storeCategory).tcfx &&
|
|
|
- fromValue.carShop == ''
|
|
|
- ) {
|
|
|
- this.$toast('请选择是否车铺开店');
|
|
|
- return;
|
|
|
- } else if (
|
|
|
- this.verifyStoreType(this.fromValue.storeCategory) &&
|
|
|
- this.verifyStoreType(this.fromValue.storeCategory).tcfx &&
|
|
|
- fromValue.carShop == '1' &&
|
|
|
- fromValue.carShopImgList.length < 1
|
|
|
- ) {
|
|
|
- this.$toast('请上传车铺开店照片');
|
|
|
- return;
|
|
|
}
|
|
|
if (fromValue.area.trim() == '' && fromValue.ifJzStoreType == 1) {
|
|
|
this.$toast('家装展厅面积未填写');
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- // if (fromValue.storeCategory == '129081' && fromValue.attribute3 == '') {
|
|
|
- // this.$toast('属性未填写');
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // if (
|
|
|
- // fromValue.storeCategory == '129081' &&
|
|
|
- // fromValue.attribute3 == '0' &&
|
|
|
- // fromValue.attribute5 == ''
|
|
|
- // ) {
|
|
|
- // this.$toast('属性未填写');
|
|
|
- // return;
|
|
|
- // }
|
|
|
- if (this.GZAttributeFormShow && fromValue.potentialCustomerType == '') {
|
|
|
- this.$toast('潜在客户类型未填写');
|
|
|
- return;
|
|
|
- }
|
|
|
- // 同城分销多经销商
|
|
|
+ // 同城分销类型门店
|
|
|
if (
|
|
|
this.verifyStoreType(this.fromValue.storeCategory) &&
|
|
|
this.verifyStoreType(this.fromValue.storeCategory).tcfx
|
|
|
) {
|
|
|
+ // 同城分销多经销商
|
|
|
this.fromValue.sfaStoreChainsContactList = this.sfaStoreChainsContactList;
|
|
|
+ if (!this.fromValue.sfaStoreChainsContactList.length) {
|
|
|
+ this.$toast('经销商未填写');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (fromValue.carShop == '') {
|
|
|
+ this.$toast('请选择是否车铺开店');
|
|
|
+ return;
|
|
|
+ } else if (fromValue.carShop == '1' && fromValue.carShopImgList.length < 1) {
|
|
|
+ this.$toast('请上传车铺开店照片');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (fromValue.tcfxName == '') {
|
|
|
+ this.$toast('属性未填写');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 非同城分销店 经销商必填校验
|
|
|
+ if (
|
|
|
+ fromValue.chainName == '' &&
|
|
|
+ fromValue.ifJzStoreType != 1 &&
|
|
|
+ fromValue.storeCategory != 'C912' &&
|
|
|
+ fromValue.storeCategory != 'C917'
|
|
|
+ ) {
|
|
|
+ this.$toast('经销商未填写');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ fromValue.imgSed == '' &&
|
|
|
+ fromValue.ifJzStoreType != 1 &&
|
|
|
+ this.storeTypePOP &&
|
|
|
+ fromValue.storeCategory != 'C917'
|
|
|
+ ) {
|
|
|
+ this.$toast('图片未上传');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.GZAttributeFormShow && fromValue.potentialCustomerType == '') {
|
|
|
+ this.$toast('潜在客户类型未填写');
|
|
|
+ return;
|
|
|
}
|
|
|
addStore(this.fromValue).then((res) => {
|
|
|
loading1.clear();
|