|
@@ -8,7 +8,7 @@
|
|
|
</van-nav-bar>
|
|
</van-nav-bar>
|
|
|
<div class="searchDiv">
|
|
<div class="searchDiv">
|
|
|
<van-search
|
|
<van-search
|
|
|
- v-model="storeName"
|
|
|
|
|
|
|
+ v-model="chainsName"
|
|
|
left-icon="search"
|
|
left-icon="search"
|
|
|
show-action
|
|
show-action
|
|
|
placeholder="搜索名称/编号/地址"
|
|
placeholder="搜索名称/编号/地址"
|
|
@@ -31,16 +31,16 @@
|
|
|
:finished="finished"
|
|
:finished="finished"
|
|
|
finished-text="--已经到底了--"
|
|
finished-text="--已经到底了--"
|
|
|
@load="onLoad">
|
|
@load="onLoad">
|
|
|
- <div class="cellcontent" v-for="(item, index) in list" :key="index">
|
|
|
|
|
|
|
+ <div class="cellcontent" v-for="(item, index) in list" :key="index" v-if="list.length">
|
|
|
<van-cell>
|
|
<van-cell>
|
|
|
<div class="card">
|
|
<div class="card">
|
|
|
<div class="title titlero">
|
|
<div class="title titlero">
|
|
|
<span @click="goOtherSystem(item)" :style="setStroeNameStyle(item)">
|
|
<span @click="goOtherSystem(item)" :style="setStroeNameStyle(item)">
|
|
|
- <span>{{ item.storeName }}</span>
|
|
|
|
|
- (<span>{{ item.storeCode }}</span
|
|
|
|
|
|
|
+ <span>{{ item.chainName }}</span>
|
|
|
|
|
+ (<span>{{ item.chainCode }}</span
|
|
|
>)
|
|
>)
|
|
|
</span>
|
|
</span>
|
|
|
- <span class="btn" :data-clipboard-text="item.storeCode">
|
|
|
|
|
|
|
+ <span class="btn" :data-clipboard-text="item.chainCode">
|
|
|
<van-icon
|
|
<van-icon
|
|
|
:name="require('@/assets/icon/paste.png')"
|
|
:name="require('@/assets/icon/paste.png')"
|
|
|
color="#ee0a24"
|
|
color="#ee0a24"
|
|
@@ -48,11 +48,11 @@
|
|
|
style="top: 6px; margin-left: 4px" />
|
|
style="top: 6px; margin-left: 4px" />
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="info">客户分类:{{ item.storeCategory }}</div>
|
|
|
|
|
- <div class="info">实际经营者:{{ item.storeCategory }}</div>
|
|
|
|
|
- <div class="info">开户日期:{{ item.storeCategory }}</div>
|
|
|
|
|
- <div class="info">是否冻结:{{ item.storeCategory }}</div>
|
|
|
|
|
- <div class="info">是否关户:{{ item.storeCategory }}</div>
|
|
|
|
|
|
|
+ <div class="info">客户分类:{{ verifyChainType(item.typeCode2) }}</div>
|
|
|
|
|
+ <div class="info">实际经营者:{{ item.customerManager }}</div>
|
|
|
|
|
+ <div class="info">开户日期:{{ item.openDate }}</div>
|
|
|
|
|
+ <div class="info">是否冻结:{{ item.freeze }}</div>
|
|
|
|
|
+ <div class="info">是否关户:{{ item.close }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
|
class="statstext"
|
|
class="statstext"
|
|
@@ -86,14 +86,14 @@
|
|
|
异常拜访
|
|
异常拜访
|
|
|
</p>
|
|
</p>
|
|
|
</van-col>
|
|
</van-col>
|
|
|
- <van-col span="5" v-if="item.stateString == '已拜访'" @click="Visit(item)">
|
|
|
|
|
|
|
+ <!-- <van-col span="5" v-if="item.stateString == '已拜访'" @click="Visit(item)">
|
|
|
<img
|
|
<img
|
|
|
:src="require('@/assets/icon/bfxx.png')"
|
|
:src="require('@/assets/icon/bfxx.png')"
|
|
|
style="margin: 0 auto; height: 18px; display: block" />
|
|
style="margin: 0 auto; height: 18px; display: block" />
|
|
|
<p style="text-align: center; margin: 0; margin-top: 1px; font-size: 12px">
|
|
<p style="text-align: center; margin: 0; margin-top: 1px; font-size: 12px">
|
|
|
拜访信息
|
|
拜访信息
|
|
|
</p>
|
|
</p>
|
|
|
- </van-col>
|
|
|
|
|
|
|
+ </van-col> -->
|
|
|
<van-col span="5" @click="visitFn(item)">
|
|
<van-col span="5" @click="visitFn(item)">
|
|
|
<img
|
|
<img
|
|
|
:src="require('@/assets/icon/kehuxinxi-2.png')"
|
|
:src="require('@/assets/icon/kehuxinxi-2.png')"
|
|
@@ -173,8 +173,8 @@
|
|
|
片区经销商<van-icon name="arrow-down" style="float: right" />
|
|
片区经销商<van-icon name="arrow-down" style="float: right" />
|
|
|
</p>
|
|
</p>
|
|
|
<div v-if="otherfxdShow1">
|
|
<div v-if="otherfxdShow1">
|
|
|
- <div v-for="(item1, index1) in storeTypeLists" :key="200 + index1" class="checkbox1">
|
|
|
|
|
- <div v-if="item1.groupType == 'fxd' && item1.remark == 'jp'" class="child">
|
|
|
|
|
|
|
+ <div v-for="(item1, index1) in PQChain" :key="200 + index1" class="checkbox1">
|
|
|
|
|
+ <div class="child">
|
|
|
<van-checkbox :name="item1.dictValue">{{ item1.dictLabel }}</van-checkbox>
|
|
<van-checkbox :name="item1.dictValue">{{ item1.dictLabel }}</van-checkbox>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -184,11 +184,8 @@
|
|
|
非片区经销商<van-icon name="arrow-down" style="float: right" />
|
|
非片区经销商<van-icon name="arrow-down" style="float: right" />
|
|
|
</p>
|
|
</p>
|
|
|
<div v-if="otherfxdShow2">
|
|
<div v-if="otherfxdShow2">
|
|
|
- <div
|
|
|
|
|
- v-for="(itemlj, indexlj) in storeTypeLists"
|
|
|
|
|
- :key="400 + indexlj"
|
|
|
|
|
- class="checkbox1">
|
|
|
|
|
- <div v-if="itemlj.groupType == 'fxd' && itemlj.remark == 'tcfx'" class="child">
|
|
|
|
|
|
|
+ <div v-for="(itemlj, indexlj) in FPQChain" :key="400 + indexlj" class="checkbox1">
|
|
|
|
|
+ <div class="child">
|
|
|
<van-checkbox :name="itemlj.dictValue">{{ itemlj.dictLabel }}</van-checkbox>
|
|
<van-checkbox :name="itemlj.dictValue">{{ itemlj.dictLabel }}</van-checkbox>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -196,16 +193,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
|
|
<div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
|
|
|
- <!-- <p class="searchchecktitle" @click="otherShow = !otherShow">
|
|
|
|
|
- 其他 <van-icon name="arrow-down" style="float: right" />
|
|
|
|
|
- </p>
|
|
|
|
|
- <div v-if="otherShow">
|
|
|
|
|
- <div v-for="(item2, index2) in storeTypeLists" :key="100 + index2" class="checkbox1">
|
|
|
|
|
- <div v-if="item2.groupType == 'other'" class="child">
|
|
|
|
|
- <van-checkbox :name="item2.dictValue">{{ item2.dictLabel }}</van-checkbox>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div> -->
|
|
|
|
|
</van-checkbox-group>
|
|
</van-checkbox-group>
|
|
|
</div>
|
|
</div>
|
|
|
</van-popup>
|
|
</van-popup>
|
|
@@ -266,27 +253,25 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import {
|
|
import {
|
|
|
- queryMyChainsGroupList,
|
|
|
|
|
- getUserOrgStoreList,
|
|
|
|
|
- stopVisit,
|
|
|
|
|
checkVisit,
|
|
checkVisit,
|
|
|
addVisitsPosition,
|
|
addVisitsPosition,
|
|
|
mobileReposition,
|
|
mobileReposition,
|
|
|
- getStoreyslTypeList,
|
|
|
|
|
getStoreTypeListlp,
|
|
getStoreTypeListlp,
|
|
|
- joinInPlan,
|
|
|
|
|
getStoreLabels,
|
|
getStoreLabels,
|
|
|
getCustomerList,
|
|
getCustomerList,
|
|
|
buryingPoint,
|
|
buryingPoint,
|
|
|
- ProductItemImge,
|
|
|
|
|
- getUserOutPlaList,
|
|
|
|
|
} from '@/api/index';
|
|
} from '@/api/index';
|
|
|
-import request from '@/utils/request';
|
|
|
|
|
import { checkStoreAddressByStoreCode } from '@/api/visitstore';
|
|
import { checkStoreAddressByStoreCode } from '@/api/visitstore';
|
|
|
import { getPosition, getMapPoi, getkeywordPoi, getTicketFun } from '@/utils/TXApiFun';
|
|
import { getPosition, getMapPoi, getkeywordPoi, getTicketFun } from '@/utils/TXApiFun';
|
|
|
import { mapState } from 'vuex';
|
|
import { mapState } from 'vuex';
|
|
|
import store from '@/store';
|
|
import store from '@/store';
|
|
|
import { scrollTopMixins } from '@/mixin/scrollTop';
|
|
import { scrollTopMixins } from '@/mixin/scrollTop';
|
|
|
|
|
+import {
|
|
|
|
|
+ queryMyChainsGroupList,
|
|
|
|
|
+ queryMyChainsGroupListByDept,
|
|
|
|
|
+ checkChainsAddressByChainCode,
|
|
|
|
|
+ getMainchains,
|
|
|
|
|
+} from '@/api/home';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'outsidelist',
|
|
name: 'outsidelist',
|
|
|
mixins: [scrollTopMixins],
|
|
mixins: [scrollTopMixins],
|
|
@@ -324,13 +309,14 @@ export default {
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
listActive: null,
|
|
listActive: null,
|
|
|
query: '',
|
|
query: '',
|
|
|
- storeName: '',
|
|
|
|
|
|
|
+ chainsName: '',
|
|
|
storeType: '',
|
|
storeType: '',
|
|
|
endShow: false,
|
|
endShow: false,
|
|
|
storeCategory: '',
|
|
storeCategory: '',
|
|
|
fromValue: {},
|
|
fromValue: {},
|
|
|
storeTypeList: [],
|
|
storeTypeList: [],
|
|
|
- storeTypeLists: [],
|
|
|
|
|
|
|
+ PQChain: [],
|
|
|
|
|
+ FPQChain: [],
|
|
|
chainsData: [],
|
|
chainsData: [],
|
|
|
serachstype: '',
|
|
serachstype: '',
|
|
|
addShow1: false,
|
|
addShow1: false,
|
|
@@ -380,7 +366,6 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
this.storeLabelTypes = [];
|
|
this.storeLabelTypes = [];
|
|
|
}
|
|
}
|
|
|
- this.storeName = localStorage.getItem('outvstoreName'); //搜索框内容
|
|
|
|
|
this.chainName = localStorage.getItem('outvchainName'); //筛选-经销商名称搜索
|
|
this.chainName = localStorage.getItem('outvchainName'); //筛选-经销商名称搜索
|
|
|
this.chainCode = localStorage.getItem('outvchainCode'); //筛选-经销商Code
|
|
this.chainCode = localStorage.getItem('outvchainCode'); //筛选-经销商Code
|
|
|
// 筛选-店型选择
|
|
// 筛选-店型选择
|
|
@@ -408,7 +393,7 @@ export default {
|
|
|
return { color: '#0057ba', 'text-decoration': 'underline' };
|
|
return { color: '#0057ba', 'text-decoration': 'underline' };
|
|
|
},
|
|
},
|
|
|
clearFn() {
|
|
clearFn() {
|
|
|
- this.storeName = '';
|
|
|
|
|
|
|
+ this.chainsName = '';
|
|
|
localStorage.setItem('outvstoreName', '');
|
|
localStorage.setItem('outvstoreName', '');
|
|
|
},
|
|
},
|
|
|
moreTypeShowFn() {
|
|
moreTypeShowFn() {
|
|
@@ -419,13 +404,7 @@ export default {
|
|
|
buryingPoint(val);
|
|
buryingPoint(val);
|
|
|
},
|
|
},
|
|
|
getCustomer() {
|
|
getCustomer() {
|
|
|
- var name = '';
|
|
|
|
|
- if (this.tabVal != 1) {
|
|
|
|
|
- name = 'org';
|
|
|
|
|
- } else {
|
|
|
|
|
- name = 'my';
|
|
|
|
|
- }
|
|
|
|
|
- getCustomerList({ name: this.CustomerName, from: name }).then((request) => {
|
|
|
|
|
|
|
+ getMainchains({ mainChainsName: this.CustomerName }).then((request) => {
|
|
|
this.chainsData = request.data;
|
|
this.chainsData = request.data;
|
|
|
this.chainsData.push({});
|
|
this.chainsData.push({});
|
|
|
this.chainsData.pop();
|
|
this.chainsData.pop();
|
|
@@ -448,7 +427,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
onConfirm(value) {
|
|
onConfirm(value) {
|
|
|
this.storeCategoryList = this.result.join(',');
|
|
this.storeCategoryList = this.result.join(',');
|
|
|
- // this.typeName=value.dictLabel
|
|
|
|
|
this.showPicker = false;
|
|
this.showPicker = false;
|
|
|
this.onSearchm();
|
|
this.onSearchm();
|
|
|
},
|
|
},
|
|
@@ -461,17 +439,15 @@ export default {
|
|
|
this.monthVisited = '';
|
|
this.monthVisited = '';
|
|
|
this.onSearch();
|
|
this.onSearch();
|
|
|
},
|
|
},
|
|
|
- getStoreTypeList() {
|
|
|
|
|
- if (this.storeTypeLists.length == 0) {
|
|
|
|
|
- getStoreTypeListlp({}).then((res) => {
|
|
|
|
|
- this.storeTypeLists = res.data;
|
|
|
|
|
- this.storeTypeList = res.data;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ setChainTypeList() {
|
|
|
|
|
+ if (store.getters.chainsType) {
|
|
|
|
|
+ this.PQChain = store.getters.chainsType.filter((val) => val.remark == 'pq');
|
|
|
|
|
+ this.FPQChain = store.getters.chainsType.filter((val) => val.remark == 'fp');
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
searchFn() {
|
|
searchFn() {
|
|
|
//获取门店类型 //获取门店标签
|
|
//获取门店类型 //获取门店标签
|
|
|
- Promise.all([this.getStoreTypeList(), this.getStoreLabels()]).then(() => {
|
|
|
|
|
|
|
+ Promise.all([this.setChainTypeList(), this.getStoreLabels()]).then(() => {
|
|
|
this.showPicker = true;
|
|
this.showPicker = true;
|
|
|
this.CustomerName = '';
|
|
this.CustomerName = '';
|
|
|
});
|
|
});
|
|
@@ -485,14 +461,14 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.disabled = true;
|
|
this.disabled = true;
|
|
|
this.toastLoading(0, '加载中...', true);
|
|
this.toastLoading(0, '加载中...', true);
|
|
|
- getUserOrgStoreList({
|
|
|
|
|
|
|
+ queryMyChainsGroupListByDept({
|
|
|
lat: this.lat,
|
|
lat: this.lat,
|
|
|
lon: this.lon,
|
|
lon: this.lon,
|
|
|
- chainCode: this.chainCode ? this.chainCode : '',
|
|
|
|
|
pageNum: this.pageNum,
|
|
pageNum: this.pageNum,
|
|
|
typeCodeList: this.storeCategoryList,
|
|
typeCodeList: this.storeCategoryList,
|
|
|
pageSize: this.pageSize,
|
|
pageSize: this.pageSize,
|
|
|
- storeName: this.storeName.trim(),
|
|
|
|
|
|
|
+ chainsName: this.chainsName.trim(),
|
|
|
|
|
+ monthVisited: this.monthVisited, //本月是否拜访1=拜访,0=未拜访
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
this.disabled = false;
|
|
this.disabled = false;
|
|
|
this.toastLoading().clear();
|
|
this.toastLoading().clear();
|
|
@@ -502,7 +478,7 @@ export default {
|
|
|
this.list = [];
|
|
this.list = [];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- this.list = this.list.concat(res.data);
|
|
|
|
|
|
|
+ this.list = this.list.concat(res.rows);
|
|
|
if (this.list.length >= res.total) {
|
|
if (this.list.length >= res.total) {
|
|
|
this.finished = true;
|
|
this.finished = true;
|
|
|
} else {
|
|
} else {
|
|
@@ -531,13 +507,12 @@ export default {
|
|
|
this.refreshing = false;
|
|
this.refreshing = false;
|
|
|
}
|
|
}
|
|
|
queryMyChainsGroupList({
|
|
queryMyChainsGroupList({
|
|
|
- // lat: this.lat,
|
|
|
|
|
- // lon: this.lon,
|
|
|
|
|
- // chainCode: this.chainCode ? this.chainCode : '',
|
|
|
|
|
|
|
+ lat: this.lat,
|
|
|
|
|
+ lon: this.lon,
|
|
|
pageNum: this.pageNum,
|
|
pageNum: this.pageNum,
|
|
|
typeCodeList: this.storeCategoryList,
|
|
typeCodeList: this.storeCategoryList,
|
|
|
pageSize: this.pageSize,
|
|
pageSize: this.pageSize,
|
|
|
- chainsName: this.storeName.trim(),
|
|
|
|
|
|
|
+ chainsName: this.chainsName.trim(),
|
|
|
monthVisited: this.monthVisited, //本月是否拜访1=拜访,0=未拜访
|
|
monthVisited: this.monthVisited, //本月是否拜访1=拜访,0=未拜访
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
this.disabled = false;
|
|
this.disabled = false;
|
|
@@ -568,71 +543,64 @@ export default {
|
|
|
storeVisit(val) {
|
|
storeVisit(val) {
|
|
|
localStorage.setItem('tabVal', this.tabVal);
|
|
localStorage.setItem('tabVal', this.tabVal);
|
|
|
localStorage.removeItem('visitId');
|
|
localStorage.removeItem('visitId');
|
|
|
- checkVisit({ storeId: val.storeId }).then((res) => {
|
|
|
|
|
- this.buryingPoint({
|
|
|
|
|
- systemModel: '计划外',
|
|
|
|
|
- buryingPointType: 1,
|
|
|
|
|
- buryingPointValue: val.storeName + '(' + val.storeCode + ')',
|
|
|
|
|
- buryingPointName: '进店拜访',
|
|
|
|
|
- buryingPointPosition: this.tabVal == 1 ? '我的' : '销售部',
|
|
|
|
|
|
|
+ this.buryingPoint({
|
|
|
|
|
+ systemModel: '计划外',
|
|
|
|
|
+ buryingPointType: 1,
|
|
|
|
|
+ buryingPointValue: val.chainName + '(' + val.chainCode + ')',
|
|
|
|
|
+ buryingPointName: '进店拜访',
|
|
|
|
|
+ buryingPointPosition: this.tabVal == 1 ? '我的' : '销售部',
|
|
|
|
|
+ });
|
|
|
|
|
+ if (val.stateString.indexOf('拜访中') != -1) {
|
|
|
|
|
+ localStorage.setItem('startTime', new Date());
|
|
|
|
|
+ localStorage.setItem('ORGName', val.deptName);
|
|
|
|
|
+ localStorage.setItem('chainNameR', val.chainName);
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/visitPage',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ typeCode2: val.typeCode2,
|
|
|
|
|
+ chainId: val.chainId,
|
|
|
|
|
+ rdId: val.rdId,
|
|
|
|
|
+ lat: val.lat,
|
|
|
|
|
+ lon: val.lon,
|
|
|
|
|
+ visitId: val.visitId,
|
|
|
|
|
+ pageType: 'out',
|
|
|
|
|
+ addressLine: val.addressLine,
|
|
|
|
|
+ storeCategory: val.storeCategory,
|
|
|
|
|
+ chainName: val.chainName,
|
|
|
|
|
+ hisTime: val.hisTime,
|
|
|
|
|
+ contactName: val.contactName,
|
|
|
|
|
+ chainCode: val.chainCode,
|
|
|
|
|
+ tabVal: this.tabVal,
|
|
|
|
|
+ visitModel: '1',
|
|
|
|
|
+ latNew: val.lat,
|
|
|
|
|
+ lonNew: val.lon,
|
|
|
|
|
+ PointSum: '0',
|
|
|
|
|
+ marklat: val.lat,
|
|
|
|
|
+ marklon: val.lon,
|
|
|
|
|
+ from: 'outPlan',
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
- if (res.code == 200 || val.stateString.indexOf('拜访中') != -1) {
|
|
|
|
|
- if (val.stateString.indexOf('拜访中') != -1) {
|
|
|
|
|
- localStorage.setItem('startTime', new Date());
|
|
|
|
|
- localStorage.setItem('ORGName', val.deptName);
|
|
|
|
|
- localStorage.setItem('chainNameR', val.storeName);
|
|
|
|
|
- this.$router.push({
|
|
|
|
|
- path: '/visitPage',
|
|
|
|
|
- query: {
|
|
|
|
|
- storeId: val.storeId,
|
|
|
|
|
- rdId: val.rdId,
|
|
|
|
|
- lat: val.lat,
|
|
|
|
|
- lon: val.lon,
|
|
|
|
|
- visitId: val.visitId,
|
|
|
|
|
- pageType: 'out',
|
|
|
|
|
- addressLine: val.addressLine,
|
|
|
|
|
- storeCategory: val.storeCategory,
|
|
|
|
|
- storeName: val.storeName,
|
|
|
|
|
- hisTime: val.hisTime,
|
|
|
|
|
- contactName: val.contactName,
|
|
|
|
|
- storeCode: val.storeCode,
|
|
|
|
|
- tabVal: this.tabVal,
|
|
|
|
|
- visitModel: '1',
|
|
|
|
|
- latNew: val.lat,
|
|
|
|
|
- lonNew: val.lon,
|
|
|
|
|
- PointSum: '0',
|
|
|
|
|
- marklat: val.lat,
|
|
|
|
|
- marklon: val.lon,
|
|
|
|
|
- from: 'outPlan',
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ getPosition()
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ let { TXisBD, resData } = res;
|
|
|
|
|
+ this.lat = TXisBD.lat;
|
|
|
|
|
+ this.lon = TXisBD.lon;
|
|
|
|
|
+ localStorage.setItem('lat', this.lat);
|
|
|
|
|
+ localStorage.setItem('lon', this.lon);
|
|
|
|
|
+ // var location = this.CJ02BD(res.latitude, res.longitude);
|
|
|
|
|
+ this.checkStoreAddressByStoreCodeFun(val, TXisBD, resData);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((error) => {
|
|
|
|
|
+ this.$dialog.alert({
|
|
|
|
|
+ message: error,
|
|
|
});
|
|
});
|
|
|
- } else {
|
|
|
|
|
- getPosition()
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- let { TXisBD, resData } = res;
|
|
|
|
|
- this.lat = TXisBD.lat;
|
|
|
|
|
- this.lon = TXisBD.lon;
|
|
|
|
|
- localStorage.setItem('lat', this.lat);
|
|
|
|
|
- localStorage.setItem('lon', this.lon);
|
|
|
|
|
- // var location = this.CJ02BD(res.latitude, res.longitude);
|
|
|
|
|
- this.checkStoreAddressByStoreCodeFun(val, TXisBD, resData);
|
|
|
|
|
- })
|
|
|
|
|
- .catch((error) => {
|
|
|
|
|
- this.$dialog.alert({
|
|
|
|
|
- message: error,
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$dialog.alert({
|
|
|
|
|
- message: res.msg,
|
|
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
checkStoreAddressByStoreCodeFun(val, location, res) {
|
|
checkStoreAddressByStoreCodeFun(val, location, res) {
|
|
|
- checkStoreAddressByStoreCode({
|
|
|
|
|
- storeCode: val.storeCode,
|
|
|
|
|
|
|
+ checkChainsAddressByChainCode({
|
|
|
|
|
+ chainCode: val.chainCode,
|
|
|
lon: location.lon,
|
|
lon: location.lon,
|
|
|
lat: location.lat,
|
|
lat: location.lat,
|
|
|
}).then((response) => {
|
|
}).then((response) => {
|
|
@@ -647,11 +615,11 @@ export default {
|
|
|
location.lon
|
|
location.lon
|
|
|
).toFixed(2);
|
|
).toFixed(2);
|
|
|
// 直接进入拜访 不校验经纬度
|
|
// 直接进入拜访 不校验经纬度
|
|
|
- localStorage.setItem('startTime', new Date());
|
|
|
|
|
- localStorage.setItem('ORGName', val.deptName);
|
|
|
|
|
- localStorage.setItem('chainNameR', val.storeName);
|
|
|
|
|
- this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ // localStorage.setItem('startTime', new Date());
|
|
|
|
|
+ // localStorage.setItem('ORGName', val.deptName);
|
|
|
|
|
+ // localStorage.setItem('chainNameR', val.chainName);
|
|
|
|
|
+ // this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
|
|
|
|
|
+ // return;
|
|
|
// 门店校验 地址不通过
|
|
// 门店校验 地址不通过
|
|
|
if (response.code != 200) {
|
|
if (response.code != 200) {
|
|
|
// updateAddress : ,1:同城AB+金牌,去修改地址;2:非金牌店铺,非同城店铺偏差过大不允许拜访,可以重置定位;0非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
|
|
// updateAddress : ,1:同城AB+金牌,去修改地址;2:非金牌店铺,非同城店铺偏差过大不允许拜访,可以重置定位;0非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
|
|
@@ -685,7 +653,7 @@ export default {
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
path: '/storeDetail',
|
|
path: '/storeDetail',
|
|
|
query: {
|
|
query: {
|
|
|
- id: val.storeId,
|
|
|
|
|
|
|
+ id: val.chainId,
|
|
|
type: 'address',
|
|
type: 'address',
|
|
|
storeAddressId: val.storeAddressId,
|
|
storeAddressId: val.storeAddressId,
|
|
|
},
|
|
},
|
|
@@ -722,7 +690,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
mobileReposition({
|
|
mobileReposition({
|
|
|
- storeId: val.storeId,
|
|
|
|
|
|
|
+ chainId: val.chainId,
|
|
|
lat: location.lat,
|
|
lat: location.lat,
|
|
|
lon: location.lon,
|
|
lon: location.lon,
|
|
|
}).then((response) => {
|
|
}).then((response) => {
|
|
@@ -737,7 +705,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
localStorage.setItem('startTime', new Date());
|
|
localStorage.setItem('startTime', new Date());
|
|
|
localStorage.setItem('ORGName', val.deptName);
|
|
localStorage.setItem('ORGName', val.deptName);
|
|
|
- localStorage.setItem('chainNameR', val.storeName);
|
|
|
|
|
|
|
+ localStorage.setItem('chainNameR', val.chainName);
|
|
|
} else {
|
|
} else {
|
|
|
this.$toast(response.msg);
|
|
this.$toast(response.msg);
|
|
|
}
|
|
}
|
|
@@ -747,7 +715,7 @@ export default {
|
|
|
// 进入拜访 router.push
|
|
// 进入拜访 router.push
|
|
|
toSuishenbangOutstoreVisit(res, val, location, PointSumval) {
|
|
toSuishenbangOutstoreVisit(res, val, location, PointSumval) {
|
|
|
addVisitsPosition({
|
|
addVisitsPosition({
|
|
|
- storeId: val.storeId,
|
|
|
|
|
|
|
+ chainId: val.chainId,
|
|
|
visitsId: '',
|
|
visitsId: '',
|
|
|
lon: res.longitude,
|
|
lon: res.longitude,
|
|
|
lat: res.latitude,
|
|
lat: res.latitude,
|
|
@@ -761,7 +729,8 @@ export default {
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
path: '/visitPage',
|
|
path: '/visitPage',
|
|
|
query: {
|
|
query: {
|
|
|
- storeId: val.storeId,
|
|
|
|
|
|
|
+ typeCode2: val.typeCode2,
|
|
|
|
|
+ chainId: val.chainId,
|
|
|
rdId: val.rdId,
|
|
rdId: val.rdId,
|
|
|
lat: location.lat,
|
|
lat: location.lat,
|
|
|
lon: location.lon,
|
|
lon: location.lon,
|
|
@@ -769,10 +738,10 @@ export default {
|
|
|
pageType: 'out',
|
|
pageType: 'out',
|
|
|
addressLine: val.addressLine,
|
|
addressLine: val.addressLine,
|
|
|
storeCategory: val.storeCategory,
|
|
storeCategory: val.storeCategory,
|
|
|
- storeName: val.storeName,
|
|
|
|
|
|
|
+ chainName: val.chainName,
|
|
|
hisTime: val.hisTime,
|
|
hisTime: val.hisTime,
|
|
|
contactName: val.contactName,
|
|
contactName: val.contactName,
|
|
|
- storeCode: val.storeCode,
|
|
|
|
|
|
|
+ chainCode: val.chainCode,
|
|
|
tabVal: this.tabVal,
|
|
tabVal: this.tabVal,
|
|
|
visitModel: '1',
|
|
visitModel: '1',
|
|
|
latNew: location.lat,
|
|
latNew: location.lat,
|
|
@@ -789,89 +758,77 @@ export default {
|
|
|
abnormalVisit(val) {
|
|
abnormalVisit(val) {
|
|
|
localStorage.removeItem('visitId');
|
|
localStorage.removeItem('visitId');
|
|
|
localStorage.setItem('tabVal', this.tabVal);
|
|
localStorage.setItem('tabVal', this.tabVal);
|
|
|
- checkVisit({ storeId: val.storeId }).then((res) => {
|
|
|
|
|
- this.buryingPoint({
|
|
|
|
|
- systemModel: '计划外',
|
|
|
|
|
- buryingPointType: 1,
|
|
|
|
|
- buryingPointValue: val.storeName + '(' + val.storeCode + ')',
|
|
|
|
|
- buryingPointName: '异常拜访',
|
|
|
|
|
- buryingPointPosition: this.tabVal == 1 ? '我的' : '销售部',
|
|
|
|
|
- });
|
|
|
|
|
- if (res.code == 200 || val.stateString.indexOf('拜访中') != -1) {
|
|
|
|
|
- getPosition()
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- let { TXisBD, resData } = res;
|
|
|
|
|
- this.lat = TXisBD.lat;
|
|
|
|
|
- this.lon = TXisBD.lon;
|
|
|
|
|
- localStorage.setItem('lat', this.lat);
|
|
|
|
|
- localStorage.setItem('lon', this.lon);
|
|
|
|
|
- let PointSum = this.twoPointSum(
|
|
|
|
|
- TXisBD.lat,
|
|
|
|
|
- TXisBD.lon,
|
|
|
|
|
- TXisBD.lat,
|
|
|
|
|
- TXisBD.lon
|
|
|
|
|
- ).toFixed(2);
|
|
|
|
|
- addVisitsPosition({
|
|
|
|
|
- storeId: val.storeId,
|
|
|
|
|
- visitsId: '',
|
|
|
|
|
- lon: resData.longitude,
|
|
|
|
|
- lat: resData.latitude,
|
|
|
|
|
- sourceLon: location.lon,
|
|
|
|
|
- sourceLat: location.lat,
|
|
|
|
|
- positionDesc: '',
|
|
|
|
|
- accuracy: resData.accuracy,
|
|
|
|
|
- }).then((response) => {
|
|
|
|
|
- // 进入拜访之前先刷新页面
|
|
|
|
|
- store.dispatch('setDeviceOutsidePage', true);
|
|
|
|
|
- this.$router.push({
|
|
|
|
|
- path: '/outabnormalVisit',
|
|
|
|
|
- query: {
|
|
|
|
|
- storeId: val.storeId,
|
|
|
|
|
- rdId: val.rdId,
|
|
|
|
|
- lat: this.lat,
|
|
|
|
|
- lon: this.lon,
|
|
|
|
|
- visitId: val.visitId,
|
|
|
|
|
- pageType: 'out',
|
|
|
|
|
- visitModel: localStorage.getItem('postType') != 'GZ' ? '5' : '3',
|
|
|
|
|
- storeCode: val.storeCode,
|
|
|
|
|
- tabVal: this.tabVal,
|
|
|
|
|
- latNew: TXisBD.lat,
|
|
|
|
|
- lonNew: TXisBD.lon,
|
|
|
|
|
- PointSum: PointSum,
|
|
|
|
|
- marklat: resData.latitude,
|
|
|
|
|
- marklon: resData.longitude,
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
- localStorage.setItem('startTime', new Date());
|
|
|
|
|
- localStorage.setItem('ORGName', val.deptName);
|
|
|
|
|
- localStorage.setItem('chainNameR', val.storeName);
|
|
|
|
|
- });
|
|
|
|
|
- })
|
|
|
|
|
- .catch((error) => {
|
|
|
|
|
- this.$dialog.alert({
|
|
|
|
|
- message: error,
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.buryingPoint({
|
|
|
|
|
+ systemModel: '计划外',
|
|
|
|
|
+ buryingPointType: 1,
|
|
|
|
|
+ buryingPointValue: val.chainName + '(' + val.chainCode + ')',
|
|
|
|
|
+ buryingPointName: '异常拜访',
|
|
|
|
|
+ buryingPointPosition: this.tabVal == 1 ? '我的' : '销售部',
|
|
|
|
|
+ });
|
|
|
|
|
+ getPosition()
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ let { TXisBD, resData } = res;
|
|
|
|
|
+ this.lat = TXisBD.lat;
|
|
|
|
|
+ this.lon = TXisBD.lon;
|
|
|
|
|
+ localStorage.setItem('lat', this.lat);
|
|
|
|
|
+ localStorage.setItem('lon', this.lon);
|
|
|
|
|
+ let PointSum = this.twoPointSum(TXisBD.lat, TXisBD.lon, TXisBD.lat, TXisBD.lon).toFixed(
|
|
|
|
|
+ 2
|
|
|
|
|
+ );
|
|
|
|
|
+ addVisitsPosition({
|
|
|
|
|
+ chainId: val.chainId,
|
|
|
|
|
+ visitsId: '',
|
|
|
|
|
+ lon: resData.longitude,
|
|
|
|
|
+ lat: resData.latitude,
|
|
|
|
|
+ sourceLon: location.lon,
|
|
|
|
|
+ sourceLat: location.lat,
|
|
|
|
|
+ positionDesc: '',
|
|
|
|
|
+ accuracy: resData.accuracy,
|
|
|
|
|
+ }).then((response) => {
|
|
|
|
|
+ // 进入拜访之前先刷新页面
|
|
|
|
|
+ store.dispatch('setDeviceOutsidePage', true);
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/visitAbnormal',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ chainId: val.chainId,
|
|
|
|
|
+ rdId: val.rdId,
|
|
|
|
|
+ lat: this.lat,
|
|
|
|
|
+ lon: this.lon,
|
|
|
|
|
+ visitId: val.visitId,
|
|
|
|
|
+ pageType: 'out',
|
|
|
|
|
+ visitModel: localStorage.getItem('postType') != 'GZ' ? '5' : '3',
|
|
|
|
|
+ chainCode: val.chainCode,
|
|
|
|
|
+ tabVal: this.tabVal,
|
|
|
|
|
+ latNew: TXisBD.lat,
|
|
|
|
|
+ lonNew: TXisBD.lon,
|
|
|
|
|
+ PointSum: PointSum,
|
|
|
|
|
+ marklat: resData.latitude,
|
|
|
|
|
+ marklon: resData.longitude,
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
- } else {
|
|
|
|
|
|
|
+ localStorage.setItem('startTime', new Date());
|
|
|
|
|
+ localStorage.setItem('ORGName', val.deptName);
|
|
|
|
|
+ localStorage.setItem('chainNameR', val.chainName);
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((error) => {
|
|
|
this.$dialog.alert({
|
|
this.$dialog.alert({
|
|
|
- title: '系统提示',
|
|
|
|
|
- message: res.msg,
|
|
|
|
|
|
|
+ message: error,
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
// 客户门店
|
|
// 客户门店
|
|
|
visitFn(val) {
|
|
visitFn(val) {
|
|
|
this.buryingPoint({
|
|
this.buryingPoint({
|
|
|
systemModel: '计划外',
|
|
systemModel: '计划外',
|
|
|
buryingPointType: 1,
|
|
buryingPointType: 1,
|
|
|
- buryingPointValue: val.storeName + '(' + val.storeCode + ')',
|
|
|
|
|
|
|
+ buryingPointValue: val.chainName + '(' + val.chainCode + ')',
|
|
|
buryingPointName: '客户信息',
|
|
buryingPointName: '客户信息',
|
|
|
buryingPointPosition: this.tabVal == 1 ? '我的' : '销售部',
|
|
buryingPointPosition: this.tabVal == 1 ? '我的' : '销售部',
|
|
|
});
|
|
});
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
path: '/storeDetail',
|
|
path: '/storeDetail',
|
|
|
- query: { id: val.storeId, detilId: 'a' },
|
|
|
|
|
|
|
+ query: { id: val.chainId, detilId: 'a' },
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
// 拜访信息
|
|
// 拜访信息
|
|
@@ -880,8 +837,8 @@ export default {
|
|
|
path: '/historicalDetails',
|
|
path: '/historicalDetails',
|
|
|
query: {
|
|
query: {
|
|
|
visitId: val.visitId,
|
|
visitId: val.visitId,
|
|
|
- storeId: val.storeId,
|
|
|
|
|
- storeCode: val.storeCode,
|
|
|
|
|
|
|
+ chainId: val.chainId,
|
|
|
|
|
+ chainCode: val.chainCode,
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -895,6 +852,7 @@ export default {
|
|
|
this.onLoad();
|
|
this.onLoad();
|
|
|
},
|
|
},
|
|
|
onSearchm() {
|
|
onSearchm() {
|
|
|
|
|
+ storeCategoryList;
|
|
|
var StoreLabelsArr = [];
|
|
var StoreLabelsArr = [];
|
|
|
for (var k = 0; k < this.storeLabelTypes.length; k++) {
|
|
for (var k = 0; k < this.storeLabelTypes.length; k++) {
|
|
|
for (var k1 = 0; k1 < this.StoreLabels.length; k1++) {
|
|
for (var k1 = 0; k1 < this.StoreLabels.length; k1++) {
|
|
@@ -911,7 +869,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- localStorage.setItem('outvstoreName', this.storeName);
|
|
|
|
|
|
|
+ localStorage.setItem('outvstoreName', this.chainName);
|
|
|
localStorage.setItem('outvchainName', this.chainName);
|
|
localStorage.setItem('outvchainName', this.chainName);
|
|
|
localStorage.setItem('outvstoreLabelTypes', this.storeLabelTypes);
|
|
localStorage.setItem('outvstoreLabelTypes', this.storeLabelTypes);
|
|
|
localStorage.setItem('outvstoreCategoryList', this.result);
|
|
localStorage.setItem('outvstoreCategoryList', this.result);
|
|
@@ -955,9 +913,9 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 跳转好帮手门店详情
|
|
// 跳转好帮手门店详情
|
|
|
goOtherSystem(item) {
|
|
goOtherSystem(item) {
|
|
|
- if (item.storeCode) {
|
|
|
|
|
|
|
+ if (item.chainCode) {
|
|
|
window.location.href =
|
|
window.location.href =
|
|
|
- process.env.VUE_APP_SSB_LINK + '/order/storeDetail/index?shopCode=' + item.storeCode;
|
|
|
|
|
|
|
+ process.env.VUE_APP_SSB_LINK + '/order/storeDetail/index?shopCode=' + item.chainCode;
|
|
|
} else {
|
|
} else {
|
|
|
this.$dialog.alert({
|
|
this.$dialog.alert({
|
|
|
message: '缺少门店code',
|
|
message: '缺少门店code',
|