From 9948b7b3ff43a189eecfedd45e3c7fb0b3c02250 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Mon, 25 Apr 2022 14:53:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=8F=A1=E6=89=8B=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 101 +++++------ jero-web/src/common/lang/zh-cn.js | 1 + .../components/listOfRegulations.vue | 164 ++++++++++++++---- 3 files changed, 181 insertions(+), 85 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index e3d0515b3..9f7838e41 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -662,58 +662,59 @@ module.exports = { alteration: 'alteration', fixedPlate: 'Fixed plate', taskAffirmStatus: 'task Affirm Status', - listConfirmationStatus:'List confirmation status', - ListConfirmationDeadline:'List confirmation deadline', - dataConfirmation:'Please select the data whose list confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty', - pleaseSelectPersonFirst:'Please select a person first', - onlyOnePersonCanBeSelected:'Only one person can be selected', - overrule:'overrule', - confirmSubmit:'confirm Submit', - confirmOverrule:'confirm Overrule', - The:'The', - submitted:'Data has been submitted and cannot be submitted again', - basicInformationOfParameters:'Basic information of parameters', - regulatoryCertificationTaskPlan:'Regulatory / certification task plan', - bringInRelevantPersonnel:'Bring in relevant personnel', - confirmBringInRelevantPersonnel:'confirm Bring in relevant personnel', - problemType:'Problem type', - projectDetails:'Project details', - listOfRegulations:'List of regulations', - taskList:'Task list', - TaskParameterCollection:'Task parameter collection', - nonConformance:'Non conformance', - deadlineForConfirmationOfDesignCompliance:'Deadline for confirmation of design compliance', - prehomoConfirmationDeadline:'Prehomo confirmation deadline', - verificationComplianceConfirmationDeadline:'Verification compliance confirmation deadline', - pleaseEnterTheCorrectWebAddress:'Please enter the correct web address', - updateTime:'update Time', - comment:'comment', - historicalVersion:'Historical version', - versionName:'Version name', - finalizationTime:'Finalization time', - setting:'setting', - incorrectsubmitted:'The data status is incorrect; Only data with status to be confirmed can be submitted', - date:'date', - time:'time', - uploadMaximumATime:'upload a maximum of 20 images at a time', + listConfirmationStatus: 'List confirmation status', + ListConfirmationDeadline: 'List confirmation deadline', + dataConfirmation: 'Please select the data whose list confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty', + pleaseSelectPersonFirst: 'Please select a person first', + onlyOnePersonCanBeSelected: 'Only one person can be selected', + overrule: 'overrule', + confirmSubmit: 'confirm Submit', + confirmOverrule: 'confirm Overrule', + The: 'The', + submitted: 'Data has been submitted and cannot be submitted again', + basicInformationOfParameters: 'Basic information of parameters', + regulatoryCertificationTaskPlan: 'Regulatory / certification task plan', + bringInRelevantPersonnel: 'Bring in relevant personnel', + confirmBringInRelevantPersonnel: 'confirm Bring in relevant personnel', + problemType: 'Problem type', + projectDetails: 'Project details', + listOfRegulations: 'List of regulations', + taskList: 'Task list', + TaskParameterCollection: 'Task parameter collection', + nonConformance: 'Non conformance', + deadlineForConfirmationOfDesignCompliance: 'Deadline for confirmation of design compliance', + prehomoConfirmationDeadline: 'Prehomo confirmation deadline', + verificationComplianceConfirmationDeadline: 'Verification compliance confirmation deadline', + pleaseEnterTheCorrectWebAddress: 'Please enter the correct web address', + updateTime: 'update Time', + comment: 'comment', + historicalVersion: 'Historical version', + versionName: 'Version name', + finalizationTime: 'Finalization time', + setting: 'setting', + incorrectsubmitted: 'The data status is incorrect; Only data with status to be confirmed can be submitted', + date: 'date', + time: 'time', + uploadMaximumATime: 'upload a maximum of 20 images at a time', - confirmationOfRegulationsList:'Confirmation of regulations list', - regulatoryTaskConfirmation:'Regulatory task confirmation', - certificationStart:'Certification start', - certificationEnd:'Certification end', - directoryName:'Directory name', - batch:'batch', - uploadTime:'Upload time', - enclosure:'enclosure', + confirmationOfRegulationsList: 'Confirmation of regulations list', + regulatoryTaskConfirmation: 'Regulatory task confirmation', + certificationStart: 'Certification start', + certificationEnd: 'Certification end', + directoryName: 'Directory name', + batch: 'batch', + uploadTime: 'Upload time', + enclosure: 'enclosure', // 认证 parameterTemplate: 'parameter Template', contentDescription: 'content Description', - circulationInformation:'Circulation information', - circulationHistory:'circulation History', - agree:'agree', - disagree:'disagree', - feedbackMessage:'Feedback Message', - result:'result', - opinion:'opinion', - operationNode:'operation node', + circulationInformation: 'Circulation information', + circulationHistory: 'circulation History', + agree: 'agree', + disagree: 'disagree', + feedbackMessage: 'Feedback Message', + result: 'result', + opinion: 'opinion', + operationNode: 'operation node', + taskDataConfirmation: 'Please select the data whose list confirmation status is accepted and task confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not 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 3f7cecf84..4cf35cdea 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -669,6 +669,7 @@ module.exports = { listConfirmationStatus:'清单确认状态', ListConfirmationDeadline:'清单确认截止时间', dataConfirmation:'请选择清单确认状态为未发起或拒绝的数据,以及法规工程师、认证工程师不为空', + taskDataConfirmation:'请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据,以及法规工程师、认证工程师不为空', pleaseSelectPersonFirst:'请先选择人员', onlyOnePersonCanBeSelected:'只能选择一个人员', overrule:'驳回', diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index 57780aca8..6a0d12b3a 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -46,11 +46,11 @@
-
+
{{ $t('initiateListConfirmation') }}
-
+
{{ $t('initiateTaskConfirmation') }}
@@ -202,7 +202,7 @@ {{ $t('TaskCutOffTime') }}
- + + + +
@@ -485,6 +493,7 @@ } ], visibleFile: false, + timeName: '', dataSourceFile: [], confirmLoading: false, queryParamQuery: {}, @@ -499,6 +508,13 @@ message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'), trigger: 'change' } + ], + taskAffirmDueDate: [ + { + required: true, + message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'), + trigger: 'change' + } ] }, queryParam: {}, @@ -711,22 +727,57 @@ getPersonnelList() { this.getList() }, - initiateListConfirmationcClick() { + initiateListConfirmationcClick(name) { + this.timeName = name if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) - this.dataSource.forEach(res => { - selectedRowKeys.forEach(val => { - if (res.id == val) { - if ((res.inventoryAffirmStatus == 'Not started' || res.inventoryAffirmStatus == 'rejected') && - res.homologationEngineerId && res.regulationOwnerId) { - this.visible = true - this.formInline = {} + let isTrue = true + 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.inventoryAffirmStatus == 'Not started' || this.dataSource.inventoryAffirmStatus == 'rejected') && + this.dataSource.homologationEngineerId && this.dataSource.regulationOwnerId) { + isTrue = true } else { this.$message.warning(this.$t('dataConfirmation')) + isTrue = false + return } } - }) - }) + } + } + if (isTrue) { + this.visible = true + this.formInline = {} + } + } else { + this.$message.warning(this.$t('selectLeastOne')) + } + }, + initiateTaskConfirmationClick(name) { + this.timeName = name + if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) + let isTrue = true + 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 == 'Not started' || this.dataSource[i].taskAffirmStatus == 'rejected') && + this.dataSource[i].homologationEngineerId && this.dataSource[i].regulationOwnerId + && this.dataSource[i].inventoryAffirmStatus == 'accepted') { + isTrue = true + } else { + isTrue = false + this.$message.warning(this.$t('taskDataConfirmation')) + return + } + } + } + } + if (isTrue) { + this.visible = true + this.formInline = {} + } } else { this.$message.warning(this.$t('selectLeastOne')) } @@ -735,25 +786,68 @@ this.$refs.ruleForm.validate(valid => { if (valid) { let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) - let query = { - operatorType: 0, - ids: selectedRowKeys.join(','), - projectLibraryId: this.$route.query.id, - ...this.formInline - } - this.confirmLoading = true - getAction(this.url.updateStatusBatch, 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(this.$t('operationFailed')) - this.confirmLoading = false + if (this.timeName == '清单') { + let query = { + operatorType: 0, + ids: selectedRowKeys.join(','), + projectLibraryId: this.$route.query.id, + ...this.formInline } - }) + this.confirmLoading = true + getAction(this.url.updateStatusBatch, 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(this.$t('operationFailed')) + this.confirmLoading = false + } + }) + } else { + for (let i = 0; i < this.dataSource.length; i++) { + for (let j = 0; j < selectedRowKeys.length; j++) { + if (this.dataSource[i].id == selectedRowKeys[j]) { + this.dataSource[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate + Object.keys(this.dataSource[i]).forEach(res => { + if (this.dataSource[i][res] && this.dataSource[i][res] instanceof String) { + this.dataSource[i][res] = this.dataSource[i][res].replace(/\"/g, '“') + this.dataSource[i][res] = this.dataSource[i][res].replace(/\'/g, '‘') + } + }) + let data = JSON.stringify(this.dataSource[i]).replace(/\"/g, '\'') + setTimeout(() => { + this.startProcess(data) + }, 500) + } + } + } + } + } + }) + }, + startProcess(value) { + let query = { + type: 1, + msg: JSON.stringify(value) + } + postAction('/workFlow/startProcess', query).then((res) => { + if (res.success) { + this.completeTask(value, res.result) + } + }) + }, + completeTask(value, taskId) { + let query = { + userid: this.userInfo().id, + taskId: taskId, + json: value + } + postAction('/workFlow/completeTask', query).then((res) => { + if (res.success) { + } }) }, @@ -766,20 +860,20 @@ if (this.dataSource[i].roleCode == 1 && this.dataSource[i].regulationOwnerSubmitStatus) { isTrue = false this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted')) - break + return } else if (this.dataSource[i].roleCode == 2 && this.dataSource[i].homologationEngineerSubmitStatus) { isTrue = false this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted')) - break + return } else if (this.dataSource[i].roleCode == 4 && (this.dataSource[i].homologationEngineerSubmitStatus && this.dataSource[i].regulationOwnerSubmitStatus)) { isTrue = false this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted')) - break + return } } else { isTrue = false this.$message.warning(this.$t('The') + (i + 1) + this.$t('incorrectsubmitted')) - break + return } } }