Parcourir la source

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper

Min il y a 1 an
Parent
commit
ec3502ad30

+ 7 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/api.ts

@@ -2,4 +2,10 @@ export const MOD = "/business";
 export const prefix = "/clue";
 export const GETSYSFILED = "/sys-dict/getListByCode";
 export const GETPERSONNEL = "/user/getSimpleActiveUserList";
-export const GETGENERATEFOEM = `sys-form/getListByCode${MOD}`
+export const GETGENERATEFOEM = `sys-form/getListByCode${MOD}`
+
+export const stageStatus = [
+    { id: 1, name: "赢单", progress: "100%" },
+    { id: 2, name: "输单", progress: "0%" },
+    { id: 3, name: "无效", progress: "0%" }
+]

+ 76 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/attachment.vue

@@ -0,0 +1,76 @@
+<template>
+    <div class="attachment pl-4 pr-4 pt-3 pb-3 h-full flex flex-col">
+        <div class="flex justify-between">
+            <div class="title">附件</div>
+            <div>
+                <el-button type="primary">上传</el-button>
+            </div>
+        </div>
+        <div class="flex-1 overflow-auto pt-3">
+            <el-table :data="attachmenttable" border style="width: 100%;height: 200px;">
+                <el-table-column prop="fileName" label="附件名称" width="180" />
+                <el-table-column prop="fileSize" label="附件大小" width="120" />
+                <el-table-column prop="uploader" label="上传人" width="120" />
+                <el-table-column prop="uploadTime" label="上传时间" width="180" />
+                <el-table-column label="操作" width="180" fixed="right">
+                    <template #default="scope">
+                        <el-button link type="primary" size="large">下载</el-button>
+                        <el-button link type="primary" size="large">重命名</el-button>
+                        <el-button link type="danger" size="large">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+        </div>
+    </div>
+</template>
+<script lang="ts" setup>
+import { ref, reactive, onMounted, onUnmounted, defineExpose, inject } from 'vue'
+
+const attachmenttable = ref([{
+    fileName: '文件附件',
+    fileSize: '3.1MB',
+    uploader: '张三',
+    uploadTime: '2024-04-01',
+}, {
+    fileName: '文件附件',
+    fileSize: '3.1MB',
+    uploader: '张三',
+    uploadTime: '2024-04-01',
+}, {
+    fileName: '文件附件',
+    fileSize: '3.1MB',
+    uploader: '张三',
+    uploadTime: '2024-04-01',
+}, {
+    fileName: '文件附件',
+    fileSize: '3.1MB',
+    uploader: '张三',
+    uploadTime: '2024-04-01',
+}, {
+    fileName: '文件附件',
+    fileSize: '3.1MB',
+    uploader: '张三',
+    uploadTime: '2024-04-01',
+}, {
+    fileName: '文件附件',
+    fileSize: '3.1MB',
+    uploader: '张三',
+    uploadTime: '2024-04-01',
+}, {
+    fileName: '文件附件',
+    fileSize: '3.1MB',
+    uploader: '张三',
+    uploadTime: '2024-04-01',
+}])
+// 生命周期钩子
+onMounted(() => {
+});
+</script>
+<style scoped lang="scss">
+.attachment {
+    .title {
+        font-size: 18px;
+        color: #000
+    }
+}
+</style>

Fichier diff supprimé car celui-ci est trop grand
+ 74 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/information.vue


+ 58 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/operationRecord.vue

@@ -0,0 +1,58 @@
+<template>
+    <div class="operationRecord pl-4 pr-4 pt-3 pb-3 h-full flex flex-col">
+        <div class="flex justify-between">
+            <div class="title">操作记录</div>
+        </div>
+        <div class="flex-1 overflow-auto pt-5">
+            <el-table :data="operationRecordtable" border style="width: 100%;height: 278px;">
+                <el-table-column prop="operatingTime" label="操作时间" width="140" />
+                <el-table-column prop="operator" label="操作人" width="120" />
+                <el-table-column prop="operationContent" label="操作内容" />
+            </el-table>
+        </div>
+    </div>
+</template>
+<script lang="ts" setup>
+import { ref, reactive, onMounted, onUnmounted, defineExpose, inject } from 'vue'
+
+const operationRecordtable = ref([{
+    operationContent: '转移线索',
+    operator: '张三',
+    operatingTime: '2024-04-01',
+}, {
+    operationContent: '转移线索',
+    operator: '张三',
+    operatingTime: '2024-04-01',
+}, {
+    operationContent: '转移线索',
+    operator: '张三',
+    operatingTime: '2024-04-01',
+}, {
+    operationContent: '转移线索',
+    operator: '张三',
+    operatingTime: '2024-04-01',
+}, {
+    operationContent: '转移线索',
+    operator: '张三',
+    operatingTime: '2024-04-01',
+}, {
+    operationContent: '转移线索',
+    operator: '张三',
+    operatingTime: '2024-04-01',
+}, {
+    operationContent: '转移线索',
+    operator: '张三',
+    operatingTime: '2024-04-01',
+},])
+// 生命周期钩子
+onMounted(() => {
+});
+</script>
+<style scoped lang="scss">
+.operationRecord {
+    .title {
+        font-size: 18px;
+        color: #000
+    }
+}
+</style>

+ 93 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/products.vue

@@ -0,0 +1,93 @@
+<template>
+    <div class="relatedTasks pl-4 pr-4 pt-3 pb-3 h-full flex flex-col">
+        <div class="flex justify-between">
+            <div class="title">相关产品</div>
+            <div>
+                <el-button type="primary">编辑产品</el-button>
+            </div>
+        </div>
+        <div class="flex-1 overflow-auto pt-3">
+            <el-table :data="relatedTaskstable" border style="width: 100%;height: 300px;">
+                <el-table-column label="序号" width="80">
+                    <template #default="scope">
+                        {{ scope.$index + 1 }}
+                    </template>
+                </el-table-column>
+                <el-table-column prop="taskName" label="产品名称">
+                    <template #default="scope">
+                        <el-button link type="primary" size="large">{{
+                            scope.row.taskName
+                        }}</el-button>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="priority" label="产品类别" width="130" />
+                <el-table-column prop="status" label="产品类型" width="130" />
+                <el-table-column prop="executor" label="单位" width="130" />
+                <el-table-column prop="startTime" label="标准价格" width="130" />
+                <el-table-column prop="endTime" label="库存" width="130" />
+                <el-table-column prop="endTime" label="售价" width="130" />
+                <el-table-column prop="endTime" label="数量" width="130" />
+                <el-table-column prop="endTime" label="折扣(%)" width="130" />
+                <el-table-column prop="endTime" label="合计" width="130" />
+            </el-table>
+        </div>
+    </div>
+</template>
+<script lang="ts" setup>
+import { ref, reactive, onMounted, onUnmounted, defineExpose, inject } from 'vue'
+
+const relatedTaskstable = ref([{
+    taskName: '任务名称20240316-tempalsbls',
+    priority: '中',
+    status: '进行中',
+    executor: '张三',
+    startTime: '2024-04-01',
+    endTime: '2024-04-01',
+}, {
+    taskName: '任务名称20240316-tempalsbls',
+    priority: '中',
+    status: '进行中',
+    executor: '张三',
+    startTime: '2024-04-01',
+    endTime: '2024-04-01',
+}, {
+    taskName: '任务名称20240316-tempalsbls',
+    priority: '中',
+    status: '进行中',
+    executor: '张三',
+    startTime: '2024-04-01',
+    endTime: '2024-04-01',
+}, {
+    taskName: '任务名称20240316-tempalsbls',
+    priority: '中',
+    status: '进行中',
+    executor: '张三',
+    startTime: '2024-04-01',
+    endTime: '2024-04-01',
+}, {
+    taskName: '任务名称20240316-tempalsbls',
+    priority: '中',
+    status: '进行中',
+    executor: '张三',
+    startTime: '2024-04-01',
+    endTime: '2024-04-01',
+}, {
+    taskName: '任务名称20240316-tempalsbls',
+    priority: '中',
+    status: '进行中',
+    executor: '张三',
+    startTime: '2024-04-01',
+    endTime: '2024-04-01',
+}])
+// 生命周期钩子
+onMounted(() => {
+});
+</script>
+<style scoped lang="scss">
+.relatedTasks {
+    .title {
+        font-size: 18px;
+        color: #000
+    }
+}
+</style>

+ 84 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/relatedTasks.vue

@@ -0,0 +1,84 @@
+<template>
+    <div class="relatedTasks pl-4 pr-4 pt-3 pb-3 h-full flex flex-col">
+        <div class="flex justify-between">
+            <div class="title">相关任务</div>
+            <div>
+                <el-button type="primary">新建任务</el-button>
+            </div>
+        </div>
+        <div class="flex-1 overflow-auto pt-3">
+            <el-table :data="relatedTaskstable" border style="width: 100%;height: 100%;">
+                <el-table-column prop="taskName" label="任务名称">
+                    <template #default="scope">
+                        <el-button link type="primary" size="large">{{
+                            scope.row.taskName
+                        }}</el-button>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="priority" label="优先级" width="130" />
+                <el-table-column prop="status" label="状态" width="130" />
+                <el-table-column prop="executor" label="执行人" width="130" />
+                <el-table-column prop="startTime" label="开始时间" width="130" />
+                <el-table-column prop="endTime" label="截至时间" width="130" />
+            </el-table>
+        </div>
+    </div>
+</template>
+<script lang="ts" setup>
+import { ref, reactive, onMounted, onUnmounted, defineExpose, inject } from 'vue'
+
+const relatedTaskstable = ref([{
+    taskName: '任务名称20240316-tempalsbls',
+    priority: '中',
+    status: '进行中',
+    executor: '张三',
+    startTime: '2024-04-01',
+    endTime: '2024-04-01',
+}, {
+    taskName: '任务名称20240316-tempalsbls',
+    priority: '中',
+    status: '进行中',
+    executor: '张三',
+    startTime: '2024-04-01',
+    endTime: '2024-04-01',
+}, {
+    taskName: '任务名称20240316-tempalsbls',
+    priority: '中',
+    status: '进行中',
+    executor: '张三',
+    startTime: '2024-04-01',
+    endTime: '2024-04-01',
+}, {
+    taskName: '任务名称20240316-tempalsbls',
+    priority: '中',
+    status: '进行中',
+    executor: '张三',
+    startTime: '2024-04-01',
+    endTime: '2024-04-01',
+}, {
+    taskName: '任务名称20240316-tempalsbls',
+    priority: '中',
+    status: '进行中',
+    executor: '张三',
+    startTime: '2024-04-01',
+    endTime: '2024-04-01',
+}, {
+    taskName: '任务名称20240316-tempalsbls',
+    priority: '中',
+    status: '进行中',
+    executor: '张三',
+    startTime: '2024-04-01',
+    endTime: '2024-04-01',
+}])
+// 生命周期钩子
+onMounted(() => {
+});
+</script>
+<style scoped lang="scss">
+.relatedTasks {
+    .title {
+        font-size: 18px;
+        color: #000
+    }
+}
+</style>

+ 156 - 19
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/detail/index.vue

@@ -1,30 +1,167 @@
 <template>
-    <div class="h-full flex">
-      <div class="p-5 w-80 pr-0">
-        <div class="bg-white w-full h-full shadow-md rounded-md flex flex-col">
-          <div class="flex-1 p-3 overflow-y-auto">
-            
-          </div>
-          <div class="w-full flex p-3 shadow-[0_-3px_5px_0px_rgba(0,0,0,0.2)]">
-            <El-button class="w-full">重置</El-Button>
-            <El-button type="primary" class="w-full">搜索</El-Button>
-          </div>
+  <div class="h-full flex p-3 flex-col businessDetail">
+    <div class="w-full bg-white p-2 mb-2 shadow-md rounded-md flex items-center">
+      <div class="icon mr-4">
+        <el-link :underline="false">
+          <el-icon class="el-icon--right"><icon-view /></el-icon> 返回商机列表
+        </el-link>
+      </div>
+      <div class="mr-8">
+        <el-select v-model="value" placeholder="请选择" style="width: 150px">
+          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
+        </el-select>
+      </div>
+      <div class="flex-1 flex h-full justify-end overflow-auto scroll-bar-hide cursor-pointer" @wheel="handleScroll">
+        <div :class="`${index === 0 ? 'startStep' : 'nextStep'} relative rounded-md flex items-center backGray pl-6 pr-6`"
+          v-for="(item, index) in 2" :key="index">
+          <div class="pr-3 text-nowrap">验证客户</div>
+          <div class="text-nowrap">30%</div>
+        </div>
+      </div>
+      <div class="relative rounded-md flex items-center itemPing backGray endStep item pl-6 pr-6 mr-4">
+        <el-select v-model="stageStatusVal" placeholder="结束" style="width: 100px" class="selectClas">
+          <el-option v-for="item in stageStatus" :key="item.id" :label="item.name" :value="item.id" />
+        </el-select>
+      </div>
+      <div class="bg-[#0052CC] rounded-md text itemPing pl-2 pr-2 flex items-center">
+        <el-link :underline="false">推进至阶段【验证客户】</el-link>
+      </div>
+    </div>
+    <!-- 内容 -->
+    <div class="flex-1 flex flex-col overflow-y-auto overflow-x-hidden scroll-bar">
+      <div class="w-full h-auto flex justify-between">
+        <div class="bg-white shadow-md rounded-md" style="width: 46%;">
+          <Information />
+        </div>
+        <div class="bg-white ml-2 shadow-md rounded-md flex-1">
+          <Attachment />
+        </div>
+      </div>
+
+      <div class="w-full h-auto flex justify-between mt-2">
+        <div class="bg-white shadow-md rounded-md" style="width: 65%;">
+          <RelatedTasks />
+        </div>
+        <div class="bg-white ml-2 shadow-md rounded-md flex-1">
+          <OperationRecord />
         </div>
       </div>
-      <div class="flex-1 p-5 overflow-auto">
-        <div class="bg-white w-full h-full p-3 shadow-md rounded-md flex flex-col">
 
+      <div class="w-full h-auto flex justify-between mt-2">
+        <div class="bg-white shadow-md rounded-md w-full">
+          <Products />
         </div>
       </div>
     </div>
-  </template>
+  </div>
+</template>
   
-  <script lang="ts" setup>
-  import { ref, reactive, onMounted, inject } from "vue";
-  import type { FormInstance, FormRules } from 'element-plus'
+<script lang="ts" setup>
+import { ref, reactive, onMounted, inject } from "vue";
+import type { FormInstance, FormRules } from 'element-plus'
+import { Edit, ArrowLeft as IconView } from '@element-plus/icons-vue'
+import { stageStatus } from '../api'
 
-  </script>
+import Information from '../component/information.vue'
+import Attachment from '../component/attachment.vue'
+import RelatedTasks from '../component/relatedTasks.vue';
+import OperationRecord from '../component/operationRecord.vue';
+import Products from '../component/products.vue';
+
+const value = ref('')
+const stageStatusVal = ref('')
+const options = [
+  {
+    value: 'Option1',
+    label: 'Option1',
+  },
+  {
+    value: 'Option2',
+    label: 'Option2',
+  },
+  {
+    value: 'Option3',
+    label: 'Option3',
+  },
+  {
+    value: 'Option4',
+    label: 'Option4',
+  },
+  {
+    value: 'Option5',
+    label: 'Option5',
+  },
+]
+
+
+function handleScroll(event: any) { // 滚表横向滚动
+  if (event.deltaY) {
+    event.preventDefault();
+    const element = event.currentTarget;
+    element.scrollLeft += event.deltaY;
+  }
+}
+</script>
   
-  <style lang="scss" scoped>
+<style lang="scss" scoped>
+.businessDetail {
+  .icon {
+    .el-link {
+      color: #0052CC;
+    }
+  }
+
+  .text {
+    .el-link {
+      color: #fff;
+      font-size: 14px;
+    }
+  }
+
+  .backDarkBlue {
+    background-color: #0052CC;
+    color: #fff;
+  }
+
+  .backGray {
+    background-color: #F4F5F7;
+    color: #000;
+  }
+
+  .startStep {
+    clip-path: polygon(0% 0%,
+        90% 0%,
+        100% 50%,
+        90% 100%,
+        0% 100%);
+  }
+
+  .nextStep {
+    clip-path: polygon(0% 0%,
+        90% 0%,
+        100% 50%,
+        90% 100%,
+        0% 100%,
+        10% 50%);
+  }
+
+  .endStep {
+
+    clip-path: polygon(0% 0%,
+        100% 0%,
+        100% 100%,
+        0% 100%,
+        10% 50%);
+  }
+
+  .itemPing {
+    padding-top: 4px;
+    padding-bottom: 4px;
+  }
 
-  </style>
+  .selectClas >>> .el-select__wrapper {
+    background-color: none !important;
+    box-shadow: none !important;
+  }
+}
+</style>

+ 4 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/index.vue

@@ -74,7 +74,7 @@
             <el-table-column prop="email" label="邮箱" width="180"></el-table-column>
             <el-table-column prop="customerIndustryId" label="客户行业" width="180"></el-table-column>
             <el-table-column prop="customerLevelId" label="客户级别" width="180"></el-table-column>
-            <el-table-column prop="inchargerId" label="负责人" width="180"></el-table-column>
+            <el-table-column prop="inchargerId" label="负责人" width="190"></el-table-column>
             <el-table-column prop="createName" label="创建人" width="180"></el-table-column>
             <el-table-column prop="createTime" label="创建时间" width="180"></el-table-column>
             <el-table-column label="操作" fixed="right" width="200">
@@ -184,8 +184,10 @@ function getClueTable() {
   allLoading.clueTableLading = true
   let valueForm = getFromValue(filterCriteriaForm)
   post(GETTABLE, { ...valueForm }).then((res: any) => {
+    const { total, data } = res
+    clueTable.value = data
+    clueTotalTable.value = total
     allLoading.clueTableLading = false
-    console.log(res, '<==== 接口返回的数据')
   }).catch((_error) => {
     allLoading.clueTableLading = false
   })

+ 5 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/styles/global.scss

@@ -41,3 +41,8 @@ $modena: #6f4afe;
 .scroll-bar::-webkit-scrollbar-button:hover {
   background-color: #999999;
 }
+
+.scroll-bar-hide::-webkit-scrollbar {
+  width: 1px;
+  height: 0px;
+}

+ 14 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/utils/request.ts

@@ -67,3 +67,17 @@ export async function post(url: string, data?: any): Promise<any> {
       throw error;
     });
 }
+
+// 封装文件上传请求
+export async function uploadFile(url: string, data?: any): Promise<any> {
+  return instance
+    .post(url, data, {
+      headers: {
+        "Content-type": "multipart/form-data",
+      },
+    })
+    .then((response) => response.data)
+    .catch((error) => {
+      throw error;
+    });
+}

+ 4 - 2
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/ClueController.java

@@ -48,18 +48,20 @@ public class ClueController {
 
 
     @RequestMapping("getDetail")
-    public Object getDetail(@RequestBody Clue clue) {
+    public Object getDetail(Clue clue) {
         HttpRespMsg msg = new HttpRespMsg();
         msg.setData(clueService.getInfo(clue));
         return msg;
     }
 
     @RequestMapping("listClue")
-    public Object list(@RequestBody Clue clue, HttpServletRequest request) {
+    public Object list(Clue clue, HttpServletRequest request) {
         //TODO token待定
         User user = userMapper.selectById(request.getHeader("Token"));
         clue.setCompanyId(user.getCompanyId());
         clue.setIsDelete(0);
+        clue.setEndTime(clue.getEndTime() + " 23:59:59");
+        clue.setPageIndex((clue.getPageIndex()-1) * clue.getPageFrom() );
         boolean isAll = sysFunctionService.hasPriviledge(user.getRoleId(), "查看全部线索");
         boolean isNotAll = sysFunctionService.hasPriviledge(user.getRoleId(), "查看负责部门线索");
         List<Clue> list = new ArrayList<>();

+ 4 - 2
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/entity/Clue.java

@@ -8,6 +8,7 @@ import java.io.Serializable;
 import java.util.Date;
 import java.util.List;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
@@ -139,8 +140,9 @@ public class Clue extends Model<Clue> {
      */
     @TableField("create_time")
     private Date createTime;
-    private Date startTime;
-    private Date endTime;
+    private String startTime;
+
+    private String endTime;
 
     private Integer pageIndex;
     private Integer pageFrom;

+ 73 - 4
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/ClueMapper.xml

@@ -54,12 +54,24 @@
         from Clue c
         where
             c.company_id = #{companyId} and is_delete = #{isDelete}
+        <if test="inchargerId != null  ">
+           and c.incharger_id =#{inchargerId}
+        </if>
         <if test="startTime != null and endTime != null ">
         and  c.create_time BETWEEN  #{startTime} and #{endTime}
         </if>
         <if test="clueName != null and clueName != '' ">
         and  c.clue_name =  #{clueName}
         </if>
+        <if test="phone != null and phone != '' ">
+            and  c.phone =  #{phone}
+        </if>
+        <if test="customerLevelId != null and customerLevelId != '' ">
+            and  c.customer_level_id =  #{customerLevelId}
+        </if>
+        <if test="email != null and email != '' ">
+            and  c.email =  #{email}
+        </if>
         <if test="clueSourceId != null">
         and  c.clue_source_id =  #{clueSourceId}
         </if>
@@ -94,7 +106,10 @@
         c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
         and c.incharger_id in
         (SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERe id = #{userId}))
-        and c.incharger_id is null
+        or c.incharger_id is null
+        <if test="inchargerId != null  ">
+          and  c.incharger_id =#{inchargerId}
+        </if>
         <if test="clue.startTime != null and clue.endTime != null ">
             and  c.create_time BETWEEN  #{clue.startTime} and #{clue.endTime}
         </if>
@@ -104,6 +119,15 @@
         <if test="clue.clueSourceId != null">
             and  c.clue_source_id =  #{clue.clueSourceId}
         </if>
+        <if test="phone != null and phone != '' ">
+            and  c.phone =  #{phone}
+        </if>
+        <if test="customerLevelId != null and customerLevelId != '' ">
+            and  c.customer_level_id =  #{customerLevelId}
+        </if>
+        <if test="email != null and email != '' ">
+            and  c.email =  #{email}
+        </if>
         <if test="clue.customerIndustryId != null">
             and  c.customer_industry_id =  #{clue.customerIndustryId}
         </if>
@@ -133,13 +157,25 @@
         from Clue c
         where
         c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
-        and c.incharger_id = #{userId} and c.incharger_id is null
+        and c.incharger_id = #{userId} or c.incharger_id is null
+        <if test="inchargerId != null  ">
+          and  c.incharger_id =#{inchargerId}
+        </if>
         <if test="clue.startTime != null and clue.endTime != null ">
             and  c.create_time BETWEEN  #{clue.startTime} and #{clue.endTime}
         </if>
         <if test="clue.clueName != null and clue.clueName != '' ">
             and  c.clue_name =  #{clue.clueName}
         </if>
+        <if test="phone != null and phone != '' ">
+            and  c.phone =  #{phone}
+        </if>
+        <if test="customerLevelId != null and customerLevelId != '' ">
+            and  c.customer_level_id =  #{customerLevelId}
+        </if>
+        <if test="email != null and email != '' ">
+            and  c.email =  #{email}
+        </if>
         <if test="clue.clueSourceId != null">
             and  c.clue_source_id =  #{clue.clueSourceId}
         </if>
@@ -178,6 +214,9 @@
         <if test="clueName != null and clueName != '' ">
         and  c.clue_name =  #{clueName}
         </if>
+        <if test="inchargerId != null  ">
+           and c.incharger_id =#{inchargerId}
+        </if>
         <if test="clueSourceId != null">
         and  c.clue_source_id =  #{clueSourceId}
         </if>
@@ -194,6 +233,9 @@
         <if test="startTime != null and endTime != null ">
             and  c.create_time BETWEEN  #{startTime} and #{endTime}
         </if>
+        <if test="inchargerId != null  ">
+           and c.incharger_id =#{inchargerId}
+        </if>
         <if test="clueName != null and clueName != '' ">
             and  c.clue_name =  #{clueName}
         </if>
@@ -209,6 +251,9 @@
         from Clue c
         where
         c.company_id = #{companyId} and is_delete = 1
+        <if test="inchargerId != null  ">
+          and  c.incharger_id =#{inchargerId}
+        </if>
         <if test="startTime != null and endTime != null ">
             and  c.create_time BETWEEN  #{startTime} and #{endTime}
         </if>
@@ -230,13 +275,25 @@
         c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
         and c.incharger_id in
         (SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERe id = #{userId}))
-        and c.incharger_id is null
+        or c.incharger_id is null
+        <if test="inchargerId != null  ">
+           and c.incharger_id =#{inchargerId}
+        </if>
         <if test="clue.startTime != null and clue.endTime != null ">
             and  c.create_time BETWEEN  #{clue.startTime} and #{clue.endTime}
         </if>
         <if test="clue.clueName != null and clue.clueName != '' ">
             and  c.clue_name =  #{clue.clueName}
         </if>
+        <if test="phone != null and phone != '' ">
+            and  c.phone =  #{phone}
+        </if>
+        <if test="customerLevelId != null and customerLevelId != '' ">
+            and  c.customer_level_id =  #{customerLevelId}
+        </if>
+        <if test="email != null and email != '' ">
+            and  c.email =  #{email}
+        </if>
         <if test="clue.clueSourceId != null">
             and  c.clue_source_id =  #{clue.clueSourceId}
         </if>
@@ -250,13 +307,25 @@
         from Clue c
         where
         c.company_id = #{clue.companyId} and is_delete = #{clue.isDelete}
-        and c.incharger_id = #{userId} and c.incharger_id is null
+        <if test="inchargerId != null  ">
+          and  c.incharger_id =#{inchargerId}
+        </if>
+        and c.incharger_id = #{userId} or c.incharger_id is null
         <if test="clue.startTime != null and clue.endTime != null ">
             and c.create_time BETWEEN #{clue.startTime} and #{clue.endTime}
         </if>
         <if test="clue.clueName != null and clue.clueName != '' ">
             and c.clue_name = #{clue.clueName}
         </if>
+        <if test="phone != null and phone != '' ">
+            and  c.phone =  #{phone}
+        </if>
+        <if test="customerLevelId != null and customerLevelId != '' ">
+            and  c.customer_level_id =  #{customerLevelId}
+        </if>
+        <if test="email != null and email != '' ">
+            and  c.email =  #{email}
+        </if>
         <if test="clue.clueSourceId != null">
             and c.clue_source_id = #{clue.clueSourceId}
         </if>