diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 2253642ca..eac083439 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1394,4 +1394,5 @@ module.exports = { nameOfManufacturer:'Name Of Manufacturer', regulationNo:'Regulation No', itemInformation:'Item Information', + modifyHistory:'Modify History', } \ 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 87d5c0993..ce91d5d33 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1495,4 +1495,5 @@ module.exports = { nameOfManufacturer:'生产企业名称', regulationNo:'法规编号', itemInformation:'条目信息', + modifyHistory:'修改历史', } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue b/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue index c755d0570..8c5b56716 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue @@ -20,12 +20,13 @@ + @change="serialNumberChange" + v-model="formInline.bussDocumentLibraryId"> - - {{ item.projectName}} + + {{ item.serialNumber}} @@ -46,12 +47,167 @@ -
-
- {{$t('itemInformation')}} - - +
+
+
+ {{$t('itemInformation')}} + + +
+ + +
+
+ * + {{$t('category')}} +
+ + + +
+
+ +
+
+ * + {{$t('inspectionItems')}} +
+ + + +
+
+
+ + + +
+
+ * + {{$t('typeOfDeliverables')}} +
+ + + +
+
+ +
+
+ {{$t('deliverableTemplate')}} +
+ + + {{ (item.deliverableTemplate === 'null' || item.deliverableTemplate === '' + || + item.deliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles') + }} + + +
+
+
+ + + +
+
+ * + {{$t('areaOfResponsibility')}} +
+ + + +
+
+ +
+
+ * + {{$t('engineeringInterfacePerson')}} +
+ + + +
+
+
+ + + +
+
+ * + {{$t('personLiable')}} +
+ + + +
+
+
+
+ +
@@ -59,7 +215,10 @@ * {{$t('category')}}
- + @@ -72,7 +231,8 @@ * {{$t('inspectionItems')}}
- + @@ -88,7 +248,10 @@ * {{$t('typeOfDeliverables')}}
- + {{$t('areaOfResponsibility')}}
- - + + @@ -144,10 +310,13 @@ * {{$t('engineeringInterfacePerson')}} - + @@ -163,10 +332,13 @@ * {{$t('personLiable')}} - + @@ -175,7 +347,6 @@ - @@ -213,7 +384,6 @@ PersonnelSelection, uploadFile }, - props: ['url'], data() { return { formInline: {}, @@ -242,11 +412,7 @@ } ], category: [ - { - required: true, - message: this.$t('category') + this.$t('regulationNo'), - trigger: 'change' - }, + { required: true, message: this.$t('category') + this.$t('cannotEmpty'), trigger: 'blur' }, { max: 300, message: this.$t('category') + this.$t('cannotExceed') + 300 + this.$t('Characters'), @@ -254,11 +420,7 @@ } ], inspectionItem: [ - { - required: true, - message: this.$t('inspectionItems') + this.$t('regulationNo'), - trigger: 'change' - }, + { required: true, message: this.$t('inspectionItems') + this.$t('cannotEmpty'), trigger: 'blur' }, { max: 300, message: this.$t('inspectionItems') + this.$t('cannotExceed') + 300 + this.$t('Characters'), @@ -266,11 +428,7 @@ } ], deliverableType: [ - { - required: true, - message: this.$t('typeOfDeliverables') + this.$t('cannotEmpty'), - trigger: 'change' - } + { required: true, message: this.$t('typeOfDeliverables') + this.$t('cannotEmpty'), trigger: 'change' } ], dutyTerritory: [ { @@ -299,10 +457,17 @@ title: '', DeliverableTreeList: [], uploadName: '', + numIndex: 0, + url: { + add: '/project/projectCertificationInventoryEO/batchAdd', + edit: '/project/projectCertificationInventoryEO/edit', + list: '/project/projectLawsInventoryEO/list' + } } }, mounted() { this.getDeliverableTree() + this.getRegulationNo() }, methods: { ...mapGetters(['userInfo']), @@ -315,18 +480,23 @@ } }) }, + addModel() { this.visible = true this.title = this.$t('add') this.formInline = {} + this.getRegulationNo() this.formInline.dataList = [{}] - this.formInline = {...this.formInline} + this.formInline = { ...this.formInline } this.$nextTick(() => { this.$refs.ruleForm.clearValidate() }) }, editModel(value) { + this.formInline = {} this.visible = true + this.formInline = value + this.getRegulationNo() this.title = this.$t('edit') this.$nextTick(() => { this.$refs.ruleForm.clearValidate() @@ -340,26 +510,35 @@ if (valid) { let url = '' let Action + let query = JSON.parse(JSON.stringify(this.formInline)) if (this.formInline.id) { url = this.url.edit Action = putAction + Object.keys(query).forEach(res => { + if (query[res] && query[res] instanceof Array) { + query[res] = query[res].join(',') + } + }) + query.projectLibraryId = this.$route.query.id } else { url = this.url.add Action = postAction + query.dataList.forEach(val => { + Object.keys(val).forEach(res => { + if (val[res] && val[res] instanceof Array) { + val[res] = val[res].join(',') + } + }) + }) + query.projectLibraryId = this.$route.query.id } - let query = JSON.parse(JSON.stringify(this.formInline)) - Object.keys(query).forEach(res => { - if (query[res] && query[res] instanceof Array) { - query[res] = query[res].join(',') - } - }) this.confirmLoading = true Action(url, query).then((res) => { if (res.success) { this.confirmLoading = false this.$message.success(this.$t('OperationSuccessful')) this.visible = false - this.$emit('addModelList') + this.$emit('addModelForm') } else { this.$message.warning(res.message) this.confirmLoading = false @@ -374,11 +553,16 @@ this.$refs.ruleForm.validateField([value]) }) }, - PersonnelSelectionChange(value, id) { - this.formInline[value] = id + PersonnelSelectionChange(value, id, index) { + if (this.formInline.id) { + this.formInline[value] = id + } else { + this.formInline.dataList[index][value] = id + } this.formInline = { ...this.formInline } }, - clickButtonToUpload(item) { + clickButtonToUpload(item, index) { + this.numIndex = index this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.visible = true this.uploadName = item @@ -399,13 +583,41 @@ }) } /** 赋值给当前对应的表单文件 */ - this.formInline[this.uploadName] = attIdList.join(',') + if (this.formInline.id) { + this.formInline[this.uploadName] = attIdList.join(',') + } else { + this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',') + } this.formInline = { ...this.formInline } }, - addClick(index){ - this.formInline.dataList.splice(1,index,{}) - this.formInline = {...this.formInline} + addClick(index) { + this.formInline.dataList.splice(index + 1, 0, {}) + this.formInline = { ...this.formInline } }, + deleteClick(index) { + this.formInline.dataList.splice(index, 1) + this.formInline = { ...this.formInline } + }, + getRegulationNo() { + let query = { + projectLibraryId: this.$route.query.id, + roleCode: 0 + } + getAction(this.url.list, query).then((res) => { + if (res.success) { + this.projectNameList = res.result || [] + } else { + this.projectNameList = [] + } + }) + }, + serialNumberChange(value) { + let content = this.projectNameList.filter(res => { + return res.id === value + }) + this.formInline.bussDocumentLibraryId = content[0].id + this.formInline.serialNumber = content[0].serialNumber + } } } @@ -539,6 +751,10 @@ font-size: 16px; margin-right: 4px; } + + ::v-deep .ant-form-item-with-help { + margin-bottom: 25px; + }