From 07cc48433114407659843f9b316340d4c8ac7ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Tue, 28 Mar 2023 11:00:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8B=B1=E6=96=87-=E8=AE=A4=E8=AF=81=E6=B8=85?= =?UTF-8?q?=E5=8D=95=EF=BC=8C=E4=B8=8A=E4=BC=A0=E9=99=84=E4=BB=B6=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E6=8C=89=E9=92=AE=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95-=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E4=BA=A4=E4=BB=98=E7=89=A9=EF=BC=8C=E5=85=81=E8=AE=B8=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E6=9C=AC=E9=A1=B9=E7=9B=AE=20=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E6=B8=85=E5=8D=95-=E5=BC=95=E7=94=A8=E4=BA=A4=E4=BB=98?= =?UTF-8?q?=E7=89=A9=EF=BC=8C=E5=8F=AF=E4=BB=A5=E5=AF=B9=E9=9D=9E=E6=9C=AC?= =?UTF-8?q?=E4=BA=BA=E5=BE=85=E6=8F=90=E4=BA=A4=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 1 + jero-web/src/common/lang/zh-cn.js | 1 + .../components/referenceDeliverablesList.vue | 21 ++++++- .../components/certificationList/index.vue | 58 +++++++++++++++---- 4 files changed, 66 insertions(+), 15 deletions(-) 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({