From e077af041a9fc1cb03da67cff46aaaa462bc9457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Tue, 14 Mar 2023 09:35:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E8=AE=A4=E8=AF=81=E6=B8=85?= =?UTF-8?q?=E5=8D=95=E5=BC=95=E7=94=A8=E4=BA=A4=E4=BB=98=E7=89=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 2 + jero-web/src/common/lang/zh-cn.js | 1 + .../components/certificationList/index.vue | 177 +++++++++++------- 3 files changed, 115 insertions(+), 65 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index a0c68e4cf..a3cae3c90 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1432,4 +1432,6 @@ module.exports = { onlyDataSelected:'Only data with process status of task to be confirmed, result to be submitted and review to be returned can be selected', youCannotStatusListToBeReleasedAndApproved:'You cannot select data whose process status is list to be released and approved', batchmodify:'Whether to batch modify', + onlyDataListReleasedAndCertificationReturnCanSelected:'Only data with the process status of list to be released and certification return can be selected' + } \ 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 c8e9b2da5..94cd7224c 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1534,4 +1534,5 @@ module.exports = { onlyDataSelected:'只能选择流程状态为任务待确认、结果待提交、审查退回的数据', youCannotStatusListToBeReleasedAndApproved:'不能选择流程状态为清单待发布、审查通过的数据', batchmodify:'是否批量修改', + onlyDataListReleasedAndCertificationReturnCanSelected:'只能选择流程状态为清单待发布和认证退回的数据' } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index 235e5a8be..a25062eba 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -355,41 +355,41 @@ - - - - - -
-
- * - {{ $t('TaskCutOffTime') }} -
- - - -
-
-
-
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0) { + let ids = [] + let notConditions = [] + for (let i = 0; i < this.selectedRowKeysList.length; i++) { + if (this.selectedRowKeysList[i].flowStatus == 'List to be released' || + this.selectedRowKeysList[i].flowStatus == 'Certification returned') { + ids.push(this.selectedRowKeysList[i].id) + } else { + notConditions.push(this.selectedRowKeysList[i].inspectionItem) + } + } + let data = '' + if (notConditions && notConditions.length > 0) { + data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataListReleasedAndCertificationReturnCanSelected') + } + if (ids && ids.length > 0) { + this.releaseData(ids, notConditions, data) + } else { + this.failedMessage(data) + } } else { - this.visible = true + this.$message.warning(this.$t('selectLeastOne')) } }, - handleOk() { - this.$refs.ruleForm.validate(valid => { - if (valid) { - let selectedRowKeys = [] - this.selectedRowKeysList.forEach(res => { - selectedRowKeys.push(res.id) - }) - let query = { - ids: selectedRowKeys.join(','), - projectLibraryId: this.$route.query.id, - ...this.formInline - } - this.confirmLoading = true - postAction('/project/projectCertificationInventoryEO/issue', query).then((res) => { + releaseData(ids, notConditions, data){ + let _this = this + this.$confirm({ + content: _this.$t('confirmRelease'), + onOk() { + postAction('/project/projectCertificationInventoryEO/issue', { + ids: ids.join(','), + projectLibraryId: _this.$route.query.id, + }).then((res) => { if (res.success) { - this.$message.success(this.$t('OperationSuccessful')) - this.visible = false - this.selectedRowKeys = [] - this.confirmLoading = false - this.getList() + _this.$message.success(_this.$t('OperationSuccessful')) + _this.selectedRowKeys = [] + _this.selectedRowKeysList = [] + _this.getList() + if (notConditions && notConditions.length > 0) { + _this.failedMessage(data) + } } else { - this.$message.warning(res.message) - this.confirmLoading = false + _this.$message.warning(res.message) } - this.detailedSuccessList = [] }) } }) }, - handleCancel() { - this.formInline = {} - this.visible = false - }, + // handleOk() { + // this.$refs.ruleForm.validate(valid => { + // if (valid) { + // let selectedRowKeys = [] + // this.selectedRowKeysList.forEach(res => { + // selectedRowKeys.push(res.id) + // }) + // let query = { + // ids: selectedRowKeys.join(','), + // projectLibraryId: this.$route.query.id, + // ...this.formInline + // } + // this.confirmLoading = true + // postAction('/project/projectCertificationInventoryEO/issue', query).then((res) => { + // if (res.success) { + // this.$message.success(this.$t('OperationSuccessful')) + // this.visible = false + // this.selectedRowKeys = [] + // this.confirmLoading = false + // this.getList() + // } else { + // this.$message.warning(res.message) + // this.confirmLoading = false + // } + // this.detailedSuccessList = [] + // }) + // } + // }) + // }, + // handleCancel() { + // this.formInline = {} + // this.visible = false + // }, //撤回 withdrawClick() {