From d1f53980166a8ba4fe0c173471a536f8735013ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Mon, 20 Mar 2023 10:26:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=95=E8=A7=84=E6=B8=85?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 9 +- jero-web/src/common/lang/zh-cn.js | 9 +- .../components/listOfRegulations.vue | 260 ++++++++---------- 3 files changed, 125 insertions(+), 153 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index d58817f63..8d65e149b 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1663,5 +1663,12 @@ module.exports = { project:'Project', Categoryofdeliverables:'Category of deliverables', Taskconfirmationresult:'Task confirmation result', - Compliancetaskhandling:'Compliance task handling' + Compliancetaskhandling:'Compliance task handling', + theDataYouSelectedContainsSkip:'The data you selected contains data with a blank deliverable type;Please confirm whether to skip', + designComplianceProcessFor:'Design compliance process for', + validationComplianceProcessFor:'Validation compliance process for', + thePersonResponsibleForVerifyingEmpty:'The person responsible for verifying the compliance process cannot be empty', + theDeadlineComplianceProcessCannotEmpty:'The deadline for the validation compliance process cannot be empty', + theDeadlineForTheDesignCannotBeEmpty:'The deadline for the design compliance process cannot be empty', + thePersonResponsibleForDesignCannotBeBlank:'The person responsible for designing the compliance process cannot be empty', } \ 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 843fb1395..ab38856b9 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1762,7 +1762,12 @@ module.exports = { taskname:'任务名称', updatereleasetime:'升级发布时间', upgradeplanexpirationtime:'升级计划截止时间', - - + theDataYouSelectedContainsSkip:'您所勾选的数据中包含交付物类型为空的数据;请确认是否跳过', + designComplianceProcessFor:'的设计符合性流程', + validationComplianceProcessFor:'的验证符合性流程', + thePersonResponsibleForVerifyingEmpty:'验证符合性流程的责任人不能为空', + theDeadlineComplianceProcessCannotEmpty:'验证符合性流程的截止时间不能为空', + theDeadlineForTheDesignCannotBeEmpty:'设计符合性流程的截止时间不能为空', + thePersonResponsibleForDesignCannotBeBlank:'设计符合性流程的责任人不能为空', } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index c7c7ce3a9..745f63f1c 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -231,12 +231,12 @@ {{ $t('withdraw') }} -
+
{{ $t('initiateTask') }}
-
+
{{ $t('sendBack') }}
@@ -2076,19 +2076,6 @@ this.detailedSuccessList = [] this.detailedWarningList = [] }) - } else { - let TaskSuccessList = JSON.parse(JSON.stringify(this.TaskSuccessList)) - for (let i = 0; i < TaskSuccessList.length; i++) { - TaskSuccessList[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate - Object.keys(TaskSuccessList[i]).forEach(res => { - if (TaskSuccessList[i][res] && TaskSuccessList[i][res] instanceof String) { - TaskSuccessList[i][res] = TaskSuccessList[i][res].replace(/\"/g, '“') - TaskSuccessList[i][res] = TaskSuccessList[i][res].replace(/\'/g, '‘') - } - }) - } - this.confirmLoading = true - this.startProcess(TaskSuccessList) } } }) @@ -2100,8 +2087,7 @@ projectLawsInvnetoryList: value, projectNameId: this.$route.query.projectNameId, projectName: this.$route.query.projectName, - projectLawsInventoryId: value.id, - taskAffirmDueDate: this.formInline.taskAffirmDueDate + projectLawsInventoryId: value.id } postAction('/workFlow/startProcess', query).then((res) => { if (res.success) { @@ -2109,18 +2095,7 @@ this.selectedRowKeys = [] this.$message.success(this.$t('OperationSuccessful')) this.confirmLoading = false - this.getList() - let that = this - if (this.TaskWarningList.length > 0) { - this.$warning({ - content: ( - < div > - { that.TaskWarningList } - < /div> - ) - }) - } - // this.completeTask(value, res.result, index) + this.completeTask(value, res.result) } else { this.$message.warning(this.$t('operationFailed')) } @@ -2166,122 +2141,7 @@ }) }, - getRowKeys(value, num, callBack) { - let isTrue = true - let dataSource = [] - for (let i = 0; i < this.dataSource.length; i++) { - for (let j = 0; j < value.length; j++) { - if (this.dataSource[i].id == value[j]) { - dataSource.push(this.dataSource[i]) - } - } - } - this.rowKeysSuccessList = [] - this.rowKeysWarningList = [] - for (let i = 0; i < dataSource.length; i++) { - if (dataSource[i].inventoryAffirmStatus == 'List to confirm' || dataSource[i].inventoryAffirmStatus == 'Rejected') { - if (dataSource[i].roleCode == 1 && dataSource[i].regulationOwnerSubmitStatus) { - - this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>) - continue - } else if (dataSource[i].roleCode == 2 && dataSource[i].homologationEngineerSubmitStatus) { - - this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>) - continue - } else if (dataSource[i].roleCode == 4 && (dataSource[i].homologationEngineerSubmitStatus && dataSource[i].regulationOwnerSubmitStatus)) { - - this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>) - continue - } - if (num == 1) { - if ((dataSource[i].designInitiatorId == dataSource[i].regulationOwnerId - && dataSource[i].designInitiatorId == this.userInfo().id) || - (dataSource[i].designInitiatorId == dataSource[i].homologationEngineerId - && dataSource[i].designInitiatorId == this.userInfo().id)) { - if (!dataSource[i].designDutyId && !dataSource[i].designDueDate) { - this.rowKeysWarningList.push( - < div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>) - continue - } else if (!dataSource[i].designDutyId) { - this.rowKeysWarningList.push( - < div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theResponsiblePersonEmpty') } < /div>) - continue - } else if (!dataSource[i].designDueDate) { - this.rowKeysWarningList.push( - < div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theDeadlineEmpty') } < /div>) - continue - } else if (!dataSource[i].designDeliverableType) { - this.rowKeysWarningList.push( - < div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theDeliveryTypeCannotBeEmpty') } < /div>) - continue - } - } - if ((dataSource[i].prehomoInitiatorId == dataSource[i].regulationOwnerId - && dataSource[i].prehomoInitiatorId == this.userInfo().id) || - (dataSource[i].prehomoInitiatorId == dataSource[i].homologationEngineerId - && dataSource[i].prehomoInitiatorId == this.userInfo().id)) { - if (!dataSource[i].prehomoDutyId && !dataSource[i].prehomoDueDate) { - this.rowKeysWarningList.push( - < div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>) - continue - } else if (!dataSource[i].prehomoDutyId) { - this.rowKeysWarningList.push( - < div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theResponsiblePersonEmpty') } < /div>) - continue - } else if (!dataSource[i].prehomoDueDate) { - this.rowKeysWarningList.push( - < div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theDeadlineEmpty') } < /div>) - continue - } else if (!dataSource[i].prehomoDeliverableType) { - this.rowKeysWarningList.push( - < div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theDeliveryTypeCannotBeEmpty') } < /div>) - continue - } - } - if ((dataSource[i].verifyInitiatorId == dataSource[i].regulationOwnerId - && dataSource[i].verifyInitiatorId == this.userInfo().id) || - (dataSource[i].verifyInitiatorId == dataSource[i].homologationEngineerId - && dataSource[i].verifyInitiatorId == this.userInfo().id)) { - if (!dataSource[i].verifyDutyId && !dataSource[i].verifyDueDate) { - this.rowKeysWarningList.push( - < div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>) - continue - } else if (!dataSource[i].verifyDutyId) { - this.rowKeysWarningList.push( - < div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theResponsiblePersonEmpty') } < /div>) - continue - } else if (!dataSource[i].verifyDueDate) { - this.rowKeysWarningList.push( - < div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theDeadlineEmpty') } < /div>) - continue - } else if (!dataSource[i].verifyDeliverableType) { - this.rowKeysWarningList.push( - < div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theDeliveryTypeCannotBeEmpty') } < /div>) - continue - } - } - } - this.rowKeysSuccessList.push(dataSource[i]) - } else { - this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('incorrectsubmitted') } < /div>) - } - } - - if (this.rowKeysSuccessList && this.rowKeysSuccessList.length > 0) { - callBack && callBack() - } else { - let that = this - this.$warning({ - content: ( - < div > - { that.rowKeysWarningList } - < /div> - ) - }) - } - }, - - sendBackClick() { + submitOrSendBackClick(num) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { this.detailedWarningList = [] let dataSource = [] @@ -2305,11 +2165,15 @@ } } if (idList && idList.length > 0) { - this.visibleComment = true - this.formInlineComment = {} - this.$nextTick(() => { - this.$refs.ruleFormComment.clearValidate() - }) + if (num == 0) { + this.submitClick(this.rowKeysSuccessList, 1) + } else { + this.visibleComment = true + this.formInlineComment = {} + this.$nextTick(() => { + this.$refs.ruleFormComment.clearValidate() + }) + } } else { this.promptInformation(this.detailedWarningList) } @@ -2317,6 +2181,94 @@ this.$message.warning(this.$t('selectLeastOne')) } }, + submitClick(dataList, num) { + let content = [] + let designList = [] + let verifyList = [] + let detailedWarningList = [] + this.detailedWarningList = [] + let _this = this + _this.$destroyAll() + if (num == 1) { + for (let i = 0; i < dataList.length; i++) { + if (!dataList[i].designDeliverableType && !dataList[i].designDutyId && !dataList[i].designDueDate) { + content.push(dataList[i]) + continue + } + if (!dataList[i].verifyDeliverableType && !dataList[i].verifyDutyId && !dataList[i].verifyDueDate) { + content.push(dataList[i]) + continue + } + } + } + if (content && content.length > 0) { + for (let i = 0; i < content.length; i++) { + if (!content[i].designDeliverableType) { + designList.push(content[i].serialNumber) + } + if (!content[i].verifyDeliverableType) { + verifyList.push(content[i].serialNumber) + } + } + if (designList.length > 0 || verifyList.length > 0) { + detailedWarningList.push( + < div > { this.$t('theDataYouSelectedContainsSkip') } < /div>) + } + if (designList.length > 0) { + detailedWarningList.push( + < div > { designList.join(',') + ' ' + this.$t('designComplianceProcessFor') } < /div>) + } + if (verifyList.length > 0) { + detailedWarningList.push( + < div > { verifyList.join(',') + ' ' + this.$t('validationComplianceProcessFor') } < /div>) + } + this.$confirm({ + content: detailedWarningList, + class: 'confirmClass', + onOk() { + _this.submitClick(dataList, 2) + } + }) + return + } + this.$confirm({ + content: _this.$t('confirmLaunchTask'), + onOk() { + _this.submitAdmin(dataList) + } + }) + }, + submitAdmin(dataList) { + let _this = this + for (let i = 0; i < dataList.length; i++) { + if (dataList[i].designDeliverableType) { + if (!dataList[i].designDutyId) { + _this.detailedWarningList.push( + < div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForDesignCannotBeBlank') } < /div>) + } + if (!dataList[i].designDueDate) { + _this.detailedWarningList.push( + < div > { dataList[i].serialNumber + _this.$t('theDeadlineForTheDesignCannotBeEmpty') } < /div>) + } + } + if (dataList[i].verifyDeliverableType) { + if (!dataList[i].verifyDueDate) { + _this.detailedWarningList.push( + < div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForVerifyingEmpty') } < /div>) + } + if (!dataList[i].verifyDutyId) { + _this.detailedWarningList.push( + < div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForVerifyingEmpty') } < /div>) + } + } + if (dataList[i].designDeliverableType && dataList[i].designDutyId && dataList[i].designDueDate) { + _this.startProcess(dataList[i], 2) + } + if (dataList[i].verifyDeliverableType && dataList[i].verifyDutyId && dataList[i].verifyDueDate) { + _this.startProcess(dataList[i], 2) + } + } + }, handleOkComment() { this.$refs.ruleFormComment.validate(valid => { if (valid) { @@ -2895,5 +2847,13 @@ touch-action: none; } + .confirmClass .ant-modal-confirm-body { + display: flex; + } + + .confirmClass .ant-modal-confirm-body .ant-modal-confirm-content { + margin-top: 0 !important; + } + /* 插件 end */ \ No newline at end of file