From 87b7b4cd4abbb622af5652211b7bfd89417de32a Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 7 Jan 2025 13:14:37 +0800 Subject: [PATCH] =?UTF-8?q?2024-01-07=20=E7=89=A9=E6=96=99=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/part/partInformation.vue | 30 +++++++++++++++---- .../projectInfo/com_project_info_part.vue | 24 +++++++++++++++ 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue index 973f86d..0ab1f92 100644 --- a/src/views/modules/part/partInformation.vue +++ b/src/views/modules/part/partInformation.vue @@ -1614,12 +1614,6 @@ } }, - // "modalData.codeNo"(newValue, oldValue) { - // if (!newValue) { - // this.partItemList = [] - // } - // }, - itemData: { deep: true, handler: function (newV, oldV) { @@ -1701,6 +1695,7 @@ partDesc: '', spec: '', partTypeDb: '', + oldPartType: '', partType: '', familyId: '', familyName: '', @@ -4063,6 +4058,7 @@ partDesc: row.partDesc, spec: row.spec, partTypeDb: row.partTypeDb, + oldPartType: row.partType, partType: row.partType, familyId: row.familyId, familyName: row.familyName, @@ -4724,6 +4720,28 @@ this.$message.warning('存在物料属性,属性模板不能为空值!') return } + if (this.modalData.flag === '2' && this.modalData.oldPartType === 'Manufactured' && this.modalData.partType === 'Manufactured Recipe') { + this.$confirm("该操作会删除物料BOM,请确认!", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + this.saveData2() + }) + } else if (this.modalData.flag === '2' && this.modalData.oldPartType === 'Manufactured Recipe' && this.modalData.partType === 'Manufactured') { + this.$confirm("该操作会删除物料配方,请确认!", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + this.saveData2() + }) + } else { + this.saveData2() + } + }, + + saveData2 () { this.modalData.partItemList = this.partItemList if (this.modalData.flag === '1') { this.saveLoading = true diff --git a/src/views/modules/project/projectInfo/com_project_info_part.vue b/src/views/modules/project/projectInfo/com_project_info_part.vue index 857976d..7ada08f 100644 --- a/src/views/modules/project/projectInfo/com_project_info_part.vue +++ b/src/views/modules/project/projectInfo/com_project_info_part.vue @@ -1293,6 +1293,7 @@ import { customerPartNo: '', spec: '', partTypeDb: '', + oldPartType: '', partType: '', familyId: '', familyName: '', @@ -2029,6 +2030,7 @@ import { customerPartNo: data.rows.customerPartNo, spec: data.rows.spec, partTypeDb: data.rows.partTypeDb, + oldPartType: data.rows.partType, partType: data.rows.partType, familyId: data.rows.familyId, familyName: data.rows.familyName, @@ -2285,6 +2287,28 @@ import { this.$message.warning('存在物料属性,属性模板不能为空值!') return } + if (this.modalData.flag === '2' && this.modalData.oldPartType === 'Manufactured' && this.modalData.partType === 'Manufactured Recipe') { + this.$confirm("该操作会删除物料BOM,请确认!", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + this.saveData2() + }) + } else if (this.modalData.flag === '2' && this.modalData.oldPartType === 'Manufactured Recipe' && this.modalData.partType === 'Manufactured') { + this.$confirm("该操作会删除物料配方,请确认!", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }).then(() => { + this.saveData2() + }) + } else { + this.saveData2() + } + }, + + saveData2 () { this.modalData.partItemList = this.partItemList if (this.modalData.flag === '1' || this.modalData.flag === '3') { partInformationSave2(this.modalData).then(({data}) => {