From e6df3732ea7c1505ef4cf92e492c83079bf4676b Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Wed, 15 Jun 2022 17:29:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=82=AC=E5=8A=9E=E6=8C=89?= =?UTF-8?q?=E9=92=AE=20=E4=BF=AE=E6=94=B9=E7=9C=8B=E6=9D=BF?= 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 | 3 +- .../components/listOfRegulations.vue | 54 ++++++++++++------- 3 files changed, 38 insertions(+), 20 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 7fa39645c..2a3c29268 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -937,4 +937,5 @@ module.exports = { documentLibraryDetails: 'Document library details', question:'Question', ConfirmQuestion:'Confirm Question', + OnlyOrTaskconfirmationOut:'Only when the list confirmation status or task confirmation status is to be confirmed can the reminder be carried out', } \ 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 79b7d3a02..a24d204cf 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -941,5 +941,6 @@ module.exports = { setCreator: '设置创建人', documentLibraryDetails: '文档库详情', question: '催办', - ConfirmQuestion: '确认催办?' + ConfirmQuestion: '确认催办?', + OnlyOrTaskconfirmationOut:'只有清单确认状态或任务确认状态为待确认时才可以进行催办', } \ 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 1b4758df3..b5192ad92 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -89,7 +89,7 @@ {{ $t('bringInRelevantPersonnel') }}
- + {{ $t('ExportReport') }}
@@ -97,7 +97,7 @@ {{ $t('batSetting') }}
- + {{ $t('question') }}
@@ -978,26 +978,42 @@ questionClick() { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) - let _this = this - this.$confirm({ - content: _this.$t('ConfirmQuestion'), - onOk() { - let query = { - ids: selectedRowKeys.join(','), - projectLibraryId: _this.$route.query.id - } - postAction('project/projectLawsInventoryEO/expediting', query).then((res) => { - if (res.success) { - _this.$message.success(_this.$t('OperationSuccessful')) - _this.selectedRowKeys = [] - _this.getList() + let isTrue + for (let i = 0; i < this.dataSource.length; i++) { + for (let j = 0; j < selectedRowKeys.length; j++) { + if (this.dataSource[i].id == selectedRowKeys[j]) { + if (this.dataSource[i].taskAffirmStatus == 'List to confirm' || + this.dataSource[i].inventoryAffirmStatus == 'List to confirm') { + isTrue = true } else { - _this.$message.warning(_this.$t('operationFailed')) + isTrue = false + this.$message.warning(this.$t('OnlyOrTaskconfirmationOut')) + return } - }) + } } - }) - + } + if (isTrue) { + let _this = this + this.$confirm({ + content: _this.$t('ConfirmQuestion'), + onOk() { + let query = { + ids: selectedRowKeys.join(','), + projectLibraryId: _this.$route.query.id + } + postAction('project/projectLawsInventoryEO/expediting', query).then((res) => { + if (res.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.selectedRowKeys = [] + _this.getList() + } else { + _this.$message.warning(_this.$t('operationFailed')) + } + }) + } + }) + } } else { this.$message.warning(this.$t('selectLeastOne')) }