From 0dcc9ea2acf7ea1607ddc9cd53d6015093c22028 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:23:23 +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 --- .../certificationList/components/addModel.vue | 188 ++++++++++++------ .../components/batSetting.vue | 58 ++++-- .../components/modifyHistoryList.vue | 48 +++-- .../components/referenceDeliverablesList.vue | 60 ++---- .../components/certificationList/index.vue | 9 +- 5 files changed, 217 insertions(+), 146 deletions(-) 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 f5a011acc..6ad43a1ef 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue @@ -107,13 +107,18 @@ - + + + + + + @@ -130,6 +135,7 @@ > @@ -190,17 +196,25 @@ * {{$t('engineeringInterfacePerson')}} - - + + + + {{ val.name}} + + + @@ -228,28 +242,28 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -297,11 +311,14 @@ class="itemModel" :prop="'configItem'" > - + + + + + + @@ -317,6 +334,7 @@ > @@ -375,16 +393,23 @@ * {{$t('engineeringInterfacePerson')}} - - + + + + {{ item.name}} + + + @@ -523,7 +548,7 @@ trigger: 'change' } ], - sdtName: [ + sdt: [ { required: true, message: this.$t('engineeringInterfacePerson') + this.$t('cannotEmpty'), @@ -537,16 +562,21 @@ trigger: 'change' } ], - endTime:[ + endTime: [ { required: true, message: this.$t('closingDate') + this.$t('cannotEmpty'), trigger: 'change' } ], - configItem:[ - { required: true, message: this.$t('configurationItem') + this.$t('cannotEmpty'), trigger: 'change' }, - ], + configItem: [ + { required: true, message: this.$t('configurationItem') + this.$t('cannotEmpty'), trigger: 'blur' }, + { + max: 300, + message: this.$t('configurationItem') + this.$t('cannotExceed') + 300 + this.$t('Characters'), + trigger: 'blur' + } + ] }, disabled: false, projectNameList: [], @@ -558,7 +588,8 @@ add: '/project/projectCertificationInventoryEO/batchAdd', edit: '/project/projectCertificationInventoryEO/edit', list: '/project/projectLawsInventoryEO/list' - } + }, + engineeringInterfacePersonList: [] } }, mounted() { @@ -570,11 +601,11 @@ disabledDate(current) { return current && current < moment().subtract(1, 'day') }, - dateChange(item,index) { - if (index){ + dateChange(item, index) { + if (index) { this.formInline.dataList[index][item.db_field_name] = this.formInline.dataList[index][item.db_field_name] ? moment(this.formInline.dataList[index][item.db_field_name]).format('YYYY-MM-DD') : '' - }else{ + } else { this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : '' } @@ -607,6 +638,9 @@ if (this.formInline.deliverableType) { this.formInline.deliverableType = this.formInline.deliverableType.split(',') } + if (value.dutyTerritory) { + this.queryPersonByProject(value.dutyTerritory) + } this.getRegulationNo() this.title = this.$t('edit') this.$nextTick(() => { @@ -635,6 +669,7 @@ url = this.url.add Action = postAction query.dataList.forEach(val => { + delete val.engineeringInterfacePersonList Object.keys(val).forEach(res => { if (val[res] && val[res] instanceof Array) { val[res] = val[res].join(',') @@ -726,8 +761,37 @@ let content = this.projectNameList.filter(res => { return res.id === value }) - this.formInline.bussDocumentLibraryId = content[0].id - this.formInline.serialNumber = content[0].serialNumber + if (content && content.length > 0) { + this.formInline.bussDocumentLibraryId = content[0].id + this.formInline.serialNumber = content[0].serialNumber + } + }, + handleChange(value) { + this.formInline.sdt = undefined + this.queryPersonByProject(this.formInline.dutyTerritory) + }, + dutyHandleChange(index) { + this.formInline.dataList[index].sdt = undefined + this.formInline = {... this.formInline} + this.queryPersonByProject(this.formInline.dataList[index].dutyTerritory, index) + }, + queryPersonByProject(row, index) { + let query = { + projectId: this.$route.query.id, + dutyTerritory: row + } + getAction('/project/projectRelatedPersonnel/queryPersonByProjectId', query).then((res) => { + if (res.success) { + if (this.formInline.id) { + this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList || [] //工程接口人 + } else { + this.$nextTick(()=>{ + this.formInline.dataList[index].engineeringInterfacePersonList = res.result.engineeringInterfacePersonList || [] + this.formInline = {...this.formInline} + }) + } + } + }) } } } diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue b/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue index 0a6dcdd5b..ff9ab2cfe 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/batSetting.vue @@ -17,11 +17,15 @@ {{$t('configurationItem')}} - + + + + + + + @@ -33,6 +37,7 @@ @@ -50,13 +55,15 @@ - - {{ item.label }} + + {{ item.name }} @@ -122,17 +129,17 @@ -
-
+
+
{{$t('remarks')}} +
+ + +
- - - -
@@ -146,7 +153,7 @@ export default { name: 'batSetting', - props: ['url','roleSwitchingCode'], + props: ['url', 'roleSwitchingCode'], components: { PersonnelSelection }, @@ -155,9 +162,7 @@ visible: false, confirmLoading: false, formInline: {}, - rules: { - - }, + rules: {}, ids: [], configurationItemList: [], engineeringInterfacePersonList: [], @@ -270,6 +275,21 @@ }, dateChange(item) { this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : '' + }, + handleChange(value) { + this.formInline.sdt = undefined + this.queryPersonByProject(this.formInline.dutyTerritory) + }, + queryPersonByProject(row) { + let query = { + projectId: this.$route.query.id, + dutyTerritory: row + } + getAction('/project/projectRelatedPersonnel/queryPersonByProjectId', query).then((res) => { + if (res.success) { + this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList || [] //工程接口人 + } + }) } } } diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/modifyHistoryList.vue b/jero-web/src/views/projectManagement/components/certificationList/components/modifyHistoryList.vue index 316740189..32eb8dcaf 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/modifyHistoryList.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/modifyHistoryList.vue @@ -40,54 +40,57 @@ diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/referenceDeliverablesList.vue b/jero-web/src/views/projectManagement/components/certificationList/components/referenceDeliverablesList.vue index 0cbf8c842..642b23e65 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/referenceDeliverablesList.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/referenceDeliverablesList.vue @@ -56,7 +56,7 @@
{{$t('cancel')}} - {{$t('determine')}} + {{$t('determine')}}
@@ -95,17 +95,19 @@ loading: false, pageNo: 1, pageSize: 10, - total: 0 + total: 0, + ids:'', } }, mounted() { }, methods: { - transferModel() { + transferModel(ids) { this.visible = true this.queryParam = {} this.selectedRowKeys = [] + this.ids = ids.join(',') this.replacePage() }, searchQuery() { @@ -151,49 +153,31 @@ }, handleCancel() { this.visible = false - this.$emit('visible') }, - handleSubmit(flag) { + handleSubmit() { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { this.confirmLoading = true let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) - this.confirmLoading = false - this.$emit('transferListForm',selectedRowKeys.join(',')) - this.selectedRowKeys = [] - // postAction('project/projectLawsInventoryEO/add', { - // dummyInventoryBaseId: selectedRowKeys.join(','), - // projectLibraryId: this.$route.query.id, - // flag: flag - // }).then((res) => { - // if (res.success) { - // this.confirmLoading = false - // // this.$message.success(this.$t('OperationSuccessful')) - // // this.visible = false - // this.selectedRowKeys = [] - // this.$emit('transferListForm',selectedRowKeys.join(',')) - // } else { - // // if (res.message == '该虚拟清单的维护清单中没有数据,是否需要添加') { - // // this.confirmLoading = false - // // this.getAdd() - // // return - // // } - // this.$message.warning(this.$t('operationFailed')) - // this.confirmLoading = false - // } - // }) + postAction('/project/projectCertificationInventoryEO/citeDeliverable', { + projectCertificationInventoryIds: this.ids, + projectLibraryId: this.$route.query.id, + citeProjectLibraryId: selectedRowKeys.join(',') + }).then((res) => { + if (res.success) { + this.confirmLoading = false + this.$message.success(this.$t('OperationSuccessful')) + this.visible = false + this.selectedRowKeys = [] + this.$emit('referenceDeliverablesListForm') + } else { + this.$message.warning(this.$t('operationFailed')) + this.confirmLoading = false + } + }) } else { this.$message.warning(this.$t('selectLeastOne')) } }, - getAdd() { - let _this = this - this.$confirm({ - content: _this.$t('TheDoesNotContainData'), - onOk() { - _this.handleSubmit('1') - } - }) - } } } diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index 48e38db06..235e5a8be 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -485,10 +485,9 @@ text: this.$t('inspectionItems') }, { - type: '', + type: 'string', value: 'configItem', text: this.$t('configurationItem'), - dictCode: 'ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框 }, { type: 'string', @@ -1161,8 +1160,8 @@ } }) }, - modifyHistoryClick() { - this.$refs.modifyHistoryRef.getList() + modifyHistoryClick(row) { + this.$refs.modifyHistoryRef.getList(row.id) }, getRoleByUserId(callback) { getAction('/project/projectCertificationInventoryEO/getRoleByUserId', { projectLibraryId: this.$route.query.id }).then((res) => { @@ -1263,7 +1262,7 @@ //引用交付物 referenceDeliverablesClick() { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { - this.$refs.referenceDeliverablesListRef.transferModel() + this.$refs.referenceDeliverablesListRef.transferModel(JSON.parse(JSON.stringify(this.selectedRowKeys))) } else { this.$message.warning(this.$t('selectLeastOne')) }