diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 38d4a35b5..68eb6e659 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1727,6 +1727,7 @@ module.exports = { notetwo:'\n1. Provide the modified or expanded batch of "Announcement" and supporting materials;\n2. Verification materials shall be submitted to ensure that products meet the relevant requirements of national laws and regulations, technologies, standards and technical specifications;\n', notethree:'Provide supporting materials', verifyComplianceConfirmReturnReason:'Verify compliance Confirm return reason', + theDeliverablesCannotReferencedPleaseReselect:'The deliverables of this project cannot be referenced, please reselect', regulationListModuleMaintenance:'Regulation list module maintenance', regulationListModule:'Regulation list module', } \ 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 5f09d9735..80aea7039 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1829,6 +1829,7 @@ module.exports = { notetwo:'\n1、提供变更或扩展后的《公告》批次及证明材料;\n2、应提交验证材料,保障产品符合国家法律法规、技术、标准及技术规范等相关要求;\n', notethree:'\n提供证明材料\n', verifyComplianceConfirmReturnReason:'验证符合性确认退回原因', + theDeliverablesCannotReferencedPleaseReselect:'不能引用本项目的交付物,请重新选择', regulationListModuleMaintenance:'法规清单模块维护', regulationListModule:'法规清单模块', } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/referenceDeliverablesList.vue b/jero-web/src/views/projectManagement/components/certificationList/components/referenceDeliverablesList.vue index 4098e6e3b..4a299abd8 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/referenceDeliverablesList.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/referenceDeliverablesList.vue @@ -96,16 +96,18 @@ pageNo: 1, pageSize: 10, total: 0, - ids: '' + ids: '', + detailedWarningList: [] } }, mounted() { }, methods: { - transferModel(ids) { + transferModel(ids, detailedWarningList) { this.visible = true this.queryParam = {} + this.detailedWarningList = detailedWarningList this.selectedRowKeys = [] this.ids = ids.join(',') this.replacePage() @@ -154,10 +156,20 @@ handleCancel() { this.visible = false }, + failedMessageOne(data) { + let detailedWarningList = data + this.$warning({ + content: ( < div > { detailedWarningList } < /div>) + }) + }, handleSubmit() { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { - this.confirmLoading = true let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) + if (selectedRowKeys.join(',') == this.$route.query.id) { + this.$message.warning(this.$t('theDeliverablesCannotReferencedPleaseReselect')) + return + } + this.confirmLoading = true postAction('/project/projectCertificationInventoryEO/citeDeliverable', { projectCertificationInventoryIds: this.ids, projectLibraryId: this.$route.query.id, @@ -173,6 +185,9 @@ this.visible = false this.selectedRowKeys = [] this.$emit('referenceDeliverablesListForm') + if (this.detailedWarningList && this.detailedWarningList.length > 0) { + this.failedMessageOne(this.detailedWarningList) + } } else { if (res.result) { this.$message.warning(res.result) diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index 4eac491a2..48626c18f 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -78,7 +78,8 @@ -
+
{{ $t('preservation') }}
@@ -687,7 +688,7 @@ title: this.$t('DeliverablesResult'), align: 'left', dataIndex: 'deliveryResult', - width: 180, + width: 210, ellipsis: true, scopedSlots: { customRender: 'DeliverablesResult' } }, @@ -1406,17 +1407,45 @@ referenceDeliverablesClick() { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { let isTrue - for (let i = 0; i < this.selectedRowKeysList.length; i++) { - if (this.selectedRowKeysList[i].flowStatus == 'Results to be submitted') { - isTrue = true - } else { - isTrue = false - this.$message.warning(this.$t('youCanOnlySelectStatusClearSubmit')) - return + let ids = [] + let notConditions = [] + let notConditionsOne = [] + let data = '' + let dataOne = '' + let detailedWarningList= [] + if (this.roleSwitchingCode == 20) { + for (let i = 0; i < this.selectedRowKeysList.length; i++) { + if (this.selectedRowKeysList[i].dutyPersonName == this.userInfo().username) { + if (this.selectedRowKeysList[i].flowStatus == 'Results to be submitted') { + ids.push(this.selectedRowKeysList[i].id) + } else { + notConditions.push(this.selectedRowKeysList[i].inspectionItem) + } + } else { + notConditionsOne.push(this.selectedRowKeysList[i].inspectionItem) + } + } + } else { + for (let i = 0; i < this.selectedRowKeysList.length; i++) { + if (this.selectedRowKeysList[i].flowStatus == 'Results to be submitted') { + ids.push(this.selectedRowKeysList[i].id) + } else { + notConditions.push(this.selectedRowKeysList[i].inspectionItem) + } } } - if (isTrue) { - this.$refs.referenceDeliverablesListRef.transferModel(JSON.parse(JSON.stringify(this.selectedRowKeys))) + if (notConditions && notConditions.length > 0) { + data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataStatusSubmittedCanBeSelected') + detailedWarningList.push(
{data}
) + } + if (notConditionsOne && notConditionsOne.length > 0){ + dataOne = this.$t('inspectionItems') + '"' + notConditionsOne.join('、')+'"'+this.$t('operationWithoutPermission') + detailedWarningList.push(
{dataOne}
) + } + if (ids && ids.length > 0) { + this.$refs.referenceDeliverablesListRef.transferModel(ids,detailedWarningList) + } else { + this.failedMessageOne(detailedWarningList) } } else { this.$message.warning(this.$t('selectLeastOne')) @@ -1738,7 +1767,12 @@ content: ( < div > { detailedWarningList } < /div>) }) }, - + failedMessageOne(data) { + let detailedWarningList = data + this.$warning({ + content: ( < div > { detailedWarningList } < /div>) + }) + }, submitTask(value, prompt, ids, notConditions, data) { let _this = this this.$confirm({