Kaynağa Gözat

客资、客诉去掉-转交其他组织操作,优化列表筛选条件

zhujindu 11 ay önce
ebeveyn
işleme
846ae4f898
2 değiştirilmiş dosya ile 47 ekleme ve 40 silme
  1. 45 37
      src/api/clew.js
  2. 2 3
      src/views/clew/index.vue

+ 45 - 37
src/api/clew.js

@@ -1,52 +1,60 @@
-import request from '@/utils/request'
+import request from '@/utils/request';
 
 // 不想写
 export function infolist(query) {
-    return request({
-        url: 'mobile/customerClueInfo/infolist',
-        method: 'get',
-        params: query
-    })
+  return request({
+    url: 'mobile/customerClueInfo/infolist',
+    method: 'get',
+    params: query,
+  });
 }
 export function getCustomerClueInfoById(query) {
-    return request({
-        url: 'mobile/customerClueInfo/getCustomerClueInfoById',
-        method: 'get',
-        params: query
-    })
+  return request({
+    url: 'mobile/customerClueInfo/getCustomerClueInfoById',
+    method: 'get',
+    params: query,
+  });
 }
 export function insertCustomerClueAnswer(data) {
-    return request({
-        url: 'mobile/customerClueInfo/insertCustomerClueAnswer',
-        method: 'post',
-        data
-    })
+  return request({
+    url: 'mobile/customerClueInfo/insertCustomerClueAnswer',
+    method: 'post',
+    data,
+  });
 }
 export function addPhotoK(data) {
-    return request({
-        url: 'mobile/customerClueInfo/addPhoto',
-        method: 'post',
-        data
-    })
+  return request({
+    url: 'mobile/customerClueInfo/addPhoto',
+    method: 'post',
+    data,
+  });
 }
 export function getCustomerClueAnswerById(query) {
-    return request({
-        url: 'mobile/customerClueInfo/getCustomerClueAnswerById',
-        method: 'get',
-        params: query
-    })
+  return request({
+    url: 'mobile/customerClueInfo/getCustomerClueAnswerById',
+    method: 'get',
+    params: query,
+  });
 }
 export function getDeptInfo(query) {
-    return request({
-        url: 'mobile/customerClueInfo/getDeptInfo',
-        method: 'get',
-        params: query
-    })
+  return request({
+    url: 'mobile/customerClueInfo/getDeptInfo',
+    method: 'get',
+    params: query,
+  });
 }
 export function updateCustomerClueDept(query) {
-    return request({
-        url: 'mobile/customerClueInfo/updateCustomerClueDept',
-        method: 'get',
-        params: query
-    })
-}
+  return request({
+    url: 'mobile/customerClueInfo/updateCustomerClueDept',
+    method: 'get',
+    params: query,
+  });
+}
+//查询客资列表分组
+export function getCustomerClueType(query) {
+  return request({
+    url: 'mobile/customerClueInfo/getCustomerClueType',
+    method: 'get',
+    params: query,
+  });
+}

+ 2 - 3
src/views/clew/index.vue

@@ -61,8 +61,7 @@
 </template>
 
 <script>
-import { infolist } from '@/api/clew';
-import { getDictOption } from '@/api';
+import { infolist, getCustomerClueType } from '@/api/clew';
 export default {
   name: 'clew',
   data() {
@@ -100,7 +99,7 @@ export default {
   },
   methods: {
     async getCustomerClue() {
-      let option = await getDictOption({}, 'customer_clue');
+      let option = await getCustomerClueType();
       let arr = [{ text: '全部', value: -1 }];
       option.data.forEach((val) => {
         arr.push({