Kaynağa Gözat

经销商拜访

zhujindu 9 ay önce
ebeveyn
işleme
1e2fa889f5

+ 1 - 1
src/api/home.js

@@ -36,7 +36,7 @@ export function checkChainsAddressByChainCode(query) {
 // 查询主经销商
 export function getMainchains(query) {
   return request({
-    url: '/mobile/chainsGroup/getMainchains',
+    url: '/mobile/chainsGroup/getMainChains',
     method: 'get',
     params: query,
   });

+ 3 - 3
src/views/home/index.vue

@@ -217,7 +217,7 @@
       <van-picker
         show-toolbar
         :columns="chainsData"
-        value-key="chainName"
+        value-key="mainCustomerName"
         @confirm="onConfirmChainsList"
         @cancel="moreTypeShow = false"
         visible-item-count="10" />
@@ -413,8 +413,8 @@ export default {
     },
     onConfirmChainsList(value) {
       if (value.chainName != undefined) {
-        this.chainName = value.chainName;
-        this.chainCode = value.chainCode;
+        this.chainName = value.mainCustomerName;
+        this.chainCode = value.mainCustomerCode;
       }
       this.showPickerChainsList = false;
       this.moreTypeShow = false;

+ 8 - 6
src/views/home/visitAbnormal.vue

@@ -95,16 +95,18 @@ export default {
   },
   created() {
     this.urlParameter = this.$route.query;
-    this.chainId = this.$route.query.chainId + '';
-    this.visitId = this.$route.query.visitId;
+    this.chainId = this.$route.query.chainId || '';
+    this.visitId = localStorage.getItem('visitId') || this.$route.query.visitId;
     this.chainCode = this.$route.query.chainCode;
-    this.rdId = this.$route.query.rdId + '';
-    this.lat = this.$route.query.lat + '';
-    this.lon = this.$route.query.lon + '';
-    this.visitModel = this.$route.query.visitModel + '';
+    this.rdId = this.$route.query.rdId || '';
+    this.lat = this.$route.query.lat || '';
+    this.lon = this.$route.query.lon || '';
+    this.visitModel = this.$route.query.visitModel || '';
     this.imgs = [];
     this.remark = '';
     this.abnormalReason = '';
+  },
+  mounted() {
     this.addVisits();
     this.getPhotoTypeList();
   },

+ 0 - 1
src/views/home/visitPage.vue

@@ -341,7 +341,6 @@ export default {
         zoom: 14,
         center: new TMap.LatLng(39.986785, 116.301012),
       });
-
       var geocoder = new TMap.service.Geocoder();
       var markers = new TMap.MultiMarker({
         map: map,