合并分支 'master' 到 'dev_third_stage'

Master

查看合并请求 laws-nio/laws-weilai!41
This commit is contained in:
李雪涛
2022-07-03 12:42:03 +08:00
23 changed files with 1023 additions and 362 deletions
@@ -8,3 +8,5 @@ ALTER TABLE `dummy_inventory_info`
ADD COLUMN `verify_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '验证备注' AFTER `applicable_supplement`, ADD COLUMN `verify_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '验证备注' AFTER `applicable_supplement`,
ADD COLUMN `prehomo_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'pre备注' AFTER `verify_remark`, ADD COLUMN `prehomo_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'pre备注' AFTER `verify_remark`,
ADD COLUMN `design_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设计备注' AFTER `prehomo_remark`; ADD COLUMN `design_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设计备注' AFTER `prehomo_remark`;
-- 2022年7月2日部署到正式环境
@@ -7,7 +7,7 @@ public enum ProjectRoleEnum {
STUDIO_ENGINEER("studio工程师","0","R&H Studio"), STUDIO_ENGINEER("studio工程师","0","R&H Studio"),
REGULATI_ENGINEER("法规工程师","1","studio"), REGULATI_ENGINEER("法规工程师","1","studio"),
HOMOLOGATION_ENGINEER("认证工程师","2","homo"), HOMOLOGATION_ENGINEER("认证工程师","2","homo"),
REGULATI_AND_HOMOLOGATION_ENGINEER("法规工程师/认证工程师","4",""), REGULATI_AND_HOMOLOGATION_ENGINEER("法规工程师/认证工程师","4","Regulatory Engineer/Certification Engineer"),
MANAGER("领导角色","11","R&H Manager"), MANAGER("领导角色","11","R&H Manager"),
ADMIN("系统管理员","12","admin"), ADMIN("系统管理员","12","admin"),
; ;
@@ -443,9 +443,9 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
*/ */
@ApiOperation(value = "当前登录用户角色") @ApiOperation(value = "当前登录用户角色")
@RequestMapping(value = "/getRoleByUserId", method = RequestMethod.GET) @RequestMapping(value = "/getRoleByUserId", method = RequestMethod.GET)
public Result<List<SysRole>> getRoleByUserId(String projectLibraryId) { public Result<List<SysRole>> getRoleByUserId(String projectLibraryId,String cut) {
Result<List<SysRole>> result = new Result<>(); Result<List<SysRole>> result = new Result<>();
List<SysRole> list = projectLawsInventoryEOService.getRoleByUserId(projectLibraryId); List<SysRole> list = projectLawsInventoryEOService.getRoleByUserId(projectLibraryId,cut);
if(list==null||list.size()<=0) { if(list==null||list.size()<=0) {
result.error500("未找到角色信息"); result.error500("未找到角色信息");
}else { }else {
@@ -107,4 +107,5 @@ public class ProjectTaskInventoryFeedbackEO implements Serializable {
@ApiModelProperty(value = "序号") @ApiModelProperty(value = "序号")
private String serialNumber; private String serialNumber;
} }
@@ -16,6 +16,11 @@ public enum InventoryAffirmStatusEnum {
LIST_TO_CONFIRM("待确认","List to confirm"), LIST_TO_CONFIRM("待确认","List to confirm"),
ACCEPTED("接受","Accepted"), ACCEPTED("接受","Accepted"),
REJECTED("拒绝","Rejected"), REJECTED("拒绝","Rejected"),
REG_ENG_TO_CONFIRM("法规工程师待确认","To be confirmed by Reg Eng."),
HOMO_ENG_TO_CONFIRM("认证工程师待确认","To be confirmed by Homo Eng."),
REG_ENG_REJECTED("法规工程师拒绝 ","Reg Eng. rejected"),
HOMO_ENG_REJECTED("认证工程师拒绝 ","Homo Eng. rejected"),
; ;
@@ -1,30 +1,35 @@
package com.jero.modules.project.enums; package com.jero.modules.project.enums;
import com.jero.common.constant.enums.CutEnum;
import com.jero.modules.system.util.StringUtils;
/** /**
* 项目角色枚举类 * 项目角色枚举类
*/ */
public enum ProjectRoleEnum { public enum ProjectRoleEnum {
STUDIO_ENGINEER("studio工程师","0"), STUDIO_ENGINEER("studio工程师","0","R&H Studio"),
REGULATI_ENGINEER("法规工程师","1"), REGULATI_ENGINEER("法规工程师","1","Regulatory Engineer"),
HOMOLOGATION_ENGINEER("认证工程师","2"), HOMOLOGATION_ENGINEER("认证工程师","2","Certification Engineer"),
ENGINEERING_INTERFACE_PERSON("工程接口人","3"), ENGINEERING_INTERFACE_PERSON("工程接口人","3","Engineering interface person"),
REGULATI_AND_HOMOLOGATION_ENGINEER("法规与认证工程师","4"), REGULATI_AND_HOMOLOGATION_ENGINEER("法规与认证工程师","4","Regulatory and certification engineer"),
DESIGNINITIATOR("设计符合性确认-发起人","5"), DESIGNINITIATOR("设计符合性确认-发起人","5",""),
DESIGNDUTY("设计符合性确认-责任人","6"), DESIGNDUTY("设计符合性确认-责任人","6",""),
PREHOMOINITIATOR("prehomo确认-发起人","7"), PREHOMOINITIATOR("prehomo确认-发起人","7",""),
PREHOMODUTY("prehomo确认-责任人","8"), PREHOMODUTY("prehomo确认-责任人","8",""),
VERIFYINITIATOR("验证符合性确认-发起人","9"), VERIFYINITIATOR("验证符合性确认-发起人","9",""),
VERIFYDUTY("验证符合性确认-责任人","10"), VERIFYDUTY("验证符合性确认-责任人","10",""),
MANAGER("验证符合性确认-责任人","11"), MANAGER("验证符合性确认-责任人","11",""),
ADMIN("系统管理员","12"), ADMIN("系统管理员","12",""),
; ;
String name; String name;
String value; String value;
String enName;
private ProjectRoleEnum(String name, String value) { private ProjectRoleEnum(String name, String value,String enName) {
this.name = name; this.name = name;
this.value = value; this.value = value;
this.enName = enName;
} }
public String getName() { public String getName() {
@@ -43,11 +48,23 @@ public enum ProjectRoleEnum {
this.value = value; this.value = value;
} }
public static String getTextByValue(String value) { public String getEnName() {
return enName;
}
public void setEnName(String enName) {
this.enName = enName;
}
public static String getTextByValue(String value,String cut) {
ProjectRoleEnum[] values = values(); ProjectRoleEnum[] values = values();
for (ProjectRoleEnum projectRoleEnum : values) { for (ProjectRoleEnum projectRoleEnum : values) {
if (projectRoleEnum.value.equals(value)) { if (projectRoleEnum.value.equals(value)) {
return projectRoleEnum.name; if(StringUtils.equals(cut, CutEnum.CN.getValue())){
return projectRoleEnum.name;
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
return projectRoleEnum.enName;
}
} }
} }
return null; return null;
@@ -148,5 +148,5 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
*/ */
Result<?> expediting(JSONObject json); Result<?> expediting(JSONObject json);
List<SysRole> getRoleByUserId(String projectLibraryId); List<SysRole> getRoleByUserId(String projectLibraryId,String cut);
} }
@@ -1015,15 +1015,78 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
} }
//清单确认状态 //清单确认状态
String inventoryAffirmStatus = projectLawsInventoryEO.getInventoryAffirmStatus(); /*String inventoryAffirmStatus = projectLawsInventoryEO.getInventoryAffirmStatus();
if(StringUtils.isNotEmpty(inventoryAffirmStatus)){ if(StringUtils.isNotEmpty(inventoryAffirmStatus)){
if(StringUtils.equals(cut, CutEnum.CN.getValue())){ if(StringUtils.equals(cut, CutEnum.CN.getValue())){
projectLawsInventoryEO.setInventoryAffirmStatusName(InventoryAffirmStatusEnum.getTextByValue(inventoryAffirmStatus)); projectLawsInventoryEO.setInventoryAffirmStatusName(InventoryAffirmStatusEnum.getTextByValue(inventoryAffirmStatus));
}else { }else {
projectLawsInventoryEO.setInventoryAffirmStatusName(inventoryAffirmStatus); projectLawsInventoryEO.setInventoryAffirmStatusName(inventoryAffirmStatus);
} }
}*/
/**
* 清单确认状态展示
* 待确认展示 法规工程师待确认 认证工程师待确认
* 拒绝展示 法规工程师拒绝 认证工程师拒绝
*
*/
String inventoryAffirmStatus = projectLawsInventoryEO.getInventoryAffirmStatus();
if(StringUtils.isNotEmpty(inventoryAffirmStatus)){
//如果是待确认
if(StringUtils.equals(inventoryAffirmStatus,InventoryAffirmStatusEnum.LIST_TO_CONFIRM.getValue())){
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())
&& StringUtils.equals(projectLawsInventoryEO.getHomologationEngineerSubmitStatus(),OperatorResultEnum.ACCEPTED.getValue())){
//如果 认证工程师提交状态 不为空则证明认证工程师已经提交过了展示状态应该展示 法规工程师待确认
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
projectLawsInventoryEO.setInventoryAffirmStatusName(InventoryAffirmStatusEnum.REG_ENG_TO_CONFIRM.getName());
}else {
projectLawsInventoryEO.setInventoryAffirmStatusName(InventoryAffirmStatusEnum.REG_ENG_TO_CONFIRM.getValue());
}
}else if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())
&& StringUtils.equals(projectLawsInventoryEO.getRegulationOwnerSubmitStatus(),OperatorResultEnum.ACCEPTED.getValue())){
//如果 法规工程师提交状态 不为空则证明法规工程师已经提交过了展示状态应该展示 认证工程师待确认
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
projectLawsInventoryEO.setInventoryAffirmStatusName(InventoryAffirmStatusEnum.HOMO_ENG_TO_CONFIRM.getName());
}else {
projectLawsInventoryEO.setInventoryAffirmStatusName(InventoryAffirmStatusEnum.HOMO_ENG_TO_CONFIRM.getValue());
}
}else {
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
projectLawsInventoryEO.setInventoryAffirmStatusName(InventoryAffirmStatusEnum.getTextByValue(inventoryAffirmStatus));
}else {
projectLawsInventoryEO.setInventoryAffirmStatusName(inventoryAffirmStatus);
}
}
//如果是拒绝
}else if(StringUtils.equals(inventoryAffirmStatus,InventoryAffirmStatusEnum.REJECTED.getValue())){
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())
&& StringUtils.equals(projectLawsInventoryEO.getHomologationEngineerSubmitStatus(),OperatorResultEnum.REJECTED.getValue())){
//如果认证工程师提交状态不为空并且认证工程师提交状态为拒绝
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
projectLawsInventoryEO.setInventoryAffirmStatusName(InventoryAffirmStatusEnum.HOMO_ENG_REJECTED.getName());
}else {
projectLawsInventoryEO.setInventoryAffirmStatusName(InventoryAffirmStatusEnum.HOMO_ENG_REJECTED.getValue());
}
}else if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())
&& StringUtils.equals(projectLawsInventoryEO.getRegulationOwnerSubmitStatus(),OperatorResultEnum.REJECTED.getValue())){
//如果 法规工程师提交状态 不为空则证明法规工程师已经提交过了展示状态应该展示 认证工程师待确认
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
projectLawsInventoryEO.setInventoryAffirmStatusName(InventoryAffirmStatusEnum.REG_ENG_REJECTED.getName());
}else {
projectLawsInventoryEO.setInventoryAffirmStatusName(InventoryAffirmStatusEnum.REG_ENG_REJECTED.getValue());
}
}
}else {
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
projectLawsInventoryEO.setInventoryAffirmStatusName(InventoryAffirmStatusEnum.getTextByValue(inventoryAffirmStatus));
}else {
projectLawsInventoryEO.setInventoryAffirmStatusName(inventoryAffirmStatus);
}
}
} }
//任务确认状态 //任务确认状态
String taskAffirmStatus = projectLawsInventoryEO.getTaskAffirmStatus(); String taskAffirmStatus = projectLawsInventoryEO.getTaskAffirmStatus();
if(StringUtils.isNotEmpty(taskAffirmStatus)){ if(StringUtils.isNotEmpty(taskAffirmStatus)){
@@ -1208,6 +1271,16 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
} }
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
try { try {
ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>()
.lambda().eq(ProjectLibraryBase::getId, projectLibraryId));
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
//TODO 切换成枚举不要在代码里出现魔数 //TODO 切换成枚举不要在代码里出现魔数
if(StringUtils.equals(operatorType, OperatorTypeEnum.INVENTORY_AFFIRM.getValue())){ if(StringUtils.equals(operatorType, OperatorTypeEnum.INVENTORY_AFFIRM.getValue())){
String ids = json.getString("ids"); String ids = json.getString("ids");
@@ -1224,8 +1297,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
} }
queryWrapper.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectLibraryId); queryWrapper.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectLibraryId);
List<ProjectLawsInventoryEO> projectLawsInventoryEOS = this.baseMapper.selectList(queryWrapper); List<ProjectLawsInventoryEO> projectLawsInventoryEOS = this.baseMapper.selectList(queryWrapper);
ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>()
.lambda().eq(ProjectLibraryBase::getId, projectLibraryId));
List<String> userIdList = new ArrayList<>(); List<String> userIdList = new ArrayList<>();
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOS) { for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOS) {
@@ -1254,13 +1326,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(CollectionUtils.isNotEmpty(userIdList)){ if(CollectionUtils.isNotEmpty(userIdList)){
userIdList = userIdList.stream().distinct().collect(Collectors.toList()); userIdList = userIdList.stream().distinct().collect(Collectors.toList());
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
//消息内容 //消息内容
String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for " String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for "
@@ -1378,9 +1444,94 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
inventoryAffirmStatus = InventoryAffirmStatusEnum.ACCEPTED.getValue(); inventoryAffirmStatus = InventoryAffirmStatusEnum.ACCEPTED.getValue();
} }
//如果法规工程师与认证工程师 其中一个人是拒绝 把清单确认状态设置为 拒绝 /*//如果法规工程师与认证工程师 其中一个人是拒绝 把清单确认状态设置为 拒绝
if(projectLawsInventoryEO.getRegulationOwnerSubmitStatus().equals("1") || projectLawsInventoryEO.getHomologationEngineerSubmitStatus().equals("1")){ if(projectLawsInventoryEO.getRegulationOwnerSubmitStatus().equals("1") || projectLawsInventoryEO.getHomologationEngineerSubmitStatus().equals("1")){
inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue(); inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue();
}*/
}
//只要有一个人拒绝就改为拒绝
if(StringUtils.equals(operatorResult, OperatorResultEnum.REJECTED.getValue())){
inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue();
//如果拒绝给studio发消息
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//消息内容
String msgContentEN = "";
if(isProjectRole == Integer.parseInt(ProjectRoleEnum.REGULATI_ENGINEER.getValue()) || isProjectRole == Integer.parseInt(ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue())){
msgContentEN = "The regulation list confirmation" +" of "+projectLawsInventoryEO.getSerialNumber() +" for "
+ projectNameInfoEO.getProjectName() +" is rejected by " +currentUser.getUsername() +". Please check and address it in a timely manner.";
// 飞书消息封装
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! This task is rejected by " +currentUser.getUsername()+ ". Please check and address it in a timely manner.");
feishuMsgVo.setTaskType("Regulation List Confirmation");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername());
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()));
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
+ projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
List<String> userIdList = new ArrayList<>();
userIdList.add(projectLibraryBase.getStudioEngineer());
sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
if(isProjectRole == Integer.parseInt(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue()) || isProjectRole == Integer.parseInt(ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue())){
msgContentEN = "The regulation list confirmation of "+projectLawsInventoryEO.getSerialNumber() + " for "
+ projectNameInfoEO.getProjectName() +" is rejected by " + currentUser.getUsername() +". Please check and address it in a timely manner.";
// 飞书消息封装
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! This task is rejected by "+currentUser.getUsername()+". Please check and address it in a timely manner.");
feishuMsgVo.setTaskType("Regulation List Confirmation");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername());
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()));
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
+ projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
List<String> userIdList = new ArrayList<>();
userIdList.add(projectLibraryBase.getStudioEngineer());
sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
} }
} }
@@ -1388,6 +1539,48 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
projectLawsInventoryEO.setInventoryAffirmStatus(inventoryAffirmStatus); projectLawsInventoryEO.setInventoryAffirmStatus(inventoryAffirmStatus);
} }
super.baseMapper.updateById(projectLawsInventoryEO); super.baseMapper.updateById(projectLawsInventoryEO);
//如果法规认证工程师都提交通过法规清单 清单确认状态为接受 并且给当前项目的studio发送消息
if(StringUtils.equals(inventoryAffirmStatus,InventoryAffirmStatusEnum.ACCEPTED.getValue())){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//消息内容
String msgContentEN = "The regulation list confirmation of "
+projectLawsInventoryEO.getSerialNumber()+" for "
+ projectNameInfoEO.getProjectName() +" is completed. Please check.";
// 飞书消息封装
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! This task is completed. Please check.");
feishuMsgVo.setTaskType("Regulation List Confirmation");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername());
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()));
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
+ projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryId + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
List<String> userIdList = new ArrayList<>();
userIdList.add(projectLibraryBase.getStudioEngineer());
sendMessage(msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
} }
} }
}else { }else {
@@ -2176,8 +2369,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//认证级别 //认证级别
if (StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())) { if (StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())) {
List<SysDictItem> attestationRank = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.ATTESTATION_RANK.getValue()); List<SysDictItem> attestationRank = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.ATTESTATION_RANK.getValue());
String attestationRankName = attestationRank.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getAttestationRank())).map(f -> f.getItemText()).collect(Collectors.joining(",")); List<String> attestationRankList = Arrays.asList(projectLawsInventoryEO.getAttestationRank().split(","));
projectLawsInventoryEO.setAttestationRank(attestationRankName); StringBuilder attestationRankBuilder = new StringBuilder();
for (String midAttestationRank : attestationRankList) {
String dutyTerritoryName = attestationRank.stream().filter(e -> e.getItemValue().equals(midAttestationRank)).map(f -> f.getItemText()).collect(Collectors.joining(","));
attestationRankBuilder.append(dutyTerritoryName).append(",");
}
projectLawsInventoryEO.setAttestationRank(attestationRankBuilder.substring(0, attestationRankBuilder.toString().length() - 1));
} else { } else {
projectLawsInventoryEO.setAttestationRank(""); projectLawsInventoryEO.setAttestationRank("");
} }
@@ -2538,13 +2736,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//认证级别 //认证级别
if (StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())) { if (StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())) {
List<SysDictItem> attestationRank = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.ATTESTATION_RANK.getValue()); List<SysDictItem> attestationRank = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.ATTESTATION_RANK.getValue());
String attestationRankName = attestationRank.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getAttestationRank())).map(f -> f.getItemText()).collect(Collectors.joining(",")); List<String> attestationRankList = Arrays.asList(projectLawsInventoryEO.getAttestationRank().split(","));
projectLawsInventoryEO.setAttestationRank(attestationRankName); StringBuilder attestationRankBuilder = new StringBuilder();
for (String midAttestationRank : attestationRankList) {
String dutyTerritoryName = attestationRank.stream().filter(e -> e.getItemValue().equals(midAttestationRank)).map(f -> f.getItemText()).collect(Collectors.joining(","));
attestationRankBuilder.append(dutyTerritoryName).append(",");
}
projectLawsInventoryEO.setAttestationRank(attestationRankBuilder.substring(0, attestationRankBuilder.toString().length() - 1));
} else { } else {
projectLawsInventoryEO.setAttestationRank("null"); projectLawsInventoryEO.setAttestationRank("null");
} }
//责任领域 //责任领域
if (StringUtils.isNotBlank(projectLawsInventoryEO.getDutyTerritory())) { if (StringUtils.isNotBlank(projectLawsInventoryEO.getDutyTerritory())) {
List<SysDictItem> dutyTerritory = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue()); List<SysDictItem> dutyTerritory = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
@@ -3117,8 +3319,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
fileTemp.mkdirs(); fileTemp.mkdirs();
//文件 //文件
exportFile(dataList,fileInfos); exportFile(dataList,fileInfos);
String excelName = "";
if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){
excelName = "法规清单.xlsx";
}else{
excelName = "Regulation List.xlsx";
}
//excel //excel
OutputStream excelOS = new FileOutputStream(path + File.separator + "法规清单.xlsx"); OutputStream excelOS = new FileOutputStream(path + File.separator + excelName);
ExportParams exportParams = new ExportParams(); ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF); exportParams.setType(ExcelType.XSSF);
if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){ if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){
@@ -3257,6 +3465,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(StringUtils.isNotBlank(pullVerifyDeliverableType)){ if(StringUtils.isNotBlank(pullVerifyDeliverableType)){
projectLawsInventoryEOEn.setVerifyDeliverableType(pullVerifyDeliverableType); projectLawsInventoryEOEn.setVerifyDeliverableType(pullVerifyDeliverableType);
} }
//清单确认状态
String inventoryAffirmStatus = projectLawsInventoryEOEn.getInventoryAffirmStatus();
if(StringUtils.isNotBlank(inventoryAffirmStatus)){
projectLawsInventoryEOEn.setInventoryAffirmStatusName(inventoryAffirmStatus);
}
//任务确认状态
String taskAffirmStatus = projectLawsInventoryEOEn.getTaskAffirmStatus();
if(StringUtils.isNotBlank(taskAffirmStatus)){
projectLawsInventoryEOEn.setTaskAffirmStatusName(taskAffirmStatus);
}
} }
} }
@@ -6083,7 +6302,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
@Override @Override
public List<SysRole> getRoleByUserId(String projectLibraryId) { public List<SysRole> getRoleByUserId(String projectLibraryId,String cut) {
List<SysRole> sysRoles = new LinkedList<>(); List<SysRole> sysRoles = new LinkedList<>();
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//项目详情中取R&H Studio和认证工程师 //项目详情中取R&H Studio和认证工程师
@@ -6095,7 +6314,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(StringUtils.isNotBlank(studioEngineerName) && studioEngineerName.equals(loginUser.getUsername())){ if(StringUtils.isNotBlank(studioEngineerName) && studioEngineerName.equals(loginUser.getUsername())){
SysRole sysRole = new SysRole(); SysRole sysRole = new SysRole();
sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.STUDIO_ENGINEER.getValue()); sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.STUDIO_ENGINEER.getValue());
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.STUDIO_ENGINEER.getName()); if(StringUtils.equals(cut,CutEnum.CN.getValue())){
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.STUDIO_ENGINEER.getName());
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.STUDIO_ENGINEER.getCode());
}
sysRoles.add(sysRole); sysRoles.add(sysRole);
} }
} }
@@ -6115,7 +6339,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|| lawEngineerNameList.contains(loginUser.getUsername())){ || lawEngineerNameList.contains(loginUser.getUsername())){
SysRole sysRole = new SysRole(); SysRole sysRole = new SysRole();
sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue()); sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue());
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getName()); if(StringUtils.equals(cut,CutEnum.CN.getValue())){
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getName());
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getCode());
}
sysRoles.add(sysRole); sysRoles.add(sysRole);
} }
@@ -6125,14 +6353,28 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if (roleList.size() != 0) { if (roleList.size() != 0) {
List<SysRole> manager = roleList.stream().filter(e -> com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getCode().equals(e.getRoleCode())).collect(Collectors.toList()); List<SysRole> manager = roleList.stream().filter(e -> com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getCode().equals(e.getRoleCode())).collect(Collectors.toList());
List<SysRole> admin = roleList.stream().filter(e -> com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getCode().equals(e.getRoleCode())).collect(Collectors.toList()); List<SysRole> admin = roleList.stream().filter(e -> com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getCode().equals(e.getRoleCode())).collect(Collectors.toList());
if (manager.size() != 0) { if(StringUtils.equals(cut,CutEnum.CN.getValue())){
manager.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getValue()); if (manager.size() != 0) {
sysRoles.addAll(manager); manager.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getValue());
} sysRoles.addAll(manager);
if (admin.size() != 0) { }
admin.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getValue()); if (admin.size() != 0) {
sysRoles.addAll(admin); admin.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getValue());
sysRoles.addAll(admin);
}
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
if (manager.size() != 0) {
manager.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getCode());
manager.get(0).setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.MANAGER.getCode());
sysRoles.addAll(manager);
}
if (admin.size() != 0) {
admin.get(0).setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getCode());
admin.get(0).setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.ADMIN.getCode());
sysRoles.addAll(admin);
}
} }
} }
return sysRoles; return sysRoles;
} }
@@ -845,23 +845,38 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
String engineeringInterfacePersonName = row.getCell(2, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).toString(); String engineeringInterfacePersonName = row.getCell(2, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).toString();
String certificationEngineerName = row.getCell(3,Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).toString(); String certificationEngineerName = row.getCell(3,Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).toString();
//除了责任领域全有值->可以 if(StringUtils.isBlank(lawEngineerName)){
if(StringUtils.isNotBlank(lawEngineerName) && StringUtils.isNotBlank(engineeringInterfacePersonName) && StringUtils.isNotBlank(certificationEngineerName)) {
projectRelatedPersonnel.setLawEngineerName(lawEngineerName);
projectRelatedPersonnel.setEngineeringInterfacePersonName(engineeringInterfacePersonName);
projectRelatedPersonnel.setCertificationEngineerName(certificationEngineerName);
}else if(StringUtils.isBlank(lawEngineerName) && StringUtils.isBlank(engineeringInterfacePersonName) && StringUtils.isBlank(certificationEngineerName)) {
//除了责任领域,其他的可以全为空->可以
projectRelatedPersonnel.setLawEngineerName(""); projectRelatedPersonnel.setLawEngineerName("");
projectRelatedPersonnel.setEngineeringInterfacePersonName(""); }else{
projectRelatedPersonnel.setCertificationEngineerName(""); projectRelatedPersonnel.setLawEngineerName(lawEngineerName);
}else {//除了责任领域,备注,有一个为空都报错
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("法规工程师、工程接口人、认证工程师三个为必填字段.请检查第 "+ (i+1) + "");
}else{
throw new JeroBootException("Regulation Engineer,Engineering Interface and Homologation Engineer are required fields..Please check line" + (i+1));
}
} }
if(StringUtils.isBlank(engineeringInterfacePersonName)){
projectRelatedPersonnel.setEngineeringInterfacePersonName("");
}else{
projectRelatedPersonnel.setEngineeringInterfacePersonName(engineeringInterfacePersonName);
}
if(StringUtils.isBlank(certificationEngineerName)){
projectRelatedPersonnel.setCertificationEngineerName("");
}else{
projectRelatedPersonnel.setCertificationEngineerName(certificationEngineerName);
}
// //除了责任领域全有值->可以
// if(StringUtils.isNotBlank(lawEngineerName) && StringUtils.isNotBlank(engineeringInterfacePersonName) && StringUtils.isNotBlank(certificationEngineerName)) {
// projectRelatedPersonnel.setLawEngineerName(lawEngineerName);
// projectRelatedPersonnel.setEngineeringInterfacePersonName(engineeringInterfacePersonName);
// projectRelatedPersonnel.setCertificationEngineerName(certificationEngineerName);
// }else if(StringUtils.isBlank(lawEngineerName) && StringUtils.isBlank(engineeringInterfacePersonName) && StringUtils.isBlank(certificationEngineerName)) {
// //除了责任领域,其他的可以全为空->可以
// projectRelatedPersonnel.setLawEngineerName("");
// projectRelatedPersonnel.setEngineeringInterfacePersonName("");
// projectRelatedPersonnel.setCertificationEngineerName("");
// }else {//除了责任领域,备注,有一个为空都报错
// if(CutEnum.CN.getValue().equals(cut)){
// throw new JeroBootException("法规工程师、工程接口人、认证工程师三个为必填字段.请检查第 "+ (i+1) + "行");
// }else{
// throw new JeroBootException("Regulation Engineer,Engineering Interface and Homologation Engineer are required fields..Please check line" + (i+1));
// }
// }
//导入的备注为数字,被识别成小数点后一位 //导入的备注为数字,被识别成小数点后一位
Cell remarkCell = row.getCell(4, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK); Cell remarkCell = row.getCell(4, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK);
@@ -1,27 +1,31 @@
package com.jero.modules.project.service.impl; package com.jero.modules.project.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.system.vo.LoginUser; import com.jero.common.system.vo.LoginUser;
import com.jero.modules.project.entity.FeedbackHistory; import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.project.entity.ProjectTaskInventoryDetailEO; import com.jero.modules.project.entity.*;
import com.jero.modules.project.entity.ProjectTaskInventoryFeedbackEO;
import com.jero.modules.project.enums.FeedBackHistoryDataStatusEnum; import com.jero.modules.project.enums.FeedBackHistoryDataStatusEnum;
import com.jero.modules.project.enums.JumpLinkEnum;
import com.jero.modules.project.mapper.FeedbackHistoryMapper; import com.jero.modules.project.mapper.FeedbackHistoryMapper;
import com.jero.modules.project.mapper.ProjectTaskInventoryDetailEOMapper; import com.jero.modules.project.mapper.ProjectTaskInventoryDetailEOMapper;
import com.jero.modules.project.mapper.ProjectTaskInventoryFeedbackEOMapper; import com.jero.modules.project.mapper.ProjectTaskInventoryFeedbackEOMapper;
import com.jero.modules.project.service.IProjectTaskInventoryFeedbackEOService; import com.jero.modules.project.service.*;
import com.jero.modules.project.util.SendMessageUtils;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.List; import java.util.*;
import java.util.Date;
import java.util.Map;
import java.util.UUID;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -41,6 +45,24 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
@Autowired @Autowired
private ProjectTaskInventoryDetailEOMapper projectTaskInventoryDetailEOMapper; private ProjectTaskInventoryDetailEOMapper projectTaskInventoryDetailEOMapper;
@Autowired
private ISysUserService sysUserService;
@Autowired
private IProjectLawsInventoryEOService projectLawsInventoryEOService;
@Autowired
private IProjectLibraryBaseService projectLibraryBaseService;
@Autowired
private IProjectNameInfoEOService projectNameInfoEOService;
@Autowired
private IProjectYearNameInfoEOService projectYearNameInfoEOService;
@Value(value = "${jero.backUrl}")
private String backUrl;
/** /**
* 保存 * 保存
* *
@@ -95,6 +117,93 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
Date now = new Date(); Date now = new Date();
projectTaskInventoryFeedbackEO.setUpdateTime(now); projectTaskInventoryFeedbackEO.setUpdateTime(now);
saveOrUpdate(projectTaskInventoryFeedbackEO); saveOrUpdate(projectTaskInventoryFeedbackEO);
//获取这条数据的dre工程师,给他发送消息。
QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
sysUserQueryWrapper.lambda().eq(SysUser::getUsername,projectTaskInventoryFeedbackEO.getCreateBy());
List<SysUser> sysUserList = this.sysUserService.list(sysUserQueryWrapper);
if (CollectionUtils.isNotEmpty(sysUserList)) {
List<String> userIdList = sysUserList.stream().map(SysUser::getId).distinct().collect(Collectors.toList());
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
ProjectTaskInventoryDetailEO projectTaskInventoryDetailEO = this.projectTaskInventoryDetailEOMapper.selectOne(
new QueryWrapper<ProjectTaskInventoryDetailEO>().lambda().eq(ProjectTaskInventoryDetailEO::getId, projectTaskInventoryFeedbackEO.getProjectTaskInventoryId())
);
ProjectLawsInventoryEO projectLawsInventoryEO = this.projectLawsInventoryEOService.getOne(
new QueryWrapper<ProjectLawsInventoryEO>().lambda().eq(ProjectLawsInventoryEO::getId, projectTaskInventoryDetailEO.getProjectTaskInventoryId())
);
ProjectLibraryBase projectLibraryBaseInfo = this.projectLibraryBaseService.getOne(
new QueryWrapper<ProjectLibraryBase>().lambda().eq(ProjectLibraryBase::getId, projectLawsInventoryEO.getProjectLibraryId())
);
ProjectNameInfoEO projectNameInfoEO = this.projectNameInfoEOService.getOne(
new QueryWrapper<ProjectNameInfoEO>().lambda().eq(ProjectNameInfoEO::getId, projectLibraryBaseInfo.getProjectNameId())
);
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBaseInfo.getYearNameId());
ProjectYearNameInfoEO projectYearNameInfoEO = this.projectYearNameInfoEOService.getOne(projectYearInfoEOQueryWrapper);
// 飞书消息封装
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has reply to your engineering deliverable information. Please check and address it in a timely manner.");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername());
//消息内容
String msgContentEN = "";
String flowType = projectTaskInventoryFeedbackEO.getFlowType();
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
msgContentEN = currentUser.getUsername() + " has reply to your engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + " for design compliance confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Design Compliance Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
}else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){
msgContentEN = currentUser.getUsername() + " has reply to your engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + " for Pre-Homo compliance confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
msgContentEN = currentUser.getUsername() + " has reply to your engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
}
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
+ projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
} }
/** /**
@@ -193,6 +302,94 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
feedbackHistoryMapper.insert(feedbackHistory); feedbackHistoryMapper.insert(feedbackHistory);
this.baseMapper.updateById(projectTaskInventoryFeedbackEO); this.baseMapper.updateById(projectTaskInventoryFeedbackEO);
//获取责任人,给责任人发送消息
projectTaskInventoryFeedbackEO.getActiProcInstId();
QueryWrapper<ProjectTaskInventoryDetailEO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ProjectTaskInventoryDetailEO::getActiProcInstId,projectTaskInventoryFeedbackEO.getActiProcInstId());
queryWrapper.lambda().eq(ProjectTaskInventoryDetailEO::getFlowType,projectTaskInventoryFeedbackEO.getFlowType());
queryWrapper.lambda().eq(ProjectTaskInventoryDetailEO::getTaskDefinitionKey, DesignComplianceNodeEnum.THE_RESPONSIBLE_PERSON_HANDLES_THE_TASK.getKey());
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOS = this.projectTaskInventoryDetailEOMapper.selectList(queryWrapper);
if(CollectionUtils.isNotEmpty(projectTaskInventoryDetailEOS)){
List<String> userIdList = projectTaskInventoryDetailEOS.stream().map(ProjectTaskInventoryDetailEO::getUserId).distinct().collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(userIdList)){
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
ProjectLawsInventoryEO projectLawsInventoryEO = this.projectLawsInventoryEOService.getOne(
new QueryWrapper<ProjectLawsInventoryEO>().lambda().eq(ProjectLawsInventoryEO::getId, projectTaskInventoryDetailEOS.get(0).getProjectTaskInventoryId())
);
ProjectLibraryBase projectLibraryBaseInfo = this.projectLibraryBaseService.getOne(
new QueryWrapper<ProjectLibraryBase>().lambda().eq(ProjectLibraryBase::getId, projectLawsInventoryEO.getProjectLibraryId())
);
ProjectNameInfoEO projectNameInfoEO = this.projectNameInfoEOService.getOne(
new QueryWrapper<ProjectNameInfoEO>().lambda().eq(ProjectNameInfoEO::getId, projectLibraryBaseInfo.getProjectNameId())
);
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBaseInfo.getYearNameId());
ProjectYearNameInfoEO projectYearNameInfoEO = this.projectYearNameInfoEOService.getOne(projectYearInfoEOQueryWrapper);
// 飞书消息封装
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has submitted the engineering deliverable information. Please check and address it in a timely manner.");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername());
//消息内容
String msgContentEN = "";
String flowType = projectTaskInventoryFeedbackEO.getFlowType();
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + "for design compliance confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Design Compliance Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
}else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){
msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + " for Pre-Homo confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
+ projectLawsInventoryEO.getSerialNumber() + " in "
+ projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
}
//飞书跳转链接
String hrefFeishu = backUrl
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
+ projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket();
//系统内部跳转链接
String href = "<a href='"
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket()
+ "'>" + "Jump link" + "</a>";
String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo);
//发送消息
SendMessageUtils.sendMessage(msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK);
}
}
} }
/** /**
+4
View File
@@ -1068,4 +1068,8 @@ module.exports = {
newNiONumber: 'Number', newNiONumber: 'Number',
English: 'English', English: 'English',
requiredParametersEmpty:'Required parameters cannot be empty', requiredParametersEmpty:'Required parameters cannot be empty',
PleaseTaskConfirmationRejected:'Please select the data whose list confirmation status is accepted and task confirmation status is not initiated or rejected',
theProjectContactEmpty:'The project contact person of cannot be empty',
pleaseSelectinitiatedOrRejected:'Please select the data whose list confirmation status is not initiated or rejected',
TheEngineerAndCertification:'The regulatory engineer and Certification Engineer of cannot be empty',
} }
+6 -1
View File
@@ -681,7 +681,11 @@ module.exports = {
listConfirmation: '清单确认', listConfirmation: '清单确认',
ListConfirmationDeadline: '清单确认截止时间', ListConfirmationDeadline: '清单确认截止时间',
dataConfirmation: '请选择清单确认状态为未发起或拒绝的数据,以及法规工程师认证工程师不为空', dataConfirmation: '请选择清单确认状态为未发起或拒绝的数据,以及法规工程师认证工程师不为空',
pleaseSelectinitiatedOrRejected:'请选择清单确认状态为未发起或拒绝的数据',
TheEngineerAndCertification:'的法规工程师认证工程师不能为空',
taskDataConfirmation: '请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据,以及工程接口人不为空', taskDataConfirmation: '请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据,以及工程接口人不为空',
theProjectContactEmpty:'的工程接口人不能为空',
PleaseTaskConfirmationRejected:'请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据',
pleaseSelectPersonFirst: '请先选择人员', pleaseSelectPersonFirst: '请先选择人员',
onlyOnePersonCanBeSelected: '只能选择一个人员', onlyOnePersonCanBeSelected: '只能选择一个人员',
overrule: '驳回', overrule: '驳回',
@@ -880,7 +884,8 @@ module.exports = {
yellowSchedule: '不符合/待追踪有可接受的方案和时间表', yellowSchedule: '不符合/待追踪有可接受的方案和时间表',
greenRequirements: '绿确认符合或满足当前要求', greenRequirements: '绿确认符合或满足当前要求',
blueUndeterminedState: '未判断状态', blueUndeterminedState: '未判断状态',
authenticationMessage: '认证消息', authenticationMessage: '认证参数任务',
taskRegulationComplianceTask: '法规符合性任务',
accept: '接受', accept: '接受',
refuse: '拒绝', refuse: '拒绝',
taskTermination: '任务终止', taskTermination: '任务终止',
+3 -3
View File
@@ -44,8 +44,8 @@
</div> </div>
<a-dropdown> <a-dropdown>
<span class="action action-full ant-dropdown-link user-dropdown-menu"> <span class="action action-full ant-dropdown-link user-dropdown-menu">
<a-avatar class="avatar" size="small" :src="getAvatar()"/> <!-- <a-avatar class="avatar" size="small" :src="getAvatar()"/>-->
<!-- <span v-if="isDesktop()">欢迎您,{{ nickname() }}</span>--> <span v-if="isDesktop()">welcome,{{ userInfo().username }}</span>
</span> </span>
<a-menu slot="overlay" class="user-dropdown-menu-wrapper"> <a-menu slot="overlay" class="user-dropdown-menu-wrapper">
<!-- <a-menu-item key="0">--> <!-- <a-menu-item key="0">-->
@@ -209,7 +209,7 @@
}, },
/* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/ /* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
...mapActions(['Logout']), ...mapActions(['Logout']),
...mapGetters(['nickname', 'avatar', 'userInfo']), ...mapGetters(['username', 'avatar', 'userInfo']),
getAvatar() { getAvatar() {
return getFileAccessHttpUrl(this.avatar()) return getFileAccessHttpUrl(this.avatar())
}, },
@@ -259,7 +259,9 @@
}, },
hideModal() { hideModal() {
this.form.dictName = this.form.dictName.trim() this.form.dictName = this.form.dictName.trim()
this.form.description = this.form.description.trim() if (this.form.description){
this.form.description = this.form.description.trim()
}
let params = { let params = {
...this.form ...this.form
} }
@@ -34,10 +34,10 @@
dataSource: [], dataSource: [],
loading: false, loading: false,
approvalResult: { approvalResult: {
0: this.$t('agree'), 0: this.$t('accept'),
1: this.$t('disagree'), 1: this.$t('disagree'),
2: this.$t('terminationProcess'), 2: this.$t('terminationProcess'),
3: this.$t('issue') 3: this.$t('inquiry')
}, },
columns: [ columns: [
{ {
@@ -509,7 +509,6 @@
distributionEngineerList: this.distributionEngineerList distributionEngineerList: this.distributionEngineerList
} }
postAction(this.url.DetailEOAdd, query).then((res) => { postAction(this.url.DetailEOAdd, query).then((res) => {
if (res.success) {
if (res.success) { if (res.success) {
this.confirmLoading = false this.confirmLoading = false
this.getList() this.getList()
@@ -517,9 +516,8 @@
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
} else { } else {
this.confirmLoading = false this.confirmLoading = false
this.$message.warning(this.$t('operationFailed')) this.$message.warning(res.message)
} }
}
}) })
}, },
feedbackData(url, Action) { feedbackData(url, Action) {
@@ -93,11 +93,12 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text-fq"> <div class="title-text-fq">
<span class="Required" v-if="this.$route.query.isDisplay">*</span> <!-- <span class="Required" v-if="this.$route.query.isDisplay">*</span>-->
<span class="title-text-text" <span class="title-text-text"
:title="$t('Deliverables')">{{$t('Deliverables')}}</span> :title="$t('Deliverables')">{{$t('Deliverables')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="!this.$route.query.isDisplay?'':'fileId'"> <!-- :prop="!this.$route.query.isDisplay?'':'fileId'"-->
<a-form-model-item class="itemModel">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
@click="clickButtonToUpload('fileId')"> @click="clickButtonToUpload('fileId')">
{{ (formInline.fileId === 'null' || formInline.fileId === '' || {{ (formInline.fileId === 'null' || formInline.fileId === '' ||
@@ -195,17 +195,17 @@
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
if (this.$route.query.taskDefinitionKey == 'zrrjsrw' || this.$route.query.taskDefinitionKey == 'zrrqr') { if (this.$route.query.taskDefinitionKey == 'zrrjsrw' || this.$route.query.taskDefinitionKey == 'zrrqr') {
if (value.flag == 0) { if (value.flag == 0) {
if (this.queryProject.verifyRemark) { if (this.queryProject.verifyDeliverableType) {
this.startProcessDesign(this.queryBy, 4) this.startProcessDesign(this.queryBy, 4)
} }
if (this.queryProject.prehomoRemark) { if (this.queryProject.prehomoDeliverableType) {
this.startProcessDesign(this.queryBy, 3) this.startProcessDesign(this.queryBy, 3)
} }
if (this.queryProject.designRemark) { if (this.queryProject.designDeliverableType) {
this.startProcessDesign(this.queryBy, 2) this.startProcessDesign(this.queryBy, 2)
} }
if (!this.queryProject.verifyRemark && !this.queryProject.prehomoRemark && if (!this.queryProject.verifyDeliverableType && !this.queryProject.prehomoDeliverableType &&
!this.queryProject.designRemark) { !this.queryProject.designDeliverableType) {
setTimeout(() => { setTimeout(() => {
this.loading = false this.loading = false
window.close() window.close()
@@ -90,7 +90,8 @@
<div class="Virtual-detail-right" <div class="Virtual-detail-right"
:style="{'width':isDisplay?'calc(100% - 240px)':'calc(100% - 66px)'}"> :style="{'width':isDisplay?'calc(100% - 240px)':'calc(100% - 66px)'}">
<ProjectDetailsName @TaskListChange="TaskListChange" v-if="textTitle === $t('projectDetails')"/> <ProjectDetailsName @TaskListChange="TaskListChange" v-if="textTitle === $t('projectDetails')"/>
<listOfRegulations v-else-if="textTitle === $t('listOfRegulations')"/> <listOfRegulations v-else-if="textTitle === $t('listOfRegulations')"
:areaOfResponsibilityList="areaOfResponsibilityList"/>
<TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility" <TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility"
v-else-if="textTitle === $t('taskList')"/> v-else-if="textTitle === $t('taskList')"/>
<TaskParameterCollection v-else-if="textTitle === $t('TaskParameterCollection')"/> <TaskParameterCollection v-else-if="textTitle === $t('TaskParameterCollection')"/>
@@ -137,7 +138,7 @@
isTrue: true, isTrue: true,
loading: false, loading: false,
isDisplay: true, isDisplay: true,
areaOfResponsibilityList:{},
url: { url: {
logList: '/project/projectLawsInventoryLogEO/page', logList: '/project/projectLawsInventoryLogEO/page',
historicalVersionUrl: '', historicalVersionUrl: '',
@@ -216,6 +217,8 @@
} }
}, },
textClick(num, name) { textClick(num, name) {
this.areaOfResponsibilityList = {}
this.areaOfResponsibility = {}
this.textTitle = name this.textTitle = name
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color') let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
if (textColor && textColor.length > 0) { if (textColor && textColor.length > 0) {
@@ -286,15 +289,20 @@
}) })
}, },
TaskListChange(item) { TaskListChange(item) {
this.areaOfResponsibility = item if (item.isListing && item.isListing == '1'){
this.textTitle = this.$t('taskList') this.areaOfResponsibilityList = item
this.textTitle = this.$t('listOfRegulations')
}else{
this.areaOfResponsibility = item
this.textTitle = this.$t('taskList')
}
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color') let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
if (textColor && textColor.length > 0) { if (textColor && textColor.length > 0) {
textColor[0].classList.remove('Virtual-detail-left-text-color') textColor[0].classList.remove('Virtual-detail-left-text-color')
} }
let text = document.getElementsByClassName('Virtual-detail-left-text') let text = document.getElementsByClassName('Virtual-detail-left-text')
for (let i = 0; i < text.length; i++) { for (let i = 0; i < text.length; i++) {
if (text[i].title == this.$t('taskList')) { if (text[i].title == this.textTitle) {
text[i].classList.add('Virtual-detail-left-text-color') text[i].classList.add('Virtual-detail-left-text-color')
} }
} }
@@ -321,6 +321,7 @@
DueDate: 'designDueDate', DueDate: 'designDueDate',
remarks: 'designRemark', remarks: 'designRemark',
projectName: this.$route.query.projectName, projectName: this.$route.query.projectName,
targetMarket:this.$route.query.targetMarket,
projectNameId: this.$route.query.projectNameId, projectNameId: this.$route.query.projectNameId,
primaryKeyId: val.designTaskDetailId, primaryKeyId: val.designTaskDetailId,
PersonChargeFeedback: val.designPersonChargeFeedback PersonChargeFeedback: val.designPersonChargeFeedback
@@ -345,6 +346,7 @@
DueDate: 'prehomoDueDate', DueDate: 'prehomoDueDate',
remarks: 'prehomoRemark', remarks: 'prehomoRemark',
projectName: this.$route.query.projectName, projectName: this.$route.query.projectName,
targetMarket:this.$route.query.targetMarket,
projectNameId: this.$route.query.projectNameId, projectNameId: this.$route.query.projectNameId,
primaryKeyId: val.prehomoTaskDetailId, primaryKeyId: val.prehomoTaskDetailId,
PersonChargeFeedback: val.prehomoPersonChargeFeedback PersonChargeFeedback: val.prehomoPersonChargeFeedback
@@ -369,6 +371,7 @@
DueDate: 'verifyDueDate', DueDate: 'verifyDueDate',
remarks: 'verifyRemark', remarks: 'verifyRemark',
projectName: this.$route.query.projectName, projectName: this.$route.query.projectName,
targetMarket:this.$route.query.targetMarket,
projectNameId: this.$route.query.projectNameId, projectNameId: this.$route.query.projectNameId,
primaryKeyId: val.verifyTaskDetailId, primaryKeyId: val.verifyTaskDetailId,
PersonChargeFeedback: val.verifyPersonChargeFeedback PersonChargeFeedback: val.verifyPersonChargeFeedback
@@ -46,7 +46,7 @@
</div> </div>
<a-form-model-item class="itemModel" prop="subtitle"> <a-form-model-item class="itemModel" prop="subtitle">
<a-input class="box-input" <a-input class="box-input"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 1 ? false : true" :disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.subtitle" v-model="formInline.subtitle"
:placeholder="$t('PleaseEnter')+$t('subtitle')"/> :placeholder="$t('PleaseEnter')+$t('subtitle')"/>
</a-form-model-item> </a-form-model-item>
@@ -55,86 +55,100 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" :title="'WVTA ID'">WVTA ID</span> <span class="title-text-text"
:title="$t('applicableSupplement')">{{$t('applicableSupplement')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="wvtaId"> <a-form-model-item class="itemModel" prop="applicableSupplement">
<a-input class="box-input" <a-input class="box-input"
:disabled="false" :disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.wvtaId" v-model="formInline.applicableSupplement"
:placeholder="$t('PleaseEnter')+'WVTA ID'"/> :placeholder="$t('PleaseEnter')+$t('applicableSupplement')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('correspondingStandard')">{{$t('correspondingStandard')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'correspondingStandard'">
<a-input class="box-input"
:disabled="true"
v-model="formInline.correspondingStandard"
:placeholder="$t('PleaseEnter')+$t('correspondingStandard')"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('implementationCategory')">{{$t('implementationCategory')}}</span>
</div>
<a-form-model-item class="itemModel" prop="implementType">
<j-dict-select-tag class="box-input" v-model="formInline.implementType"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 1 ? false : true"
@input="handleInput('implementType')"
:placeholder="$t('PleaseSelect')+$t('implementationCategory')"
:type="'select'"
:triggerChange="false" :dictCode="'implement_type'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('vehicleInProductionDate')">{{$t('vehicleInProductionDate')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'implementTime'">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('vehicleInProductionDate')"
:getCalendarContainer="(trigger) => trigger.parentNode"
@change="dateChange({db_field_name:'implementTime'})"
format="YYYY-MM-DD"
v-model="formInline.implementTime"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 1 ? false : true"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('ImplementationDate')">{{$t('ImplementationDate')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-date-picker class="box-input"
:getCalendarContainer="(trigger) => trigger.parentNode"
:placeholder="$t('PleaseSelect')+$t('ImplementationDate')"
@change="dateChange({db_field_name:'xin1Che1Xing2Shi2Shi1Ri4Qi1'})"
format="YYYY-MM-DD"
v-model="formInline.xin1Che1Xing2Shi2Shi1Ri4Qi1"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 1 ? false : true"
style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text" :title="'WVTA ID'">WVTA ID</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="wvtaId">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="false"-->
<!-- v-model="formInline.wvtaId"-->
<!-- :placeholder="$t('PleaseEnter')+'WVTA ID'"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
</a-row> </a-row>
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('correspondingStandard')">{{$t('correspondingStandard')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'correspondingStandard'">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="true"-->
<!-- v-model="formInline.correspondingStandard"-->
<!-- :placeholder="$t('PleaseEnter')+$t('correspondingStandard')"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('implementationCategory')">{{$t('implementationCategory')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="implementType">-->
<!-- <j-dict-select-tag class="box-input" v-model="formInline.implementType"-->
<!-- :disabled="formInline.roleCode == 0 || formInline.roleCode == 1 ? false : true"-->
<!-- @input="handleInput('implementType')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('implementationCategory')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'implement_type'"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('vehicleInProductionDate')">{{$t('vehicleInProductionDate')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'implementTime'">-->
<!-- <a-date-picker class="box-input"-->
<!-- :placeholder="$t('PleaseSelect')+$t('vehicleInProductionDate')"-->
<!-- :getCalendarContainer="(trigger) => trigger.parentNode"-->
<!-- @change="dateChange({db_field_name:'implementTime'})"-->
<!-- format="YYYY-MM-DD"-->
<!-- v-model="formInline.implementTime"-->
<!-- :disabled="formInline.roleCode == 0 || formInline.roleCode == 1 ? false : true"-->
<!-- style="width: 100%"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text" :title="$t('ImplementationDate')">{{$t('ImplementationDate')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel">-->
<!-- <a-date-picker class="box-input"-->
<!-- :getCalendarContainer="(trigger) => trigger.parentNode"-->
<!-- :placeholder="$t('PleaseSelect')+$t('ImplementationDate')"-->
<!-- @change="dateChange({db_field_name:'xin1Che1Xing2Shi2Shi1Ri4Qi1'})"-->
<!-- format="YYYY-MM-DD"-->
<!-- v-model="formInline.xin1Che1Xing2Shi2Shi1Ri4Qi1"-->
<!-- :disabled="formInline.roleCode == 0 || formInline.roleCode == 1 ? false : true"-->
<!-- style="width: 100%"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
@@ -144,7 +158,8 @@
</div> </div>
<a-form-model-item class="itemModel-multi" prop="attestationType"> <a-form-model-item class="itemModel-multi" prop="attestationType">
<j-multi-select-tag class="box-input" v-model="formInline.attestationType" <j-multi-select-tag class="box-input" v-model="formInline.attestationType"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 2 ? false : true" :disabled="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.homologationEngineerId == userInfoQuery.id) ? false : true"
:placeholder="$t('PleaseSelect')+$t('certificationType')" :placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'attestation_type'"/> :triggerChange="false" :dictCode="'attestation_type'"/>
@@ -154,13 +169,14 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span> <span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('certificationLevel')">{{$t('certificationLevel')}}</span> :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div> </div>
<a-form-model-item class="itemModel-multi" prop="attestationRank"> <a-form-model-item class="itemModel-multi" prop="attestationRank">
<j-multi-select-tag class="box-input" v-model="formInline.attestationRank" <j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 2 ? false : true" :disabled="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.homologationEngineerId == userInfoQuery.id) ? false : true"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')" :placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'attestation_rank'"/> :triggerChange="false" :dictCode="'attestation_rank'"/>
@@ -172,24 +188,24 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span> <span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span> :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div> </div>
<a-form-model-item class="itemModel-multi" prop="dutyTerritory"> <a-form-model-item class="itemModel-multi" prop="dutyTerritory">
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory" <j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
@change="dutyTerritoryChange" @change="dutyTerritoryChange"
:disabled="formInline.roleCode == 0 ? false : true" :disabled="formInline.roleCodeIndex == 0 ? false : true"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')" :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/> :triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12" v-if="formInline.roleCodeIndex == 0">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span> <span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
<span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span> <span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="'regulationOwnerId'"> <a-form-model-item class="itemModel" :prop="'regulationOwnerId'">
@@ -197,7 +213,7 @@
class="box-input" class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear allowClear
:disabled="formInline.roleCode == 0 ? false : true" :disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.regulationOwnerId"> v-model="formInline.regulationOwnerId">
<a-select-option v-for="(item, key) in regulatoryEngineerList" <a-select-option v-for="(item, key) in regulatoryEngineerList"
:key="key" :key="key"
@@ -211,11 +227,11 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span> <span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
<span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span> <span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="'homologationEngineerId'"> <a-form-model-item class="itemModel" :prop="'homologationEngineerId'">
@@ -223,7 +239,7 @@
class="box-input" class="box-input"
allowClear allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
:disabled="formInline.roleCode == 0 ? false : true" :disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.homologationEngineerId"> v-model="formInline.homologationEngineerId">
<a-select-option v-for="(item, key) in certificationEngineerList" <a-select-option v-for="(item, key) in certificationEngineerList"
:key="key" :key="key"
@@ -239,7 +255,7 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span> <span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span> <span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="'engineeringInterfacePerson'"> <a-form-model-item class="itemModel" :prop="'engineeringInterfacePerson'">
@@ -247,7 +263,7 @@
class="box-input" class="box-input"
allowClear allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
:disabled="formInline.roleCode == 0 ? false : true" :disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.engineeringInterfacePerson"> v-model="formInline.engineeringInterfacePerson">
<a-select-option v-for="(item, key) in engineeringInterfacePersonList" <a-select-option v-for="(item, key) in engineeringInterfacePersonList"
:key="key" :key="key"
@@ -262,58 +278,52 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <!-- <a-col :span="12">-->
<div class="box-title-text"> <!-- <div class="box-title-text">-->
<div class="title-text"> <!-- <div class="title-text">-->
<span class="title-text-text" <!-- <span class="title-text-text"-->
:title="$t('zoneOfApplication')">{{$t('zoneOfApplication')}}</span> <!-- :title="$t('zoneOfApplication')">{{$t('zoneOfApplication')}}</span>-->
</div> <!-- </div>-->
<a-form-model-item class="itemModel-multi" prop="region"> <!-- <a-form-model-item class="itemModel-multi" prop="region">-->
<!-- <a-input class="box-input"--> <!-- &lt;!&ndash; <a-input class="box-input"&ndash;&gt;-->
<!-- :disabled="true"--> <!-- &lt;!&ndash; :disabled="true"&ndash;&gt;-->
<!-- v-model="formInline.region_dictText"/>--> <!-- &lt;!&ndash; v-model="formInline.region_dictText"/>&ndash;&gt;-->
<j-multi-select-tag class="box-input" v-model="formInline.region" <!-- <j-multi-select-tag class="box-input" v-model="formInline.region"-->
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')" <!-- :placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"-->
:type="'select'" <!-- :type="'select'"-->
:triggerChange="false" :dictCode="'region'"/> <!-- :triggerChange="false" :dictCode="'region'"/>-->
</a-form-model-item> <!-- </a-form-model-item>-->
</div> <!-- </div>-->
</a-col> <!-- </a-col>-->
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('applicableSupplement')">{{$t('applicableSupplement')}}</span>
</div>
<a-form-model-item class="itemModel" prop="applicableSupplement">
<a-input class="box-input"
:disabled="false"
v-model="formInline.applicableSupplement"
:placeholder="$t('PleaseEnter')+$t('applicableSupplement')"/>
</a-form-model-item>
</div>
</a-col>
</a-row> </a-row>
<a-row :gutter="24"> <!-- <a-row :gutter="24">-->
<a-col :span="24"> <!-- <a-col :span="24">-->
<div class="box-title-text"> <!-- <div class="box-title-text">-->
<div class="title-text"> <!-- <div class="title-text">-->
<span class="title-text-text" :title="$t('remarks')">{{$t('remarks')}}</span> <!-- <span class="title-text-text" :title="$t('remarks')">{{$t('remarks')}}</span>-->
</div> <!-- </div>-->
<a-form-model-item class="itemModel-text" :prop="'remarks'"> <!-- <a-form-model-item class="itemModel-text" :prop="'remarks'">-->
<a-textarea <!-- <a-textarea-->
style="width: 100%" <!-- style="width: 100%"-->
:placeholder="$t('PleaseEnter')+$t('remarks')" <!-- :placeholder="$t('PleaseEnter')+$t('remarks')"-->
:disabled="false" <!-- :disabled="false"-->
v-model="formInline.remark" :rows="4"/> <!-- v-model="formInline.remark" :rows="4"/>-->
</a-form-model-item> <!-- </a-form-model-item>-->
</div> <!-- </div>-->
</a-col> <!-- </a-col>-->
</a-row> <!-- </a-row>-->
<div class="header-text"> <div class="header-text" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
&nbsp;{{$t('confirmationOfDesignConformity')}} &nbsp;{{$t('confirmationOfDesignConformity')}}
</div> </div>
<a-row :gutter="24"> <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -325,7 +335,6 @@
tree-node-filter-prop="title" tree-node-filter-prop="title"
v-model="formInline.designDeliverableType" v-model="formInline.designDeliverableType"
:maxTagCount="1" :maxTagCount="1"
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.designDeliverableType ? true : false"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input" class="box-input"
style="width: 100%" style="width: 100%"
@@ -349,7 +358,6 @@
</div> </div>
<a-form-model-item class="itemModel" prop="designDeliverableTemplate"> <a-form-model-item class="itemModel" prop="designDeliverableTemplate">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.designDeliverableType ? true : false"
@click="clickButtonToUpload('designDeliverableTemplate')"> @click="clickButtonToUpload('designDeliverableTemplate')">
{{ (formInline.designDeliverableTemplate === 'null' || formInline.designDeliverableTemplate === '' || {{ (formInline.designDeliverableTemplate === 'null' || formInline.designDeliverableTemplate === '' ||
formInline.designDeliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles') formInline.designDeliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
@@ -359,7 +367,11 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -368,7 +380,7 @@
</div> </div>
<a-form-model-item class="itemModel" prop="designInitiatorId"> <a-form-model-item class="itemModel" prop="designInitiatorId">
<a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')" <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"
:disabled="designInitiatorDisabled" :disabled="formInline.roleCodeIndex == 0 ? false : true"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input" class="box-input"
allowClear allowClear
@@ -398,7 +410,6 @@
</div> </div>
<a-form-model-item class="itemModel" prop="designDutyId"> <a-form-model-item class="itemModel" prop="designDutyId">
<a-select :placeholder="$t('PleaseSelect')+$t('personLiable')" <a-select :placeholder="$t('PleaseSelect')+$t('personLiable')"
:disabled="designDutyIdDisabled"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input" class="box-input"
allowClear allowClear
@@ -421,7 +432,11 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -435,13 +450,16 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode" :getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.designDueDate" v-model="formInline.designDueDate"
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.designDueDate ? true : false"
style="width: 100%"/> style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -452,16 +470,23 @@
<a-textarea <a-textarea
style="width: 100%" style="width: 100%"
:placeholder="$t('PleaseEnter')+$t('descriptionDeliverables')" :placeholder="$t('PleaseEnter')+$t('descriptionDeliverables')"
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.designRemark ? true : false"
v-model="formInline.designRemark" :rows="4"/> v-model="formInline.designRemark" :rows="4"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<div class="header-text"> <div class="header-text" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
&nbsp;{{$t('PrehomoConfirmation')}} &nbsp;{{$t('PrehomoConfirmation')}}
</div> </div>
<a-row :gutter="24"> <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -473,7 +498,6 @@
tree-node-filter-prop="title" tree-node-filter-prop="title"
v-model="formInline.prehomoDeliverableType" v-model="formInline.prehomoDeliverableType"
:maxTagCount="1" :maxTagCount="1"
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.prehomoDeliverableType ? true : false"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input" class="box-input"
style="width: 100%" style="width: 100%"
@@ -498,7 +522,6 @@
</div> </div>
<a-form-model-item class="itemModel" prop="prehomoDeliverableTemplate"> <a-form-model-item class="itemModel" prop="prehomoDeliverableTemplate">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.prehomoDeliverableType ? true : false"
@click="clickButtonToUpload('prehomoDeliverableTemplate')"> @click="clickButtonToUpload('prehomoDeliverableTemplate')">
{{ (formInline.prehomoDeliverableTemplate === 'null' || formInline.prehomoDeliverableTemplate === '' {{ (formInline.prehomoDeliverableTemplate === 'null' || formInline.prehomoDeliverableTemplate === ''
|| ||
@@ -509,7 +532,11 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -518,7 +545,7 @@
</div> </div>
<a-form-model-item class="itemModel" prop="prehomoInitiatorId"> <a-form-model-item class="itemModel" prop="prehomoInitiatorId">
<a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')" <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"
:disabled="prehomoInitiatorIdDisabled" :disabled="formInline.roleCodeIndex == 0 ? false : true"
class="box-input" class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear allowClear
@@ -551,7 +578,6 @@
class="box-input" class="box-input"
allowClear allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
:disabled="prehomoDutyIdDisabled"
v-model="formInline.prehomoDutyId"> v-model="formInline.prehomoDutyId">
<a-select-option v-for="(item, key) in prehomoDutyList" <a-select-option v-for="(item, key) in prehomoDutyList"
:key="key" :key="key"
@@ -571,7 +597,11 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -585,13 +615,16 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode" :getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.prehomoDueDate" v-model="formInline.prehomoDueDate"
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.prehomoDueDate ? true : false"
style="width: 100%"/> style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -602,16 +635,23 @@
<a-textarea <a-textarea
style="width: 100%" style="width: 100%"
:placeholder="$t('PleaseEnter')+$t('descriptionDeliverables')" :placeholder="$t('PleaseEnter')+$t('descriptionDeliverables')"
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.prehomoRemark ? true : false"
v-model="formInline.prehomoRemark" :rows="4"/> v-model="formInline.prehomoRemark" :rows="4"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<div class="header-text"> <div class="header-text" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
&nbsp;{{$t('verificationAndConformityconfirmation')}} &nbsp;{{$t('verificationAndConformityconfirmation')}}
</div> </div>
<a-row :gutter="24"> <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -623,7 +663,6 @@
tree-node-filter-prop="title" tree-node-filter-prop="title"
v-model="formInline.verifyDeliverableType" v-model="formInline.verifyDeliverableType"
:maxTagCount="1" :maxTagCount="1"
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.verifyDeliverableType ? true : false"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input" class="box-input"
style="width: 100%" style="width: 100%"
@@ -648,7 +687,6 @@
</div> </div>
<a-form-model-item class="itemModel" prop="verifyDeliverableTemplate"> <a-form-model-item class="itemModel" prop="verifyDeliverableTemplate">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.verifyDeliverableType ? true : false"
@click="clickButtonToUpload('verifyDeliverableTemplate')"> @click="clickButtonToUpload('verifyDeliverableTemplate')">
{{ (formInline.verifyDeliverableTemplate === 'null' || formInline.verifyDeliverableTemplate === '' || {{ (formInline.verifyDeliverableTemplate === 'null' || formInline.verifyDeliverableTemplate === '' ||
formInline.verifyDeliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles') formInline.verifyDeliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
@@ -658,7 +696,11 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -670,7 +712,7 @@
class="box-input" class="box-input"
allowClear allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
:disabled="verifyInitiatorIdDisabled" :disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.verifyInitiatorId"> v-model="formInline.verifyInitiatorId">
<a-select-option v-for="(item, key) in verifyInitiatorList" <a-select-option v-for="(item, key) in verifyInitiatorList"
:key="key" :key="key"
@@ -700,7 +742,6 @@
class="box-input" class="box-input"
allowClear allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
:disabled="verifyDutyIdDisabled"
v-model="formInline.verifyDutyId"> v-model="formInline.verifyDutyId">
<a-select-option v-for="(item, key) in verifyDutyList" <a-select-option v-for="(item, key) in verifyDutyList"
:key="key" :key="key"
@@ -720,7 +761,11 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -734,13 +779,16 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode" :getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.verifyDueDate" v-model="formInline.verifyDueDate"
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.verifyDueDate ? true : false"
style="width: 100%"/> style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -751,7 +799,6 @@
<a-textarea <a-textarea
style="width: 100%" style="width: 100%"
:placeholder="$t('PleaseEnter')+$t('descriptionDeliverables')" :placeholder="$t('PleaseEnter')+$t('descriptionDeliverables')"
:disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.verifyRemark ? true : false"
v-model="formInline.verifyRemark" :rows="4"/> v-model="formInline.verifyRemark" :rows="4"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -773,6 +820,7 @@
import { getAction, postAction, putAction } from '@/api/manage' import { getAction, postAction, putAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file' import uploadFile from '@/components/uploadFile/file'
import moment from 'moment' import moment from 'moment'
import { mapGetters } from 'vuex'
export default { export default {
name: 'listEditModel', name: 'listEditModel',
@@ -855,13 +903,16 @@
prehomoDutyIdDisabled: false, prehomoDutyIdDisabled: false,
verifyDutyIdDisabled: false, verifyDutyIdDisabled: false,
verifyInitiatorIdDisabled: false, verifyInitiatorIdDisabled: false,
DeliverableTreeList: [] DeliverableTreeList: [],
userInfoQuery:{},
} }
}, },
mounted() { mounted() {
this.getDeliverableTree() this.getDeliverableTree()
this.userInfoQuery = this.userInfo()
}, },
methods: { methods: {
...mapGetters(['userInfo']),
getDeliverableTree() { getDeliverableTree() {
getAction('/sys/category/getDeliverableTree', {}).then((res) => { getAction('/sys/category/getDeliverableTree', {}).then((res) => {
if (res.success) { if (res.success) {
@@ -908,36 +959,22 @@
}) })
}, },
getDis(val) { getDis(val) {
if (val.taskAffirmStatus != 'Not started' && !val.designInitiatorId) { if (val.taskAffirmStatus != 'Not started') {
this.designInitiatorDisabled = true this.designInitiatorDisabled = true
} else if (val.roleCode == 0) { } else if (val.roleCode == 0) {
this.designInitiatorDisabled = false this.designInitiatorDisabled = false
} else { } else {
this.designInitiatorDisabled = true this.designInitiatorDisabled = true
} }
if (val.taskAffirmStatus != 'Not started' && !val.designDutyId) { if (val.taskAffirmStatus != 'Not started') {
this.designDutyIdDisabled = true
} else if (val.roleCode == 0) {
this.designDutyIdDisabled = false
} else {
this.designDutyIdDisabled = true
}
if (val.taskAffirmStatus != 'Not started' && !val.prehomoInitiatorId) {
this.prehomoInitiatorIdDisabled = true this.prehomoInitiatorIdDisabled = true
} else if (val.roleCode == 0) { } else if (val.roleCode == 0) {
this.prehomoInitiatorIdDisabled = false this.prehomoInitiatorIdDisabled = false
} else { } else {
this.prehomoInitiatorIdDisabled = true this.prehomoInitiatorIdDisabled = true
} }
if (val.taskAffirmStatus != 'Not started' && !val.prehomoDutyId) {
this.prehomoDutyIdDisabled = true
} else if (val.roleCode == 0) {
this.prehomoDutyIdDisabled = false
} else {
this.prehomoDutyIdDisabled = true
}
if (val.taskAffirmStatus != 'Not started' && !val.verifyDutyId) { if (val.taskAffirmStatus != 'Not started') {
this.verifyDutyIdDisabled = true this.verifyDutyIdDisabled = true
} else if (val.roleCode == 0) { } else if (val.roleCode == 0) {
this.verifyDutyIdDisabled = false this.verifyDutyIdDisabled = false
@@ -945,13 +982,6 @@
this.verifyDutyIdDisabled = true this.verifyDutyIdDisabled = true
} }
if (val.taskAffirmStatus != 'Not started' && !val.verifyInitiatorId) {
this.verifyInitiatorIdDisabled = true
} else if (val.roleCode == 0) {
this.verifyInitiatorIdDisabled = false
} else {
this.verifyInitiatorIdDisabled = true
}
}, },
getProject(row, res, callback) { getProject(row, res, callback) {
//设计符合性确认-发起人 //设计符合性确认-发起人
@@ -161,7 +161,11 @@
> >
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<a class="text-operation" <a class="text-operation"
v-if="(record.inventoryAffirmStatus == 'List to confirm' && (record.roleCode == 1 || record.roleCode == 2 || record.roleCode == 4)) || record.roleCode == 0" v-if="(record.inventoryAffirmStatus == 'List to confirm' &&
((record.roleCode == 1 && !record.regulationOwnerSubmitStatus) ||
(record.roleCode == 2 && !record.homologationEngineerSubmitStatus) ||
(record.roleCode == 4 && !record.regulationOwnerSubmitStatus && !record.homologationEngineerSubmitStatus)))
|| record.roleCode == 0"
@click="edit(record)"> @click="edit(record)">
{{ $t('edit') }} {{ $t('edit') }}
</a> </a>
@@ -383,6 +387,7 @@
export default { export default {
name: 'listOfRegulations', name: 'listOfRegulations',
props:['areaOfResponsibilityList'],
components: { components: {
ImportFile, ImportFile,
listAddModel, listAddModel,
@@ -826,7 +831,61 @@
value: 'engineeringInterfacePerson', value: 'engineeringInterfacePerson',
valueName: 'engineeringInterfacePersonName', valueName: 'engineeringInterfacePersonName',
text: this.$t('engineeringInterfacePerson') text: this.$t('engineeringInterfacePerson')
} },
{
type: '',
value: 'inventoryAffirmStatus',
text: this.$t('listConfirmationStatus'),
options:[
{
value:'Not started',
key:'Not started',
label:this.$t('notLaunch'),
},
{
value:'List to confirm',
key:'List to confirm',
label:this.$t('toBeConfirmed'),
},
{
value:'Accepted',
key:'Accepted',
label:this.$t('accept'),
},
{
value:'Rejected',
key:'Rejected',
label:this.$t('refuse'),
},
],
},
{
type: '',
value: 'taskAffirmStatus',
text: this.$t('taskAffirmStatus'),
options:[
{
value:'Not started',
key:'Not started',
label:this.$t('notLaunch'),
},
{
value:'List to confirm',
key:'List to confirm',
label:this.$t('toBeConfirmed'),
},
{
value:'Accepted',
key:'Accepted',
label:this.$t('accept'),
},
{
value:'Rejected',
key:'Rejected',
label:this.$t('refuse'),
},
],
},
], ],
visibleRoleSwitching: false, visibleRoleSwitching: false,
confirmLoadingRoleSwitching: false, confirmLoadingRoleSwitching: false,
@@ -840,7 +899,9 @@
trigger: 'change' trigger: 'change'
} }
] ]
} },
detailedSuccessList: [],
detailedWarningList: []
} }
}, },
@@ -851,6 +912,9 @@
this.getRoleByUserId(() => { this.getRoleByUserId(() => {
this.getAndUserId() this.getAndUserId()
}) })
if (this.areaOfResponsibilityList && this.areaOfResponsibilityList.dutyTerritory) {
this.queryParam.dutyTerritory = this.areaOfResponsibilityList.dutyTerritory
}
// } else { // } else {
// this.isDisplay = false // this.isDisplay = false
// } // }
@@ -1195,6 +1259,16 @@
} }
}, },
edit(item) { edit(item) {
let roleCodeIndex
if (this.isDisplay) {
roleCodeIndex = 0
} else {
roleCodeIndex = 4
}
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') {
roleCodeIndex = 0
}
item.roleCodeIndex = roleCodeIndex
this.$refs.editModelRef.editModel(JSON.parse(JSON.stringify(item))) this.$refs.editModelRef.editModel(JSON.parse(JSON.stringify(item)))
}, },
deleteLib(val) { deleteLib(val) {
@@ -1279,28 +1353,41 @@
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue = true let isTrue = true
this.detailedSuccessList = []
this.detailedWarningList = []
for (let i = 0; i < this.dataSource.length; i++) { for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) { for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) { if (this.dataSource[i].id == selectedRowKeys[j]) {
if (this.dataSource[i].inventoryAffirmStatus == 'Not started' || this.dataSource[i].inventoryAffirmStatus == 'Rejected') { if (this.dataSource[i].inventoryAffirmStatus == 'Not started' || this.dataSource[i].inventoryAffirmStatus == 'Rejected') {
if (this.dataSource[i].homologationEngineerId && this.dataSource[i].regulationOwnerId) { if (this.dataSource[i].homologationEngineerId && this.dataSource[i].regulationOwnerId) {
isTrue = true this.detailedSuccessList.push(this.dataSource[i])
} else { } else {
this.$message.warning(this.dataSource[i].serialNumber + this.$t('TheEngineerAndCertification')) this.detailedWarningList.push( < div > { this.dataSource[i].serialNumber + this.$t('TheEngineerAndCertification') } < /div>)
isTrue = false // this.$message.warning(this.dataSource[i].serialNumber + this.$t('TheEngineerAndCertification'))
return // isTrue = false
// return
} }
} else { } else {
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected')) this.detailedWarningList.push( < div > {this.dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected')} < /div>)
isTrue = false // this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseSelectinitiatedOrRejected'))
return // isTrue = false
// return
} }
} }
} }
} }
if (isTrue) { if (this.detailedSuccessList && this.detailedSuccessList.length > 0) {
this.visible = true this.visible = true
this.formInline = {} this.formInline = {}
} else {
let that = this
this.$warning({
content: (
< div >
{ that.detailedWarningList }
< /div>
)
})
} }
} else { } else {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
@@ -1313,61 +1400,81 @@
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue = true let isTrue = true
this.TaskSuccessList = []
this.TaskWarningList = []
let dataList = []
for (let i = 0; i < this.dataSource.length; i++) { for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) { for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) { if (this.dataSource[i].id == selectedRowKeys[j]) {
if ((this.dataSource[i].taskAffirmStatus == 'Not started' || this.dataSource[i].taskAffirmStatus == 'Rejected') && dataList.push(this.dataSource[i])
this.dataSource[i].inventoryAffirmStatus == 'Accepted') {
if (this.dataSource[i].engineeringInterfacePerson) {
if (this.dataSource[i].verifyRemark) {
if (this.dataSource[i].verifyDueDate && this.dataSource[i].verifyDutyId
&& this.dataSource[i].verifyInitiatorId) {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConformityVerification'))
return
}
}
if (this.dataSource[i].prehomoRemark) {
if (this.dataSource[i].prehomoDueDate && this.dataSource[i].prehomoDutyId
&& this.dataSource[i].prehomoInitiatorId) {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConfirmedByPrehomo'))
return
}
}
if (this.dataSource[i].designRemark) {
if (this.dataSource[i].designDueDate && this.dataSource[i].designDutyId
&& this.dataSource[i].designInitiatorId) {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseDesignConformityConfirmation'))
return
}
}
} else {
isTrue = false
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('theProjectContactEmpty'))
return
}
} else {
isTrue = false
this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('PleaseTaskConfirmationRejected'))
return
}
} }
} }
} }
if (isTrue) { for (let i = 0; i < dataList.length; i++) {
if ((dataList[i].taskAffirmStatus == 'Not started' || dataList.taskAffirmStatus == 'Rejected') &&
dataList[i].inventoryAffirmStatus == 'Accepted') {
if (dataList[i].engineeringInterfacePerson) {
if (dataList[i].verifyDeliverableType) {
if (dataList[i].verifyDueDate && dataList[i].verifyDutyId
&& dataList[i].verifyInitiatorId) {
} else {
this.TaskWarningList.push( < div > { dataList[i].serialNumber + this.$t('pleaseConformityVerification') } < /div>)
continue
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConformityVerification'))
// return
}
}
if (dataList[i].prehomoDeliverableType) {
if (dataList[i].prehomoDueDate && dataList[i].prehomoDutyId
&& dataList[i].prehomoInitiatorId) {
} else {
this.TaskWarningList.push( < div > { dataList[i].serialNumber + this.$t('pleaseConfirmedByPrehomo') } < /div>)
continue
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseConfirmedByPrehomo'))
// return
}
}
if (dataList[i].designDeliverableType) {
if (dataList[i].designDueDate && dataList[i].designDutyId
&& dataList[i].designInitiatorId) {
} else {
this.TaskWarningList.push( < div > { dataList[i].serialNumber + this.$t('pleaseDesignConformityConfirmation') } < /div>)
continue
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('pleaseDesignConformityConfirmation'))
// return
}
}
this.TaskSuccessList.push(dataList[i])
} else {
this.TaskWarningList.push( < div > { dataList[i].serialNumber + this.$t('theProjectContactEmpty') } < /div>)
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('theProjectContactEmpty'))
// return
}
} else {
this.TaskWarningList.push( < div > { dataList[i].serialNumber + this.$t('PleaseTaskConfirmationRejected') } < /div>)
// isTrue = false
// this.$message.warning(this.dataSource[i].serialNumber + ',' + this.$t('PleaseTaskConfirmationRejected'))
// return
}
}
if (this.TaskSuccessList && this.TaskSuccessList.length > 0) {
this.visible = true this.visible = true
this.formInline = {} this.formInline = {}
} else {
let that = this
this.$warning({
content: (
< div >
{ that.TaskWarningList }
< /div>
)
})
} }
} else { } else {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
@@ -1377,8 +1484,11 @@
handleOk() { handleOk() {
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
if (this.timeName == '清单') { if (this.timeName == '清单') {
let selectedRowKeys = []
this.detailedSuccessList.forEach(res => {
selectedRowKeys.push(res.id)
})
let query = { let query = {
operatorType: 0, operatorType: 0,
ids: selectedRowKeys.join(','), ids: selectedRowKeys.join(','),
@@ -1397,26 +1507,34 @@
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false this.confirmLoading = false
} }
let that = this
if (this.detailedWarningList.length > 0) {
this.$warning({
content: (
< div >
{ that.detailedWarningList }
< /div>
)
})
}
this.detailedSuccessList = []
this.detailedWarningList = []
}) })
} else { } else {
let index = 0 for (let i = 0; i < this.TaskSuccessList.length; i++) {
for (let i = 0; i < this.dataSource.length; i++) { ((i) => {
for (let j = 0; j < selectedRowKeys.length; j++) { this.TaskSuccessList[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
if (this.dataSource[i].id == selectedRowKeys[j]) { Object.keys(this.TaskSuccessList[i]).forEach(res => {
index++ if (this.TaskSuccessList[i][res] && this.TaskSuccessList[i][res] instanceof String) {
this.dataSource[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\"/g, '“')
Object.keys(this.dataSource[i]).forEach(res => { this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\'/g, '')
if (this.dataSource[i][res] && this.dataSource[i][res] instanceof String) { }
this.dataSource[i][res] = this.dataSource[i][res].replace(/\"/g, '“') })
this.dataSource[i][res] = this.dataSource[i][res].replace(/\'/g, '') setTimeout(() => {
} this.confirmLoading = true
}) this.startProcess(this.TaskSuccessList[i], (i + 1))
setTimeout(() => { }, 500)
this.confirmLoading = true })(i)
this.startProcess(this.dataSource[i], index)
}, 500)
}
}
} }
} }
} }
@@ -1449,12 +1567,22 @@
} }
postAction('/workFlow/completeTask', query).then((res) => { postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) { if (res.success) {
if (index == this.selectedRowKeys.length) { if (index == this.TaskSuccessList.length) {
this.visible = false this.visible = false
this.selectedRowKeys = [] this.selectedRowKeys = []
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.confirmLoading = false this.confirmLoading = false
this.getList() this.getList()
let that = this
if (this.TaskWarningList.length > 0) {
this.$warning({
content: (
< div >
{ that.TaskWarningList }
< /div>
)
})
}
} }
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
@@ -98,6 +98,9 @@
this.visible = false this.visible = false
}, },
areaOfResponsibilityClick(item) { areaOfResponsibilityClick(item) {
if (this.queryParam.operatorType == 'queryListingToConfirmStatistics' || this.queryParam.operatorType == 'queryTaskToConfirmStatistics'){
item.isListing = '1'
}
this.$emit('responsibility', item) this.$emit('responsibility', item)
} }
} }