From b780e4742ab7ed38f80cc0bfb6a3a79466f83c27 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Mon, 18 Apr 2022 18:05:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E9=A1=B9=E7=9B=AE=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E7=9A=84=E6=B3=95=E8=A7=84=E6=B8=85=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 | 5 + jero-web/src/common/lang/zh-cn.js | 5 + .../components/listEditModel.vue | 112 +++++++++++++++--- .../components/listOfRegulations.vue | 81 +++++++++++-- 4 files changed, 178 insertions(+), 25 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index e64e815ee..3e45529e1 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -667,4 +667,9 @@ module.exports = { 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', } \ 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 4028232c8..e9361ebfd 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -671,4 +671,9 @@ module.exports = { dataConfirmation:'请选择清单确认状态为未发起或拒绝的数据,以及法规工程师、认证工程师不为空', pleaseSelectPersonFirst:'请先选择人员', onlyOnePersonCanBeSelected:'只能选择一个人员', + overrule:'驳回', + confirmSubmit:'确认提交?', + confirmOverrule:'确认驳回?', + The:'第', + submitted:'条数据已提交不能重复提交', } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/listEditModel.vue b/jero-web/src/views/projectManagement/components/listEditModel.vue index 862d17ff4..e6b09a168 100644 --- a/jero-web/src/views/projectManagement/components/listEditModel.vue +++ b/jero-web/src/views/projectManagement/components/listEditModel.vue @@ -46,7 +46,7 @@ @@ -89,7 +89,7 @@ @@ -127,7 +127,7 @@ @change="dateChange({db_field_name:'xin1Che1Xing2Shi2Shi1Ri4Qi1'})" format="YYYY-MM-DD" v-model="formInline.xin1Che1Xing2Shi2Shi1Ri4Qi1" - :disabled="true" + :disabled="formInline.roleCode == 0 || formInline.roleCode == 1 ? false : true" style="width: 100%"/> @@ -142,7 +142,7 @@ + * {{$t('certificationLevel')}} + * {{$t('areaOfResponsibility')}} @@ -186,11 +188,12 @@ + * {{$t('regulatoryEngineer')}} - + * {{$t('certifiedEngineer')}} + * {{$t('engineeringInterfacePerson')}} @@ -305,7 +312,7 @@ @@ -396,7 +403,7 @@ @@ -571,8 +578,78 @@ editModel(item) { this.visible = true this.$nextTick(() => { + this.rules = {} this.formInline = item + switch (item.roleCode) { + case 0: + this.studioLogic() + break + case 1: + this.statuteLogic() + break + case 2: + this.authenticationLogic() + break + case 3: + this.engineeringLogic() + break + case 4: + this.authenticationOrengineerLogic() + break + } }) + }, + studioLogic() { + this.rules = { + attestationRank: [ + { + required: true, + message: this.$t('certificationLevel') + this.$t('cannotEmpty'), + trigger: 'change' + } + ], + homologationEngineerId: [ + { + required: true, + message: this.$t('certifiedEngineer') + this.$t('cannotEmpty'), + trigger: 'change' + } + ], + regulationOwnerId: [ + { + required: true, + message: this.$t('regulatoryEngineer') + this.$t('cannotEmpty'), + trigger: 'change' + } + ], + engineeringInterfacePerson: [ + { + required: true, + message: this.$t('engineeringInterfacePerson') + this.$t('cannotEmpty'), + trigger: 'change' + } + ] + } + }, + statuteLogic() { + + }, + authenticationLogic() { + this.rules = { + attestationRank: [ + { + required: true, + message: this.$t('certificationLevel') + this.$t('cannotEmpty'), + trigger: 'change' + } + ] + } + }, + engineeringLogic() { + + }, + authenticationOrengineerLogic() { + }, clickButtonToUpload(item) { this.$refs.uploadFile.perentHandleFunc() @@ -685,6 +762,7 @@ line-height: 38px; height: 38px; } + .ant-input-disabled { color: rgba(0, 0, 0, 0.65) !important; } diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index 1f7c5bbbf..78d2bce33 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -40,8 +40,8 @@ - - + + {{$t('initiateListConfirmation')}} @@ -59,7 +59,7 @@ {{$t('fixedPlate')}} - + @@ -88,11 +88,19 @@ {{$t('BatchDelete')}} - - - - - {{$t('batSetting')}} + + + + {{$t('submit')}} + + + + {{$t('overrule')}} + + + + {{$t('batSetting')}} + @@ -533,6 +541,63 @@ } }) }, + getRowKeys(value, callBack) { + let isTrue = true + for (let i = 0; i < this.dataSource.length; i++) { + for (let j = 0; j < value.length; j++) { + if (this.dataSource[i].id == value[j]) { + if (this.dataSource[i].roleCode == 1 && this.dataSource[i].regulationOwnerSubmitStatus) { + isTrue = false + this.$message.warning(this.$t('The') + (i+1) + this.$t('submitted')) + break + } 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 + } + } + } + } + if (isTrue) { + callBack() + } + }, + updateStatusBatch(num, selectedRowKeys) { + let _this = this + let query = { + operatorType: 1, + ids: selectedRowKeys.join(','), + projectLibraryId: _this.$route.query.id, + operatorResult: num + } + getAction(_this.url.updateStatusBatch, query).then((res) => { + if (res.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.visible = false + _this.confirmLoading = false + _this.getList() + } else { + _this.$message.warning(_this.$t('operationFailed')) + _this.confirmLoading = false + } + }) + }, + submitClick(num) { + let _this = this + if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + this.$confirm({ + content: num == 0 ? _this.$t('confirmSubmit') : _this.$t('confirmOverrule'), + onOk() { + let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys)) + _this.getRowKeys(selectedRowKeys, function() { + _this.updateStatusBatch(num, selectedRowKeys) + }) + } + }) + } else { + this.$message.warning(this.$t('selectLeastOne')) + } + }, handleCancel() { this.formInline = {} this.visible = false