|
|
@@ -127,8 +127,42 @@ export default {
|
|
|
localStorage.removeItem('visitId');
|
|
|
checkVisit({ storeId: val.storeId }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
+ this.activatStoreVal = val;
|
|
|
+ // 拜访页面分为 计划外、计划内; 0计划内 1计划外
|
|
|
+ this.visitRoutePath =
|
|
|
+ this.activatStoreVal.visitEntry == '1'
|
|
|
+ ? '/suishenbangOutstoreVisit'
|
|
|
+ : '/storeVisitpage';
|
|
|
if (val.stateString.indexOf('拜访中') != -1) {
|
|
|
- this.toSuishenbangOutstoreVisit(0);
|
|
|
+ this.clickIsFlage = true;
|
|
|
+ localStorage.setItem('startTime', new Date());
|
|
|
+ localStorage.setItem('ORGName', this.activatStoreVal.deptName);
|
|
|
+ localStorage.setItem('chainNameR', this.activatStoreVal.storeName);
|
|
|
+ this.$router.push({
|
|
|
+ path: this.visitRoutePath,
|
|
|
+ query: {
|
|
|
+ storeId: this.activatStoreVal.storeId,
|
|
|
+ rdId: this.activatStoreVal.rdId,
|
|
|
+ lat: this.activatStoreVal.lat,
|
|
|
+ lon: this.activatStoreVal.lon,
|
|
|
+ visitId: this.activatStoreVal.visitId,
|
|
|
+ pageType: 'out',
|
|
|
+ addressLine: this.activatStoreVal.addressLine,
|
|
|
+ storeCategory: this.activatStoreVal.storeCategoryName,
|
|
|
+ storeName: this.activatStoreVal.storeName,
|
|
|
+ hisTime: this.activatStoreVal.hisTime,
|
|
|
+ contactName: this.activatStoreVal.contactName,
|
|
|
+ storeCode: this.activatStoreVal.storeCode,
|
|
|
+ tabVal: this.tabVal,
|
|
|
+ visitModel: '1',
|
|
|
+ latNew: this.activatStoreVal.lat,
|
|
|
+ lonNew: this.activatStoreVal.lon,
|
|
|
+ PointSum: 0,
|
|
|
+ marklat: this.activatStoreVal.lat,
|
|
|
+ marklon: this.activatStoreVal.lon,
|
|
|
+ from: 'outPlan',
|
|
|
+ },
|
|
|
+ });
|
|
|
} else {
|
|
|
// 拜访时重新获取定位
|
|
|
getPosition()
|
|
|
@@ -138,12 +172,6 @@ export default {
|
|
|
this.TXPiont = resData;
|
|
|
localStorage.setItem('lat', TXisBD.lat);
|
|
|
localStorage.setItem('lon', TXisBD.lon);
|
|
|
- this.activatStoreVal = val;
|
|
|
- // 拜访页面分为 计划外、计划内; 0计划内 1计划外
|
|
|
- this.visitRoutePath =
|
|
|
- this.activatStoreVal.visitEntry == '1'
|
|
|
- ? '/suishenbangOutstoreVisit'
|
|
|
- : '/storeVisitpage';
|
|
|
this.checkStoreAddressByStoreCodeFun();
|
|
|
})
|
|
|
.catch((error) => {
|
|
|
@@ -280,7 +308,7 @@ export default {
|
|
|
visitId: this.activatStoreVal.visitId,
|
|
|
pageType: 'out',
|
|
|
addressLine: this.activatStoreVal.addressLine,
|
|
|
- storeCategory: this.activatStoreVal.storeCategory,
|
|
|
+ storeCategory: this.activatStoreVal.storeCategoryName,
|
|
|
storeName: this.activatStoreVal.storeName,
|
|
|
hisTime: this.activatStoreVal.hisTime,
|
|
|
contactName: this.activatStoreVal.contactName,
|