1111
This commit is contained in:
parent
7a8ac4cfe6
commit
ff07ab0d96
@ -0,0 +1,105 @@
|
||||
package com.ruoyi.busi.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
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.busi.domain.BusiClueContacts;
|
||||
import com.ruoyi.busi.service.IBusiClueContactsService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
|
||||
/**
|
||||
* 线索联系人Controller
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-12-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/busi/contacts")
|
||||
public class BusiClueContactsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBusiClueContactsService busiClueContactsService;
|
||||
|
||||
/**
|
||||
* 查询线索联系人列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(BusiClueContacts busiClueContacts,
|
||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
||||
{
|
||||
Page<BusiClueContacts> page = new Page<>(pageNum, pageSize);
|
||||
IPage<BusiClueContacts> list = busiClueContactsService.queryListPage(busiClueContacts,page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出线索联系人列表
|
||||
*/
|
||||
@Log(title = "线索联系人", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BusiClueContacts busiClueContacts)
|
||||
{
|
||||
List<BusiClueContacts> list = busiClueContactsService.list();
|
||||
ExcelUtil<BusiClueContacts> util = new ExcelUtil<BusiClueContacts>(BusiClueContacts.class);
|
||||
util.exportExcel(response, list, "线索联系人数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取线索联系人详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(busiClueContactsService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增线索联系人
|
||||
*/
|
||||
@Log(title = "线索联系人", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BusiClueContacts busiClueContacts)
|
||||
{
|
||||
return toAjax(busiClueContactsService.save(busiClueContacts));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改线索联系人
|
||||
*/
|
||||
@Log(title = "线索联系人", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BusiClueContacts busiClueContacts)
|
||||
{
|
||||
return toAjax(busiClueContactsService.updateById(busiClueContacts));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除线索联系人
|
||||
*/
|
||||
@Log(title = "线索联系人", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||
return toAjax(busiClueContactsService.removeByIds(list));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,106 @@
|
||||
package com.ruoyi.busi.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
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.busi.domain.BusiClue;
|
||||
import com.ruoyi.busi.service.IBusiClueService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 线索主Controller
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-12-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/busi/clue")
|
||||
public class BusiClueController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBusiClueService busiClueService;
|
||||
|
||||
/**
|
||||
* 查询线索主列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(BusiClue busiClue,
|
||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
||||
{
|
||||
Page<BusiClue> page = new Page<>(pageNum, pageSize);
|
||||
IPage<BusiClue> list = busiClueService.queryListPage(busiClue,page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出线索主列表
|
||||
*/
|
||||
@Log(title = "线索主", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BusiClue busiClue)
|
||||
{
|
||||
List<BusiClue> list = busiClueService.list();
|
||||
ExcelUtil<BusiClue> util = new ExcelUtil<BusiClue>(BusiClue.class);
|
||||
util.exportExcel(response, list, "线索主数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取线索主详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(busiClueService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增线索主
|
||||
*/
|
||||
@Log(title = "线索主", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BusiClue busiClue)
|
||||
{
|
||||
return toAjax(busiClueService.save(busiClue));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改线索主
|
||||
*/
|
||||
@Log(title = "线索主", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BusiClue busiClue)
|
||||
{
|
||||
return toAjax(busiClueService.updateById(busiClue));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除线索主
|
||||
*/
|
||||
@Log(title = "线索主", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||
return toAjax(busiClueService.removeByIds(list));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,126 @@
|
||||
package com.ruoyi.busi.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||
|
||||
/**
|
||||
* 线索主对象 busi_clue
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-12-02
|
||||
*/
|
||||
@TableName("busi_clue")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BusiClue extends DlBaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/** 关联客户ID */
|
||||
@Excel(name = "关联客户ID")
|
||||
private String cusId;
|
||||
|
||||
/** 线索编号 */
|
||||
@Excel(name = "线索编号")
|
||||
private String code;
|
||||
|
||||
/** 线索名称 */
|
||||
@Excel(name = "线索名称")
|
||||
private String name;
|
||||
|
||||
/** 客户名称 */
|
||||
@Excel(name = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
/** 国家/地区 */
|
||||
@Excel(name = "国家/地区")
|
||||
private String region;
|
||||
|
||||
/** 主营产品 */
|
||||
@Excel(name = "主营产品")
|
||||
private String mainProduct;
|
||||
|
||||
/** 业务类型 */
|
||||
@Excel(name = "业务类型")
|
||||
private String businessType;
|
||||
|
||||
/** 线索等级 */
|
||||
@Excel(name = "线索等级")
|
||||
private String clueLevel;
|
||||
|
||||
/** 线索来源 */
|
||||
@Excel(name = "线索来源")
|
||||
private String clueSource;
|
||||
|
||||
/** 线索阶段 */
|
||||
@Excel(name = "线索阶段")
|
||||
private String clueStep;
|
||||
|
||||
/** 线索状态 */
|
||||
@Excel(name = "线索状态")
|
||||
private String clueStatus;
|
||||
|
||||
/** 业务员ID */
|
||||
@Excel(name = "业务员ID")
|
||||
private Long userId;
|
||||
|
||||
/** 分配时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "分配时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date allocateTime;
|
||||
|
||||
/** 处理时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date dealTime;
|
||||
|
||||
/** 企业网站 */
|
||||
@Excel(name = "企业网站")
|
||||
private String webSite;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 无效原因 */
|
||||
@Excel(name = "无效原因")
|
||||
private String invalidReason;
|
||||
|
||||
/** 无效描述 */
|
||||
@Excel(name = "无效描述")
|
||||
private String invalidDescription;
|
||||
|
||||
/** 最近联系时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "最近联系时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date recentlyFollowTime;
|
||||
|
||||
/** 最近跟进信息 */
|
||||
@Excel(name = "最近跟进信息")
|
||||
private String recentFollowUp;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package com.ruoyi.busi.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||
|
||||
/**
|
||||
* 线索联系人对象 busi_clue_contacts
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-12-02
|
||||
*/
|
||||
@TableName("busi_clue_contacts")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BusiClueContacts extends DlBaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/** 线索ID */
|
||||
@Excel(name = "线索ID")
|
||||
private String clueId;
|
||||
|
||||
/** 姓名 */
|
||||
@Excel(name = "姓名")
|
||||
private String name;
|
||||
|
||||
/** 邮箱 */
|
||||
@Excel(name = "邮箱")
|
||||
private String email;
|
||||
|
||||
/** 手机 */
|
||||
@Excel(name = "手机")
|
||||
private String mobile;
|
||||
|
||||
/** 电话 */
|
||||
@Excel(name = "电话")
|
||||
private String telephone;
|
||||
|
||||
/** 性别 */
|
||||
@Excel(name = "性别")
|
||||
private String sex;
|
||||
|
||||
/** 职务 */
|
||||
@Excel(name = "职务")
|
||||
private String job;
|
||||
|
||||
/** Facebook */
|
||||
@Excel(name = "Facebook")
|
||||
private String facebook;
|
||||
|
||||
/** twitter */
|
||||
@Excel(name = "twitter")
|
||||
private String twitter;
|
||||
|
||||
/** linkedin */
|
||||
@Excel(name = "linkedin")
|
||||
private String linkedIn;
|
||||
|
||||
/** whatsapp */
|
||||
@Excel(name = "whatsapp")
|
||||
private String whatsApp;
|
||||
|
||||
/** skype */
|
||||
@Excel(name = "skype")
|
||||
private String skype;
|
||||
|
||||
/** wechat */
|
||||
@Excel(name = "wechat")
|
||||
private String wechat;
|
||||
|
||||
/** tm */
|
||||
@Excel(name = "tm")
|
||||
private String tm;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.busi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.busi.domain.BusiClueContacts;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 线索联系人Mapper接口
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-12-02
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusiClueContactsMapper extends BaseMapper<BusiClueContacts>
|
||||
{
|
||||
IPage<BusiClueContacts> queryListPage(@Param("entity") BusiClueContacts entity, Page<BusiClueContacts> page);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.busi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.busi.domain.BusiClue;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 线索主Mapper接口
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-12-02
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusiClueMapper extends BaseMapper<BusiClue>
|
||||
{
|
||||
IPage<BusiClue> queryListPage(@Param("entity") BusiClue entity, Page<BusiClue> page);
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.busi.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.busi.domain.BusiClueContacts;
|
||||
|
||||
/**
|
||||
* 线索联系人Service接口
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-12-02
|
||||
*/
|
||||
public interface IBusiClueContactsService extends IService<BusiClueContacts>
|
||||
{
|
||||
IPage<BusiClueContacts> queryListPage(BusiClueContacts pageReqVO, Page<BusiClueContacts> page);
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.busi.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.busi.domain.BusiClue;
|
||||
|
||||
/**
|
||||
* 线索主Service接口
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-12-02
|
||||
*/
|
||||
public interface IBusiClueService extends IService<BusiClue>
|
||||
{
|
||||
IPage<BusiClue> queryListPage(BusiClue pageReqVO, Page<BusiClue> page);
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.ruoyi.busi.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.busi.mapper.BusiClueContactsMapper;
|
||||
import com.ruoyi.busi.domain.BusiClueContacts;
|
||||
import com.ruoyi.busi.service.IBusiClueContactsService;
|
||||
|
||||
/**
|
||||
* 线索联系人Service业务层处理
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-12-02
|
||||
*/
|
||||
@Service
|
||||
public class BusiClueContactsServiceImpl extends ServiceImpl<BusiClueContactsMapper,BusiClueContacts> implements IBusiClueContactsService
|
||||
{
|
||||
@Autowired
|
||||
private BusiClueContactsMapper busiClueContactsMapper;
|
||||
|
||||
@Override
|
||||
public IPage<BusiClueContacts> queryListPage(BusiClueContacts pageReqVO, Page<BusiClueContacts> page) {
|
||||
return busiClueContactsMapper.queryListPage(pageReqVO, page);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.ruoyi.busi.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.busi.mapper.BusiClueMapper;
|
||||
import com.ruoyi.busi.domain.BusiClue;
|
||||
import com.ruoyi.busi.service.IBusiClueService;
|
||||
|
||||
/**
|
||||
* 线索主Service业务层处理
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-12-02
|
||||
*/
|
||||
@Service
|
||||
public class BusiClueServiceImpl extends ServiceImpl<BusiClueMapper,BusiClue> implements IBusiClueService
|
||||
{
|
||||
@Autowired
|
||||
private BusiClueMapper busiClueMapper;
|
||||
|
||||
@Override
|
||||
public IPage<BusiClue> queryListPage(BusiClue pageReqVO, Page<BusiClue> page) {
|
||||
return busiClueMapper.queryListPage(pageReqVO, page);
|
||||
}
|
||||
}
|
||||
@ -6,7 +6,7 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://rm-bp1msd0a4kq4t7a66lo.mysql.rds.aliyuncs.com:3306/dl_crm_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://rm-bp1msd0a4kq4t7a66lo.mysql.rds.aliyuncs.com:3306/dl_crm_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: csd_rw
|
||||
password: Csd2025#123
|
||||
# 从库数据源
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.busi.mapper.BusiClueContactsMapper">
|
||||
|
||||
<resultMap type="BusiClueContacts" id="BusiClueContactsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clueId" column="clue_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="email" column="email" />
|
||||
<result property="mobile" column="mobile" />
|
||||
<result property="telephone" column="telephone" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="job" column="job" />
|
||||
<result property="facebook" column="facebook" />
|
||||
<result property="twitter" column="twitter" />
|
||||
<result property="linkedIn" column="linked_in" />
|
||||
<result property="whatsApp" column="whats_app" />
|
||||
<result property="skype" column="skype" />
|
||||
<result property="wechat" column="wechat" />
|
||||
<result property="tm" column="tm" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="createdTime" column="created_time" />
|
||||
<result property="updater" column="updater" />
|
||||
<result property="updatedTime" column="updated_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBusiClueContactsVo">
|
||||
select id, clue_id, name, email, mobile, telephone, sex, job, facebook, twitter, linked_in, whats_app, skype, wechat, tm, remark, del_flag, creator, created_time, updater, updated_time from busi_clue_contacts
|
||||
</sql>
|
||||
|
||||
<select id="queryListPage" parameterType="BusiClueContacts" resultMap="BusiClueContactsResult">
|
||||
<include refid="selectBusiClueContactsVo"/>
|
||||
<where>
|
||||
<if test="entity.clueId != null and entity.clueId != ''"> and clue_id = #{entity.clueId}</if>
|
||||
<if test="entity.name != null and entity.name != ''"> and name like concat('%', #{entity.name}, '%')</if>
|
||||
<if test="entity.email != null and entity.email != ''"> and email = #{entity.email}</if>
|
||||
<if test="entity.mobile != null and entity.mobile != ''"> and mobile = #{entity.mobile}</if>
|
||||
<if test="entity.telephone != null and entity.telephone != ''"> and telephone = #{entity.telephone}</if>
|
||||
<if test="entity.sex != null and entity.sex != ''"> and sex = #{entity.sex}</if>
|
||||
<if test="entity.job != null and entity.job != ''"> and job = #{entity.job}</if>
|
||||
<if test="entity.facebook != null and entity.facebook != ''"> and facebook = #{entity.facebook}</if>
|
||||
<if test="entity.twitter != null and entity.twitter != ''"> and twitter = #{entity.twitter}</if>
|
||||
<if test="entity.linkedIn != null and entity.linkedIn != ''"> and linked_in = #{entity.linkedIn}</if>
|
||||
<if test="entity.whatsApp != null and entity.whatsApp != ''"> and whats_app = #{entity.whatsApp}</if>
|
||||
<if test="entity.skype != null and entity.skype != ''"> and skype = #{entity.skype}</if>
|
||||
<if test="entity.wechat != null and entity.wechat != ''"> and wechat = #{entity.wechat}</if>
|
||||
<if test="entity.tm != null and entity.tm != ''"> and tm = #{entity.tm}</if>
|
||||
<if test="entity.remark != null and entity.remark != ''"> and remark = #{entity.remark}</if>
|
||||
<if test="entity.createdTime != null "> and created_time = #{entity.createdTime}</if>
|
||||
<if test="entity.updatedTime != null "> and updated_time = #{entity.updatedTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.busi.mapper.BusiClueMapper">
|
||||
|
||||
<resultMap type="BusiClue" id="BusiClueResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cusId" column="cus_id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="region" column="region" />
|
||||
<result property="mainProduct" column="main_product" />
|
||||
<result property="businessType" column="business_type" />
|
||||
<result property="clueLevel" column="clue_level" />
|
||||
<result property="clueSource" column="clue_source" />
|
||||
<result property="clueStep" column="clue_step" />
|
||||
<result property="clueStatus" column="clue_status" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="allocateTime" column="allocate_time" />
|
||||
<result property="dealTime" column="deal_time" />
|
||||
<result property="webSite" column="web_site" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="invalidReason" column="invalid_reason" />
|
||||
<result property="invalidDescription" column="invalid_description" />
|
||||
<result property="recentlyFollowTime" column="recently_follow_time" />
|
||||
<result property="recentFollowUp" column="recent_follow_up" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="createdTime" column="created_time" />
|
||||
<result property="updater" column="updater" />
|
||||
<result property="updatedTime" column="updated_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBusiClueVo">
|
||||
select id, cus_id, code, name, customer_name, region, main_product, business_type, clue_level, clue_source, clue_step, clue_status, user_id, allocate_time, deal_time, web_site, remark, invalid_reason, invalid_description, recently_follow_time, recent_follow_up, del_flag, creator, created_time, updater, updated_time from busi_clue
|
||||
</sql>
|
||||
|
||||
<select id="queryListPage" parameterType="BusiClue" resultMap="BusiClueResult">
|
||||
<include refid="selectBusiClueVo"/>
|
||||
<where>
|
||||
<if test="entity.cusId != null and entity.cusId != ''"> and cus_id = #{entity.cusId}</if>
|
||||
<if test="entity.code != null and entity.code != ''"> and code = #{entity.code}</if>
|
||||
<if test="entity.name != null and entity.name != ''"> and name like concat('%', #{entity.name}, '%')</if>
|
||||
<if test="entity.customerName != null and entity.customerName != ''"> and customer_name like concat('%', #{entity.customerName}, '%')</if>
|
||||
<if test="entity.region != null and entity.region != ''"> and region = #{entity.region}</if>
|
||||
<if test="entity.mainProduct != null and entity.mainProduct != ''"> and main_product = #{entity.mainProduct}</if>
|
||||
<if test="entity.businessType != null and entity.businessType != ''"> and business_type = #{entity.businessType}</if>
|
||||
<if test="entity.clueLevel != null and entity.clueLevel != ''"> and clue_level = #{entity.clueLevel}</if>
|
||||
<if test="entity.clueSource != null and entity.clueSource != ''"> and clue_source = #{entity.clueSource}</if>
|
||||
<if test="entity.clueStep != null and entity.clueStep != ''"> and clue_step = #{entity.clueStep}</if>
|
||||
<if test="entity.clueStatus != null and entity.clueStatus != ''"> and clue_status = #{entity.clueStatus}</if>
|
||||
<if test="entity.userId != null "> and user_id = #{entity.userId}</if>
|
||||
<if test="entity.allocateTime != null "> and allocate_time = #{entity.allocateTime}</if>
|
||||
<if test="entity.dealTime != null "> and deal_time = #{entity.dealTime}</if>
|
||||
<if test="entity.webSite != null and entity.webSite != ''"> and web_site = #{entity.webSite}</if>
|
||||
<if test="entity.remark != null and entity.remark != ''"> and remark = #{entity.remark}</if>
|
||||
<if test="entity.invalidReason != null and entity.invalidReason != ''"> and invalid_reason = #{entity.invalidReason}</if>
|
||||
<if test="entity.invalidDescription != null and entity.invalidDescription != ''"> and invalid_description = #{entity.invalidDescription}</if>
|
||||
<if test="entity.recentlyFollowTime != null "> and recently_follow_time = #{entity.recentlyFollowTime}</if>
|
||||
<if test="entity.recentFollowUp != null and entity.recentFollowUp != ''"> and recent_follow_up = #{entity.recentFollowUp}</if>
|
||||
<if test="entity.createdTime != null "> and created_time = #{entity.createdTime}</if>
|
||||
<if test="entity.updatedTime != null "> and updated_time = #{entity.updatedTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
44
dl_vue/src/api/busi/clue.js
Normal file
44
dl_vue/src/api/busi/clue.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询线索主列表
|
||||
export function listClue(query) {
|
||||
return request({
|
||||
url: '/busi/clue/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询线索主详细
|
||||
export function getClue(id) {
|
||||
return request({
|
||||
url: '/busi/clue/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增线索主
|
||||
export function addClue(data) {
|
||||
return request({
|
||||
url: '/busi/clue',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改线索主
|
||||
export function updateClue(data) {
|
||||
return request({
|
||||
url: '/busi/clue',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除线索主
|
||||
export function delClue(id) {
|
||||
return request({
|
||||
url: '/busi/clue/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
541
dl_vue/src/views/busi/clue/index.vue
Normal file
541
dl_vue/src/views/busi/clue/index.vue
Normal file
@ -0,0 +1,541 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="关联客户ID" prop="cusId">
|
||||
<el-input
|
||||
v-model="queryParams.cusId"
|
||||
placeholder="请输入关联客户ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线索编号" prop="code">
|
||||
<el-input
|
||||
v-model="queryParams.code"
|
||||
placeholder="请输入线索编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线索名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入线索名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<el-input
|
||||
v-model="queryParams.customerName"
|
||||
placeholder="请输入客户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="国家/地区" prop="region">
|
||||
<el-input
|
||||
v-model="queryParams.region"
|
||||
placeholder="请输入国家/地区"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="主营产品" prop="mainProduct">
|
||||
<el-input
|
||||
v-model="queryParams.mainProduct"
|
||||
placeholder="请输入主营产品"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线索等级" prop="clueLevel">
|
||||
<el-input
|
||||
v-model="queryParams.clueLevel"
|
||||
placeholder="请输入线索等级"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线索来源" prop="clueSource">
|
||||
<el-input
|
||||
v-model="queryParams.clueSource"
|
||||
placeholder="请输入线索来源"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="线索阶段" prop="clueStep">
|
||||
<el-input
|
||||
v-model="queryParams.clueStep"
|
||||
placeholder="请输入线索阶段"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务员ID" prop="userId">
|
||||
<el-input
|
||||
v-model="queryParams.userId"
|
||||
placeholder="请输入业务员ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="分配时间" prop="allocateTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.allocateTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择分配时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理时间" prop="dealTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.dealTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择处理时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="企业网站" prop="webSite">
|
||||
<el-input
|
||||
v-model="queryParams.webSite"
|
||||
placeholder="请输入企业网站"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="无效原因" prop="invalidReason">
|
||||
<el-input
|
||||
v-model="queryParams.invalidReason"
|
||||
placeholder="请输入无效原因"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="最近联系时间" prop="recentlyFollowTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.recentlyFollowTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择最近联系时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createdTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.createdTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择创建时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updatedTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.updatedTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择更新时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['busi:clue:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['busi:clue:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['busi:clue:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['busi:clue:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="clueList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="关联客户ID" align="center" prop="cusId" />
|
||||
<el-table-column label="线索编号" align="center" prop="code" />
|
||||
<el-table-column label="线索名称" align="center" prop="name" />
|
||||
<el-table-column label="客户名称" align="center" prop="customerName" />
|
||||
<el-table-column label="国家/地区" align="center" prop="region" />
|
||||
<el-table-column label="主营产品" align="center" prop="mainProduct" />
|
||||
<el-table-column label="业务类型" align="center" prop="businessType" />
|
||||
<el-table-column label="线索等级" align="center" prop="clueLevel" />
|
||||
<el-table-column label="线索来源" align="center" prop="clueSource" />
|
||||
<el-table-column label="线索阶段" align="center" prop="clueStep" />
|
||||
<el-table-column label="线索状态" align="center" prop="clueStatus" />
|
||||
<el-table-column label="业务员ID" align="center" prop="userId" />
|
||||
<el-table-column label="分配时间" align="center" prop="allocateTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.allocateTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处理时间" align="center" prop="dealTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.dealTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="企业网站" align="center" prop="webSite" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="无效原因" align="center" prop="invalidReason" />
|
||||
<el-table-column label="无效描述" align="center" prop="invalidDescription" />
|
||||
<el-table-column label="最近联系时间" align="center" prop="recentlyFollowTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.recentlyFollowTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最近跟进信息" align="center" prop="recentFollowUp" />
|
||||
<el-table-column label="创建时间" align="center" prop="createdTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" align="center" prop="updatedTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['busi:clue:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['busi:clue:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改线索主对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="关联客户ID" prop="cusId">
|
||||
<el-input v-model="form.cusId" placeholder="请输入关联客户ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线索编号" prop="code">
|
||||
<el-input v-model="form.code" placeholder="请输入线索编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线索名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入线索名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<el-input v-model="form.customerName" placeholder="请输入客户名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="国家/地区" prop="region">
|
||||
<el-input v-model="form.region" placeholder="请输入国家/地区" />
|
||||
</el-form-item>
|
||||
<el-form-item label="主营产品" prop="mainProduct">
|
||||
<el-input v-model="form.mainProduct" placeholder="请输入主营产品" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线索等级" prop="clueLevel">
|
||||
<el-input v-model="form.clueLevel" placeholder="请输入线索等级" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线索来源" prop="clueSource">
|
||||
<el-input v-model="form.clueSource" placeholder="请输入线索来源" />
|
||||
</el-form-item>
|
||||
<el-form-item label="线索阶段" prop="clueStep">
|
||||
<el-input v-model="form.clueStep" placeholder="请输入线索阶段" />
|
||||
</el-form-item>
|
||||
<el-form-item label="业务员ID" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入业务员ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分配时间" prop="allocateTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.allocateTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择分配时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理时间" prop="dealTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.dealTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择处理时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="企业网站" prop="webSite">
|
||||
<el-input v-model="form.webSite" placeholder="请输入企业网站" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="无效原因" prop="invalidReason">
|
||||
<el-input v-model="form.invalidReason" placeholder="请输入无效原因" />
|
||||
</el-form-item>
|
||||
<el-form-item label="无效描述" prop="invalidDescription">
|
||||
<el-input v-model="form.invalidDescription" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最近联系时间" prop="recentlyFollowTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.recentlyFollowTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择最近联系时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="最近跟进信息" prop="recentFollowUp">
|
||||
<el-input v-model="form.recentFollowUp" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createdTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.createdTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择创建时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updatedTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.updatedTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择更新时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listClue, getClue, delClue, addClue, updateClue } from "@/api/busi/clue";
|
||||
|
||||
export default {
|
||||
name: "Clue",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 线索主表格数据
|
||||
clueList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
cusId: null,
|
||||
code: null,
|
||||
name: null,
|
||||
customerName: null,
|
||||
region: null,
|
||||
mainProduct: null,
|
||||
businessType: null,
|
||||
clueLevel: null,
|
||||
clueSource: null,
|
||||
clueStep: null,
|
||||
clueStatus: null,
|
||||
userId: null,
|
||||
allocateTime: null,
|
||||
dealTime: null,
|
||||
webSite: null,
|
||||
remark: null,
|
||||
invalidReason: null,
|
||||
invalidDescription: null,
|
||||
recentlyFollowTime: null,
|
||||
recentFollowUp: null,
|
||||
createdTime: null,
|
||||
updatedTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询线索主列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listClue(this.queryParams).then(response => {
|
||||
this.clueList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
cusId: null,
|
||||
code: null,
|
||||
name: null,
|
||||
customerName: null,
|
||||
region: null,
|
||||
mainProduct: null,
|
||||
businessType: null,
|
||||
clueLevel: null,
|
||||
clueSource: null,
|
||||
clueStep: null,
|
||||
clueStatus: null,
|
||||
userId: null,
|
||||
allocateTime: null,
|
||||
dealTime: null,
|
||||
webSite: null,
|
||||
remark: null,
|
||||
invalidReason: null,
|
||||
invalidDescription: null,
|
||||
recentlyFollowTime: null,
|
||||
recentFollowUp: null,
|
||||
delFlag: null,
|
||||
creator: null,
|
||||
createdTime: null,
|
||||
updater: null,
|
||||
updatedTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加线索主";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getClue(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改线索主";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateClue(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addClue(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除线索主编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delClue(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('busi/clue/export', {
|
||||
...this.queryParams
|
||||
}, `clue_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user