diff --git a/ruoyi-crm/src/main/java/com/ruoyi/crm/controller/CrmCustomerTypeController.java b/ruoyi-crm/src/main/java/com/ruoyi/crm/controller/CrmCustomerTypeController.java new file mode 100644 index 0000000..b35b2dc --- /dev/null +++ b/ruoyi-crm/src/main/java/com/ruoyi/crm/controller/CrmCustomerTypeController.java @@ -0,0 +1,105 @@ +package com.ruoyi.crm.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.crm.domain.CrmCustomerType; +import com.ruoyi.crm.service.ICrmCustomerTypeService; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 客户标签Controller + * + * @author ruoyi + * @date 2024-03-14 + */ +@RestController +@RequestMapping("/system/type") +public class CrmCustomerTypeController extends BaseController +{ + @Autowired + private ICrmCustomerTypeService crmCustomerTypeService; + + /** + * 查询客户标签列表 + */ + @PreAuthorize("@ss.hasPermi('system:type:list')") + @GetMapping("/list") + public TableDataInfo list(CrmCustomerType crmCustomerType) + { + startPage(); + List list = crmCustomerTypeService.selectCrmCustomerTypeList(crmCustomerType); + return getDataTable(list); + } + + /** + * 导出客户标签列表 + */ + @PreAuthorize("@ss.hasPermi('system:type:export')") + @Log(title = "客户标签", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, CrmCustomerType crmCustomerType) + { + List list = crmCustomerTypeService.selectCrmCustomerTypeList(crmCustomerType); + ExcelUtil util = new ExcelUtil(CrmCustomerType.class); + util.exportExcel(response, list, "客户标签数据"); + } + + /** + * 获取客户标签详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:type:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(crmCustomerTypeService.selectCrmCustomerTypeById(id)); + } + + /** + * 新增客户标签 + */ + @PreAuthorize("@ss.hasPermi('system:type:add')") + @Log(title = "客户标签", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody CrmCustomerType crmCustomerType) + { + return toAjax(crmCustomerTypeService.insertCrmCustomerType(crmCustomerType)); + } + + /** + * 修改客户标签 + */ + @PreAuthorize("@ss.hasPermi('system:type:edit')") + @Log(title = "客户标签", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody CrmCustomerType crmCustomerType) + { + return toAjax(crmCustomerTypeService.updateCrmCustomerType(crmCustomerType)); + } + + /** + * 删除客户标签 + */ + @PreAuthorize("@ss.hasPermi('system:type:remove')") + @Log(title = "客户标签", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(crmCustomerTypeService.deleteCrmCustomerTypeByIds(ids)); + } +} diff --git a/ruoyi-crm/src/main/java/com/ruoyi/crm/domain/CrmCustomerType.java b/ruoyi-crm/src/main/java/com/ruoyi/crm/domain/CrmCustomerType.java new file mode 100644 index 0000000..c8b7c96 --- /dev/null +++ b/ruoyi-crm/src/main/java/com/ruoyi/crm/domain/CrmCustomerType.java @@ -0,0 +1,81 @@ +package com.ruoyi.crm.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 客户标签对象 crm_customer_type + * + * @author ruoyi + * @date 2024-03-14 + */ +public class CrmCustomerType extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 标签名称 */ + @Excel(name = "标签名称") + private String typeName; + + /** 标签级别 */ + @Excel(name = "标签级别") + private String typeLv; + + /** 备注 */ + @Excel(name = "备注") + private String notes; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + + public String getTypeName() + { + return typeName; + } + public void setTypeLv(String typeLv) + { + this.typeLv = typeLv; + } + + public String getTypeLv() + { + return typeLv; + } + public void setNotes(String notes) + { + this.notes = notes; + } + + public String getNotes() + { + return notes; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("typeName", getTypeName()) + .append("typeLv", getTypeLv()) + .append("notes", getNotes()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/ruoyi-crm/src/main/java/com/ruoyi/crm/mapper/CrmCustomerTypeMapper.java b/ruoyi-crm/src/main/java/com/ruoyi/crm/mapper/CrmCustomerTypeMapper.java new file mode 100644 index 0000000..6d44eb4 --- /dev/null +++ b/ruoyi-crm/src/main/java/com/ruoyi/crm/mapper/CrmCustomerTypeMapper.java @@ -0,0 +1,62 @@ +package com.ruoyi.crm.mapper; + +import java.util.List; + +import com.ruoyi.crm.domain.CrmCustomerType; + +/** + * 客户标签Mapper接口 + * + * @author ruoyi + * @date 2024-03-14 + */ +public interface CrmCustomerTypeMapper +{ + /** + * 查询客户标签 + * + * @param id 客户标签主键 + * @return 客户标签 + */ + public CrmCustomerType selectCrmCustomerTypeById(Long id); + + /** + * 查询客户标签列表 + * + * @param crmCustomerType 客户标签 + * @return 客户标签集合 + */ + public List selectCrmCustomerTypeList(CrmCustomerType crmCustomerType); + + /** + * 新增客户标签 + * + * @param crmCustomerType 客户标签 + * @return 结果 + */ + public int insertCrmCustomerType(CrmCustomerType crmCustomerType); + + /** + * 修改客户标签 + * + * @param crmCustomerType 客户标签 + * @return 结果 + */ + public int updateCrmCustomerType(CrmCustomerType crmCustomerType); + + /** + * 删除客户标签 + * + * @param id 客户标签主键 + * @return 结果 + */ + public int deleteCrmCustomerTypeById(Long id); + + /** + * 批量删除客户标签 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteCrmCustomerTypeByIds(Long[] ids); +} diff --git a/ruoyi-crm/src/main/java/com/ruoyi/crm/service/ICrmCustomerTypeService.java b/ruoyi-crm/src/main/java/com/ruoyi/crm/service/ICrmCustomerTypeService.java new file mode 100644 index 0000000..df9a6b8 --- /dev/null +++ b/ruoyi-crm/src/main/java/com/ruoyi/crm/service/ICrmCustomerTypeService.java @@ -0,0 +1,63 @@ +package com.ruoyi.crm.service; + +import java.util.List; + +import com.ruoyi.crm.domain.CrmCustomerType; + + +/** + * 客户标签Service接口 + * + * @author ruoyi + * @date 2024-03-14 + */ +public interface ICrmCustomerTypeService +{ + /** + * 查询客户标签 + * + * @param id 客户标签主键 + * @return 客户标签 + */ + public CrmCustomerType selectCrmCustomerTypeById(Long id); + + /** + * 查询客户标签列表 + * + * @param crmCustomerType 客户标签 + * @return 客户标签集合 + */ + public List selectCrmCustomerTypeList(CrmCustomerType crmCustomerType); + + /** + * 新增客户标签 + * + * @param crmCustomerType 客户标签 + * @return 结果 + */ + public int insertCrmCustomerType(CrmCustomerType crmCustomerType); + + /** + * 修改客户标签 + * + * @param crmCustomerType 客户标签 + * @return 结果 + */ + public int updateCrmCustomerType(CrmCustomerType crmCustomerType); + + /** + * 批量删除客户标签 + * + * @param ids 需要删除的客户标签主键集合 + * @return 结果 + */ + public int deleteCrmCustomerTypeByIds(Long[] ids); + + /** + * 删除客户标签信息 + * + * @param id 客户标签主键 + * @return 结果 + */ + public int deleteCrmCustomerTypeById(Long id); +} diff --git a/ruoyi-crm/src/main/java/com/ruoyi/crm/service/impl/CrmCustomerTypeServiceImpl.java b/ruoyi-crm/src/main/java/com/ruoyi/crm/service/impl/CrmCustomerTypeServiceImpl.java new file mode 100644 index 0000000..982a980 --- /dev/null +++ b/ruoyi-crm/src/main/java/com/ruoyi/crm/service/impl/CrmCustomerTypeServiceImpl.java @@ -0,0 +1,97 @@ +package com.ruoyi.crm.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.crm.domain.CrmCustomerType; +import com.ruoyi.crm.mapper.CrmCustomerTypeMapper; +import com.ruoyi.crm.service.ICrmCustomerTypeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +/** + * 客户标签Service业务层处理 + * + * @author ruoyi + * @date 2024-03-14 + */ +@Service +public class CrmCustomerTypeServiceImpl implements ICrmCustomerTypeService +{ + @Autowired + private CrmCustomerTypeMapper crmCustomerTypeMapper; + + /** + * 查询客户标签 + * + * @param id 客户标签主键 + * @return 客户标签 + */ + @Override + public CrmCustomerType selectCrmCustomerTypeById(Long id) + { + return crmCustomerTypeMapper.selectCrmCustomerTypeById(id); + } + + /** + * 查询客户标签列表 + * + * @param crmCustomerType 客户标签 + * @return 客户标签 + */ + @Override + public List selectCrmCustomerTypeList(CrmCustomerType crmCustomerType) + { + return crmCustomerTypeMapper.selectCrmCustomerTypeList(crmCustomerType); + } + + /** + * 新增客户标签 + * + * @param crmCustomerType 客户标签 + * @return 结果 + */ + @Override + public int insertCrmCustomerType(CrmCustomerType crmCustomerType) + { + crmCustomerType.setCreateTime(DateUtils.getNowDate()); + return crmCustomerTypeMapper.insertCrmCustomerType(crmCustomerType); + } + + /** + * 修改客户标签 + * + * @param crmCustomerType 客户标签 + * @return 结果 + */ + @Override + public int updateCrmCustomerType(CrmCustomerType crmCustomerType) + { + crmCustomerType.setUpdateTime(DateUtils.getNowDate()); + return crmCustomerTypeMapper.updateCrmCustomerType(crmCustomerType); + } + + /** + * 批量删除客户标签 + * + * @param ids 需要删除的客户标签主键 + * @return 结果 + */ + @Override + public int deleteCrmCustomerTypeByIds(Long[] ids) + { + return crmCustomerTypeMapper.deleteCrmCustomerTypeByIds(ids); + } + + /** + * 删除客户标签信息 + * + * @param id 客户标签主键 + * @return 结果 + */ + @Override + public int deleteCrmCustomerTypeById(Long id) + { + return crmCustomerTypeMapper.deleteCrmCustomerTypeById(id); + } +} diff --git a/ruoyi-crm/src/main/resources/mapper/crm/CrmCustomerTypeMapper.xml b/ruoyi-crm/src/main/resources/mapper/crm/CrmCustomerTypeMapper.xml new file mode 100644 index 0000000..8d67f7f --- /dev/null +++ b/ruoyi-crm/src/main/resources/mapper/crm/CrmCustomerTypeMapper.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + select id, type_name, type_lv, notes, create_time, update_time from crm_customer_type + + + + + + + + insert into crm_customer_type + + type_name, + type_lv, + notes, + create_time, + update_time, + + + #{typeName}, + #{typeLv}, + #{notes}, + #{createTime}, + #{updateTime}, + + + + + update crm_customer_type + + type_name = #{typeName}, + type_lv = #{typeLv}, + notes = #{notes}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from crm_customer_type where id = #{id} + + + + delete from crm_customer_type where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-ui/src/api/crm/index.js b/ruoyi-ui/src/api/crm/index.js index a434f3b..faf58c8 100644 --- a/ruoyi-ui/src/api/crm/index.js +++ b/ruoyi-ui/src/api/crm/index.js @@ -10,6 +10,18 @@ export function indexData(){ export function infoDate(date){ return request({ - url:'/crm/index-data/infoDate?'+date, + url:'/crm/index-data/infoDate?createTime='+date, + }) +} + +export function infoTop(){ + return request({ + url:'/crm/order/someAmount' + }) +} + +export function infoTotalTop(){ + return request({ + url:'/crm/order/totalAmount' }) } diff --git a/ruoyi-ui/src/api/crm/type.js b/ruoyi-ui/src/api/crm/type.js new file mode 100644 index 0000000..54b1629 --- /dev/null +++ b/ruoyi-ui/src/api/crm/type.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询客户标签列表 +export function listType(query) { + return request({ + url: '/system/type/list', + method: 'get', + params: query + }) +} + +// 查询客户标签详细 +export function getType(id) { + return request({ + url: '/system/type/' + id, + method: 'get' + }) +} + +// 新增客户标签 +export function addType(data) { + return request({ + url: '/system/type', + method: 'post', + data: data + }) +} + +// 修改客户标签 +export function updateType(data) { + return request({ + url: '/system/type', + method: 'put', + data: data + }) +} + +// 删除客户标签 +export function delType(id) { + return request({ + url: '/system/type/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/views/crm/pool/index.vue b/ruoyi-ui/src/views/crm/pool/index.vue new file mode 100644 index 0000000..a6f5c2f --- /dev/null +++ b/ruoyi-ui/src/views/crm/pool/index.vue @@ -0,0 +1,276 @@ + + + diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index 6c22d3c..8e340ce 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -4,29 +4,67 @@ - - -
- 今日待办 -
- - - - - - - - - - - - - - - -
今日已跟进{{followupData.today_followup}}
未跟进个数{{followupData.no_followup}}
跟进率{{followupData.followup_rate}} %
-
-
+ + +
+ 今日待办 +
+ + + + + + + + + + + + + + + +
今日已跟进{{followupData.today_followup}}
未跟进个数{{followupData.no_followup}}
跟进率{{followupData.followup_rate}} %
+
+ + +
+ 业绩销售额 +
+
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -37,8 +75,21 @@ 下次跟进时间:{{parseTime(followup.nextFollowupTime)}}
+ +
+ 跟进计划日程 +
+ + + +
+
- +
动态 @@ -48,48 +99,380 @@ 跟进记录:{{updates.content}}
跟进时间:{{parseTime(updates.createTime)}}
+ 提交日程
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 销售额-个人TOP榜 +
+ + + + + + + + + + + + + +
共记{{totalAmount}}
{{ item.createBy }}{{ item.totalAmount}}
+
+
+ + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +