|
|
@@ -551,59 +551,59 @@ export default {
|
|
|
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.toastLoading().clear();
|
|
|
- this.$router.push({
|
|
|
- path: '/visitPage',
|
|
|
- query: {
|
|
|
- typeCode2: val.typeCode2,
|
|
|
- chainId: val.chainId,
|
|
|
- rdId: val.rdId,
|
|
|
- customerManager: val.customerManager,
|
|
|
- openDate: val.openDate,
|
|
|
- close: val.close,
|
|
|
- freeze: val.freeze,
|
|
|
- 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',
|
|
|
- },
|
|
|
- });
|
|
|
- } 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) => {
|
|
|
+ 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);
|
|
|
+ if (val.stateString.indexOf('拜访中') != -1) {
|
|
|
+ localStorage.setItem('startTime', new Date());
|
|
|
+ localStorage.setItem('ORGName', val.deptName);
|
|
|
+ localStorage.setItem('chainNameR', val.chainName);
|
|
|
this.toastLoading().clear();
|
|
|
- this.$dialog.alert({
|
|
|
- message: error,
|
|
|
+ this.$router.push({
|
|
|
+ path: '/visitPage',
|
|
|
+ query: {
|
|
|
+ typeCode2: val.typeCode2,
|
|
|
+ chainId: val.chainId,
|
|
|
+ rdId: val.rdId,
|
|
|
+ customerManager: val.customerManager,
|
|
|
+ openDate: val.openDate,
|
|
|
+ close: val.close,
|
|
|
+ freeze: val.freeze,
|
|
|
+ lat: TXisBD.lat,
|
|
|
+ lon: TXisBD.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: TXisBD.lat,
|
|
|
+ lonNew: TXisBD.lon,
|
|
|
+ PointSum: '0',
|
|
|
+ marklat: resData.latitude,
|
|
|
+ marklon: resData.longitude,
|
|
|
+ from: 'outPlan',
|
|
|
+ },
|
|
|
});
|
|
|
+ } else {
|
|
|
+ this.checkStoreAddressByStoreCodeFun(val, TXisBD, resData);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ this.toastLoading().clear();
|
|
|
+ this.$dialog.alert({
|
|
|
+ message: error,
|
|
|
});
|
|
|
- }
|
|
|
+ });
|
|
|
},
|
|
|
checkStoreAddressByStoreCodeFun(val, location, res) {
|
|
|
checkChainsAddressByChainCode({
|