diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index db42bba91..1a0963aaa 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -1615,7 +1615,7 @@ }) }, - getRowKeys(value, callBack) { + getRowKeys(value,num, callBack) { let isTrue = true let dataSource = [] for (let i = 0; i < this.dataSource.length; i++) { @@ -1651,35 +1651,36 @@ // this.$message.warning(dataSource[i].serialNumber + this.$t('submitted')) // return } - 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 - } - } - 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 + 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 + } } - } - 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 + 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 + } + } + 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 + } } } this.rowKeysSuccessList.push(dataSource[i]) - } else { this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('incorrectsubmitted') } < /div>) // isTrue = false @@ -1760,12 +1761,12 @@ onOk() { if (num == 0) { let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys)) - _this.getRowKeys(selectedRowKeys, function() { + _this.getRowKeys(selectedRowKeys, 1,function() { _this.updateStatusBatch(num, selectedRowKeys) }) } else { let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys)) - _this.getRowKeys(selectedRowKeys, function() { + _this.getRowKeys(selectedRowKeys, 2,function() { _this.visibleComment = true }) }