浏览代码

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

Min 1 年之前
父节点
当前提交
1869f0c8b8

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/App.vue

@@ -60,7 +60,7 @@ body,
   width: 100%;
   height: 100%;
   /* overflow: hidden; */
-  min-width: 650px;
+  min-width: 800px;
 }
 * {
   font-family: '微软雅黑';

+ 5 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/type.d.ts

@@ -3,4 +3,9 @@ interface GlobalPopup extends Notify {
   showError: (message?: string) => void;
   showWarning: (message: string) => void;
   showInfo: (message: string) => void;
+}
+
+interface Tree {
+  label: string
+  children?: Tree[]
 }

+ 4 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/utils/request.ts

@@ -2,6 +2,7 @@ import axios from "axios";
 import { showMessage } from "./errorStatusCode"; // 引入状态码文件
 import type { AxiosRequestConfig, AxiosResponse, AxiosError } from "axios";
 import { ElNotification } from "element-plus";
+import { useStore } from "../store/index";
 const baseURL = "/api";
 // 创建axios实例
 const instance = axios.create({
@@ -12,8 +13,10 @@ const instance = axios.create({
 instance.interceptors.request.use(
   (config: AxiosRequestConfig): any => {
     // 可在请求发送前对config进行修改,如添加请求头等
+    const { getToken } = useStore()
+    const token = getToken
     const headers = config.headers || {};
-    headers["Authorization"] = "Bxxx";
+    headers["Token"] = token;
     config.headers = headers;
     return config;
   },

文件差异内容过多而无法显示
+ 5924 - 0
fhKeeper/formulahousekeeper/management-crm/crm.log


+ 32 - 28
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/ClueController.java

@@ -27,7 +27,7 @@ import java.util.Map;
 
 /**
  * <p>
- *  前端控制器
+ * 前端控制器
  * </p>
  *
  * @author Seyason
@@ -47,73 +47,76 @@ public class ClueController {
     private SysDictMapper sysDictMapper;
 
 
-//    @RequestMapping("getClueSources")
+    //    @RequestMapping("getClueSources")
 //    public Object getClueSources(){
 //        QueryWrapper<SysDict> queryWrapper = new QueryWrapper<>();
 //        queryWrapper.eq("code", "ClueSources");
 //        return sysDictMapper.selectList(queryWrapper);
 //    }
     @RequestMapping("getDetail")
-    public Object getDetail(@RequestBody Clue clue){
+    public Object getDetail(@RequestBody 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(@RequestBody Clue clue, HttpServletRequest request) {
         //TODO token待定
         User user = userMapper.selectById(request.getHeader("Token"));
         clue.setCompanyId(user.getCompanyId());
         boolean isAll = sysFunctionService.hasPriviledge(user.getRoleId(), "查看全部线索");
         boolean isNotAll = sysFunctionService.hasPriviledge(user.getRoleId(), "查看负责部门线索");
         List<Clue> list = new ArrayList<>();
-        if (!isAll){
+        if (!isAll) {
             //查看全部线索
             list = clueService.getList(clue);
-        }else if (!isNotAll){
+        } else if (!isNotAll) {
             //查看负责部门线索 找出所处部门下所有的负责人
-            list = clueService.getList1(clue,user);
-        }else {
+            list = clueService.getList1(clue, user);
+        } else {
             // 查看负责人为 自己 和 null的数据
-            list = clueService.getList2(clue,user);
+            list = clueService.getList2(clue, user);
         }
         HashMap<Object, Object> map = new HashMap<>();
-        map.put("data",list);
-        map.put("total",clueService.getTotal(clue));
+        map.put("data", list);
+        map.put("total", clueService.getTotal(clue));
         return map;
     }
+
     @RequestMapping("listDeleterClue")
-    public Object listDeleterClue(@RequestBody Clue clue, HttpServletRequest request){
+    public Object listDeleterClue(@RequestBody Clue clue, HttpServletRequest request) {
         //TODO token待定
         // User user = userMapper.selectById(request.getHeader(  "Token"));
         // clue.setCompanyId(user.getCompanyId());
-        List<Clue> list =  clueService.getDeleterList(clue);
+        List<Clue> list = clueService.getDeleterList(clue);
         HashMap<Object, Object> map = new HashMap<>();
-        map.put("data",list);
-        map.put("total",clueService.getDeleterTotal(clue));
+        map.put("data", list);
+        map.put("total", clueService.getDeleterTotal(clue));
         return map;
     }
+
     @RequestMapping("/insertAndUpdate")
-    public Object inserANdUpdate(@RequestBody Clue clue, HttpServletRequest request){
+    public Object inserANdUpdate(@RequestBody Clue clue, HttpServletRequest request) {
         HttpRespMsg msg = new HttpRespMsg();
         //操作前校验
         //TODO token待定
         // User user = userMapper.selectById(request.getHeader(  "Token"));
         // Integer companyId = user.getCompanyId();
-        if (null == clue.getClueName() || "".equals(clue.getClueName())){
+        if (null == clue.getClueName() || "".equals(clue.getClueName())) {
             msg.setError("线索名称不能为空");
             return msg;
         }
-        if (null == clue.getClueSourceId()){
+        if (null == clue.getClueSourceId()) {
             msg.setError("线索来源不能为空");
             return msg;
         }
         clue.setIsDelete(0);
-        if (null != clue.getId()){
+        if (null != clue.getId()) {
             //修改
             clueService.update(clue);
             msg.setMsg("操作成功");
-        }else {
+        } else {
             //新增
             //TODO token待定
             // clue.setCompanyId(companyId);
@@ -123,12 +126,12 @@ public class ClueController {
 
             msg.setMsg("操作成功");
         }
-        return  msg;
+        return msg;
     }
 
 
     @RequestMapping("delete")
-    public Object delete(@RequestBody List<Integer> ids){
+    public Object delete(@RequestBody List<Integer> ids) {
         HttpRespMsg msg = new HttpRespMsg();
         msg.setMsg("操作成功");
         clueService.isDelete(ids);
@@ -136,21 +139,24 @@ public class ClueController {
     }
 
     @RequestMapping("rollback")
-    public Object rollback(@RequestBody List<Integer> ids){
+    public Object rollback(@RequestBody List<Integer> ids) {
         HttpRespMsg msg = new HttpRespMsg();
         msg.setMsg("操作成功");
         clueService.isRollback(ids);
         return msg;
     }
+
     @RequestMapping("claim")
-    public Object claim(@RequestBody Clue clue, HttpServletRequest request){
+    public Object claim(@RequestBody Clue clue, HttpServletRequest request) {
+        User user = userMapper.selectById(request.getHeader("Token"));
         HttpRespMsg msg = new HttpRespMsg();
         msg.setMsg("操作成功");
-        clueService.getAndTransfer(clue);
+        clueService.getAndTransfer(clue,user);
         return msg;
     }
+
     @RequestMapping("deleterDelete")
-    public Object deleterDelete(@RequestBody List<Integer> ids){
+    public Object deleterDelete(@RequestBody List<Integer> ids) {
         HttpRespMsg msg = new HttpRespMsg();
         msg.setMsg("操作成功");
         clueService.deleterDelete(ids);
@@ -158,7 +164,5 @@ public class ClueController {
     }
 
 
-
-
 }
 

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

@@ -87,7 +87,10 @@ public class Clue extends Model<Clue> {
      * 负责人id
      */
     @TableField("incharger_id")
-    private Integer inchargerId;
+    private String inchargerId;
+
+
+//    private String tempInchargerId;
 
     /**
      * 备注

+ 1 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/ClueService.java

@@ -36,5 +36,5 @@ public interface ClueService extends IService<Clue> {
 
     void deleterDelete(List<Integer> ids);
 
-    void getAndTransfer(Clue clue);
+    void getAndTransfer(Clue clue,User user);
 }

+ 16 - 2
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/ClueServiceImpl.java

@@ -154,11 +154,25 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
     }
 
     @Override
-    public void getAndTransfer(Clue clue) {
+    public void getAndTransfer(Clue clue,User user) {
         UpdateWrapper<Clue> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id",clue.getId());
+        String inchargerId = clue.getInchargerId();
+        ClueLog clueLog = new ClueLog();
+        clueLog.setUserId(user.getId());
+        clueLog.setClueId(clue.getId());
+        if (inchargerId == null ){
+            //认领
+            clueLog.setName("认领了线索");
+            clue.setInchargerId(user.getId());
+        }else {
+            //转移
+            clueLog.setName("转移了线索");
+            clue.setInchargerId(clue.getInchargerId());
 
-
+        }
         clueMapper.update(clue, updateWrapper);
+
     }