diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 2a5778345..48809bef7 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1428,5 +1428,6 @@ module.exports = { onlyListCheckedCanRecalled:'Only the data whose process status is list to be checked can be recalled', statusthetasistobeconfirmed:'You can withdraw the list only when the status of the list is to be checked or the status of the task is to be confirmed', confirmreturn:'Confirm return ?', - onlyDataSelected:'Only data with process status of task to be confirmed, result to be submitted and review to be returned can be selected' + onlyDataSelected:'Only data with process status of task to be confirmed, result to be submitted and review to be returned can be selected', + youCannotStatusListToBeReleasedAndApproved:'You cannot select data whose process status is list to be released and approved', } \ 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 2e3e09e40..7b02545d5 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1529,5 +1529,6 @@ module.exports = { confirmUrging:'确认催办?', confirmWithdrawal:'确认撤回?', onlyListCheckedCanRecalled:'只能撤回流程状态为清单待校核的数据', - onlyDataSelected:'只能选择流程状态为任务待确认、结果待提交、审查退回的数据' + onlyDataSelected:'只能选择流程状态为任务待确认、结果待提交、审查退回的数据', + youCannotStatusListToBeReleasedAndApproved:'不能选择流程状态为清单待发布、审查通过的数据', } \ 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 f96bc2312..799519d35 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -501,7 +501,7 @@ AndUserId: '/project/projectLibraryRoleRelEO/queryByProjectLibraryIdAndUserId', AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit', saveBatch: '/project/projectCertificationInventoryEO/saveBatch', - questionUrl: '' + questionUrl: '/project/projectCertificationInventoryEO/expediting' }, dataSource: [], roleSwitchingCode: '', @@ -988,31 +988,99 @@ }, //催办 questionClick() { - let _this = this if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { - this.$confirm({ - content: _this.$t('confirmUrging'), - onOk() { - let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys)) - postAction(_this.url.questionUrl, { - ids: idList.join(','), - projectLibraryId: _this.$route.query.id - }).then((res) => { - if (res.success) { - _this.$message.success(_this.$t('OperationSuccessful')) - _this.selectedRowKeys = [] - _this.getList() - } else { - _this.$message.warning(res.message) - } - }) + let ids = [] + let notConditions = [] + let data = '' + if (this.roleSwitchingCode == 0) { + for (let i = 0; i < this.selectedRowKeysList.length; i++) { + if (this.selectedRowKeysList[i].flowStatus == 'List to be checked' || + this.selectedRowKeysList[i].flowStatus == 'Certification returned' || + this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed' || + this.selectedRowKeysList[i].flowStatus == 'Results to be submitted' || + this.selectedRowKeysList[i].flowStatus == 'Refusal of responsible person' || + this.selectedRowKeysList[i].flowStatus == 'Engineer return' || + this.selectedRowKeysList[i].flowStatus == 'Results to be reviewed' || + this.selectedRowKeysList[i].flowStatus == 'Review and return') { + ids.push(this.selectedRowKeysList[i].id) + } else { + notConditions.push(this.selectedRowKeysList[i].inspectionItem) + } } - }) + if (notConditions && notConditions.length > 0) { + data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('youCannotStatusListToBeReleasedAndApproved') + } + if (ids && ids.length > 0) { + this.questionData('certificationInventoryStudioExpediting', ids, notConditions, data) + } else { + this.failedMessage(data) + } + } else if (this.roleSwitchingCode == 2) { + for (let i = 0; i < this.selectedRowKeysList.length; i++) { + if (this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed' || + this.selectedRowKeysList[i].flowStatus == 'Results to be submitted' || + this.selectedRowKeysList[i].flowStatus == 'Review and return') { + ids.push(this.selectedRowKeysList[i].id) + } else { + notConditions.push(this.selectedRowKeysList[i].inspectionItem) + } + } + if (notConditions && notConditions.length > 0) { + data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataSelected') + } + if (ids && ids.length > 0) { + this.questionData('certificationInventoryCertificationEngineerExpediting', ids, notConditions, data) + } else { + this.failedMessage(data) + } + } else if (this.roleSwitchingCode == 20) { + for (let i = 0; i < this.selectedRowKeysList.length; i++) { + if (this.selectedRowKeysList[i].flowStatus == 'Task to be confirmed' || + this.selectedRowKeysList[i].flowStatus == 'Results to be submitted' || + this.selectedRowKeysList[i].flowStatus == 'Review and return') { + ids.push(this.selectedRowKeysList[i].id) + } else { + notConditions.push(this.selectedRowKeysList[i].inspectionItem) + } + } + if (notConditions && notConditions.length > 0) { + data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataSelected') + } + if (ids && ids.length > 0) { + this.questionData('certificationInventorySdtExpediting', ids, notConditions, data) + } else { + this.failedMessage(data) + } + } } else { this.$message.warning(this.$t('selectLeastOne')) } }, - + questionData(operatorType, ids, notConditions, data) { + let _this = this + this.$confirm({ + content: _this.$t('confirmUrging'), + onOk() { + postAction(_this.url.questionUrl, { + ids: ids.join(','), + projectLibraryId: _this.$route.query.id, + operatorType: operatorType + }).then((res) => { + if (res.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.selectedRowKeys = [] + _this.selectedRowKeysList = [] + _this.getList() + if (notConditions && notConditions.length > 0) { + _this.failedMessage(data) + } + } else { + _this.$message.warning(res.message) + } + }) + } + }) + }, transferListForm() { this.pageNo = 1 this.getList() @@ -1174,15 +1242,16 @@ if (this.toDoNotConditions && this.toDoNotConditions.length > 0) { this.toDoData = this.$t('inspectionItems') + '"' + this.toDoNotConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataSelected') } - if (this.toDoIds && this.toDoIds.length > 0){ + if (this.toDoIds && this.toDoIds.length > 0) { this.$refs.SelectedByRef.getPush() - }else{ + } else { this.failedMessage(this.toDoData) } } else { this.$message.warning(this.$t('selectLeastOne')) } }, + //接口人转办 turnToDoClickJC() { this.toDoIds = [] this.toDoNotConditions = [] @@ -1206,6 +1275,7 @@ this.failedMessage(this.toDoData) } }, + //转办接口 SelectedByForm(userIds) { let query = { transferUserId: userIds,