commit
6fa7b9e6a0
24
pom.xml
24
pom.xml
|
|
@ -18,17 +18,19 @@
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<spring-boot.version>2.7.2</spring-boot.version>
|
<spring-boot.version>2.7.2</spring-boot.version>
|
||||||
|
<mybatis-flex.version>1.5.3</mybatis-flex.version>
|
||||||
<spring-cloud.version>2021.0.3</spring-cloud.version>
|
<spring-cloud.version>2021.0.3</spring-cloud.version>
|
||||||
<spring-cloud-alibaba.version>2021.0.1.0</spring-cloud-alibaba.version>
|
<spring-cloud-alibaba.version>2021.0.1.0</spring-cloud-alibaba.version>
|
||||||
<alibaba.nacos.version>2.0.4</alibaba.nacos.version>
|
<alibaba.nacos.version>2.0.4</alibaba.nacos.version>
|
||||||
<alibaba.seata.version>1.5.1</alibaba.seata.version>
|
<alibaba.seata.version>1.5.1</alibaba.seata.version>
|
||||||
<spring-boot-admin.version>2.7.3</spring-boot-admin.version>
|
<spring-boot-admin.version>2.7.3</spring-boot-admin.version>
|
||||||
<spring-boot.mybatis>2.2.2</spring-boot.mybatis>
|
<spring-boot.mybatis>3.0.2</spring-boot.mybatis>
|
||||||
<swagger.fox.version>3.0.0</swagger.fox.version>
|
<swagger.fox.version>3.0.0</swagger.fox.version>
|
||||||
<swagger.core.version>1.6.2</swagger.core.version>
|
<swagger.core.version>1.6.2</swagger.core.version>
|
||||||
<tobato.version>1.27.2</tobato.version>
|
<tobato.version>1.27.2</tobato.version>
|
||||||
<kaptcha.version>2.3.2</kaptcha.version>
|
<kaptcha.version>2.3.2</kaptcha.version>
|
||||||
<pagehelper.boot.version>1.4.3</pagehelper.boot.version>
|
<pagehelper.boot.version>1.4.3</pagehelper.boot.version>
|
||||||
|
<pagehelper.version>5.3.3</pagehelper.version>
|
||||||
<druid.version>1.2.11</druid.version>
|
<druid.version>1.2.11</druid.version>
|
||||||
<dynamic-ds.version>3.5.1</dynamic-ds.version>
|
<dynamic-ds.version>3.5.1</dynamic-ds.version>
|
||||||
<commons.io.version>2.11.0</commons.io.version>
|
<commons.io.version>2.11.0</commons.io.version>
|
||||||
|
|
@ -95,12 +97,11 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Mybatis 依赖配置 -->
|
<!-- Mybatis 依赖配置 -->
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>org.mybatis.spring.boot</groupId>
|
<groupId>org.mybatis.spring.boot</groupId>
|
||||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||||
<version>${spring-boot.mybatis}</version>
|
<version>${spring-boot.mybatis}</version>
|
||||||
</dependency>
|
</dependency>-->
|
||||||
|
|
||||||
<!-- Swagger 依赖配置 -->
|
<!-- Swagger 依赖配置 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
|
|
@ -121,10 +122,16 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- pagehelper 分页插件 -->
|
<!-- pagehelper 分页插件 -->
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>com.github.pagehelper</groupId>
|
<groupId>com.github.pagehelper</groupId>
|
||||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||||
<version>${pagehelper.boot.version}</version>
|
<version>${pagehelper.boot.version}</version>
|
||||||
|
</dependency>-->
|
||||||
|
<!-- pagehelper 分页插件 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.pagehelper</groupId>
|
||||||
|
<artifactId>pagehelper</artifactId>
|
||||||
|
<version>${pagehelper.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- io常用工具类 -->
|
<!-- io常用工具类 -->
|
||||||
|
|
@ -239,7 +246,12 @@
|
||||||
<artifactId>ruoyi-common-datascope</artifactId>
|
<artifactId>ruoyi-common-datascope</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- mybatis-flex -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mybatis-flex</groupId>
|
||||||
|
<artifactId>mybatis-flex-spring-boot-starter</artifactId>
|
||||||
|
<version>${mybatis-flex.version}</version>
|
||||||
|
</dependency>
|
||||||
<!-- 多数据源 -->
|
<!-- 多数据源 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,13 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Pagehelper -->
|
<!-- Pagehelper -->
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>com.github.pagehelper</groupId>
|
<groupId>com.github.pagehelper</groupId>
|
||||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||||
|
</dependency>-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.pagehelper</groupId>
|
||||||
|
<artifactId>pagehelper</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Hibernate Validator -->
|
<!-- Hibernate Validator -->
|
||||||
|
|
@ -112,7 +116,11 @@
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- mybatis-flex -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mybatis-flex</groupId>
|
||||||
|
<artifactId>mybatis-flex-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
<!-- Swagger -->
|
<!-- Swagger -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.mybatisflex.annotation.Column;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity基类
|
* Entity基类
|
||||||
|
|
@ -16,6 +17,7 @@ public class BaseEntity implements Serializable
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 搜索值 */
|
/** 搜索值 */
|
||||||
|
@Column(ignore = true)
|
||||||
private String searchValue;
|
private String searchValue;
|
||||||
|
|
||||||
/** 创建者 */
|
/** 创建者 */
|
||||||
|
|
@ -23,6 +25,7 @@ public class BaseEntity implements Serializable
|
||||||
|
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Column(onInsertValue = "now()")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/** 更新者 */
|
/** 更新者 */
|
||||||
|
|
@ -30,12 +33,14 @@ public class BaseEntity implements Serializable
|
||||||
|
|
||||||
/** 更新时间 */
|
/** 更新时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Column(onUpdateValue = "now()", onInsertValue = "now()")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/** 请求参数 */
|
/** 请求参数 */
|
||||||
|
@Column(ignore = true)
|
||||||
private Map<String, Object> params;
|
private Map<String, Object> params;
|
||||||
|
|
||||||
public String getSearchValue()
|
public String getSearchValue()
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,11 @@
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common-redis</artifactId>
|
<artifactId>ruoyi-common-redis</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- mybatis-flex -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mybatis-flex</groupId>
|
||||||
|
<artifactId>mybatis-flex-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,11 @@
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-common-datasource</artifactId>
|
<artifactId>ruoyi-common-datasource</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- mybatis-flex -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mybatis-flex</groupId>
|
||||||
|
<artifactId>mybatis-flex-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
<!-- RuoYi Common DataScope -->
|
<!-- RuoYi Common DataScope -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
package com.ruoyi.system;
|
package com.ruoyi.system;
|
||||||
|
import com.github.pagehelper.PageInterceptor;
|
||||||
|
import com.ruoyi.system.configProperties.XxlJobProperties;
|
||||||
|
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import lombok.var;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import com.ruoyi.common.security.annotation.EnableCustomConfig;
|
import com.ruoyi.common.security.annotation.EnableCustomConfig;
|
||||||
|
|
@ -14,6 +19,7 @@ import org.springframework.web.client.RestTemplate;
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
|
@Log4j2
|
||||||
@EnableCustomConfig
|
@EnableCustomConfig
|
||||||
@EnableCustomSwagger2
|
@EnableCustomSwagger2
|
||||||
@EnableRyFeignClients
|
@EnableRyFeignClients
|
||||||
|
|
@ -39,4 +45,29 @@ public class RuoYiSystemApplication
|
||||||
public RestTemplate restTemplate(RestTemplateBuilder builder) {
|
public RestTemplate restTemplate(RestTemplateBuilder builder) {
|
||||||
// Do any additional configuration here
|
// Do any additional configuration here
|
||||||
return builder.build(); }
|
return builder.build(); }
|
||||||
|
//使用自动配置无效,
|
||||||
|
//需要手动注入bean,以让
|
||||||
|
//com.mybatisflex.spring.boot.MybatisFlexAutoConfiguration#MybatisFlexAutoConfiguration
|
||||||
|
//正常获取到com.github.pagehelper.PageInterceptor
|
||||||
|
@Bean public PageInterceptor pageInterceptor(){
|
||||||
|
var i = new PageInterceptor();
|
||||||
|
//转小驼峰用 var i = new MyPageInterceptor();
|
||||||
|
//i.setProperties(null);
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
@Autowired
|
||||||
|
private XxlJobProperties xxlJobProperties;
|
||||||
|
@Bean
|
||||||
|
public XxlJobSpringExecutor xxlJobExecutor() {
|
||||||
|
System.out.println(">>>>>>>>>>> xxl-job config init from nacos");
|
||||||
|
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
|
||||||
|
xxlJobSpringExecutor.setAdminAddresses(xxlJobProperties.getAdmin().getAddresses());
|
||||||
|
xxlJobSpringExecutor.setAppname(xxlJobProperties.getExecutor().getAppname());
|
||||||
|
xxlJobSpringExecutor.setIp(xxlJobProperties.getExecutor().getIp());
|
||||||
|
xxlJobSpringExecutor.setPort(xxlJobProperties.getExecutor().getPort());
|
||||||
|
xxlJobSpringExecutor.setAccessToken(xxlJobProperties.getAccessToken());
|
||||||
|
xxlJobSpringExecutor.setLogPath(xxlJobProperties.getExecutor().getLogpath());
|
||||||
|
xxlJobSpringExecutor.setLogRetentionDays(xxlJobProperties.getExecutor().getLogretentiondays());
|
||||||
|
return xxlJobSpringExecutor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
package com.ruoyi.system.configProperties;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Data
|
||||||
|
@ConfigurationProperties("xxl.job")
|
||||||
|
@RefreshScope
|
||||||
|
public class XxlJobProperties {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* admin : {"addresses":"http://192.168.2.165:32530/xxl-job-admin"}
|
||||||
|
* executor : {"ip":null,"port":9999,"logpath":"/data/applogs/xxl-job/jobhandler","appname":"xxl-job-001"}
|
||||||
|
* accessToken : null
|
||||||
|
*/
|
||||||
|
|
||||||
|
private AdminBean admin;
|
||||||
|
private ExecutorBean executor;
|
||||||
|
private String accessToken;
|
||||||
|
|
||||||
|
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
public static class AdminBean {
|
||||||
|
/**
|
||||||
|
* addresses : http://192.168.2.165:32530/xxl-job-admin
|
||||||
|
*/
|
||||||
|
|
||||||
|
private String addresses;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
public static class ExecutorBean {
|
||||||
|
/**
|
||||||
|
* ip : null
|
||||||
|
* port : 9999
|
||||||
|
* logpath : /data/applogs/xxl-job/jobhandler
|
||||||
|
* appname : xxl-job-001
|
||||||
|
*/
|
||||||
|
|
||||||
|
private String ip;
|
||||||
|
private int port;
|
||||||
|
private String logpath;
|
||||||
|
private String appname;
|
||||||
|
private int logretentiondays;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -78,7 +78,7 @@ public class FollowUpController extends BaseController
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody FollowUp followUp)
|
public AjaxResult add(@RequestBody FollowUp followUp)
|
||||||
{
|
{
|
||||||
return toAjax(followUpService.insertFollowUp(followUp));
|
return toAjax(followUpService.save(followUp));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ package com.ruoyi.system.domain;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import lombok.Data;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.ruoyi.common.core.annotation.Excel;
|
||||||
|
|
@ -13,6 +15,8 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2023-07-04
|
* @date 2023-07-04
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Table("building_team_rel")
|
||||||
public class BuildingTeamRel extends BaseEntity
|
public class BuildingTeamRel extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
@ -21,23 +25,23 @@ public class BuildingTeamRel extends BaseEntity
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** $column.columnComment */
|
/** $column.columnComment */
|
||||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
|
||||||
private String isDeleted;
|
private String isDeleted;
|
||||||
|
|
||||||
/** $column.columnComment */
|
/** $column.columnComment */
|
||||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
|
||||||
private Date createdTime;
|
private Date createdTime;
|
||||||
|
|
||||||
/** $column.columnComment */
|
/** $column.columnComment */
|
||||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
|
||||||
private String createdBy;
|
private String createdBy;
|
||||||
|
|
||||||
/** $column.columnComment */
|
/** $column.columnComment */
|
||||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
|
||||||
private String modifiedBy;
|
private String modifiedBy;
|
||||||
|
|
||||||
/** $column.columnComment */
|
/** $column.columnComment */
|
||||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
|
||||||
private Date lastUpdatedTime;
|
private Date lastUpdatedTime;
|
||||||
|
|
||||||
/** 场馆id */
|
/** 场馆id */
|
||||||
|
|
@ -48,90 +52,4 @@ public class BuildingTeamRel extends BaseEntity
|
||||||
@Excel(name = "球队场馆关联表")
|
@Excel(name = "球队场馆关联表")
|
||||||
private Long teamId;
|
private Long teamId;
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
public void setIsDeleted(String isDeleted)
|
|
||||||
{
|
|
||||||
this.isDeleted = isDeleted;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIsDeleted()
|
|
||||||
{
|
|
||||||
return isDeleted;
|
|
||||||
}
|
|
||||||
public void setCreatedTime(Date createdTime)
|
|
||||||
{
|
|
||||||
this.createdTime = createdTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getCreatedTime()
|
|
||||||
{
|
|
||||||
return createdTime;
|
|
||||||
}
|
|
||||||
public void setCreatedBy(String createdBy)
|
|
||||||
{
|
|
||||||
this.createdBy = createdBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreatedBy()
|
|
||||||
{
|
|
||||||
return createdBy;
|
|
||||||
}
|
|
||||||
public void setModifiedBy(String modifiedBy)
|
|
||||||
{
|
|
||||||
this.modifiedBy = modifiedBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getModifiedBy()
|
|
||||||
{
|
|
||||||
return modifiedBy;
|
|
||||||
}
|
|
||||||
public void setLastUpdatedTime(Date lastUpdatedTime)
|
|
||||||
{
|
|
||||||
this.lastUpdatedTime = lastUpdatedTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getLastUpdatedTime()
|
|
||||||
{
|
|
||||||
return lastUpdatedTime;
|
|
||||||
}
|
|
||||||
public void setBuildingId(Long buildingId)
|
|
||||||
{
|
|
||||||
this.buildingId = buildingId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getBuildingId()
|
|
||||||
{
|
|
||||||
return buildingId;
|
|
||||||
}
|
|
||||||
public void setTeamId(Long teamId)
|
|
||||||
{
|
|
||||||
this.teamId = teamId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getTeamId()
|
|
||||||
{
|
|
||||||
return teamId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("isDeleted", getIsDeleted())
|
|
||||||
.append("createdTime", getCreatedTime())
|
|
||||||
.append("createdBy", getCreatedBy())
|
|
||||||
.append("modifiedBy", getModifiedBy())
|
|
||||||
.append("lastUpdatedTime", getLastUpdatedTime())
|
|
||||||
.append("buildingId", getBuildingId())
|
|
||||||
.append("teamId", getTeamId())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.ruoyi.system.domain;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.ruoyi.common.core.annotation.Excel;
|
||||||
|
|
@ -14,6 +15,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2023-05-06
|
* @date 2023-05-06
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class Customer extends BaseEntity
|
public class Customer extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
@ -60,7 +62,8 @@ public class Customer extends BaseEntity
|
||||||
/** 客户居住 区县/区域 */
|
/** 客户居住 区县/区域 */
|
||||||
@Excel(name = "客户居住 区县/区域")
|
@Excel(name = "客户居住 区县/区域")
|
||||||
private String liveAddress;
|
private String liveAddress;
|
||||||
|
@Excel(name = "到店状态")
|
||||||
|
private String storeStatus;
|
||||||
/** 客户状态 */
|
/** 客户状态 */
|
||||||
@Excel(name = "客户状态")
|
@Excel(name = "客户状态")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
@ -137,317 +140,4 @@ public class Customer extends BaseEntity
|
||||||
|
|
||||||
/** 跟进模块-客户跟进记录信息 */
|
/** 跟进模块-客户跟进记录信息 */
|
||||||
private List<FollowUp> followUpList;
|
private List<FollowUp> followUpList;
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
public void setUserName(String userName)
|
|
||||||
{
|
|
||||||
this.userName = userName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserName()
|
|
||||||
{
|
|
||||||
return userName;
|
|
||||||
}
|
|
||||||
public void setNickName(String nickName)
|
|
||||||
{
|
|
||||||
this.nickName = nickName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNickName()
|
|
||||||
{
|
|
||||||
return nickName;
|
|
||||||
}
|
|
||||||
public void setUserType(String userType)
|
|
||||||
{
|
|
||||||
this.userType = userType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserType()
|
|
||||||
{
|
|
||||||
return userType;
|
|
||||||
}
|
|
||||||
public void setEmail(String email)
|
|
||||||
{
|
|
||||||
this.email = email;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEmail()
|
|
||||||
{
|
|
||||||
return email;
|
|
||||||
}
|
|
||||||
public void setPhoneNumber(String phoneNumber)
|
|
||||||
{
|
|
||||||
this.phoneNumber = phoneNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPhoneNumber()
|
|
||||||
{
|
|
||||||
return phoneNumber;
|
|
||||||
}
|
|
||||||
public void setSex(String sex)
|
|
||||||
{
|
|
||||||
this.sex = sex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSex()
|
|
||||||
{
|
|
||||||
return sex;
|
|
||||||
}
|
|
||||||
public void setAvatar(String avatar)
|
|
||||||
{
|
|
||||||
this.avatar = avatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAvatar()
|
|
||||||
{
|
|
||||||
return avatar;
|
|
||||||
}
|
|
||||||
public void setClueChannel(String clueChannel)
|
|
||||||
{
|
|
||||||
this.clueChannel = clueChannel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getClueChannel()
|
|
||||||
{
|
|
||||||
return clueChannel;
|
|
||||||
}
|
|
||||||
public void setDataSource(String dataSource)
|
|
||||||
{
|
|
||||||
this.dataSource = dataSource;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDataSource()
|
|
||||||
{
|
|
||||||
return dataSource;
|
|
||||||
}
|
|
||||||
public void setLiveAddress(String liveAddress)
|
|
||||||
{
|
|
||||||
this.liveAddress = liveAddress;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLiveAddress()
|
|
||||||
{
|
|
||||||
return liveAddress;
|
|
||||||
}
|
|
||||||
public void setStatus(String status)
|
|
||||||
{
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus()
|
|
||||||
{
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
public void setDelFlag(String delFlag)
|
|
||||||
{
|
|
||||||
this.delFlag = delFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDelFlag()
|
|
||||||
{
|
|
||||||
return delFlag;
|
|
||||||
}
|
|
||||||
public void setLoginIp(String loginIp)
|
|
||||||
{
|
|
||||||
this.loginIp = loginIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLoginIp()
|
|
||||||
{
|
|
||||||
return loginIp;
|
|
||||||
}
|
|
||||||
public void setLoginDate(Date loginDate)
|
|
||||||
{
|
|
||||||
this.loginDate = loginDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getLoginDate()
|
|
||||||
{
|
|
||||||
return loginDate;
|
|
||||||
}
|
|
||||||
public void setWechat(String wechat)
|
|
||||||
{
|
|
||||||
this.wechat = wechat;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getWechat()
|
|
||||||
{
|
|
||||||
return wechat;
|
|
||||||
}
|
|
||||||
public void setBuyCarType(String buyCarType)
|
|
||||||
{
|
|
||||||
this.buyCarType = buyCarType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBuyCarType()
|
|
||||||
{
|
|
||||||
return buyCarType;
|
|
||||||
}
|
|
||||||
public void setExistModels(String existModels)
|
|
||||||
{
|
|
||||||
this.existModels = existModels;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getExistModels()
|
|
||||||
{
|
|
||||||
return existModels;
|
|
||||||
}
|
|
||||||
public void setIsAssessment(Integer isAssessment)
|
|
||||||
{
|
|
||||||
this.isAssessment = isAssessment;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsAssessment()
|
|
||||||
{
|
|
||||||
return isAssessment;
|
|
||||||
}
|
|
||||||
public void setIntentionCarModels(String intentionCarModels)
|
|
||||||
{
|
|
||||||
this.intentionCarModels = intentionCarModels;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIntentionCarModels()
|
|
||||||
{
|
|
||||||
return intentionCarModels;
|
|
||||||
}
|
|
||||||
public void setContrastCarModels(String contrastCarModels)
|
|
||||||
{
|
|
||||||
this.contrastCarModels = contrastCarModels;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getContrastCarModels()
|
|
||||||
{
|
|
||||||
return contrastCarModels;
|
|
||||||
}
|
|
||||||
public void setIsTestDrive(Integer isTestDrive)
|
|
||||||
{
|
|
||||||
this.isTestDrive = isTestDrive;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsTestDrive()
|
|
||||||
{
|
|
||||||
return isTestDrive;
|
|
||||||
}
|
|
||||||
public void setIsOffer(Integer isOffer)
|
|
||||||
{
|
|
||||||
this.isOffer = isOffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsOffer()
|
|
||||||
{
|
|
||||||
return isOffer;
|
|
||||||
}
|
|
||||||
public void setIsFinance(Integer isFinance)
|
|
||||||
{
|
|
||||||
this.isFinance = isFinance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsFinance()
|
|
||||||
{
|
|
||||||
return isFinance;
|
|
||||||
}
|
|
||||||
public void setUnBookingCarReason(String unBookingCarReason)
|
|
||||||
{
|
|
||||||
this.unBookingCarReason = unBookingCarReason;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUnBookingCarReason()
|
|
||||||
{
|
|
||||||
return unBookingCarReason;
|
|
||||||
}
|
|
||||||
public void setPreToStoreDate(Date preToStoreDate)
|
|
||||||
{
|
|
||||||
this.preToStoreDate = preToStoreDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getPreToStoreDate()
|
|
||||||
{
|
|
||||||
return preToStoreDate;
|
|
||||||
}
|
|
||||||
public void setLastToStoreDate(Date lastToStoreDate)
|
|
||||||
{
|
|
||||||
this.lastToStoreDate = lastToStoreDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getLastToStoreDate()
|
|
||||||
{
|
|
||||||
return lastToStoreDate;
|
|
||||||
}
|
|
||||||
public void setStoreName(String storeName)
|
|
||||||
{
|
|
||||||
this.storeName = storeName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStoreName()
|
|
||||||
{
|
|
||||||
return storeName;
|
|
||||||
}
|
|
||||||
public void setOrderDate(Date orderDate)
|
|
||||||
{
|
|
||||||
this.orderDate = orderDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getOrderDate()
|
|
||||||
{
|
|
||||||
return orderDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<FollowUp> getFollowUpList()
|
|
||||||
{
|
|
||||||
return followUpList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFollowUpList(List<FollowUp> followUpList)
|
|
||||||
{
|
|
||||||
this.followUpList = followUpList;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("userName", getUserName())
|
|
||||||
.append("nickName", getNickName())
|
|
||||||
.append("userType", getUserType())
|
|
||||||
.append("email", getEmail())
|
|
||||||
.append("phoneNumber", getPhoneNumber())
|
|
||||||
.append("sex", getSex())
|
|
||||||
.append("avatar", getAvatar())
|
|
||||||
.append("clueChannel", getClueChannel())
|
|
||||||
.append("dataSource", getDataSource())
|
|
||||||
.append("liveAddress", getLiveAddress())
|
|
||||||
.append("status", getStatus())
|
|
||||||
.append("delFlag", getDelFlag())
|
|
||||||
.append("loginIp", getLoginIp())
|
|
||||||
.append("loginDate", getLoginDate())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("remark", getRemark())
|
|
||||||
.append("wechat", getWechat())
|
|
||||||
.append("buyCarType", getBuyCarType())
|
|
||||||
.append("existModels", getExistModels())
|
|
||||||
.append("isAssessment", getIsAssessment())
|
|
||||||
.append("intentionCarModels", getIntentionCarModels())
|
|
||||||
.append("contrastCarModels", getContrastCarModels())
|
|
||||||
.append("isTestDrive", getIsTestDrive())
|
|
||||||
.append("isOffer", getIsOffer())
|
|
||||||
.append("isFinance", getIsFinance())
|
|
||||||
.append("unBookingCarReason", getUnBookingCarReason())
|
|
||||||
.append("preToStoreDate", getPreToStoreDate())
|
|
||||||
.append("lastToStoreDate", getLastToStoreDate())
|
|
||||||
.append("storeName", getStoreName())
|
|
||||||
.append("orderDate", getOrderDate())
|
|
||||||
.append("followUpList", getFollowUpList())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,10 @@ package com.ruoyi.system.domain;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.mybatisflex.annotation.Id;
|
||||||
|
import com.mybatisflex.annotation.KeyType;
|
||||||
|
import com.mybatisflex.annotation.Table;
|
||||||
|
import lombok.Data;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.ruoyi.common.core.annotation.Excel;
|
||||||
|
|
@ -13,11 +17,14 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2023-05-07
|
* @date 2023-05-07
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@Table("f_follow_up")
|
||||||
public class FollowUp extends BaseEntity
|
public class FollowUp extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** id */
|
/** id */
|
||||||
|
@Id(keyType = KeyType.Auto)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/** 客户id */
|
/** 客户id */
|
||||||
|
|
@ -41,76 +48,9 @@ public class FollowUp extends BaseEntity
|
||||||
/** 级别 */
|
/** 级别 */
|
||||||
@Excel(name = "级别")
|
@Excel(name = "级别")
|
||||||
private String followLevel;
|
private String followLevel;
|
||||||
|
@Excel(name = "跟进结果")
|
||||||
|
private String followResult;
|
||||||
|
@Excel(name = "跟进方式")
|
||||||
|
private String followUpMethod;
|
||||||
|
|
||||||
public void setId(Integer id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
public void setCustomerId(Long customerId)
|
|
||||||
{
|
|
||||||
this.customerId = customerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getCustomerId()
|
|
||||||
{
|
|
||||||
return customerId;
|
|
||||||
}
|
|
||||||
public void setFollowUpDate(Date followUpDate)
|
|
||||||
{
|
|
||||||
this.followUpDate = followUpDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getFollowUpDate()
|
|
||||||
{
|
|
||||||
return followUpDate;
|
|
||||||
}
|
|
||||||
public void setFollowUpRecord(String followUpRecord)
|
|
||||||
{
|
|
||||||
this.followUpRecord = followUpRecord;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFollowUpRecord()
|
|
||||||
{
|
|
||||||
return followUpRecord;
|
|
||||||
}
|
|
||||||
public void setPreToStoreDate(Date preToStoreDate)
|
|
||||||
{
|
|
||||||
this.preToStoreDate = preToStoreDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getPreToStoreDate()
|
|
||||||
{
|
|
||||||
return preToStoreDate;
|
|
||||||
}
|
|
||||||
public void setFollowLevel(String followLevel)
|
|
||||||
{
|
|
||||||
this.followLevel = followLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFollowLevel()
|
|
||||||
{
|
|
||||||
return followLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("customerId", getCustomerId())
|
|
||||||
.append("followUpDate", getFollowUpDate())
|
|
||||||
.append("followUpRecord", getFollowUpRecord())
|
|
||||||
.append("preToStoreDate", getPreToStoreDate())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("remark", getRemark())
|
|
||||||
.append("followLevel", getFollowLevel())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.BaseMapper;
|
||||||
import com.ruoyi.system.domain.FollowUp;
|
import com.ruoyi.system.domain.FollowUp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -9,7 +11,7 @@ import com.ruoyi.system.domain.FollowUp;
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2023-05-07
|
* @date 2023-05-07
|
||||||
*/
|
*/
|
||||||
public interface FollowUpMapper
|
public interface FollowUpMapper extends BaseMapper<FollowUp>
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询跟进模块-客户跟进记录
|
* 查询跟进模块-客户跟进记录
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.ruoyi.system.service;
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.mybatisflex.core.service.IService;
|
||||||
import com.ruoyi.system.domain.FollowUp;
|
import com.ruoyi.system.domain.FollowUp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -9,7 +11,7 @@ import com.ruoyi.system.domain.FollowUp;
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2023-05-07
|
* @date 2023-05-07
|
||||||
*/
|
*/
|
||||||
public interface IFollowUpService
|
public interface IFollowUpService extends IService<FollowUp>
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询跟进模块-客户跟进记录
|
* 查询跟进模块-客户跟进记录
|
||||||
|
|
|
||||||
|
|
@ -76,8 +76,8 @@ public class CustomerServiceImpl implements ICustomerService
|
||||||
public int updateCustomer(Customer customer)
|
public int updateCustomer(Customer customer)
|
||||||
{
|
{
|
||||||
customer.setUpdateTime(DateUtils.getNowDate());
|
customer.setUpdateTime(DateUtils.getNowDate());
|
||||||
customerMapper.deleteFollowUpByCustomerId(customer.getId());
|
/* customerMapper.deleteFollowUpByCustomerId(customer.getId());
|
||||||
insertFollowUp(customer);
|
insertFollowUp(customer);*/
|
||||||
return customerMapper.updateCustomer(customer);
|
return customerMapper.updateCustomer(customer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
package com.ruoyi.system.service.impl;
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
import com.ruoyi.common.core.utils.DateUtils;
|
import com.ruoyi.common.core.utils.DateUtils;
|
||||||
|
import com.ruoyi.system.domain.Customer;
|
||||||
|
import com.ruoyi.system.mapper.CustomerMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.system.mapper.FollowUpMapper;
|
import com.ruoyi.system.mapper.FollowUpMapper;
|
||||||
|
|
@ -15,10 +19,12 @@ import com.ruoyi.system.service.IFollowUpService;
|
||||||
* @date 2023-05-07
|
* @date 2023-05-07
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class FollowUpServiceImpl implements IFollowUpService
|
public class FollowUpServiceImpl extends ServiceImpl<FollowUpMapper, FollowUp> implements IFollowUpService
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private FollowUpMapper followUpMapper;
|
private FollowUpMapper followUpMapper;
|
||||||
|
@Autowired
|
||||||
|
private CustomerMapper customerMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询跟进模块-客户跟进记录
|
* 查询跟进模块-客户跟进记录
|
||||||
|
|
@ -54,6 +60,16 @@ public class FollowUpServiceImpl implements IFollowUpService
|
||||||
public int insertFollowUp(FollowUp followUp)
|
public int insertFollowUp(FollowUp followUp)
|
||||||
{
|
{
|
||||||
followUp.setCreateTime(DateUtils.getNowDate());
|
followUp.setCreateTime(DateUtils.getNowDate());
|
||||||
|
Customer customer = new Customer();
|
||||||
|
customer.setId(followUp.getCustomerId());
|
||||||
|
//如果跟进记录的跟进级别选择
|
||||||
|
if("战败".equals(followUp.getFollowLevel())){
|
||||||
|
customer.setStatus("defeat");
|
||||||
|
customerMapper.updateCustomer(customer);
|
||||||
|
}else if("订车".equals(followUp.getFollowLevel())||"成交".equals(followUp.getFollowLevel())){
|
||||||
|
customer.setStatus("order");
|
||||||
|
customerMapper.updateCustomer(customer);
|
||||||
|
}
|
||||||
return followUpMapper.insertFollowUp(followUp);
|
return followUpMapper.insertFollowUp(followUp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,25 @@ server:
|
||||||
mybatis:
|
mybatis:
|
||||||
configuration:
|
configuration:
|
||||||
mapUnderscoreToCamelCase: true
|
mapUnderscoreToCamelCase: true
|
||||||
|
# MyBatis配置
|
||||||
|
mybatis-flex:
|
||||||
|
# 搜索指定包别名
|
||||||
|
typeAliasesPackage: com.ruoyi.**.domain
|
||||||
|
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||||
|
mapper-locations: classpath*:mapper/**/*Mapper.xml
|
||||||
|
cacheEnabled: true
|
||||||
|
useGeneratedKeys: true
|
||||||
|
defaultExecutorType: SIMPLE
|
||||||
|
configuration:
|
||||||
|
# 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
|
# 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||||
|
# 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
|
||||||
|
logImpl: org.apache.ibatis.logging.slf4j.Slf4jImpl
|
||||||
|
# PageHelper分页插件
|
||||||
|
pagehelper:
|
||||||
|
helperDialect: mysql
|
||||||
|
supportMethodsArguments: true
|
||||||
|
params: count=countSql
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
servlet:
|
servlet:
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="dataSource" column="data_source" />
|
<result property="dataSource" column="data_source" />
|
||||||
<result property="liveAddress" column="live_address" />
|
<result property="liveAddress" column="live_address" />
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
|
<result property="storeStatus" column="store_status"/>
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag" />
|
||||||
<result property="loginIp" column="login_ip" />
|
<result property="loginIp" column="login_ip" />
|
||||||
<result property="loginDate" column="login_date" />
|
<result property="loginDate" column="login_date" />
|
||||||
|
|
@ -60,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectCustomerVo">
|
<sql id="selectCustomerVo">
|
||||||
select id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, clue_channel, data_source, live_address, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark, wechat, buy_car_type, exist_models, is_assessment, intention_car_models, contrast_car_models, is_test_drive, is_offer, is_finance, un_booking_car_reason, pre_to_store_date, last_to_store_date, store_name, order_date from f_customer
|
select id, user_name, nick_name, user_type, email,store_status, phonenumber, sex, avatar, clue_channel, data_source, live_address, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark, wechat, buy_car_type, exist_models, is_assessment, intention_car_models, contrast_car_models, is_test_drive, is_offer, is_finance, un_booking_car_reason, pre_to_store_date, last_to_store_date, store_name, order_date from f_customer
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectCustomerList" resultType="com.ruoyi.system.domain.vo.CustomerVo">
|
<select id="selectCustomerList" resultType="com.ruoyi.system.domain.vo.CustomerVo">
|
||||||
|
|
@ -112,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="dataSource != null and dataSource != ''"> and t.data_source = #{dataSource}</if>
|
<if test="dataSource != null and dataSource != ''"> and t.data_source = #{dataSource}</if>
|
||||||
<if test="liveAddress != null and liveAddress != ''"> and t.live_address = #{liveAddress}</if>
|
<if test="liveAddress != null and liveAddress != ''"> and t.live_address = #{liveAddress}</if>
|
||||||
<if test="status != null and status != ''"> and t.status = #{status}</if>
|
<if test="status != null and status != ''"> and t.status = #{status}</if>
|
||||||
|
<if test="storeStatus != null and storeStatus != ''"> and t.store_status = #{storeStatus}</if>
|
||||||
<if test="loginDate != null "> and t.login_date = #{loginDate}</if>
|
<if test="loginDate != null "> and t.login_date = #{loginDate}</if>
|
||||||
<if test="wechat != null and wechat != ''"> and t.wechat = #{wechat}</if>
|
<if test="wechat != null and wechat != ''"> and t.wechat = #{wechat}</if>
|
||||||
<if test="buyCarType != null and buyCarType != ''"> and t.buy_car_type = #{buyCarType}</if>
|
<if test="buyCarType != null and buyCarType != ''"> and t.buy_car_type = #{buyCarType}</if>
|
||||||
|
|
@ -135,7 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCustomerById" parameterType="Long" resultMap="CustomerFollowUpResult">
|
<select id="selectCustomerById" parameterType="Long" resultMap="CustomerFollowUpResult">
|
||||||
select a.id, a.user_name, a.nick_name, a.user_type, a.email, a.phonenumber, a.sex, a.avatar, a.clue_channel, a.data_source, a.live_address, a.status, a.del_flag, a.login_ip, a.login_date, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.wechat, a.buy_car_type, a.exist_models, a.is_assessment, a.intention_car_models, a.contrast_car_models, a.is_test_drive, a.is_offer, a.is_finance, a.un_booking_car_reason, a.pre_to_store_date, a.last_to_store_date, a.store_name, a.order_date,
|
select a.id, a.user_name,a.store_status, a.nick_name, a.user_type, a.email, a.phonenumber, a.sex, a.avatar, a.clue_channel, a.data_source, a.live_address, a.status, a.del_flag, a.login_ip, a.login_date, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.wechat, a.buy_car_type, a.exist_models, a.is_assessment, a.intention_car_models, a.contrast_car_models, a.is_test_drive, a.is_offer, a.is_finance, a.un_booking_car_reason, a.pre_to_store_date, a.last_to_store_date, a.store_name, a.order_date,
|
||||||
b.id as sub_id, b.customer_id as sub_customer_id, b.follow_up_date as sub_follow_up_date, b.follow_up_record as sub_follow_up_record, b.pre_to_store_date as sub_pre_to_store_date, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark, b.follow_level as sub_follow_level
|
b.id as sub_id, b.customer_id as sub_customer_id, b.follow_up_date as sub_follow_up_date, b.follow_up_record as sub_follow_up_record, b.pre_to_store_date as sub_pre_to_store_date, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark, b.follow_level as sub_follow_level
|
||||||
from f_customer a
|
from f_customer a
|
||||||
left join f_follow_up b on b.customer_id = a.id
|
left join f_follow_up b on b.customer_id = a.id
|
||||||
|
|
@ -156,6 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="dataSource != null">data_source,</if>
|
<if test="dataSource != null">data_source,</if>
|
||||||
<if test="liveAddress != null">live_address,</if>
|
<if test="liveAddress != null">live_address,</if>
|
||||||
<if test="status != null">status,</if>
|
<if test="status != null">status,</if>
|
||||||
|
<if test="storeStatus != null">store_status,</if>
|
||||||
<if test="delFlag != null">del_flag,</if>
|
<if test="delFlag != null">del_flag,</if>
|
||||||
<if test="loginIp != null">login_ip,</if>
|
<if test="loginIp != null">login_ip,</if>
|
||||||
<if test="loginDate != null">login_date,</if>
|
<if test="loginDate != null">login_date,</if>
|
||||||
|
|
@ -191,6 +194,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="dataSource != null">#{dataSource},</if>
|
<if test="dataSource != null">#{dataSource},</if>
|
||||||
<if test="liveAddress != null">#{liveAddress},</if>
|
<if test="liveAddress != null">#{liveAddress},</if>
|
||||||
<if test="status != null">#{status},</if>
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="storeStatus != null">#{storeStatus},</if>
|
||||||
<if test="delFlag != null">#{delFlag},</if>
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
<if test="loginIp != null">#{loginIp},</if>
|
<if test="loginIp != null">#{loginIp},</if>
|
||||||
<if test="loginDate != null">#{loginDate},</if>
|
<if test="loginDate != null">#{loginDate},</if>
|
||||||
|
|
@ -230,6 +234,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="dataSource != null">data_source = #{dataSource},</if>
|
<if test="dataSource != null">data_source = #{dataSource},</if>
|
||||||
<if test="liveAddress != null">live_address = #{liveAddress},</if>
|
<if test="liveAddress != null">live_address = #{liveAddress},</if>
|
||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="storeStatus != null">store_status = #{storeStatus},</if>
|
||||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
<if test="loginIp != null">login_ip = #{loginIp},</if>
|
<if test="loginIp != null">login_ip = #{loginIp},</if>
|
||||||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
<if test="loginDate != null">login_date = #{loginDate},</if>
|
||||||
|
|
@ -279,9 +284,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="batchFollowUp">
|
<insert id="batchFollowUp">
|
||||||
insert into f_follow_up( id, customer_id, follow_up_date, follow_up_record, pre_to_store_date, create_by, create_time, update_by, update_time, remark, follow_level) values
|
insert into f_follow_up( id, customer_id, follow_up_date, follow_up_record, pre_to_store_date, create_by, create_time, update_by, update_time, remark, follow_level,follow_result,follow_up_method) values
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
( #{item.id}, #{item.customerId}, #{item.followUpDate}, #{item.followUpRecord}, #{item.preToStoreDate}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark}, #{item.followLevel})
|
( #{item.id}, #{item.customerId}, #{item.followUpDate}, #{item.followUpRecord}, #{item.preToStoreDate}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark}, #{item.followLevel},#{item.followResult},#{item.followUpMethod})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -16,16 +16,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="followLevel" column="follow_level" />
|
<result property="followLevel" column="follow_level" />
|
||||||
|
<result property="followResult" column="follow_result" />
|
||||||
|
<result property="followUpMethod" column="follow_up_method" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectFollowUpVo">
|
<sql id="selectFollowUpVo">
|
||||||
select id, customer_id, follow_up_date, follow_up_record, pre_to_store_date, create_by, create_time, update_by, update_time, remark, follow_level from f_follow_up
|
select id, customer_id, follow_up_date, follow_up_record, pre_to_store_date, create_by, create_time, update_by, update_time, remark, follow_level,follow_result,follow_up_method from f_follow_up
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectFollowUpList" parameterType="FollowUp" resultMap="FollowUpResult">
|
<select id="selectFollowUpList" parameterType="FollowUp" resultMap="FollowUpResult">
|
||||||
<include refid="selectFollowUpVo"/>
|
<include refid="selectFollowUpVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
||||||
|
<if test="followResult != null and followResult != ''"> and follow_result = #{followResult}</if>
|
||||||
|
<if test="followUpMethod != null and followUpMethod != ''"> and follow_up_method = #{followUpMethod}</if>
|
||||||
<if test="followUpDate != null "> and follow_up_date = #{followUpDate}</if>
|
<if test="followUpDate != null "> and follow_up_date = #{followUpDate}</if>
|
||||||
<if test="followUpRecord != null and followUpRecord != ''"> and follow_up_record = #{followUpRecord}</if>
|
<if test="followUpRecord != null and followUpRecord != ''"> and follow_up_record = #{followUpRecord}</if>
|
||||||
<if test="preToStoreDate != null "> and pre_to_store_date = #{preToStoreDate}</if>
|
<if test="preToStoreDate != null "> and pre_to_store_date = #{preToStoreDate}</if>
|
||||||
|
|
@ -51,6 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
<if test="followLevel != null">follow_level,</if>
|
<if test="followLevel != null">follow_level,</if>
|
||||||
|
<if test="followResult != null ">follow_result ,</if>
|
||||||
|
<if test="followUpMethod != null">follow_up_method ,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="customerId != null">#{customerId},</if>
|
<if test="customerId != null">#{customerId},</if>
|
||||||
|
|
@ -63,6 +69,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
<if test="followLevel != null">#{followLevel},</if>
|
<if test="followLevel != null">#{followLevel},</if>
|
||||||
|
<if test="followResult != null ">#{followResult},</if>
|
||||||
|
<if test="followUpMethod != null">#{followUpMethod},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -79,6 +87,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="followLevel != null">follow_level = #{followLevel},</if>
|
<if test="followLevel != null">follow_level = #{followLevel},</if>
|
||||||
|
<if test="followResult != null "> follow_result = #{followResult},</if>
|
||||||
|
<if test="followUpMethod != null "> follow_up_method = #{followUpMethod},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,882 @@
|
||||||
|
<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="客户名" prop="userName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.userName"
|
||||||
|
placeholder="请输入客户名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户级别" prop="userType">
|
||||||
|
<el-select v-model="queryParams.userType" placeholder="请选择客户级别" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_level"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="手机号码" prop="phoneNumber">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.phoneNumber"
|
||||||
|
placeholder="请输入手机号码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="线索渠道" prop="clueChannel">
|
||||||
|
<el-select v-model="queryParams.clueChannel" placeholder="请选择线索渠道" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.clue_channels"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="信息来源" prop="dataSource">
|
||||||
|
<el-select v-model="queryParams.dataSource" placeholder="请选择信息来源" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_source"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="到店状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.storeStatus" placeholder="请选择到店状态" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.to_store_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="微信号" prop="wechat">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.wechat"
|
||||||
|
placeholder="请输入微信号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="意向车型" prop="intentionCarModels">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.intentionCarModels"
|
||||||
|
placeholder="请输入意向车型"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.preToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择预计到店">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="下单日期" prop="orderDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.orderDate"
|
||||||
|
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="['system:customer: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="['system:customer: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="['system:customer: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="['system:customer:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns" :pageName="$options.name" ></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="客户姓名" align="center" prop="userName" width="120" v-if="columns[1].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="客户状态" align="center" prop="status" width="120" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.customer_status" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="客户级别" align="center" prop="userType" v-if="columns[3].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.customer_level" :value="scope.row.userType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="手机号码" align="center" prop="phoneNumber" width="110" v-if="columns[5].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="线索渠道" align="center" prop="clueChannel" v-if="columns[8].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.clue_channels" :value="scope.row.clueChannel"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="信息来源" align="center" prop="dataSource" v-if="columns[9].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.customer_source" :value="scope.row.dataSource"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="客户居住" align="center" prop="liveAddress" width="100" v-if="columns[10].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="到店状态" align="center" prop="status" width="100" v-if="columns[11].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.to_store_status" :value="scope.row.storeStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="微信号" align="center" prop="wechat" width="110" v-if="columns[20].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="下单日期" align="center" prop="orderDate" width="120" v-if="columns[33].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.orderDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column label="是否评估" align="center" prop="isAssessment" />-->
|
||||||
|
<el-table-column label="意向车型" align="center" prop="intentionCarModels" width="120" v-if="columns[24].visible" show-overflow-tooltip />
|
||||||
|
<!-- <el-table-column label="对比车型" align="center" prop="contrastCarModels" />
|
||||||
|
<el-table-column label="是否试驾" align="center" prop="isTestDrive" />
|
||||||
|
<el-table-column label="是否报价" align="center" prop="isOffer" />
|
||||||
|
<el-table-column label="是否金融" align="center" prop="isFinance" />-->
|
||||||
|
<!-- <el-table-column label="最后到店" align="center" prop="lastToStoreDate" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.lastToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>-->
|
||||||
|
<el-table-column label="已有车辆" align="center" prop="existModels" v-if="columns[22].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="预计到店" class-name="specialColor" align="center" prop="preToStoreDate" width="120" v-if="columns[30].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.preToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="跟进次数" class-name="specialColor" align="center" prop="followUpTimes" v-if="columns[34].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="最新跟进日" class-name="specialColor" align="center" prop="followUpLastDate" width="100" v-if="columns[35].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="最新跟进级别" class-name="specialColor" align="center" prop="followUpLastLevel" width="100" v-if="columns[36].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="建议下次跟进日" class-name="specialColor" align="center" prop="proposalNextFollowDate" width="120" v-if="columns[37].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="跟进超期" class-name="specialColor" align="center" prop="followUpOverdueDate" width="120" v-if="columns[38].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="未订车原因" align="center" prop="unBookingCarReason" width="110" show-overflow-tooltip v-if="columns[29].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip v-if="columns[19].visible" />
|
||||||
|
|
||||||
|
<el-table-column label="操作" width="160" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleFollow(scope.row)"
|
||||||
|
v-hasPermi="['system:customer:edit']"
|
||||||
|
>跟进</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:customer:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:customer: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="60%" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :inline="true" :rules="rules" label-width="110px">
|
||||||
|
<el-form-item label="下单日期" prop="orderDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.orderDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择下单日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户姓名" prop="userName">
|
||||||
|
<el-input v-model="form.userName" placeholder="请输入客户姓名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户状态" prop="status">
|
||||||
|
<el-select v-model="form.status" placeholder="请选择客户状态">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户性别" prop="sex">
|
||||||
|
<el-select v-model="form.sex" placeholder="请选择客户性别">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_user_sex"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户手机" prop="phoneNumber">
|
||||||
|
<el-input v-model="form.phoneNumber" placeholder="请输入客户手机号码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户微信" prop="wechat">
|
||||||
|
<el-input v-model="form.wechat" placeholder="请输入客户微信" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户级别" prop="userType">
|
||||||
|
<el-select v-model="form.userType" placeholder="请选择客户级别">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_level"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户邮箱" prop="email">
|
||||||
|
<el-input v-model="form.email" placeholder="请输入用户邮箱" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="线索渠道" prop="clueChannel">
|
||||||
|
<el-select v-model="form.clueChannel" placeholder="请选择线索渠道">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.clue_channels"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="信息来源" prop="dataSource">
|
||||||
|
<el-select v-model="form.dataSource" placeholder="请选择信息来源">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_source"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户居住" prop="liveAddress">
|
||||||
|
<el-input v-model="form.liveAddress" placeholder="请输入客户居住" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="到店状态" prop="status">
|
||||||
|
<el-select v-model="form.storeStatus" placeholder="请选择到店状态">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.to_store_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="已有车型" prop="existModels">
|
||||||
|
<el-input v-model="form.existModels" placeholder="请输入已有车型" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="意向车型" prop="intentionCarModels">
|
||||||
|
<el-input v-model="form.intentionCarModels" placeholder="请输入意向车型" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="是否试驾" prop="isTestDrive">
|
||||||
|
<el-input v-model="form.isTestDrive" placeholder="请输入是否试驾" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否报价" prop="isOffer">
|
||||||
|
<el-input v-model="form.isOffer" placeholder="请输入是否报价" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否金融" prop="isFinance">
|
||||||
|
<el-input v-model="form.isFinance" placeholder="请输入是否金融" />
|
||||||
|
</el-form-item>
|
||||||
|
-->
|
||||||
|
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.preToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择预计到店">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="最后到店" prop="lastToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.lastToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择最后到店">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>-->
|
||||||
|
<el-form-item label="4S店" prop="storeName">
|
||||||
|
<el-input v-model="form.storeName" placeholder="请输入4S店" />
|
||||||
|
</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="unBookingCarReason">
|
||||||
|
<el-input v-model="form.unBookingCarReason" type="textarea" placeholder="请输入内容" />
|
||||||
|
</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>
|
||||||
|
<!-- 添加客户跟进记录Drawer 抽屉 -->
|
||||||
|
<el-drawer :title="followTitle" :before-close="handleDrawerClose" :visible.sync="drawer" size="50%">
|
||||||
|
<div style="position: fixed;top: 40px;left: 65%;z-index: 100;font-size: smaller">
|
||||||
|
<el-radio-group v-model="reverse">
|
||||||
|
<el-radio :label="true">倒序</el-radio>
|
||||||
|
<el-radio :label="false">正序</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<el-button size="mini" type="primary" icon="el-icon-edit" style="position: relative;left: 100px" @click="handleDrawerAddFollowUp" >新增</el-button>
|
||||||
|
</div>
|
||||||
|
<el-timeline :reverse="reverse">
|
||||||
|
<el-timeline-item placement="top" v-for="(follow, index) in followUpList" :key="index" :timestamp="follow.followUpDate">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<p><el-tag>跟进方式:</el-tag>
|
||||||
|
<el-select v-model="follow.followUpMethod" disabled>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.follow_up_method"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</p>
|
||||||
|
<p><el-tag>级别:</el-tag> {{follow.followLevel}} </p>
|
||||||
|
<h4><el-tag>记录:</el-tag> {{follow.followUpRecord}}</h4>
|
||||||
|
<p> <el-tag>再次预约到店日期:</el-tag> {{follow.preToStoreDate}} </p>
|
||||||
|
<p>提交于 {{follow.createTime}}</p>
|
||||||
|
</el-card>
|
||||||
|
</el-timeline-item>
|
||||||
|
</el-timeline>
|
||||||
|
<el-drawer title="新增跟进日志" :append-to-body="true" :visible.sync="innerDrawer">
|
||||||
|
<el-form ref="followForm" :model="followForm" :rules="followRules" label-width="140px">
|
||||||
|
<el-form-item label="跟进日期" prop="followUpDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="followForm.followUpDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择跟进日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="跟进方式" prop="followUpMethod">
|
||||||
|
<el-select v-model="followForm.followUpMethod" placeholder="请选择跟进方式" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.follow_up_method"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="跟进记录" prop="followUpRecord">
|
||||||
|
<el-input v-model="followForm.followUpRecord" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="级别" prop="followLevel">
|
||||||
|
<el-select v-model="followForm.followLevel" placeholder="请选择级别" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_level"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="再次预约到店日期" prop="preToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="followForm.preToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择再次预约到店日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="followForm.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: center">
|
||||||
|
<el-button type="primary" @click="submitFollowForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
|
</el-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listCustomer,
|
||||||
|
getCustomer,
|
||||||
|
delCustomer,
|
||||||
|
addCustomer,
|
||||||
|
updateCustomer,
|
||||||
|
addCustomerFollowRecerd, updateCustomerFollowRecerd, listCustomerFollow
|
||||||
|
} from "@/api/system/customer";
|
||||||
|
import Data from "@/views/system/dict/data";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "bookManagerCustomer",
|
||||||
|
dicts: ['to_store_status', 'customer_source','customer_status', 'sys_user_sex', 'customer_level', 'clue_channels','follow_result','follow_up_method'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
drawer:false,
|
||||||
|
reverse: true,
|
||||||
|
innerDrawer:false,
|
||||||
|
dafaultValue:null,
|
||||||
|
customerId:null,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
followTitle:null,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 子表选中数据
|
||||||
|
checkedFollowUp: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 客户信息表格数据
|
||||||
|
customerList: [],
|
||||||
|
// 跟进模块-客户跟进记录表格数据
|
||||||
|
followUpList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
userName: null,
|
||||||
|
userType: null,
|
||||||
|
phoneNumber: null,
|
||||||
|
clueChannel: null,
|
||||||
|
dataSource: null,
|
||||||
|
status: null,
|
||||||
|
wechat: null,
|
||||||
|
intentionCarModels: null,
|
||||||
|
preToStoreDate: null,
|
||||||
|
orderDate: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {
|
||||||
|
|
||||||
|
},
|
||||||
|
followForm:{
|
||||||
|
followUpDate:null,
|
||||||
|
customerId:null,
|
||||||
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
userName: [
|
||||||
|
{ required: true, message: "客户名不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
orderDate:[
|
||||||
|
{ required: true, message: "下单日期不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
phoneNumber: [
|
||||||
|
{ required: true, message: "手机号码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
dataSource: [
|
||||||
|
{ required: true, message: "信息来源不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
intentionCarModels: [
|
||||||
|
{ required: true, message: "意向车型不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// 跟进表单校验
|
||||||
|
followRules: {
|
||||||
|
followUpDate: [
|
||||||
|
{ required: true, message: "跟进日期不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followUpRecord:[
|
||||||
|
{ required: true, message: "跟进记录不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followLevel: [
|
||||||
|
{ required: true, message: "级别不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followUpMethod:[
|
||||||
|
{ required: true, message: "跟进方式不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followResult:[
|
||||||
|
{ required: true, message: "跟进结果不能为空", trigger: "blur" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 列表的列的显示隐藏设置
|
||||||
|
columns:[
|
||||||
|
{ key: 0, label: `客户ID`, visible: true },
|
||||||
|
{ key: 1, label: `客户名`, visible: true },
|
||||||
|
{ key: 2, label: `客户昵称`, visible: true },
|
||||||
|
{ key: 3, label: `客户级别`, visible: true },
|
||||||
|
{ key: 4, label: `用户邮箱`, visible: true },
|
||||||
|
{ key: 5, label: `手机号码`, visible: true },
|
||||||
|
{ key: 6, label: `客户性别`, visible: true },
|
||||||
|
{ key: 7, label: `头像地址`, visible: true },
|
||||||
|
{ key: 8, label: `线索渠道`, visible: true },
|
||||||
|
{ key: 9, label: `信息来源`, visible: true },
|
||||||
|
{ key: 10, label: `客户居住`, visible: true },
|
||||||
|
{ key: 11, label: `到店状态`, visible: true },
|
||||||
|
{ key: 12, label: `删除标志`, visible: true },
|
||||||
|
{ key: 13, label: `最后登录IP`, visible: true },
|
||||||
|
{ key: 14, label: `最后登录时间`, visible: true },
|
||||||
|
{ key: 15, label: `创建者`, visible: true },
|
||||||
|
{ key: 16, label: `创建时间`, visible: true },
|
||||||
|
{ key: 17, label: `更新者`, visible: true },
|
||||||
|
{ key: 18, label: `更新时间`, visible: true },
|
||||||
|
{ key: 19, label: `备注`, visible: true },
|
||||||
|
{ key: 20, label: `微信号`, visible: true },
|
||||||
|
{ key: 21, label: `购车类型`, visible: true },
|
||||||
|
{ key: 22, label: `已有车辆`, visible: true },
|
||||||
|
{ key: 23, label: `是否评估`, visible: true },
|
||||||
|
{ key: 24, label: `意向车型`, visible: true },
|
||||||
|
{ key: 25, label: `对比车型`, visible: true },
|
||||||
|
{ key: 26, label: `是否试驾`, visible: true },
|
||||||
|
{ key: 27, label: `是否报价`, visible: true },
|
||||||
|
{ key: 28, label: `是否金融`, visible: true },
|
||||||
|
{ key: 29, label: `未订车原因`, visible: true },
|
||||||
|
{ key: 30, label: `预计到店`, visible: true },
|
||||||
|
{ key: 31, label: `最后到店`, visible: true },
|
||||||
|
{ key: 32, label: `4S店`, visible: true },
|
||||||
|
{ key: 33, label: `下单日期`, visible: true },
|
||||||
|
{ key: 34, label: `跟进次数`, visible: true },
|
||||||
|
{ key: 35, label: `最新跟进日`, visible: true },
|
||||||
|
{ key: 36, label: `最新跟进级别`, visible: true },
|
||||||
|
{ key: 37, label: `建议下次跟进日`, visible: true },
|
||||||
|
{ key: 38, label: `跟进超期`, visible: true },
|
||||||
|
{ key: 39, label: `客户状态`, visible: true },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.dafaultValue = new Date;
|
||||||
|
var columns1 = JSON.parse(localStorage.getItem(this.$options.name));
|
||||||
|
if(columns1){
|
||||||
|
this.columns = columns1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询客户信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.status = 'potential';
|
||||||
|
listCustomer(this.queryParams).then(response => {
|
||||||
|
this.customerList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询客户跟进信息列表 */
|
||||||
|
getFollowList(customerId) {
|
||||||
|
this.loading = true;
|
||||||
|
let queryParams = {
|
||||||
|
customerId:customerId,
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:1000,
|
||||||
|
}
|
||||||
|
listCustomerFollow(queryParams).then(response => {
|
||||||
|
this.followUpList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
userName: null,
|
||||||
|
nickName: null,
|
||||||
|
userType: null,
|
||||||
|
email: null,
|
||||||
|
phoneNumber: null,
|
||||||
|
sex: null,
|
||||||
|
avatar: null,
|
||||||
|
clueChannel: null,
|
||||||
|
dataSource: null,
|
||||||
|
liveAddress: null,
|
||||||
|
status: null,
|
||||||
|
delFlag: null,
|
||||||
|
loginIp: null,
|
||||||
|
loginDate: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
remark: null,
|
||||||
|
wechat: null,
|
||||||
|
buyCarType: null,
|
||||||
|
existModels: null,
|
||||||
|
isAssessment: 0,
|
||||||
|
intentionCarModels: null,
|
||||||
|
contrastCarModels: null,
|
||||||
|
isTestDrive: null,
|
||||||
|
isOffer: null,
|
||||||
|
isFinance: null,
|
||||||
|
unBookingCarReason: null,
|
||||||
|
preToStoreDate: null,
|
||||||
|
lastToStoreDate: null,
|
||||||
|
storeName: null,
|
||||||
|
orderDate: null
|
||||||
|
};
|
||||||
|
this.followUpList = [];
|
||||||
|
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.form.status = 'potential';
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加客户信息";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getCustomer(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.followUpList = response.data.followUpList;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改客户信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**跟进按钮**/
|
||||||
|
handleFollow(row){
|
||||||
|
this.drawer = true;
|
||||||
|
this.customerId = row.id;
|
||||||
|
this.followTitle = row.userName + " 跟进记录";
|
||||||
|
this.getFollowList(this.customerId);
|
||||||
|
},
|
||||||
|
handleDrawerAddFollowUp(){
|
||||||
|
this.innerDrawer = true;
|
||||||
|
this.followForm = {};
|
||||||
|
this.followForm.followUpDate = new Date();
|
||||||
|
this.followForm.customerId = this.customerId;
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.form.followUpList = this.followUpList;
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateCustomer(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCustomer(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submitFollowForm(){
|
||||||
|
this.$refs["followForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateCustomerFollowRecerd(this.followForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getFollowList(this.customerId);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCustomerFollowRecerd(this.followForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getFollowList(this.customerId);
|
||||||
|
this.innerDrawer = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除客户信息编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delCustomer(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 跟进模块-客户跟进记录序号 */
|
||||||
|
rowFollowUpIndex({ row, rowIndex }) {
|
||||||
|
row.index = rowIndex + 1;
|
||||||
|
},
|
||||||
|
/** 跟进模块-客户跟进记录添加按钮操作 */
|
||||||
|
handleAddFollowUp() {
|
||||||
|
let obj = {};
|
||||||
|
obj.followUpDate = "";
|
||||||
|
obj.followUpRecord = "";
|
||||||
|
obj.preToStoreDate = "";
|
||||||
|
obj.remark = "";
|
||||||
|
obj.followLevel = "";
|
||||||
|
this.followUpList.push(obj);
|
||||||
|
},
|
||||||
|
/** 跟进模块-客户跟进记录删除按钮操作 */
|
||||||
|
handleDeleteFollowUp() {
|
||||||
|
if (this.checkedFollowUp.length == 0) {
|
||||||
|
this.$modal.msgError("请先选择要删除的跟进模块-客户跟进记录数据");
|
||||||
|
} else {
|
||||||
|
const followUpList = this.followUpList;
|
||||||
|
const checkedFollowUp = this.checkedFollowUp;
|
||||||
|
this.followUpList = followUpList.filter(function(item) {
|
||||||
|
return checkedFollowUp.indexOf(item.index) == -1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 复选框选中数据 */
|
||||||
|
handleFollowUpSelectionChange(selection) {
|
||||||
|
this.checkedFollowUp = selection.map(item => item.index)
|
||||||
|
},
|
||||||
|
handleDrawerClose(done){
|
||||||
|
this.getList()
|
||||||
|
this.drawer = false;
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/customer/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `customer_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
|
.specialColor{
|
||||||
|
color:red;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
margin: 0px auto 30px auto;
|
||||||
|
text-align: center;
|
||||||
|
color: #707070;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-form {
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #ffffff;
|
||||||
|
width: 400px;
|
||||||
|
padding: 25px 25px 5px 25px;
|
||||||
|
.el-input {
|
||||||
|
height: 38px;
|
||||||
|
input {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.input-icon {
|
||||||
|
height: 39px;
|
||||||
|
width: 14px;
|
||||||
|
margin-left: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.login-tip {
|
||||||
|
font-size: 13px;
|
||||||
|
text-align: center;
|
||||||
|
color: #bfbfbf;
|
||||||
|
}
|
||||||
|
.login-code {
|
||||||
|
width: 33%;
|
||||||
|
height: 38px;
|
||||||
|
float: right;
|
||||||
|
img {
|
||||||
|
cursor: pointer;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-login-footer {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
font-family: Arial;
|
||||||
|
font-size: 12px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
.login-code-img {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
<el-table
|
<el-table
|
||||||
max-height="800"
|
max-height="800"
|
||||||
v-loading="loading" :data="competitionOfTeamList" @selection-change="handleSelectionChange">
|
v-loading="loading" :data="competitionOfTeamList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column label="球队ID" align="center" prop="teamId" />
|
<el-table-column label="球队ID" align="center" prop="teamId" width="80"/>
|
||||||
<el-table-column label="球队logo" align="center" prop="avatar" >
|
<el-table-column label="球队logo" align="center" prop="avatar" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-avatar :src="scope.row.teamLogo"></el-avatar>
|
<el-avatar :src="scope.row.teamLogo"></el-avatar>
|
||||||
|
|
@ -76,8 +76,9 @@
|
||||||
<el-tag v-if="scope.row.status===-1" style="color: #bfc2c5">已驳回</el-tag>
|
<el-tag v-if="scope.row.status===-1" style="color: #bfc2c5">已驳回</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="联系人" align="center" prop="contacts" />
|
<el-table-column label="队长" align="center" prop="captain" />
|
||||||
<el-table-column label="联系人电话" align="center" prop="contactsTel" />
|
<el-table-column label="领队人" align="center" prop="contacts" />
|
||||||
|
<el-table-column label="领队人电话" align="center" prop="contactsTel" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-popconfirm v-if="competitionObj.status===0" @confirm="bindConfirm(scope.row.id,1)"
|
<el-popconfirm v-if="competitionObj.status===0" @confirm="bindConfirm(scope.row.id,1)"
|
||||||
|
|
@ -203,26 +204,42 @@
|
||||||
border
|
border
|
||||||
max-height="800"
|
max-height="800"
|
||||||
style=" margin-top: 20px">
|
style=" margin-top: 20px">
|
||||||
<el-table-column label="比赛日期" align="center" prop="competitionDate" width="180"/>
|
<el-table-column label="比赛日期" align="center" prop="competitionDate" width="180">
|
||||||
<el-table-column label="比赛时间" align="center" prop="competitionTime" width="180">
|
<template slot-scope="scope">
|
||||||
|
<el-tag type="danger" style="font-weight: bold;font-size: larger" >{{ scope.row.competitionDate }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比赛时间" align="center" prop="competitionTime" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag type="danger" style="font-weight: bold;font-size: larger" >{{ parseTime(scope.row.competitionTime, '{h}:{i}') }}</el-tag>
|
<el-tag type="danger" style="font-weight: bold;font-size: larger" >{{ parseTime(scope.row.competitionTime, '{h}:{i}') }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="比赛类型" align="center" prop="vsType" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag type="success" v-if="scope.row.vsType == 0" style="font-weight: bold;font-size: smaller" >循环赛</el-tag>
|
||||||
|
<el-tag type="success" v-if="scope.row.vsType == 1" style="font-weight: bold;font-size: smaller" >淘汰赛</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="比赛状态" align="center" prop="status" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag>
|
||||||
|
<dict-tag :options="dict.type.vs_status" :value="scope.row.status"/>
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="主队名" align="center" prop="mainTeamName" />
|
<el-table-column label="主队名" align="center" prop="mainTeamName" />
|
||||||
<el-table-column label="主队得分" align="center" prop="mainTeamScore" >
|
<el-table-column label="主队得分" align="center" prop="mainTeamScore" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag type="success" style="font-weight: bold;font-size: larger" >{{ scope.row.mainTeamScore }}</el-tag>
|
<el-tag type="success" style="font-weight: bold;font-size: larger" >{{ scope.row.mainTeamScore }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="客队得分" align="center" prop="guestTeamScore" >
|
<el-table-column label="客队得分" align="center" prop="guestTeamScore" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag type="success" style="font-weight: bold;font-size: larger" >{{ scope.row.guestTeamScore }}</el-tag>
|
<el-tag type="success" style="font-weight: bold;font-size: larger" >{{ scope.row.guestTeamScore }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="客队名" align="center" prop="guestTeamName" />
|
<el-table-column label="客队名" align="center" prop="guestTeamName" />
|
||||||
<el-table-column label="球场名称" align="center" prop="buildingName" />
|
<el-table-column label="球场名称" align="center" prop="buildingName" width="250"/>
|
||||||
<el-table-column label="比赛类型" align="center" prop="vsType" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -233,7 +250,6 @@
|
||||||
v-hasPermi="['system:competitionOfTeam:edit']"
|
v-hasPermi="['system:competitionOfTeam:edit']"
|
||||||
>比赛记录</el-button>
|
>比赛记录</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="new Date(scope.row.competitionDate).getTime() > new Date().getTime()"
|
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
|
|
@ -349,7 +365,7 @@
|
||||||
<el-table-column label="真实姓名" align="center" prop="realName" />
|
<el-table-column label="真实姓名" align="center" prop="realName" />
|
||||||
<el-table-column label="球衣号" align="center" prop="jerseyNumber" />
|
<el-table-column label="球衣号" align="center" prop="jerseyNumber" />
|
||||||
<el-table-column label="证件类型" align="center" prop="idType" />
|
<el-table-column label="证件类型" align="center" prop="idType" />
|
||||||
<el-table-column label="证件号码" align="center" prop="idCardNo" />
|
<el-table-column label="证件号码" align="center" prop="idCardNo" width="180"/>
|
||||||
<el-table-column label="联系电话" align="center" prop="contactsTel" />
|
<el-table-column label="联系电话" align="center" prop="contactsTel" />
|
||||||
<!-- <el-table-column label="申请时间" align="center" prop="createdTime" width="180">
|
<!-- <el-table-column label="申请时间" align="center" prop="createdTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -438,10 +454,20 @@
|
||||||
placeholder="请选择比赛时间">
|
placeholder="请选择比赛时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛状态" prop="status">
|
||||||
|
<el-select v-model="vsform.status" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in vsStatus"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="比赛类型" prop="vsType">
|
<el-form-item label="比赛类型" prop="vsType">
|
||||||
<el-radio-group v-model="vsform.vsType">
|
<el-radio-group v-model="vsform.vsType">
|
||||||
<el-radio label="循环赛"></el-radio>
|
<el-radio label="0">循环赛</el-radio>
|
||||||
<el-radio label="淘汰赛"></el-radio>
|
<el-radio label="1">淘汰赛</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="主队名" prop="mainTeamName">
|
<el-form-item label="主队名" prop="mainTeamName">
|
||||||
|
|
@ -635,7 +661,7 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</el-skeleton>
|
</el-skeleton>
|
||||||
<el-dialog :close-on-click-modal="false" width="25%" title="球员得分记录" :visible.sync="innerMemberVisible" append-to-body>
|
<el-dialog :close-on-click-modal="false" width="35%" title="球员得分记录" :visible.sync="innerMemberVisible" append-to-body>
|
||||||
<el-form ref="scoreform" :model="scoreform" :rules="scoreformRules" size="mini" label-width="80px">
|
<el-form ref="scoreform" :model="scoreform" :rules="scoreformRules" size="mini" label-width="80px">
|
||||||
<el-form-item label="球队名" prop="teamName">
|
<el-form-item label="球队名" prop="teamName">
|
||||||
<el-input v-model="scoreform.teamName" :disabled="true" />
|
<el-input v-model="scoreform.teamName" :disabled="true" />
|
||||||
|
|
@ -711,7 +737,7 @@ import {getWxApplesAccessToken, genWxApplesAqrCode} from "@/api/system/wxApplesC
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CompetitionSet",
|
name: "CompetitionSet",
|
||||||
dicts: ['competition_status'],
|
dicts: ['competition_status','vs_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
spreadImgurl:null,
|
spreadImgurl:null,
|
||||||
|
|
@ -773,6 +799,13 @@ export default {
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
groupNumbers:[],
|
groupNumbers:[],
|
||||||
|
//赛程状态:-1=已取消; 0=报名中,1=比赛中;2=已结束
|
||||||
|
vsStatus:[
|
||||||
|
{label:"已取消",value:-1},
|
||||||
|
{label:"报名中",value:0},
|
||||||
|
{label:"比赛中",value:1},
|
||||||
|
{label:"已结束",value:2}
|
||||||
|
],
|
||||||
addGroupCode:"",
|
addGroupCode:"",
|
||||||
addGroupDialogVisible:false,
|
addGroupDialogVisible:false,
|
||||||
addTeamDialogVisible:false,
|
addTeamDialogVisible:false,
|
||||||
|
|
@ -781,6 +814,9 @@ export default {
|
||||||
vsform:{},
|
vsform:{},
|
||||||
vsTitle:"",
|
vsTitle:"",
|
||||||
vsRules: {
|
vsRules: {
|
||||||
|
status: [
|
||||||
|
{ required: true, message: "比赛状态不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
competitionTime: [
|
competitionTime: [
|
||||||
{ required: true, message: "比赛时间不能为空", trigger: "blur" }
|
{ required: true, message: "比赛时间不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
|
@ -859,6 +895,14 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// methods中
|
||||||
|
getFormatterName(row) {
|
||||||
|
for (let i in this.vsStatus) {
|
||||||
|
if (this.vsStatus[i].value == row.status) {
|
||||||
|
return this.vsStatus[i].label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
//点击新增分组按钮
|
//点击新增分组按钮
|
||||||
handleAddGroup(){
|
handleAddGroup(){
|
||||||
//循环获取0-25的组的数据值
|
//循环获取0-25的组的数据值
|
||||||
|
|
@ -994,7 +1038,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleTeamUser(row){
|
handleTeamUser(row){
|
||||||
this.drawer = true
|
this.drawer = true
|
||||||
listCompetitionMembers({"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id,"competitionTeamId":row.teamId}).then(response => {
|
listCompetitionMembers({"pageNum": 1, "pageSize": 1000,"competitionId":this.competitionObj.id,"competitionOfTeamId":row.id}).then(response => {
|
||||||
this.competitionMembersList = response.rows;
|
this.competitionMembersList = response.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,16 @@
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="客户状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择客户状态" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="客户级别" prop="userType">
|
<el-form-item label="客户级别" prop="userType">
|
||||||
<el-select v-model="queryParams.userType" placeholder="请选择客户级别" clearable>
|
<el-select v-model="queryParams.userType" placeholder="请选择客户级别" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -48,7 +58,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="到店状态" prop="status">
|
<el-form-item label="到店状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择到店状态" clearable>
|
<el-select v-model="queryParams.storeStatus" placeholder="请选择到店状态" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.to_store_status"
|
v-for="dict in dict.type.to_store_status"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
|
|
@ -144,6 +154,11 @@
|
||||||
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="客户姓名" align="center" prop="userName" width="120" v-if="columns[1].visible" show-overflow-tooltip />
|
<el-table-column label="客户姓名" align="center" prop="userName" width="120" v-if="columns[1].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="客户状态" align="center" prop="status" width="120" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.customer_status" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="客户级别" align="center" prop="userType" v-if="columns[3].visible" show-overflow-tooltip >
|
<el-table-column label="客户级别" align="center" prop="userType" v-if="columns[3].visible" show-overflow-tooltip >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.customer_level" :value="scope.row.userType"/>
|
<dict-tag :options="dict.type.customer_level" :value="scope.row.userType"/>
|
||||||
|
|
@ -163,7 +178,7 @@
|
||||||
<el-table-column label="客户居住" align="center" prop="liveAddress" width="100" v-if="columns[10].visible" show-overflow-tooltip />
|
<el-table-column label="客户居住" align="center" prop="liveAddress" width="100" v-if="columns[10].visible" show-overflow-tooltip />
|
||||||
<el-table-column label="到店状态" align="center" prop="status" width="100" v-if="columns[11].visible" show-overflow-tooltip >
|
<el-table-column label="到店状态" align="center" prop="status" width="100" v-if="columns[11].visible" show-overflow-tooltip >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.to_store_status" :value="scope.row.status"/>
|
<dict-tag :options="dict.type.to_store_status" :value="scope.row.storeStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="微信号" align="center" prop="wechat" width="110" v-if="columns[20].visible" show-overflow-tooltip />
|
<el-table-column label="微信号" align="center" prop="wechat" width="110" v-if="columns[20].visible" show-overflow-tooltip />
|
||||||
|
|
@ -246,6 +261,16 @@
|
||||||
<el-form-item label="客户姓名" prop="userName">
|
<el-form-item label="客户姓名" prop="userName">
|
||||||
<el-input v-model="form.userName" placeholder="请输入客户姓名" />
|
<el-input v-model="form.userName" placeholder="请输入客户姓名" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="客户状态" prop="status">
|
||||||
|
<el-select v-model="form.status" placeholder="请选择客户状态">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="客户性别" prop="sex">
|
<el-form-item label="客户性别" prop="sex">
|
||||||
<el-select v-model="form.sex" placeholder="请选择客户性别">
|
<el-select v-model="form.sex" placeholder="请选择客户性别">
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -300,7 +325,7 @@
|
||||||
<el-input v-model="form.liveAddress" placeholder="请输入客户居住" />
|
<el-input v-model="form.liveAddress" placeholder="请输入客户居住" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="到店状态" prop="status">
|
<el-form-item label="到店状态" prop="status">
|
||||||
<el-select v-model="form.status" placeholder="请选择到店状态">
|
<el-select v-model="form.storeStatus" placeholder="请选择到店状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.to_store_status"
|
v-for="dict in dict.type.to_store_status"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
|
|
@ -350,47 +375,6 @@
|
||||||
<el-form-item label="未订车原因" prop="unBookingCarReason">
|
<el-form-item label="未订车原因" prop="unBookingCarReason">
|
||||||
<el-input v-model="form.unBookingCarReason" type="textarea" placeholder="请输入内容" />
|
<el-input v-model="form.unBookingCarReason" type="textarea" placeholder="请输入内容" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--
|
|
||||||
<el-divider content-position="center">跟进模块-客户跟进记录信息</el-divider>
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddFollowUp">添加</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteFollowUp">删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-table style="width: 100%" :data="followUpList" :row-class-name="rowFollowUpIndex" @selection-change="handleFollowUpSelectionChange" ref="followUp">
|
|
||||||
<el-table-column type="selection" width="50" align="center" />
|
|
||||||
<el-table-column label="序号" align="center" prop="index" width="80"/>
|
|
||||||
<el-table-column label="跟进日期" prop="followUpDate" width="130">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-date-picker clearable v-model="scope.row.followUpDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择跟进日期" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="再次预约到店日期" prop="preToStoreDate" width="130">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-date-picker clearable v-model="scope.row.preToStoreDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择再次预约到店日期" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="级别" prop="followLevel" width="120">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-select v-model="scope.row.followLevel" placeholder="请选择级别" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.customer_level"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="跟进记录" prop="followUpRecord" >
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-model="scope.row.followUpRecord" placeholder="请输入级别" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>-->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
|
@ -408,14 +392,23 @@
|
||||||
</div>
|
</div>
|
||||||
<el-timeline :reverse="reverse">
|
<el-timeline :reverse="reverse">
|
||||||
<el-timeline-item placement="top" v-for="(follow, index) in followUpList" :key="index" :timestamp="follow.followUpDate">
|
<el-timeline-item placement="top" v-for="(follow, index) in followUpList" :key="index" :timestamp="follow.followUpDate">
|
||||||
<el-card>
|
<el-card shadow="hover">
|
||||||
<p><el-tag>级别:</el-tag> {{follow.followLevel}} </p>
|
<p><el-tag>跟进方式:</el-tag>
|
||||||
|
<el-select v-model="follow.followUpMethod" disabled>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.follow_up_method"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</p>
|
||||||
|
<p><el-tag>级别:</el-tag> {{follow.followLevel}} </p>
|
||||||
<h4><el-tag>记录:</el-tag> {{follow.followUpRecord}}</h4>
|
<h4><el-tag>记录:</el-tag> {{follow.followUpRecord}}</h4>
|
||||||
<p> <el-tag>再次预约到店日期:</el-tag> {{follow.preToStoreDate}} </p>
|
<p> <el-tag>再次预约到店日期:</el-tag> {{follow.preToStoreDate}} </p>
|
||||||
<p>提交于 {{follow.createTime}}</p>
|
<p>提交于 {{follow.createTime}}</p>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
|
|
||||||
</el-timeline>
|
</el-timeline>
|
||||||
<el-drawer title="新增跟进日志" :append-to-body="true" :visible.sync="innerDrawer">
|
<el-drawer title="新增跟进日志" :append-to-body="true" :visible.sync="innerDrawer">
|
||||||
<el-form ref="followForm" :model="followForm" :rules="followRules" label-width="140px">
|
<el-form ref="followForm" :model="followForm" :rules="followRules" label-width="140px">
|
||||||
|
|
@ -427,6 +420,16 @@
|
||||||
placeholder="请选择跟进日期">
|
placeholder="请选择跟进日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="跟进方式" prop="followUpMethod">
|
||||||
|
<el-select v-model="followForm.followUpMethod" placeholder="请选择跟进方式" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.follow_up_method"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="跟进记录" prop="followUpRecord">
|
<el-form-item label="跟进记录" prop="followUpRecord">
|
||||||
<el-input v-model="followForm.followUpRecord" type="textarea" placeholder="请输入内容" />
|
<el-input v-model="followForm.followUpRecord" type="textarea" placeholder="请输入内容" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -475,7 +478,7 @@ import Data from "@/views/system/dict/data";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Customer",
|
name: "Customer",
|
||||||
dicts: ['to_store_status', 'customer_source', 'sys_user_sex', 'customer_level', 'clue_channels'],
|
dicts: ['to_store_status', 'customer_source','customer_status', 'sys_user_sex', 'customer_level', 'clue_channels','follow_result','follow_up_method'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
drawer:false,
|
drawer:false,
|
||||||
|
|
@ -522,7 +525,9 @@ export default {
|
||||||
orderDate: null
|
orderDate: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
|
||||||
|
},
|
||||||
followForm:{
|
followForm:{
|
||||||
followUpDate:null,
|
followUpDate:null,
|
||||||
customerId:null,
|
customerId:null,
|
||||||
|
|
@ -556,6 +561,12 @@ export default {
|
||||||
followLevel: [
|
followLevel: [
|
||||||
{ required: true, message: "级别不能为空", trigger: "blur" }
|
{ required: true, message: "级别不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
followUpMethod:[
|
||||||
|
{ required: true, message: "跟进方式不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followResult:[
|
||||||
|
{ required: true, message: "跟进结果不能为空", trigger: "blur" }
|
||||||
|
]
|
||||||
},
|
},
|
||||||
// 列表的列的显示隐藏设置
|
// 列表的列的显示隐藏设置
|
||||||
columns:[
|
columns:[
|
||||||
|
|
@ -598,6 +609,7 @@ export default {
|
||||||
{ key: 36, label: `最新跟进级别`, visible: true },
|
{ key: 36, label: `最新跟进级别`, visible: true },
|
||||||
{ key: 37, label: `建议下次跟进日`, visible: true },
|
{ key: 37, label: `建议下次跟进日`, visible: true },
|
||||||
{ key: 38, label: `跟进超期`, visible: true },
|
{ key: 38, label: `跟进超期`, visible: true },
|
||||||
|
{ key: 39, label: `客户状态`, visible: true },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -623,7 +635,9 @@ export default {
|
||||||
getFollowList(customerId) {
|
getFollowList(customerId) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let queryParams = {
|
let queryParams = {
|
||||||
customerId:customerId
|
customerId:customerId,
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:1000,
|
||||||
}
|
}
|
||||||
listCustomerFollow(queryParams).then(response => {
|
listCustomerFollow(queryParams).then(response => {
|
||||||
this.followUpList = response.rows;
|
this.followUpList = response.rows;
|
||||||
|
|
@ -696,6 +710,7 @@ export default {
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
this.form.status = 'potential';
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加客户信息";
|
this.title = "添加客户信息";
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,878 @@
|
||||||
|
<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="客户名" prop="userName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.userName"
|
||||||
|
placeholder="请输入客户名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="客户级别" prop="userType">
|
||||||
|
<el-select v-model="queryParams.userType" placeholder="请选择客户级别" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_level"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="手机号码" prop="phoneNumber">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.phoneNumber"
|
||||||
|
placeholder="请输入手机号码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="线索渠道" prop="clueChannel">
|
||||||
|
<el-select v-model="queryParams.clueChannel" placeholder="请选择线索渠道" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.clue_channels"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="信息来源" prop="dataSource">
|
||||||
|
<el-select v-model="queryParams.dataSource" placeholder="请选择信息来源" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_source"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="到店状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.storeStatus" placeholder="请选择到店状态" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.to_store_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="微信号" prop="wechat">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.wechat"
|
||||||
|
placeholder="请输入微信号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="意向车型" prop="intentionCarModels">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.intentionCarModels"
|
||||||
|
placeholder="请输入意向车型"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.preToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择预计到店">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="下单日期" prop="orderDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.orderDate"
|
||||||
|
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="['system:customer: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="['system:customer: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="['system:customer: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="['system:customer:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns" :pageName="$options.name" ></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="客户姓名" align="center" prop="userName" width="120" v-if="columns[1].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="客户级别" align="center" prop="userType" v-if="columns[3].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.customer_level" :value="scope.row.userType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="手机号码" align="center" prop="phoneNumber" width="110" v-if="columns[5].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="线索渠道" align="center" prop="clueChannel" v-if="columns[8].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.clue_channels" :value="scope.row.clueChannel"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="信息来源" align="center" prop="dataSource" v-if="columns[9].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.customer_source" :value="scope.row.dataSource"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="客户居住" align="center" prop="liveAddress" width="100" v-if="columns[10].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="到店状态" align="center" prop="status" width="100" v-if="columns[11].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.to_store_status" :value="scope.row.storeStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="微信号" align="center" prop="wechat" width="110" v-if="columns[20].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="下单日期" align="center" prop="orderDate" width="120" v-if="columns[33].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.orderDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column label="是否评估" align="center" prop="isAssessment" />-->
|
||||||
|
<el-table-column label="意向车型" align="center" prop="intentionCarModels" width="120" v-if="columns[24].visible" show-overflow-tooltip />
|
||||||
|
<!-- <el-table-column label="对比车型" align="center" prop="contrastCarModels" />
|
||||||
|
<el-table-column label="是否试驾" align="center" prop="isTestDrive" />
|
||||||
|
<el-table-column label="是否报价" align="center" prop="isOffer" />
|
||||||
|
<el-table-column label="是否金融" align="center" prop="isFinance" />-->
|
||||||
|
<!-- <el-table-column label="最后到店" align="center" prop="lastToStoreDate" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.lastToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>-->
|
||||||
|
<el-table-column label="已有车辆" align="center" prop="existModels" v-if="columns[22].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="预计到店" class-name="specialColor" align="center" prop="preToStoreDate" width="120" v-if="columns[30].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.preToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="跟进次数" class-name="specialColor" align="center" prop="followUpTimes" v-if="columns[34].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="最新跟进日" class-name="specialColor" align="center" prop="followUpLastDate" width="100" v-if="columns[35].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="最新跟进级别" class-name="specialColor" align="center" prop="followUpLastLevel" width="100" v-if="columns[36].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="建议下次跟进日" class-name="specialColor" align="center" prop="proposalNextFollowDate" width="120" v-if="columns[37].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="跟进超期" class-name="specialColor" align="center" prop="followUpOverdueDate" width="120" v-if="columns[38].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="未订车原因" align="center" prop="unBookingCarReason" width="110" show-overflow-tooltip v-if="columns[29].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip v-if="columns[19].visible" />
|
||||||
|
|
||||||
|
<el-table-column label="操作" width="160" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleFollow(scope.row)"
|
||||||
|
v-hasPermi="['system:customer:edit']"
|
||||||
|
>跟进</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:customer:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:customer: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="60%" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :inline="true" :rules="rules" label-width="110px">
|
||||||
|
<el-form-item label="下单日期" prop="orderDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.orderDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择下单日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户姓名" prop="userName">
|
||||||
|
<el-input v-model="form.userName" placeholder="请输入客户姓名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户状态" prop="status">
|
||||||
|
<el-select v-model="form.status" placeholder="请选择客户状态">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户性别" prop="sex">
|
||||||
|
<el-select v-model="form.sex" placeholder="请选择客户性别">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_user_sex"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户手机" prop="phoneNumber">
|
||||||
|
<el-input v-model="form.phoneNumber" placeholder="请输入客户手机号码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户微信" prop="wechat">
|
||||||
|
<el-input v-model="form.wechat" placeholder="请输入客户微信" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户级别" prop="userType">
|
||||||
|
<el-select v-model="form.userType" placeholder="请选择客户级别">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_level"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户邮箱" prop="email">
|
||||||
|
<el-input v-model="form.email" placeholder="请输入用户邮箱" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="线索渠道" prop="clueChannel">
|
||||||
|
<el-select v-model="form.clueChannel" placeholder="请选择线索渠道">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.clue_channels"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="信息来源" prop="dataSource">
|
||||||
|
<el-select v-model="form.dataSource" placeholder="请选择信息来源">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_source"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户居住" prop="liveAddress">
|
||||||
|
<el-input v-model="form.liveAddress" placeholder="请输入客户居住" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="到店状态" prop="status">
|
||||||
|
<el-select v-model="form.storeStatus" placeholder="请选择到店状态">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.to_store_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="已有车型" prop="existModels">
|
||||||
|
<el-input v-model="form.existModels" placeholder="请输入已有车型" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="意向车型" prop="intentionCarModels">
|
||||||
|
<el-input v-model="form.intentionCarModels" placeholder="请输入意向车型" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="是否试驾" prop="isTestDrive">
|
||||||
|
<el-input v-model="form.isTestDrive" placeholder="请输入是否试驾" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否报价" prop="isOffer">
|
||||||
|
<el-input v-model="form.isOffer" placeholder="请输入是否报价" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否金融" prop="isFinance">
|
||||||
|
<el-input v-model="form.isFinance" placeholder="请输入是否金融" />
|
||||||
|
</el-form-item>
|
||||||
|
-->
|
||||||
|
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.preToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择预计到店">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="最后到店" prop="lastToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.lastToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择最后到店">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>-->
|
||||||
|
<el-form-item label="4S店" prop="storeName">
|
||||||
|
<el-input v-model="form.storeName" placeholder="请输入4S店" />
|
||||||
|
</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="unBookingCarReason">
|
||||||
|
<el-input v-model="form.unBookingCarReason" type="textarea" placeholder="请输入内容" />
|
||||||
|
</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>
|
||||||
|
<!-- 添加客户跟进记录Drawer 抽屉 -->
|
||||||
|
<el-drawer :title="followTitle" :before-close="handleDrawerClose" :visible.sync="drawer" size="50%">
|
||||||
|
<div style="position: fixed;top: 40px;left: 65%;z-index: 100;font-size: smaller">
|
||||||
|
<el-radio-group v-model="reverse">
|
||||||
|
<el-radio :label="true">倒序</el-radio>
|
||||||
|
<el-radio :label="false">正序</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<el-button size="mini" type="primary" icon="el-icon-edit" style="position: relative;left: 100px" @click="handleDrawerAddFollowUp" >新增</el-button>
|
||||||
|
</div>
|
||||||
|
<el-timeline :reverse="reverse">
|
||||||
|
<el-timeline-item placement="top" v-for="(follow, index) in followUpList" :key="index" :timestamp="follow.followUpDate">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<p><el-tag>跟进方式:</el-tag>
|
||||||
|
<el-select v-model="follow.followUpMethod" disabled>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.follow_up_method"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</p>
|
||||||
|
<p><el-tag>级别:</el-tag> {{follow.followLevel}} </p>
|
||||||
|
<h4><el-tag>记录:</el-tag> {{follow.followUpRecord}}</h4>
|
||||||
|
<p> <el-tag>再次预约到店日期:</el-tag> {{follow.preToStoreDate}} </p>
|
||||||
|
<p>提交于 {{follow.createTime}}</p>
|
||||||
|
</el-card>
|
||||||
|
</el-timeline-item>
|
||||||
|
</el-timeline>
|
||||||
|
<el-drawer title="新增跟进日志" :append-to-body="true" :visible.sync="innerDrawer">
|
||||||
|
<el-form ref="followForm" :model="followForm" :rules="followRules" label-width="140px">
|
||||||
|
<el-form-item label="跟进日期" prop="followUpDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="followForm.followUpDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择跟进日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="跟进方式" prop="followUpMethod">
|
||||||
|
<el-select v-model="followForm.followUpMethod" placeholder="请选择跟进方式" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.follow_up_method"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="跟进记录" prop="followUpRecord">
|
||||||
|
<el-input v-model="followForm.followUpRecord" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="级别" prop="followLevel">
|
||||||
|
<el-select v-model="followForm.followLevel" placeholder="请选择级别" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_level"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="再次预约到店日期" prop="preToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="followForm.preToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择再次预约到店日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="followForm.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: center">
|
||||||
|
<el-button type="primary" @click="submitFollowForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
|
</el-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listCustomer,
|
||||||
|
getCustomer,
|
||||||
|
delCustomer,
|
||||||
|
addCustomer,
|
||||||
|
updateCustomer,
|
||||||
|
addCustomerFollowRecerd, updateCustomerFollowRecerd, listCustomerFollow
|
||||||
|
} from "@/api/system/customer";
|
||||||
|
import Data from "@/views/system/dict/data";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "orderCustomer",
|
||||||
|
dicts: ['to_store_status', 'customer_source','customer_status', 'sys_user_sex', 'customer_level', 'clue_channels','follow_result','follow_up_method'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
drawer:false,
|
||||||
|
reverse: true,
|
||||||
|
innerDrawer:false,
|
||||||
|
dafaultValue:null,
|
||||||
|
customerId:null,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
followTitle:null,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 子表选中数据
|
||||||
|
checkedFollowUp: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 客户信息表格数据
|
||||||
|
customerList: [],
|
||||||
|
// 跟进模块-客户跟进记录表格数据
|
||||||
|
followUpList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
userName: null,
|
||||||
|
userType: null,
|
||||||
|
phoneNumber: null,
|
||||||
|
clueChannel: null,
|
||||||
|
dataSource: null,
|
||||||
|
status: null,
|
||||||
|
wechat: null,
|
||||||
|
intentionCarModels: null,
|
||||||
|
preToStoreDate: null,
|
||||||
|
orderDate: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {
|
||||||
|
|
||||||
|
},
|
||||||
|
followForm:{
|
||||||
|
followUpDate:null,
|
||||||
|
customerId:null,
|
||||||
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
userName: [
|
||||||
|
{ required: true, message: "客户名不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
orderDate:[
|
||||||
|
{ required: true, message: "下单日期不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
phoneNumber: [
|
||||||
|
{ required: true, message: "手机号码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
dataSource: [
|
||||||
|
{ required: true, message: "信息来源不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
intentionCarModels: [
|
||||||
|
{ required: true, message: "意向车型不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// 跟进表单校验
|
||||||
|
followRules: {
|
||||||
|
followUpDate: [
|
||||||
|
{ required: true, message: "跟进日期不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followUpRecord:[
|
||||||
|
{ required: true, message: "跟进记录不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followLevel: [
|
||||||
|
{ required: true, message: "级别不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followUpMethod:[
|
||||||
|
{ required: true, message: "跟进方式不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followResult:[
|
||||||
|
{ required: true, message: "跟进结果不能为空", trigger: "blur" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 列表的列的显示隐藏设置
|
||||||
|
columns:[
|
||||||
|
{ key: 0, label: `客户ID`, visible: true },
|
||||||
|
{ key: 1, label: `客户名`, visible: true },
|
||||||
|
{ key: 2, label: `客户昵称`, visible: true },
|
||||||
|
{ key: 3, label: `客户级别`, visible: true },
|
||||||
|
{ key: 4, label: `用户邮箱`, visible: true },
|
||||||
|
{ key: 5, label: `手机号码`, visible: true },
|
||||||
|
{ key: 6, label: `客户性别`, visible: true },
|
||||||
|
{ key: 7, label: `头像地址`, visible: true },
|
||||||
|
{ key: 8, label: `线索渠道`, visible: true },
|
||||||
|
{ key: 9, label: `信息来源`, visible: true },
|
||||||
|
{ key: 10, label: `客户居住`, visible: true },
|
||||||
|
{ key: 11, label: `到店状态`, visible: true },
|
||||||
|
{ key: 12, label: `删除标志`, visible: true },
|
||||||
|
{ key: 13, label: `最后登录IP`, visible: true },
|
||||||
|
{ key: 14, label: `最后登录时间`, visible: true },
|
||||||
|
{ key: 15, label: `创建者`, visible: true },
|
||||||
|
{ key: 16, label: `创建时间`, visible: true },
|
||||||
|
{ key: 17, label: `更新者`, visible: true },
|
||||||
|
{ key: 18, label: `更新时间`, visible: true },
|
||||||
|
{ key: 19, label: `备注`, visible: true },
|
||||||
|
{ key: 20, label: `微信号`, visible: true },
|
||||||
|
{ key: 21, label: `购车类型`, visible: true },
|
||||||
|
{ key: 22, label: `已有车辆`, visible: true },
|
||||||
|
{ key: 23, label: `是否评估`, visible: true },
|
||||||
|
{ key: 24, label: `意向车型`, visible: true },
|
||||||
|
{ key: 25, label: `对比车型`, visible: true },
|
||||||
|
{ key: 26, label: `是否试驾`, visible: true },
|
||||||
|
{ key: 27, label: `是否报价`, visible: true },
|
||||||
|
{ key: 28, label: `是否金融`, visible: true },
|
||||||
|
{ key: 29, label: `未订车原因`, visible: true },
|
||||||
|
{ key: 30, label: `预计到店`, visible: true },
|
||||||
|
{ key: 31, label: `最后到店`, visible: true },
|
||||||
|
{ key: 32, label: `4S店`, visible: true },
|
||||||
|
{ key: 33, label: `下单日期`, visible: true },
|
||||||
|
{ key: 34, label: `跟进次数`, visible: true },
|
||||||
|
{ key: 35, label: `最新跟进日`, visible: true },
|
||||||
|
{ key: 36, label: `最新跟进级别`, visible: true },
|
||||||
|
{ key: 37, label: `建议下次跟进日`, visible: true },
|
||||||
|
{ key: 38, label: `跟进超期`, visible: true },
|
||||||
|
{ key: 39, label: `客户状态`, visible: true },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.dafaultValue = new Date;
|
||||||
|
var columns1 = JSON.parse(localStorage.getItem(this.$options.name));
|
||||||
|
if(columns1){
|
||||||
|
this.columns = columns1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询客户信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.status = 'order';
|
||||||
|
listCustomer(this.queryParams).then(response => {
|
||||||
|
this.customerList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询客户跟进信息列表 */
|
||||||
|
getFollowList(customerId) {
|
||||||
|
this.loading = true;
|
||||||
|
let queryParams = {
|
||||||
|
customerId:customerId,
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:1000,
|
||||||
|
}
|
||||||
|
listCustomerFollow(queryParams).then(response => {
|
||||||
|
this.followUpList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
userName: null,
|
||||||
|
nickName: null,
|
||||||
|
userType: null,
|
||||||
|
email: null,
|
||||||
|
phoneNumber: null,
|
||||||
|
sex: null,
|
||||||
|
avatar: null,
|
||||||
|
clueChannel: null,
|
||||||
|
dataSource: null,
|
||||||
|
liveAddress: null,
|
||||||
|
status: null,
|
||||||
|
delFlag: null,
|
||||||
|
loginIp: null,
|
||||||
|
loginDate: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
remark: null,
|
||||||
|
wechat: null,
|
||||||
|
buyCarType: null,
|
||||||
|
existModels: null,
|
||||||
|
isAssessment: 0,
|
||||||
|
intentionCarModels: null,
|
||||||
|
contrastCarModels: null,
|
||||||
|
isTestDrive: null,
|
||||||
|
isOffer: null,
|
||||||
|
isFinance: null,
|
||||||
|
unBookingCarReason: null,
|
||||||
|
preToStoreDate: null,
|
||||||
|
lastToStoreDate: null,
|
||||||
|
storeName: null,
|
||||||
|
orderDate: null
|
||||||
|
};
|
||||||
|
this.followUpList = [];
|
||||||
|
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.form.status = 'potential';
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加客户信息";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getCustomer(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.followUpList = response.data.followUpList;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改客户信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**跟进按钮**/
|
||||||
|
handleFollow(row){
|
||||||
|
this.drawer = true;
|
||||||
|
this.customerId = row.id;
|
||||||
|
this.followTitle = row.userName + " 跟进记录";
|
||||||
|
this.getFollowList(this.customerId);
|
||||||
|
},
|
||||||
|
handleDrawerAddFollowUp(){
|
||||||
|
this.innerDrawer = true;
|
||||||
|
this.followForm = {};
|
||||||
|
this.followForm.followUpDate = new Date();
|
||||||
|
this.followForm.customerId = this.customerId;
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.form.followUpList = this.followUpList;
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateCustomer(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCustomer(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submitFollowForm(){
|
||||||
|
this.$refs["followForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateCustomerFollowRecerd(this.followForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getFollowList(this.customerId);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCustomerFollowRecerd(this.followForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getFollowList(this.customerId);
|
||||||
|
this.innerDrawer = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除客户信息编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delCustomer(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 跟进模块-客户跟进记录序号 */
|
||||||
|
rowFollowUpIndex({ row, rowIndex }) {
|
||||||
|
row.index = rowIndex + 1;
|
||||||
|
},
|
||||||
|
/** 跟进模块-客户跟进记录添加按钮操作 */
|
||||||
|
handleAddFollowUp() {
|
||||||
|
let obj = {};
|
||||||
|
obj.followUpDate = "";
|
||||||
|
obj.followUpRecord = "";
|
||||||
|
obj.preToStoreDate = "";
|
||||||
|
obj.remark = "";
|
||||||
|
obj.followLevel = "";
|
||||||
|
this.followUpList.push(obj);
|
||||||
|
},
|
||||||
|
/** 跟进模块-客户跟进记录删除按钮操作 */
|
||||||
|
handleDeleteFollowUp() {
|
||||||
|
if (this.checkedFollowUp.length == 0) {
|
||||||
|
this.$modal.msgError("请先选择要删除的跟进模块-客户跟进记录数据");
|
||||||
|
} else {
|
||||||
|
const followUpList = this.followUpList;
|
||||||
|
const checkedFollowUp = this.checkedFollowUp;
|
||||||
|
this.followUpList = followUpList.filter(function(item) {
|
||||||
|
return checkedFollowUp.indexOf(item.index) == -1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 复选框选中数据 */
|
||||||
|
handleFollowUpSelectionChange(selection) {
|
||||||
|
this.checkedFollowUp = selection.map(item => item.index)
|
||||||
|
},
|
||||||
|
handleDrawerClose(done){
|
||||||
|
this.getList()
|
||||||
|
this.drawer = false;
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/customer/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `customer_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
|
.specialColor{
|
||||||
|
color:red;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
margin: 0px auto 30px auto;
|
||||||
|
text-align: center;
|
||||||
|
color: #707070;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-form {
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #ffffff;
|
||||||
|
width: 400px;
|
||||||
|
padding: 25px 25px 5px 25px;
|
||||||
|
.el-input {
|
||||||
|
height: 38px;
|
||||||
|
input {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.input-icon {
|
||||||
|
height: 39px;
|
||||||
|
width: 14px;
|
||||||
|
margin-left: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.login-tip {
|
||||||
|
font-size: 13px;
|
||||||
|
text-align: center;
|
||||||
|
color: #bfbfbf;
|
||||||
|
}
|
||||||
|
.login-code {
|
||||||
|
width: 33%;
|
||||||
|
height: 38px;
|
||||||
|
float: right;
|
||||||
|
img {
|
||||||
|
cursor: pointer;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-login-footer {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
font-family: Arial;
|
||||||
|
font-size: 12px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
.login-code-img {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,878 @@
|
||||||
|
<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="客户名" prop="userName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.userName"
|
||||||
|
placeholder="请输入客户名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="客户级别" prop="userType">
|
||||||
|
<el-select v-model="queryParams.userType" placeholder="请选择客户级别" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_level"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="手机号码" prop="phoneNumber">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.phoneNumber"
|
||||||
|
placeholder="请输入手机号码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="线索渠道" prop="clueChannel">
|
||||||
|
<el-select v-model="queryParams.clueChannel" placeholder="请选择线索渠道" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.clue_channels"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="信息来源" prop="dataSource">
|
||||||
|
<el-select v-model="queryParams.dataSource" placeholder="请选择信息来源" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_source"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="到店状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.storeStatus" placeholder="请选择到店状态" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.to_store_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="微信号" prop="wechat">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.wechat"
|
||||||
|
placeholder="请输入微信号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="意向车型" prop="intentionCarModels">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.intentionCarModels"
|
||||||
|
placeholder="请输入意向车型"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.preToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择预计到店">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="下单日期" prop="orderDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.orderDate"
|
||||||
|
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="['system:customer: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="['system:customer: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="['system:customer: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="['system:customer:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns" :pageName="$options.name" ></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="客户姓名" align="center" prop="userName" width="120" v-if="columns[1].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="客户级别" align="center" prop="userType" v-if="columns[3].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.customer_level" :value="scope.row.userType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="手机号码" align="center" prop="phoneNumber" width="110" v-if="columns[5].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="线索渠道" align="center" prop="clueChannel" v-if="columns[8].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.clue_channels" :value="scope.row.clueChannel"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="信息来源" align="center" prop="dataSource" v-if="columns[9].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.customer_source" :value="scope.row.dataSource"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="客户居住" align="center" prop="liveAddress" width="100" v-if="columns[10].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="到店状态" align="center" prop="status" width="100" v-if="columns[11].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.to_store_status" :value="scope.row.storeStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="微信号" align="center" prop="wechat" width="110" v-if="columns[20].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="下单日期" align="center" prop="orderDate" width="120" v-if="columns[33].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.orderDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column label="是否评估" align="center" prop="isAssessment" />-->
|
||||||
|
<el-table-column label="意向车型" align="center" prop="intentionCarModels" width="120" v-if="columns[24].visible" show-overflow-tooltip />
|
||||||
|
<!-- <el-table-column label="对比车型" align="center" prop="contrastCarModels" />
|
||||||
|
<el-table-column label="是否试驾" align="center" prop="isTestDrive" />
|
||||||
|
<el-table-column label="是否报价" align="center" prop="isOffer" />
|
||||||
|
<el-table-column label="是否金融" align="center" prop="isFinance" />-->
|
||||||
|
<!-- <el-table-column label="最后到店" align="center" prop="lastToStoreDate" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.lastToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>-->
|
||||||
|
<el-table-column label="已有车辆" align="center" prop="existModels" v-if="columns[22].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="预计到店" class-name="specialColor" align="center" prop="preToStoreDate" width="120" v-if="columns[30].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.preToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="跟进次数" class-name="specialColor" align="center" prop="followUpTimes" v-if="columns[34].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="最新跟进日" class-name="specialColor" align="center" prop="followUpLastDate" width="100" v-if="columns[35].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="最新跟进级别" class-name="specialColor" align="center" prop="followUpLastLevel" width="100" v-if="columns[36].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="建议下次跟进日" class-name="specialColor" align="center" prop="proposalNextFollowDate" width="120" v-if="columns[37].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="跟进超期" class-name="specialColor" align="center" prop="followUpOverdueDate" width="120" v-if="columns[38].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="未订车原因" align="center" prop="unBookingCarReason" width="110" show-overflow-tooltip v-if="columns[29].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip v-if="columns[19].visible" />
|
||||||
|
|
||||||
|
<el-table-column label="操作" width="160" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleFollow(scope.row)"
|
||||||
|
v-hasPermi="['system:customer:edit']"
|
||||||
|
>跟进</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:customer:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:customer: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="60%" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :inline="true" :rules="rules" label-width="110px">
|
||||||
|
<el-form-item label="下单日期" prop="orderDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.orderDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择下单日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户姓名" prop="userName">
|
||||||
|
<el-input v-model="form.userName" placeholder="请输入客户姓名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户状态" prop="status">
|
||||||
|
<el-select v-model="form.status" placeholder="请选择客户状态">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户性别" prop="sex">
|
||||||
|
<el-select v-model="form.sex" placeholder="请选择客户性别">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_user_sex"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户手机" prop="phoneNumber">
|
||||||
|
<el-input v-model="form.phoneNumber" placeholder="请输入客户手机号码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户微信" prop="wechat">
|
||||||
|
<el-input v-model="form.wechat" placeholder="请输入客户微信" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户级别" prop="userType">
|
||||||
|
<el-select v-model="form.userType" placeholder="请选择客户级别">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_level"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户邮箱" prop="email">
|
||||||
|
<el-input v-model="form.email" placeholder="请输入用户邮箱" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="线索渠道" prop="clueChannel">
|
||||||
|
<el-select v-model="form.clueChannel" placeholder="请选择线索渠道">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.clue_channels"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="信息来源" prop="dataSource">
|
||||||
|
<el-select v-model="form.dataSource" placeholder="请选择信息来源">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_source"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户居住" prop="liveAddress">
|
||||||
|
<el-input v-model="form.liveAddress" placeholder="请输入客户居住" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="到店状态" prop="status">
|
||||||
|
<el-select v-model="form.storeStatus" placeholder="请选择到店状态">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.to_store_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="已有车型" prop="existModels">
|
||||||
|
<el-input v-model="form.existModels" placeholder="请输入已有车型" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="意向车型" prop="intentionCarModels">
|
||||||
|
<el-input v-model="form.intentionCarModels" placeholder="请输入意向车型" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="是否试驾" prop="isTestDrive">
|
||||||
|
<el-input v-model="form.isTestDrive" placeholder="请输入是否试驾" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否报价" prop="isOffer">
|
||||||
|
<el-input v-model="form.isOffer" placeholder="请输入是否报价" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否金融" prop="isFinance">
|
||||||
|
<el-input v-model="form.isFinance" placeholder="请输入是否金融" />
|
||||||
|
</el-form-item>
|
||||||
|
-->
|
||||||
|
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.preToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择预计到店">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="最后到店" prop="lastToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.lastToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择最后到店">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>-->
|
||||||
|
<el-form-item label="4S店" prop="storeName">
|
||||||
|
<el-input v-model="form.storeName" placeholder="请输入4S店" />
|
||||||
|
</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="unBookingCarReason">
|
||||||
|
<el-input v-model="form.unBookingCarReason" type="textarea" placeholder="请输入内容" />
|
||||||
|
</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>
|
||||||
|
<!-- 添加客户跟进记录Drawer 抽屉 -->
|
||||||
|
<el-drawer :title="followTitle" :before-close="handleDrawerClose" :visible.sync="drawer" size="50%">
|
||||||
|
<div style="position: fixed;top: 40px;left: 65%;z-index: 100;font-size: smaller">
|
||||||
|
<el-radio-group v-model="reverse">
|
||||||
|
<el-radio :label="true">倒序</el-radio>
|
||||||
|
<el-radio :label="false">正序</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<el-button size="mini" type="primary" icon="el-icon-edit" style="position: relative;left: 100px" @click="handleDrawerAddFollowUp" >新增</el-button>
|
||||||
|
</div>
|
||||||
|
<el-timeline :reverse="reverse">
|
||||||
|
<el-timeline-item placement="top" v-for="(follow, index) in followUpList" :key="index" :timestamp="follow.followUpDate">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<p><el-tag>跟进方式:</el-tag>
|
||||||
|
<el-select v-model="follow.followUpMethod" disabled>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.follow_up_method"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</p>
|
||||||
|
<p><el-tag>级别:</el-tag> {{follow.followLevel}} </p>
|
||||||
|
<h4><el-tag>记录:</el-tag> {{follow.followUpRecord}}</h4>
|
||||||
|
<p> <el-tag>再次预约到店日期:</el-tag> {{follow.preToStoreDate}} </p>
|
||||||
|
<p>提交于 {{follow.createTime}}</p>
|
||||||
|
</el-card>
|
||||||
|
</el-timeline-item>
|
||||||
|
</el-timeline>
|
||||||
|
<el-drawer title="新增跟进日志" :append-to-body="true" :visible.sync="innerDrawer">
|
||||||
|
<el-form ref="followForm" :model="followForm" :rules="followRules" label-width="140px">
|
||||||
|
<el-form-item label="跟进日期" prop="followUpDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="followForm.followUpDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择跟进日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="跟进方式" prop="followUpMethod">
|
||||||
|
<el-select v-model="followForm.followUpMethod" placeholder="请选择跟进方式" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.follow_up_method"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="跟进记录" prop="followUpRecord">
|
||||||
|
<el-input v-model="followForm.followUpRecord" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="级别" prop="followLevel">
|
||||||
|
<el-select v-model="followForm.followLevel" placeholder="请选择级别" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_level"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="再次预约到店日期" prop="preToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="followForm.preToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择再次预约到店日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="followForm.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: center">
|
||||||
|
<el-button type="primary" @click="submitFollowForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
|
</el-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listCustomer,
|
||||||
|
getCustomer,
|
||||||
|
delCustomer,
|
||||||
|
addCustomer,
|
||||||
|
updateCustomer,
|
||||||
|
addCustomerFollowRecerd, updateCustomerFollowRecerd, listCustomerFollow
|
||||||
|
} from "@/api/system/customer";
|
||||||
|
import Data from "@/views/system/dict/data";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "potentialCustomer",
|
||||||
|
dicts: ['to_store_status', 'customer_source','customer_status', 'sys_user_sex', 'customer_level', 'clue_channels','follow_result','follow_up_method'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
drawer:false,
|
||||||
|
reverse: true,
|
||||||
|
innerDrawer:false,
|
||||||
|
dafaultValue:null,
|
||||||
|
customerId:null,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
followTitle:null,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 子表选中数据
|
||||||
|
checkedFollowUp: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 客户信息表格数据
|
||||||
|
customerList: [],
|
||||||
|
// 跟进模块-客户跟进记录表格数据
|
||||||
|
followUpList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
userName: null,
|
||||||
|
userType: null,
|
||||||
|
phoneNumber: null,
|
||||||
|
clueChannel: null,
|
||||||
|
dataSource: null,
|
||||||
|
status: null,
|
||||||
|
wechat: null,
|
||||||
|
intentionCarModels: null,
|
||||||
|
preToStoreDate: null,
|
||||||
|
orderDate: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {
|
||||||
|
|
||||||
|
},
|
||||||
|
followForm:{
|
||||||
|
followUpDate:null,
|
||||||
|
customerId:null,
|
||||||
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
userName: [
|
||||||
|
{ required: true, message: "客户名不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
orderDate:[
|
||||||
|
{ required: true, message: "下单日期不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
phoneNumber: [
|
||||||
|
{ required: true, message: "手机号码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
dataSource: [
|
||||||
|
{ required: true, message: "信息来源不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
intentionCarModels: [
|
||||||
|
{ required: true, message: "意向车型不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// 跟进表单校验
|
||||||
|
followRules: {
|
||||||
|
followUpDate: [
|
||||||
|
{ required: true, message: "跟进日期不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followUpRecord:[
|
||||||
|
{ required: true, message: "跟进记录不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followLevel: [
|
||||||
|
{ required: true, message: "级别不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followUpMethod:[
|
||||||
|
{ required: true, message: "跟进方式不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followResult:[
|
||||||
|
{ required: true, message: "跟进结果不能为空", trigger: "blur" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 列表的列的显示隐藏设置
|
||||||
|
columns:[
|
||||||
|
{ key: 0, label: `客户ID`, visible: true },
|
||||||
|
{ key: 1, label: `客户名`, visible: true },
|
||||||
|
{ key: 2, label: `客户昵称`, visible: true },
|
||||||
|
{ key: 3, label: `客户级别`, visible: true },
|
||||||
|
{ key: 4, label: `用户邮箱`, visible: true },
|
||||||
|
{ key: 5, label: `手机号码`, visible: true },
|
||||||
|
{ key: 6, label: `客户性别`, visible: true },
|
||||||
|
{ key: 7, label: `头像地址`, visible: true },
|
||||||
|
{ key: 8, label: `线索渠道`, visible: true },
|
||||||
|
{ key: 9, label: `信息来源`, visible: true },
|
||||||
|
{ key: 10, label: `客户居住`, visible: true },
|
||||||
|
{ key: 11, label: `到店状态`, visible: true },
|
||||||
|
{ key: 12, label: `删除标志`, visible: true },
|
||||||
|
{ key: 13, label: `最后登录IP`, visible: true },
|
||||||
|
{ key: 14, label: `最后登录时间`, visible: true },
|
||||||
|
{ key: 15, label: `创建者`, visible: true },
|
||||||
|
{ key: 16, label: `创建时间`, visible: true },
|
||||||
|
{ key: 17, label: `更新者`, visible: true },
|
||||||
|
{ key: 18, label: `更新时间`, visible: true },
|
||||||
|
{ key: 19, label: `备注`, visible: true },
|
||||||
|
{ key: 20, label: `微信号`, visible: true },
|
||||||
|
{ key: 21, label: `购车类型`, visible: true },
|
||||||
|
{ key: 22, label: `已有车辆`, visible: true },
|
||||||
|
{ key: 23, label: `是否评估`, visible: true },
|
||||||
|
{ key: 24, label: `意向车型`, visible: true },
|
||||||
|
{ key: 25, label: `对比车型`, visible: true },
|
||||||
|
{ key: 26, label: `是否试驾`, visible: true },
|
||||||
|
{ key: 27, label: `是否报价`, visible: true },
|
||||||
|
{ key: 28, label: `是否金融`, visible: true },
|
||||||
|
{ key: 29, label: `未订车原因`, visible: true },
|
||||||
|
{ key: 30, label: `预计到店`, visible: true },
|
||||||
|
{ key: 31, label: `最后到店`, visible: true },
|
||||||
|
{ key: 32, label: `4S店`, visible: true },
|
||||||
|
{ key: 33, label: `下单日期`, visible: true },
|
||||||
|
{ key: 34, label: `跟进次数`, visible: true },
|
||||||
|
{ key: 35, label: `最新跟进日`, visible: true },
|
||||||
|
{ key: 36, label: `最新跟进级别`, visible: true },
|
||||||
|
{ key: 37, label: `建议下次跟进日`, visible: true },
|
||||||
|
{ key: 38, label: `跟进超期`, visible: true },
|
||||||
|
{ key: 39, label: `客户状态`, visible: true },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.dafaultValue = new Date;
|
||||||
|
var columns1 = JSON.parse(localStorage.getItem(this.$options.name));
|
||||||
|
if(columns1){
|
||||||
|
this.columns = columns1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询客户信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.status = 'potential';
|
||||||
|
listCustomer(this.queryParams).then(response => {
|
||||||
|
this.customerList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询客户跟进信息列表 */
|
||||||
|
getFollowList(customerId) {
|
||||||
|
this.loading = true;
|
||||||
|
let queryParams = {
|
||||||
|
customerId:customerId,
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:1000,
|
||||||
|
}
|
||||||
|
listCustomerFollow(queryParams).then(response => {
|
||||||
|
this.followUpList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
userName: null,
|
||||||
|
nickName: null,
|
||||||
|
userType: null,
|
||||||
|
email: null,
|
||||||
|
phoneNumber: null,
|
||||||
|
sex: null,
|
||||||
|
avatar: null,
|
||||||
|
clueChannel: null,
|
||||||
|
dataSource: null,
|
||||||
|
liveAddress: null,
|
||||||
|
status: null,
|
||||||
|
delFlag: null,
|
||||||
|
loginIp: null,
|
||||||
|
loginDate: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
remark: null,
|
||||||
|
wechat: null,
|
||||||
|
buyCarType: null,
|
||||||
|
existModels: null,
|
||||||
|
isAssessment: 0,
|
||||||
|
intentionCarModels: null,
|
||||||
|
contrastCarModels: null,
|
||||||
|
isTestDrive: null,
|
||||||
|
isOffer: null,
|
||||||
|
isFinance: null,
|
||||||
|
unBookingCarReason: null,
|
||||||
|
preToStoreDate: null,
|
||||||
|
lastToStoreDate: null,
|
||||||
|
storeName: null,
|
||||||
|
orderDate: null
|
||||||
|
};
|
||||||
|
this.followUpList = [];
|
||||||
|
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.form.status = 'potential';
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加客户信息";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getCustomer(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.followUpList = response.data.followUpList;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改客户信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**跟进按钮**/
|
||||||
|
handleFollow(row){
|
||||||
|
this.drawer = true;
|
||||||
|
this.customerId = row.id;
|
||||||
|
this.followTitle = row.userName + " 跟进记录";
|
||||||
|
this.getFollowList(this.customerId);
|
||||||
|
},
|
||||||
|
handleDrawerAddFollowUp(){
|
||||||
|
this.innerDrawer = true;
|
||||||
|
this.followForm = {};
|
||||||
|
this.followForm.followUpDate = new Date();
|
||||||
|
this.followForm.customerId = this.customerId;
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.form.followUpList = this.followUpList;
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateCustomer(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCustomer(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submitFollowForm(){
|
||||||
|
this.$refs["followForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateCustomerFollowRecerd(this.followForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getFollowList(this.customerId);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCustomerFollowRecerd(this.followForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getFollowList(this.customerId);
|
||||||
|
this.innerDrawer = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除客户信息编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delCustomer(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 跟进模块-客户跟进记录序号 */
|
||||||
|
rowFollowUpIndex({ row, rowIndex }) {
|
||||||
|
row.index = rowIndex + 1;
|
||||||
|
},
|
||||||
|
/** 跟进模块-客户跟进记录添加按钮操作 */
|
||||||
|
handleAddFollowUp() {
|
||||||
|
let obj = {};
|
||||||
|
obj.followUpDate = "";
|
||||||
|
obj.followUpRecord = "";
|
||||||
|
obj.preToStoreDate = "";
|
||||||
|
obj.remark = "";
|
||||||
|
obj.followLevel = "";
|
||||||
|
this.followUpList.push(obj);
|
||||||
|
},
|
||||||
|
/** 跟进模块-客户跟进记录删除按钮操作 */
|
||||||
|
handleDeleteFollowUp() {
|
||||||
|
if (this.checkedFollowUp.length == 0) {
|
||||||
|
this.$modal.msgError("请先选择要删除的跟进模块-客户跟进记录数据");
|
||||||
|
} else {
|
||||||
|
const followUpList = this.followUpList;
|
||||||
|
const checkedFollowUp = this.checkedFollowUp;
|
||||||
|
this.followUpList = followUpList.filter(function(item) {
|
||||||
|
return checkedFollowUp.indexOf(item.index) == -1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 复选框选中数据 */
|
||||||
|
handleFollowUpSelectionChange(selection) {
|
||||||
|
this.checkedFollowUp = selection.map(item => item.index)
|
||||||
|
},
|
||||||
|
handleDrawerClose(done){
|
||||||
|
this.getList()
|
||||||
|
this.drawer = false;
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/customer/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `customer_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
|
.specialColor{
|
||||||
|
color:red;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
margin: 0px auto 30px auto;
|
||||||
|
text-align: center;
|
||||||
|
color: #707070;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-form {
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #ffffff;
|
||||||
|
width: 400px;
|
||||||
|
padding: 25px 25px 5px 25px;
|
||||||
|
.el-input {
|
||||||
|
height: 38px;
|
||||||
|
input {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.input-icon {
|
||||||
|
height: 39px;
|
||||||
|
width: 14px;
|
||||||
|
margin-left: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.login-tip {
|
||||||
|
font-size: 13px;
|
||||||
|
text-align: center;
|
||||||
|
color: #bfbfbf;
|
||||||
|
}
|
||||||
|
.login-code {
|
||||||
|
width: 33%;
|
||||||
|
height: 38px;
|
||||||
|
float: right;
|
||||||
|
img {
|
||||||
|
cursor: pointer;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-login-footer {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
font-family: Arial;
|
||||||
|
font-size: 12px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
.login-code-img {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,878 @@
|
||||||
|
<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="客户名" prop="userName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.userName"
|
||||||
|
placeholder="请输入客户名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="客户级别" prop="userType">
|
||||||
|
<el-select v-model="queryParams.userType" placeholder="请选择客户级别" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_level"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="手机号码" prop="phoneNumber">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.phoneNumber"
|
||||||
|
placeholder="请输入手机号码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="线索渠道" prop="clueChannel">
|
||||||
|
<el-select v-model="queryParams.clueChannel" placeholder="请选择线索渠道" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.clue_channels"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="信息来源" prop="dataSource">
|
||||||
|
<el-select v-model="queryParams.dataSource" placeholder="请选择信息来源" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_source"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="到店状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.storeStatus" placeholder="请选择到店状态" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.to_store_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="微信号" prop="wechat">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.wechat"
|
||||||
|
placeholder="请输入微信号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="意向车型" prop="intentionCarModels">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.intentionCarModels"
|
||||||
|
placeholder="请输入意向车型"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.preToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择预计到店">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="下单日期" prop="orderDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.orderDate"
|
||||||
|
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="['system:customer: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="['system:customer: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="['system:customer: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="['system:customer:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns" :pageName="$options.name" ></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="客户姓名" align="center" prop="userName" width="120" v-if="columns[1].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="客户级别" align="center" prop="userType" v-if="columns[3].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.customer_level" :value="scope.row.userType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="手机号码" align="center" prop="phoneNumber" width="110" v-if="columns[5].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="线索渠道" align="center" prop="clueChannel" v-if="columns[8].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.clue_channels" :value="scope.row.clueChannel"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="信息来源" align="center" prop="dataSource" v-if="columns[9].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.customer_source" :value="scope.row.dataSource"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="客户居住" align="center" prop="liveAddress" width="100" v-if="columns[10].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="到店状态" align="center" prop="status" width="100" v-if="columns[11].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.to_store_status" :value="scope.row.storeStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="微信号" align="center" prop="wechat" width="110" v-if="columns[20].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="下单日期" align="center" prop="orderDate" width="120" v-if="columns[33].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.orderDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column label="是否评估" align="center" prop="isAssessment" />-->
|
||||||
|
<el-table-column label="意向车型" align="center" prop="intentionCarModels" width="120" v-if="columns[24].visible" show-overflow-tooltip />
|
||||||
|
<!-- <el-table-column label="对比车型" align="center" prop="contrastCarModels" />
|
||||||
|
<el-table-column label="是否试驾" align="center" prop="isTestDrive" />
|
||||||
|
<el-table-column label="是否报价" align="center" prop="isOffer" />
|
||||||
|
<el-table-column label="是否金融" align="center" prop="isFinance" />-->
|
||||||
|
<!-- <el-table-column label="最后到店" align="center" prop="lastToStoreDate" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.lastToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>-->
|
||||||
|
<el-table-column label="已有车辆" align="center" prop="existModels" v-if="columns[22].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="预计到店" class-name="specialColor" align="center" prop="preToStoreDate" width="120" v-if="columns[30].visible" show-overflow-tooltip >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.preToStoreDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="跟进次数" class-name="specialColor" align="center" prop="followUpTimes" v-if="columns[34].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="最新跟进日" class-name="specialColor" align="center" prop="followUpLastDate" width="100" v-if="columns[35].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="最新跟进级别" class-name="specialColor" align="center" prop="followUpLastLevel" width="100" v-if="columns[36].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="建议下次跟进日" class-name="specialColor" align="center" prop="proposalNextFollowDate" width="120" v-if="columns[37].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="跟进超期" class-name="specialColor" align="center" prop="followUpOverdueDate" width="120" v-if="columns[38].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="未订车原因" align="center" prop="unBookingCarReason" width="110" show-overflow-tooltip v-if="columns[29].visible" show-overflow-tooltip />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip v-if="columns[19].visible" />
|
||||||
|
|
||||||
|
<el-table-column label="操作" width="160" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleFollow(scope.row)"
|
||||||
|
v-hasPermi="['system:customer:edit']"
|
||||||
|
>跟进</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:customer:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:customer: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="60%" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :inline="true" :rules="rules" label-width="110px">
|
||||||
|
<el-form-item label="下单日期" prop="orderDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.orderDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择下单日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户姓名" prop="userName">
|
||||||
|
<el-input v-model="form.userName" placeholder="请输入客户姓名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户状态" prop="status">
|
||||||
|
<el-select v-model="form.status" placeholder="请选择客户状态">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户性别" prop="sex">
|
||||||
|
<el-select v-model="form.sex" placeholder="请选择客户性别">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_user_sex"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户手机" prop="phoneNumber">
|
||||||
|
<el-input v-model="form.phoneNumber" placeholder="请输入客户手机号码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户微信" prop="wechat">
|
||||||
|
<el-input v-model="form.wechat" placeholder="请输入客户微信" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户级别" prop="userType">
|
||||||
|
<el-select v-model="form.userType" placeholder="请选择客户级别">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_level"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户邮箱" prop="email">
|
||||||
|
<el-input v-model="form.email" placeholder="请输入用户邮箱" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="线索渠道" prop="clueChannel">
|
||||||
|
<el-select v-model="form.clueChannel" placeholder="请选择线索渠道">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.clue_channels"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="信息来源" prop="dataSource">
|
||||||
|
<el-select v-model="form.dataSource" placeholder="请选择信息来源">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_source"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户居住" prop="liveAddress">
|
||||||
|
<el-input v-model="form.liveAddress" placeholder="请输入客户居住" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="到店状态" prop="status">
|
||||||
|
<el-select v-model="form.storeStatus" placeholder="请选择到店状态">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.to_store_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="已有车型" prop="existModels">
|
||||||
|
<el-input v-model="form.existModels" placeholder="请输入已有车型" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="意向车型" prop="intentionCarModels">
|
||||||
|
<el-input v-model="form.intentionCarModels" placeholder="请输入意向车型" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="是否试驾" prop="isTestDrive">
|
||||||
|
<el-input v-model="form.isTestDrive" placeholder="请输入是否试驾" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否报价" prop="isOffer">
|
||||||
|
<el-input v-model="form.isOffer" placeholder="请输入是否报价" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否金融" prop="isFinance">
|
||||||
|
<el-input v-model="form.isFinance" placeholder="请输入是否金融" />
|
||||||
|
</el-form-item>
|
||||||
|
-->
|
||||||
|
<el-form-item label="预计到店" prop="preToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.preToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择预计到店">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="最后到店" prop="lastToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.lastToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择最后到店">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>-->
|
||||||
|
<el-form-item label="4S店" prop="storeName">
|
||||||
|
<el-input v-model="form.storeName" placeholder="请输入4S店" />
|
||||||
|
</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="unBookingCarReason">
|
||||||
|
<el-input v-model="form.unBookingCarReason" type="textarea" placeholder="请输入内容" />
|
||||||
|
</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>
|
||||||
|
<!-- 添加客户跟进记录Drawer 抽屉 -->
|
||||||
|
<el-drawer :title="followTitle" :before-close="handleDrawerClose" :visible.sync="drawer" size="50%">
|
||||||
|
<div style="position: fixed;top: 40px;left: 65%;z-index: 100;font-size: smaller">
|
||||||
|
<el-radio-group v-model="reverse">
|
||||||
|
<el-radio :label="true">倒序</el-radio>
|
||||||
|
<el-radio :label="false">正序</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<el-button size="mini" type="primary" icon="el-icon-edit" style="position: relative;left: 100px" @click="handleDrawerAddFollowUp" >新增</el-button>
|
||||||
|
</div>
|
||||||
|
<el-timeline :reverse="reverse">
|
||||||
|
<el-timeline-item placement="top" v-for="(follow, index) in followUpList" :key="index" :timestamp="follow.followUpDate">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<p><el-tag>跟进方式:</el-tag>
|
||||||
|
<el-select v-model="follow.followUpMethod" disabled>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.follow_up_method"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</p>
|
||||||
|
<p><el-tag>级别:</el-tag> {{follow.followLevel}} </p>
|
||||||
|
<h4><el-tag>记录:</el-tag> {{follow.followUpRecord}}</h4>
|
||||||
|
<p> <el-tag>再次预约到店日期:</el-tag> {{follow.preToStoreDate}} </p>
|
||||||
|
<p>提交于 {{follow.createTime}}</p>
|
||||||
|
</el-card>
|
||||||
|
</el-timeline-item>
|
||||||
|
</el-timeline>
|
||||||
|
<el-drawer title="新增跟进日志" :append-to-body="true" :visible.sync="innerDrawer">
|
||||||
|
<el-form ref="followForm" :model="followForm" :rules="followRules" label-width="140px">
|
||||||
|
<el-form-item label="跟进日期" prop="followUpDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="followForm.followUpDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择跟进日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="跟进方式" prop="followUpMethod">
|
||||||
|
<el-select v-model="followForm.followUpMethod" placeholder="请选择跟进方式" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.follow_up_method"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="跟进记录" prop="followUpRecord">
|
||||||
|
<el-input v-model="followForm.followUpRecord" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="级别" prop="followLevel">
|
||||||
|
<el-select v-model="followForm.followLevel" placeholder="请选择级别" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.customer_level"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="再次预约到店日期" prop="preToStoreDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="followForm.preToStoreDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择再次预约到店日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="followForm.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: center">
|
||||||
|
<el-button type="primary" @click="submitFollowForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
|
</el-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listCustomer,
|
||||||
|
getCustomer,
|
||||||
|
delCustomer,
|
||||||
|
addCustomer,
|
||||||
|
updateCustomer,
|
||||||
|
addCustomerFollowRecerd, updateCustomerFollowRecerd, listCustomerFollow
|
||||||
|
} from "@/api/system/customer";
|
||||||
|
import Data from "@/views/system/dict/data";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "salesFollowCustomer",
|
||||||
|
dicts: ['to_store_status', 'customer_source','customer_status', 'sys_user_sex', 'customer_level', 'clue_channels','follow_result','follow_up_method'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
drawer:false,
|
||||||
|
reverse: true,
|
||||||
|
innerDrawer:false,
|
||||||
|
dafaultValue:null,
|
||||||
|
customerId:null,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
followTitle:null,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 子表选中数据
|
||||||
|
checkedFollowUp: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 客户信息表格数据
|
||||||
|
customerList: [],
|
||||||
|
// 跟进模块-客户跟进记录表格数据
|
||||||
|
followUpList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
userName: null,
|
||||||
|
userType: null,
|
||||||
|
phoneNumber: null,
|
||||||
|
clueChannel: null,
|
||||||
|
dataSource: null,
|
||||||
|
status: null,
|
||||||
|
wechat: null,
|
||||||
|
intentionCarModels: null,
|
||||||
|
preToStoreDate: null,
|
||||||
|
orderDate: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {
|
||||||
|
|
||||||
|
},
|
||||||
|
followForm:{
|
||||||
|
followUpDate:null,
|
||||||
|
customerId:null,
|
||||||
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
userName: [
|
||||||
|
{ required: true, message: "客户名不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
orderDate:[
|
||||||
|
{ required: true, message: "下单日期不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
phoneNumber: [
|
||||||
|
{ required: true, message: "手机号码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
dataSource: [
|
||||||
|
{ required: true, message: "信息来源不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
intentionCarModels: [
|
||||||
|
{ required: true, message: "意向车型不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// 跟进表单校验
|
||||||
|
followRules: {
|
||||||
|
followUpDate: [
|
||||||
|
{ required: true, message: "跟进日期不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followUpRecord:[
|
||||||
|
{ required: true, message: "跟进记录不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followLevel: [
|
||||||
|
{ required: true, message: "级别不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followUpMethod:[
|
||||||
|
{ required: true, message: "跟进方式不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
followResult:[
|
||||||
|
{ required: true, message: "跟进结果不能为空", trigger: "blur" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 列表的列的显示隐藏设置
|
||||||
|
columns:[
|
||||||
|
{ key: 0, label: `客户ID`, visible: true },
|
||||||
|
{ key: 1, label: `客户名`, visible: true },
|
||||||
|
{ key: 2, label: `客户昵称`, visible: true },
|
||||||
|
{ key: 3, label: `客户级别`, visible: true },
|
||||||
|
{ key: 4, label: `用户邮箱`, visible: true },
|
||||||
|
{ key: 5, label: `手机号码`, visible: true },
|
||||||
|
{ key: 6, label: `客户性别`, visible: true },
|
||||||
|
{ key: 7, label: `头像地址`, visible: true },
|
||||||
|
{ key: 8, label: `线索渠道`, visible: true },
|
||||||
|
{ key: 9, label: `信息来源`, visible: true },
|
||||||
|
{ key: 10, label: `客户居住`, visible: true },
|
||||||
|
{ key: 11, label: `到店状态`, visible: true },
|
||||||
|
{ key: 12, label: `删除标志`, visible: true },
|
||||||
|
{ key: 13, label: `最后登录IP`, visible: true },
|
||||||
|
{ key: 14, label: `最后登录时间`, visible: true },
|
||||||
|
{ key: 15, label: `创建者`, visible: true },
|
||||||
|
{ key: 16, label: `创建时间`, visible: true },
|
||||||
|
{ key: 17, label: `更新者`, visible: true },
|
||||||
|
{ key: 18, label: `更新时间`, visible: true },
|
||||||
|
{ key: 19, label: `备注`, visible: true },
|
||||||
|
{ key: 20, label: `微信号`, visible: true },
|
||||||
|
{ key: 21, label: `购车类型`, visible: true },
|
||||||
|
{ key: 22, label: `已有车辆`, visible: true },
|
||||||
|
{ key: 23, label: `是否评估`, visible: true },
|
||||||
|
{ key: 24, label: `意向车型`, visible: true },
|
||||||
|
{ key: 25, label: `对比车型`, visible: true },
|
||||||
|
{ key: 26, label: `是否试驾`, visible: true },
|
||||||
|
{ key: 27, label: `是否报价`, visible: true },
|
||||||
|
{ key: 28, label: `是否金融`, visible: true },
|
||||||
|
{ key: 29, label: `未订车原因`, visible: true },
|
||||||
|
{ key: 30, label: `预计到店`, visible: true },
|
||||||
|
{ key: 31, label: `最后到店`, visible: true },
|
||||||
|
{ key: 32, label: `4S店`, visible: true },
|
||||||
|
{ key: 33, label: `下单日期`, visible: true },
|
||||||
|
{ key: 34, label: `跟进次数`, visible: true },
|
||||||
|
{ key: 35, label: `最新跟进日`, visible: true },
|
||||||
|
{ key: 36, label: `最新跟进级别`, visible: true },
|
||||||
|
{ key: 37, label: `建议下次跟进日`, visible: true },
|
||||||
|
{ key: 38, label: `跟进超期`, visible: true },
|
||||||
|
{ key: 39, label: `客户状态`, visible: true },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.dafaultValue = new Date;
|
||||||
|
var columns1 = JSON.parse(localStorage.getItem(this.$options.name));
|
||||||
|
if(columns1){
|
||||||
|
this.columns = columns1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询客户信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.status = 'order';
|
||||||
|
listCustomer(this.queryParams).then(response => {
|
||||||
|
this.customerList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询客户跟进信息列表 */
|
||||||
|
getFollowList(customerId) {
|
||||||
|
this.loading = true;
|
||||||
|
let queryParams = {
|
||||||
|
customerId:customerId,
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:1000,
|
||||||
|
}
|
||||||
|
listCustomerFollow(queryParams).then(response => {
|
||||||
|
this.followUpList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
userName: null,
|
||||||
|
nickName: null,
|
||||||
|
userType: null,
|
||||||
|
email: null,
|
||||||
|
phoneNumber: null,
|
||||||
|
sex: null,
|
||||||
|
avatar: null,
|
||||||
|
clueChannel: null,
|
||||||
|
dataSource: null,
|
||||||
|
liveAddress: null,
|
||||||
|
status: null,
|
||||||
|
delFlag: null,
|
||||||
|
loginIp: null,
|
||||||
|
loginDate: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
remark: null,
|
||||||
|
wechat: null,
|
||||||
|
buyCarType: null,
|
||||||
|
existModels: null,
|
||||||
|
isAssessment: 0,
|
||||||
|
intentionCarModels: null,
|
||||||
|
contrastCarModels: null,
|
||||||
|
isTestDrive: null,
|
||||||
|
isOffer: null,
|
||||||
|
isFinance: null,
|
||||||
|
unBookingCarReason: null,
|
||||||
|
preToStoreDate: null,
|
||||||
|
lastToStoreDate: null,
|
||||||
|
storeName: null,
|
||||||
|
orderDate: null
|
||||||
|
};
|
||||||
|
this.followUpList = [];
|
||||||
|
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.form.status = 'potential';
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加客户信息";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getCustomer(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.followUpList = response.data.followUpList;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改客户信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**跟进按钮**/
|
||||||
|
handleFollow(row){
|
||||||
|
this.drawer = true;
|
||||||
|
this.customerId = row.id;
|
||||||
|
this.followTitle = row.userName + " 跟进记录";
|
||||||
|
this.getFollowList(this.customerId);
|
||||||
|
},
|
||||||
|
handleDrawerAddFollowUp(){
|
||||||
|
this.innerDrawer = true;
|
||||||
|
this.followForm = {};
|
||||||
|
this.followForm.followUpDate = new Date();
|
||||||
|
this.followForm.customerId = this.customerId;
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.form.followUpList = this.followUpList;
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateCustomer(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCustomer(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submitFollowForm(){
|
||||||
|
this.$refs["followForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateCustomerFollowRecerd(this.followForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getFollowList(this.customerId);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCustomerFollowRecerd(this.followForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getFollowList(this.customerId);
|
||||||
|
this.innerDrawer = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除客户信息编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delCustomer(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 跟进模块-客户跟进记录序号 */
|
||||||
|
rowFollowUpIndex({ row, rowIndex }) {
|
||||||
|
row.index = rowIndex + 1;
|
||||||
|
},
|
||||||
|
/** 跟进模块-客户跟进记录添加按钮操作 */
|
||||||
|
handleAddFollowUp() {
|
||||||
|
let obj = {};
|
||||||
|
obj.followUpDate = "";
|
||||||
|
obj.followUpRecord = "";
|
||||||
|
obj.preToStoreDate = "";
|
||||||
|
obj.remark = "";
|
||||||
|
obj.followLevel = "";
|
||||||
|
this.followUpList.push(obj);
|
||||||
|
},
|
||||||
|
/** 跟进模块-客户跟进记录删除按钮操作 */
|
||||||
|
handleDeleteFollowUp() {
|
||||||
|
if (this.checkedFollowUp.length == 0) {
|
||||||
|
this.$modal.msgError("请先选择要删除的跟进模块-客户跟进记录数据");
|
||||||
|
} else {
|
||||||
|
const followUpList = this.followUpList;
|
||||||
|
const checkedFollowUp = this.checkedFollowUp;
|
||||||
|
this.followUpList = followUpList.filter(function(item) {
|
||||||
|
return checkedFollowUp.indexOf(item.index) == -1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 复选框选中数据 */
|
||||||
|
handleFollowUpSelectionChange(selection) {
|
||||||
|
this.checkedFollowUp = selection.map(item => item.index)
|
||||||
|
},
|
||||||
|
handleDrawerClose(done){
|
||||||
|
this.getList()
|
||||||
|
this.drawer = false;
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/customer/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `customer_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
|
.specialColor{
|
||||||
|
color:red;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
margin: 0px auto 30px auto;
|
||||||
|
text-align: center;
|
||||||
|
color: #707070;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-form {
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #ffffff;
|
||||||
|
width: 400px;
|
||||||
|
padding: 25px 25px 5px 25px;
|
||||||
|
.el-input {
|
||||||
|
height: 38px;
|
||||||
|
input {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.input-icon {
|
||||||
|
height: 39px;
|
||||||
|
width: 14px;
|
||||||
|
margin-left: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.login-tip {
|
||||||
|
font-size: 13px;
|
||||||
|
text-align: center;
|
||||||
|
color: #bfbfbf;
|
||||||
|
}
|
||||||
|
.login-code {
|
||||||
|
width: 33%;
|
||||||
|
height: 38px;
|
||||||
|
float: right;
|
||||||
|
img {
|
||||||
|
cursor: pointer;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-login-footer {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
font-family: Arial;
|
||||||
|
font-size: 12px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
.login-code-img {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue