diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 0eeb50517..6a4f1b3dd 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1416,4 +1416,6 @@ module.exports = { confirmToAcceptTheTask:'Confirm to accept the task ?', confirmRejectTask:'Confirm Reject Task ?', onlyDataStatusConfirmedSelected:'Only data with process status of task to be confirmed can be selected', + operationWithoutPermission:'Operation without permission', + data:"'s data", } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index a9bb4fbd4..c502ea0bc 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1515,6 +1515,8 @@ module.exports = { confirmToAcceptTheTask:'确认接受任务?', confirmRejectTask:'确认拒绝任务?', onlyDataStatusConfirmedSelected:'只能选择流程状态为任务待确认的数据', + operationWithoutPermission:'没有权限操作', + data:"的数据", compliancereport:'生成合规报告', todocenter:'待办中心', } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index 73d765295..679860396 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -212,21 +212,24 @@ -
{{ $t('missionAccepted') }}
-
{{ $t('missionRejection') }}
-
+
{{ $t('submit') }}
@@ -879,7 +882,7 @@ this.confirmLoading = false this.getList() } else { - this.$message.warning(this.$t('operationFailed')) + this.$message.warning(res.message) this.confirmLoading = false } this.detailedSuccessList = [] @@ -1042,10 +1045,6 @@ //审批退回 returnedForApprovalClick() { - }, - //提交 - submitClick() { - }, //转办 turnToDoClick() { @@ -1133,8 +1132,60 @@ this.$message.warning(this.$t('selectLeastOne')) } }, - //任务接受\拒绝 - missionAcceptedClick(value,prompt) { + //责任人任务接受\拒绝 + missionAcceptedClick(value, prompt) { + if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + if (this.roleSwitchingCode == 20) { + this.missionAcceptedClickJC(value, prompt) + return + } + 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')) + } + }, + + missionAcceptedClickJC(value, prompt) { + let ids = [] + let notConditions = [] + for (let i = 0; i < this.selectedRowKeysList.length; i++) { + if (this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed' && + this.selectedRowKeysList[i].dutyPersonName == this.userInfo().username) { + ids.push(this.selectedRowKeysList[i].id) + } else { + notConditions.push(this.selectedRowKeysList[i].inspectionItem) + } + } + let data = '' + if (notConditions && notConditions.length > 0) { + data = this.$t('operationWithoutPermission')+this.$t('inspectionItems') + '"' + notConditions.join('、') + '"'+this.$t('data') + } + if (ids && ids.length > 0) { + this.submitTask(value, prompt, ids, notConditions, data) + } else { + this.failedMessage(data) + } + }, + + //提交 + submitClick(value, prompt) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { let ids = [] let notConditions = [] @@ -1158,6 +1209,7 @@ this.$message.warning(this.$t('selectLeastOne')) } }, + failedMessage(data) { let detailedWarningList = [] detailedWarningList.push(data) @@ -1165,6 +1217,7 @@ content: ( < div > { detailedWarningList } < /div>) }) }, + submitTask(value, prompt, ids, notConditions, data) { let _this = this this.$confirm({