企业中心详情

pull/1/head
杨世强 1 year ago
parent 686c3ce2fe
commit bae87e892b

@ -178,17 +178,17 @@ public class BusinessWarehouseController {
@Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:business-warehouse:enterprise-user')") @PreAuthorize("@ss.hasPermission('system:business-warehouse:enterprise-user')")
public CommonResult<PageResult<BusinessUserVO>> getUserPage( BusinessUserVO reqVO) { public CommonResult<PageResult<BusinessUserVO>> getUserPage( BusinessUserVO reqVO) {
String ids = ""; // String ids = "";
List<BusinessWarehouseDO> tempList = new ArrayList<>(); // List<BusinessWarehouseDO> tempList = new ArrayList<>();
List<BusinessWarehouseDO> businessList = businessWarehouseService.getBusinessList(reqVO.getId()); // List<BusinessWarehouseDO> businessList = businessWarehouseService.getBusinessList(reqVO.getId());
List<BusinessWarehouseDO> warehouseList = businessWarehouseService.getWarehouseList(reqVO.getId()); // List<BusinessWarehouseDO> warehouseList = businessWarehouseService.getWarehouseList(reqVO.getId());
tempList.addAll(businessList); // tempList.addAll(businessList);
tempList.addAll(warehouseList); // tempList.addAll(warehouseList);
for (BusinessWarehouseDO entity : tempList){ // for (BusinessWarehouseDO entity : tempList){
ids = ids + entity.getId() + ","; // ids = ids + entity.getId() + ",";
} // }
ids = ids.substring(0, ids.length() - 1); // ids = ids.substring(0, ids.length() - 1);
PageResult<BusinessUserVO> pageResult = businessWarehouseService.queryUserList(ids,reqVO); PageResult<BusinessUserVO> pageResult = businessWarehouseService.queryUserList(reqVO);
return success(pageResult); return success(pageResult);
} }

@ -25,6 +25,7 @@ import javax.validation.*;
import javax.servlet.http.*; import javax.servlet.http.*;
import java.util.*; import java.util.*;
import java.io.IOException; import java.io.IOException;
import java.util.stream.Collectors;
import com.yunxi.scm.framework.common.pojo.PageResult; import com.yunxi.scm.framework.common.pojo.PageResult;
import com.yunxi.scm.framework.common.pojo.CommonResult; import com.yunxi.scm.framework.common.pojo.CommonResult;
@ -168,7 +169,7 @@ public class EnterpriseController {
} }
@GetMapping("/simpleBusiness") @GetMapping("/simpleBusiness")
@Operation(summary = "获得企业-业务线精简信息") @Operation(summary = "获得企业-业务线-仓库精简信息")
@Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:enterprise:simpleBusiness')") @PreAuthorize("@ss.hasPermission('system:enterprise:simpleBusiness')")
public CommonResult<List<EnterpriseSimpleVO>> getEnterpriseSimple() { public CommonResult<List<EnterpriseSimpleVO>> getEnterpriseSimple() {
@ -181,6 +182,7 @@ public class EnterpriseController {
List<EnterpriseSimpleVO> enterpriseSimpleVOList = EnterpriseConvert.INSTANCE.convertList03(list); List<EnterpriseSimpleVO> enterpriseSimpleVOList = EnterpriseConvert.INSTANCE.convertList03(list);
List<EnterpriseSimpleVO> enterpriseSimpleList = new ArrayList<>(enterpriseSimpleVOList); List<EnterpriseSimpleVO> enterpriseSimpleList = new ArrayList<>(enterpriseSimpleVOList);
List<EnterpriseSimpleVO> temp = new ArrayList<>(); List<EnterpriseSimpleVO> temp = new ArrayList<>();
List<EnterpriseSimpleVO> temp2 = new ArrayList<>();
for (EnterpriseSimpleVO enterpriseSimpleVO : enterpriseSimpleList) { for (EnterpriseSimpleVO enterpriseSimpleVO : enterpriseSimpleList) {
//查询出业务线List //查询出业务线List
@ -197,14 +199,16 @@ public class EnterpriseController {
for (EnterpriseSimpleVO entity2 : warehouseStringList){ for (EnterpriseSimpleVO entity2 : warehouseStringList){
entity2.setId("C-" + entity2.getId()); entity2.setId("C-" + entity2.getId());
entity2.setParentId("B-" + entity2.getParentId()); entity2.setParentId("B-" + entity2.getParentId());
temp.add(entity2); temp2.add(entity2);
} }
temp.add(entity); temp.add(entity);
} }
enterpriseSimpleVO.setId("A-" + enterpriseSimpleVO.getId()); enterpriseSimpleVO.setId("A-" + enterpriseSimpleVO.getId());
enterpriseSimpleVO.setParentId("A-" + enterpriseSimpleVO.getParentId()); enterpriseSimpleVO.setParentId("A-" + enterpriseSimpleVO.getParentId());
} }
temp2 = temp2.stream().distinct().collect(Collectors.toList());
enterpriseSimpleList.addAll(temp); enterpriseSimpleList.addAll(temp);
enterpriseSimpleList.addAll(temp2);
return success(enterpriseSimpleList); return success(enterpriseSimpleList);
} }
@ -222,6 +226,7 @@ public class EnterpriseController {
List<EnterpriseSimpleVO> enterpriseSimpleVOList = EnterpriseConvert.INSTANCE.convertList03(list); List<EnterpriseSimpleVO> enterpriseSimpleVOList = EnterpriseConvert.INSTANCE.convertList03(list);
List<EnterpriseSimpleVO> enterpriseSimpleList = new ArrayList<>(enterpriseSimpleVOList); List<EnterpriseSimpleVO> enterpriseSimpleList = new ArrayList<>(enterpriseSimpleVOList);
List<EnterpriseSimpleVO> temp = new ArrayList<>(); List<EnterpriseSimpleVO> temp = new ArrayList<>();
List<EnterpriseSimpleVO> temp2 = new ArrayList<>();
for (EnterpriseSimpleVO enterpriseSimpleVO : enterpriseSimpleList) { for (EnterpriseSimpleVO enterpriseSimpleVO : enterpriseSimpleList) {
//查询出部门List //查询出部门List
@ -238,14 +243,16 @@ public class EnterpriseController {
for (EnterpriseSimpleVO entity2 : deptChildList){ for (EnterpriseSimpleVO entity2 : deptChildList){
entity2.setId("C-" + entity2.getId()); entity2.setId("C-" + entity2.getId());
entity2.setParentId("B-" + entity2.getParentId()); entity2.setParentId("B-" + entity2.getParentId());
temp.add(entity2); temp2.add(entity2);
} }
temp.add(entity); temp.add(entity);
} }
enterpriseSimpleVO.setId("A-" + enterpriseSimpleVO.getId()); enterpriseSimpleVO.setId("A-" + enterpriseSimpleVO.getId());
enterpriseSimpleVO.setParentId("A-" + enterpriseSimpleVO.getParentId()); enterpriseSimpleVO.setParentId("A-" + enterpriseSimpleVO.getParentId());
} }
temp2 = temp2.stream().distinct().collect(Collectors.toList());
enterpriseSimpleList.addAll(temp); enterpriseSimpleList.addAll(temp);
enterpriseSimpleList.addAll(temp2);
return success(enterpriseSimpleList); return success(enterpriseSimpleList);
} }
@ -273,4 +280,51 @@ public class EnterpriseController {
return success(pageResult); return success(pageResult);
} }
@GetMapping("/simpleEnterprise")
@Operation(summary = "获得企业-业务线精简信息")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:enterprise:simpleEnterprise')")
public CommonResult<List<EnterpriseSimpleVO>> getEnterpriseBusinessSimple() {
EnterprisePageReqVO pageVO = new EnterprisePageReqVO();
//只查询企业状态为开启的
pageVO.setEnterpriseStatus("0");
PageResult<EnterpriseDO> pageResult = enterpriseService.getEnterprisePage(pageVO);
List<EnterpriseDO> list = pageResult.getList();
//查询出企业List
List<EnterpriseSimpleVO> enterpriseSimpleVOList = EnterpriseConvert.INSTANCE.convertList03(list);
List<EnterpriseSimpleVO> enterpriseSimpleList = new ArrayList<>(enterpriseSimpleVOList);
List<EnterpriseSimpleVO> temp = new ArrayList<>();
for (EnterpriseSimpleVO enterpriseSimpleVO : enterpriseSimpleList) {
//查询出业务线List
List<BusinessWarehouseDO> businessWarehouseDOList = enterpriseService.queryBusinessList(Long.parseLong(enterpriseSimpleVO.getId()));
List<EnterpriseSimpleVO> businessLineList = EnterpriseConvert.INSTANCE.convertList04(businessWarehouseDOList);
for (EnterpriseSimpleVO entity : businessLineList){
entity.setId("B-" + entity.getId());
entity.setParentId("A-" + enterpriseSimpleVO.getId());
temp.add(entity);
}
enterpriseSimpleVO.setId("A-" + enterpriseSimpleVO.getId());
enterpriseSimpleVO.setParentId("A-" + enterpriseSimpleVO.getParentId());
}
enterpriseSimpleList.addAll(temp);
return success(enterpriseSimpleList);
}
@GetMapping("/enterprise")
@Operation(summary = "获得企业精简信息")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:enterprise:enterprise')")
public CommonResult<List<EnterpriseSimpleVO>> getEnterprise() {
EnterprisePageReqVO pageVO = new EnterprisePageReqVO();
//只查询企业状态为开启的
pageVO.setEnterpriseStatus("0");
PageResult<EnterpriseDO> pageResult = enterpriseService.getEnterprisePage(pageVO);
List<EnterpriseDO> list = pageResult.getList();
//查询出企业List
return success(EnterpriseConvert.INSTANCE.convertList03(list));
}
} }

@ -151,4 +151,7 @@ public class AdminUserDO extends TenantBaseDO {
@TableField(exist = false) @TableField(exist = false)
private TenantDO tenantDO; private TenantDO tenantDO;
private String creator;
private String updater;
} }

@ -144,7 +144,7 @@ public interface BusinessWarehouseMapper extends BaseMapperX<BusinessWarehouseDO
List<BusinessWarehouseDO> getBusinessList(Long id); List<BusinessWarehouseDO> getBusinessList(Long id);
List<BusinessWarehouseDO> getWarehouseList(Long id); List<BusinessWarehouseDO> getWarehouseList(Long id);
IPage<BusinessUserVO> queryUserList(@Param("page") Page<BusinessUserVO> page,@Param("ids") String ids, @Param("req") BusinessUserVO req); IPage<BusinessUserVO> queryUserList(@Param("page") Page<BusinessUserVO> page, @Param("req") BusinessUserVO req);
IPage<BusinessUserVO> queryUserList2(@Param("page") Page<BusinessUserVO> page, @Param("req") BusinessUserVO req); IPage<BusinessUserVO> queryUserList2(@Param("page") Page<BusinessUserVO> page, @Param("req") BusinessUserVO req);

@ -127,7 +127,7 @@ public interface BusinessWarehouseService {
List<BusinessWarehouseDO> getBusinessList (Long id); List<BusinessWarehouseDO> getBusinessList (Long id);
List<BusinessWarehouseDO> getWarehouseList (Long id); List<BusinessWarehouseDO> getWarehouseList (Long id);
PageResult<BusinessUserVO> queryUserList(String ids, BusinessUserVO reqVO); PageResult<BusinessUserVO> queryUserList( BusinessUserVO reqVO);
List<BusinessWarehouseDO> getWarehouseList2(Long id); List<BusinessWarehouseDO> getWarehouseList2(Long id);
PageResult<BusinessUserVO> queryUserList2( BusinessUserVO reqVO); PageResult<BusinessUserVO> queryUserList2( BusinessUserVO reqVO);

@ -159,9 +159,9 @@ public class BusinessWarehouseServiceImpl implements BusinessWarehouseService {
} }
@Override @Override
public PageResult<BusinessUserVO> queryUserList(String ids, BusinessUserVO reqVO) { public PageResult<BusinessUserVO> queryUserList( BusinessUserVO reqVO) {
Page<BusinessUserVO> page = new Page<>(reqVO.getPageNo(), reqVO.getPageSize()); Page<BusinessUserVO> page = new Page<>(reqVO.getPageNo(), reqVO.getPageSize());
IPage<BusinessUserVO> result = businessWarehouseMapper.queryUserList(page,ids,reqVO); IPage<BusinessUserVO> result = businessWarehouseMapper.queryUserList(page,reqVO);
return new PageResult<>(result.getRecords(), result.getTotal()); return new PageResult<>(result.getRecords(), result.getTotal());
} }

@ -38,8 +38,8 @@
AND t2.id = #{req.businessId} AND t2.id = #{req.businessId}
</if> </if>
<if test="req.nickname != null and req.nickname != ''"> <if test="req.nickname != null and req.nickname != ''">
AND t.nickname LIKE concat('%',#{req.nickname},'%') OR t.job_number LIKE concat('%',#{req.nickname},'%') AND (t.nickname LIKE concat('%',#{req.nickname},'%') OR t.job_number LIKE concat('%',#{req.nickname},'%')
OR t.mobile LIKE concat('%',#{req.nickname},'%') OR t.email LIKE concat('%',#{req.nickname},'%') OR t.mobile LIKE concat('%',#{req.nickname},'%') OR t.email LIKE concat('%',#{req.nickname},'%'))
</if> </if>
<if test="req.deptId != null and req.deptId != ''"> <if test="req.deptId != null and req.deptId != ''">
AND t.dept_id = #{req.deptId} AND t.dept_id = #{req.deptId}
@ -129,37 +129,40 @@
<select id="queryUserList" resultType="com.yunxi.scm.module.system.controller.admin.businesswarehouse.vo.BusinessUserVO"> <select id="queryUserList" resultType="com.yunxi.scm.module.system.controller.admin.businesswarehouse.vo.BusinessUserVO">
SELECT SELECT
t.*, t.*,
t.STATUS AS accountStatus, t.STATUS AS accountStatus,
t3.NAME AS deptName, t3.NAME AS deptName,
GROUP_CONCAT( DISTINCT t5.NAME ) AS postName, GROUP_CONCAT( DISTINCT t5.NAME ) AS postName,
GROUP_CONCAT( DISTINCT t2.NAME ) AS businessName GROUP_CONCAT( DISTINCT t2.NAME ) AS businessName
FROM FROM
system_users t system_users t
LEFT JOIN system_business_user_relational t1 ON ( t1.user_id = t.id ) LEFT JOIN system_user_enterprise_relational t1 ON ( t1.user_id = t.id )
LEFT JOIN system_business_warehouse t2 ON ( t2.id = t1.business_id ) LEFT JOIN system_enterprise t2 ON ( t2.id = t1.enterprise_id )
LEFT JOIN system_dept t3 ON ( t3.id = t.dept_id ) LEFT JOIN system_dept t3 ON ( t3.id = t.dept_id )
LEFT JOIN system_user_post t4 ON ( t4.user_id = t.id ) LEFT JOIN system_user_post t4 ON ( t4.user_id = t.id )
LEFT JOIN system_post t5 ON ( t5.id = t4.post_id ) LEFT JOIN system_post t5 ON ( t5.id = t4.post_id )
WHERE WHERE
t.deleted = 0 t.deleted = 0
AND t1.deleted = 0 AND t1.deleted = 0
AND t2.deleted = 0 AND t2.deleted = 0
AND t3.deleted = 0 AND t3.deleted = 0
AND t4.deleted = 0 AND t4.deleted = 0
AND t5.deleted = 0 AND t5.deleted = 0
<if test="ids != null and ids != ''"> <if test="req.id != null and req.id != ''">
AND FIND_IN_SET(t2.id,#{ids}) AND (t2.id = #{req.id} OR t2.parent_id = #{req.id})
</if> </if>
<if test="req.nickname != null and req.nickname != ''"> <if test="req.nickname != null and req.nickname != ''">
AND t.nickname LIKE concat('%',#{req.nickname},'%') OR t.job_number LIKE concat('%',#{req.nickname},'%') AND (t.nickname LIKE concat('%',#{req.nickname},'%') OR t.job_number LIKE concat('%',#{req.nickname},'%')
OR t.mobile LIKE concat('%',#{req.nickname},'%') OR t.email LIKE concat('%',#{req.nickname},'%') OR t.mobile LIKE concat('%',#{req.nickname},'%') OR t.email LIKE concat('%',#{req.nickname},'%'))
</if> </if>
<if test="req.deptId != null and req.deptId != ''"> <if test="req.deptId != null and req.deptId != ''">
AND t.dept_id = #{req.deptId} AND t.dept_id = #{req.deptId}
</if> </if>
GROUP BY <if test="req.status != null and req.status != ''">
t.id AND t.status = #{status}
</if>
GROUP BY
t.id
</select> </select>
<select id="queryUserList2" resultType="com.yunxi.scm.module.system.controller.admin.businesswarehouse.vo.BusinessUserVO"> <select id="queryUserList2" resultType="com.yunxi.scm.module.system.controller.admin.businesswarehouse.vo.BusinessUserVO">
@ -184,12 +187,12 @@
AND t4.deleted = 0 AND t4.deleted = 0
AND t5.deleted = 0 AND t5.deleted = 0
<if test="req.id != null and req.id != ''"> <if test="req.id != null and req.id != ''">
AND t2.id = #{req.id} AND (t2.id = #{req.id}
OR t2.parent_id = #{req.id} OR t2.parent_id = #{req.id})
</if> </if>
<if test="req.nickname != null and req.nickname != ''"> <if test="req.nickname != null and req.nickname != ''">
AND t.nickname LIKE concat('%',#{req.nickname},'%') OR t.job_number LIKE concat('%',#{req.nickname},'%') AND (t.nickname LIKE concat('%',#{req.nickname},'%') OR t.job_number LIKE concat('%',#{req.nickname},'%')
OR t.mobile LIKE concat('%',#{req.nickname},'%') OR t.email LIKE concat('%',#{req.nickname},'%') OR t.mobile LIKE concat('%',#{req.nickname},'%') OR t.email LIKE concat('%',#{req.nickname},'%'))
</if> </if>
<if test="req.deptId != null and req.deptId != ''"> <if test="req.deptId != null and req.deptId != ''">
AND t.dept_id = #{req.deptId} AND t.dept_id = #{req.deptId}

@ -53,14 +53,14 @@
<select id="queryDeptList" resultType="com.yunxi.scm.module.system.dal.dataobject.dept.DeptDO"> <select id="queryDeptList" resultType="com.yunxi.scm.module.system.dal.dataobject.dept.DeptDO">
SELECT SELECT
b.* a.*
FROM FROM
system_user_enterprise_relational a system_dept a
LEFT JOIN system_dept b ON a.dept_id = b.id LEFT JOIN system_user_enterprise_relational b ON b.dept_id = a.id
WHERE WHERE
a.deleted = 0 a.deleted = 0
AND b.deleted = 0 AND b.deleted = 0
AND a.enterprise_id = #{id} AND b.enterprise_id = #{id}
</select> </select>

@ -1,5 +1,6 @@
package com.yunxi.scm.module.xxjj.controller.admin.subjectbasic; package com.yunxi.scm.module.xxjj.controller.admin.subjectbasic;
import com.yunxi.scm.module.system.dal.dataobject.dept.DeptDO;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -99,4 +100,19 @@ public class SubjectBasicController {
ExcelUtils.write(response, "基础业务信息表(客户,供应商,服务商主体).xls", "数据", SubjectBasicExcelVO.class, datas); ExcelUtils.write(response, "基础业务信息表(客户,供应商,服务商主体).xls", "数据", SubjectBasicExcelVO.class, datas);
} }
@GetMapping("/enterperise-custom")
@Operation(summary = "根据公司获得客户")
@PreAuthorize("@ss.hasPermission('xxjj:subject-basic:enterperise-custom')")
public CommonResult<PageResult<SubjectBasicRespVO>> getEnterperiseCustom(@Valid SubjectBasicPageReqVO reqVO) {
PageResult<SubjectBasicDO> pageResult = subjectBasicService.querySubjectByEnterprise(reqVO);
return success(SubjectBasicConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/business-custom")
@Operation(summary = "根据业务线获得客户")
@PreAuthorize("@ss.hasPermission('xxjj:subject-basic:business-custom')")
public CommonResult<PageResult<SubjectBasicRespVO>> getBusinessCustom(@Valid SubjectBasicPageReqVO reqVO) {
PageResult<SubjectBasicDO> pageResult = subjectBasicService.querySubjectByBusiness(reqVO);
return success(SubjectBasicConvert.INSTANCE.convertPage(pageResult));
}
} }

@ -35,6 +35,9 @@ public class SubjectBasicBaseVO {
@NotNull(message = "分类(0一级 1二级 2三级)不能为空") @NotNull(message = "分类(0一级 1二级 2三级)不能为空")
private String calssify; private String calssify;
@Schema(description = "客户编码", example = "赵六")
private String code;
@Schema(description = "客户名称", example = "赵六") @Schema(description = "客户名称", example = "赵六")
private String name; private String name;
@ -268,4 +271,22 @@ public class SubjectBasicBaseVO {
@Schema(description = "完税证明超时限制") @Schema(description = "完税证明超时限制")
private Long taxPaymentCertificate; private Long taxPaymentCertificate;
@Schema(description = "客户类型")
private String customType;
@Schema(description = "资金款项")
private String fundsType;
@Schema(description = "合作模式")
private String cooperateType;
@Schema(description = "公司名称")
private String companyName;
@Schema(description = "业务线名称")
private String businessName;
@Schema(description = "人员名称")
private String nickname;
} }

@ -35,6 +35,8 @@ public class SubjectBasicExcelVO {
@ExcelProperty("分类(0一级 1二级 2三级)") @ExcelProperty("分类(0一级 1二级 2三级)")
private String calssify; private String calssify;
@ExcelProperty("客户编码")
private String code;
@ExcelProperty("客户名称") @ExcelProperty("客户名称")
private String name; private String name;

@ -19,6 +19,9 @@ public class SubjectBasicExportReqVO {
@Schema(description = "分类(0一级 1二级 2三级)") @Schema(description = "分类(0一级 1二级 2三级)")
private String calssify; private String calssify;
@Schema(description = "客户编码", example = "赵六")
private String code;
@Schema(description = "客户名称", example = "赵六") @Schema(description = "客户名称", example = "赵六")
private String name; private String name;

@ -15,12 +15,18 @@ import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MON
@ToString(callSuper = true) @ToString(callSuper = true)
public class SubjectBasicPageReqVO extends PageParam { public class SubjectBasicPageReqVO extends PageParam {
@Schema(description = "id")
private Long id;
@Schema(description = "业务类型(0客户 1供应商 2服务商)", example = "2") @Schema(description = "业务类型(0客户 1供应商 2服务商)", example = "2")
private String businessType; private String businessType;
@Schema(description = "分类(0一级 1二级 2三级)") @Schema(description = "分类(0一级 1二级 2三级)")
private String calssify; private String calssify;
@Schema(description = "客户编码", example = "赵六")
private String code;
@Schema(description = "客户名称", example = "赵六") @Schema(description = "客户名称", example = "赵六")
private String name; private String name;
@ -247,4 +253,25 @@ public class SubjectBasicPageReqVO extends PageParam {
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime; private LocalDateTime[] createTime;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] updateTime;
@Schema(description = "客户类型")
private String customType;
@Schema(description = "资金款项")
private String fundsType;
@Schema(description = "合作模式")
private String cooperateType;
@Schema(description = "公司名称")
private String companyName;
@Schema(description = "业务线名称")
private String businessName;
@Schema(description = "人员名称")
private String nickname;
} }

@ -46,6 +46,10 @@ public class SubjectBasicDO extends BaseDO {
* (0 1 2) * (0 1 2)
*/ */
private String calssify; private String calssify;
/**
*
*/
private String code;
/** /**
* *
*/ */
@ -343,6 +347,19 @@ public class SubjectBasicDO extends BaseDO {
*/ */
private Long taxPaymentCertificate; private Long taxPaymentCertificate;
/**
*
*/
private String customType;
/**
*
*/
private String fundsType;
/**
*
*/
private String cooperateType;
@TableField(exist = false) @TableField(exist = false)
private String creatorName; private String creatorName;
/** /**
@ -352,4 +369,15 @@ public class SubjectBasicDO extends BaseDO {
*/ */
@TableField(exist = false) @TableField(exist = false)
private String updaterName; private String updaterName;
/** 公司名称*/
@TableField(exist = false)
private String companyName;
/** 业务线名称*/
@TableField(exist = false)
private String businessName;
/** 人员名称*/
@TableField(exist = false)
private String nickname;
} }

@ -2,13 +2,17 @@ package com.yunxi.scm.module.xxjj.dal.mysql.subjectbasic;
import java.util.*; import java.util.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yunxi.scm.framework.common.pojo.PageResult; import com.yunxi.scm.framework.common.pojo.PageResult;
import com.yunxi.scm.framework.mybatis.core.query.LambdaQueryWrapperX; import com.yunxi.scm.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.yunxi.scm.framework.mybatis.core.mapper.BaseMapperX; import com.yunxi.scm.framework.mybatis.core.mapper.BaseMapperX;
import com.yunxi.scm.module.system.controller.admin.businesswarehouse.vo.BusinessUserVO;
import com.yunxi.scm.module.xxjj.dal.dataobject.subjectbasic.SubjectBasicDO; import com.yunxi.scm.module.xxjj.dal.dataobject.subjectbasic.SubjectBasicDO;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import com.yunxi.scm.module.xxjj.controller.admin.subjectbasic.vo.*; import com.yunxi.scm.module.xxjj.controller.admin.subjectbasic.vo.*;
import org.apache.ibatis.annotations.Param;
/** /**
* () Mapper * () Mapper
@ -186,4 +190,7 @@ public interface SubjectBasicMapper extends BaseMapperX<SubjectBasicDO> {
.orderByDesc(SubjectBasicDO::getId)); .orderByDesc(SubjectBasicDO::getId));
} }
IPage<SubjectBasicDO> querySubjectByEnterprise(@Param("page") Page<SubjectBasicPageReqVO> page, @Param("req") SubjectBasicPageReqVO req);
IPage<SubjectBasicDO> querySubjectByBusiness(@Param("page") Page<SubjectBasicPageReqVO> page, @Param("req") SubjectBasicPageReqVO req);
} }

@ -67,4 +67,7 @@ public interface SubjectBasicService {
*/ */
List<SubjectBasicDO> getSubjectBasicList(SubjectBasicExportReqVO exportReqVO); List<SubjectBasicDO> getSubjectBasicList(SubjectBasicExportReqVO exportReqVO);
PageResult<SubjectBasicDO> querySubjectByEnterprise(SubjectBasicPageReqVO reqVO);
PageResult<SubjectBasicDO> querySubjectByBusiness(SubjectBasicPageReqVO reqVO);
} }

@ -1,5 +1,8 @@
package com.yunxi.scm.module.xxjj.service.subjectbasic; package com.yunxi.scm.module.xxjj.service.subjectbasic;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yunxi.scm.module.system.controller.admin.businesswarehouse.vo.BusinessUserVO;
import com.yunxi.scm.module.system.dal.dataobject.user.AdminUserDO; import com.yunxi.scm.module.system.dal.dataobject.user.AdminUserDO;
import com.yunxi.scm.module.system.service.user.AdminUserService; import com.yunxi.scm.module.system.service.user.AdminUserService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -97,4 +100,18 @@ public class SubjectBasicServiceImpl implements SubjectBasicService {
return subjectBasicMapper.selectList(exportReqVO); return subjectBasicMapper.selectList(exportReqVO);
} }
@Override
public PageResult<SubjectBasicDO> querySubjectByEnterprise(SubjectBasicPageReqVO reqVO) {
Page<SubjectBasicPageReqVO> page = new Page<>(reqVO.getPageNo(), reqVO.getPageSize());
IPage<SubjectBasicDO> result = subjectBasicMapper.querySubjectByEnterprise(page,reqVO);
return new PageResult<>(result.getRecords(), result.getTotal());
}
@Override
public PageResult<SubjectBasicDO> querySubjectByBusiness(SubjectBasicPageReqVO reqVO) {
Page<SubjectBasicPageReqVO> page = new Page<>(reqVO.getPageNo(), reqVO.getPageSize());
IPage<SubjectBasicDO> result = subjectBasicMapper.querySubjectByBusiness(page,reqVO);
return new PageResult<>(result.getRecords(), result.getTotal());
}
} }

@ -9,4 +9,47 @@
文档可见https://www.iocoder.cn/MyBatis/x-plugins/ 文档可见https://www.iocoder.cn/MyBatis/x-plugins/
--> -->
<select id="querySubjectByEnterprise" resultType="com.yunxi.scm.module.xxjj.dal.dataobject.subjectbasic.SubjectBasicDO">
SELECT
a.*,
b.name AS companyName,
c.nickname
FROM
xxjj_subject_basic a
LEFT JOIN system_enterprise b ON a.enterprise_id = b.id
LEFT JOIN system_users c ON a.belonging_people = c.id
WHERE
a.deleted = 0 AND b.deleted = 0
<if test="req.businessType != null and req.businessType != ''">
AND a.business_type = #{req.businessType}
</if>
<if test="req.id != null and req.id != ''">
AND (b.id = #{req.id} OR b.parent_id = #{req.id})
</if>
GROUP BY a.id
</select>
<select id="querySubjectByBusiness" resultType="com.yunxi.scm.module.xxjj.dal.dataobject.subjectbasic.SubjectBasicDO">
SELECT
a.*,
c.name AS businessName,
d.name AS companyName,
e.nickname
FROM
xxjj_subject_basic a
LEFT JOIN xxjj_subject_business b ON a.id = b.business_id
LEFT JOIN system_business_warehouse c ON b.business_line_id = c.id
LEFT JOIN system_enterprise d ON a.enterprise_id = d.id
LEFT JOIN system_users e ON a.belonging_people = e.id
WHERE
a.deleted = 0
AND b.deleted = 0
<if test="req.businessType != null and req.businessType != ''">
AND b.business_type = #{req.businessType}
</if>
<if test="req.id != null and req.id != ''">
AND b.business_line_id = #{req.id}
</if>
</select>
</mapper> </mapper>

@ -111,3 +111,13 @@ export const getFirstDeptPage = async (params) => {
export const getSecondDeptByFirstPage = async (params) => { export const getSecondDeptByFirstPage = async (params) => {
return await request.get({ url: `/system/enterprise/secondDept2`, params }) return await request.get({ url: `/system/enterprise/secondDept2`, params })
} }
// 企业详情客户信息树列表
export const getEnterpriseBusinessSimple = async () => {
return await request.get({ url: `/system/enterprise/simpleEnterprise` })
}
// 企业详情员工信息树列表
export const getSimpleEnterprise = async () => {
return await request.get({ url: `/system/enterprise/enterprise` })
}

@ -67,3 +67,10 @@ export const getBusinessUserPage = async (params) => {
export const getBusinessLinePage = async (params) => { export const getBusinessLinePage = async (params) => {
return await request.get({ url: `/system/business-warehouse/enterprise-business`, params }) return await request.get({ url: `/system/business-warehouse/enterprise-business`, params })
} }
//企业详情点击分支机构下的员工列表
export const getUserPage = async (params) => {
return await request.get({ url: `/system/business-warehouse/enterprise-user`, params })
}

@ -109,3 +109,13 @@ export const deleteSubjectBasic = async (id: number) => {
export const exportSubjectBasic = async (params) => { export const exportSubjectBasic = async (params) => {
return await request.download({ url: `/xxjj/subject-basic/export-excel`, params }) return await request.download({ url: `/xxjj/subject-basic/export-excel`, params })
} }
// 根据公司获得客户分页
export const getEnterperiseCustom = async (params) => {
return await request.get({ url: `/xxjj/subject-basic/enterperise-custom`, params })
}
// 根据业务线获得客户分页
export const getBusinessCustom = async (params) => {
return await request.get({ url: `/xxjj/subject-basic/business-custom`, params })
}

@ -209,6 +209,9 @@ export enum DICT_TYPE {
urgent_level = 'urgent_level', //紧要程度 urgent_level = 'urgent_level', //紧要程度
task_remind = 'task_remind', //紧要程度 task_remind = 'task_remind', //紧要程度
remind_way = 'remind_way', //紧要程度 remind_way = 'remind_way', //紧要程度
CUSTOM_TYPE = 'custom_type', //客户类型
FUNDS_TYPE = 'funds_type', //资金款项
COOPERATE_TYPE = 'cooperate_type', //合作模式
// ============= PRODUCT 模块================= // ============= PRODUCT 模块=================
PRODUCT_STATUS = 'product_status', //商品状态 PRODUCT_STATUS = 'product_status', //商品状态

@ -37,7 +37,7 @@
<template #header> <template #header>
<div class="designation"> <div class="designation">
<span></span> <span></span>
{{ `title.label` }} {{ titleLable }}
</div> </div>
</template> </template>
@ -175,13 +175,13 @@ import * as BusinessWarehouseApi from '@/api/xxjj/businessWarehouse'
const deptName = ref('') const deptName = ref('')
const deptList = ref<Tree[]>([]) // const deptList = ref<Tree[]>([]) //
const treeRef = ref<InstanceType<typeof ElTree>>() const treeRef = ref<InstanceType<typeof ElTree>>()
let titleLable = ref('')//
/** 获得部门树 */ /** 获得部门树 */
const getTree = async () => { const getTree = async () => {
const res = await EnterpriseApi.getEnterpriseSimple() const res = await EnterpriseApi.getEnterpriseSimple()
deptList.value = [] deptList.value = []
deptList.value.push(...handleTree(res)) deptList.value.push(...handleTree(res))
debugger
} }
/** 基于名字过滤 */ /** 基于名字过滤 */
@ -260,7 +260,6 @@ const getList = async () => {
try { try {
const data = await EnterpriseApi.getEnterprisePage(queryParams) const data = await EnterpriseApi.getEnterprisePage(queryParams)
list.value = data.list list.value = data.list
debugger
total.value = data.total total.value = data.total
} finally { } finally {
loading.value = false loading.value = false
@ -314,6 +313,7 @@ const resetQuery = () => {
/** 处理部门被点击 */ /** 处理部门被点击 */
const handleDeptNodeClick = async (row) => { const handleDeptNodeClick = async (row) => {
titleLable = row.name
if(row.parentId == 'A-0'){ if(row.parentId == 'A-0'){
const id = row.id.slice(2) const id = row.id.slice(2)
queryParams.parentId = parseInt(id) queryParams.parentId = parseInt(id)

@ -38,7 +38,7 @@
<template #header> <template #header>
<div class="designation"> <div class="designation">
<span></span> <span></span>
{{ `title.label` }} {{ titleLable }}
</div> </div>
</template> </template>
@ -101,92 +101,67 @@
<!-- 表格 --> <!-- 表格 -->
<el-table stripe :border="true" style="width: 1500px;height: 100%;;margin-top:20px;" v-loading="loading" :data="list" > <el-table stripe :border="true" style="width: 1500px;height: 100%;;margin-top:20px;" v-loading="loading" :data="list" >
<el-table-column fixed="left" type="selection" /> <el-table-column fixed="left" type="selection" />
<el-table-column fixed="left" sortable label="客户名称" width="200" key="id" prop="id" > <el-table-column fixed="left" label="客户名称" width="200" :show-overflow-tooltip="true" >
<template #default> <template #default="scope">
<div style="color:rgb(64,158,255)"> <div style="color:rgb(64,158,255)">
<p style="height:5px;">客户名称</p> <p style="height:5px;">{{scope.row.name}}</p>
<span style="font-size:12px;">1111000000000</span> <span style="font-size:12px;">{{scope.row.code}}</span>
</div> </div>
</template> </template>
</el-table-column>
<el-table-column label="客户分类" prop="calssify" width="120px">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_CALSSIFY" :value="scope.row.calssify" />
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="客户类型" prop="customType" width="120px">
label="客户分类" <template #default="scope">
sortable <dict-tag :type="DICT_TYPE.CUSTOM_TYPE" :value="scope.row.customType" />
prop="username" </template>
width="110"
:show-overflow-tooltip="true"
>
<div>
<p>一级</p>
</div>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="资金款项" prop="fundsType" width="120px">
label="客户类型" <template #default="scope">
sortable <dict-tag :type="DICT_TYPE.FUNDS_TYPE" :value="scope.row.fundsType" />
width="120" </template>
prop="nickname"
:show-overflow-tooltip="true"
> <p>vip大客户</p>
</el-table-column> </el-table-column>
<el-table-column label="合作模式" prop="cooperateType" width="120px">
<el-table-column <template #default="scope">
label="资金款项" <dict-tag :type="DICT_TYPE.COOPERATE_TYPE" :value="scope.row.cooperateType" />
sortable </template>
key="deptName"
prop="dept.name"
width="120"
:show-overflow-tooltip="true"
/>
<el-table-column label="账号状态" sortable width="110" key="status">
<div>
<p style="height:5px;">联营</p>
<span style="font-size:12px; color:#999;">业绩返点</span>
</div>
</el-table-column> </el-table-column>
<el-table-column label="隶属机构/业务线" sortable width="160" key="status"> <el-table-column label="隶属机构/业务线" sortable width="160" key="status">
<div> <template #default="scope">
<p style="height:5px;">济钢城市矿产</p> <div style="color:rgb(64,158,255)">
<span style="font-size:12px; color:#999;">废钢</span> <p style="height:5px;">{{scope.row.companyName}}</p>
<span style="font-size:12px;">{{scope.row.businessName}}</span>
</div> </div>
</template>
</el-table-column> </el-table-column>
<el-table-column label="状态" width="100" sortable key="status"> <el-table-column label="客户状态" prop="customerStatus" width="120px">
<template #default="scope"> <template #default="scope">
<el-switch <dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.customerStatus" />
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
@change="handleStatusChange(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="客户分级" width="120" sortable key="status"> <el-table-column label="客户星级" prop="customerStarrating" width="150px">
<template #default="scope"> <template #default="scope">
<el-switch <el-rate v-model="scope.row.customerStarrating" :disabled="true" />
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
@change="handleStatusChange(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="归属人员" sortable prop="mobile" width="110" > <el-table-column label="归属人员" sortable prop="nickname" width="110" >
<p>狂徒张三</p>
</el-table-column> </el-table-column>
<el-table-column label="新增时间" sortable prop="mobile" width="150" > <el-table-column label="添加时间" sortable prop="mobile" width="150">
<div> <template #default="scope">
<p style="height:5px;">康宁</p> <p style="height:5px;">{{scope.row.creator}}</p>
<span style="font-size:12px; color:#999;">2023-09-09 23:26:08</span> <span style="font-size:12px;">{{scope.row.createTime}}</span>
</div> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新时间" sortable prop="mobile" width="150" > <el-table-column label="更新时间" sortable prop="mobile" width="150">
<div> <template #default="scope">
<p style="height:5px;">康宁</p> <p style="height:5px;">{{scope.row.updater}}</p>
<span style="font-size:12px; color:#999;">2023-09-09 23:26:08</span> <span style="font-size:12px;">{{scope.row.updateTime}}</span>
</div> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="100"> <el-table-column fixed="right" label="操作" align="center" width="100">
<template #default="scope"> <template #default="scope">
<el-button <el-button
@ -232,15 +207,19 @@ import {Filter } from '@element-plus/icons-vue'
import { ElTree } from 'element-plus' import { ElTree } from 'element-plus'
import * as DeptApi from '@/api/system/dept' import * as DeptApi from '@/api/system/dept'
import { defaultProps, handleTree } from '@/utils/tree' import { defaultProps, handleTree } from '@/utils/tree'
import * as EnterpriseApi from '@/api/system/enterprise'
import * as SubjectBasicApi from '@/api/xxjj/subjectBasic'
import { DICT_TYPE, getStrDictOptions, getIntDictOptions } from '@/utils/dict'
// defineOptions({ name: 'SystemUserDeptTree' }) // defineOptions({ name: 'SystemUserDeptTree' })
const deptName = ref('') const deptName = ref('')
const deptList = ref<Tree[]>([]) // const deptList = ref<Tree[]>([]) //
const treeRef = ref<InstanceType<typeof ElTree>>() const treeRef = ref<InstanceType<typeof ElTree>>()
let titleLable = ref('')//
/** 获得部门树 */ /** 获得部门树 */
const getTree = async () => { const getTree = async () => {
const res = await DeptApi.getSimpleDeptList() const res = await EnterpriseApi.getEnterpriseBusinessSimple()
deptList.value = [] deptList.value = []
deptList.value.push(...handleTree(res)) deptList.value.push(...handleTree(res))
} }
@ -303,6 +282,7 @@ const list = ref([]) // 列表的数
const queryParams = reactive({ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
id: undefined,
username: undefined, username: undefined,
mobile: undefined, mobile: undefined,
status: undefined, status: undefined,
@ -316,7 +296,20 @@ const queryFormRef = ref() // 搜索的表单
const getList = async () => { const getList = async () => {
loading.value = true loading.value = true
try { try {
const data = await UserApi.getUserPage(queryParams) queryParams.businessType = '1'
const data = await SubjectBasicApi.getEnterperiseCustom(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
const getListByBusiness = async () => {
loading.value = true
try {
queryParams.businessType = '0'
const data = await SubjectBasicApi.getBusinessCustom(queryParams)
list.value = data.list list.value = data.list
total.value = data.total total.value = data.total
} finally { } finally {
@ -338,8 +331,16 @@ const resetQuery = () => {
/** 处理部门被点击 */ /** 处理部门被点击 */
const handleDeptNodeClick = async (row) => { const handleDeptNodeClick = async (row) => {
queryParams.deptId = row.id titleLable = row.name
await getList() if(row.id.substring(0,1) == 'A'){
const id = row.id.slice(2)
queryParams.id = parseInt(id)
await getList()
}else if(row.id.substring(0,1) == 'B'){
const id = row.id.slice(2)
queryParams.id = parseInt(id)
await getListByBusiness()
}
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
@ -355,21 +356,21 @@ const handleImport = () => {
} }
/** 修改用户状态 */ /** 修改用户状态 */
const handleStatusChange = async (row: UserApi.UserVO) => { // const handleStatusChange = async (row: UserApi.UserVO) => {
try { // try {
// // //
const text = row.status === CommonStatusEnum.ENABLE ? '启用' : '停用' // const text = row.status === CommonStatusEnum.ENABLE ? '' : ''
await message.confirm('确认要"' + text + '""' + row.username + '"用户吗?') // await message.confirm('"' + text + '""' + row.username + '"?')
// // //
await UserApi.updateUserStatus(row.id, row.status) // await UserApi.updateUserStatus(row.id, row.status)
// // //
await getList() // await getList()
} catch { // } catch {
// // //
row.status = // row.status =
row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE : CommonStatusEnum.ENABLE // row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE : CommonStatusEnum.ENABLE
} // }
} // }
/** 导出按钮操作 */ /** 导出按钮操作 */
const exportLoading = ref(false) const exportLoading = ref(false)

@ -27,7 +27,7 @@
<template #header> <template #header>
<div class="designation"> <div class="designation">
<span></span> <span></span>
{{ `title.label` }} {{ titleLable }}
</div> </div>
</template> </template>
@ -74,32 +74,38 @@
<!-- 表格 --> <!-- 表格 -->
<el-table stripe :border="true" style="width: 1500px;height: 100%;;margin-top:20px;" v-loading="loading" :data="list"> <el-table stripe :border="true" style="width: 1500px;height: 100%;;margin-top:20px;" v-loading="loading" :data="list">
<el-table-column fixed="left" type="selection" /> <el-table-column fixed="left" type="selection" />
<el-table-column fixed="left" sortable label="姓名" width="150" key="id" prop="id"> <el-table-column fixed="left" sortable label="姓名" width="150" >
<template #default> <template #default="scope">
<div style="color:rgb(64,158,255)"> <div style="color:rgb(64,158,255)">
<p style="height:5px;">康宁</p> <p style="height:5px;">{{scope.row.nickname}}</p>
<span style="font-size:12px;">1111000000000</span> <span style="font-size:12px;">{{scope.row.username}}</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="职务" prop="username" sortable width="120" :show-overflow-tooltip="true"> <el-table-column label="职务" prop="username" sortable width="120" :show-overflow-tooltip="true">
<div> <template #default="scope">
<p style="height:5px;">商品经理</p> <div style="color:rgb(64,158,255)">
<span style="font-size:12px; color:#999;color:#999;">商品部</span> <p style="height:5px;">{{scope.row.postName}}</p>
</div> <span style="font-size:12px;">{{scope.row.username}}</span>
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column label="组织部门" width="200" sortable prop="nickname" :show-overflow-tooltip="true"> <el-table-column label="组织部门" width="120" sortable :show-overflow-tooltip="true">
<div> <template #default="scope">
<p style="height:5px;">再生资源事业部-销售组</p> <div style="color:rgb(64,158,255)">
<span style="font-size:12px; color:#999;">济钢城市矿产</span> <p style="height:5px;">{{scope.row.deptName}}</p>
</div> <span style="font-size:12px;">{{scope.row.username}}</span>
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column label="关联业务" sortable key="deptName" prop="dept.name" width="120" :show-overflow-tooltip="true"> <el-table-column label="关联业务" sortable width="200" :show-overflow-tooltip="true">
<div> <template #default="scope">
<p style="height:5px;">废钢废铝</p> <div style="color:rgb(64,158,255)">
<span style="font-size:12px; color:#999;">济钢城市矿产</span> <p style="height:5px;">{{scope.row.businessName}}</p>
</div> <span style="font-size:12px;">{{scope.row.username}}</span>
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column label="账号状态" width="120" sortable key="status"> <el-table-column label="账号状态" width="120" sortable key="status">
<template #default="scope"> <template #default="scope">
@ -114,22 +120,28 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="最后登录" sortable prop="mobile" width="180"> <el-table-column
<template #default> label="最后登录"
<p>2023-09-09 23:26:08</p> align="center"
</template> prop="loginDate"
</el-table-column> :formatter="dateFormatter"
width="165"
/>
<el-table-column label="添加时间" sortable prop="mobile" width="150"> <el-table-column label="添加时间" sortable prop="mobile" width="150">
<div> <template #default="scope">
<p style="height:5px;">康宁</p> <div style="color:rgb(64,158,255)">
<span style="font-size:12px; color:#999;">2023-09-09 23:26:08</span> <p style="height:5px;">{{scope.row.creator}}</p>
</div> <span style="font-size:12px;">{{scope.row.createTime}}</span>
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column label="更新时间" sortable prop="mobile" width="150"> <el-table-column label="更新时间" sortable prop="mobile" width="150">
<div> <template #default="scope">
<p style="height:5px;">康宁</p> <div style="color:rgb(64,158,255)">
<span style="font-size:12px; color:#999;">2023-09-09 23:26:08</span> <p style="height:5px;">{{scope.row.updater}}</p>
</div> <span style="font-size:12px;">{{scope.row.updateTime}}</span>
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="100"> <el-table-column fixed="right" label="操作" align="center" width="100">
<template #default="scope"> <template #default="scope">
@ -166,15 +178,18 @@ import { Filter } from '@element-plus/icons-vue'
import { ElTree } from 'element-plus' import { ElTree } from 'element-plus'
import * as DeptApi from '@/api/system/dept' import * as DeptApi from '@/api/system/dept'
import { defaultProps, handleTree } from '@/utils/tree' import { defaultProps, handleTree } from '@/utils/tree'
import * as EnterpriseApi from '@/api/system/enterprise'
import * as BusinessWarehouseApi from '@/api/xxjj/businessWarehouse'
// defineOptions({ name: 'SystemUserDeptTree' }) // defineOptions({ name: 'SystemUserDeptTree' })
const deptName = ref('') const deptName = ref('')
const deptList = ref<Tree[]>([]) // const deptList = ref<Tree[]>([]) //
const treeRef = ref<InstanceType<typeof ElTree>>() const treeRef = ref<InstanceType<typeof ElTree>>()
let titleLable = ref('')//
/** 获得部门树 */ /** 获得部门树 */
const getTree = async () => { const getTree = async () => {
const res = await DeptApi.getSimpleDeptList() const res = await EnterpriseApi.getSimpleEnterprise()
deptList.value = [] deptList.value = []
deptList.value.push(...handleTree(res)) deptList.value.push(...handleTree(res))
} }
@ -249,7 +264,7 @@ const queryFormRef = ref() // 搜索的表单
const getList = async () => { const getList = async () => {
loading.value = true loading.value = true
try { try {
const data = await UserApi.getUserPage(queryParams) const data = await BusinessWarehouseApi.getUserPage(queryParams)
list.value = data.list list.value = data.list
total.value = data.total total.value = data.total
} finally { } finally {
@ -271,7 +286,8 @@ const resetQuery = () => {
/** 处理部门被点击 */ /** 处理部门被点击 */
const handleDeptNodeClick = async (row) => { const handleDeptNodeClick = async (row) => {
queryParams.deptId = row.id titleLable = row.name
queryParams.id = row.id
await getList() await getList()
} }

@ -37,7 +37,7 @@
<template #header> <template #header>
<div class="designation"> <div class="designation">
<span></span> <span></span>
{{ `title.label` }} {{ titleLable }}
</div> </div>
</template> </template>
@ -181,6 +181,7 @@ import * as BusinessWarehouseApi from '@/api/xxjj/businessWarehouse'
const deptName = ref('') const deptName = ref('')
const deptList = ref<Tree[]>([]) // const deptList = ref<Tree[]>([]) //
const treeRef = ref<InstanceType<typeof ElTree>>() const treeRef = ref<InstanceType<typeof ElTree>>()
let titleLable = ref('')//
/** 获得部门树 */ /** 获得部门树 */
const getTree = async () => { const getTree = async () => {
@ -306,6 +307,7 @@ const getUserBySecond = async () => {
/** 处理部门被点击 */ /** 处理部门被点击 */
const handleDeptNodeClick = async (row) => { const handleDeptNodeClick = async (row) => {
titleLable = row.name
if(row.parentId == 'A-0'){ if(row.parentId == 'A-0'){
const id = row.id.slice(2) const id = row.id.slice(2)
queryParams.parentId = parseInt(id) queryParams.parentId = parseInt(id)

@ -38,7 +38,7 @@
<template #header> <template #header>
<div class="designation"> <div class="designation">
<span></span> <span></span>
{{ `title.label` }} {{ titleLable }}
</div> </div>
</template> </template>
@ -101,92 +101,67 @@
<!-- 表格 --> <!-- 表格 -->
<el-table stripe :border="true" style="width: 1500px;height: 100%;;margin-top:20px;" v-loading="loading" :data="list" > <el-table stripe :border="true" style="width: 1500px;height: 100%;;margin-top:20px;" v-loading="loading" :data="list" >
<el-table-column fixed="left" type="selection" /> <el-table-column fixed="left" type="selection" />
<el-table-column fixed="left" label="服务商名称" sortable width="200" key="id" prop="id" > <el-table-column fixed="left" label="服务商名称" width="200" :show-overflow-tooltip="true" >
<template #default> <template #default="scope">
<div style="color:rgb(64,158,255)"> <div style="color:rgb(64,158,255)">
<p style="height:5px;">服务商名称</p> <p style="height:5px;">{{scope.row.name}}</p>
<span style="font-size:12px;">1111000000000</span> <span style="font-size:12px;">{{scope.row.code}}</span>
</div> </div>
</template> </template>
</el-table-column>
<el-table-column label="服务商分类" prop="calssify" width="120px">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_CALSSIFY" :value="scope.row.calssify" />
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="服务商类型" prop="customType" width="120px">
label="服务商分类" <template #default="scope">
sortable <dict-tag :type="DICT_TYPE.CUSTOM_TYPE" :value="scope.row.customType" />
prop="username" </template>
width="120"
:show-overflow-tooltip="true"
>
<div>
<p>一级</p>
</div>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="资金款项" prop="fundsType" width="120px">
label="服务商类型" <template #default="scope">
sortable <dict-tag :type="DICT_TYPE.FUNDS_TYPE" :value="scope.row.fundsType" />
width="120" </template>
prop="nickname"
:show-overflow-tooltip="true"
> <p>vip大客户</p>
</el-table-column> </el-table-column>
<el-table-column label="合作模式" prop="cooperateType" width="120px">
<el-table-column <template #default="scope">
label="资金款项" <dict-tag :type="DICT_TYPE.COOPERATE_TYPE" :value="scope.row.cooperateType" />
sortable </template>
key="deptName"
prop="dept.name"
width="120"
:show-overflow-tooltip="true"
/>
<el-table-column label="合作模式" width="110" sortable key="status">
<div>
<p style="height:5px;">联营</p>
<span style="font-size:12px; color:#999;">业绩返点</span>
</div>
</el-table-column> </el-table-column>
<el-table-column label="隶属机构/业务线" width="130" key="status"> <el-table-column label="隶属机构/业务线" sortable width="160" key="status">
<div> <template #default="scope">
<p style="height:5px;">济钢城市矿产</p> <div style="color:rgb(64,158,255)">
<span style="font-size:12px; color:#999;">废钢</span> <p style="height:5px;">{{scope.row.companyName}}</p>
<span style="font-size:12px;">{{scope.row.businessName}}</span>
</div> </div>
</template>
</el-table-column> </el-table-column>
<el-table-column label="状态" width="100" sortable key="status"> <el-table-column label="客户状态" prop="customerStatus" width="120px">
<template #default="scope"> <template #default="scope">
<el-switch <dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.customerStatus" />
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
@change="handleStatusChange(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="服务商分级" width="120" sortable key="status"> <el-table-column label="客户星级" prop="customerStarrating" width="150px">
<template #default="scope"> <template #default="scope">
<el-switch <el-rate v-model="scope.row.customerStarrating" :disabled="true" />
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
@change="handleStatusChange(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="归属人员" sortable prop="mobile" width="110" > <el-table-column label="归属人员" sortable prop="nickname" width="110" >
<p>狂徒张三</p>
</el-table-column> </el-table-column>
<el-table-column label="新增时间" sortable prop="mobile" width="150" > <el-table-column label="添加时间" sortable prop="mobile" width="150">
<div> <template #default="scope">
<p style="height:5px;">康宁</p> <p style="height:5px;">{{scope.row.creator}}</p>
<span style="font-size:12px; color:#999;">2023-09-09 23:26:08</span> <span style="font-size:12px;">{{scope.row.createTime}}</span>
</div> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新时间" sortable prop="mobile" width="150" > <el-table-column label="更新时间" sortable prop="mobile" width="150">
<div> <template #default="scope">
<p style="height:5px;">康宁</p> <p style="height:5px;">{{scope.row.updater}}</p>
<span style="font-size:12px; color:#999;">2023-09-09 23:26:08</span> <span style="font-size:12px;">{{scope.row.updateTime}}</span>
</div> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="100"> <el-table-column fixed="right" label="操作" align="center" width="100">
<template #default="scope"> <template #default="scope">
<el-button <el-button
@ -232,15 +207,18 @@ import {Filter } from '@element-plus/icons-vue'
import { ElTree } from 'element-plus' import { ElTree } from 'element-plus'
import * as DeptApi from '@/api/system/dept' import * as DeptApi from '@/api/system/dept'
import { defaultProps, handleTree } from '@/utils/tree' import { defaultProps, handleTree } from '@/utils/tree'
import * as EnterpriseApi from '@/api/system/enterprise'
import * as SubjectBasicApi from '@/api/xxjj/subjectBasic'
// defineOptions({ name: 'SystemUserDeptTree' }) // defineOptions({ name: 'SystemUserDeptTree' })
const deptName = ref('') const deptName = ref('')
const deptList = ref<Tree[]>([]) // const deptList = ref<Tree[]>([]) //
const treeRef = ref<InstanceType<typeof ElTree>>() const treeRef = ref<InstanceType<typeof ElTree>>()
let titleLable = ref('')//
/** 获得部门树 */ /** 获得部门树 */
const getTree = async () => { const getTree = async () => {
const res = await DeptApi.getSimpleDeptList() const res = await EnterpriseApi.getEnterpriseBusinessSimple()
deptList.value = [] deptList.value = []
deptList.value.push(...handleTree(res)) deptList.value.push(...handleTree(res))
} }
@ -316,7 +294,19 @@ const queryFormRef = ref() // 搜索的表单
const getList = async () => { const getList = async () => {
loading.value = true loading.value = true
try { try {
const data = await UserApi.getUserPage(queryParams) queryParams.businessType = '3'
const data = await SubjectBasicApi.getEnterperiseCustom(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
const getListByBusiness = async () => {
loading.value = true
try {
queryParams.businessType = '2'
const data = await SubjectBasicApi.getBusinessCustom(queryParams)
list.value = data.list list.value = data.list
total.value = data.total total.value = data.total
} finally { } finally {
@ -338,8 +328,16 @@ const resetQuery = () => {
/** 处理部门被点击 */ /** 处理部门被点击 */
const handleDeptNodeClick = async (row) => { const handleDeptNodeClick = async (row) => {
queryParams.deptId = row.id titleLable = row.name
await getList() if(row.id.substring(0,1) == 'A'){
const id = row.id.slice(2)
queryParams.id = parseInt(id)
await getList()
}else if(row.id.substring(0,1) == 'B'){
const id = row.id.slice(2)
queryParams.id = parseInt(id)
await getListByBusiness()
}
} }
/** 添加/修改操作 */ /** 添加/修改操作 */

@ -38,7 +38,7 @@
<template #header> <template #header>
<div class="designation"> <div class="designation">
<span></span> <span></span>
{{ `title.label` }} {{ titleLable }}
</div> </div>
</template> </template>
@ -102,92 +102,67 @@
<!-- 表格 --> <!-- 表格 -->
<el-table stripe :border="true" style="width: 1500px;height: 100%;;margin-top:20px;" v-loading="loading" :data="list" > <el-table stripe :border="true" style="width: 1500px;height: 100%;;margin-top:20px;" v-loading="loading" :data="list" >
<el-table-column fixed="left" type="selection" /> <el-table-column fixed="left" type="selection" />
<el-table-column fixed="left" sortable label="供应商名称" width="200" key="id" prop="id" > <el-table-column fixed="left" label="供应商名称" width="200" :show-overflow-tooltip="true" >
<template #default> <template #default="scope">
<div style="color:rgb(64,158,255)"> <div style="color:rgb(64,158,255)">
<p style="height:5px;">供应商名称</p> <p style="height:5px;">{{scope.row.name}}</p>
<span style="font-size:12px;">1111000000000</span> <span style="font-size:12px;">{{scope.row.code}}</span>
</div> </div>
</template> </template>
</el-table-column>
<el-table-column label="供应商分类" prop="calssify" width="120px">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_CALSSIFY" :value="scope.row.calssify" />
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="供应商类型" prop="customType" width="120px">
label="供应商分类" <template #default="scope">
prop="username" <dict-tag :type="DICT_TYPE.CUSTOM_TYPE" :value="scope.row.customType" />
sortable </template>
width="120"
:show-overflow-tooltip="true"
>
<div>
<p>一级</p>
</div>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="资金款项" prop="fundsType" width="120px">
label="供应商类型" <template #default="scope">
sortable <dict-tag :type="DICT_TYPE.FUNDS_TYPE" :value="scope.row.fundsType" />
width="120" </template>
prop="nickname"
:show-overflow-tooltip="true"
> <p>vip大客户</p>
</el-table-column> </el-table-column>
<el-table-column label="合作模式" prop="cooperateType" width="120px">
<el-table-column <template #default="scope">
label="资金款项" <dict-tag :type="DICT_TYPE.COOPERATE_TYPE" :value="scope.row.cooperateType" />
key="deptName" </template>
prop="dept.name"
sortable
width="120"
:show-overflow-tooltip="true"
/>
<el-table-column label="合作模式" width="110" sortable key="status">
<div>
<p style="height:5px;">联营</p>
<span style="font-size:12px; color:#999;">业绩返点</span>
</div>
</el-table-column> </el-table-column>
<el-table-column label="隶属机构/业务线" width="160" sortable key="status"> <el-table-column label="隶属机构/业务线" sortable width="160" key="status">
<div> <template #default="scope">
<p style="height:5px;">济钢城市矿产</p> <div style="color:rgb(64,158,255)">
<span style="font-size:12px; color:#999;">废钢</span> <p style="height:5px;">{{scope.row.companyName}}</p>
<span style="font-size:12px;">{{scope.row.businessName}}</span>
</div> </div>
</template>
</el-table-column> </el-table-column>
<el-table-column label="状态" width="100" sortable key="status"> <el-table-column label="客户状态" prop="customerStatus" width="120px">
<template #default="scope"> <template #default="scope">
<el-switch <dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.customerStatus" />
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
@change="handleStatusChange(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="供应商分级" width="120" sortable key="status"> <el-table-column label="客户星级" prop="customerStarrating" width="150px">
<template #default="scope"> <template #default="scope">
<el-switch <el-rate v-model="scope.row.customerStarrating" :disabled="true" />
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
@change="handleStatusChange(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="归属人员" prop="mobile" sortable width="110" > <el-table-column label="归属人员" sortable prop="nickname" width="110" >
<p>狂徒张三</p>
</el-table-column> </el-table-column>
<el-table-column label="新增时间" prop="mobile" sortable width="150" > <el-table-column label="添加时间" sortable prop="mobile" width="150">
<div> <template #default="scope">
<p style="height:5px;">康宁</p> <p style="height:5px;">{{scope.row.creator}}</p>
<span style="font-size:12px; color:#999;">2023-09-09 23:26:08</span> <span style="font-size:12px;">{{scope.row.createTime}}</span>
</div> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新时间" sortable prop="mobile" width="150" > <el-table-column label="更新时间" sortable prop="mobile" width="150">
<div> <template #default="scope">
<p style="height:5px;">康宁</p> <p style="height:5px;">{{scope.row.updater}}</p>
<span style="font-size:12px; color:#999;">2023-09-09 23:26:08</span> <span style="font-size:12px;">{{scope.row.updateTime}}</span>
</div> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="100"> <el-table-column fixed="right" label="操作" align="center" width="100">
<template #default="scope"> <template #default="scope">
<el-button <el-button
@ -233,15 +208,18 @@ import {Filter } from '@element-plus/icons-vue'
import { ElTree } from 'element-plus' import { ElTree } from 'element-plus'
import * as DeptApi from '@/api/system/dept' import * as DeptApi from '@/api/system/dept'
import { defaultProps, handleTree } from '@/utils/tree' import { defaultProps, handleTree } from '@/utils/tree'
import * as EnterpriseApi from '@/api/system/enterprise'
import * as SubjectBasicApi from '@/api/xxjj/subjectBasic'
// defineOptions({ name: 'SystemUserDeptTree' }) // defineOptions({ name: 'SystemUserDeptTree' })
const deptName = ref('') const deptName = ref('')
const deptList = ref<Tree[]>([]) // const deptList = ref<Tree[]>([]) //
const treeRef = ref<InstanceType<typeof ElTree>>() const treeRef = ref<InstanceType<typeof ElTree>>()
let titleLable = ref('')//
/** 获得部门树 */ /** 获得部门树 */
const getTree = async () => { const getTree = async () => {
const res = await DeptApi.getSimpleDeptList() const res = await EnterpriseApi.getEnterpriseBusinessSimple()
deptList.value = [] deptList.value = []
deptList.value.push(...handleTree(res)) deptList.value.push(...handleTree(res))
} }
@ -317,7 +295,20 @@ const queryFormRef = ref() // 搜索的表单
const getList = async () => { const getList = async () => {
loading.value = true loading.value = true
try { try {
const data = await UserApi.getUserPage(queryParams) queryParams.businessType = '2'
const data = await SubjectBasicApi.getEnterperiseCustom(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
const getListByBusiness = async () => {
loading.value = true
try {
queryParams.businessType = '1'
const data = await SubjectBasicApi.getBusinessCustom(queryParams)
list.value = data.list list.value = data.list
total.value = data.total total.value = data.total
} finally { } finally {
@ -339,8 +330,16 @@ const resetQuery = () => {
/** 处理部门被点击 */ /** 处理部门被点击 */
const handleDeptNodeClick = async (row) => { const handleDeptNodeClick = async (row) => {
queryParams.deptId = row.id titleLable = row.name
await getList() if(row.id.substring(0,1) == 'A'){
const id = row.id.slice(2)
queryParams.id = parseInt(id)
await getList()
}else if(row.id.substring(0,1) == 'B'){
const id = row.id.slice(2)
queryParams.id = parseInt(id)
await getListByBusiness()
}
} }
/** 添加/修改操作 */ /** 添加/修改操作 */

Loading…
Cancel
Save