From bfd14f12b0b0ece634ca245dc8b22acdcbad83f7 Mon Sep 17 00:00:00 2001 From: zelian_wu Date: Mon, 15 Jan 2024 15:45:11 +0800 Subject: [PATCH] =?UTF-8?q?2024-1-15=20=E5=AE=A2=E6=88=B7=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerInformationManagement.vue | 184 +++++++++--------- .../com_projectInfo-add-or-update.vue | 16 +- src/views/modules/sys/dict-data.vue | 12 -- src/views/modules/sys/dict.vue | 4 +- 4 files changed, 112 insertions(+), 104 deletions(-) diff --git a/src/views/modules/customer/customerInformationManagement.vue b/src/views/modules/customer/customerInformationManagement.vue index 86d37d1..e55b0bf 100644 --- a/src/views/modules/customer/customerInformationManagement.vue +++ b/src/views/modules/customer/customerInformationManagement.vue @@ -310,92 +310,78 @@ - - - - - - - - - - - - - - 项目类型 - 项目类型 - - - - - - - - - - - - - - - - - - - - 项目来源 - 项目来源 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - 优先级 - 优先级 - - + + - - - + + - - - - 项目经理 - 项目经理 - - - - - 项目负责人 - 项目负责人 - - - - - - - - - - - - - - - - - 项目权限 - 项目权限 - - + + @@ -696,7 +682,7 @@ - + @@ -734,11 +720,15 @@ } from "@/api/project/project.js" import Chooselist from '@/views/modules/common/Chooselist' import DictDataSelect from '../sys/dict-data-select.vue' + import saveOrUpdate from '../project/projectInfo/com_projectInfo-add-or-update.vue' import partUploadFile from '../part/part_upload_file.vue' + import AddOrUpdate from "../project/projectInfo/com_projectInfo-add-or-update.vue"; export default { components: { + AddOrUpdate, DictDataSelect, - Chooselist + Chooselist, + saveOrUpdate }, watch: { searchData: { @@ -756,6 +746,10 @@ }, data () { return { + // 新增 项目 + addOrUpdateVisible:false, + // addOrUpdate + addOrUpdate:'0', components: { DictDataSelect, Chooselist @@ -2168,7 +2162,13 @@ createBy: this.$store.state.user.name } this.projectInformationDetailModalFlag = false - this.projectInformationModalFlag = true + // this.projectInformationModalFlag = true + this.addOrUpdateVisible = true; + this.addOrUpdate = "save"; + this.$nextTick(() => { + this.$refs.addOrUpdate.initCustomer(this.projectInformationModalData); + this.$refs.addOrUpdate.init(); + }) }, // ======== 编辑模态框 ======== @@ -2317,7 +2317,12 @@ this.projectInformationModalData.userRoleList = data.rows }) this.projectInformationDetailModalFlag = false - this.projectInformationModalFlag = true + // this.projectInformationModalFlag = true + this.addOrUpdateVisible = true + this.addOrUpdate = "update"; + this.$nextTick(() => { + this.$refs.addOrUpdate.init(row.id) + }) }, // ======== 详情模态框 ======== @@ -2409,7 +2414,6 @@ flag: '3', title: '项目信息详情', site: row.site, - projectLevel: row.projectLevel, projectId: row.projectId, projectType: row.projectType, projectTypeDb: row.projectTypeDb, @@ -2427,7 +2431,9 @@ customerRemark: row.customerRemark, remark: row.remark, status: row.status, - userRoleName: row.userRoleName + userRoleName: row.userRoleName, + buNo:row.buNo, + buDesc:row.buDesc } this.projectInformationDetailModalFlag = true this.projectInformationModalFlag = true diff --git a/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue b/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue index 556235e..11e5a68 100644 --- a/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue +++ b/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue @@ -37,7 +37,7 @@ 所属客户 - + @@ -454,6 +454,10 @@ }, init (id) { this.dataForm.id = id || 0 + let requestCustomer = null; + if (this.dataForm.customerId){ + requestCustomer = JSON.parse(JSON.stringify(this.dataForm)) + } if(this.dataForm.id!=0){ let inData={ page: 1, @@ -523,6 +527,10 @@ this.dataForm.userRoleList=data.rows }) } + + if (requestCustomer){ + this.initCustomer(requestCustomer) + } this.visible = true }, @@ -672,6 +680,8 @@ dataFormSubmit () { this.$refs.saveForm.validate((validate)=>{ if (validate){ + this.dataForm.updateBy = this.$store.state.user.name + console.log(this.dataForm) saveProjectInfo(this.dataForm).then(({data}) => { if (data && data.code === 0) { this.$message.success( '操作成功') @@ -751,6 +761,10 @@ updateDataForm(val){ this.dataForm.projectId = val; }, + initCustomer(row){ + this.dataForm.customerId = row.customerId; + this.dataForm.customerName = row.customerName; + }, }, } diff --git a/src/views/modules/sys/dict-data.vue b/src/views/modules/sys/dict-data.vue index ac0084b..7a6c126 100644 --- a/src/views/modules/sys/dict-data.vue +++ b/src/views/modules/sys/dict-data.vue @@ -288,18 +288,6 @@ export default { - - - - - - - - - - - - diff --git a/src/views/modules/sys/dict.vue b/src/views/modules/sys/dict.vue index 7d87710..2ad7a87 100644 --- a/src/views/modules/sys/dict.vue +++ b/src/views/modules/sys/dict.vue @@ -260,8 +260,8 @@ export default { style="width: 100%"> - - + +