|
|
@@ -513,7 +513,18 @@
|
|
|
</p>
|
|
|
<van-checkbox-group v-model="storeLabelTypes" direction="horizontal">
|
|
|
<div v-if="otherbqShow" style="width: 100%">
|
|
|
- <div class="checkbox" v-for="(item, index) in StoreLabels" :key="index">
|
|
|
+ <div class="checkbox" v-for="(item, index) in storeLabelsRegular" :key="index">
|
|
|
+ <van-checkbox :name="item.dictValue">{{ item.dictLabel }}</van-checkbox>
|
|
|
+ </div>
|
|
|
+ <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
|
|
|
+ </div>
|
|
|
+ </van-checkbox-group>
|
|
|
+ <p class="searchchecktitle" @click="otherjpdShow = !otherjpdShow">
|
|
|
+ 门店等级<van-icon name="arrow-down" style="float: right" />
|
|
|
+ </p>
|
|
|
+ <van-checkbox-group v-model="jpdStoreLevelTypes" direction="horizontal">
|
|
|
+ <div v-if="otherjpdShow" style="width: 100%">
|
|
|
+ <div class="checkbox" v-for="(item, index) in jpdStoreLevels" :key="'jpd' + index">
|
|
|
<van-checkbox :name="item.dictValue">{{ item.dictLabel }}</van-checkbox>
|
|
|
</div>
|
|
|
<div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
|
|
|
@@ -747,6 +758,10 @@ export default {
|
|
|
storeCategoryList: '',
|
|
|
result: [],
|
|
|
StoreLabels: [],
|
|
|
+ storeLabelsRegular: [],
|
|
|
+ jpdStoreLevels: [],
|
|
|
+ jpdStoreLevelTypes: [],
|
|
|
+ otherjpdShow: true,
|
|
|
CustomerName: '',
|
|
|
lat: '',
|
|
|
lon: '',
|
|
|
@@ -758,12 +773,26 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
$route(to, from) {
|
|
|
+ if (from.path == '/deviceWithin/index') {
|
|
|
+ localStorage.setItem('outvstoreName', '');
|
|
|
+ localStorage.setItem('outvchainName', '');
|
|
|
+ localStorage.removeItem('outvstoreLabelTypes');
|
|
|
+ localStorage.removeItem('outvjpdStoreLevelTypes');
|
|
|
+ localStorage.removeItem('outvstoreCategoryList');
|
|
|
+ localStorage.setItem('outvchainCode', '');
|
|
|
+ localStorage.setItem('outvsortType', '');
|
|
|
+ localStorage.setItem('outsortParam', '');
|
|
|
+ localStorage.setItem('lat', '');
|
|
|
+ localStorage.setItem('lon', '');
|
|
|
+ }
|
|
|
this.storeName = localStorage.getItem('outvstoreName');
|
|
|
if (
|
|
|
localStorage.getItem('outvchainName') &&
|
|
|
localStorage.getItem('outvchainName') != 'null'
|
|
|
) {
|
|
|
this.chainName = localStorage.getItem('outvchainName');
|
|
|
+ } else {
|
|
|
+ this.chainName = '';
|
|
|
}
|
|
|
if (localStorage.getItem('lat') != null) {
|
|
|
this.lat = localStorage.getItem('lat');
|
|
|
@@ -772,12 +801,26 @@ export default {
|
|
|
this.lat = '';
|
|
|
this.lon = '';
|
|
|
}
|
|
|
- if (localStorage.getItem('outvstoreLabelTypes') != null) {
|
|
|
- this.storeLabelTypes = localStorage.getItem('outvstoreLabelTypes').split(',');
|
|
|
+ const storedStoreLabels = localStorage.getItem('outvstoreLabelTypes');
|
|
|
+ if (storedStoreLabels != null && storedStoreLabels !== '') {
|
|
|
+ this.storeLabelTypes = storedStoreLabels
|
|
|
+ .split(',')
|
|
|
+ .map((it) => it.trim())
|
|
|
+ .filter((it) => it);
|
|
|
} else {
|
|
|
this.storeLabelTypes = [];
|
|
|
}
|
|
|
|
|
|
+ const storedJpdStoreLevels = localStorage.getItem('outvjpdStoreLevelTypes');
|
|
|
+ if (storedJpdStoreLevels != null && storedJpdStoreLevels !== '') {
|
|
|
+ this.jpdStoreLevelTypes = storedJpdStoreLevels
|
|
|
+ .split(',')
|
|
|
+ .map((it) => it.trim())
|
|
|
+ .filter((it) => it);
|
|
|
+ } else {
|
|
|
+ this.jpdStoreLevelTypes = [];
|
|
|
+ }
|
|
|
+
|
|
|
if (localStorage.getItem('outvstoreCategoryList') != null) {
|
|
|
this.result = localStorage.getItem('outvstoreCategoryList').split(',');
|
|
|
this.storeCategoryList = this.result.join(',');
|
|
|
@@ -832,11 +875,25 @@ export default {
|
|
|
if (localStorage.getItem('outvchainName') && localStorage.getItem('outvchainName') != 'null') {
|
|
|
this.chainName = localStorage.getItem('outvchainName');
|
|
|
}
|
|
|
- if (localStorage.getItem('outvstoreLabelTypes') != null) {
|
|
|
- this.storeLabelTypes = localStorage.getItem('outvstoreLabelTypes').split(',');
|
|
|
+ const storedStoreLabels = localStorage.getItem('outvstoreLabelTypes');
|
|
|
+ if (storedStoreLabels != null && storedStoreLabels !== '') {
|
|
|
+ this.storeLabelTypes = storedStoreLabels
|
|
|
+ .split(',')
|
|
|
+ .map((it) => it.trim())
|
|
|
+ .filter((it) => it);
|
|
|
} else {
|
|
|
this.storeLabelTypes = [];
|
|
|
}
|
|
|
+
|
|
|
+ const storedJpdStoreLevels = localStorage.getItem('outvjpdStoreLevelTypes');
|
|
|
+ if (storedJpdStoreLevels != null && storedJpdStoreLevels !== '') {
|
|
|
+ this.jpdStoreLevelTypes = storedJpdStoreLevels
|
|
|
+ .split(',')
|
|
|
+ .map((it) => it.trim())
|
|
|
+ .filter((it) => it);
|
|
|
+ } else {
|
|
|
+ this.jpdStoreLevelTypes = [];
|
|
|
+ }
|
|
|
if (localStorage.getItem('outvstoreCategoryList') != null) {
|
|
|
this.result = localStorage.getItem('outvstoreCategoryList').split(',');
|
|
|
this.storeCategoryList = this.result.join(',');
|
|
|
@@ -1097,7 +1154,9 @@ export default {
|
|
|
},
|
|
|
getStoreLabels() {
|
|
|
getStoreLabels().then((res) => {
|
|
|
- this.StoreLabels = res.data;
|
|
|
+ this.StoreLabels = res.data || [];
|
|
|
+ this.storeLabelsRegular = this.StoreLabels.filter((item) => item.ifJpdStoreLevel != '1');
|
|
|
+ this.jpdStoreLevels = this.StoreLabels.filter((item) => item.ifJpdStoreLevel == '1');
|
|
|
});
|
|
|
},
|
|
|
searchType(val) {
|
|
|
@@ -1130,6 +1189,7 @@ export default {
|
|
|
this.noOrder = [];
|
|
|
this.fxNoOrder = [];
|
|
|
this.storeLabelTypes = [];
|
|
|
+ this.jpdStoreLevelTypes = [];
|
|
|
this.storeCategoryList = this.result.join(',');
|
|
|
this.chainName = '';
|
|
|
this.chainCode = '';
|
|
|
@@ -1220,7 +1280,9 @@ export default {
|
|
|
lat: that.lat,
|
|
|
lon: that.lon,
|
|
|
chainCode: this.chainCode ? this.chainCode : '',
|
|
|
- storeLabelTypes: this.storeLabelTypes.join(','),
|
|
|
+ storeLabelTypes: [
|
|
|
+ ...new Set([...(this.storeLabelTypes || []), ...(this.jpdStoreLevelTypes || [])]),
|
|
|
+ ].join(','),
|
|
|
pageNum: this.pageNum,
|
|
|
storeCategoryList: this.storeCategoryList,
|
|
|
pageSize: this.pageSize,
|
|
|
@@ -1299,7 +1361,9 @@ export default {
|
|
|
lat: that.lat,
|
|
|
lon: that.lon,
|
|
|
chainCode: this.chainCode ? this.chainCode : '',
|
|
|
- storeLabelTypes: this.storeLabelTypes.join(','),
|
|
|
+ storeLabelTypes: [
|
|
|
+ ...new Set([...(this.storeLabelTypes || []), ...(this.jpdStoreLevelTypes || [])]),
|
|
|
+ ].join(','),
|
|
|
pageNum: this.pageNum,
|
|
|
storeCategoryList: this.storeCategoryList,
|
|
|
pageSize: this.pageSize,
|
|
|
@@ -2220,9 +2284,17 @@ export default {
|
|
|
}
|
|
|
var StoreLabelsArr = [];
|
|
|
for (var k = 0; k < this.storeLabelTypes.length; k++) {
|
|
|
- for (var k1 = 0; k1 < this.StoreLabels.length; k1++) {
|
|
|
- if (this.StoreLabels[k1].dictValue == this.storeLabelTypes[k]) {
|
|
|
- StoreLabelsArr.push(this.StoreLabels[k1].dictLabel);
|
|
|
+ for (var k1 = 0; k1 < this.storeLabelsRegular.length; k1++) {
|
|
|
+ if (this.storeLabelsRegular[k1].dictValue == this.storeLabelTypes[k]) {
|
|
|
+ StoreLabelsArr.push(this.storeLabelsRegular[k1].dictLabel);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var jpdStoreLabelsArr = [];
|
|
|
+ for (var k = 0; k < this.jpdStoreLevelTypes.length; k++) {
|
|
|
+ for (var k1 = 0; k1 < this.jpdStoreLevels.length; k1++) {
|
|
|
+ if (this.jpdStoreLevels[k1].dictValue == this.jpdStoreLevelTypes[k]) {
|
|
|
+ jpdStoreLabelsArr.push(this.jpdStoreLevels[k1].dictLabel);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2244,6 +2316,15 @@ export default {
|
|
|
buryingPointPosition: '我的筛选',
|
|
|
});
|
|
|
}
|
|
|
+ if (jpdStoreLabelsArr.length > 0) {
|
|
|
+ this.buryingPoint({
|
|
|
+ systemModel: '计划外',
|
|
|
+ buryingPointType: 1,
|
|
|
+ buryingPointValue: jpdStoreLabelsArr.join(','),
|
|
|
+ buryingPointName: '金牌店等级',
|
|
|
+ buryingPointPosition: '我的筛选',
|
|
|
+ });
|
|
|
+ }
|
|
|
if (this.storeCategoryList.length > 0) {
|
|
|
this.buryingPoint({
|
|
|
systemModel: '计划外',
|
|
|
@@ -2281,6 +2362,15 @@ export default {
|
|
|
buryingPointPosition: '销售部的门店筛选',
|
|
|
});
|
|
|
}
|
|
|
+ if (jpdStoreLabelsArr.length > 0) {
|
|
|
+ this.buryingPoint({
|
|
|
+ systemModel: '计划外',
|
|
|
+ buryingPointType: 1,
|
|
|
+ buryingPointValue: jpdStoreLabelsArr.join(','),
|
|
|
+ buryingPointName: '金牌店等级',
|
|
|
+ buryingPointPosition: '销售部的门店筛选',
|
|
|
+ });
|
|
|
+ }
|
|
|
if (this.storeCategoryList != '') {
|
|
|
this.buryingPoint({
|
|
|
systemModel: '计划外',
|
|
|
@@ -2312,6 +2402,7 @@ export default {
|
|
|
localStorage.setItem('outvstoreName', this.storeName);
|
|
|
localStorage.setItem('outvchainName', this.chainName);
|
|
|
localStorage.setItem('outvstoreLabelTypes', this.storeLabelTypes);
|
|
|
+ localStorage.setItem('outvjpdStoreLevelTypes', this.jpdStoreLevelTypes);
|
|
|
localStorage.setItem('outvstoreCategoryList', this.result);
|
|
|
localStorage.setItem('outvchainCode', this.chainCode == 'null' ? '' : this.chainCode);
|
|
|
this.onSearch();
|