Commit a6d64cbd authored by huangjie's avatar huangjie

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys...

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys into V20231129-中建一局二公司
parents 5a33890e 0ce14e0a
......@@ -171,6 +171,8 @@ tenant:
- advisory_body_custom_form
- dim_area
- biz_dict_data
- push_monitor_rules
- push_monitor_info
# MyBatisPlus配置
......
......@@ -12,6 +12,7 @@ import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.Calendar;
import java.util.Date;
/**
......@@ -191,4 +192,30 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
int year = localDate.getHour();
return year;
}
/**
* 获取小时前后日期
* @param date
* @param hours
* @return
*/
public static Date addDays(Date date, int hours) {
return org.apache.commons.lang3.time.DateUtils.addHours(date, hours);
}
/***
*@Description: yyyy-MM-dd HH:mm:ss
*@Param:
*@return: java.lang.String
*@Author: Dgm
*@date: 2023/12/21 18:23
*/
public static String format(Date date) {
Calendar calendar = Calendar.getInstance();
if (date != null) {
calendar.setTime(date);
}
return new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS).format(calendar.getTime());
}
}
......@@ -12,6 +12,7 @@ import com.dsk.cscec.service.AdvisoryBodyCustomFormService;
import com.dsk.cscec.service.AdvisoryBodyProjectService;
import com.dsk.cscec.service.AdvisoryBodyService;
import com.dsk.cscec.service.IDProjectService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -73,7 +74,7 @@ public class AdvisoryBodyManageController extends BaseController {
* 校验咨询机构是否存在
*/
@GetMapping("/checkAdvisoryBodyExist")
public R<AdvisoryBodyExistVo> checkAdvisoryBodyExist(@Validated @NotBlank(message = "咨询机构名称不能为空") String advisoryBodyName) {
public R<AdvisoryBodyExistVo> checkAdvisoryBodyExist(@NotBlank(message = "咨询机构名称不能为空") String advisoryBodyName) {
return R.ok(advisoryBodyService.checkAdvisoryBodyExist(advisoryBodyName));
}
......@@ -97,6 +98,7 @@ public class AdvisoryBodyManageController extends BaseController {
* 新增咨询机构自定义表单
*/
@PostMapping("/addAdvisoryBodyCustomForm")
@Transactional(rollbackFor = Exception.class)
public R<Void> addAdvisoryBodyCustomForm(@Validated AdvisoryBodyCustomForm advisoryBodyCustomForm) {
return toAjax(advisoryBodyCustomFormService.save(advisoryBodyCustomForm));
}
......@@ -105,6 +107,7 @@ public class AdvisoryBodyManageController extends BaseController {
* 更新咨询机构自定义表单
*/
@PutMapping("/updateAdvisoryBodyCustomForm")
@Transactional(rollbackFor = Exception.class)
public R<Void> updateAdvisoryBodyCustomForm(@Validated AdvisoryBodyCustomForm advisoryBodyCustomForm) {
return toAjax(advisoryBodyCustomFormService.updateById(advisoryBodyCustomForm));
}
......
......@@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -51,7 +52,7 @@ public class AdvisoryBodyProject extends BaseEntity implements Serializable {
/**
* 结算金额(万元)
*/
private Double settleAmount;
private BigDecimal settleAmount;
/**
* 结算开始时间
*/
......
package com.dsk.cscec.domain.bo;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
......@@ -57,10 +58,12 @@ public class AddAdvisoryBodyBo {
/**
* 结算开始时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date settleStartTime;
/**
* 结算完成时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date settleFinishTime;
/**
* 是否为终审单位(0代表是 1代表否)
......
......@@ -79,6 +79,10 @@ public class CustomerApproveVo {
* 业主性质
*/
private String ownerKind;
/**
* 企业性质
*/
private String customerProperty;
/**
* 资质等级
*/
......@@ -132,10 +136,6 @@ public class CustomerApproveVo {
* 税号
*/
private String taxNumber;
/**
* 企业性质
*/
private String customerProperty;
//证书信息
/**
......@@ -167,6 +167,10 @@ public class CustomerApproveVo {
*/
private String expireDate7;
//审批意见
/**
* 是否同意准入/准入情况
*/
private String isagree;
/**
* 经办人
*/
......
......@@ -17,7 +17,7 @@ public class DCustomerListVo implements Serializable {
private static final long serialVersionUID = 1L;
@Excel(name = "序号", width = 6)
@Excel(name = "序号", width = 6)
private Integer num;
/**
* jsk企业id
......@@ -38,136 +38,135 @@ public class DCustomerListVo implements Serializable {
/**
* 供应商名称
*/
@Excel(name = "供应商名称", width = 30)
@Excel(name = "供应商名称", width = 30)
private String customerName;
/**
* 供应商编号
*/
@Excel(name = "供应商编号", width = 15)
@Excel(name = "供应商编号", width = 15)
private String customerCode;
/**
* 推荐公司
*/
@Excel(name = "推荐单位", width = 30)
@Excel(name = "推荐单位", width = 30)
private String recommendOrg;
/**
* 注册地区域
*/
@Excel(name = "公司注册区域", width = 10)
@Excel(name = "公司注册区域", width = 10)
private String registerRegion;
/**
* 省份
*/
@Excel(name = "公司注册省", width = 10)
@Excel(name = "公司注册省", width = 10)
private String registerProvince;
/**
* 城市
*/
@Excel(name = "公司注册市", width = 10)
@Excel(name = "公司注册市", width = 10)
private String registerCity;
/**
* 供应商类别
*/
@Excel(name = "供应商类别", width = 10)
@Excel(name = "供应商类别", width = 10)
private String customerClass;
/**
* 集团专业类别
*/
@Excel(name = "专业类别", width = 20)
@Excel(name = "专业类别", width = 20)
private String groupSpecialty;
/**
* 纳税人身份
*/
@Excel(name = "纳税人身份", width = 10)
@Excel(name = "纳税人身份", width = 10)
private String paytaxType;
/**
* 纳税人税率
*/
@Excel(name = "纳税人税率", width = 10)
@Excel(name = "纳税人税率", width = 10)
private String taxRate;
/**
* 供应商状态
*/
@Excel(name = "状态", width = 10)
@Excel(name = "状态", width = 10)
private String customerState;
/**
* 限用/禁用状态
*/
@Excel(name = "限用/禁用状态", width = 10)
@Excel(name = "限用/禁用状态", width = 10)
private String badnessState;
/**
* 队长名称
*/
@Excel(name = "劳务队长", width = 10)
@Excel(name = "劳务队长", width = 10)
private String leaderName;
/**
* 劳务队长联系电话
*/
@Excel(name = "队长联系电话", width = 10)
@Excel(name = "队长联系电话", width = 10)
private String laborCaptainPhone;
/**
* 劳务队长身份证号
*/
@Excel(name = "队长身份证号", width = 10)
@Excel(name = "队长身份证号", width = 10)
private String laborCaptainIdcard;
/**
* 队伍规模人数
*/
@Excel(name = "队伍规模", width = 10)
@Excel(name = "队伍规模", cellType = Excel.ColumnType.NUMERIC, width = 10)
private Double serviceTeamPersonnum;
/**
* 专业特长
*/
@Excel(name = "专业特长", width = 10)
@Excel(name = "专业特长", width = 10)
private String serviceTeamSpeciality;
/**
* 施工承包范围
*/
@Excel(name = "施工承包范围", width = 25)
@Excel(name = "施工承包范围", width = 25)
private String constructJobScope;
/**
* 资质等级
*/
@Excel(name = "资质等级", width = 10)
@Excel(name = "资质等级", width = 10)
private String credential;
/**
* 注册资金
*/
@Excel(name = "注册资金(万元)", width = 10)
@Excel(name = "注册资金(万元)", cellType = Excel.ColumnType.NUMERIC, width = 10)
private Double registerCapital;
/**
* 联系人
*/
@Excel(name = "公司联系人", width = 10)
@Excel(name = "公司联系人", width = 10)
private String contactPerson;
/**
* 电话
*/
@Excel(name = "联系人电话", width = 10)
@Excel(name = "联系人电话", width = 10)
private String contactPhone;
/**
* 准入时间
*/
@Excel(name = "准入时间", width = 10 , dateFormat = "yyyy-MM-dd")
@Excel(name = "准入时间", width = 10, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date approveDate2;
/**
* 企业合作数量
*/
@Excel(name = "公司合作数量", width = 10 )
@Excel(name = "公司合作数量", width = 10)
private Integer enterpriseCooperationCount;
/**
* 项目合作数量
*/
@Excel(name = "合作项目数量", width = 10 )
@Excel(name = "合作项目数量", width = 10)
private Integer projectCooperationCount;
/**
* 考评等级
*/
@Excel(name = "分包商等级", width = 10)
@Excel(name = "分包商等级", width = 10)
private String creditLevel;
}
package com.dsk.cscec.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -27,7 +28,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -132,17 +132,18 @@ public class AdvisoryBodyServiceImpl extends ServiceImpl<AdvisoryBodyMapper, Adv
List<Map<String, Object>> data = (List<Map<String, Object>>) jskData.get("list");
for (Map<String, Object> companyData : data) {
//企业名称完全匹配上,则直接返回给前端
if (advisoryBodyName.equals(companyData.get("name"))) {
String companyName = StringUtils.removeRed(MapUtils.getString(companyData, "name","NotExist"));
if (advisoryBodyName.equals(companyName)) {
AdvisoryBodyExistVo advisoryBodyExistVo = new AdvisoryBodyExistVo();
advisoryBodyExistVo.setAdvisoryBodyCid(Math.toIntExact(MapUtils.getLong(companyData, "jskEid")));
advisoryBodyExistVo.setAdvisoryBodyName(MapUtils.getString(companyData, "name"));
advisoryBodyExistVo.setAdvisoryBodyName(companyName);
advisoryBodyExistVo.setBusinessScope(MapUtils.getString(companyData, "businessScope"));
advisoryBodyExistVo.setIsNewAdvisoryBody(true);
break;
return advisoryBodyExistVo;
}
}
//查不到则抛异常
throw new ServiceException("咨询机构不存在");
throw new ServiceException("咨询机构不存在或结果不唯一,请输入完整咨询机构企业名称");
}
}
return null;
......@@ -157,20 +158,24 @@ public class AdvisoryBodyServiceImpl extends ServiceImpl<AdvisoryBodyMapper, Adv
@Override
@Transactional(rollbackFor = Exception.class)
public Integer addAdvisoryBody(AddAdvisoryBodyBo addAdvisoryBodyBo) {
long advisoryBodyId = IdUtil.getSnowflakeNextId();;
//如果是新增咨询机构,则需要新增记录到咨询机构表
if (addAdvisoryBodyBo.getIsNewAdvisoryBody()) {
AdvisoryBody newAdvisoryBody = BeanUtil.toBean(addAdvisoryBodyBo, AdvisoryBody.class);
newAdvisoryBody.setCreateTime(new Date());
newAdvisoryBody.setAdvisoryBodyId(advisoryBodyId);
baseMapper.insert(newAdvisoryBody);
}
return advisoryBodyProjectMapper.insert(BeanUtil.toBean(addAdvisoryBodyBo, AdvisoryBodyProject.class));
AdvisoryBodyProject advisoryBodyProject = BeanUtil.toBean(addAdvisoryBodyBo, AdvisoryBodyProject.class);
advisoryBodyProject.setAdvisoryBodyId(advisoryBodyId);
return advisoryBodyProjectMapper.insert(advisoryBodyProject);
}
/**
* 每小时更新一次咨询机构经营范围
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void updateAdvisoryBodyBusinessScope() {
EnterpriseInfoHeaderBody infoHeaderBody = new EnterpriseInfoHeaderBody();
for (AdvisoryBody advisoryBody : baseMapper.selectList(null)) {
......
......@@ -42,7 +42,7 @@ import java.util.Map;
/**
* 咨询机构管理
*
* @author makejava
* @author sxk
* @since 2023-12-10 15:34:51
*/
@Slf4j
......@@ -148,11 +148,14 @@ public class IDProjectServiceImpl extends ServiceImpl<DProjectMapper, DProject>
public TableDataInfo<CooperateProjectDetailSearchVo> queryCooperateProjectDetailList(CooperateProjectDetailSearchBo cooperateProjectDetailSearchBo, PageQuery pageQuery) {
//先根据咨询机构CID查出所有该咨询机构下的项目主键keys
List<Long> projectKeys = advisoryBodyProjectMapper.selectProjectKeysByAdvisoryBodyCids(Collections.singletonList(cooperateProjectDetailSearchBo.getAdvisoryBodyCid()));
if (projectKeys.isEmpty()) {
return TableDataInfo.build();
}
//再根据记录终改的项目主键查询项目详情
QueryWrapper<DProject> wrapper = Wrappers.query();
wrapper
//项目主键
.in(!projectKeys.isEmpty(), "project_key", projectKeys)
.in("project_key", projectKeys)
//项目名称
.like(StringUtils.isNotBlank(cooperateProjectDetailSearchBo.getProjectName()), "project_name", cooperateProjectDetailSearchBo.getProjectName())
//项目承接类型
......@@ -175,9 +178,9 @@ public class IDProjectServiceImpl extends ServiceImpl<DProjectMapper, DProject>
if (ObjectUtil.isNotNull(advisoryBodyProject)) {
Date settleStartTime = advisoryBodyProject.getSettleStartTime();
Date settleFinishTime = advisoryBodyProject.getSettleFinishTime();
if (ObjectUtil.isNotNull(settleStartTime)&& ObjectUtil.isNotNull(settleFinishTime)) {
if (ObjectUtil.isNotNull(settleStartTime) && ObjectUtil.isNotNull(settleFinishTime)) {
cooperateProjectDetailSearchVo.setSettlementDays(DateUtil.between(settleStartTime, settleFinishTime, DateUnit.DAY));
}else {
} else {
cooperateProjectDetailSearchVo.setSettlementDays(0L);
}
}
......
......@@ -61,4 +61,30 @@ public class CompanyRelationTableV1Controller {
public R pageSelect(@RequestBody JskCompanyRelationTableV1Dto dto) throws Exception{
return relationTableV1Service.pageSelect(dto);
}
/***
*@Description: -分页列表-统计
*@Param:
*@return: com.dsk.common.core.domain.AjaxResult
*@Author: Dgm
*@date: 2023/5/18 10:29
*/
@PostMapping("/statistics")
public R statistics(@RequestBody JskCompanyRelationTableV1Dto dto) throws Exception{
return relationTableV1Service.statistics(dto);
}
/***
*@Description: 常合作集团成员详情-分页列表
*@Param:
*@return: com.dsk.common.core.domain.AjaxResult
*@Author: Dgm
*@date: 2023/5/18 10:29
*/
@PostMapping("/combinePage")
public TableDataInfo combinePage(@RequestBody JskCompanyRelationTableV1Dto dto) throws Exception {
return relationTableV1Service.combinePage(dto);
}
}
......@@ -67,5 +67,10 @@ public class JskCompanyRelationTableV1Dto extends BasePage {
*/
private Integer sort = 5;
/**
* 集团Id
*/
private Integer combineId;
}
......@@ -25,12 +25,22 @@ public class CompanyRelationTableV1Service {
private DskOpenApiUtil dskOpenApiUtil;
public TableDataInfo page(JskCompanyRelationTableV1Dto dto) throws Exception {
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/consultancy/page", BeanUtil.beanToMap(dto, false, false));
Map<String, Object> map = null;
if (dto.getCompanyType().equals(3)) {
map = dskOpenApiUtil.requestBody("/operate/consultancy/combinePage", BeanUtil.beanToMap(dto, false, false));
} else {
map = dskOpenApiUtil.requestBody("/operate/consultancy/page", BeanUtil.beanToMap(dto, false, false));
}
return dskOpenApiUtil.responsePage(map);
}
public TableDataInfo detailPage(JskCompanyRelationTableV1Dto dto) throws Exception{
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/consultancy/detailPage", BeanUtil.beanToMap(dto, false, false));
public TableDataInfo detailPage(JskCompanyRelationTableV1Dto dto) throws Exception {
Map<String, Object> map = null;
if (dto.getCompanyType().equals(3)) {
map = dskOpenApiUtil.requestBody("/operate/consultancy/combineDetailPage", BeanUtil.beanToMap(dto, false, false));
} else {
map = dskOpenApiUtil.requestBody("/operate/consultancy/detailPage", BeanUtil.beanToMap(dto, false, false));
}
return dskOpenApiUtil.responsePage(map);
}
......@@ -45,4 +55,21 @@ public class CompanyRelationTableV1Service {
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/consultancy/pageSelect", BeanUtil.beanToMap(dto, false, false));
return BeanUtil.toBean(map, R.class);
}
/***
*@Description: -分页列表-下拉
*@Param:
*@return: com.dsk.common.core.domain.AjaxResult
*@Author: Dgm
*@date: 2023/5/18 10:29
*/
public R statistics(JskCompanyRelationTableV1Dto dto) throws Exception{
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/consultancy/statistics", BeanUtil.beanToMap(dto, false, false));
return BeanUtil.toBean(map, R.class);
}
public TableDataInfo combinePage(JskCompanyRelationTableV1Dto dto) throws Exception {
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/consultancy/combinePage", BeanUtil.beanToMap(dto, false, false));
return dskOpenApiUtil.responsePage(map);
}
}
//package com.dsk.monitor.job;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.dsk.common.utils.DateUtils;
//import com.dsk.monitor.domain.dto.PushMonitorRules;
//import com.dsk.monitor.mapper.PushMonitorInfoMapper;
//import com.dsk.monitor.mapper.PushMonitorRulesMapper;
//import com.dsk.monitor.util.SendMessageUtil;
//import org.springframework.scheduling.annotation.Scheduled;
//
//import javax.annotation.Resource;
//
///**
// * @ClassName PushScheduling
// * @Description 发送短信
// * @Author Dgm
// * @Date 2023/12/9 13:51
// * @Version
// */
//public class PushScheduling {
//
// @Resource
// private PushMonitorInfoMapper monitorInfoMapper;
//
// @Resource
// private PushMonitorRulesMapper rulesMapper;
//
// @Scheduled(cron = "0 0 5 * * * ?")
// public void receiveModePhone() {
// // 获取当前整点时间
// Integer concurrentHour = DateUtils.getHour();
// QueryWrapper queryWrapper = new QueryWrapper();
// PushMonitorRules detail = rulesMapper.selectOne(queryWrapper);
// // 推送时段-起
// Integer timePeriodStart = detail.getTimePeriodStart();
// // 推送时段-止
// Integer timePeriodEnd = detail.getTimePeriodEnd();
// if (concurrentHour > timePeriodStart && concurrentHour < timePeriodEnd) {
// QueryWrapper monitorInfoWrapper = new QueryWrapper();
// // 风险类型
// monitorInfoWrapper.in("risk_type", detail.getRiskType());
// // 监控维度
// monitorInfoWrapper.in("dimension", detail.getDimension());
// Long count = monitorInfoMapper.selectCount(monitorInfoWrapper);
// if (count >0 ) {
// SendMessageUtil.sendMessage(detail.getPhones(), count.toString());
// }
// }
// }
//}
package com.dsk.monitor.job;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dsk.common.tenant.helper.TenantHelper;
import com.dsk.common.utils.DateUtils;
import com.dsk.monitor.domain.dto.PushMonitorRules;
import com.dsk.monitor.domain.vo.ConditionVo;
import com.dsk.monitor.domain.vo.PushMonitorDynamicPageVo;
import com.dsk.monitor.mapper.PushMonitorInfoMapper;
import com.dsk.monitor.mapper.PushMonitorRulesMapper;
import com.dsk.monitor.service.MonitorService;
import com.dsk.monitor.util.SendMessageUtil;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* @ClassName PushScheduling
* @Description 发送短信
* @Author Dgm
* @Date 2023/12/9 13:51
* @Version
*/
@Component
public class PushScheduling {
@Resource
private MonitorService monitorService;
@Resource
private PushMonitorInfoMapper monitorInfoMapper;
@Resource
private PushMonitorRulesMapper rulesMapper;
// @Scheduled(cron = "0 0/2 * * * ?")
@Scheduled(cron = "0 0 * * * ?")
public void receiveModePhone() throws Exception {
// 是否是周末
boolean isWeekend = DateUtil.isWeekend(new Date());
String aa = DateUtil.now();
TenantHelper.setTenantId("1");
// 获取当前整点时间
Integer concurrentHour = DateUtils.getHour();
QueryWrapper<PushMonitorRules> queryWrapper = new QueryWrapper();
List<PushMonitorRules> detailList = rulesMapper.selectList(queryWrapper);
for (PushMonitorRules detail : detailList) {
// 推送时段-起
String timePeriodStart = detail.getTimePeriodStart();
timePeriodStart = timePeriodStart.substring(0,2);
if (timePeriodStart.contains("0")) {
timePeriodStart = timePeriodStart.substring(1,2);
}
// 推送时段-止
String timePeriodEnd = detail.getTimePeriodEnd();
timePeriodEnd = timePeriodEnd.substring(0,2);
if (timePeriodEnd.contains("0")) {
timePeriodEnd = timePeriodEnd.substring(1,2);
}
Integer pushFrequency = detail.getPushFrequency();
if (pushFrequency > 1) {
if (isWeekend) {
continue;
}
}
Integer timeStart = Integer.valueOf(timePeriodStart);
Integer timeEnd = Integer.valueOf(timePeriodEnd);
if (concurrentHour >= timeStart && concurrentHour <= timeEnd) {
QueryWrapper monitorInfoWrapper = new QueryWrapper();
// 风险类型
// monitorInfoWrapper.in("risk_type", detail.getRiskType());
PushMonitorDynamicPageVo pageVo = new PushMonitorDynamicPageVo();
pageVo.setUserId(detail.getUserId());
ConditionVo vo = new ConditionVo();
// 截止时间
vo.setEndTime(DateUtils.getDate());
vo.setBeginTime(DateUtils.format(DateUtils.addDays(new Date(),-1)));
// 监控维度
vo.setDimension(getDimension(detail.getDimension()));
vo.setUserId(detail.getUserId());
pageVo.setCondition(vo);;
Integer count = monitorService.companyDynamicPage2(pageVo);
if (count > 0 ) {
SendMessageUtil.sendMessage(detail.getPhones(), count.toString());
}
}
}
}
public List<String> getDimension(String dimension) {
List<String> dimensionList = Arrays.asList(dimension.split(","));
return dimensionList;
}
}
......@@ -52,7 +52,7 @@ public interface MonitorService {
/***
*@Description: 监控动态/监控报告 分页
*@Description: 监控动态 分页
*@Param: pageVo 信息
*@return: R
*@Author: Dgm
......@@ -60,6 +60,15 @@ public interface MonitorService {
*/
TableDataInfo companyDynamicPage(PushMonitorDynamicPageVo pageVo) throws Exception;
/***
*@Description: 监控动态分页(定时任务使用)
*@Param: pageVo 信息
*@return: R
*@Author: Dgm
*@date: 2023/12/9 10:03
*/
Integer companyDynamicPage2(PushMonitorDynamicPageVo pageVo) throws Exception;
/***
*@Description: 监控报告
*@Param: pageVo 信息
......
......@@ -14,6 +14,7 @@ import com.dsk.monitor.mapper.PushMonitorRulesMapper;
import com.dsk.monitor.service.MonitorService;
import com.dsk.system.utils.DskOpenApiUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
......@@ -92,7 +93,6 @@ public class MonitorServiceImpl implements MonitorService {
@Override
public TableDataInfo companyDynamicPage(PushMonitorDynamicPageVo pageVo) throws Exception {
pageVo.setPageSize(3);
Long userId = LoginHelper.getUserId();
if (ObjectUtil.isNotEmpty(userId)) {
pageVo.setUserId(userId);
......@@ -103,6 +103,19 @@ public class MonitorServiceImpl implements MonitorService {
return dskOpenApiUtil.responsePageT(map);
}
@Override
public Integer companyDynamicPage2(PushMonitorDynamicPageVo pageVo) throws Exception {
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/monitor/company/info/companyDynamicList", BeanUtil.beanToMap(pageVo, false, false));
log.info("companyDynamicPage=============================>"+map);
Integer code = MapUtils.getInteger(map, "code", 300);
Map data = MapUtils.getMap(map, "data", null);
Integer count = 0;
if (code.equals(200)) {
count = MapUtils.getInteger(data, "totalCount", 0);
}
return count;
}
@Override
public TableDataInfo reportPage(PushMonitorReportPageVo pageVo) throws Exception {
Long userId = LoginHelper.getUserId();
......@@ -195,13 +208,13 @@ public class MonitorServiceImpl implements MonitorService {
}
//进行excel格式判定
String name = sheet.getRow(0).getCell(0) + "";
String name = sheet.getRow(2).getCell(0) + "";
//只要其中一个不满足则格式有误
if (!"企业名称".equals(name)){
return R.fail("操作失败,数据异常,请使用正确的模板");
}
//行列皆从0开始
for (int i = 1; i <= lastRowNum; i++) {
for (int i = 3; i <= lastRowNum; i++) {
String companyNameStr = "";
// 统一社会信用代码
Cell companyName = sheet.getRow(i).getCell(0);
......
......@@ -9,7 +9,10 @@
from advisory_body_project abp
<where>
<if test="advisoryBodyCids != null">
abp.advisory_body_cid = #{advisoryBodyCids}
abp.advisory_body_cid in
<foreach collection="advisoryBodyCids" item="advisoryBodyCids" open="(" close=")" separator=",">
#{advisoryBodyCids}
</foreach>
</if>
</where>
</select>
......
......@@ -137,36 +137,36 @@
</if>
</trim>
</if>
<if test="bo.groupSpecialtyId != null ">
<if test="bo.groupSpecialtyId != null and bo.groupSpecialtyId.size > 0 ">
<foreach collection="bo.groupSpecialtyId" item="groupSpecialtyId">
and find_in_set(#{groupSpecialtyId},group_specialty_id) > 0
</foreach>
</if>
<if test="bo.customerState != null ">
<if test="bo.customerState != null and bo.customerState.size > 0 ">
and customer_state in
<foreach collection="bo.customerState" item="customerState" separator="," open="(" close=")">
#{customerState}
</foreach>
</if>
<if test="bo.credential != null ">
<if test="bo.credential != null and bo.credential.size > 0 ">
and credential in
<foreach collection="bo.credential" item="credential" separator="," open="(" close=")">
#{credential}
</foreach>
</if>
<if test="bo.creditLevel != null ">
<if test="bo.creditLevel != null and bo.creditLevel.size > 0 ">
and credit_level in
<foreach collection="bo.creditLevel" item="creditLevel" separator="," open="(" close=")">
#{creditLevel}
</foreach>
</if>
<if test="bo.paytaxType != null">
<if test="bo.paytaxType != null and bo.paytaxType.size > 0 ">
and paytax_type in
<foreach collection="bo.paytaxType" item="paytaxType" separator="," open="(" close=")">
#{paytaxType}
</foreach>
</if>
<if test="bo.taxRate != null">
<if test="bo.taxRate != null and bo.taxRate.size > 0 ">
and tax_rate in
<foreach collection="bo.taxRate" item="taxRate" separator="," open="(" close=")">
#{taxRate}
......
......@@ -31,4 +31,15 @@ export const getConsultingOrgEenterpriseDetailWithSearchApi = (params) => reques
url: "/advisory/body/getCooperateProjectDetailList",
method: "get",
params
});
/**
* 咨询机构项目列表 项目跳转详情获取
* @param {*} params
* @returns
*/
export const getgetConsultingOrgProjectDetailApi = (params) => request({
url: "/advisory/body/getProjectDetail",
method: "get",
params
});
\ No newline at end of file
......@@ -6,7 +6,52 @@ import request from '@/utils/request';
* @returns
*/
export const getCooperativeOwnerUnitsListApi = (data) => request({
url: "/consultancy/page",
method: "post",
data
});
/**
* 获取(常合作业主单位、常合作施工单位、常合作集团)详情
* @param {*} data
* @returns
*/
export const getCooperativeOwnerUnitsDetailApi = (data) => request({
url: "/consultancy/detailPage",
method: "post",
data
});
/**
* 获取下拉列表选项
* @param {*} data
* @returns
*/
export const getCooperativeOwnerUnitsOptionsApi = (data) => request({
url: "/consultancy/pageSelect",
method: "post",
data
});
/**
* 当前页列表 amount 总数
* @param {*} data
* @returns
*/
export const getCooperativeOwnerUnitsCountAmountApi = (data) => request({
url: "/consultancy/statistics",
method: "post",
data
});
/**
* 常合作集团详情 合作成员列表
* @param {*} data
* @returns
*/
export const getCooperativeGroupMemberApi = (data) => request({
url: "/consultancy/combinePage",
method: "post",
data
});
\ No newline at end of file
......@@ -453,14 +453,9 @@ li {
// 封装组件样式
.table-list-com-ins {
.table-item {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.el-table {
width: 100%;
height: 100%;
height: auto;
font-size: 14px;
color: #232323;
......
<template>
<div class="table-list-com-ins">
<div class="table-list-com-ins" :class="{'is-empty-table' : !tableDataTotal}">
<div class="table-item">
<el-table v-if="tableDataTotal>0" class="fixed-table" :class="headerFixed ? 'headerFixed':''" v-loading="tableLoading" :data="tableData"
element-loading-text="Loading" ref="tableRef" border fit highlight-current-row :default-sort="defaultSort?defaultSort:{}"
@sort-change="sortChange" @selection-change="selectionChange" :cell-class-name="cellClassName" :cell-style="cellStyle"
:row-class-name="rowClassName" :row-style="rowStyle" :height="height" :maxHeight="maxHeight" v-sticky-header="stickyHeader">
:row-class-name="rowClassName" :row-style="rowStyle" :height="height" :maxHeight="comMaxHeight" v-sticky-header="stickyHeader">
<el-table-column type="selection" :width="needSelection.width ? needSelection.width : '38px'" v-if="needSelection.flag"
:fixed="needSelection.fixed" :align="needSelection.align" :show-overflow-tooltip="needSelection.showOverflowTooltip">
</el-table-column>
......@@ -58,7 +58,7 @@
</template>
</el-table>
<div style="padding: 30px 0;box-sizing:border-box;" v-else>
<div class="table-empty-container" v-else>
<no-data />
</div>
</div>
......@@ -80,7 +80,7 @@ export default {
type: [String, Number]
},
maxHeight: {
type: [String, Number]
type: Boolean
},
isIndex: {
type: Boolean,
......@@ -168,7 +168,8 @@ export default {
data() {
return {
current_page: this.queryParams.pageNum,
show_page: this.paging
show_page: this.paging,
comMaxHeight: null
};
},
watch: {
......@@ -177,9 +178,24 @@ export default {
}
},
created() {
this.maxHeight ? this.maxHeightInit() : null;
},
methods: {
// 自适应当前容器
async maxHeightInit() {
try {
await this.$nextTick();
/**
* @type {HTMLDivElement}
*/
const container = this.$el.querySelector(".table-item");
if (container) {
this.comMaxHeight = `${container.offsetHeight}px`;
}
} catch (error) {
}
},
handleCurrentChange(e) {
if (this.MaxPage < e) {
this.show_page = false;
......@@ -214,7 +230,15 @@ export default {
<style lang="scss" scoped>
.table-list-com-ins {
&.is-empty-table {
.table-item {
max-height: unset;
height: 100%;
}
}
::v-deep .table-item {
width: 100%;
max-height: calc(100% - 40px);
.no-line-feed {
display: block;
color: #0081ff;
......@@ -250,11 +274,25 @@ export default {
height: 16px;
}
// 空状态容器
.table-empty-container {
width: 100%;
height: 100%;
min-height: 360px;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
.no-data {
min-height: unset;
}
}
.el-table {
/* .cell {
display: flex;
align-items: center;
} */
.el-table__header-wrapper {
min-height: 40px;
}
}
}
......
<template>
<div class="basic-engineering-information">
<div class="basic-engineering-information-inner">
<!-- 项目主体 -->
<div class="project-subject">
<div class="info-module-title"><span>项目主体</span></div>
<table>
<colgroup>
<col>
<col :style="{width : tableKeyWidth}">
<col>
<col :style="{width : tableKeyWidth}">
</colgroup>
<tr>
<td class="table-key">业主单位</td>
<td>{{comProjectDetailInfo.ownerName ? comProjectDetailInfo.ownerName : "-"}}</td>
<td class="table-key">工程承包单位</td>
<td>{{comProjectDetailInfo.contractOrgName ? comProjectDetailInfo.contractOrgName : "-"}}</td>
</tr>
<tr>
<td class="table-key">履约责任单位</td>
<td>{{comProjectDetailInfo.ownerName ? comProjectDetailInfo.ownerName : "-"}}</td>
<td class="table-key">咨询单位</td>
<td>{{comProjectDetailInfo.advisoryBodyName ? comProjectDetailInfo.advisoryBodyName : "-"}}</td>
</tr>
</table>
</div>
<!-- 工程概况 -->
<div class="project-overview">
<div class="info-module-title"><span>工程概况</span></div>
<table>
<colgroup>
<col>
<col :style="{width : tableKeyWidth}">
<col>
<col :style="{width : tableKeyWidth}">
</colgroup>
<tr>
<td class="table-key">国内外</td>
<td>{{"-"}}</td>
<td class="table-key">省市</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key">投资来源</td>
<td>{{"-"}}</td>
<td class="table-key">项目承接类型</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key">投资来源</td>
<td>{{"-"}}</td>
<td class="table-key">项目承接类型</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key">合同签订日期</td>
<td>{{"-"}}</td>
<td class="table-key">合同总工期</td>
<td>{{comProjectDetailInfo.contractWorkDays ? `${comProjectDetailInfo.contractWorkDays}天` : "-"}}</td>
</tr>
<tr>
<td class="table-key">开工日期方式</td>
<td>{{"-"}}</td>
<td class="table-key">开工具体时间</td>
<td>{{comProjectDetailInfo.actualStartDate ? comProjectDetailInfo.actualStartDate : "-"}}</td>
</tr>
<tr>
<td class="table-key">竣工具体方式</td>
<td>{{"-"}}</td>
<td class="table-key">竣工具体时间</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key">工程类型大类</td>
<td>{{"-"}}</td>
<td class="table-key">工程类型明细</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key">建筑高度</td>
<td>{{comProjectDetailInfo.constructHeight ? `${comProjectDetailInfo.constructHeight }m`: "-"}}</td>
<td class="table-key">建筑面积</td>
<td>{{comProjectDetailInfo.buildingArea ? `${comProjectDetailInfo.buildingArea}㎡` : "-"}}</td>
</tr>
<tr>
<td class="table-key">地上层数</td>
<td>{{comProjectDetailInfo.noOfOverfloor ? `${comProjectDetailInfo.noOfOverfloor}层` : "-"}}</td>
<td class="table-key">地下层数</td>
<td>{{comProjectDetailInfo.noOfUnderfloor ? `${comProjectDetailInfo.noOfUnderfloor}层` : "-"}}</td>
</tr>
</table>
</div>
<!-- 目标责任书 -->
<div class="target-responsibility-letter">
<div class="info-module-title"><span>目标责任书</span></div>
<table>
<colgroup>
<col>
<col :style="{width : tableKeyWidth}">
<col>
<col :style="{width : tableKeyWidth}">
</colgroup>
<tr>
<td class="table-key">预收益率</td>
<td>{{comProjectDetailInfo.estiProfitRate ? `${comProjectDetailInfo.estiProfitRate}%` : "-"}}</td>
<td class="table-key">预收益额</td>
<td>{{comProjectDetailInfo.estiTtlProfit ? `${comProjectDetailInfo.estiTtlProfit}元` : "-"}}</td>
</tr>
</table>
</div>
<!-- 条款内容 -->
<div class="clause-content">
<div class="info-module-title"><span>条款内容</span></div>
<table>
<colgroup>
<col>
<col :style="{width : tableKeyWidth}">
<col>
<col :style="{width : tableKeyWidth}">
</colgroup>
<tr>
<td class="table-key">合同金额</td>
<td>{{"-"}}</td>
<td class="table-key">自施部分</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key">计价依据</td>
<td>{{"-"}}</td>
<td class="table-key">预收益率</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key">业主批量申报日期</td>
<td>{{"-"}}</td>
<td class="table-key">批量时限</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key">付款时限</td>
<td colspan="3">{{"-"}}</td>
</tr>
</table>
</div>
<!-- 工程预付款 -->
<div class="advance-payment-for-construction">
<div class="info-module-title"><span>工程预付款</span></div>
<table>
<colgroup>
<col>
<col :style="{width : tableKeyWidth}">
<col>
<col :style="{width : tableKeyWidth}">
</colgroup>
<tr>
<td class="table-key">工程预付款</td>
<td>{{"-"}}</td>
<td class="table-key">支付比例</td>
<td>{{"-"}}</td>
</tr>
</table>
</div>
<!-- 工程款项 -->
<div class="advance-payment-for-construction">
<div class="info-module-title"><span>工程款项</span></div>
<table>
<colgroup>
<col>
<col :style="{width : tableKeyWidth}">
<col>
<col :style="{width : tableKeyWidth}">
</colgroup>
<tr>
<td class="table-key">支付方式</td>
<td>{{"-"}}</td>
<td class="table-key">按节点支付比例</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key">按月度支付比例</td>
<td>{{"-"}}</td>
<td class="table-key">审核期限</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key">支付期限</td>
<td>{{"-"}}</td>
<td class="table-key">竣工累计支付</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key">工程结算后累计支付</td>
<td>{{"-"}}</td>
<td class="table-key">保修金预留比例</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key lot">工程结算后累计支付</td>
<td colspan="3">{{"-"}}</td>
</tr>
</table>
</div>
<!-- 履约担保 -->
<div class="performance-guarantee">
<div class="info-module-title"><span>履约担保</span></div>
<table>
<colgroup>
<col>
<col :style="{width : tableKeyWidth}">
<col>
<col :style="{width : tableKeyWidth}">
</colgroup>
<tr>
<td class="table-key">担保形式</td>
<td>{{"-"}}</td>
<td class="table-key">担保额度</td>
<td>{{"-"}}</td>
</tr>
</table>
</div>
<!-- 竣工结算 -->
<div class="completion-settlement">
<div class="info-module-title"><span>竣工结算</span></div>
<table>
<colgroup>
<col>
<col :style="{width : tableKeyWidth}">
<col>
<col :style="{width : tableKeyWidth}">
</colgroup>
<tr>
<td class="table-key">竣工结算审核期限</td>
<td>{{"-"}}</td>
<td class="table-key">是否承诺放弃工程价款优先受偿权</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key">是否以行为事实放弃工程价款优先受偿权</td>
<td>{{"-"}}</td>
<td class="table-key">工程拖期违约金比例</td>
<td>{{"-"}}</td>
</tr>
</table>
</div>
<!-- 工期拖期违约金上线 -->
<div class="delay-period">
<div class="info-module-title"><span>工期拖期违约金上线</span></div>
<table>
<colgroup>
<col>
<col :style="{width : tableKeyWidth}">
<col>
<col :style="{width : tableKeyWidth}">
</colgroup>
<tr>
<td class="table-key">/</td>
<td>{{"-"}}</td>
<td class="table-key">上线比例</td>
<td>{{"-"}}</td>
</tr>
</table>
</div>
<!-- 其它信息 -->
<div class="other-information">
<div class="info-module-title"><span>其它信息</span></div>
<table>
<colgroup>
<col>
<col :style="{width : tableKeyWidth}">
<col>
<col :style="{width : tableKeyWidth}">
</colgroup>
<tr>
<td class="table-key">是否分别签订执行和备案合同</td>
<td>{{"-"}}</td>
<td class="table-key">承包单位</td>
<td>{{"-"}}</td>
</tr>
<tr>
<td class="table-key">评审级别</td>
<td>{{"-"}}</td>
<td class="table-key">创建日期</td>
<td>{{"-"}}</td>
</tr>
</table>
</div>
</div>
</div>
</template>
<script>
export default {
name: "basicEngineeringInformation",
props: {
projectDetailInfo: Object
},
watch: {
projectDetailInfo: {
handler(newValue) {
this.comProjectDetailInfo = newValue;
},
deep: true
}
},
data() {
return {
comProjectDetailInfo: this.projectDetailInfo,
tableKeyWidth: 0
};
},
//可访问data属性
created() {
this.setTableKeyWidth();
},
//计算集
computed: {
},
//方法集
methods: {
async setTableKeyWidth() {
try {
await this.$nextTick();
/**
* @type {HTMLDivElement}
*/
const inner = document.querySelector(".basic-engineering-information-inner");
if (inner) {
const td = parseInt((inner.offsetWidth - 140 * 2) / 2);
this.tableKeyWidth = `${parseInt(parseFloat(td / inner.offsetWidth) * 100)}%`;
}
} catch (error) {
}
}
},
}
</script>
<style lang="scss" scoped>
.basic-engineering-information {
width: 100%;
height: 100%;
background: #fff;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
padding: 16px;
box-sizing: border-box;
overflow: auto;
.basic-engineering-information-inner {
width: 100%;
.info-module-title {
line-height: 24px;
color: #232323;
font-weight: bold;
font-size: 16px;
margin-bottom: 16px;
display: flex;
align-items: center;
& > span {
display: inline-block;
position: relative;
padding-left: 8px;
box-sizing: border-box;
&::before {
content: "";
position: absolute;
left: 0px;
top: 50%;
transform: translateY(-50%);
background: rgba(35, 35, 35, 0.8);
width: 2px;
height: 14px;
}
}
}
table {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
&,
th,
td {
border: 1px solid #e6eaf1;
box-sizing: border-box;
}
td {
padding: 9px 12px;
line-height: 22px;
color: #232323;
font-size: 12px;
}
.table-key {
background: #f0f3fa;
color: rgba(35, 35, 35, 0.8);
width: 140px;
&.lot {
height: 62px;
}
}
.data-td {
width: calc(100% - 140px);
}
}
.project-overview,
.target-responsibility-letter,
.clause-content,
.advance-payment-for-construction,
.performance-guarantee,
.completion-settlement,
.delay-period,
.other-information {
margin-top: 24px;
}
}
}
</style>
<template>
<div class="consulting-agency-container">
</div>
</template>
<script>
export default {
name: "consultingAgency",
data() {
return {
};
},
//可访问data属性
created() {
},
//计算集
computed: {
},
//方法集
methods: {
},
}
</script>
<style lang="scss" scoped>
.consulting-agency-container {
width: 100%;
height: 100%;
background: #fff;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
padding: 16px;
box-sizing: border-box;
overflow: auto;
}
</style>
......@@ -53,10 +53,22 @@
<skeleton v-if="tableLoading"></skeleton>
<!-- table 列表 -->
<table-list-com ref="tableContainer" :tableData="tableDataList" :formColum="formColum" :tableDataTotal="total" :queryParams="queryParams"
v-else-if="!tableLoading" :height="'100%'" @handle-current-change="handleCurrentChange">
v-else-if="!tableLoading" :maxHeight="true" @handle-current-change="handleCurrentChange">
<!-- 项目列表 -->
<template slot="projectName" slot-scope="{data,row}">
<div v-if="row.projectName" class="no-line-feed ">{{row.projectName}}</div>
<div v-if="row.projectName" class="no-line-feed">{{row.projectName}}</div>
<span v-else>-</span>
</template>
<template slot="projectLeader" slot-scope="{data,row}">
<div v-if="row.advisoryBodyProject && row.advisoryBodyProject.projectLeader">{{row.advisoryBodyProject.projectLeader}}</div>
<span v-else>-</span>
</template>
<template slot="projectLeaderMajor" slot-scope="{data,row}">
<div v-if="row.advisoryBodyProject && row.advisoryBodyProject.projectLeaderMajor">{{row.advisoryBodyProject.projectLeaderMajor}}</div>
<span v-else>-</span>
</template>
<template slot="projectLeaderPhone" slot-scope="{data,row}">
<div v-if="row.advisoryBodyProject && row.advisoryBodyProject.projectLeaderPhone">{{row.advisoryBodyProject.projectLeaderPhone}}</div>
<span v-else>-</span>
</template>
</table-list-com>
......@@ -99,12 +111,12 @@ export default {
{ label: '项目列表', prop: 'projectName', width: "222px", lock: true, fixed: false, slot: true, uid: v4(), showOverflowTooltip: true },
{ label: '合同编码', prop: 'projectCode', width: "123px", uid: v4() },
{ label: '省市', prop: 'provinceName', width: "102px", uid: v4() },
{ label: '项目承接类型', prop: 'isinvestproject', width: "102px", uid: v4() },
{ label: '项目承接类型', prop: 'isinvestproject', minWidth: "102px", uid: v4() },
{ label: '工程基础大类', prop: 'projectType1', width: "98px", uid: v4() },
{ label: '工程类别明细', prop: 'projectType', width: "98px", uid: v4() },
{ label: '项目负责人姓名', prop: 'projectLeader', width: "110px", uid: v4() },
{ label: '项目负责人专业', prop: 'projectLeaderMajor', width: "110px", uid: v4() },
{ label: '项目负责人联系电话', prop: 'projectLeaderPhone', width: "134px", uid: v4() },
{ label: '项目负责人姓名', prop: 'projectLeader', width: "110px", slot: true, uid: v4() },
{ label: '项目负责人专业', prop: 'projectLeaderMajor', width: "110px", slot: true, uid: v4() },
{ label: '项目负责人联系电话', prop: 'projectLeaderPhone', width: "134px", slot: true, uid: v4() },
],
queryParams: {
pageSize: 20,
......@@ -197,7 +209,7 @@ export default {
resetForm() {
const defaultValue = this.$options.data.call(this);
this.form = defaultValue.form;
this.queryParams = defaultValue.queryParams;
this.queryParams = { ...defaultValue.queryParams, advisoryBodyCid: this.queryParams.advisoryBodyCid };
this.getList(this.queryParams);
},
async getList(params) {
......@@ -326,7 +338,7 @@ export default {
@import "@/assets/styles/search-result-list-public.scss";
::v-deep .table-list-com-ins {
height: calc(100% - 80px);
height: calc(100% - 40px);
margin-top: 16px;
.pagination-box {
......
<template>
<div class="project-detail-container">
<div class="project-detail-inner">
<div class="project-header-container">
<!-- 项目名称 logo -->
<div class="prject-icon-and-title">
<img src="@/assets/images/financing/head_icon.png" alt="">
<div class="prject-title">{{projectDetailInfo.finProjectName ? projectDetailInfo.finProjectName : "-"}}</div>
</div>
<!-- 项目承接单位 -->
<div class="project-undertaking-unit-container">
<span class="project-undertaking-unit-title">项目承接单位:</span>
<span class="project-undertaking-unit">{{projectDetailInfo.contractOrgName ? projectDetailInfo.contractOrgName : "-"}}</span>
</div>
</div>
<!-- tab切换部分 -->
<div class="project-consulting-agency">
<!-- tab切换栏 -->
<dsk-tab-toggle v-model="currentList" :tabs="toggleTabs"></dsk-tab-toggle>
<!-- tab切换容器 -->
<div class="project-consulting-agency-inner">
<!-- 工程基本信息 -->
<basic-engineering-information v-if="currentList === 'project'" :projectDetailInfo="projectDetailInfo"></basic-engineering-information>
<!-- 咨询机构结算信息 -->
<consulting-agency v-if="currentList === 'consultingAgency'" :projectDetailInfo="projectDetailInfo"></consulting-agency>
</div>
</div>
</div>
</div>
</template>
<script>
import DskTabToggle from "@/components/DskTabToggle";
import { getgetConsultingOrgProjectDetailApi } from "@/api/consultingOrgManagement/index";
import { v4 } from 'uuid';
import BasicEngineeringInformation from "@/views/consultingOrgManagement/components/EnterpriseList/detail/basicEngineeringInformation";
import consultingAgency from "@/views/consultingOrgManagement/components/EnterpriseList/detail/consultingAgency";
export default {
name: "projectDetail",
components: {
DskTabToggle,
BasicEngineeringInformation,
consultingAgency
},
data() {
return {
currentList: "project",
toggleTabs: [
{
value: "project",
name: "工程基本信息",
id: v4()
},
{
value: "consultingAgency",
name: "咨询机构结算信息",
id: v4()
}
],
projectDetailInfo: {},
projectKey: "",
advisoryBodyCid: ""
};
},
//可访问data属性
created() {
this.init();
},
//计算集
computed: {
},
//方法集
methods: {
async init() {
try {
const advisoryBodyCid = this.$route.params?.advisoryBodyCid;
const projectKey = this.$route.query?.projectKey;
if (!advisoryBodyCid) return this.$message.error("缺少咨询机构ID");
if (!projectKey) return this.$message.error("缺少项目主键");
const detail = await getgetConsultingOrgProjectDetailApi({
advisoryBodyCid,
projectKey
});
if (detail.code == 200 && detail.data) {
this.projectDetailInfo = { ...this.pprojectDetailInfo, ...detail.data };
}
} catch (error) {
}
}
},
}
</script>
<style lang="scss" scoped>
.project-detail-container {
width: 100%;
height: 100%;
padding: 16px 24px 24px 24px;
box-sizing: border-box;
overflow: hidden;
.project-detail-inner {
width: 100%;
height: 100%;
.project-header-container {
width: 100%;
height: 94px;
background: #fff;
border-radius: 4px;
padding: 16px;
box-sizing: border-box;
.prject-icon-and-title {
display: flex;
align-items: center;
& > img {
width: 28px;
height: 28px;
}
.prject-title {
font-size: 16px;
font-weight: bold;
color: #232323;
margin-left: 12px;
}
}
.project-undertaking-unit-container {
display: flex;
align-items: center;
margin-top: 16px;
.project-undertaking-unit-title {
font-size: 14px;
font-weight: 400;
color: rgba(35, 35, 35, 0.4);
}
.project-undertaking-unit {
color: rgba(35, 35, 35, 0.8);
font-size: 14px;
font-weight: 400;
margin-left: 8px;
}
}
}
.project-consulting-agency {
width: 100%;
height: calc(100% - 110px);
margin-top: 16px;
.project-consulting-agency-inner {
width: 100%;
height: calc(100% - 47px);
}
}
}
}
</style>
......@@ -36,10 +36,10 @@
<skeleton v-if="tableLoading"></skeleton>
<!-- table 列表 -->
<table-list-com ref="tableContainer" :tableData="tableDataList" :formColum="formColum" :tableDataTotal="total" :queryParams="queryParams"
v-else-if="!tableLoading" :height="'100%'" @handle-current-change="handleCurrentChange">
v-else-if="!tableLoading" :maxHeight="true" @handle-current-change="handleCurrentChange">
<!-- 咨询机构名称 -->
<template slot="advisoryBodyName" slot-scope="{data,row}">
<div v-if="row.advisoryBodyName" class="no-line-feed ">{{row.advisoryBodyName}}</div>
<div v-if="row.advisoryBodyName" class="no-line-feed" @click="viewEnterprise(row)">{{row.advisoryBodyName}}</div>
<span v-else>-</span>
</template>
<!-- 合作项目数量 -->
......@@ -70,6 +70,7 @@ import Skeleton from "@/components/Skeleton";
import { getConsultingOrgEenterpriseListWithSearchApi } from "@/api/consultingOrgManagement";
import { queryConditionFiltering } from "@/utils";
import { v4 } from 'uuid';
import { encodeStr } from "@/assets/js/common";
export default {
name: "cooperationDeskAccountEnterprise",
components: {
......@@ -140,6 +141,10 @@ export default {
if (!row.advisoryBodyCid) return this.$message.warning("缺少咨询机构id");
this.$tab.openPage(`${row.advisoryBodyName}合作明细`, `/consultingOrgManagement/detailsOfCooperation/${row.advisoryBodyCid}`);
},
// 跳转到企业详情
viewEnterprise(row) {
this.$tab.openPage(row.advisoryBodyName ? row.advisoryBodyName : "咨询机构详情", `/enterprise/${encodeStr(row.advisoryBodyCid)}`);
},
// 创建最终查询条件
mergeCondition() {
const _queryParams = JSON.parse(JSON.stringify(this.queryParams));
......@@ -147,8 +152,8 @@ export default {
const _form = queryConditionFiltering(this.form);
// 处理时间
if (_form?.cooperationTime?.length) {
_form.projectStartTime = _form?.projectCreateTime[0];
_form.projectEndTime = _form?.projectCreateTime[1];
_form.projectStartTime = _form?.cooperationTime[0];
_form.projectEndTime = _form?.cooperationTime[1];
}
delete _form.cooperationTime;
......@@ -277,7 +282,7 @@ export default {
@import "@/assets/styles/search-result-list-public.scss";
::v-deep .table-list-com-ins {
height: calc(100% - 80px);
height: calc(100% - 40px);
margin-top: 16px;
.pagination-box {
......
......@@ -71,25 +71,26 @@
<skeleton v-if="tableLoading"></skeleton>
<!-- table 列表 -->
<table-list-com ref="tableContainer" :tableData="tableDataList" :formColum="formColum" :tableDataTotal="total" :queryParams="queryParams"
v-else-if="!tableLoading" :height="'100%'" @handle-current-change="handleCurrentChange">
v-else-if="!tableLoading" :maxHeight="true" @handle-current-change="handleCurrentChange">
<!-- 项目列表 -->
<template slot="projectName" slot-scope="{data,row}">
<div v-if="row.projectName" class="no-line-feed" v-html="row.projectName">{{row.projectName}}</div>
<div v-if="row.projectName" class="no-line-feed" v-html="row.projectName" @click="viewProjectDetail(row)">{{row.projectName}}</div>
<span v-else>-</span>
</template>
<!-- 业主单位 -->
<template slot="ownerName" slot-scope="{data,row}">
<!-- <template slot="ownerName" slot-scope="{data,row}">
<div v-if="row.ownerName" class="no-line-feed">{{row.ownerName}}</div>
<span v-else>-</span>
</template>
</template> -->
<!-- 项目承接单位 -->
<template slot="contractOrgName" slot-scope="{data,row}">
<!-- <template slot="contractOrgName" slot-scope="{data,row}">
<div v-if="row.contractOrgName" class="no-line-feed">{{row.contractOrgName}}</div>
<span v-else>-</span>
</template>
</template> -->
<!-- 咨询机构名称 -->
<template slot="advisoryBodyName" slot-scope="{data,row}">
<div v-if="row.advisoryBodyName" class="no-line-feed">{{row.advisoryBodyName}}</div>
<div v-if="row.advisoryBody && row.advisoryBody.advisoryBodyName" class="no-line-feed" @click="viewEnterprise(row)">
{{row.advisoryBody.advisoryBodyName}}</div>
<span v-else>-</span>
</template>
</table-list-com>
......@@ -105,6 +106,7 @@ import Skeleton from "@/components/Skeleton";
import { getConsultingOrgProjectListWithSearchApi } from "@/api/consultingOrgManagement";
import { queryConditionFiltering } from "@/utils";
import { v4 } from 'uuid';
import { encodeStr } from "@/assets/js/common.js";
export default {
name: "cooperationDeskAccountProject",
components: {
......@@ -316,6 +318,14 @@ export default {
this.formColum.forEach(item => this.fixedPropsKey.includes(item.prop) ? item.fixed = flag : null);
}
},
// 查看项目详情
viewProjectDetail(row) {
this.$tab.openPage(row.projectName, `/consultingOrgManagement/projectDetail/${row.advisoryBody?.advisoryBodyCid}?projectKey=${row.projectKey}`);
},
// 跳转到企业详情
viewEnterprise(row) {
this.$tab.openPage(row.advisoryBody.advisoryBodyName ? row.advisoryBody.advisoryBodyName : "咨询机构详情", `/enterprise/${encodeStr(row.advisoryBody.advisoryBodyCid)}`);
}
},
}
</script>
......@@ -367,7 +377,7 @@ export default {
@import "@/assets/styles/search-result-list-public.scss";
::v-deep .table-list-com-ins {
height: calc(100% - 80px);
height: calc(100% - 40px);
margin-top: 16px;
.pagination-box {
......
......@@ -14,18 +14,9 @@
<template v-if="option == '自定义'">
<div style="position: relative">
自定义
<el-date-picker
ref="picker"
:default-value="defaultValue"
style="position: absolute;opacity: 0;"
v-model="pickerValue"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
@change="changePicker">
<el-date-picker ref="picker" :default-value="defaultValue" style="position: absolute;opacity: 0;" popper-class="custom-el-date-picker"
v-model="pickerValue" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
:picker-options="pickerOptions" @change="changePicker">
</el-date-picker>
</div>
</template>
......@@ -65,31 +56,31 @@ export default {
},
computed: {
isClear() {
if(!this.isSelectOption && this.value) {
return true
}else {
return false
if (!this.isSelectOption && this.value) {
return true;
} else {
return false;
}
},
pickerOptions() {
// 用计算属性
let _this = this
let _this = this;
// 此时 this指向的就是vue实例
return {
disabledDate(time) {
if(_this.dateFrom){
if (_this.dateFrom) {
return time.getTime() < new Date(_this.dateFrom.replace(/-/g, '/')).getTime() - 8.64e6;//如果没有后面的-8.64e6就是不可以选择今天的
}
if(_this.dateTo){
if (_this.dateTo) {
return time.getTime() > new Date(_this.dateTo.replace(/-/g, '/')).getTime();//如果没有后面的-8.64e7就是不可以选择今天的
}
}
}
};
},
},
watch: {
refStr(refStr) {
return refStr
return refStr;
}
},
data() {
......@@ -99,250 +90,253 @@ export default {
isSelectOption: false,
isHover: false,
pickerValue: [],
defaultValue:new Date()
}
defaultValue: new Date()
};
},
mounted() {
if(this.dateTo){
this.defaultValue = new Date(this.dateTo)
if (this.dateTo) {
this.defaultValue = new Date(this.dateTo);
}
this.handleAppClick()
if(this.timeList&&this.timeList.length>0){
this.options = this.timeList
this.handleAppClick();
if (this.timeList && this.timeList.length > 0) {
this.options = this.timeList;
}
},
methods: {
// 时间格式化
formatDate(timeStr) {
let date = new Date(Number(timeStr))
let year = date.getFullYear()
let month = String(date.getMonth() + 1).padStart(2, 0)
let day = String(date.getDate()).padStart(2, 0)
return `${year}-${month}-${day}`
let date = new Date(Number(timeStr));
let year = date.getFullYear();
let month = String(date.getMonth() + 1).padStart(2, 0);
let day = String(date.getDate()).padStart(2, 0);
return `${year}-${month}-${day}`;
},
// 判断是否点击的为组件内部
handleAppClick() {
const app = document.getElementById('app')
const app = document.getElementById('app');
app.addEventListener('click', (e) => {
const dom = this.$refs[this.refStr]
const flag = dom && dom.contains(e.target)
const dom = this.$refs[this.refStr];
const flag = dom && dom.contains(e.target);
// const flag = document.getElementById('custom-time-select').contains(e.target)
!flag ? this.isSelectOption = false : ''
if(this.value == '自定义' && (!this.pickerValue || !this.pickerValue.length)) {
this.value = ''
this.$emit('input', '')
this.$emit('handle-search')
!flag ? this.isSelectOption = false : '';
if (this.value == '自定义' && (!this.pickerValue || !this.pickerValue.length)) {
this.value = '';
this.$emit('input', '');
this.$emit('handle-search');
}
}, true)
}, true);
},
handleMouseenter() {
this.isHover = true
this.isHover = true;
},
handleMouseleave() {
this.isHover = false
this.isHover = false;
},
handleClear() {
if(this.isClear && this.isHover) {
this.value = ''
this.pickerValue = []
this.$emit('input', '')
this.$emit('handle-search')
}else {
this.isSelectOption = true
if (this.isClear && this.isHover) {
this.value = '';
this.pickerValue = [];
this.$emit('input', '');
this.$emit('handle-search');
} else {
this.isSelectOption = true;
}
},
handleClick(value) {
this.value = value
if(value == '自定义') {
this.value = '自定义'
this.$refs.picker && this.$refs.picker.length && this.$refs.picker[0].focus()
this.value = value;
if (value == '自定义') {
this.value = '自定义';
this.$refs.picker && this.$refs.picker.length && this.$refs.picker[0].focus();
this.$nextTick(() => {
this.$refs['picker-block'].appendChild(this.$refs.picker[0].popperElm)
})
}else {
this.pickerValue = []
this.isSelectOption = false
let timeStr = []
let startTime = ''
let endTime = new Date()
this.$refs['picker-block'].appendChild(this.$refs.picker[0].popperElm);
});
} else {
this.pickerValue = [];
this.isSelectOption = false;
let timeStr = [];
let startTime = '';
let endTime = new Date();
switch (value) {
case '近三天':
startTime = new Date(endTime.getTime() - 3600 * 1000 * 24 * 3)
timeStr = [this.formatDate(startTime), this.formatDate(endTime)]
startTime = new Date(endTime.getTime() - 3600 * 1000 * 24 * 3);
timeStr = [this.formatDate(startTime), this.formatDate(endTime)];
break;
case '近七天':
startTime = new Date(endTime.getTime() - 3600 * 1000 * 24 * 7)
timeStr = [this.formatDate(startTime), this.formatDate(endTime)]
startTime = new Date(endTime.getTime() - 3600 * 1000 * 24 * 7);
timeStr = [this.formatDate(startTime), this.formatDate(endTime)];
break;
case '近半月':
startTime = new Date(endTime.getTime() - 3600 * 1000 * 24 * 15)
timeStr = [this.formatDate(startTime), this.formatDate(endTime)]
startTime = new Date(endTime.getTime() - 3600 * 1000 * 24 * 15);
timeStr = [this.formatDate(startTime), this.formatDate(endTime)];
break;
case '近1年':
startTime = new Date().setFullYear(new Date().getFullYear() - 1)
if(this.dateTo){
startTime = new Date(this.dateTo).setFullYear(new Date(this.dateTo).getFullYear() - 1)
startTime = new Date().setFullYear(new Date().getFullYear() - 1);
if (this.dateTo) {
startTime = new Date(this.dateTo).setFullYear(new Date(this.dateTo).getFullYear() - 1);
}
timeStr = [this.formatDate(startTime), this.formatDate(endTime)]
timeStr = [this.formatDate(startTime), this.formatDate(endTime)];
break;
case '近2年':
startTime = new Date().setFullYear(new Date().getFullYear() - 2)
if(this.dateTo){
startTime = new Date(this.dateTo).setFullYear(new Date(this.dateTo).getFullYear() - 2)
startTime = new Date().setFullYear(new Date().getFullYear() - 2);
if (this.dateTo) {
startTime = new Date(this.dateTo).setFullYear(new Date(this.dateTo).getFullYear() - 2);
}
timeStr = [this.formatDate(startTime), this.formatDate(endTime)]
timeStr = [this.formatDate(startTime), this.formatDate(endTime)];
break;
case '近3年':
startTime = new Date().setFullYear(new Date().getFullYear() - 3)
if(this.dateTo){
startTime = new Date(this.dateTo).setFullYear(new Date(this.dateTo).getFullYear() - 3)
startTime = new Date().setFullYear(new Date().getFullYear() - 3);
if (this.dateTo) {
startTime = new Date(this.dateTo).setFullYear(new Date(this.dateTo).getFullYear() - 3);
}
timeStr = [this.formatDate(startTime), this.formatDate(endTime)]
timeStr = [this.formatDate(startTime), this.formatDate(endTime)];
break;
case '近5年':
startTime = new Date().setFullYear(new Date().getFullYear() - 5)
if(this.dateTo){
startTime = new Date(this.dateTo).setFullYear(new Date(this.dateTo).getFullYear() - 5)
startTime = new Date().setFullYear(new Date().getFullYear() - 5);
if (this.dateTo) {
startTime = new Date(this.dateTo).setFullYear(new Date(this.dateTo).getFullYear() - 5);
}
timeStr = [this.formatDate(startTime), this.formatDate(endTime)]
timeStr = [this.formatDate(startTime), this.formatDate(endTime)];
break;
default:
if(this.pickerValue && this.pickerValue.length) {
timeStr = this.pickerValue
}else {
timeStr = []
this.value = ''
if (this.pickerValue && this.pickerValue.length) {
timeStr = this.pickerValue;
} else {
timeStr = [];
this.value = '';
}
break;
}
this.$emit('input', timeStr)
this.$emit('handle-search')
this.$emit('input', timeStr);
this.$emit('handle-search');
}
},
// 时间选择改变后的回调
changePicker(value) {
this.isSelectOption = false
if(value && value.length) {
this.isSelectOption = false;
if (value && value.length) {
// this.value = '自定义'
this.value = String(this.pickerValue)
this.$emit('input', this.pickerValue)
}else {
this.value = ''
this.$emit('input', '')
this.value = String(this.pickerValue);
this.$emit('input', this.pickerValue);
} else {
this.value = '';
this.$emit('input', '');
}
this.$emit('handle-search')
this.$emit('handle-search');
}
}
}
</script>
<style lang="scss">
.custom-time-select {
/*width: 120px;*/
width: auto;
height: 34px;
.custom-time-select {
/*width: 120px;*/
width: auto;
height: 34px;
.rote {
.el-input__inner{
background: #F4F6F9;
}
.rote {
.el-input__inner {
background: #f4f6f9;
}
.input-block {
}
.input-block {
width: 100%;
height: 100%;
margin: 0;
cursor: pointer;
.block {
width: 100%;
height: 100%;
margin: 0;
cursor: pointer;
.block {
> .custom-time-input.el-input {
width: 100%;
height: 100%;
>.custom-time-input.el-input {
.el-input__inner {
border: 0;
}
> input {
width: 100%;
height: 100%;
.el-input__inner{
border: 0;
}
>input {
width: 100%;
height: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
border-radius: 4px;
}
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
border-radius: 4px;
}
}
}
.el-input__suffix {
transform: rotateZ(0);
width: 25px;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.el-input__suffix {
transform: rotateZ(0);
width: 25px;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
&.rote {
.el-input__suffix {
transform: rotateZ(180deg);
}
&.rote {
.el-input__suffix {
transform: rotateZ(180deg);
}
}
}
.options-block {
position: absolute;
margin-top: 6px;
min-width: 120px;
font-size: 14px;
color: #666666;
background-color: #fff;
border-radius: 4px;
z-index: 10;
overflow: hidden;
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.08);
.options-block {
position: absolute;
margin-top: 6px;
min-width: 120px;
font-size: 14px;
color: #666666;
background-color: #fff;
border-radius: 4px;
z-index: 10;
overflow: hidden;
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.08);
.option {
padding: 0 24px 0 16px;
box-sizing: border-box;
height: 36px;
display: flex;
justify-content: space-between;
align-items: center;
.option {
padding: 0 24px 0 16px;
box-sizing: border-box;
height: 36px;
display: flex;
justify-content: space-between;
align-items: center;
>span {
display: inline-block;
}
> span {
display: inline-block;
}
&.active {
background-color: #F2F7FF;
color: #0381FA;
}
&.active {
background-color: #f2f7ff;
color: #0381fa;
}
&:hover {
background-color: #F5F7FA;
}
&:hover {
background-color: #f5f7fa;
}
}
}
.picker-block {
position: relative;
.picker-block {
position: relative;
&::after {
content:"";
display:block;
visibility:hidden;
clear:both;
}
&::after {
content: "";
display: block;
visibility: hidden;
clear: both;
}
.el-picker-panel.el-date-range-picker.el-popper {
.el-picker-panel.el-date-range-picker.el-popper {
&.custom-el-date-picker {
position: absolute !important;
left: 0 !important;
/*top: 205px !important;*/
top: 190px !important;
}
}
.popper__arrow {
left: 30px !important;
}
.popper__arrow {
left: 30px !important;
}
}
}
</style>
......@@ -4,7 +4,7 @@
<div class="flex-box query-box">
<div class="flex-box query-params">
<div class="headForm-from">
<div class="from-item" :key="i" v-for="(form, i) in formData">
<div class="from-item" :key="i" v-for="(form, i) in comFormData">
<!-- 单选 -->
<template v-if="form.type==1">
<el-select v-model="form.value" clearable class="form-content-width same-select-com" :class="[`select-adaptive-${form.uid}`]"
......@@ -28,11 +28,11 @@
<span v-if="!form.hover && !form.value">搜索</span>
<el-input v-model="form.value" :placeholder="form.placeholder ? form.placeholder : '输入关键词查询'"
:style="form.width?'width:'+form.width+'px':'width:238px'" @focus.stop="searchFocus($event,form)"
@blur.stop="searchBlur($event,form)" @input="value => searchInput(value,form)" v-else @keydown.native.enter="changeSelect">
@input="value => searchInput(value,form)" v-else @keydown.native.enter="changeSelect">
<template slot="suffix">
<transition mode="out-in" appear name="fade">
<img src="@/assets/images/enterprise/search-input-clear-icon.svg" @click.stop="form.value = '';changeSelect()"
v-show="form.showClearIcon">
@mousedown.prevent="''" v-show="form.showClearIcon">
</transition>
</template>
</el-input>
......@@ -127,9 +127,18 @@ export default {
default: false
}
},
watch: {
formData: {
handler(newValue) {
this.comFormData = newValue;
},
deep: true
}
},
data() {
return {
showSearchBox: false
showSearchBox: false,
comFormData: this.formData
};
},
created() {
......@@ -244,7 +253,7 @@ export default {
textContainer.remove();
});
dom.style.setProperty("width", `${width + 60}px`);
this.$emit('handle-search');
this.$emit('handle-search', this.comFormData);
return;
}
textContainer.style.setProperty("visibility", "hidden");
......@@ -257,7 +266,7 @@ export default {
let containerWidth = textContainer.offsetWidth + 12 + 8;
textContainer.remove();
dom.style.setProperty("width", `${containerWidth}px`);
this.$emit('handle-search');
this.$emit('handle-search', this.comFormData);
}
} catch (error) {
......@@ -288,13 +297,13 @@ export default {
textContainer.remove();
dom.style.setProperty("width", `${containerWidth}px`);
}
this.$emit('handle-search');
this.$emit('handle-search', this.comFormData);
} catch (error) {
}
},
changeSelect(e) {
this.$emit('handle-search');
this.$emit('handle-search', this.comFormData);
},
clickEXCEL() {
this.$emit('handle-excel');
......
......@@ -333,8 +333,8 @@ export default {
getFinancial(id) {
financial({ cid: String(id) }).then(res => {
if ((res.code == 200 && !res.data) || !res.data?.totalAssets) {
this.$set(this.sideRoute[0], "disabled", true);
this.$set(this.sideRoute[1], "disabled", true);
// 禁用商务信息
this.$set(this.findNodeIndex(this.sideRoute, "business"), "disabled", true);
this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute));
}
});
......
<template>
<div class="Tables">
<div class="Tables" :class="{'is-empty-table' : !tableDataTotal}">
<div class="table-item">
<el-table v-if="tableDataTotal>0" class="fixed-table" :class="headerFixed ? 'headerFixed':''" v-loading="tableLoading" :data="tableData"
element-loading-text="Loading" ref="tableRef" v-horizontal-scroll="'hover'" border fit highlight-current-row
:default-sort="defaultSort?defaultSort:{}" @sort-change="sortChange">
element-loading-text="Loading" ref="tableRef" v-horizontal-scroll="'hover'" border fit highlight-current-row :height="height"
:maxHeight="comMaxHeight" :default-sort="defaultSort?defaultSort:{}" @sort-change="sortChange">
<el-table-column v-if="isIndex" label="序号" :width="flexWidth(tableData)" align="left" :fixed="indexFixed" :resizable="false">
<template slot-scope="scope">{{ queryParams.pageNum * queryParams.pageSize - queryParams.pageSize + scope.$index + 1 }}</template>
</el-table-column>
......@@ -40,7 +40,7 @@
</template>
</el-table>
<div style="padding: 30px 0" v-else>
<div class="table-empty-container" v-else>
<no-data />
</div>
</div>
......@@ -56,6 +56,12 @@ import NoData from '../component/noData';
export default {
name: "Tables",
props: {
height: {
type: [String, Number]
},
maxHeight: {
type: Boolean
},
isIndex: {
type: Boolean,
default: true
......@@ -107,7 +113,8 @@ export default {
data() {
return {
current_page: this.queryParams.pageNum,
show_page: this.paging
show_page: this.paging,
comMaxHeight: null
};
},
watch: {
......@@ -116,9 +123,24 @@ export default {
}
},
created() {
this.maxHeight ? this.maxHeightInit() : null;
},
methods: {
// 自适应当前容器
async maxHeightInit() {
try {
await this.$nextTick();
/**
* @type {HTMLDivElement}
*/
const container = this.$el.querySelector(".table-item");
if (container) {
this.comMaxHeight = `${container.offsetHeight}px`;
}
} catch (error) {
}
},
handleCurrentChange(e) {
if (this.MaxPage < e) {
this.show_page = false;
......@@ -154,9 +176,6 @@ export default {
::v-deep .el-table__body tr.current-row > td.el-table__cell {
background-color: #ffffff;
}
/*::v-deep .el-table__fixed{
height: calc(100% - 16px) !important;
}*/
::v-deep .el-table__row {
&:nth-child(even) {
......@@ -176,7 +195,30 @@ export default {
}
}
}
&.is-empty-table {
.table-item {
max-height: unset;
height: 100%;
}
}
::v-deep .table-item {
position: relative;
max-height: calc(100% - 56px);
.table-empty-container {
min-height: 360px;
display: flex;
height: 100%;
width: 100%;
align-items: center;
justify-content: center;
box-sizing: border-box;
.no-data {
min-height: unset;
}
}
.el-table td.el-table__cell {
border-bottom: 0;
}
......@@ -185,6 +227,11 @@ export default {
font-size: 12px;
}
}
.el-table--border th.gutter:last-of-type {
display: block !important;
padding-right: 16px;
height: 55px;
}
}
::v-deep .el-table th.el-table__cell.is-leaf,
::v-deep .el-table td.el-table__cell {
......
<template>
<el-skeleton animated>
<el-skeleton animated class="el-skeleton-container">
<template slot="template">
<el-skeleton-item variant="text" style="width: 60%;"/>
<el-skeleton-item variant="text" style="width: 60%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
......@@ -14,13 +14,13 @@
</template>
<script>
export default {
name: 'skeleton'
}
export default {
name: 'skeleton'
}
</script>
<style lang="scss" scoped>
.el-skeleton__item{
.el-skeleton__item {
height: 20px;
border-radius: 0;
margin: 9px 0;
......
<template>
<div class="cooperative-construction-unit">
<head-form-new title="常合作施工单位" :form-data="formData" :query-params="queryParams" :total="tableDataTotal" :isExcel="true"
@handle-search="handleSearch" />
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<tables v-if="!isSkeleton" :indexFixed="true" :tableData="tableData" :forData="forData" :tableDataTotal="tableDataTotal"
:queryParams="queryParams" @handle-current-change="handleCurrentChange" @sort-change="sortChange">
<!-- 业主名称 -->
<template slot="counterpartCompanyName" slot-scope="scope">
<span v-if="scope.row.counterpartCompanyName" style="color: #0081FF;cursor: pointer;" @click="viewEnterprise(scope.row)"
v-html="scope.row.counterpartCompanyName">{{scope.row.counterpartCompanyName}}</span>
<span v-else>-</span>
</template>
<!-- 合作项目数量 -->
<template slot="count" slot-scope="scope">
<span v-if="scope.row.count" style="color: #0081FF;cursor: pointer;" @click="viewProject(scope.row)">{{scope.row.count}}</span>
<span v-else>-</span>
</template>
</tables>
<el-dialog title="合作项目/工程明细" :visible.sync="cooperationRecordDialog" width="1100px" @close="dialogClose" @open="dialogOPen"
class="cooperation-record-dialog-container" custom-class="cooperation-record-dialog" :destroy-on-close="true" :close-on-click-modal="false">
<div class="cooperation-record-dialog-innner">
<dialog-head-form-new title="" :form-data="dialogFormData" :query-params="dialogQueryParams" :total="dialogtableDataTotal" :isExcel="false"
@handle-search="dialogHandleSearch" ref="dialogSearchFormNew" />
<skeleton v-if="dialogIsSkeleton" style="padding: 16px"></skeleton>
<!-- 列表 -->
<dialog-tables v-if="!dialogIsSkeleton" :indexFixed="true" :tableData="dialogTableData" :forData="dialogForData"
:tableDataTotal="dialogtableDataTotal" :queryParams="dialogQueryParams" @handle-current-change="dialogCurrentChange"
@sort-change="dialogSortChange" :maxHeight="true">
<!-- 合作项目/工程名称-->
<template slot="projectName" slot-scope="scope">
<span v-if="scope.row.projectName" style="color: #0081FF;cursor: pointer;" v-html="scope.row.projectName">{{scope.row.projectName}}</span>
<span v-else>-</span>
</template>
<!-- 省市区 -->
<template slot="area" slot-scope="scope">
<span>{{`${scope.row.province ? scope.row.province : ""}${scope.row.province && scope.row.city ? " - " : ""}${scope.row.city ? scope.row.city : ""}${scope.row.city && scope.row.area ? " - " : ""}${scope.row.area ? scope.row.area : ""}`}}</span>
</template>
</dialog-tables>
</div>
</el-dialog>
</div>
</template>
<script>
import skeleton from '../component/skeleton';
import mixin from '@/views/detail/party-a/mixins/mixin';
import { getCooperativeOwnerUnitsListApi, getCooperativeOwnerUnitsDetailApi, getCooperativeOwnerUnitsOptionsApi, getCooperativeOwnerUnitsCountAmountApi } from "@/api/consultingTransaction";
import DialogHeadFormNew from "../component/HeadFormNew";
import DialogTables from "../component/Tables";
export default {
name: "cooperativeConstructionUnit",
mixins: [mixin],
components: {
skeleton,
DialogHeadFormNew,
DialogTables
},
props: ['companyId'],
data() {
return {
queryParams: {
companyId: this.companyId,
pageNum: 1,
pageSize: 10,
companyType: 2,
sort: ""
},
selectOptions: {},
forData: [
{ label: '施工单位名称', prop: 'counterpartCompanyName', width: '295', slot: true, showOverflowTooltip: true },
{ label: '合作项目数量', prop: 'count', minWidth: '190', align: "right", slot: true, sortable: "custom" },
{ label: '最近一次合作时间', prop: 'time', minWidth: '214', sortable: "custom" },
{ label: '合作总金额(万元)', prop: 'amount', minWidth: '226', align: "right", sortable: "custom" },
],
formData: [
{ type: 4, fieldName: 'businessTypes', value: '', placeholder: '咨询机构业务', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'counterpartCompanyRoles', value: '', placeholder: '合作项目类型', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'projectTypes', value: '', placeholder: '合作工程类型', options: [], uid: this.getUid() },
{ type: 5, fieldName: 'time', value: '', placeholder: '合作频率', startTime: 'beginTime', endTime: 'endTime', uid: this.getUid() },
{ type: 6, fieldName: 'money', value: '', placeholder: '合作金额', uid: this.getUid() },
{ type: 3, fieldName: 'keyword', value: '', placeholder: '请输入', uid: this.getUid() },
],
//列表
tableLoading: false,
tableData: [],
tableDataTotal: 0,
isSkeleton: true,
// 合作项目详情弹窗
cooperationRecordDialog: false,
dialogQueryParams: {
companyId: "",
pageNum: 1,
pageSize: 10,
companyType: 2,
sort: ""
},
dialogForData: [
{ label: '合作项目/工程名称', prop: 'projectName', width: '182', slot: true, showOverflowTooltip: true },
{ label: '合作时间', prop: 'time', width: '93', sortable: "custom" },
{ label: '咨询机构承担角色', prop: 'agencyBusinessType', width: '122' },
{ label: '项目类型', prop: 'counterpartRole', minWidth: '74' },
{ label: '工程类型', prop: 'projectType', minWidth: '74' },
{ label: '项目/工程金额(万元)', prop: 'amount', width: '164', sortable: "custom", align: "right", },
{ label: '项目地区', prop: 'area', width: '245', slot: true },
{ label: '数据来源', prop: 'dataSource', width: '74' },
],
dialogFormData: [
{ type: 4, fieldName: 'businessTypes', value: '', placeholder: '咨询机构业务', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'counterpartCompanyRoles', value: '', placeholder: '合作项目类型', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'projectTypes', value: '', placeholder: '合作工程类型', options: [], uid: this.getUid() },
{ type: 5, fieldName: 'time', value: '', placeholder: '合作频率', startTime: 'beginTime', endTime: 'endTime', uid: this.getUid() },
{ type: 3, fieldName: 'keyword', value: '', placeholder: '请输入', uid: this.getUid() },
],
dialogIsSkeleton: true,
dialogtableDataTotal: 0,
dialogTableData: [],
statisticsData: {},
};
},
//可访问data属性
created() {
this.initDetail();
},
//计算集
computed: {
},
//方法集
methods: {
async initDetail() {
try {
await this.setOptions(true);
await this.handleQuery();
} catch (error) {
}
},
async setOptions(flag) {
try {
const options = await getCooperativeOwnerUnitsOptionsApi({ companyId: this.queryParams.companyId });
if (options.code == 200 && options.data) {
for (const key in options.data) {
options.data[key] = options.data[key].map(item => ({ name: item, value: item }));
}
this.selectOptions = options.data;
const optionsKey = [["businessType", "businessTypes"], ["counterpartCompanyRole", "counterpartCompanyRoles"], ["projectType", "projectTypes"]];
optionsKey.forEach(([key, value]) => {
flag ? this.$set(this.formData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]) : null;
this.$set(this.dialogFormData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]);
});
}
} catch (error) {
console.log(error);
}
},
// 创建列表查询条件
createQueryCondition(form) {
/**
* @type {Array<{
* fieldName : string;
* value : any
* }>}
*/
const paramsArray = JSON.parse(JSON.stringify(form));
const params = {};
// 处理查询参数
paramsArray.forEach(item => {
// 有效参数
if ((item.value && item.value != "0" && !Array.isArray(item.value)) || item?.value?.length) {
// 多选
if (["businessTypes", "counterpartCompanyRoles", "projectTypes"].includes(item.fieldName)) {
params[item.fieldName] = item.value;
}
// 时间处理
if (item.fieldName == "time") {
params["beginTime"] = item.value[0];
params["endTime"] = item.value[1];
}
// 金额处理
if (item.fieldName == "money") {
params["minAmount"] = item.value[0] ? item.value[0] : "";
params["maxAmount"] = item.value[1] ? item.value[1] : "";
}
// 搜索关键词处理
if (item.fieldName == "keyword" && item?.value.trim()) {
params["keyword"] = item.value;
}
}
});
return params;
},
// 查询
async handleSearch() {
const params = this.createQueryCondition(this.formData);
this.queryParams.pageNum = 1;
const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.queryParams }));
this.handleQuery(searchParams);
},
async handleQuery(params) {
try {
let data = params ? params : this.queryParams;
this.isSkeleton = true;
const res = await getCooperativeOwnerUnitsListApi(data);
this.tableData = res.rows ? res.rows : [];
this.tableDataTotal = res.total ? res.total : 0;
} catch (error) {
console.log(error);
} finally {
this.isSkeleton = false;
}
},
viewEnterprise(row) {
},
async sortChange({ column, order, prop }) {
let sort = null;
switch (prop) {
case "time":
order == "ascending" ? sort = 4 : sort = 3;
break;
case "amount":
order == "ascending" ? sort = 2 : sort = 1;
break;
default:
break;
}
if (!order) sort = "";
this.queryParams.sort = sort;
try {
let data = this.queryParams;
const res = await getCooperativeOwnerUnitsListApi(data);
this.tableData = res.rows ? res.rows : [];
this.tableDataTotal = res.total ? res.total : 0;
} catch (error) {
console.log(error);
}
},
viewProject(row) {
this.dialogQueryParams.companyId = row.companyId;
this.cooperationRecordDialog = true;
},
async dialogHandleQurey(params) {
try {
let data = params ? params : this.dialogQueryParams;
this.dialogIsSkeleton = true;
const res = await getCooperativeOwnerUnitsDetailApi(data);
this.dialogTableData = res.rows ? res.rows : [];
this.dialogtableDataTotal = res.total ? res.total : 0;
const count = await getCooperativeOwnerUnitsCountAmountApi(data);
if (count.code == 200 && count.data) {
this.statisticsData = count.data;
}
} catch (error) {
console.log(error);
} finally {
this.dialogIsSkeleton = false;
}
},
dialogHandleSearch(v) {
const params = this.createQueryCondition(this.dialogFormData);
this.dialogQueryParams.pageNum = 1;
const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.dialogQueryParams }));
this.dialogHandleQurey(searchParams);
},
async dialogSortChange({ column, order, prop }) {
let sort = null;
switch (prop) {
case "count":
order == "ascending" ? sort = 6 : sort = 5;
break;
case "time":
order == "ascending" ? sort = 4 : sort = 3;
break;
case "amount":
order == "ascending" ? sort = 2 : sort = 1;
break;
default:
break;
}
if (!order) sort = "";
this.dialogQueryParams.sort = sort;
try {
let data = this.dialogQueryParams;
const res = await getCooperativeOwnerUnitsDetailApi(data);
this.dialogTableData = res.rows ? res.rows : [];
this.dialogtableDataTotal = res.total ? res.total : 0;
const count = await getCooperativeOwnerUnitsCountAmountApi(data);
if (count.code == 200 && count.data) {
this.statisticsData = count.data;
}
} catch (error) {
console.log(error);
}
},
dialogCurrentChange(page) {
this.dialogQueryParams.pageNum = page;
const params = this.createQueryCondition(this.dialogFormData);
const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.dialogQueryParams }));
this.dialogHandleQurey(searchParams);
},
async dialogOPen() {
await this.setOptions();
await this.dialogHandleQurey();
},
dialogClose() {
const data = this.$options.data.call(this);
this.dialogQueryParams = data.dialogQueryParams;
this.dialogFormData = data.dialogFormData;
this.dialogtableDataTotal = data.dialogtableDataTotal;
this.dialogTableData = data.dialogTableData;
}
},
}
</script>
<style lang="scss" scoped>
.cooperative-construction-unit {
background: #ffffff;
border-radius: 4px;
padding: 16px;
input {
border: 1px solid #efefef;
}
::v-deep .el-form-item {
margin-right: 8px !important;
}
.query-box {
margin: 10px 0 20px;
}
.cell-span {
display: inline-block;
position: relative;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
cursor: pointer;
> span {
display: inline-block;
width: 37px;
position: absolute;
right: 0;
bottom: 0;
background-color: #fff;
z-index: 1;
}
}
@import "@/assets/styles/search-common.scss";
::v-deep .cooperation-record-dialog-container {
.cooperation-record-dialog {
height: 60%;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 4px;
margin: 0px !important;
display: flex;
flex-direction: column;
.el-dialog__header {
padding: 20px;
height: 56px;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-bottom: 1px solid #eeeeee;
.el-dialog__title {
color: #232323;
font-weight: bold;
line-height: 16px;
}
.el-dialog__headerbtn {
position: static;
width: 16px;
height: 16px;
}
}
.el-dialog__body {
height: calc(100% - 56px);
padding: 24px 20px;
box-sizing: border-box;
.cooperation-record-dialog-innner {
width: 100%;
height: 100%;
.Tables {
height: calc(100% - 40px);
}
}
}
.el-table-horizontal-scrollbar {
display: none !important;
}
}
}
}
</style>
<template>
<div class="cooperative-group-container">
<head-form-new title="常合作集团" :form-data="formData" :query-params="queryParams" :total="tableDataTotal" :isExcel="true"
@handle-search="handleSearch" />
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<tables v-if="!isSkeleton" :indexFixed="true" :tableData="tableData" :forData="forData" :tableDataTotal="tableDataTotal"
:queryParams="queryParams" @handle-current-change="handleCurrentChange" @sort-change="sortChange">
<!-- 业主名称 -->
<template slot="combineName" slot-scope="scope">
<span v-if="scope.row.combineName" style="color: #0081FF;cursor: pointer;" @click="viewEnterprise(scope.row)"
v-html="scope.row.combineName">{{scope.row.combineName}}</span>
<span v-else>-</span>
</template>
<!-- 合作项目数量 -->
<template slot="count" slot-scope="scope">
<span v-if="scope.row.count" style="color: #0081FF;cursor: pointer;" @click="viewProject(scope.row)">{{scope.row.count}}</span>
<span v-else>-</span>
</template>
</tables>
<el-dialog title="合作项目/工程明细" :visible.sync="cooperationRecordDialog" width="1100px" @close="dialogClose" @open="dialogOPen"
class="cooperation-record-dialog-container" custom-class="cooperation-record-dialog" :destroy-on-close="true" :close-on-click-modal="false">
<!-- tab切换栏 -->
<dsk-tab-toggle v-model="currentList" :tabs="toggleTabs" @tabToggle="tabToggle"></dsk-tab-toggle>
<div class="cooperation-record-dialog-innner">
<!-- 成员列表 -->
<template v-if="currentList == 'cooperativeMember'">
<dialog-head-form-new title="" :form-data="dialogFormData" :query-params="dialogQueryParams" :total="dialogtableDataTotal" :isExcel="false"
@handle-search="dialogHandleSearch" ref="dialogSearchFormNew" />
<skeleton v-if="dialogIsSkeleton" style="padding: 16px"></skeleton>
<!-- 列表 -->
<dialog-tables v-if="!dialogIsSkeleton" :indexFixed="true" :tableData="dialogTableData" :forData="memberForData"
:tableDataTotal="dialogtableDataTotal" :queryParams="dialogQueryParams" @handle-current-change="dialogCurrentChange"
@sort-change="dialogSortChange" :maxHeight="true">
<!-- 合作成员-->
<template slot="companyName" slot-scope="scope">
<span v-if="scope.row.companyName" style="color: #0081FF;cursor: pointer;"
v-html="scope.row.companyName">{{scope.row.companyName}}</span>
<span v-else>-</span>
</template>
</dialog-tables>
</template>
<!-- 项目列表 -->
<template v-if="currentList == 'cooperativeProject'">
<dialog-head-form-new title="" :form-data="dialogFormData" :query-params="dialogQueryParams" :total="dialogtableDataTotal" :isExcel="false"
@handle-search="dialogHandleSearch" ref="dialogSearchFormNew" />
<skeleton v-if="dialogIsSkeleton" style="padding: 16px"></skeleton>
<!-- 列表 -->
<dialog-tables v-if="!dialogIsSkeleton" :indexFixed="true" :tableData="dialogTableData" :forData="dialogForData"
:tableDataTotal="dialogtableDataTotal" :queryParams="dialogQueryParams" @handle-current-change="dialogCurrentChange"
@sort-change="dialogSortChange" :maxHeight="true">
<!-- 合作项目/工程名称-->
<template slot="projectName" slot-scope="scope">
<span v-if="scope.row.projectName" style="color: #0081FF;cursor: pointer;"
v-html="scope.row.projectName">{{scope.row.projectName}}</span>
<span v-else>-</span>
</template>
<!-- 合作成员 -->
<template slot="companyName" slot-scope="scope">
<span v-if="scope.row.companyName" style="color: #0081FF;cursor: pointer;"
v-html="scope.row.companyName">{{scope.row.companyName}}</span>
<span v-else>-</span>
</template>
<!-- 省市区 -->
<template slot="area" slot-scope="scope">
<span>{{`${scope.row.province ? scope.row.province : ""}${scope.row.province && scope.row.city ? " - " : ""}${scope.row.city ? scope.row.city : ""}${scope.row.city && scope.row.area ? " - " : ""}${scope.row.area ? scope.row.area : ""}`}}</span>
</template>
</dialog-tables>
</template>
</div>
</el-dialog>
</div>
</template>
<script>
import skeleton from '../component/skeleton';
import mixin from '@/views/detail/party-a/mixins/mixin';
import { getCooperativeOwnerUnitsListApi, getCooperativeOwnerUnitsDetailApi, getCooperativeOwnerUnitsOptionsApi, getCooperativeOwnerUnitsCountAmountApi, getCooperativeGroupMemberApi } from "@/api/consultingTransaction";
import DialogHeadFormNew from "../component/HeadFormNew";
import DialogTables from "../component/Tables";
import DskTabToggle from "@/components/DskTabToggle";
export default {
name: "cooperativeGroup",
mixins: [mixin],
components: {
skeleton,
DialogHeadFormNew,
DialogTables,
DskTabToggle
},
props: ['companyId'],
data() {
return {
currentList: "cooperativeMember",
toggleTabs: [
{
value: "cooperativeMember",
name: "成员列表",
id: this.getUid()
},
{
value: "cooperativeProject",
name: "项目列表",
id: this.getUid()
}
],
queryParams: {
companyId: this.companyId,
pageNum: 1,
pageSize: 10,
companyType: 3,
sort: ""
},
selectOptions: {},
forData: [
{ label: '集团名称', prop: 'combineName', width: '295', slot: true, showOverflowTooltip: true },
{ label: '合作项目数量', prop: 'count', minWidth: '190', align: "right", slot: true, sortable: "custom" },
{ label: '最近一次合作时间', prop: 'time', minWidth: '214', sortable: "custom" },
{ label: '合作总金额(万元)', prop: 'amount', minWidth: '226', align: "right", sortable: "custom" },
],
formData: [
{ type: 4, fieldName: 'businessTypes', value: '', placeholder: '咨询机构业务', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'counterpartCompanyRoles', value: '', placeholder: '合作项目类型', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'projectTypes', value: '', placeholder: '合作工程类型', options: [], uid: this.getUid() },
{ type: 5, fieldName: 'time', value: '', placeholder: '合作频率', startTime: 'beginTime', endTime: 'endTime', uid: this.getUid() },
{ type: 6, fieldName: 'money', value: '', placeholder: '合作金额', uid: this.getUid() },
{ type: 3, fieldName: 'keyword', value: '', placeholder: '请输入', uid: this.getUid() },
],
//列表
tableLoading: false,
tableData: [],
tableDataTotal: 0,
isSkeleton: true,
// 合作项目详情弹窗
cooperationRecordDialog: false,
dialogQueryParams: {
companyId: "",
pageNum: 1,
pageSize: 10,
companyType: 3,
sort: ""
},
memberForData: [
{ label: '合作成员', prop: 'companyName', width: '351', slot: true, showOverflowTooltip: true },
{ label: '合作次数', prop: 'count ', minWidth: '223', align: "right", slot: true, sortable: "custom" },
{ label: '最近一次合作时间', prop: 'time', minWidth: '214', sortable: "custom" },
{ label: '合作总金额(万元)', prop: 'amount', minWidth: '226', align: "right", sortable: "custom" },
],
dialogForData: [
{ label: '合作项目/工程名称', prop: 'projectName', width: '182', slot: true, showOverflowTooltip: true },
{ label: '合作成员', prop: 'companyName', width: '110', slot: true, showOverflowTooltip: true },
{ label: '合作时间', prop: 'time', width: '93', sortable: "custom" },
{ label: '集团成员身份', prop: 'role', width: '122' },
{ label: '咨询机构承担角色', prop: 'agencyBusinessType', width: '122' },
{ label: '项目类型', prop: 'counterpartRole', minWidth: '74' },
{ label: '工程类型', prop: 'projectType', minWidth: '74' },
{ label: '项目/工程金额(万元)', prop: 'amount', width: '164', sortable: "custom", align: "right", },
{ label: '项目地区', prop: 'area', width: '245', slot: true },
],
dialogFormData: [
{ type: 4, fieldName: 'businessTypes', value: '', placeholder: '咨询机构业务', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'counterpartCompanyRoles', value: '', placeholder: '合作项目类型', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'projectTypes', value: '', placeholder: '合作工程类型', options: [], uid: this.getUid() },
{ type: 5, fieldName: 'time', value: '', placeholder: '合作频率', startTime: 'beginTime', endTime: 'endTime', uid: this.getUid() },
{ type: 3, fieldName: 'keyword', value: '', placeholder: '请输入', uid: this.getUid() },
],
dialogIsSkeleton: true,
dialogtableDataTotal: 0,
dialogTableData: [],
statisticsData: {},
};
},
//可访问data属性
created() {
this.initDetail();
},
//计算集
computed: {
},
//方法集
methods: {
async initDetail() {
try {
await this.setOptions(true);
await this.handleQuery();
} catch (error) {
}
},
async setOptions(flag) {
try {
const options = await getCooperativeOwnerUnitsOptionsApi({ companyId: this.queryParams.companyId });
if (options.code == 200 && options.data) {
for (const key in options.data) {
options.data[key] = options.data[key].map(item => ({ name: item, value: item }));
}
this.selectOptions = options.data;
const optionsKey = [["businessType", "businessTypes"], ["counterpartCompanyRole", "counterpartCompanyRoles"], ["projectType", "projectTypes"]];
optionsKey.forEach(([key, value]) => {
flag ? this.$set(this.formData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]) : null;
this.$set(this.dialogFormData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]);
});
}
} catch (error) {
console.log(error);
}
},
// 创建列表查询条件
createQueryCondition(form) {
/**
* @type {Array<{
* fieldName : string;
* value : any
* }>}
*/
const paramsArray = JSON.parse(JSON.stringify(form));
const params = {};
// 处理查询参数
paramsArray.forEach(item => {
// 有效参数
if ((item.value && item.value != "0" && !Array.isArray(item.value)) || item?.value?.length) {
// 多选
if (["businessTypes", "counterpartCompanyRoles", "projectTypes"].includes(item.fieldName)) {
params[item.fieldName] = item.value;
}
// 时间处理
if (item.fieldName == "time") {
params["beginTime"] = item.value[0];
params["endTime"] = item.value[1];
}
// 金额处理
if (item.fieldName == "money") {
params["minAmount"] = item.value[0] ? item.value[0] : "";
params["maxAmount"] = item.value[1] ? item.value[1] : "";
}
// 搜索关键词处理
if (item.fieldName == "keyword" && item?.value.trim()) {
params["keyword"] = item.value;
}
}
});
return params;
},
// 查询
async handleSearch() {
const params = this.createQueryCondition(this.formData);
this.queryParams.pageNum = 1;
const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.queryParams }));
this.handleQuery(searchParams);
},
async handleQuery(params) {
try {
let data = params ? params : this.queryParams;
this.isSkeleton = true;
const res = await getCooperativeOwnerUnitsListApi(data);
this.tableData = res.rows ? res.rows : [];
this.tableDataTotal = res.total ? res.total : 0;
} catch (error) {
console.log(error);
} finally {
this.isSkeleton = false;
}
},
viewEnterprise(row) {
},
async sortChange({ column, order, prop }) {
let sort = null;
switch (prop) {
case "time":
order == "ascending" ? sort = 4 : sort = 3;
break;
case "amount":
order == "ascending" ? sort = 2 : sort = 1;
break;
default:
break;
}
if (!order) sort = "";
this.queryParams.sort = sort;
try {
let data = this.queryParams;
const res = await getCooperativeOwnerUnitsListApi(data);
this.tableData = res.rows ? res.rows : [];
this.tableDataTotal = res.total ? res.total : 0;
} catch (error) {
console.log(error);
}
},
viewProject(row) {
this.dialogQueryParams.companyId = row.companyId;
this.cooperationRecordDialog = true;
},
async dialogHandleQurey(params) {
try {
let data = params ? params : this.dialogQueryParams;
this.dialogIsSkeleton = true;
const res = currentList == "cooperativeMember" ? await getCooperativeGroupMemberApi(data) : await getCooperativeOwnerUnitsDetailApi(data);
this.dialogTableData = res.rows ? res.rows : [];
this.dialogtableDataTotal = res.total ? res.total : 0;
const count = await getCooperativeOwnerUnitsCountAmountApi(data);
if (count.code == 200 && count.data) {
this.statisticsData = count.data;
}
} catch (error) {
console.log(error);
} finally {
this.dialogIsSkeleton = false;
}
},
dialogHandleSearch(v) {
const params = this.createQueryCondition(this.dialogFormData);
this.dialogQueryParams.pageNum = 1;
const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.dialogQueryParams }));
this.dialogHandleQurey(searchParams);
},
async dialogSortChange({ column, order, prop }) {
let sort = null;
switch (prop) {
case "count":
order == "ascending" ? sort = 6 : sort = 5;
break;
case "time":
order == "ascending" ? sort = 4 : sort = 3;
break;
case "amount":
order == "ascending" ? sort = 2 : sort = 1;
break;
default:
break;
}
if (!order) sort = "";
this.dialogQueryParams.sort = sort;
try {
let data = this.dialogQueryParams;
const res = currentList == "cooperativeMember" ? await getCooperativeGroupMemberApi(data) : await getCooperativeOwnerUnitsDetailApi(data);
this.dialogTableData = res.rows ? res.rows : [];
this.dialogtableDataTotal = res.total ? res.total : 0;
const count = await getCooperativeOwnerUnitsCountAmountApi(data);
if (count.code == 200 && count.data) {
this.statisticsData = count.data;
}
} catch (error) {
console.log(error);
}
},
dialogCurrentChange(page) {
this.dialogQueryParams.pageNum = page;
const params = this.createQueryCondition(this.dialogFormData);
const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.dialogQueryParams }));
this.dialogHandleQurey(searchParams);
},
async dialogOPen() {
await this.setOptions();
await this.dialogHandleQurey();
},
dialogClose() {
const data = this.$options.data.call(this);
this.dialogQueryParams = data.dialogQueryParams;
this.dialogFormData = data.dialogFormData;
this.dialogtableDataTotal = data.dialogtableDataTotal;
this.dialogTableData = data.dialogTableData;
},
// 切换tab
tabToggle() {
}
},
}
</script>
<style lang="scss" scoped>
.cooperative-group-container {
background: #ffffff;
border-radius: 4px;
padding: 16px;
input {
border: 1px solid #efefef;
}
::v-deep .el-form-item {
margin-right: 8px !important;
}
.query-box {
margin: 10px 0 20px;
}
.cell-span {
display: inline-block;
position: relative;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
cursor: pointer;
> span {
display: inline-block;
width: 37px;
position: absolute;
right: 0;
bottom: 0;
background-color: #fff;
z-index: 1;
}
}
@import "@/assets/styles/search-common.scss";
::v-deep .cooperation-record-dialog-container {
.cooperation-record-dialog {
height: 60%;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 4px;
margin: 0px !important;
display: flex;
flex-direction: column;
.el-dialog__header {
padding: 20px;
height: 56px;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-bottom: 1px solid #eeeeee;
.el-dialog__title {
color: #232323;
font-weight: bold;
line-height: 16px;
}
.el-dialog__headerbtn {
position: static;
width: 16px;
height: 16px;
}
}
.el-dialog__body {
height: calc(100% - 56px);
padding: 0px;
.cooperation-record-dialog-innner {
width: 100%;
height: calc(100% - 48px);
padding: 24px 20px;
box-sizing: border-box;
.Tables {
height: calc(100% - 40px);
}
}
}
.el-table-horizontal-scrollbar {
display: none !important;
}
}
}
}
</style>
......@@ -4,41 +4,121 @@
@handle-search="handleSearch" />
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<tables v-if="!isSkeleton" :indexFixed="true" :tableData="tableData" :forData="forData" :tableDataTotal="tableDataTotal"
:queryParams="queryParams" @handle-current-change="handleCurrentChange">
:queryParams="queryParams" @handle-current-change="handleCurrentChange" @sort-change="sortChange">
<!-- 业主名称 -->
<template slot="companyName" slot-scope="scope">
<span v-if="scope.row.companyName" style="color: #0081FF;cursor: pointer;" @click="viewEnterprise(scope.row)"
v-html="scope.row.companyName">{{scope.row.companyName}}</span>
<span v-else>-</span>
</template>
<!-- 合作项目数量 -->
<template slot="count" slot-scope="scope">
<span v-if="scope.row.count" style="color: #0081FF;cursor: pointer;" @click="viewProject(scope.row)">{{scope.row.count}}</span>
<span v-else>-</span>
</template>
</tables>
<el-dialog title="合作项目/工程明细" :visible.sync="cooperationRecordDialog" width="1100px" @close="dialogClose" @open="dialogOPen"
class="cooperation-record-dialog-container" custom-class="cooperation-record-dialog" :destroy-on-close="true" :close-on-click-modal="false">
<div class="cooperation-record-dialog-innner">
<dialog-head-form-new title="" :form-data="dialogFormData" :query-params="dialogQueryParams" :total="dialogtableDataTotal" :isExcel="false"
@handle-search="dialogHandleSearch" ref="dialogSearchFormNew" />
<skeleton v-if="dialogIsSkeleton" style="padding: 16px"></skeleton>
<!-- 列表 -->
<dialog-tables v-if="!dialogIsSkeleton" :indexFixed="true" :tableData="dialogTableData" :forData="dialogForData"
:tableDataTotal="dialogtableDataTotal" :queryParams="dialogQueryParams" @handle-current-change="dialogCurrentChange"
@sort-change="dialogSortChange" :maxHeight="true">
<!-- 合作项目/工程名称-->
<template slot="projectName" slot-scope="scope">
<span v-if="scope.row.projectName" style="color: #0081FF;cursor: pointer;" v-html="scope.row.projectName">{{scope.row.projectName}}</span>
<span v-else>-</span>
</template>
<!-- 省市区 -->
<template slot="area" slot-scope="scope">
<span>{{`${scope.row.province ? scope.row.province : ""}${scope.row.province && scope.row.city ? " - " : ""}${scope.row.city ? scope.row.city : ""}${scope.row.city && scope.row.area ? " - " : ""}${scope.row.area ? scope.row.area : ""}`}}</span>
</template>
</dialog-tables>
</div>
</el-dialog>
</div>
</template>
<script>
import skeleton from '../component/skeleton';
import mixin from '@/views/detail/party-a/mixins/mixin';
import { getCooperativeOwnerUnitsListApi } from "@/api/consultingTransaction";
import { getCooperativeOwnerUnitsListApi, getCooperativeOwnerUnitsDetailApi, getCooperativeOwnerUnitsOptionsApi, getCooperativeOwnerUnitsCountAmountApi } from "@/api/consultingTransaction";
import DialogHeadFormNew from "../component/HeadFormNew";
import DialogTables from "../component/Tables";
export default {
name: "cooperativeOwnerUnits",
mixins: [mixin],
components: {
skeleton
skeleton,
DialogHeadFormNew,
DialogTables
},
props: ['companyId'],
data() {
return {
queryParams: {
cid: this.companyId,
companyId: this.companyId,
pageNum: 1,
pageSize: 10,
companyType: 1
companyType: 1,
sort: ""
},
selectOptions: {},
forData: [
{ label: '限消令对象', prop: 'name', width: '215' },
{ label: '业主名称', prop: 'companyName', width: '295', slot: true, showOverflowTooltip: true },
{ label: '合作项目数量', prop: 'count', minWidth: '190', align: "right", slot: true, sortable: "custom" },
{ label: '最近一次合作时间', prop: 'time', minWidth: '214', sortable: "custom" },
{ label: '合作总金额(万元)', prop: 'amount', minWidth: '226', align: "right", sortable: "custom" },
],
formData: [
{ type: 4, fieldName: 'businessTypes', value: '', placeholder: '咨询机构业务', uid: this.getUid() },
{ type: 5, fieldName: 'time', value: '', placeholder: '合作频率', startTime: 'dateFrom', endTime: 'dateTo', uid: this.getUid() },
{ type: 4, fieldName: 'businessTypes', value: '', placeholder: '咨询机构业务', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'counterpartCompanyRoles', value: '', placeholder: '合作项目类型', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'projectTypes', value: '', placeholder: '合作工程类型', options: [], uid: this.getUid() },
{ type: 5, fieldName: 'time', value: '', placeholder: '合作频率', startTime: 'beginTime', endTime: 'endTime', uid: this.getUid() },
{ type: 6, fieldName: 'money', value: '', placeholder: '合作金额', uid: this.getUid() },
{ type: 3, fieldName: 'keyword', value: '', placeholder: '请输入', uid: this.getUid() },
],
//列表
tableLoading: false,
tableData: [],
tableDataTotal: 0,
isSkeleton: true
isSkeleton: true,
// 合作项目详情弹窗
cooperationRecordDialog: false,
dialogQueryParams: {
companyId: "",
pageNum: 1,
pageSize: 10,
companyType: 1,
sort: ""
},
dialogForData: [
{ label: '合作项目/工程名称', prop: 'projectName', width: '182', slot: true, showOverflowTooltip: true },
{ label: '合作时间', prop: 'time', width: '93', sortable: "custom" },
{ label: '咨询机构承担角色', prop: 'agencyBusinessType', width: '122' },
{ label: '项目类型', prop: 'counterpartRole', minWidth: '74' },
{ label: '工程类型', prop: 'projectType', minWidth: '74' },
{ label: '项目/工程金额(万元)', prop: 'amount', width: '164', sortable: "custom", align: "right", },
{ label: '项目地区', prop: 'area', width: '245', slot: true },
{ label: '数据来源', prop: 'dataSource', width: '74' },
],
dialogFormData: [
{ type: 4, fieldName: 'businessTypes', value: '', placeholder: '咨询机构业务', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'counterpartCompanyRoles', value: '', placeholder: '合作项目类型', options: [], uid: this.getUid() },
{ type: 4, fieldName: 'projectTypes', value: '', placeholder: '合作工程类型', options: [], uid: this.getUid() },
{ type: 5, fieldName: 'time', value: '', placeholder: '合作频率', startTime: 'beginTime', endTime: 'endTime', uid: this.getUid() },
{ type: 3, fieldName: 'keyword', value: '', placeholder: '请输入', uid: this.getUid() },
],
dialogIsSkeleton: true,
dialogtableDataTotal: 0,
dialogTableData: [],
statisticsData: {}
};
},
//可访问data属性
......@@ -53,11 +133,74 @@ export default {
methods: {
async initDetail() {
try {
await this.setOptions(true);
await this.handleQuery();
} catch (error) {
}
},
async setOptions(flag) {
try {
const options = await getCooperativeOwnerUnitsOptionsApi({ companyId: this.queryParams.companyId });
if (options.code == 200 && options.data) {
for (const key in options.data) {
options.data[key] = options.data[key].map(item => ({ name: item, value: item }));
}
this.selectOptions = options.data;
const optionsKey = [["businessType", "businessTypes"], ["counterpartCompanyRole", "counterpartCompanyRoles"], ["projectType", "projectTypes"]];
optionsKey.forEach(([key, value]) => {
flag ? this.$set(this.formData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]) : null;
this.$set(this.dialogFormData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]);
});
}
} catch (error) {
console.log(error);
}
},
// 创建列表查询条件
createQueryCondition(form) {
/**
* @type {Array<{
* fieldName : string;
* value : any
* }>}
*/
const paramsArray = JSON.parse(JSON.stringify(form));
const params = {};
// 处理查询参数
paramsArray.forEach(item => {
// 有效参数
if ((item.value && item.value != "0" && !Array.isArray(item.value)) || item?.value?.length) {
// 多选
if (["businessTypes", "counterpartCompanyRoles", "projectTypes"].includes(item.fieldName)) {
params[item.fieldName] = item.value;
}
// 时间处理
if (item.fieldName == "time") {
params["beginTime"] = item.value[0];
params["endTime"] = item.value[1];
}
// 金额处理
if (item.fieldName == "money") {
params["minAmount"] = item.value[0] ? item.value[0] : "";
params["maxAmount"] = item.value[1] ? item.value[1] : "";
}
// 搜索关键词处理
if (item.fieldName == "keyword" && item?.value.trim()) {
params["keyword"] = item.value;
}
}
});
return params;
},
// 查询
async handleSearch() {
const params = this.createQueryCondition(this.formData);
this.queryParams.pageNum = 1;
const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.queryParams }));
this.handleQuery(searchParams);
},
async handleQuery(params) {
try {
let data = params ? params : this.queryParams;
......@@ -71,6 +214,106 @@ export default {
this.isSkeleton = false;
}
},
viewEnterprise(row) {
},
async sortChange({ column, order, prop }) {
let sort = null;
switch (prop) {
case "time":
order == "ascending" ? sort = 4 : sort = 3;
break;
case "amount":
order == "ascending" ? sort = 2 : sort = 1;
break;
default:
break;
}
if (!order) sort = "";
this.queryParams.sort = sort;
try {
let data = this.queryParams;
const res = await getCooperativeOwnerUnitsListApi(data);
this.tableData = res.rows ? res.rows : [];
this.tableDataTotal = res.total ? res.total : 0;
} catch (error) {
console.log(error);
}
},
viewProject(row) {
this.dialogQueryParams.companyId = row.companyId;
this.cooperationRecordDialog = true;
},
async dialogHandleQurey(params) {
try {
let data = params ? params : this.dialogQueryParams;
this.dialogIsSkeleton = true;
const res = await getCooperativeOwnerUnitsDetailApi(data);
this.dialogTableData = res.rows ? res.rows : [];
this.dialogtableDataTotal = res.total ? res.total : 0;
const count = await getCooperativeOwnerUnitsCountAmountApi(data);
if (count.code == 200 && count.data) {
this.statisticsData = count.data;
}
} catch (error) {
console.log(error);
} finally {
this.dialogIsSkeleton = false;
}
},
dialogHandleSearch(v) {
const params = this.createQueryCondition(this.dialogFormData);
this.dialogQueryParams.pageNum = 1;
const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.dialogQueryParams }));
this.dialogHandleQurey(searchParams);
},
async dialogSortChange({ column, order, prop }) {
let sort = null;
switch (prop) {
case "count":
order == "ascending" ? sort = 6 : sort = 5;
break;
case "time":
order == "ascending" ? sort = 4 : sort = 3;
break;
case "amount":
order == "ascending" ? sort = 2 : sort = 1;
break;
default:
break;
}
if (!order) sort = "";
this.dialogQueryParams.sort = sort;
try {
let data = this.dialogQueryParams;
const res = await getCooperativeOwnerUnitsDetailApi(data);
this.dialogTableData = res.rows ? res.rows : [];
this.dialogtableDataTotal = res.total ? res.total : 0;
const count = await getCooperativeOwnerUnitsCountAmountApi(data);
if (count.code == 200 && count.data) {
this.statisticsData = count.data;
}
} catch (error) {
console.log(error);
}
},
dialogCurrentChange(page) {
this.dialogQueryParams.pageNum = page;
const params = this.createQueryCondition(this.dialogFormData);
const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.dialogQueryParams }));
this.dialogHandleQurey(searchParams);
},
async dialogOPen() {
await this.setOptions();
await this.dialogHandleQurey();
},
dialogClose() {
const data = this.$options.data.call(this);
this.dialogQueryParams = data.dialogQueryParams;
this.dialogFormData = data.dialogFormData;
this.dialogtableDataTotal = data.dialogtableDataTotal;
this.dialogTableData = data.dialogTableData;
}
},
}
</script>
......@@ -110,5 +353,60 @@ export default {
}
}
@import "@/assets/styles/search-common.scss";
::v-deep .cooperation-record-dialog-container {
.cooperation-record-dialog {
height: 60%;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 4px;
margin: 0px !important;
display: flex;
flex-direction: column;
.el-dialog__header {
padding: 20px;
height: 56px;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-bottom: 1px solid #eeeeee;
.el-dialog__title {
color: #232323;
font-weight: bold;
line-height: 16px;
}
.el-dialog__headerbtn {
position: static;
width: 16px;
height: 16px;
}
}
.el-dialog__body {
height: calc(100% - 56px);
padding: 24px 20px;
box-sizing: border-box;
.cooperation-record-dialog-innner {
width: 100%;
height: 100%;
.Tables {
height: calc(100% - 40px);
}
}
}
.el-table-horizontal-scrollbar {
display: none !important;
}
}
}
}
</style>
......@@ -35,6 +35,11 @@
<!-- 咨询业务往来 -->
<!-- 1.常合作业主单位 -->
<cooperative-owner-units v-if="currentPath.pathName=='cooperativeOwnerUnits'" :company-id="companyId"></cooperative-owner-units>
<!-- 2、常合作施工单位 -->
<cooperative-construction-unit v-if="currentPath.pathName=='cooperativeConstructionUnit'"
:company-id="companyId"></cooperative-construction-unit>
<!-- 3、常合作集团 -->
<cooperative-group v-if="currentPath.pathName=='cooperativeGroup'" :company-id="companyId"></cooperative-group>
<!-- 投诚分析 -->
<RegionalEconomies v-if="currentPath.pathName=='regionalEconomies'" :company-id="companyId" :companyInfo="companyInfo" />
<LandAcquisition v-if="currentPath.pathName=='landAcquisition'" :company-id="companyId" />
......@@ -111,6 +116,8 @@ import Bidagency from "./dealings/bidagency"; //业务往来-招标代理
import Hiscontract from "./dealings/hiscontract"; //业务往来-历史发包
import Bidrecords from "./dealings/bidrecords"; //业务往来-开标记录
import CooperativeOwnerUnits from "@/views/detail/party-a/consultingTransaction/cooperativeOwnerUnits"; //咨询业务往来 常合作业主单位
import CooperativeConstructionUnit from "@/views/detail/party-a/consultingTransaction/cooperativeConstructionUnit"; //咨询业务往来 常合作施工单位
import CooperativeGroup from "@/views/detail/party-a/consultingTransaction/cooperativeGroup"; //咨询业务往来 常合作集团
import LandAcquisition from "./urbanLnvestment/landAcquisition"; //投诚分析-城投拿地
import RegionalEconomies from "./urbanLnvestment/regionalEconomies"; //投诚分析-区域经济
import SameRegion from "./urbanLnvestment/sameRegion"; //投诚分析-同地区城投
......@@ -180,7 +187,9 @@ export default {
CooperativeOwnerUnits,
ConsultingAgencyCooperation,
AccessCondition,
CooperationRecord
CooperationRecord,
CooperativeConstructionUnit,
CooperativeGroup
},
data() {
return {
......@@ -309,7 +318,7 @@ export default {
if (result.code == 200) {
if (result.data.totalCount < 1) {
let arr = JSON.parse(JSON.stringify(this.$refs.sidebar.sideRoute));
arr[1].children[5].children[2].disabled = true;
arr[0].children[5].children[2].disabled = true;
this.$refs.sidebar.sideRoute = arr;
}
}
......
......@@ -11,37 +11,37 @@
</tr>
<tr>
<td class="table-key">公司名称</td>
<td>-</td>
<td>{{supplierAccessInfo.customerName ? supplierAccessInfo.customerName : "-"}}</td>
<td class="table-key">注册资本(万元)</td>
<td>-</td>
<td>{{supplierAccessInfo.registerCapital ? supplierAccessInfo.registerCapital : "-"}}</td>
</tr>
<tr>
<td class="table-key">证件选择</td>
<td>-</td>
<td>{{supplierAccessInfo.cardType ? supplierAccessInfo.cardType : "-"}}</td>
<td class="table-key">统一社会信用代码</td>
<td>-</td>
<td>{{supplierAccessInfo.unifySocialCode ? supplierAccessInfo.unifySocialCode : "-"}}</td>
</tr>
<tr>
<td class="table-key">工商注册号</td>
<td>-</td>
<td>{{supplierAccessInfo.registerNo ? supplierAccessInfo.registerNo : "-"}}</td>
<td class="table-key">组织机构代码证号</td>
<td>-</td>
<td>{{supplierAccessInfo.orgnizationCode ? supplierAccessInfo.orgnizationCode : "-"}}</td>
</tr>
<tr>
<td class="table-key">税务登记号</td>
<td colspan="3">-</td>
<td colspan="3">{{supplierAccessInfo.businessLicense ? supplierAccessInfo.businessLicense : "-"}}</td>
</tr>
<tr>
<td class="table-key">身份选择</td>
<td>-</td>
<td>{{supplierAccessInfo.cardType ? supplierAccessInfo.cardType : "-"}}</td>
<td class="table-key">法人身份证号/护照...</td>
<td>-</td>
<td>{{supplierAccessInfo.idCard ? supplierAccessInfo.idCard : "-"}}</td>
</tr>
<tr>
<td class="table-key">纳税人身份</td>
<td>-</td>
<td>{{supplierAccessInfo.paytaxType ? supplierAccessInfo.paytaxType : "-"}}</td>
<td class="table-key">纳税人税率</td>
<td>-</td>
<td>{{supplierAccessInfo.taxRate ? supplierAccessInfo.taxRate : "-"}}</td>
</tr>
<tr>
<td class="table-key lot">享受优惠政策说明</td>
......@@ -52,45 +52,45 @@
<table style="margin-top:16px;">
<tr>
<td class="table-key">法人代表</td>
<td>-</td>
<td>{{supplierAccessInfo.representative ? supplierAccessInfo.representative : "-"}}</td>
<td class="table-key">公司联系人</td>
<td>-</td>
<td>{{supplierAccessInfo.contactPerson ? supplierAccessInfo.contactPerson : "-"}}</td>
</tr>
<tr>
<td class="table-key">公司联系人电话</td>
<td>-</td>
<td>{{supplierAccessInfo.contactPhone ? supplierAccessInfo.contactPhone : "-"}}</td>
<td class="table-key">主项资质</td>
<td>-</td>
</tr>
<tr>
<td class="table-key">公司性质</td>
<td>-</td>
<td>{{supplierAccessInfo.ownerKind ? supplierAccessInfo.ownerKind : "-"}}</td>
<td class="table-key">资质等级</td>
<td>-</td>
<td>{{supplierAccessInfo.credential ? supplierAccessInfo.credential : "-"}}</td>
</tr>
<tr>
<td class="table-key">施工承包范围</td>
<td>-</td>
<td>{{supplierAccessInfo.constructJobScope ? supplierAccessInfo.constructJobScope : "-"}}</td>
<td class="table-key">专业类别</td>
<td>-</td>
<td>{{supplierAccessInfo.groupSpecialty ? supplierAccessInfo.groupSpecialty : "-"}}</td>
</tr>
<tr>
<td class="table-key">公司注册地所属区域</td>
<td>-</td>
<td>{{supplierAccessInfo.registerRegion ? supplierAccessInfo.registerRegion : "-"}}</td>
<td class="table-key">公司注册地所属省</td>
<td>-</td>
<td>{{supplierAccessInfo.registerProvince ? supplierAccessInfo.registerProvince : "-"}}</td>
</tr>
<tr>
<td class="table-key">公司注册地所属城市</td>
<td>-</td>
<td>{{supplierAccessInfo.registerCity ? supplierAccessInfo.registerCity : "-"}}</td>
<td class="table-key">注册地址</td>
<td>-</td>
<td>{{supplierAccessInfo.registerAddress ? supplierAccessInfo.registerAddress : "-"}}</td>
</tr>
<tr>
<td class="table-key">开户行</td>
<td>-</td>
<td>{{supplierAccessInfo.openBank ? supplierAccessInfo.openBank : "-"}}</td>
<td class="table-key">银行账号</td>
<td>-</td>
<td>{{supplierAccessInfo.bankAccount ? supplierAccessInfo.bankAccount : "-"}}</td>
</tr>
</table>
......
......@@ -14,7 +14,7 @@
</tables>
<el-dialog :title="dialogTitle" :visible.sync="cooperationRecordDialog" width="1100px" @close="dialogClose"
class="cooperation-record-dialog-container" custom-class="cooperation-record-dialog">
class="cooperation-record-dialog-container" custom-class="cooperation-record-dialog" :destroy-on-close="true">
<div class="cooperation-record-dialog-innner">
<dialog-head-form-new title="" :form-data="dialogFormData" :query-params="dialogQueryParams" :total="dialogtableDataTotal" :isExcel="false"
@handle-search="dialogHandleSearch" ref="dialogSearchFormNew" />
......@@ -93,7 +93,7 @@ export default {
isSkeleton: true,
areaList: [],
// 合作记录弹窗
cooperationRecordDialog: true,
cooperationRecordDialog: false,
dialogTitle: "",
dialogQueryParams: {
......
......@@ -136,7 +136,7 @@
</el-upload>
</div>
<div slot="footer" class="dialog-footer">
<el-button class="download" icon="el-icon-download">下载模版</el-button>
<el-button class="download" icon="el-icon-download" @click="downloadClick">下载模版</el-button>
<el-button @click="handleUploadCancel1">取消</el-button>
<el-button type="primary" @click="submitUpload">确定</el-button>
</div>
......@@ -207,10 +207,12 @@
headers: {
Authorization: "Bearer " + getToken(),
},
companyId:''
companyId:'',
downloadhref: '',//样例地址
}
},
created() {
this.downloadhref = '/file/Template.xlsx';
this.querySubmit()
},
methods: {
......@@ -244,6 +246,8 @@
}
companyAdd(data).then(res => {
this.qyVisible=false;
this.companyName=''
this.dataList=[]
this.$message.success("新增成功");
this.querySubmit()
})
......@@ -367,6 +371,14 @@
this.fileList=[]
this.pldrVisible=false;
},
downloadClick() {
let a = document.createElement("a");
a.setAttribute("href", this.downloadhref);
a.setAttribute("download", "批量导入模版.xlsx");
document.body.appendChild(a);
a.click();
a.remove();
},
submitUpload() {
this.$refs.upload.submit();
},
......
......@@ -200,7 +200,7 @@
}
console.log(params)
insertOrUpdate(params).then(res => {
this.$modal.success(res.msg);
this.$message.success(res.msg);
})
},
handleResetting(){
......
......@@ -456,6 +456,7 @@
this.dialogVisible=true;
break;
default:
this.$message.success("暂无详情");
break;
}
this.getDetail(item.dimensionName,item.sourceId)
......
......@@ -436,6 +436,7 @@
this.dialogVisible=true;
break;
default:
this.$message.success("暂无详情");
break;
}
this.getDetail(item.dimensionName,item.sourceId)
......
......@@ -7,13 +7,9 @@ import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Assert;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dsk.common.constant.TenantConstants;
import com.dsk.system.domain.*;
import com.dsk.system.mapper.*;
import com.dsk.system.service.ISysRoleService;
import com.dsk.common.constant.UserConstants;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.domain.model.LoginUser;
......@@ -22,6 +18,9 @@ import com.dsk.common.exception.ServiceException;
import com.dsk.common.helper.LoginHelper;
import com.dsk.common.utils.StreamUtils;
import com.dsk.common.utils.StringUtils;
import com.dsk.system.domain.*;
import com.dsk.system.mapper.*;
import com.dsk.system.service.ISysRoleService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -406,8 +405,12 @@ public class SysRoleServiceImpl implements ISysRoleService {
*/
@Override
public int deleteAuthUser(SysUserRole userRole) {
//校验企业管理员角色下是否至少有一个账号
checkAdminHasUsers(userRole.getRoleId());
Set<String> rolePermission = Objects.requireNonNull(LoginHelper.getLoginUser()).getRolePermission();
if (rolePermission.contains(TenantConstants.TENANT_SUPER_ADMIN_ROLE_KEY)
|| rolePermission.contains(TenantConstants.TENANT_ADMIN_ROLE_KEY)) {
//校验企业管理员角色下是否至少有一个可用账号
checkAdminHasUsers(userRole.getRoleId());
}
//若该账号仅有一个角色,则不允许取消授权
SysUser sysUser = userMapper.selectUserById(userRole.getUserId());
......@@ -447,7 +450,7 @@ public class SysRoleServiceImpl implements ISysRoleService {
//将缺少角色的账号返回给前端
if (lackRoleAccount.toString().contains(",")) {
throw new ServiceException(lackRoleAccount.substring(0, lackRoleAccount.length()-1));
throw new ServiceException(lackRoleAccount.substring(0, lackRoleAccount.length() - 1));
}
//如果取消授权企业管理员角色下所有账号,则抛异常
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment