Browse Source

2024-01-07

物料类型修改提示
master
fengyuan_yang 1 year ago
parent
commit
87b7b4cd4a
  1. 30
      src/views/modules/part/partInformation.vue
  2. 24
      src/views/modules/project/projectInfo/com_project_info_part.vue

30
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

24
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}) => {

Loading…
Cancel
Save