0325-北仑:客群修改+pad走访

This commit is contained in:
2026-03-25 14:14:32 +08:00
parent 7f5a045cab
commit 59e05e85b1
17 changed files with 492 additions and 126 deletions

View File

@@ -39,6 +39,12 @@ public class CustGroupQueryDTO implements Serializable {
@ApiModelProperty(value = "客群状态", name = "groupStatus") @ApiModelProperty(value = "客群状态", name = "groupStatus")
private String groupStatus; private String groupStatus;
/**
* 视图类型mine=我创建的sharedToMe=下发给我的
*/
@ApiModelProperty(value = "视图类型", name = "viewType")
private String viewType;
/** /**
* 页码 * 页码
*/ */
@@ -50,4 +56,4 @@ public class CustGroupQueryDTO implements Serializable {
*/ */
@ApiModelProperty(value = "每页大小", name = "pageSize") @ApiModelProperty(value = "每页大小", name = "pageSize")
private Integer pageSize = 10; private Integer pageSize = 10;
} }

View File

@@ -32,7 +32,9 @@ public interface CustGroupMapper extends BaseMapper<CustGroup> {
* @param dto 查询条件 * @param dto 查询条件
* @return 客群VO列表 * @return 客群VO列表
*/ */
List<CustGroupVO> selectCustGroupList(@Param("dto") CustGroupQueryDTO dto); List<CustGroupVO> selectCustGroupList(@Param("dto") CustGroupQueryDTO dto,
@Param("userName") String userName,
@Param("deptId") String deptId);
/** /**
* 根据ID查询客群详情 * 根据ID查询客群详情
@@ -40,5 +42,19 @@ public interface CustGroupMapper extends BaseMapper<CustGroup> {
* @param id 客群ID * @param id 客群ID
* @return 客群VO * @return 客群VO
*/ */
CustGroupVO selectCustGroupById(@Param("id") Long id); CustGroupVO selectCustGroupById(@Param("id") Long id,
} @Param("userName") String userName,
@Param("deptId") String deptId);
/**
* 校验当前用户是否有客群查看权限
*
* @param id 客群ID
* @param userName 当前用户名
* @param deptId 当前部门ID
* @return 可查看数量
*/
Long countVisibleCustGroup(@Param("id") Long id,
@Param("userName") String userName,
@Param("deptId") String deptId);
}

View File

@@ -31,6 +31,13 @@ public interface ICustGroupService {
*/ */
CustGroupVO getCustGroup(Long id); CustGroupVO getCustGroup(Long id);
/**
* 校验当前用户是否有客群查看权限
*
* @param id 客群ID
*/
void checkCustGroupViewPermission(Long id);
/** /**
* 异步创建客群(模板导入) * 异步创建客群(模板导入)
* *
@@ -100,4 +107,4 @@ public interface ICustGroupService {
*/ */
void checkAndDisableExpiredGroups(); void checkAndDisableExpiredGroups();
} }

View File

@@ -6,6 +6,7 @@ import com.ruoyi.group.domain.entity.CustGroupMember;
import com.ruoyi.group.domain.vo.CustGroupMemberVO; import com.ruoyi.group.domain.vo.CustGroupMemberVO;
import com.ruoyi.group.mapper.CustGroupMapper; import com.ruoyi.group.mapper.CustGroupMapper;
import com.ruoyi.group.mapper.CustGroupMemberMapper; import com.ruoyi.group.mapper.CustGroupMemberMapper;
import com.ruoyi.group.service.ICustGroupService;
import com.ruoyi.group.service.ICustGroupMemberService; import com.ruoyi.group.service.ICustGroupMemberService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@@ -27,8 +28,12 @@ public class CustGroupMemberServiceImpl implements ICustGroupMemberService {
@Resource @Resource
private CustGroupMapper custGroupMapper; private CustGroupMapper custGroupMapper;
@Resource
private ICustGroupService custGroupService;
@Override @Override
public List<CustGroupMemberVO> listCustGroupMembers(Long groupId, CustGroupMemberQueryDTO dto) { public List<CustGroupMemberVO> listCustGroupMembers(Long groupId, CustGroupMemberQueryDTO dto) {
custGroupService.checkCustGroupViewPermission(groupId);
return custGroupMemberMapper.selectCustGroupMemberList(groupId, dto); return custGroupMemberMapper.selectCustGroupMemberList(groupId, dto);
} }

View File

@@ -66,18 +66,26 @@ public class CustGroupServiceImpl implements ICustGroupService {
@Override @Override
public List<CustGroupVO> listCustGroup(CustGroupQueryDTO dto) { public List<CustGroupVO> listCustGroup(CustGroupQueryDTO dto) {
return custGroupMapper.selectCustGroupList(dto); return custGroupMapper.selectCustGroupList(dto, SecurityUtils.getUsername(), String.valueOf(SecurityUtils.getDeptId()));
} }
@Override @Override
public CustGroupVO getCustGroup(Long id) { public CustGroupVO getCustGroup(Long id) {
CustGroupVO custGroup = custGroupMapper.selectCustGroupById(id); CustGroupVO custGroup = custGroupMapper.selectCustGroupById(id, SecurityUtils.getUsername(), String.valueOf(SecurityUtils.getDeptId()));
if (custGroup == null) { if (custGroup == null) {
throw new ServiceException("客群不存在"); throw new ServiceException("客群不存在");
} }
return custGroup; return custGroup;
} }
@Override
public void checkCustGroupViewPermission(Long id) {
Long count = custGroupMapper.countVisibleCustGroup(id, SecurityUtils.getUsername(), String.valueOf(SecurityUtils.getDeptId()));
if (count == null || count <= 0) {
throw new ServiceException("客群不存在或无查看权限");
}
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public String createCustGroupByTemplate(CustGroup custGroup, MultipartFile file) { public String createCustGroupByTemplate(CustGroup custGroup, MultipartFile file) {
@@ -914,4 +922,4 @@ public class CustGroupServiceImpl implements ICustGroupService {
} }
return memberList; return memberList;
} }
} }

View File

@@ -4,6 +4,37 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.group.mapper.CustGroupMapper"> <mapper namespace="com.ruoyi.group.mapper.CustGroupMapper">
<sql id="custGroupVisibleBaseCondition">
AND (
cg.user_name = #{userName}
OR (
cg.share_enabled = 1
AND cg.group_status = '0'
AND cg.share_dept_ids IS NOT NULL
AND cg.share_dept_ids != ''
AND find_in_set(#{deptId}, cg.share_dept_ids)
)
)
</sql>
<sql id="custGroupVisibleCondition">
<choose>
<when test="dto != null and dto.viewType == 'mine'">
AND cg.user_name = #{userName}
</when>
<when test="dto != null and dto.viewType == 'sharedToMe'">
AND cg.share_enabled = 1
AND cg.group_status = '0'
AND cg.share_dept_ids IS NOT NULL
AND cg.share_dept_ids != ''
AND find_in_set(#{deptId}, cg.share_dept_ids)
</when>
<otherwise>
<include refid="custGroupVisibleBaseCondition"/>
</otherwise>
</choose>
</sql>
<select id="selectCustGroupList" resultType="CustGroupVO"> <select id="selectCustGroupList" resultType="CustGroupVO">
SELECT SELECT
cg.id, cg.id,
@@ -26,7 +57,8 @@
FROM ibs_cust_group cg FROM ibs_cust_group cg
<where> <where>
cg.del_flag = '0' cg.del_flag = '0'
and create_status = '1' AND cg.create_status = '1'
<include refid="custGroupVisibleCondition"/>
<if test="dto.groupName != null and dto.groupName != ''"> <if test="dto.groupName != null and dto.groupName != ''">
AND cg.group_name LIKE CONCAT('%', #{dto.groupName}, '%') AND cg.group_name LIKE CONCAT('%', #{dto.groupName}, '%')
</if> </if>
@@ -69,7 +101,19 @@
cg.draw_grid_ids, cg.draw_grid_ids,
(SELECT COUNT(*) FROM ibs_cust_group_member cgm WHERE cgm.group_id = cg.id AND cgm.del_flag = '0') AS cust_count (SELECT COUNT(*) FROM ibs_cust_group_member cgm WHERE cgm.group_id = cg.id AND cgm.del_flag = '0') AS cust_count
FROM ibs_cust_group cg FROM ibs_cust_group cg
WHERE cg.id = #{id} AND cg.del_flag = '0' WHERE cg.id = #{id}
AND cg.del_flag = '0'
AND cg.create_status = '1'
<include refid="custGroupVisibleBaseCondition"/>
</select>
<select id="countVisibleCustGroup" resultType="java.lang.Long">
SELECT COUNT(1)
FROM ibs_cust_group cg
WHERE cg.id = #{id}
AND cg.del_flag = '0'
AND cg.create_status = '1'
<include refid="custGroupVisibleBaseCondition"/>
</select> </select>
</mapper> </mapper>

View File

@@ -117,4 +117,40 @@ public class VisitInfo {
@ApiModelProperty(value = "走访备注") @ApiModelProperty(value = "走访备注")
private String remark; private String remark;
@ApiModelProperty(value = "互动地址")
private String interAddr;
@ApiModelProperty(value = "协同员工名称")
private String colStafName;
@ApiModelProperty(value = "后续备注")
private String laterNote;
@ApiModelProperty(value = "意向产品值")
private String intentionProductValue;
@ApiModelProperty(value = "反馈状态")
private String feedbackStatus;
@ApiModelProperty(value = "走访来源")
private String sourceOfInterview;
@ApiModelProperty(value = "文件名")
private String filename;
@ApiModelProperty(value = "外呼状态")
private String outCallStatus;
@ApiModelProperty(value = "外呼意向")
private String outCallIntention;
@ApiModelProperty(value = "来源")
private String source;
@ApiModelProperty(value = "分析值")
private String analysisValue;
@ApiModelProperty(value = "设备")
private String facility;
} }

View File

@@ -13,6 +13,10 @@ public class VisitInfoDTO {
@ApiModelProperty(value = "柜员名称") @ApiModelProperty(value = "柜员名称")
private String visName; private String visName;
/** 柜员号 */
@ApiModelProperty(value = "柜员号")
private String visId;
/** 走访时间 */ /** 走访时间 */
@ApiModelProperty(value = "走访时间") @ApiModelProperty(value = "走访时间")
private String visTime; private String visTime;

View File

@@ -128,4 +128,40 @@ public class VisitInfoVO {
@ApiModelProperty(value = "走访结果") @ApiModelProperty(value = "走访结果")
private String interRes; private String interRes;
@ApiModelProperty(value = "实地拜访地址")
private String interAddr;
@ApiModelProperty(value = "协同走访客户经理")
private String colStafName;
@ApiModelProperty(value = "事后备注")
private String laterNote;
@ApiModelProperty(value = "走访反馈")
private String intentionProductValue;
@ApiModelProperty(value = "反馈状态")
private String feedbackStatus;
@ApiModelProperty(value = "走访来源")
private String sourceOfInterview;
@ApiModelProperty(value = "批量导入文件名")
private String filename;
@ApiModelProperty(value = "外呼状态")
private String outCallStatus;
@ApiModelProperty(value = "客户意愿")
private String outCallIntention;
@ApiModelProperty(value = "走访来源1nullpad 2企业微信 3pc")
private String source;
@ApiModelProperty(value = "nlp模型提取")
private String analysisValue;
@ApiModelProperty(value = "预授信额度")
private String facility;
} }

View File

@@ -127,6 +127,18 @@
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="custType" column="cust_type" /> <result property="custType" column="cust_type" />
<result property="deptName" column="dept_name" /> <result property="deptName" column="dept_name" />
<result property="interAddr" column="inter_addr" />
<result property="colStafName" column="col_staf_name" />
<result property="laterNote" column="later_note" />
<result property="intentionProductValue" column="intention_product_value" />
<result property="feedbackStatus" column="feedback_status" />
<result property="sourceOfInterview" column="source_of_interview" />
<result property="filename" column="filename" />
<result property="outCallStatus" column="out_call_status" />
<result property="outCallIntention" column="out_call_intention" />
<result property="source" column="source" />
<result property="analysisValue" column="analysis_value" />
<result property="facility" column="facility" />
</resultMap> </resultMap>
<sql id="selectSysCampaignVo"> <sql id="selectSysCampaignVo">
@@ -1384,12 +1396,15 @@
<select id="selectVisitInfoList" parameterType="VisitInfoDTO" resultType="VisitInfoVO"> <select id="selectVisitInfoList" parameterType="VisitInfoDTO" resultType="VisitInfoVO">
select vi.id,vi.campaign_id,vi.campaign_name,vi.vis_name,vi.vis_id,vi.dept_id,d.dept_name,vi.vis_time,vi.cust_name,vi.cust_type,vi.cust_idc, select vi.id,vi.campaign_id,vi.campaign_name,vi.vis_name,vi.vis_id,vi.dept_id,d.dept_name,vi.vis_time,vi.cust_name,vi.cust_type,vi.cust_idc,
vi.social_credit_code,vi.create_by,vi.create_time,vi.update_by,vi.update_time,vi.remark,vi.sign_in_time,vi.sign_out_time,vi.sign_in_address, vi.social_credit_code,vi.create_by,vi.create_time,vi.update_by,vi.update_time,vi.remark,vi.sign_in_time,vi.sign_out_time,vi.sign_in_address,
vi.sign_out_address,vi.abnormal_visit_tag,vi.abnormal_visit_info,vi.sign_in_coordinate,vi.sign_out_coordinate,vi.is_valid_cust,vi.marketing_way,vi.inter_res vi.sign_out_address,vi.abnormal_visit_tag,vi.abnormal_visit_info,vi.sign_in_coordinate,vi.sign_out_coordinate,vi.is_valid_cust,vi.marketing_way,vi.inter_res,
vi.inter_addr,vi.col_staf_name,vi.later_note,vi.intention_product_value,vi.feedback_status,vi.source_of_interview,vi.filename,
vi.out_call_status,vi.out_call_intention,vi.source,vi.analysis_value,vi.facility
from visit_info vi from visit_info vi
left join sys_dept d on vi.dept_id = d.dept_id left join sys_dept d on vi.dept_id = d.dept_id
<where> <where>
<if test="custType != null and custType != ''"> and vi.cust_type = #{custType}</if> <if test="custType != null and custType != ''"> and vi.cust_type = #{custType}</if>
<if test="visName != null and visName != ''"> and vi.vis_name like concat('%', #{visName}, '%')</if> <if test="visName != null and visName != ''"> and vi.vis_name like concat('%', #{visName}, '%')</if>
<if test="visId != null and visId != ''"> and vi.vis_id = #{visId}</if>
<if test="custIdc != null and custIdc != ''"> and vi.cust_idc = #{custIdc}</if> <if test="custIdc != null and custIdc != ''"> and vi.cust_idc = #{custIdc}</if>
<if test="socialCreditCode != null and socialCreditCode != ''"> and vi.social_credit_code = #{socialCreditCode}</if> <if test="socialCreditCode != null and socialCreditCode != ''"> and vi.social_credit_code = #{socialCreditCode}</if>
<if test="abnormalVisitTag != null and abnormalVisitTag != ''"> and vi.abnormal_visit_tag = #{abnormalVisitTag}</if> <if test="abnormalVisitTag != null and abnormalVisitTag != ''"> and vi.abnormal_visit_tag = #{abnormalVisitTag}</if>
@@ -1410,4 +1425,4 @@
order by vi.sign_in_time desc order by vi.sign_in_time desc
</select> </select>
</mapper> </mapper>

View File

@@ -215,6 +215,13 @@
<version>${ruoyi.version}</version> <version>${ruoyi.version}</version>
</dependency> </dependency>
<!-- 数字支行-客群模块 -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ibs-group</artifactId>
<version>3.8.8</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>

View File

@@ -38,6 +38,10 @@
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ibs</artifactId> <artifactId>ibs</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ibs-group</artifactId>
</dependency>
</dependencies> </dependencies>

View File

@@ -1,6 +1,7 @@
package com.ruoyi.quartz.task; package com.ruoyi.quartz.task;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.group.service.ICustGroupService;
import com.ruoyi.ibs.cmpm.service.GridCmpmService; import com.ruoyi.ibs.cmpm.service.GridCmpmService;
import com.ruoyi.ibs.dashboard.service.FileOptService; import com.ruoyi.ibs.dashboard.service.FileOptService;
import com.ruoyi.ibs.draw.service.DrawGridCustService; import com.ruoyi.ibs.draw.service.DrawGridCustService;
@@ -47,6 +48,9 @@ public class RyTask
@Resource @Resource
private AddressAnalyseService addressAnalyseService; private AddressAnalyseService addressAnalyseService;
@Resource
private ICustGroupService custGroupService;
public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i)
{ {
@@ -111,4 +115,12 @@ public class RyTask
addressAnalyseService.pointInGeometryScheduled(); addressAnalyseService.pointInGeometryScheduled();
} }
public void updateDynamicCustGroups() {
custGroupService.updateDynamicCustGroups();
}
public void checkAndDisableExpiredGroups() {
custGroupService.checkAndDisableExpiredGroups();
}
} }

View File

@@ -133,8 +133,13 @@ public class SysDeptServiceImpl implements ISysDeptService
@Override @Override
public List<TreeSelect> selectDeptTreeListForTopGrid(SysDept dept) { public List<TreeSelect> selectDeptTreeListForTopGrid(SysDept dept) {
List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept); List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept);
List<SysDept> branchs = depts.stream().filter(sysDept -> !sysDept.getDeptType().equals("outlet")) if (depts == null || depts.isEmpty()) {
.filter(sysDept -> !sysDept.getDeptType().equals("head")) return Collections.emptyList();
}
List<SysDept> branchs = depts.stream()
.filter(Objects::nonNull)
.filter(sysDept -> !"outlet".equals(sysDept.getDeptType()))
.filter(sysDept -> !"head".equals(sysDept.getDeptType()))
.collect(Collectors.toList()); .collect(Collectors.toList());
return buildDeptTreeSelect(branchs); return buildDeptTreeSelect(branchs);
} }

View File

@@ -142,7 +142,7 @@
<el-dropdown-item @click.native="handleExportAll">导出前1000条<i class="quesiton"></i></el-dropdown-item> <el-dropdown-item @click.native="handleExportAll">导出前1000条<i class="quesiton"></i></el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<template v-if="selectedTab === '2' && is825"> <template v-if="selectedTab === '2' && canSeeBusinessImport">
<div class="import-action"> <div class="import-action">
<el-upload <el-upload
ref="businessImportUploadRef" ref="businessImportUploadRef"
@@ -367,6 +367,9 @@ export default {
} }
return this.tableData return this.tableData
}, },
isHeadAdmin() {
return this.roles.includes('headAdmin')
},
isPublic() { isPublic() {
return this.roles.includes('headPublic') return this.roles.includes('headPublic')
}, },
@@ -379,6 +382,9 @@ export default {
is825() { is825() {
return String(this.deptId || '').substring(0, 3) === '825' return String(this.deptId || '').substring(0, 3) === '825'
}, },
canSeeBusinessImport() {
return this.is825 && (this.isHeadAdmin || this.isPublic || this.isPrivate || this.isOps)
},
// 客户经理 // 客户经理
isCommonManager() { isCommonManager() {
return this.roles.includes('commonManager') return this.roles.includes('commonManager')

View File

@@ -1,8 +1,18 @@
<template> <template>
<div class="customer-wrap"> <div class="customer-wrap">
<!-- 搜索区域 --> <el-radio-group v-model="activeTab" class="group-tab-radio" @input="handleTabChange">
<div class="search-area" v-show="showSearch"> <el-radio-button label="mine">我创建的</el-radio-button>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="80px"> <el-radio-button label="sharedToMe">下发给我的</el-radio-button>
</el-radio-group>
<div v-show="showSearch" class="search-area">
<el-form
ref="queryForm"
:model="queryParams"
size="small"
:inline="true"
label-width="80px"
>
<el-form-item label="客群名称" prop="groupName"> <el-form-item label="客群名称" prop="groupName">
<el-input <el-input
v-model="queryParams.groupName" v-model="queryParams.groupName"
@@ -13,13 +23,23 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="客群模式" prop="groupMode"> <el-form-item label="客群模式" prop="groupMode">
<el-select v-model="queryParams.groupMode" placeholder="请选择" clearable style="width: 150px"> <el-select
v-model="queryParams.groupMode"
placeholder="请选择"
clearable
style="width: 150px"
>
<el-option label="静态" value="0" /> <el-option label="静态" value="0" />
<el-option label="动态" value="1" /> <el-option label="动态" value="1" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="创建方式" prop="createMode"> <el-form-item label="创建方式" prop="createMode">
<el-select v-model="queryParams.createMode" placeholder="请选择" clearable style="width: 150px"> <el-select
v-model="queryParams.createMode"
placeholder="请选择"
clearable
style="width: 150px"
>
<el-option label="模板导入" value="1" /> <el-option label="模板导入" value="1" />
<el-option label="绩效网格" value="2" /> <el-option label="绩效网格" value="2" />
<el-option label="地理网格" value="3" /> <el-option label="地理网格" value="3" />
@@ -27,31 +47,61 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客群状态" prop="groupStatus"> <el-form-item label="客群状态" prop="groupStatus">
<el-select v-model="queryParams.groupStatus" placeholder="请选择" clearable style="width: 150px"> <el-select
v-model="queryParams.groupStatus"
placeholder="请选择"
clearable
style="width: 150px"
>
<el-option label="正常" value="0" /> <el-option label="正常" value="0" />
<el-option label="已禁用" value="1" /> <el-option label="已禁用" value="1" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button> 搜索
</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">
重置
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<!-- 操作栏 -->
<section class="operate-cnt"> <section class="operate-cnt">
<div class="operate-left"> <div class="operate-left">
<el-button type="primary" icon="el-icon-plus" size="small" @click="handleAdd">新增</el-button> <template v-if="isMineTab">
<el-button type="danger" icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete">删除</el-button> <el-button type="primary" icon="el-icon-plus" size="small" @click="handleAdd">
新增
</el-button>
<el-button
type="danger"
icon="el-icon-delete"
size="small"
:disabled="multiple"
@click="handleDelete"
>
删除
</el-button>
</template>
</div> </div>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" />
</section> </section>
<!-- 表格区域 -->
<div class="main_table"> <div class="main_table">
<el-table v-loading="loading" :data="groupList" @selection-change="handleSelectionChange" style="width: 100%" max-height="625"> <el-table
<el-table-column type="selection" width="55" align="center" /> v-loading="loading"
:data="groupList"
style="width: 100%"
max-height="625"
@selection-change="handleSelectionChange"
>
<el-table-column
v-if="isMineTab"
type="selection"
width="55"
align="center"
/>
<el-table-column label="客群名称" prop="groupName" min-width="180" show-overflow-tooltip /> <el-table-column label="客群名称" prop="groupName" min-width="180" show-overflow-tooltip />
<el-table-column label="客群模式" align="center" width="100"> <el-table-column label="客群模式" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -78,14 +128,36 @@
<el-table-column label="创建时间" prop="createTime" width="180" /> <el-table-column label="创建时间" prop="createTime" width="180" />
<el-table-column label="操作" align="center" width="180" fixed="right"> <el-table-column label="操作" align="center" width="180" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)">查看</el-button> <el-button
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">编辑</el-button> size="mini"
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button> type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
>
查看
</el-button>
<template v-if="isMineTab">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>
编辑
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>
删除
</el-button>
</template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页 -->
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
@@ -95,7 +167,6 @@
/> />
</div> </div>
<!-- 创建/编辑客群弹窗 -->
<create-dialog <create-dialog
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
:group-data="form" :group-data="form"
@@ -114,44 +185,63 @@ export default {
components: { CreateDialog }, components: { CreateDialog },
data() { data() {
return { return {
// 加载状态
loading: false, loading: false,
// 显示搜索
showSearch: true, showSearch: true,
// 选中ID数组 activeTab: 'mine',
ids: [], ids: [],
// 非单个禁用
single: true, single: true,
// 非多个禁用
multiple: true, multiple: true,
// 总条数
total: 0, total: 0,
// 客群列表
groupList: [], groupList: [],
// 弹窗显示
dialogVisible: false, dialogVisible: false,
// 是否编辑
isEdit: false, isEdit: false,
// 表单数据
form: {}, form: {},
// 查询参数 refreshTimer: null,
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
groupName: null, groupName: null,
groupMode: null, groupMode: null,
createMode: null, createMode: null,
groupStatus: null groupStatus: null,
viewType: 'mine'
} }
} }
}, },
computed: {
isMineTab() {
return this.activeTab === 'mine'
}
},
created() { created() {
this.getList() this.getList()
}, },
beforeDestroy() {
this.clearRefreshTimer()
},
methods: { methods: {
/** 查询客群列表 */ clearRefreshTimer() {
if (this.refreshTimer) {
clearTimeout(this.refreshTimer)
this.refreshTimer = null
}
},
refreshList(delay = 0) {
this.clearRefreshTimer()
if (delay > 0) {
this.refreshTimer = setTimeout(() => {
this.getList()
this.refreshTimer = null
}, delay)
return
}
this.getList()
},
getList() { getList() {
this.loading = true this.loading = true
this.queryParams.viewType = this.activeTab
listCustGroup(this.queryParams).then(response => { listCustGroup(this.queryParams).then(response => {
this.groupList = response.rows this.groupList = response.rows
this.total = response.total this.total = response.total
@@ -161,33 +251,46 @@ export default {
}) })
}, },
/** 搜索按钮操作 */ handleTabChange() {
this.ids = []
this.single = true
this.multiple = true
this.queryParams.pageNum = 1
this.queryParams.viewType = this.activeTab
this.getList()
},
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
this.getList() this.getList()
}, },
/** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm('queryForm') this.resetForm('queryForm')
this.queryParams.pageNum = 1
this.queryParams.pageSize = 10
this.queryParams.viewType = this.activeTab
this.handleQuery() this.handleQuery()
}, },
/** 多选框选中数据 */
handleSelectionChange(selection) { handleSelectionChange(selection) {
if (!this.isMineTab) {
this.ids = []
this.single = true
this.multiple = true
return
}
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset() this.reset()
this.isEdit = false this.isEdit = false
this.dialogVisible = true this.dialogVisible = true
}, },
/** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset()
const id = row.id || this.ids[0] const id = row.id || this.ids[0]
@@ -198,7 +301,6 @@ export default {
}) })
}, },
/** 查看按钮操作 */
handleView(row) { handleView(row) {
this.$router.push({ this.$router.push({
path: '/group/custGroup/detail', path: '/group/custGroup/detail',
@@ -206,24 +308,22 @@ export default {
}) })
}, },
/** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id ? [row.id] : this.ids const ids = row.id ? [row.id] : this.ids
this.$modal.confirm('是否确认删除选中的客群?').then(() => { this.$modal.confirm('是否确认删除选中的客群?').then(() => {
return deleteCustGroup(ids) return deleteCustGroup(ids)
}).then(() => { }).then(() => {
this.getList() this.refreshList()
this.$modal.msgSuccess('删除成功') this.$modal.msgSuccess('删除成功')
}).catch(() => {}) }).catch(() => {})
}, },
/** 提交表单 */
handleSubmit() { handleSubmit() {
this.dialogVisible = false this.dialogVisible = false
this.getList() this.queryParams.pageNum = 1
this.refreshList(800)
}, },
/** 表单重置 */
reset() { reset() {
this.form = { this.form = {
id: null, id: null,
@@ -249,6 +349,64 @@ export default {
border-radius: 16px 16px 0 0; border-radius: 16px 16px 0 0;
padding: 24px 30px; padding: 24px 30px;
.group-tab-radio {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #ebebeb;
margin-bottom: 8px;
.el-radio-button {
flex: 1;
::v-deep .el-radio-button__inner {
width: 100%;
border: none;
font-weight: 400;
letter-spacing: 0.44px;
line-height: 25px;
font-size: 16px;
color: #666666;
padding: 11px 0 12px 0;
border-radius: 0;
box-shadow: none;
}
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
background-color: #4886f8;
font-weight: 400;
color: #ffffff;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
&:nth-child(2) {
&::before,
&::after {
content: '';
position: absolute;
top: 50%;
transform: translateY(-50%);
height: 21px;
width: 1px;
background: #ebebeb;
z-index: 1;
}
&::after {
right: 1px;
}
}
&.is-active {
&::before,
&::after {
content: none;
}
}
}
}
.search-area { .search-area {
padding: 16px 0; padding: 16px 0;
border-bottom: 1px solid #ebebeb; border-bottom: 1px solid #ebebeb;
@@ -272,6 +430,7 @@ export default {
.operate-left { .operate-left {
display: flex; display: flex;
gap: 8px; gap: 8px;
min-height: 32px;
} }
.el-button { .el-button {

View File

@@ -63,6 +63,15 @@
@clear="handleSearch" @clear="handleSearch"
/> />
</el-form-item> </el-form-item>
<el-form-item label="柜员号" class="staff-id-filter">
<el-input
v-model="searchForm.visId"
placeholder="请输入"
@blur="handleSearch"
clearable
@clear="handleSearch"
/>
</el-form-item>
<el-form-item label="走访时间"> <el-form-item label="走访时间">
<el-date-picker <el-date-picker
v-model="searchForm.visTime" v-model="searchForm.visTime"
@@ -362,6 +371,18 @@
width="150px" width="150px"
v-if="columns[16].visible" v-if="columns[16].visible"
></el-table-column> ></el-table-column>
<el-table-column align="left" prop="interAddr" label="实地拜访地址" show-overflow-tooltip width="180px" v-if="columns[17].visible"></el-table-column>
<el-table-column align="left" prop="colStafName" label="协同走访客户经理" show-overflow-tooltip width="160px" v-if="columns[18].visible"></el-table-column>
<el-table-column align="left" prop="laterNote" label="事后备注" show-overflow-tooltip width="180px" v-if="columns[19].visible"></el-table-column>
<el-table-column align="left" prop="intentionProductValue" label="走访反馈" show-overflow-tooltip width="160px" v-if="columns[20].visible"></el-table-column>
<el-table-column align="left" prop="feedbackStatus" label="反馈状态" show-overflow-tooltip width="120px" v-if="columns[21].visible"></el-table-column>
<el-table-column align="left" prop="sourceOfInterview" label="走访来源" show-overflow-tooltip width="140px" v-if="columns[22].visible"></el-table-column>
<el-table-column align="left" prop="filename" label="批量导入文件名" show-overflow-tooltip width="180px" v-if="columns[23].visible"></el-table-column>
<el-table-column align="left" prop="outCallStatus" label="外呼状态" show-overflow-tooltip width="120px" v-if="columns[24].visible"></el-table-column>
<el-table-column align="left" prop="outCallIntention" label="客户意愿" show-overflow-tooltip width="140px" v-if="columns[25].visible"></el-table-column>
<el-table-column align="left" prop="source" label="来源" show-overflow-tooltip width="120px" v-if="columns[26].visible"></el-table-column>
<el-table-column align="left" prop="analysisValue" label="nlp模型提取" show-overflow-tooltip width="140px" v-if="columns[27].visible"></el-table-column>
<el-table-column align="left" prop="facility" label="预授信额度" show-overflow-tooltip width="140px" v-if="columns[28].visible"></el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
@size-change="handleSizeChange" @size-change="handleSizeChange"
@@ -390,6 +411,7 @@ export default {
pageNum: 1, pageNum: 1,
searchForm: { searchForm: {
visName: "", visName: "",
visId: "",
visTime: "", visTime: "",
custIdc: "", custIdc: "",
socialCreditCode: '', socialCreditCode: '',
@@ -415,11 +437,23 @@ export default {
{ key: 13, label: "签到坐标", visible: true }, { key: 13, label: "签到坐标", visible: true },
{ key: 14, label: "签退坐标", visible: true }, { key: 14, label: "签退坐标", visible: true },
{ key: 15, label: "是否为有效客户", visible: true }, { key: 15, label: "是否为有效客户", visible: true },
{ key: 16, 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: "nlp模型提取", visible: true },
{ key: 28, label: "预授信额度", visible: true }
], ],
columns875: [ columns875: [
{ key: 17, label: "异常走访标签", visible: true }, { key: 29, label: "异常走访标签", visible: true },
{ key: 18, label: "异常走访信息", visible: true }, { key: 30, label: "异常走访信息", visible: true },
] ]
}; };
}, },
@@ -492,6 +526,7 @@ export default {
custType: this.selectedTab, custType: this.selectedTab,
visTime: this.searchForm.visTime, visTime: this.searchForm.visTime,
visName: this.searchForm.visName, visName: this.searchForm.visName,
visId: this.searchForm.visId,
custIdc: this.searchForm.custIdc, custIdc: this.searchForm.custIdc,
socialCreditCode: this.searchForm.socialCreditCode, socialCreditCode: this.searchForm.socialCreditCode,
abnormalVisitTag: this.searchForm.abnormalVisitTag, abnormalVisitTag: this.searchForm.abnormalVisitTag,
@@ -508,7 +543,16 @@ export default {
}); });
}, },
handleRefersh() { handleRefersh() {
this.searchForm = {}; this.searchForm = {
visName: "",
visId: "",
visTime: "",
custIdc: "",
socialCreditCode: '',
abnormalVisitTag: '',
marketingWay: '',
interRes: ''
};
this.initVisitingTaskList(); this.initVisitingTaskList();
}, },
handleSizeChange(newSize) { handleSizeChange(newSize) {
@@ -523,7 +567,16 @@ export default {
this.initVisitingTaskList(); this.initVisitingTaskList();
}, },
resetFilters() { resetFilters() {
this.searchForm = {}; this.searchForm = {
visName: "",
visId: "",
visTime: "",
custIdc: "",
socialCreditCode: '',
abnormalVisitTag: '',
marketingWay: '',
interRes: ''
};
this.initVisitingTaskList(); this.initVisitingTaskList();
}, },
}, },
@@ -565,67 +618,6 @@ export default {
line-height: 30px; line-height: 30px;
} }
.header-radio {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #ebebeb;
.btn-disabled {
::v-deep .el-radio-button__inner {
background-color: #e7e7e7;
}
}
.el-radio-button {
flex: 1;
::v-deep .el-radio-button__inner {
width: 100%;
border: none;
font-weight: 400;
letter-spacing: 0.44px;
line-height: 25px;
font-size: 16px;
color: #666666;
padding: 11px 0 12px 0;
}
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
background-color: #4886f8;
font-weight: 400;
color: #ffffff;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
&:nth-child(2) {
&::before,
&::after {
content: "";
position: absolute;
top: 50%;
transform: translateY(-50%);
height: 21px;
width: 1px;
background: #ebebeb;
z-index: 1;
}
&::after {
right: 1px;
}
}
&.is-active {
&::before,
&::after {
content: none;
}
}
}
}
.btn-disabled { .btn-disabled {
::v-deep .el-radio-button__inner { ::v-deep .el-radio-button__inner {
background-color: #e7e7e7; background-color: #e7e7e7;
@@ -647,7 +639,6 @@ export default {
.el-radio-button { .el-radio-button {
flex: 1; flex: 1;
border: 1px solid #ccc;
::v-deep .el-radio-button__inner { ::v-deep .el-radio-button__inner {
width: 100%; width: 100%;
@@ -725,6 +716,11 @@ export default {
.searchForm { .searchForm {
margin-top: 20px; margin-top: 20px;
.staff-id-filter {
clear: left;
margin-left: 0 !important;
}
} }
.operate-cnt { .operate-cnt {