Przeglądaj źródła

改动管理员菜单

lmx 19 godzin temu
rodzic
commit
67135a4cdb
1 zmienionych plików z 38 dodań i 12 usunięć
  1. 38 12
      src/views/crm/customer/customerAll.vue

+ 38 - 12
src/views/crm/customer/customerAll.vue

@@ -98,6 +98,16 @@
             @keyup.enter.native="handleQuery"
           />
         </el-form-item>
+         <el-form-item label="跟进阶段" prop="status">
+        <el-select style="width:220px" multiple filterable  v-model="statusArr" placeholder="请选择跟进阶段" clearable size="small">
+           <el-option
+                v-for="item in visitStatusOptions"
+                :key="item.dictValue"
+                :label="item.dictLabel"
+                :value="item.dictValue"
+              />
+        </el-select>
+      </el-form-item>
         <el-form-item>
           <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
           <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -173,7 +183,7 @@
 
 <script>
 import { getCustomerAllList } from "@/api/crm/customerAll";
-import { getMyCustomerPhone } from "@/api/crm/customer";
+import { getMyCustomerPhone,getTradeDicts } from "@/api/crm/customer";
 import customerDetails from '../components/customerDetails.vue';
 import customerCallLogList from '../components/customerCallLogList.vue';
 
@@ -182,6 +192,8 @@ export default {
   components: { customerDetails, customerCallLogList },
   data() {
     return {
+      
+      statusArr:[],
       isDuplicateOptions: [{"dictLabel":"不限","dictValue":""},{"dictLabel":"从客户","dictValue":1},{"dictLabel":"非从客户","dictValue":2}],
       tagIds: [],
       tagsOptions: [],
@@ -218,22 +230,30 @@ export default {
     };
   },
   created() {
-    this.getDicts("crm_customer_source").then((response) => {
-      this.sourceOptions = response.data;
-    });
+    // this.getDicts("crm_customer_source").then((response) => {
+    //   this.sourceOptions = response.data;
+    // });
     this.getDicts("crm_customer_status").then((response) => {
       this.statusOptions = response.data;
     });
-    this.getDicts("crm_customer_type").then((response) => {
-      this.typeOptions = response.data;
-    });
-    this.getDicts("crm_customer_tag").then((response) => {
-      this.tagsOptions = response.data;
-    });
-    this.getDicts("crm_customer_user_status").then((response) => {
-      this.visitStatusOptions = response.data;
+    // this.getDicts("crm_customer_type").then((response) => {
+    //   this.typeOptions = response.data;
+    // });
+    // this.getDicts("crm_customer_tag").then((response) => {
+    //   this.tagsOptions = response.data;
+    // });
+    // this.getDicts("crm_customer_user_status").then((response) => {
+    //   this.visitStatusOptions = response.data;
+    // });
+     getTradeDicts().then((response) => {
+      const data = response.data;
+      this.sourceOptions = data["crm_customer_source"] || [];
+      this.visitStatusOptions = data["crm_customer_user_status"] || [];
+      this.typeOptions = data["crm_customer_type"] || [];
+      this.tagsOptions = data["crm_customer_tag"] || [];
     });
     this.getList();
+   
   },
   methods: {
     handleShow(row) {
@@ -271,6 +291,12 @@ export default {
       } else {
         this.queryParams.tags = null;
       }
+       if(this.statusArr.length>0){
+        this.queryParams.visitStatus = this.statusArr.toString();
+      } else{
+        this.queryParams.visitStatus = null
+      }
+
       getCustomerAllList(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
         this.customerList = response.rows;
         this.total = response.total;