Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

xgb 1 неделя назад
Родитель
Сommit
4ad3f245a3

+ 14 - 0
src/api/crm/customer.js

@@ -151,3 +151,17 @@ export function delCustomer(customerId) {
     method: 'delete'
   })
 }
+
+export function getCustomerDetails1(data) {
+  return request({
+    url: '/crm/customer/query/' + data.customerId,
+    method: 'get'
+  })
+}
+
+export function getCustomer1(customerId) {
+  return request({
+    url: '/crm/customer/query2/' + customerId,
+    method: 'get'
+  })
+}

+ 7 - 7
src/api/hisStore/city.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 查询城市列表
 export function listCity(query) {
   return request({
-    url: '/store/city/list',
+    url: '/his/city/list',
     method: 'get',
     params: query
   })
@@ -18,7 +18,7 @@ export function getAllList(query) {
 
 export function getCitys() {
   return request({
-    url: '/store/city/getCitys',
+    url: '/his/city/getCitys',
     method: 'get'
   })
 }
@@ -28,7 +28,7 @@ export function getCitys() {
 // 查询城市详细
 export function getCity(id) {
   return request({
-    url: '/store/city/' + id,
+    url: '/his/city/' + id,
     method: 'get'
   })
 }
@@ -36,7 +36,7 @@ export function getCity(id) {
 // 新增城市
 export function addCity(data) {
   return request({
-    url: '/store/city',
+    url: '/his/city',
     method: 'post',
     data: data
   })
@@ -45,7 +45,7 @@ export function addCity(data) {
 // 修改城市
 export function updateCity(data) {
   return request({
-    url: '/store/city',
+    url: '/his/city',
     method: 'put',
     data: data
   })
@@ -54,7 +54,7 @@ export function updateCity(data) {
 // 删除城市
 export function delCity(id) {
   return request({
-    url: '/store/city/' + id,
+    url: '/his/city/' + id,
     method: 'delete'
   })
 }
@@ -62,7 +62,7 @@ export function delCity(id) {
 // 导出城市
 export function exportCity(query) {
   return request({
-    url: '/store/city/export',
+    url: '/his/city/export',
     method: 'get',
     params: query
   })

+ 3 - 3
src/api/store/city.js

@@ -18,7 +18,7 @@ export function getAllList(query) {
 
 export function getCitys() {
   return request({
-    url: '/store/city/getCitys',
+    url: '/his/city/getCitys',
     method: 'get'
   })
 }
@@ -54,7 +54,7 @@ export function updateCity(data) {
 // 删除城市
 export function delCity(id) {
   return request({
-    url: '/his/city' + id,
+    url: '/his/city/' + id,
     method: 'delete'
   })
 }
@@ -62,7 +62,7 @@ export function delCity(id) {
 // 导出城市
 export function exportCity(query) {
   return request({
-    url: '/his/cityexport',
+    url: '/his/city/export',
     method: 'get',
     params: query
   })

+ 8 - 8
src/api/store/store/city.js

@@ -3,14 +3,14 @@ import request from '@/utils/request'
 // 查询城市列表
 export function listCity(query) {
   return request({
-    url: '/store/city/list',
+    url: '/his/city/list',
     method: 'get',
     params: query
   })
 }
 export function getCitys(query) {
   return request({
-    url: '/store/city/getCitys',
+    url: '/his/city/getCitys',
     method: 'get',
     params: query
   })
@@ -21,7 +21,7 @@ export function getCitys(query) {
 // 查询城市详细
 export function getCity(id) {
   return request({
-    url: '/store/city/' + id,
+    url: '/his/city/' + id,
     method: 'get'
   })
 }
@@ -29,7 +29,7 @@ export function getCity(id) {
 // 新增城市
 export function addCity(data) {
   return request({
-    url: '/store/city',
+    url: '/his/city',
     method: 'post',
     data: data
   })
@@ -38,7 +38,7 @@ export function addCity(data) {
 // 修改城市
 export function updateCity(data) {
   return request({
-    url: '/store/city',
+    url: '/his/city',
     method: 'put',
     data: data
   })
@@ -47,7 +47,7 @@ export function updateCity(data) {
 // 删除城市
 export function delCity(id) {
   return request({
-    url: '/store/city/' + id,
+    url: '/his/city/' + id,
     method: 'delete'
   })
 }
@@ -55,8 +55,8 @@ export function delCity(id) {
 // 导出城市
 export function exportCity(query) {
   return request({
-    url: '/store/city/export',
+    url: '/his/city/export',
     method: 'get',
     params: query
   })
-}
+}

+ 2 - 2
src/api/store/user.js

@@ -87,7 +87,7 @@ export function getAllUserListLimit(query) {
 // 获取小黑屋用户列表
 export function darkRoomList(query) {
   return request({
-    url: '/store/store/user/darkRoomListList',
+    url: '/his/user/darkRoomList',
     method: 'get',
     params: query
   })
@@ -96,7 +96,7 @@ export function darkRoomList(query) {
 // 批量解禁
 export function enabledUsers(data) {
   return request({
-    url: '/store/user/enabledUsers',
+    url: '/his/user/enabledUsers',
     method: 'post',
     data: data
   })

+ 7 - 5
src/views/crm/components/customerDetails.vue

@@ -564,7 +564,7 @@ export default {
             getCustomerDetails1(data).then(response => {
                 this.item = response.customer
                 this.isReceive = response.isReceive
-                if (this.item.extJson != null) {
+                if (this.item && this.item.extJson != null) {
                     var extList = JSON.parse(this.item.extJson)
                     that.exts.forEach(item => {
                         extList.forEach(element => {
@@ -574,10 +574,12 @@ export default {
                         })
                     })
                 }
-                this.activeName = 'visit'
-                setTimeout(() => {
-                    that.$refs.visit.getData(customerId)
-                }, 500)
+                if (this.item) {
+                    this.activeName = 'visit'
+                    setTimeout(() => {
+                        that.$refs.visit.getData(customerId)
+                    }, 500)
+                }
             })
         },
         initDuplicate(isDuplicate, dCustomerId) {

+ 3 - 3
src/views/hisStore/components/productOrder.vue

@@ -759,7 +759,7 @@ export default {
       try {
         const res = await getCitys();
         this.citys = res.data;
-        this.province = res.data.filter(item => item.pid === 0);
+        this.province = res.data.filter(item => item.pid == 0);
         // 可选:返回数据以便链式调用
         return res.data;
       } catch (error) {
@@ -810,7 +810,7 @@ export default {
 
         // 获取城市列表
         if (Array.isArray(province.children)) {
-          this.city = province.children.filter(item => item.pid === province.value);
+          this.city = province.children.filter(item => item.pid == province.value);
 
           // 解析城市
           const cityName = addressParts[1];
@@ -821,7 +821,7 @@ export default {
 
             // 获取区县列表
             if (Array.isArray(city.children)) {
-              this.district = city.children.filter(item => item.pid === city.value);
+              this.district = city.children.filter(item => item.pid == city.value);
 
               // 解析区县
               const districtName = addressParts[2];

+ 7 - 5
src/views/qw/externalContact/customerDetails.vue

@@ -465,7 +465,7 @@
                 getCustomerDetails1(data).then(response => {
                     this.item = response.customer;
                     this.isReceive=response.isReceive;
-                    if(this.item.extJson!=null){
+                    if(this.item && this.item.extJson!=null){
                         var extList=JSON.parse(this.item.extJson);
                         that.exts.forEach(item => {
                             extList.forEach(element => {
@@ -476,10 +476,12 @@
 
                         });
                     }
-                    this.activeName="visit"
-                    setTimeout(() => {
-                        that.$refs.visit.getData(customerId);
-                    }, 500);
+                    if (this.item) {
+                        this.activeName="visit"
+                        setTimeout(() => {
+                            that.$refs.visit.getData(customerId);
+                        }, 500);
+                    }
                 });
             },
             initDuplicate(isDuplicate,dCustomerId){