Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+37
-14
@@ -304,14 +304,18 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
|||||||
|
|
||||||
List<String> idList = Arrays.asList(ids.split(","));
|
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,查询出状态为’清单待发布‘的数据,进行发布处理
|
// 根据页面选择的认证清单数据id,查询出状态为’清单待发布‘的数据,进行发布处理
|
||||||
QueryWrapper<ProjectCertificationInventoryEO> certificationQueryWrap = new QueryWrapper<>();
|
QueryWrapper<ProjectCertificationInventoryEO> certificationQueryWrap = new QueryWrapper<>();
|
||||||
certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getId,idList);
|
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);
|
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(certificationQueryWrap);
|
||||||
|
|
||||||
if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){
|
if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){
|
||||||
throw new JeroBootException("无法获取要发布的数据,请重新选择!");
|
throw new JeroBootException("至少选择一条数据流程状态为'清单待发布 或 认证退回'的数据!");
|
||||||
}
|
}
|
||||||
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
|
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
|
||||||
|
|
||||||
@@ -338,7 +342,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
|||||||
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
|
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
|
||||||
processInfoDetailEO.setUserId(userId);
|
processInfoDetailEO.setUserId(userId);
|
||||||
processInfoDetailEO.setTaskDefinitionKey(CertificationFlowNodeEnum.RZGCSJSRW.getKey());
|
processInfoDetailEO.setTaskDefinitionKey(CertificationFlowNodeEnum.RZGCSJSRW.getKey());
|
||||||
processInfoDetailEO.setEndTime(DateUtils.str2Date(endTime,DateUtils.date_sdf.get()));
|
|
||||||
processInfoDetailEO.setCreateTime(new Date());
|
processInfoDetailEO.setCreateTime(new Date());
|
||||||
processInfoDetailEO.setStatus(TaskStatusEnum.NOT_DONE.getValue());
|
processInfoDetailEO.setStatus(TaskStatusEnum.NOT_DONE.getValue());
|
||||||
processInfoDetailEO.setProcessInfoId(projectLibraryId);
|
processInfoDetailEO.setProcessInfoId(projectLibraryId);
|
||||||
@@ -373,7 +376,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
|||||||
processInfoEO.setProjectLibraryId(projectLibraryId);
|
processInfoEO.setProjectLibraryId(projectLibraryId);
|
||||||
processInfoEO.setActiProcInstId(projectLibraryId);
|
processInfoEO.setActiProcInstId(projectLibraryId);
|
||||||
processInfoEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
|
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();
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
processInfoEO.setCreateBy(currentUser.getId());
|
processInfoEO.setCreateBy(currentUser.getId());
|
||||||
@@ -397,7 +400,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
|||||||
detail.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
|
detail.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
|
||||||
detail.setTaskDefinitionKey(taskDefinitionKey);
|
detail.setTaskDefinitionKey(taskDefinitionKey);
|
||||||
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
|
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
|
||||||
// detail.setEndTime(DateUtils.str2Date(endTime,DateUtils.date_sdf.get()));
|
|
||||||
detail.setCreateTime(new Date());
|
detail.setCreateTime(new Date());
|
||||||
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
|
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
|
||||||
});
|
});
|
||||||
@@ -406,6 +408,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
|||||||
QueryWrapper<ProcessInfoDetailEO> removeWrap = new QueryWrapper<>();
|
QueryWrapper<ProcessInfoDetailEO> removeWrap = new QueryWrapper<>();
|
||||||
removeWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoId);
|
removeWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoId);
|
||||||
removeWrap.lambda().in(ProcessInfoDetailEO::getUserId,userIdList);
|
removeWrap.lambda().in(ProcessInfoDetailEO::getUserId,userIdList);
|
||||||
|
removeWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,taskDefinitionKey);
|
||||||
// 删除用户在这个认证清单流程中其它的待办任务
|
// 删除用户在这个认证清单流程中其它的待办任务
|
||||||
this.processInfoDetailEOService.remove(removeWrap);
|
this.processInfoDetailEOService.remove(removeWrap);
|
||||||
|
|
||||||
@@ -730,8 +733,28 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
|||||||
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
|
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
|
||||||
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue());
|
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 认证工程师发起任务,将数据的状态更新为 任务待确认。
|
// 认证工程师发起任务,将数据的状态更新为 任务待确认。
|
||||||
this.updateBatchById(projectCertificationInventoryEOList);
|
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){
|
}catch (Exception ex){
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
log.error("认证工程师-退回认证清单任务失败:" + ex.getMessage());
|
log.error("认证工程师-退回认证清单任务失败:" + ex.getMessage());
|
||||||
@@ -773,20 +796,23 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// 给责任人分配待办中心的任务
|
||||||
|
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
|
||||||
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
|
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
|
||||||
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue());
|
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue());
|
||||||
}
|
|
||||||
|
|
||||||
// 给责任人分配待办中心的任务
|
|
||||||
List<String> dutyPersonList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList());
|
|
||||||
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
|
|
||||||
for (String dutyPerson : dutyPersonList) {
|
|
||||||
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
|
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
|
||||||
processInfoDetailEO.setUserId(dutyPerson);
|
processInfoDetailEO.setUserId(projectCertificationInventoryEO.getDutyPerson());
|
||||||
|
processInfoDetailEO.setEndTime(projectCertificationInventoryEO.getEndTime());
|
||||||
|
processInfoDetailEO.setProjectLawsInventoryId(projectCertificationInventoryEO.getId());
|
||||||
processInfoDetailEOList.add(processInfoDetailEO);
|
processInfoDetailEOList.add(processInfoDetailEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.ZRRJSRW.getKey());
|
this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.ZRRJSRW.getKey());
|
||||||
|
|
||||||
|
// 认证工程师发起任务,将数据的状态更新为 任务待确认。
|
||||||
|
this.updateBatchById(projectCertificationInventoryEOList);
|
||||||
|
|
||||||
// 更新该项目认证流程中,认证工程师的任务状态。
|
// 更新该项目认证流程中,认证工程师的任务状态。
|
||||||
QueryWrapper<ProjectCertificationInventoryEO> queryCountWrap = new QueryWrapper<>();
|
QueryWrapper<ProjectCertificationInventoryEO> queryCountWrap = new QueryWrapper<>();
|
||||||
queryCountWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectLibraryBase.getId());
|
queryCountWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectLibraryBase.getId());
|
||||||
@@ -805,9 +831,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
|||||||
|
|
||||||
this.processInfoDetailEOService.updateBatchById(detailEOList);
|
this.processInfoDetailEOService.updateBatchById(detailEOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 认证工程师发起任务,将数据的状态更新为 任务待确认。
|
|
||||||
this.updateBatchById(projectCertificationInventoryEOList);
|
|
||||||
}catch (Exception ex){
|
}catch (Exception ex){
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
log.error("认证工程师-发起认证清单任务失败:" + ex.getMessage());
|
log.error("认证工程师-发起认证清单任务失败:" + ex.getMessage());
|
||||||
|
|||||||
+30
-2
@@ -172,13 +172,41 @@
|
|||||||
'' as title_en,
|
'' as title_en,
|
||||||
pi.flow_type,
|
pi.flow_type,
|
||||||
pi.create_by,
|
pi.create_by,
|
||||||
(
|
<!--(
|
||||||
select
|
select
|
||||||
pid.end_time
|
pid.end_time
|
||||||
from
|
from
|
||||||
process_info_detail pid
|
process_info_detail pid
|
||||||
where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' order by pid.end_time asc limit 1
|
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.STATUS,
|
||||||
pi.prc_num,
|
pi.prc_num,
|
||||||
pi.prc_name,
|
pi.prc_name,
|
||||||
|
|||||||
@@ -1406,4 +1406,12 @@ module.exports = {
|
|||||||
missionRejection:'Mission Rejection',
|
missionRejection:'Mission Rejection',
|
||||||
turnToDo:'Turn To Do',
|
turnToDo:'Turn To Do',
|
||||||
initiateTask:'Initiate a Task',
|
initiateTask:'Initiate a Task',
|
||||||
|
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',
|
||||||
}
|
}
|
||||||
@@ -1507,4 +1507,12 @@ module.exports = {
|
|||||||
missionRejection:'任务拒绝',
|
missionRejection:'任务拒绝',
|
||||||
turnToDo:'转办',
|
turnToDo:'转办',
|
||||||
initiateTask:'发起任务',
|
initiateTask:'发起任务',
|
||||||
|
areYouReturnToStudio:'确认退回至studio吗?',
|
||||||
|
confirmLaunchTask:'确认发起任务?',
|
||||||
|
conditionsNotMet:'不满足条件',
|
||||||
|
onlyProcessStatusReturned:'只能退回流程状态为清单待校核和责任人拒绝的数据',
|
||||||
|
onlyProcessReturned:'只能发起流程状态为清单待校核和责任人拒绝的数据',
|
||||||
|
confirmToAcceptTheTask:'确认接受任务?',
|
||||||
|
confirmRejectTask:'确认拒绝任务?',
|
||||||
|
onlyDataStatusConfirmedSelected:'只能选择流程状态为任务待确认的数据',
|
||||||
}
|
}
|
||||||
@@ -241,6 +241,9 @@
|
|||||||
} else if (this.$route.query.type == '105') {
|
} else if (this.$route.query.type == '105') {
|
||||||
this.textColor(this.$t('TaskParameterCollection'))
|
this.textColor(this.$t('TaskParameterCollection'))
|
||||||
this.textTitle = 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 {
|
} else {
|
||||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||||
|
|||||||
@@ -186,13 +186,15 @@
|
|||||||
</div>
|
</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"/>
|
<a-icon type="check-circle"/>
|
||||||
{{ $t('initiateTask') }}
|
{{ $t('initiateTask') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 退回至Studio-->
|
<!-- 退回至Studio-->
|
||||||
<div @click="returnToStudioClick" v-if="roleSwitchingCode == 2" class="operator-text">
|
<div @click="returnToStudioClick('rzgcsthrw',$t('areYouReturnToStudio'))"
|
||||||
|
v-if="roleSwitchingCode == 2" class="operator-text">
|
||||||
<a-icon type="close-circle"/>
|
<a-icon type="close-circle"/>
|
||||||
{{ $t('returnToStudio') }}
|
{{ $t('returnToStudio') }}
|
||||||
</div>
|
</div>
|
||||||
@@ -210,14 +212,14 @@
|
|||||||
</div>
|
</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">
|
class="operator-text">
|
||||||
<a-icon type="check-circle"/>
|
<a-icon type="check-circle"/>
|
||||||
{{ $t('missionAccepted') }}
|
{{ $t('missionAccepted') }}
|
||||||
</div>
|
</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">
|
class="operator-text">
|
||||||
<a-icon type="close-circle"/>
|
<a-icon type="close-circle"/>
|
||||||
{{ $t('missionRejection') }}
|
{{ $t('missionRejection') }}
|
||||||
@@ -1032,14 +1034,6 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
}
|
}
|
||||||
},
|
|
||||||
//发起流程
|
|
||||||
initiatingProcessClick() {
|
|
||||||
|
|
||||||
},
|
|
||||||
//退回至Studio
|
|
||||||
returnToStudioClick() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//审批通过
|
//审批通过
|
||||||
ApprovedClick() {
|
ApprovedClick() {
|
||||||
@@ -1048,14 +1042,6 @@
|
|||||||
//审批退回
|
//审批退回
|
||||||
returnedForApprovalClick() {
|
returnedForApprovalClick() {
|
||||||
|
|
||||||
},
|
|
||||||
//任务接受
|
|
||||||
missionAcceptedClick() {
|
|
||||||
|
|
||||||
},
|
|
||||||
//任务退回
|
|
||||||
missionRejectionClick() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//提交
|
//提交
|
||||||
submitClick() {
|
submitClick() {
|
||||||
@@ -1095,24 +1081,115 @@
|
|||||||
item.roleCode = this.roleSwitchingCode
|
item.roleCode = this.roleSwitchingCode
|
||||||
this.$refs.TaskListModelRef.getData(item, this.$t('CertificationProgress'))
|
this.$refs.TaskListModelRef.getData(item, this.$t('CertificationProgress'))
|
||||||
},
|
},
|
||||||
submitTask(value) {
|
//发起流程
|
||||||
|
initiatingProcessClick(value, prompt) {
|
||||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
let ids = []
|
||||||
let query = {
|
let notConditions = []
|
||||||
'nodeKey': value,
|
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
|
||||||
'projectLibraryId': this.$route.query.id,
|
if (this.selectedRowKeysList[i].flowStatus == 'List to be checked' ||
|
||||||
'ids': selectedRowKeys.join(',')
|
this.selectedRowKeysList[i].flowStatus == 'Refusal of responsible person') {
|
||||||
}
|
ids.push(this.selectedRowKeysList[i].id)
|
||||||
postAction('/project/projectCertificationInventoryEO/submitTask', query).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
|
|
||||||
} else {
|
} 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 {
|
} else {
|
||||||
this.$message.warning(this.$t('selectLeastOne'))
|
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>
|
</a>
|
||||||
<span v-else>--</span>
|
<span v-else>--</span>
|
||||||
</span>
|
</span>
|
||||||
|
<span slot="taskStatus" slot-scope="text,record">
|
||||||
|
<span>{{text ? text : '--'}}</span>
|
||||||
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="page" v-if="dataSource && dataSource.length > 0">
|
<div class="page" v-if="dataSource && dataSource.length > 0">
|
||||||
<a-pagination
|
<a-pagination
|
||||||
@@ -99,7 +102,8 @@
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'statusShow',
|
dataIndex: 'statusShow',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 170
|
width: 170,
|
||||||
|
scopedSlots: { customRender: 'taskStatus' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
@@ -174,6 +178,19 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
window.open(newUrl.href, '_blank')
|
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') {
|
} else if (row.flowType == '2') {
|
||||||
row.taskId = row.taskId + ''
|
row.taskId = row.taskId + ''
|
||||||
if (row.taskId.length > 30) {
|
if (row.taskId.length > 30) {
|
||||||
|
|||||||
Reference in New Issue
Block a user