Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

# Conflicts:
#	jero-web/src/common/lang/en-us.js
#	jero-web/src/common/lang/zh-cn.js
This commit is contained in:
zyx.net
2023-03-08 17:45:08 +08:00
26 changed files with 2394 additions and 98 deletions
@@ -293,4 +293,10 @@ ALTER TABLE `project_library_role_rel`
ADD COLUMN `model_type` varchar(64) NULL COMMENT '模块类型,对应系统中枚举类 RoleRelModelTypeEnum ' AFTER `role_code`;
-- 初始化历史数据
update project_library_role_rel set model_type = 'Laws inventory'
update project_library_role_rel set model_type = 'Laws inventory';
-- 项目库-认证清单表-增加认证进度备注 2023-03-08 未同步生产环境
ALTER TABLE `project_certification_inventory`
ADD COLUMN `certification_progress_remark` varchar(2000) NULL COMMENT '认证进度备注' AFTER `certification_progress`;
-- 将之前的任务清单-认证进度,修改为 认证清单-认证进度 2023-03-08 未同步生产环境
UPDATE `sys_dict` SET `dict_name` = '认证清单-认证进度', `description` = '认证清单-认证进度' WHERE `id` = '1524311122804346881';
@@ -37,12 +37,12 @@ public enum EvaluationTypeEnum {
public static String getTextByValue(String value,String cut) {
EvaluationTypeEnum[] values = values();
for (EvaluationTypeEnum certificationProgressEnum : values) {
if (certificationProgressEnum.value.equals(value)) {
for (EvaluationTypeEnum evaluationTypeEnum : values) {
if (evaluationTypeEnum.value.equals(value)) {
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
return certificationProgressEnum.name;
return evaluationTypeEnum.name;
}else {
return certificationProgressEnum.value;
return evaluationTypeEnum.value;
}
}
}
@@ -213,4 +213,11 @@ public class ProjectCertificationInventoryEOController extends JeroController<Pr
public Result<?> submitTask(@RequestBody JSONObject json) {
return this.projectCertificationInventoryEOService.submitTask(json);
}
@AutoLog(value = "项目库-认证清单表-批量保存")
@ApiOperation(value="项目库-认证清单表-批量保存", notes="项目库-认证清单表-批量保存")
@PostMapping(value = "/saveBatch")
public Result<?> saveBatch(@RequestBody JSONObject json) {
return this.projectCertificationInventoryEOService.saveBatch(json);
}
}
@@ -174,6 +174,14 @@ public class ProjectCertificationInventoryEO implements Serializable {
@ApiModelProperty(value = "认证进度")
private java.lang.String certificationProgress;
/**认证进度展示名称**/
@TableField(exist = false)
private String certificationProgress_dictText;
@Excel(name = "认证进度备注", width = 15)
@ApiModelProperty(value = "认证进度备注")
private String certificationProgressRemark;
/**项目库id*/
@ApiModelProperty(value = "项目库id")
private String projectLibraryId;
@@ -12,6 +12,7 @@ public enum CertificationFlowNodeEnum {
RZGCSJSRW ("rzgcsjsrw","认证工程师接受任务","Certified engineers accept tasks"),
RZGCSTHRW ("rzgcsthrw","认证工程师退回至studio任务","Certified engineer returns to studio task"),
ZRRJSRW ("zrrjsrw","责任人接受任务","The responsible person accepts the task"),
ZRRJJRW ("zrrjjrw","责任人拒绝任务","The person in charge refused the assignment"),
ZRRTJRW ("zrrtjrw","责任人提交任务","The responsible person submits the task"),
RZGCSSC ("rzgcssc","认证工程师审查","Certified engineer review"),
;
@@ -102,7 +102,7 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
void addProcessInfoEO(ProcessInfoEO processInfoEO, String projectLibraryId);
void addProcessInfoDetailEO(List<ProcessInfoDetailEO> processInfoDetailEOList, ProcessInfoEO processInfoEO);
void addProcessInfoDetailEO(List<ProcessInfoDetailEO> processInfoDetailEOList, String processInfoId, String taskDefinitionKey);
Result<List<SysRole>> getRoleByUserId(Map<String, Object> params);
@@ -128,4 +128,11 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
* @return
*/
Result<?> certificationInitiatingTask(JSONObject json);
/**
* 批量保存
* @param projectCertificationInventoryEOList
* @return
*/
Result<?> saveBatch(JSONObject json);
}
@@ -3,6 +3,7 @@ package com.jero.modules.project.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result;
@@ -209,6 +210,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if (CollectionUtils.isNotEmpty(datas)) {
List<SysCategory> categoryList = this.sysCategoryService.list();
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.getBaseMapper().selectItemsAll();
List<SysDictItem> certificationProgress = this.sysDictItemServiceImpl.selectItemsByDictCode("certification_progress");
List<String> userIdList = new ArrayList<>();
@@ -248,6 +250,20 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
String dutyTerritoryName = this.sysDictItemService.disposeShowDictItemValue(sysDictItems,data.getDutyTerritory(),cut, ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
data.setDutyTerritoryName(dutyTerritoryName);
}
if(StringUtils.isNotEmpty(data.getCertificationProgress())){
String certificationProgress_dictText = "";
List<SysDictItem> collect = certificationProgress.stream()
.filter(dict -> StringUtils.equals(dict.getItemValue(), data.getCertificationProgress()))
.collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(collect)){
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
certificationProgress_dictText = collect.get(0).getItemText();
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
certificationProgress_dictText = collect.get(0).getEnName();
}
}
data.setCertificationProgress_dictText(certificationProgress_dictText);
}
}
}
}
@@ -288,14 +304,18 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
List<String> idList = Arrays.asList(ids.split(","));
List<String> flowStatusList = new ArrayList<>();
flowStatusList.add(CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
flowStatusList.add(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue());
// 根据页面选择的认证清单数据id,查询出状态为’清单待发布‘的数据,进行发布处理
QueryWrapper<ProjectCertificationInventoryEO> certificationQueryWrap = new QueryWrapper<>();
certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getId,idList);
certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(certificationQueryWrap);
if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){
throw new JeroBootException("无法获取要发布的数据,请重新选择");
throw new JeroBootException("至少选择一条数据流程状态为'清单待发布 或 认证退回'的数据");
}
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
@@ -322,17 +342,24 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(userId);
processInfoDetailEO.setTaskDefinitionKey(CertificationFlowNodeEnum.RZGCSJSRW.getKey());
processInfoDetailEO.setEndTime(DateUtils.str2Date(endTime,DateUtils.date_sdf.get()));
processInfoDetailEO.setCreateTime(new Date());
processInfoDetailEO.setStatus(TaskStatusEnum.NOT_DONE.getValue());
processInfoDetailEO.setProcessInfoId(projectLibraryId);
processInfoDetailEO.setActiProcInstId(projectLibraryId);
processInfoDetailEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
processInfoDetailEOList.add(processInfoDetailEO);
}
ProcessInfoEO processInfoEO = new ProcessInfoEO();
this.addProcessInfoEO(processInfoEO,projectLibraryId);
this.addProcessInfoDetailEO(processInfoDetailEOList,processInfoEO);
// 删除该项目数据的待办任务,key为 认证工程师接受任务的数据
QueryWrapper<ProcessInfoDetailEO> deleteDetailWrap = new QueryWrapper<>();
deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoEO.getId());
deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey());
deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getFlowType,FlowTypeEnum.CERTIFICATION_LC.getValue());
this.processInfoDetailEOService.remove(deleteDetailWrap);
this.processInfoDetailEOService.saveBatch(processInfoDetailEOList);
this.updateBatchById(projectCertificationInventoryEOList);
return Result.OK("发布成功!");
}
@@ -349,7 +376,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
processInfoEO.setProjectLibraryId(projectLibraryId);
processInfoEO.setActiProcInstId(projectLibraryId);
processInfoEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
processInfoEO.setStatus(TodoCenterStatusEnum.LIST_TO_CONFIRM.getValue());
// processInfoEO.setStatus(TodoCenterStatusEnum.LIST_TO_CONFIRM.getValue());
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
processInfoEO.setCreateBy(currentUser.getId());
QueryWrapper<ProcessInfoEO> deleteWrap = new QueryWrapper<>();
deleteWrap.lambda().eq(ProcessInfoEO::getId,projectLibraryId);
@@ -360,19 +390,28 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
/**
* 添加流程信息,用户的待办信息。
* @param processInfoDetailEOList
* @param processInfoEO
* @param processInfoId
*/
@Override
public void addProcessInfoDetailEO(List<ProcessInfoDetailEO> processInfoDetailEOList,ProcessInfoEO processInfoEO){
public void addProcessInfoDetailEO(List<ProcessInfoDetailEO> processInfoDetailEOList,String processInfoId,String taskDefinitionKey){
processInfoDetailEOList.forEach(detail -> {
detail.setActiProcInstId(processInfoId);
detail.setProcessInfoId(processInfoId);
detail.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
detail.setTaskDefinitionKey(taskDefinitionKey);
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
detail.setCreateTime(new Date());
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
});
// 删除该项目数据的待办任务,key为 认证工程师接受任务的数据
QueryWrapper<ProcessInfoDetailEO> deleteDetailWrap = new QueryWrapper<>();
deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoEO.getId());
deleteDetailWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey());
this.processInfoDetailEOService.remove(deleteDetailWrap);
List<String> userIdList = processInfoDetailEOList.stream().map(ProcessInfoDetailEO::getUserId).distinct().collect(Collectors.toList());
QueryWrapper<ProcessInfoDetailEO> removeWrap = new QueryWrapper<>();
removeWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoId);
removeWrap.lambda().in(ProcessInfoDetailEO::getUserId,userIdList);
removeWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,taskDefinitionKey);
// 删除用户在这个认证清单流程中其它的待办任务
this.processInfoDetailEOService.remove(removeWrap);
this.processInfoDetailEOService.saveBatch(processInfoDetailEOList);
}
@@ -619,6 +658,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
@Override
public Result<?> submitTask(JSONObject json) {
if (!json.containsKey("nodeKey")) {
throw new JeroBootException("nodeKey不能为空,请联系管理员!");
}
String nodeKey = json.getString("nodeKey");
CertificationFlowNodeEnum flowNodeEnum = CertificationFlowNodeEnum.getEnumByKey(nodeKey);
@@ -626,12 +669,19 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
throw new JeroBootException("根据" + nodeKey + " 的操作节点没有获取到节点信息,请联系管理员!");
}
String projectLibraryId = json.getString("projectLibraryId");
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.getBaseMapper().selectById(projectLibraryId);
if(ObjectUtils.isEmpty(projectLibraryBase)){
throw new JeroBootException("无法获取项目库信息,项目库id为:" + projectLibraryId + " 请联系管理员!");
}
json.put("projectLibraryBase",projectLibraryBase);
switch (flowNodeEnum){
case RZGCSJSRW:
return this.certificationInitiatingTask(json);
case RZGCSTHRW:
break;
return this.certificationReturnedStudioTask(json);
case ZRRJSRW:
break;
@@ -648,6 +698,72 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
return Result.OK("提交任务成功!");
}
private Result<?> certificationReturnedStudioTask(JSONObject json) {
String ids = json.getString("ids");
if(StringUtils.isEmpty(ids)){
throw new JeroBootException("至少选择一条数据进行操作!");
}
List<String> idList = Arrays.asList(ids.split(","));
List<String> flowStatusList = new ArrayList<>();
flowStatusList.add(CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
flowStatusList.add(CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue());
QueryWrapper<ProjectCertificationInventoryEO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().in(ProjectCertificationInventoryEO::getId,idList);
queryWrapper.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(queryWrapper);
if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){
throw new JeroBootException("至少选择一条数据流程状态为'清单待校核 或 责任人拒绝的数据'!");
}
ProjectLibraryBase projectLibraryBase = JSONObject.parseObject(JSONObject.toJSONString(json.get("projectLibraryBase")), ProjectLibraryBase.class);
if (StringUtils.isEmpty(projectLibraryBase.getStudioEngineer())) {
throw new JeroBootException("该项目的studio为空,请维护studio后再进行退回操作!");
}
// 给studio分配待办中心任务
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(projectLibraryBase.getStudioEngineer());
processInfoDetailEOList.add(processInfoDetailEO);
this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.STUDIOFQ.getKey());
try {
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue());
}
// 认证工程师发起任务,将数据的状态更新为 任务待确认。
this.updateBatchById(projectCertificationInventoryEOList);
// 更新该项目认证流程中,认证工程师的任务状态。
QueryWrapper<ProjectCertificationInventoryEO> queryCountWrap = new QueryWrapper<>();
queryCountWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectLibraryBase.getId());
queryCountWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
int notDoneCount = this.count(queryCountWrap);
// 如果还有 清单待校核、责任人拒绝 状态的数据,不做操作,如果没有 将这个项目认证流程的所有认证工程师待办任务转为已办
if(notDoneCount == 0){
QueryWrapper<ProcessInfoDetailEO> detailQueryWrapper = new QueryWrapper<>();
detailQueryWrapper.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId());
detailQueryWrapper.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey());
List<ProcessInfoDetailEO> detailEOList = this.processInfoDetailEOService.list(detailQueryWrapper);
for (ProcessInfoDetailEO detailEO : detailEOList) {
detailEO.setStatus(TaskStatusEnum.HAVE_DONE.getValue());
}
this.processInfoDetailEOService.updateBatchById(detailEOList);
}
}catch (Exception ex){
ex.printStackTrace();
log.error("认证工程师-退回认证清单任务失败:" + ex.getMessage());
throw new JeroBootException("退回任务失败!");
}
return Result.OK("退回任务成功!");
}
/**
* 认证工程师发起任务
* @param json
@@ -674,12 +790,47 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
throw new JeroBootException("至少选择一条数据流程状态为'清单待校核 或 责任人拒绝的数据'!");
}
ProjectLibraryBase projectLibraryBase = JSONObject.parseObject(JSONObject.toJSONString(json.get("projectLibraryBase")), ProjectLibraryBase.class);
if (ObjectUtils.isEmpty(projectLibraryBase)) {
throw new JeroBootException("无法获取项目库信息");
}
try {
// 给责任人分配待办中心的任务
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue());
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(projectCertificationInventoryEO.getDutyPerson());
processInfoDetailEO.setEndTime(projectCertificationInventoryEO.getEndTime());
processInfoDetailEO.setProjectLawsInventoryId(projectCertificationInventoryEO.getId());
processInfoDetailEOList.add(processInfoDetailEO);
}
this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.ZRRJSRW.getKey());
// 认证工程师发起任务,将数据的状态更新为 任务待确认。
this.updateBatchById(projectCertificationInventoryEOList);
// 更新该项目认证流程中,认证工程师的任务状态。
QueryWrapper<ProjectCertificationInventoryEO> queryCountWrap = new QueryWrapper<>();
queryCountWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectLibraryBase.getId());
queryCountWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
int notDoneCount = this.count(queryCountWrap);
// 如果还有 清单待校核、责任人拒绝 状态的数据,不做操作,如果没有 将这个项目认证流程的所有认证工程师待办任务转为已办
if(notDoneCount == 0){
QueryWrapper<ProcessInfoDetailEO> detailQueryWrapper = new QueryWrapper<>();
detailQueryWrapper.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId());
detailQueryWrapper.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey());
List<ProcessInfoDetailEO> detailEOList = this.processInfoDetailEOService.list(detailQueryWrapper);
for (ProcessInfoDetailEO processInfoDetailEO : detailEOList) {
processInfoDetailEO.setStatus(TaskStatusEnum.HAVE_DONE.getValue());
}
this.processInfoDetailEOService.updateBatchById(detailEOList);
}
}catch (Exception ex){
ex.printStackTrace();
log.error("认证工程师-发起认证清单任务失败:" + ex.getMessage());
@@ -689,4 +840,23 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
return Result.OK("发起任务成功!");
}
@Override
public Result<?> saveBatch(JSONObject json) {
if (!json.containsKey("dataList")) {
throw new JeroBootException("无法获取需要保存的数据,请检查!");
}
JSONArray dataList = json.getJSONArray("dataList");
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = new ArrayList<>();
ProjectCertificationInventoryEO projectCertificationInventoryEO = null;
for (Object data : dataList) {
projectCertificationInventoryEO = JSONObject.parseObject(JSONObject.toJSONString(data),ProjectCertificationInventoryEO.class);
projectCertificationInventoryEOList.add(projectCertificationInventoryEO);
}
if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){
throw new JeroBootException("无法获取需要保存的数据,请检查!");
}
this.updateBatchById(projectCertificationInventoryEOList);
return Result.OK("保存成功!");
}
}
@@ -9377,15 +9377,50 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if((StringUtils.isNotBlank(certificationEngineerName) && certificationEngineerName.contains(loginUser.getUsername()))
|| lawEngineerNameList.contains(loginUser.getUsername())){
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_ENGINEER.getValue());
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getName());
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_ENGINEER.getName());
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getCode());
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_ENGINEER.getCode());
}
sysRoles.add(sysRole);
}
List<String> certificationEngineerList = new ArrayList<>();
if(projectRelatedPersonnels.size() != 0){
for(ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnels){
String certificationEngineerName1 = projectRelatedPersonnel.getCertificationEngineerName();
if(StringUtils.isNotBlank(certificationEngineerName1)){
certificationEngineerName1 = certificationEngineerName1.replaceAll(" ","");
certificationEngineerList.addAll(Arrays.asList(certificationEngineerName1.split(",")));
}
}
}
if((StringUtils.isNotBlank(certificationEngineerName) && certificationEngineerName.contains(loginUser.getUsername()))
|| certificationEngineerList.contains(loginUser.getUsername())){
SysRole sysRole = new SysRole();
sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue());
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getName());
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getCode());
}
sysRoles.add(sysRole);
}
// if((StringUtils.isNotBlank(certificationEngineerName) && certificationEngineerName.contains(loginUser.getUsername()))
// || lawEngineerNameList.contains(loginUser.getUsername())){
// SysRole sysRole = new SysRole();
// sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue());
// 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);
//
// }
List<SysRole> roleList = sysRoleMapper.getRoleByUserId(loginUser.getId());
//studio角色,法规工程师/认证工程师,领导角色,管理员角色,Viewer
@@ -172,13 +172,41 @@
'' as title_en,
pi.flow_type,
pi.create_by,
(
<!--(
select
pid.end_time
from
process_info_detail pid
where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' order by pid.end_time asc limit 1
) as end_time,
) as end_time,-->
(
case when flow_type = '21' then
(
SELECT
pci.end_time
FROM
project_certification_inventory pci
WHERE
pci.project_library_id = pi.id
AND ( pci.flow_status = 'List to be checked' OR pci.flow_status = 'Refusal of responsible person' )
ORDER BY
pci.end_time ASC
LIMIT 1
)
when flow_type = '10' then
(
SELECT
pid.end_time
FROM
process_info_detail pid
WHERE
pid.process_info_id = pi.id
AND pid.STATUS = 'NotDone'
ORDER BY
pid.end_time ASC
LIMIT 1
) end
)AS end_time,
pi.STATUS,
pi.prc_num,
pi.prc_name,
@@ -203,7 +231,10 @@
where pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
)
)
AND pi.flow_type = #{params.qdqrFlowTypeValue}
AND pi.flow_type IN
<foreach collection="params.qdqrFlowTypeValue" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
)temp
<include refid="BaseQuerySql"/>
order by temp.end_time asc
@@ -39,6 +39,7 @@ import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import com.jero.modules.wkflow.feginClient.impl.WorkFlowFeignClientImpl;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -199,11 +200,16 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
flowTypeList.add(FlowTypeEnum.RWQRLC.getValue());
flowTypeList.add(FlowTypeEnum.SJFHXSHLC.getValue());
flowTypeList.add(FlowTypeEnum.YZFHXSCLC.getValue());
flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue());
// 2023-03-08 去掉原来的Pre-Homo
// flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue());
params.put("flowTypeList",flowTypeList);
params.put("taskStatus", TaskStatusEnum.NOT_DONE.getValue());
params.put("currentUserId",currentUser.getId());
params.put("qdqrFlowTypeValue",FlowTypeEnum.QDQR.getValue());
List<String> qdqrFlowTypeValue = new ArrayList<>();
qdqrFlowTypeValue.add(FlowTypeEnum.QDQR.getValue());
qdqrFlowTypeValue.add(FlowTypeEnum.CERTIFICATION_LC.getValue());
params.put("qdqrFlowTypeValue",qdqrFlowTypeValue);
IPage page = new Page(pageNo, pageSize);
IPage<ProcessInfoVO> result = this.baseMapper.queryProjectProcessTodoTaskListList(page,params);
@@ -304,7 +310,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
List<String> flowTypeList = new ArrayList<>();
flowTypeList.add(FlowTypeEnum.RWQRLC.getValue());
flowTypeList.add(FlowTypeEnum.SJFHXSHLC.getValue());
flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue());
// flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue());
flowTypeList.add(FlowTypeEnum.YZFHXSCLC.getValue());
//根据法规清单id,查询待办中心数据
@@ -396,7 +402,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
flowTypeList.add(FlowTypeEnum.RWQRLC.getValue());
flowTypeList.add(FlowTypeEnum.SJFHXSHLC.getValue());
flowTypeList.add(FlowTypeEnum.YZFHXSCLC.getValue());
flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue());
// flowTypeList.add(FlowTypeEnum.PREHOMOQRLC.getValue());
}
/**
@@ -567,13 +573,15 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
//判断当前任务是否过期
Date endTime = data.getEndTime();
try {
endTime = sdf.parse(sdf.format(endTime));
} catch (ParseException e) {
e.printStackTrace();
}
if(finalCurrentDate.after(endTime) || finalCurrentDate.equals(endTime)){
data.setEndTimePastDueFlag(true);
if(ObjectUtils.isNotEmpty(endTime)){
try {
endTime = sdf.parse(sdf.format(endTime));
} catch (ParseException e) {
e.printStackTrace();
}
if(finalCurrentDate.after(endTime) || finalCurrentDate.equals(endTime)){
data.setEndTimePastDueFlag(true);
}
}
});
+10
View File
@@ -894,7 +894,9 @@ module.exports = {
pleaseConfirmedByPrehomo: 'Please complete the data confirmed by Pre-Homo',
pleaseConformityVerification: 'Please complete the data of Conformity verification',
virtualListDetails: 'Virtual List Details',
virtualAuthenticationListDetails: 'Virtual Authentication List Details',
maintainVirtualList: 'Maintain Virtual List',
certificationListMaintenance: 'Certification List Maintenance',
reasonsForRejection: 'Reasons For Rejection',
inconformity: 'Non-Compliance',
toTrack: 'To be tracked',
@@ -1406,4 +1408,12 @@ module.exports = {
initiateTask:'Initiate a Task',
compliancereport:'Generate compliance report',
todocenter:'To-do center',
areYouReturnToStudio:'Are you sure to return to studio?',
confirmLaunchTask:'Confirm launch task ?',
conditionsNotMet:'Conditions not met',
onlyProcessStatusReturned:'Only the data whose process status is list to be checked and rejected by the responsible person can be returned',
onlyProcessReturned:'Only data with process status of list to be checked and rejected by responsible person can be initiated',
confirmToAcceptTheTask:'Confirm to accept the task ?',
confirmRejectTask:'Confirm Reject Task ?',
onlyDataStatusConfirmedSelected:'Only data with process status of task to be confirmed can be selected',
}
+10
View File
@@ -906,7 +906,9 @@ module.exports = {
pleaseConfirmedByPrehomo: '请补全 Pre-Homo确认的数据',
pleaseConformityVerification: '请补全验证符合性确认的数据',
virtualListDetails: '虚拟清单详情',
virtualAuthenticationListDetails: '虚拟认证清单详情',
maintainVirtualList: '维护虚拟清单',
certificationListMaintenance: '认证清单维护',
reasonsForRejection: '驳回原因',
inconformity: '不符合',
toTrack: '待追踪',
@@ -1505,6 +1507,14 @@ module.exports = {
missionRejection:'任务拒绝',
turnToDo:'转办',
initiateTask:'发起任务',
areYouReturnToStudio:'确认退回至studio吗?',
confirmLaunchTask:'确认发起任务?',
conditionsNotMet:'不满足条件',
onlyProcessStatusReturned:'只能退回流程状态为清单待校核和责任人拒绝的数据',
onlyProcessReturned:'只能发起流程状态为清单待校核和责任人拒绝的数据',
confirmToAcceptTheTask:'确认接受任务?',
confirmRejectTask:'确认拒绝任务?',
onlyDataStatusConfirmedSelected:'只能选择流程状态为任务待确认的数据',
compliancereport:'生成合规报告',
todocenter:'待办中心',
}
+5
View File
@@ -332,6 +332,11 @@ export const constantRouterMap = [
name: 'virtualListDetails',
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTools/virtualList/components/virtualListDetails')
},
{
path: '/certificationListMaintenance',
name: 'certificationListMaintenance',
component: () => import(/* webpackChunkName: "user" */ '@/views/virtualAuthenticationList/virtualAuthenticationListDesign/certificationListMaintenance')
},
{
path: '/ProjectDetails',
name: 'ProjectDetails',
@@ -248,6 +248,9 @@
} else if (this.$route.query.type == '105') {
this.textColor(this.$t('TaskParameterCollection'))
this.textTitle = this.$t('TaskParameterCollection')
}else if (this.$route.query.type == '106') {
this.textColor(this.$t('certificationList'))
this.textTitle = this.$t('certificationList')
}
} else {
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
@@ -183,7 +183,8 @@
studioList: [],
disabled: false,
url: {
edit: '/project/projectTaskInventoryEO/edit',
// edit: '/project/projectTaskInventoryEO/edit',
edit: '/project/projectCertificationInventoryEO/edit',
addOrUpdate: '/project/projectTaskInventoryConditionAssessmentEO/addOrUpdate',
list: '/project/projectTaskInventoryConditionAssessmentEO/list'
}
@@ -496,6 +496,9 @@
this.formInline = {}
this.visible = true
this.formInline = value
if (this.formInline.deliverableType) {
this.formInline.deliverableType = this.formInline.deliverableType.split(',')
}
this.getRegulationNo()
this.title = this.$t('edit')
this.$nextTick(() => {
@@ -1,7 +1,7 @@
<template>
<a-modal
:title="$t('batSetting')"
:width="1000"
:title="name"
:width="name == $t('changeSetting') ? 600 : 1000"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@@ -10,7 +10,8 @@
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<a-col :span="name == $t('changeSetting') ? 24 : 12"
v-if="name == $t('BatchSetting') || name == $t('changeSetting')">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('configurationItem')">{{$t('configurationItem')}}</span>
@@ -32,7 +33,7 @@
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<a-col :span="12" v-if="name == $t('BatchSetting')">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
@@ -47,7 +48,7 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="name == $t('BatchSetting')">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -86,7 +87,7 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="name == $t('BatchSetting')">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -122,7 +123,7 @@
export default {
name: 'batSetting',
props: ['url'],
components:{
components: {
PersonnelSelection
},
data() {
@@ -132,26 +133,28 @@
formInline: {},
rules: {},
ids: [],
configurationItemList:[],
engineeringInterfacePersonList:[],
typeOfDeliverablesList:[],
configurationItemList: [],
engineeringInterfacePersonList: [],
typeOfDeliverablesList: [],
name: ''
}
},
mounted() {
},
methods: {
edit(data) {
edit(data, name) {
this.visible = true
this.$nextTick(() => {
this.ids = data || []
this.formInline = {}
this.name = name
})
},
handleOk() {
// if (this.formInline.dutyTerritory) {
// this.handleOkTwo()
// } else {
this.handleOkOne()
this.handleOkOne()
// }
},
PersonnelSelectionChange(value, id) {
@@ -0,0 +1,252 @@
<template>
<a-drawer
:title="$t('referenceDeliverables')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('entryName')">
<span>{{$t('entryName')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('entryName')"
v-model="queryParam.projectName"></a-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="12" :sm="24">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<a-table
:columns="columns"
rowKey="id"
:scroll="{x: '100%',y:600}"
:data-source="dataList"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:' ' , type:'radio'}"
:loading="loading">
</a-table>
<div class="page" v-if="dataList.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
<div class="drawer-bootom-button">
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit(undefined)" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
export default {
name: 'referenceDeliverablesList',
components: {},
props: ['url'],
data() {
return {
visible: false,
queryParam: {},
confirmLoading: false,
selectedRowKeys: [],
columns: [
{
title: this.$t('entryName'),
dataIndex: 'projectName',
align: 'left',
ellipsis: true,
width: 223
},
{
title: 'Studio',
dataIndex: 'studioEngineerName',
align: 'left',
ellipsis: true,
width: 223
},
],
dataList: [],
content: [],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0
}
},
mounted() {
},
methods: {
transferModel() {
this.visible = true
this.queryParam = {}
this.selectedRowKeys = []
this.replacePage()
},
searchQuery() {
this.pageNo = 1
this.replacePage()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.replacePage()
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.replacePage()
},
replacePage() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam
}
this.loading = true
postAction('project/projectLibraryBase/page', query).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
onSelectChange(value) {
this.selectedRowKeys = value
if (this.selectedRowKeys.length > 1) {
this.selectedRowKeys.shift()
}
},
handleCancel() {
this.visible = false
this.$emit('visible')
},
handleSubmit(flag) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.confirmLoading = true
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.confirmLoading = false
this.$emit('transferListForm',selectedRowKeys.join(','))
this.selectedRowKeys = []
// postAction('project/projectLawsInventoryEO/add', {
// dummyInventoryBaseId: selectedRowKeys.join(','),
// projectLibraryId: this.$route.query.id,
// flag: flag
// }).then((res) => {
// if (res.success) {
// this.confirmLoading = false
// // this.$message.success(this.$t('OperationSuccessful'))
// // this.visible = false
// this.selectedRowKeys = []
// this.$emit('transferListForm',selectedRowKeys.join(','))
// } else {
// // if (res.message == '该虚拟清单的维护清单中没有数据,是否需要添加') {
// // this.confirmLoading = false
// // this.getAdd()
// // return
// // }
// this.$message.warning(this.$t('operationFailed'))
// this.confirmLoading = false
// }
// })
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
getAdd() {
let _this = this
this.$confirm({
content: _this.$t('TheDoesNotContainData'),
onOk() {
_this.handleSubmit('1')
}
})
}
}
}
</script>
<style scoped>
.page {
text-align: right;
margin-top: 20px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
</style>
@@ -77,7 +77,7 @@
</div>
<!-- 保存-->
<div @click="preservationClick" v-if="roleSwitchingCode == 2" class="operator-text">
<div @click="preservationClick(1)" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="check-circle"/>
{{ $t('preservation') }}
</div>
@@ -89,7 +89,8 @@
</div>
<!-- 批量设置-->
<div @click="BatchSettingClick" v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2" class="operator-text">
<div @click="BatchSettingClick($t('BatchSetting'))" v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2"
class="operator-text">
<a-icon type="setting"/>
{{ $t('BatchSetting') }}
</div>
@@ -101,9 +102,9 @@
</div>
<!-- 修改配置-->
<div @click="changeSettingClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
<div @click="BatchSettingClick($t('changeSetting'))" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
class="operator-text">
<a-icon type="setting" />
<a-icon type="setting"/>
{{ $t('changeSetting') }}
</div>
@@ -185,14 +186,16 @@
</div>
<!-- 发起任务-->
<div @click="initiatingProcessClick" v-if="roleSwitchingCode == 2" class="operator-text">
<div @click="initiatingProcessClick('rzgcsjsrw',$t('confirmLaunchTask'))"
v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="check-circle"/>
{{ $t('initiateTask') }}
</div>
<!-- 退回至Studio-->
<div @click="returnToStudioClick" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="close-circle" />
<div @click="returnToStudioClick('rzgcsthrw',$t('areYouReturnToStudio'))"
v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="close-circle"/>
{{ $t('returnToStudio') }}
</div>
@@ -204,21 +207,21 @@
<!-- 审批退回-->
<div @click="returnedForApprovalClick" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="close-circle" />
<a-icon type="close-circle"/>
{{ $t('returnedForApproval') }}
</div>
<!-- 任务接受-->
<div @click="missionAcceptedClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
<div @click="missionAcceptedClick('zrrjsrw',$t('confirmToAcceptTheTask'))" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
class="operator-text">
<a-icon type="check-circle"/>
{{ $t('missionAccepted') }}
</div>
<!-- 任务退回-->
<div @click="missionRejectionClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
<div @click="missionAcceptedClick('zrrjjrw',$t('confirmRejectTask'))" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
class="operator-text">
<a-icon type="close-circle" />
<a-icon type="close-circle"/>
{{ $t('missionRejection') }}
</div>
@@ -230,7 +233,7 @@
<!-- 转办 -->
<div @click="turnToDoClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21" class="operator-text">
<a-icon type="undo" />
<a-icon type="undo"/>
{{ $t('turnToDo') }}
</div>
@@ -323,6 +326,18 @@
</span>
</div>
</a-table>
<div class="page" v-if="dataSource.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
<certificationDirectory :isDisplayNum="isDisplayNum" :url="url" ref="certificationDirectoryRef"/>
@@ -331,6 +346,7 @@
<modifyHistory ref="modifyHistoryRef"/>
<uploadFile ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></uploadFile>
<TaskListModel @TaskListModelList="transferListForm" ref="TaskListModelRef"/>
<referenceDeliverablesList ref="referenceDeliverablesListRef" @referenceDeliverablesListForm="transferListForm"/>
<a-modal
:title="listTitle"
:width="500"
@@ -413,6 +429,7 @@
import batSetting from './components/batSetting'
import modifyHistory from './components/modifyHistoryList'
import TaskListModel from '../TaskListModel'
import referenceDeliverablesList from './components/referenceDeliverablesList'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import moment from 'moment'
import { mapGetters } from 'vuex'
@@ -428,11 +445,15 @@
addModel,
modifyHistory,
uploadFile,
TaskListModel
TaskListModel,
referenceDeliverablesList
},
data() {
return {
queryParam: {},
pageNo: 1,
pageSize: 10,
total: 0,
CertificationColor: {
'Test passed': 'accordColor',
'Test failed': 'nonConformityColor',
@@ -466,7 +487,8 @@
setBatch: '/project/projectCertificationInventoryEO/setBatch',
deleteOne: '/project/projectCertificationInventoryEO/delete',
AndUserId: '/project/projectLibraryRoleRelEO/queryByProjectLibraryIdAndUserId',
AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit'
AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit',
saveBatch: '/project/projectCertificationInventoryEO/saveBatch'
},
dataSource: [],
roleSwitchingCode: '',
@@ -638,8 +660,8 @@
}
}
}
if (this.roleSwitchingCode == 20 || this.roleSwitchingCode == 21 ||this.roleSwitchingCode == 11 ||
this.roleSwitchingCode == 12 || this.roleSwitchingCode == 13 || this.roleSwitchingCode == 14){
if (this.roleSwitchingCode == 20 || this.roleSwitchingCode == 21 || this.roleSwitchingCode == 11 ||
this.roleSwitchingCode == 12 || this.roleSwitchingCode == 13 || this.roleSwitchingCode == 14) {
for (let i = 0; i < columns.length; i++) {
if (columns[i].title == this.$t('reportNo')) {
columns.splice(i, 1)
@@ -676,17 +698,29 @@
disabledDate(current) {
return current && current < moment().subtract(1, 'day')
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.replacePage()
},
searchQuery() {
this.pageNo = 1
this.selectedRowKeys = []
this.getList()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.selectedRowKeys = []
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
},
getPersonnelList() {
this.pageNo = 1
this.getList()
},
handleSuperQuery(params, matchType) {
@@ -700,6 +734,7 @@
sqp['superQueryMatchType'] = matchType
}
this.queryParamQuery = sqp
this.pageNo = 1
this.getList()
},
handleToggleSearch() {
@@ -713,6 +748,8 @@
}
})
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParamQuery,
...queryParam,
projectLibraryId: this.$route.query.id,
@@ -722,6 +759,7 @@
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataSource = res.result.records || []
this.total = res.result.total
this.loading = false
this.JLoading = false
} else {
@@ -733,9 +771,9 @@
transferClick() {
this.$refs.transferListRef.transferModel()
},
BatchSettingClick() {
BatchSettingClick(name) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)), name)
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
@@ -861,13 +899,16 @@
},
transferListForm() {
this.pageNo = 1
this.getList()
},
batSettingForm() {
this.pageNo = 1
this.getList()
this.selectedRowKeys = []
},
addModelForm() {
this.pageNo = 1
this.getList()
},
edit(item) {
@@ -922,7 +963,7 @@
}
this.roleSwitchingCode = this.formInlineRoleSwitching.roleSwitchingCode
this.getList()
this.$emit('getRoleSwitch',this.roleSwitchingCode)
this.$emit('getRoleSwitch', this.roleSwitchingCode)
} else {
this.JLoading = false
}
@@ -960,7 +1001,7 @@
this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false
this.getList()
this.$emit('getRoleSwitch',this.roleSwitchingCode)
this.$emit('getRoleSwitch', this.roleSwitchingCode)
} else {
this.confirmLoadingRoleSwitching = false
this.$message.warning(this.$t('operationFailed'))
@@ -973,24 +1014,26 @@
this.visibleRoleSwitching = false
},
//保存
preservationClick() {
preservationClick(num) {
postAction(this.url.saveBatch, { 'dataList': this.dataSource }).then((res) => {
if (res.success) {
if (num == 1) {
this.$message.success(this.$t('OperationSuccessful'))
}
} else {
if (num == 1) {
this.$message.warning(this.$t('operationFailed'))
}
}
})
},
//引用交付物
referenceDeliverablesClick() {
},
//修改配置
changeSettingClick() {
},
//发起流程
initiatingProcessClick() {
},
//退回至Studio
returnToStudioClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$refs.referenceDeliverablesListRef.transferModel()
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//审批通过
ApprovedClick() {
@@ -999,14 +1042,6 @@
//审批退回
returnedForApprovalClick() {
},
//任务接受
missionAcceptedClick() {
},
//任务退回
missionRejectionClick() {
},
//提交
submitClick() {
@@ -1045,6 +1080,116 @@
let item = JSON.parse(JSON.stringify(val))
item.roleCode = this.roleSwitchingCode
this.$refs.TaskListModelRef.getData(item, this.$t('CertificationProgress'))
},
//发起流程
initiatingProcessClick(value, prompt) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let ids = []
let notConditions = []
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'List to be checked' ||
this.selectedRowKeysList[i].flowStatus == 'Refusal of responsible person') {
ids.push(this.selectedRowKeysList[i].id)
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
}
let data = ''
if (notConditions && notConditions.length > 0) {
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyProcessReturned')
}
if (ids && ids.length > 0) {
this.submitTask(value, prompt, ids, notConditions, data)
} else {
this.failedMessage(data)
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//退回至Studio
returnToStudioClick(value, prompt) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let ids = []
let notConditions = []
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'List to be checked' ||
this.selectedRowKeysList[i].flowStatus == 'Refusal of responsible person') {
ids.push(this.selectedRowKeysList[i].id)
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
}
let data = ''
if (notConditions && notConditions.length > 0) {
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyProcessStatusReturned')
}
if (ids && ids.length > 0) {
this.submitTask(value, prompt, ids, notConditions, data)
} else {
this.failedMessage(data)
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//任务接受\拒绝
missionAcceptedClick(value,prompt) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let ids = []
let notConditions = []
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed') {
ids.push(this.selectedRowKeysList[i].id)
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
}
let data = ''
if (notConditions && notConditions.length > 0) {
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataStatusConfirmedSelected')
}
if (ids && ids.length > 0) {
this.submitTask(value, prompt, ids, notConditions, data)
} else {
this.failedMessage(data)
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
failedMessage(data) {
let detailedWarningList = []
detailedWarningList.push(data)
this.$warning({
content: ( < div > { detailedWarningList } < /div>)
})
},
submitTask(value, prompt, ids, notConditions, data) {
let _this = this
this.$confirm({
content: prompt,
onOk() {
let query = {
'nodeKey': value,
'projectLibraryId': _this.$route.query.id,
'ids': ids.join(',')
}
postAction('/project/projectCertificationInventoryEO/submitTask', query).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
_this.selectedRowKeys = []
_this.selectedRowKeysList = []
if (notConditions && notConditions.length > 0) {
_this.failedMessage(data)
}
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
}
}
}
@@ -28,6 +28,9 @@
</a>
<span v-else>--</span>
</span>
<span slot="taskStatus" slot-scope="text,record">
<span>{{text ? text : '--'}}</span>
</span>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
<a-pagination
@@ -99,7 +102,8 @@
align: 'left',
dataIndex: 'statusShow',
ellipsis: true,
width: 170
width: 170,
scopedSlots: { customRender: 'taskStatus' }
},
{
title: this.$t('operation'),
@@ -174,6 +178,19 @@
}
})
window.open(newUrl.href, '_blank')
}else if (row.flowType == '21') {
let newUrl = this.$router.resolve({
path: '/ProjectDetails',
query: {
id: row.projectLibraryId,
projectName: row.projectName,
projectNameId: row.projectNameId,
targetMarket: row.targetMarket,
studioEngineer: row.studioEngineer,
type: '106'
}
})
window.open(newUrl.href, '_blank')
} else if (row.flowType == '2') {
row.taskId = row.taskId + ''
if (row.taskId.length > 30) {
@@ -0,0 +1,269 @@
<template>
<a-drawer
:title="$t('add')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('regulationNo')">{{$t('regulationNo')}}</span>
</div>
<a-form-model-item class="itemModel" prop="regulationNo">
<j-dict-select-tag class="box-input"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('regulationNo')"
:type="'select'"
:triggerChange="false"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false"/>
</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="Required">*</span>
<span class="title-text-text" :title="'WVTA ID'">WVTA ID</span>
</div>
<a-form-model-item class="itemModel">
<a-input class="box-input"
v-model='formInline.dddd'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+'WVTA ID'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<div v-for="(item,index) in formInline.dataList" :key="index">
<div class="header-text">
<span>{{$t('itemInformation')}}</span>
<div class="box-title-text" style="margin-left: 10px">
<a-button @click='addClick(index)' style="margin-right: .8rem" icon="plus">
</a-button>
<a-button v-if="formInline.dataList.length > 1" @click="deleteClick(index)" type="primary" icon="minus">
</a-button>
</div>
</div>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('category')">{{$t('category')}}</span>
</div>
<a-form-model-item class="itemModel" prop="category">
<a-input class="box-input"
v-model="item.category"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('category')"
:type="'select'"
:triggerChange="false"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('inspectionItems')">{{$t('inspectionItems')}}</span>
</div>
<a-form-model-item class="itemModel" prop="inspectionItems">
<j-dict-select-tag class="box-input"
v-model="item.inspectionItems"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('inspectionItems')"
:type="'select'"
:triggerChange="false"/>
</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="Required">*</span>
<span class="title-text-text" :title="$t('Deliverables')">{{$t('Deliverables')}}</span>
</div>
<a-form-model-item class="itemModel" prop="Deliverables">
<j-dict-select-tag class="box-input"
v-model="item.Deliverables"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('Deliverables')"
:type="'select'"
:triggerChange="false"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</div>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button type="primary" @click="handleSubmit" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
export default {
name:"addModel",
props: ['url'],
data() {
return {
visible: false,
disabled: false,
formInline: {},
confirmLoading: false,
rules: {
regulationNo: [
// {
// required: true,
// message: this.$t('regulationNo') + this.$t('cannotEmpty'),
// trigger: 'change'
// }
]
},
}
},
methods: {
addModel() {
this.visible = true
this.formInline = {}
this.formInline.dataList = [{}]
this.formInline = { ...this.formInline }
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
handleCancel() {
this.visible = false
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = JSON.parse(JSON.stringify(this.formInline))
query.dataList.forEach(val => {
Object.keys(query).forEach(res => {
if (query[res] && query[res] instanceof Array) {
query[res] = query[res].join(',')
}
})
})
this.confirmLoading = true
postAction(this.url.addModel, query).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.$emit('addModelList')
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
}
})
},
addClick(index){
this.formInline.dataList.splice(index + 1, 0, {})
this.formInline = { ...this.formInline }
},
deleteClick(index) {
this.formInline.dataList.splice(index, 1)
this.formInline = { ...this.formInline }
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 114px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 48px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
height: 40px;
margin-bottom: 24px;
}
.Required {
color: red;
margin-right: 4px;
}
.header-text {
font-size: 16px;
font-weight: bold;
margin-left: 15px;
/*border-bottom: 1px #d9d9d9 dashed;*/
height: 30px;
margin-bottom: 30px;
display: flex;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
@@ -0,0 +1,109 @@
<template>
<a-modal
:title="$t('batSetting')"
:width="900"
:visible="visible"
:maskClosable="false"
@cancel="handleCancel"
>
<a-form-model class="formAdd">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<j-multi-select-tag class="box-input"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
<!-- @input="handleInput('dutyTerritory')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" dictCode="duty_territory"/>-->
</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('Deliverables')">{{$t('Deliverables')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<j-multi-select-tag class="box-input"
:placeholder="$t('PleaseSelect')+$t('Deliverables')"
:type="'select'"
:triggerChange="false"/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.attestationType"-->
<!-- @input="handleInput('attestationType')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('certificationType')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" dictCode="attestation_type"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
export default {
name: 'batSetting',
data() {
return {
visible: false,
formInline: {},
ids: [],
}
},
methods: {
edit(data) {
this.visible = true
this.$nextTick(() => {
this.ids = data || []
this.formInline = {}
})
},
handleCancel() {
this.formInline = {}
this.visible = false
},
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 104px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
</style>
@@ -0,0 +1,271 @@
<template>
<a-drawer
:title="$t('edit')"
:maskClosable="false"
:width="900"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('regulationNo')">{{$t('regulationNo')}}</span>
</div>
<a-form-model-item class="itemModel" prop="serialNumber">
<j-dict-select-tag class="box-input"
v-model="formInline.serialNumber"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('regulationNo')"
:type="'select'"
:triggerChange="false"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input"
v-model="formInline.dutyTerritory"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false"/>
</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="Required">*</span>
<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="disabled"
v-model="formInline.wvtaId"
:placeholder="$t('PleaseEnter')+'WVTA ID'"/>
</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="Required">*</span>
<span class="title-text-text" :title="$t('category')">{{$t('category')}}</span>
</div>
<a-form-model-item class="itemModel" prop="category">
<j-dict-select-tag class="box-input"
v-model="formInline.category"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('category')"
:type="'select'"
:triggerChange="false"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('inspectionItems')">{{$t('inspectionItems')}}</span>
</div>
<a-form-model-item class="itemModel" prop="inspectionItem">
<j-dict-select-tag class="box-input"
v-model="formInline.inspectionItem"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('inspectionItems')"
:type="'select'"
:triggerChange="false"/>
</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="Required">*</span>
<span class="title-text-text" :title="$t('Deliverables')">{{$t('Deliverables')}}</span>
</div>
<a-form-model-item class="itemModel" prop="deliverable">
<j-dict-select-tag class="box-input"
v-model="formInline.deliverable"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('Deliverables')"
:type="'select'"
:triggerChange="false"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template>
<script>
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
export default {
name:'editModel',
props: ['url'],
data() {
return {
visible: false,
confirmLoading: false,
formInline: {},
disabled: false,
rules: {
serialNumber: [
{
required: true,
message: this.$t('regulationNo') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
dutyTerritory: [
{
required: true,
message: this.$t('areaOfResponsibility') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
wvtaId: [
{
required: true,
message: 'WVTA ID' + this.$t('cannotEmpty'),
trigger: 'change'
}
],
category: [
{
required: true,
message: this.$t('category') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
inspectionItem: [
{
required: true,
message: this.$t('inspectionItems') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
deliverable: [
{
required: true,
message: this.$t('Deliverables') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
}
}
},
methods: {
handleCancel() {
this.visible = false
},
editModel(item) {
this.visible = true
this.$nextTick(() => {
this.formInline = item || {}
this.$refs.ruleForm.clearValidate()
})
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let formInline = JSON.parse(JSON.stringify(this.formInline))
this.confirmLoading = true
postAction(this.url.editModel, formInline).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('editModelList')
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
},
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 114px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 48px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
height: 40px;
margin-bottom: 24px;
}
.Required {
color: red;
margin-right: 4px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
@@ -0,0 +1,212 @@
<template>
<a-drawer
:title="$t('Transfer')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('CertificationListName')">
<span>{{$t('CertificationListName')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('CertificationListName')"
></j-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="12" :sm="24">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<a-table
:columns="columns"
rowKey="id"
:scroll="{x: 800}"
:data-source="dataList"
:pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:' ' }"
:loading="loading">
</a-table>
<div class="page" v-if="dataList.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
<div class="drawer-bootom-button">
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit(undefined)" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
</div>
</a-drawer>
</template>
<script>
export default {
name: 'transferList',
data() {
return {
visible: false,
confirmLoading: false,
selectedRowKeys: [],
columns: [
{
title: this.$t('VirtualListName'),
dataIndex: 'name',
align: 'left',
ellipsis: true,
width: 223
},
{
title: this.$t('instructionForUse'),
dataIndex: 'useExplain',
align: 'left',
ellipsis: true,
width: 223
},
{
title: this.$t('updateTime'),
dataIndex: 'updateTime',
align: 'left',
ellipsis: true,
width: 223
},
{
title: this.$t('creater'),
dataIndex: 'createBy',
align: 'left',
ellipsis: true,
width: 223
}
],
dataList: [],
loading: false,
pageNo: 1,
pageSize: 10,
total: 0
}
},
methods: {
transferModel() {
this.visible = true
},
searchQuery() {
this.pageNo = 1
this.replacePage()
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.replacePage()
},
onChange(page, pageSize) {
this.pageNo = page
this.replacePage()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.replacePage()
},
replacePage() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam
}
this.loading = true
// postAction('', query).then((res) => {
// if (res.success) {
// this.dataList = res.result.records || []
// this.total = res.result.total
// this.loading = false
// } else {
// this.loading = false
// }
// })
},
onSelectChange(value) {
this.selectedRowKeys = value
if (this.selectedRowKeys.length > 1) {
this.selectedRowKeys.shift()
}
},
handleCancel() {
this.visible = false
},
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
.page {
text-align: right;
margin-top: 20px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
@@ -56,7 +56,7 @@
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
>
<span slot="CertificationListName" slot-scope="text,record">
<a>{{text}}</a>
<a @click="CertificationListNameClick(record)">{{text}}</a>
</span>
<span slot="operation" slot-scope="text,record">
<!-- v-if="record.createBy == userData.username || administrators"-->
@@ -72,7 +72,7 @@
<!-- v-if="record.createBy == userData.username || administrators"-->
<a class="text-operation" :disabled="record.state == 1?true:false"
v-has="'dummyInventoryBase:deleteBatch'"
>{{$t('maintenanceList')}}</a>
@click="maintenanceList(record)">{{$t('maintenanceList')}}</a>
<a class="text-operation"
v-has="'dummyInventoryBase:read'"
:disabled="record.state == 2?true:false" @click="subscribe(record)">
@@ -316,7 +316,7 @@ export default {
item.state = 2
content = this.$t('confirmWithdraw')
}
item.id = val.id
item.ids = val.id
let _this = this
this.$confirm({
content: content,
@@ -332,6 +332,19 @@ export default {
}
})
},
//认证清单维护
maintenanceList(item) {
let newUrl = this.$router.resolve({
path: '/certificationListMaintenance',
query: {
name: item.name,
useExplain: item.useExplain,
id: item.id,
title: '认证清单维护'
}
})
window.open(newUrl.href, '_blank')
},
//订阅
subscribe(val) {
let _this = this
@@ -372,6 +385,19 @@ export default {
}
})
},
//虚拟认证清单名称事件
CertificationListNameClick(item) {
let newUrl = this.$router.resolve({
path: '/certificationListMaintenance',
query: {
name: item.name,
useExplain: item.useExplain,
id: item.id,
title: '虚拟认证清单详情'
}
})
window.open(newUrl.href, '_blank')
},
searchQuery() {
this.pageNo = 1
this.getList()
@@ -0,0 +1,687 @@
<template>
<div class="doc-detail">
<div class="Virtual-detail-header" style="position: fixed;top: 0">
<div class="Virtual-detail-title">
<span>
{{isTrue ? $t('certificationListMaintenance'):$t('virtualAuthenticationListDetails')}}
</span>
</div>
<div class="Virtual-detail-right">
<div @click="UpdateLogClick" v-has="'dummyLog:page'" class="operator-text-text"
style="margin-right: 37px;cursor: pointer"
:title="$t('UpdateLog')">
<a-icon type="reload"/>
{{$t('UpdateLog')}}
</div>
</div>
</div>
<div style="padding-top: 88px;background: #fff;height: 100%">
<div class="detail-content" style="height: 100%">
<div class="Virtual-detail-content">
<div class="box-title-text-add">
<div class="title-text-add">
<span class="text-left" :title="$t('CertificationListName')">
{{$t('CertificationListName')}}
</span>
<span class="text-right" style="margin-right: 100px" :title="$route.query.name">
{{$route.query.name}}
</span>
<span class="text-left" style="width: 72px" :title="$t('instructionForUse')">
{{$t('instructionForUse')}}
</span>
<span class="text-right" :title="$route.query.useExplain">
{{$route.query.useExplain}}
</span>
</div>
</div>
</div>
<a-card :bordered="false" class="card">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('category')">
<span>{{$t('category')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('category')"
v-model="queryParam.category"></j-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('inspectionItems')">
<span>{{$t('inspectionItems')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('inspectionItems')"
v-model="queryParam.inspectionItem"></j-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('standard')">
<span>{{$t('standard')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParam.serialNumber"></j-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="table-operator" style="margin-bottom: 16px">
<!-- 导入-->
<!-- <div class="operator-text"-->
<!-- style="float: left;font-size: 16px;font-weight: 400;color: #040B29;">-->
<!-- {{$t('DocumentStandard')}}-->
<!-- </div>-->
<!-- v-if="isTrue"-->
<div v-if="isTrue" class="operator-text" v-has="'dummyInventoryInfo:importData'" >
<ImportFile :url="url" :dummyInventoryBaseId="$route.query.id" :isTrue="true"
:accept="'.zip'"/>
</div>
<!-- 模板下载-->
<!-- v-if="isTrue"-->
<div @click="handleModule"
v-if="isTrue"
v-has="'dummyInventoryInfo:exportTemplate'"
class="operator-text" >
<a-icon type="download"/>
{{$t('templateDownload')}}
</div>
<!-- 导出-->
<div @click="handleExport"
v-has="'dummyInventoryInfo:exportData'"
class="operator-text">
<a-icon type="export" :rotate="-90"/>
{{$t('export')}}
</div>
<!-- 调取-->
<!-- v-if="isTrue"-->
<!-- <div v-if="isTrue"-->
<!-- @click="transferClick"-->
<!-- v-has="'dummyInventoryInfo:copyInfoByIds'"-->
<!-- class="operator-text" >-->
<!-- <a-icon type="profile"/>-->
<!-- {{$t('Transfer')}}-->
<!-- </div>-->
<!-- 添加-->
<!-- v-if="isTrue"-->
<div v-if="isTrue"
@click="handleAdd"
v-has="'dummyInventoryInfo:add'"
class="operator-text" >
<a-icon type="plus"/>
{{$t('add')}}
</div>
<!-- 复制-->
<!-- v-if="isTrue"-->
<div @click="copyClick"
v-if="isTrue"
v-has="'dummyInventoryInfo:copyInfoByIds'"
class="operator-text" >
<a-icon type="copy"/>
{{$t('copy')}}
</div>
<!-- 批量设置-->
<!-- v-if="isTrue"-->
<div v-if="isTrue"
@click="batSettingClick"
v-has="'dummyInventoryInfo:setBatch'"
class="operator-text" >
<a-icon type="setting"/>
{{$t('batSetting')}}
</div>
<!-- 批量删除-->
<!-- v-if="isTrue"-->
<div @click="handleDel"
v-if="isTrue"
v-has="'dummyInventoryInfo:deleteBatch'"
class="operator-text" >
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
<!-- 自定义表头-->
<!-- <a-popconfirm :visible="customizevisible" overlayClassName='popconfirmmize' placement="bottomRight" >-->
<!-- <template slot="title" id="popconfirmmize">-->
<!-- <div style="height:320px;overflow:scroll;overflow-x: auto;">-->
<!-- <a-checkbox-->
<!-- style='margin-bottom: 22px;'-->
<!-- v-if="customizeList && customizeList.length"-->
<!-- v-model="checkAll"-->
<!-- :indeterminate="indeterminate"-->
<!-- @change="onCheckAllChange"-->
<!-- >{{$t('selectAll')}}-->
<!-- </a-checkbox>-->
<!-- <a-checkbox-group @change="onChange" v-model="checkedList" class="customize-text">-->
<!-- <a-checkbox class="customize-text-title" :disabled='item.disabled' v-for="(item, key) in customizeList" :key="key" :value="item.field">{{ item.name }}-->
<!-- </a-checkbox>-->
<!-- </a-checkbox-group>-->
<!-- <div class="drawer-bootom-button">-->
<!-- <a-button @click="cancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>-->
<!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
<!-- <div class="operator-text" style="position: relative" @click='getcustomize'>-->
<!-- <a-icon type="setting"/>-->
<!-- {{ $t('customize') }}-->
<!-- </div>-->
<!-- </a-popconfirm>-->
</div>
<div style="width: 100%">
<a-table
class="table"
:loading="loading"
:pagination="false"
:components="drag(columns,'columns')"
:scroll="{x: '100%',y:'calc(100vh - 356px)'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns">
<span slot="item" slot-scope="text,record">
<a @click="itemClick(record)">{{text}}</a>
</span>
<span slot="operation" slot-scope="text,record">
<a v-if="isTrue"
class="text-operation"
v-has="'dummyInventoryInfo:edit'"
@click="edit(record)">{{$t('edit')}}</a>
<a v-if="isTrue"
class="text-operation"
v-has="'dummyInventoryInfo:deleteBatch'"
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
<a v-if="isFalse"
class="text-operation"
@click="view(record)">{{$t('view')}}</a>
</span>
</a-table>
<div class="buttom-box" v-if="dataSource && dataSource.length > 0">
{{$t('total')+' '+this.dataSource.length+' '+ $t('strip')}}
</div>
</div>
</a-card>
</div>
</div>
<UpdateLog :url="url" ref="UpdateLogRef"/>
<transfer-list ref="transferListRef"></transfer-list>
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
<edit-model :url="url" ref="editModelRef" @editModelList="editModelList"></edit-model>
<bat-setting :url="url" ref="batSettingRef"></bat-setting>
</div>
</template>
<script>
import { Base64 } from 'js-base64'
import { mapGetters } from 'vuex'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
import UpdateLog from '@/components/UpdateLog/index'
import ImportFile from '@/components/ImportFile/index'
import transferList from '../components/transferList'
import addModel from '../components/addModel'
import editModel from '../components/editModel'
import batSetting from '../components/batSetting'
import { ResizeHeader,ResizeColumnProvide } from '@/mixins/header'
export default {
name:'certificationListMaintenance',
components: {
globalAdvancedQuery,
ImportFile,
UpdateLog,
transferList,
addModel,
editModel,
batSetting
},
mixins: [ResizeHeader,ResizeColumnProvide],
data() {
return {
title: '认证清单维护',
isTrue: false,
isFalse: false,
isbutton: false,
queryParamQuery: {},
dataSource: [],
url:{
list: '/authDummy/authDummyInventoryInfoEO/page',
logList: '',//更新log
exportTemplate: '',//模板下载
exportData: '',//导出
addModel: '/authDummy/authDummyInventoryInfoEO/add',//添加
copyInfo: '/authDummy/authDummyInventoryInfoEO/copyInfoByIds',//复制
deleteBatch: '/authDummy/authDummyInventoryInfoEO/deleteBatch',//批量删除
editModel: '/authDummy/authDummyInventoryInfoEO/edit',//编辑
},
queryParam: {},
orderByField: '',
columns: [
{
title: this.$t('category'),
align: 'left',
dataIndex: 'category',
width: 150,
ellipsis: true,
},
{
title: this.$t('inspectionItems'),
align: 'left',
dataIndex: 'inspectionItem',
width: 150,
ellipsis: true,
scopedSlots: { customRender: 'inspectionItems' }
},
{
title: 'WVTA ID',
align: 'left',
dataIndex: 'wvtaId',
width: 150,
ellipsis: true,
},
{
title: this.$t('standard'),
align: 'left',
dataIndex: 'serialNumber',
width: 150,
ellipsis: true,
},
{
title: this.$t('areaOfResponsibility'),
align: 'left',
dataIndex: 'dutyTerritory',
width: 200,
ellipsis: true,
},
{
title: this.$t('Deliverables'),
align: 'left',
dataIndex: 'deliverable',
width: 200,
ellipsis: true,
},
{
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 200,
scopedSlots: { customRender: 'operation' }
}
],
selectedRowKeys: [],
loading: false,
fieldList: [
{
type: '',
value: 'shi4Yong4Fan4Wei2',
text: this.$t('scopeOfApplication'),
dictCode: 'apply_scope'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'state',
text: this.$t('status'),
dictCode: 'state'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: 'string',
value: 'correspondingStandard',
text: this.$t('correspondingStandard')
},
{
type: '',
value: 'region',
text: this.$t('zoneOfApplication'),
dictCode: 'region'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'implementType',
text: this.$t('implementationCategory'),
dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: 'date',
value: 'xin1Che1Xing2Shi2Shi1Ri4Qi1',
text: this.$t('ImplementationDate')
},
{
type: 'date',
value: 'implementTime',
text: this.$t('vehicleInProductionDate')
},
{
type: 'string',
value: 'wvtaId',
text: 'WVTA ID'
},
{
type: '',
value: 'attestationType',
text: this.$t('certificationType'),
dictCode: 'attestation_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'attestationRank',
text: this.$t('certificationLevel'),
dictCode: 'attestation_rank'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
},
{
type: '',
value: 'dutyTerritory',
text: this.$t('areaOfResponsibility'),
dictCode: 'duty_territory'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
}
]
}
},
created() {
if (this.$route.query.title == '虚拟认证清单详情') {
document.title = this.$t('virtualAuthenticationListDetails')
} else {
document.title = this.$t('certificationListMaintenance')
}
},
mounted() {
this.title = this.$route.query.title
this.isTrue = this.$route.query.title == '虚拟认证清单详情' ? false : true
this.isFalse = this.$route.query.title == '虚拟认证清单详情' ? true : false
this.getList()
},
computed: {
},
methods: {
...mapGetters(['userInfo']),
handleSuperQuery(params, matchType) {
let sqp = {}
if (!params || (params && params.length == 0)) {
sqp['superQueryParams'] = ''
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
} else {
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
sqp['superQueryMatchType'] = matchType
}
this.queryParamQuery = sqp
this.getList()
},
onSelectChange(value) {
this.selectedRowKeys = value
},
UpdateLogClick(){
this.$refs.UpdateLogRef.getList({ dummyInventoryBaseId: this.$route.query.id })
},
//搜索
searchQuery() {
this.getList()
},
//清空
searchReset() {
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
this.queryParam = {}
this.getList()
},
//模板下载
handleModule() {
downloadFile(this.url.exportTemplate, this.$t('VirtualList') + this.$t('importTemplate') + '.xls', {})
},
//调取
// transferClick() {
// this.$refs.transferListRef.transferModel()
// },
//添加
handleAdd() {
this.$refs.addModelRef.addModel()
},
//导出
handleExport() {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = {
...this.queryParam,
...this.queryParamQuery,
ids: selectedRowKeys.join(','),
dummyInventoryBaseId: this.$route.query.id
}
downloadFile(this.url.exportData, this.$route.query.name + this.$t('VirtualList') + '.zip', query, this.Deselect)
},
Deselect() {
this.selectedRowKeys = []
},
//复制
copyClick() {
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('confirmCopy'),
onOk() {
let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys))
getAction(_this.url.copyInfo, { ids: selectedRowKeys.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//批量设置
batSettingClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//批量删除
handleDel() {
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
deleteAction (_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
addModelList() {
this.getList()
},
editModelList() {
this.getList()
},
getList() {
let query = {
...this.queryParam,
...this.queryParamQuery,
orderBy: this.orderBy,
orderByField: this.orderByField,
dummyInventoryBaseId: this.$route.query.id
}
this.loading = true
getAction(this.url.list,query).then((res) => {
if(res.success) {
this.dataSource = res.result.records || []
this.loading = false
} else {
this.loading = false
}
})
},
edit(item) {
this.$refs.editModelRef.editModel(JSON.parse(JSON.stringify(item)))
},
deleteLib(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
},
}
}
</script>
<style lang='less' scoped>
@import'~@assets/less/common.less';
.doc-detail {
background: #fff;
height: 100%;
.Virtual-detail-header {
width: 100%;
height: 68px;
line-height: 68px;
padding: 0 32px 0 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
border-bottom: 2px #eff1f3 solid;
background: #fff;
z-index: 1000;
.Virtual-detail-title {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 20px;
font-weight: 400;
color: #040B29;
line-height: 68px;
}
.doc-detail-right {
width: 800px;
line-height: 68px;
display: flex;
}
}
.Virtual-detail-content {
padding: 0 32px 0 32px;
box-sizing: border-box;
font-size: 16px;
.box-title-text-add {
line-height: 1.4;
}
.title-text-add {
display: inline-block;
width: 100%;
font-weight: 500;
margin-right: 16px;
height: 42px;
line-height: 42px;
}
}
}
.text-left {
font-size: 14px;
font-weight: 400;
color: #6F7385;
display: inline-block;
width: 100px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.text-right {
font-size: 16px;
font-weight: 400;
color: #040B29;
display: inline-block;
max-width: calc(50% - 240px);
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
margin-right: 20px;
}
.title-text {
width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
}
.text-operation {
margin-right: 8px;
}
.buttom-box {
width: 100%;
text-align: right;
font-size: 16px;
font-weight: 500;
color: #000F16;
}
</style>