Browse Source

2026-03-17

物料类型修改时做出提示
master
fengyuan_yang 4 weeks ago
parent
commit
20e295364b
  1. 38
      src/views/modules/part/partInformation.vue
  2. 38
      src/views/modules/project/projectInfo/com_project_info_part.vue

38
src/views/modules/part/partInformation.vue

@ -5002,22 +5002,30 @@
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(() => {
if (this.modalData.flag === '2' && this.modalData.oldPartType !== this.modalData.partType) {
const oldType = this.modalData.oldPartType
const newType = this.modalData.partType
let confirmMsg = null
if (oldType === 'Purchased (raw)') {
confirmMsg = '该操作将会创建初始BOM 和 Routing!'
} else if ((oldType === 'Manufactured' || oldType === 'Purchased') && newType === 'Manufactured Recipe') {
confirmMsg = '该操作将会删除产品BOM,创建配方BOM!'
} else if (oldType === 'Manufactured Recipe' && (newType === 'Manufactured' || newType === 'Purchased')) {
confirmMsg = '该操作将会删除配方BOM,创建产品BOM!'
} else if (oldType === 'Purchased' && newType === 'Manufactured') {
confirmMsg = '该操作将会创建Routing和BOM!'
}
if (confirmMsg) {
this.$confirm(confirmMsg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.saveData2()
})
} else {
this.saveData2()
})
}
} else {
this.saveData2()
}

38
src/views/modules/project/projectInfo/com_project_info_part.vue

@ -2623,22 +2623,30 @@ import {downLoadFile, queryFileId, readPartFromFile} from "../../../../api/part/
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(() => {
if (this.modalData.flag === '2' && this.modalData.oldPartType !== this.modalData.partType) {
const oldType = this.modalData.oldPartType
const newType = this.modalData.partType
let confirmMsg = null
if (oldType === 'Purchased (raw)') {
confirmMsg = '该操作将会创建初始BOM 和 Routing!'
} else if ((oldType === 'Manufactured' || oldType === 'Purchased') && newType === 'Manufactured Recipe') {
confirmMsg = '该操作将会删除产品BOM,创建配方BOM!'
} else if (oldType === 'Manufactured Recipe' && (newType === 'Manufactured' || newType === 'Purchased')) {
confirmMsg = '该操作将会删除配方BOM,创建产品BOM!'
} else if (oldType === 'Purchased' && newType === 'Manufactured') {
confirmMsg = '该操作将会创建Routing和BOM!'
}
if (confirmMsg) {
this.$confirm(confirmMsg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.saveData2()
})
} else {
this.saveData2()
})
}
} else {
this.saveData2()
}

Loading…
Cancel
Save