Browse Source

2026-03-17

产品BOM、配方BOM、Routing新增【异常转正式。。。】功能
master
fengyuan_yang 4 weeks ago
parent
commit
3c99f29d47
  1. 7
      src/api/part/bomManagement.js
  2. 7
      src/api/part/recipeManagement.js
  3. 5
      src/api/part/routingManagement.js
  4. 33
      src/views/modules/part/bomManagement.vue
  5. 32
      src/views/modules/part/recipeManagement.vue
  6. 33
      src/views/modules/part/routingManagement.vue

7
src/api/part/bomManagement.js

@ -155,6 +155,13 @@ export const copyAlternative = data => createAPI(`/plm/bomManagement/copyAlterna
*/
export const toBecomeOfficialBom = data => createAPI(`/plm/bomManagement/toBecomeOfficialBom`,'post',data)
/**
* 异常转正式BomIFS已存在时直接更新official_flag
* @param data
* @returns {*}
*/
export const toOfficialBomByIfs = data => createAPI(`/plm/bomManagement/toOfficialBomByIfs`,'post',data)
/**
* 新编辑副产品成本分配
* @param data

7
src/api/part/recipeManagement.js

@ -155,6 +155,13 @@ export const copyAlternative = data => createAPI(`/plm/recipeManagement/copyAlte
*/
export const toBecomeOfficialRecipe = data => createAPI(`/plm/recipeManagement/toBecomeOfficialRecipe`,'post',data)
/**
* 异常转正式RecipeIFS已存在时直接更新official_flag
* @param data
* @returns {*}
*/
export const toOfficialRecipeByIfs = data => createAPI(`/plm/recipeManagement/toOfficialRecipeByIfs`,'post',data)
/**
* 新编辑副产品成本分配
* @param data

5
src/api/part/routingManagement.js

@ -144,6 +144,11 @@ export const copyAlternative = data => createAPI(`/plm/routingManagement/copyAlt
*/
export const toBecomeOfficialRouting = data => createAPI(`/plm/routingManagement/toBecomeOfficialRouting`,'post',data)
/**
* 异常转正式RoutingIFS已存在时直接更新official_flag
*/
export const toOfficialRoutingByIfs = data => createAPI(`/plm/routingManagement/toOfficialRoutingByIfs`,'post',data)
/**
* 查询最大工序号
*/

33
src/views/modules/part/bomManagement.vue

@ -189,6 +189,8 @@
@click="updateStatusToObsolete" :loading="toBecomeOfficialLoading">Retire</el-button>
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="primary"
@click="toBecomeOfficialBom" :loading="toBecomeOfficialLoading">转正式BOM</el-button>
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="warning"
@click="toOfficialBomByIfsClick" :loading="toBecomeOfficialLoading">异常转正式BOM</el-button>
<!-- <el-button v-if="modalData.flag === '2' && detailData.officialFlag === 'Y'" type="primary" @click="syncPlmToIfs" :loading="toBecomeOfficialLoading">数据同步-正向</el-button>-->
<template v-if="isAuth('104002001:reverseSync')">
<el-button v-if="modalData.flag === '2' && detailData.officialFlag === 'Y'" type="primary" @click="syncIfsToPlm" :loading="toBecomeOfficialLoading">数据同步-反向</el-button>
@ -1167,6 +1169,7 @@ import {
copyBom, // bom
copyAlternative, // alternative,
toBecomeOfficialBom, // Bom
toOfficialBomByIfs, // Bom
updateManufStructCostDistrib, //
queryBomComponentTable, //
queryBomByProductTable, //
@ -5226,6 +5229,36 @@ export default {
})
},
// BomIFSofficial_flag
toOfficialBomByIfsClick () {
this.$confirm('该操作将检查IFS中是否已存在该BOM替代,若存在则直接将该替代转为正式,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.detailData.updateBy = this.$store.state.user.name
this.toBecomeOfficialLoading = true
toOfficialBomByIfs(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).finally(() => {
this.toBecomeOfficialLoading = false
})
})
},
// PLM-IFS
syncPlmToIfs () {
this.$confirm(`警告:该操作将会更新此替代下的所有信息,是否继续?`, '提示', {

32
src/views/modules/part/recipeManagement.vue

@ -176,6 +176,7 @@
<el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build</el-button>
<el-button v-if="detailData.status === 'Buildable'" type="primary" @click="updateStatusToObsolete">Retire</el-button>
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y' && (modalData.ifsPartNo == null || modalData.ifsPartNo === '')" type="primary" @click="toBecomeOfficialRecipe" :loading="toBecomeOfficialLoading">转正式Recipe</el-button>
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y' && (modalData.ifsPartNo == null || modalData.ifsPartNo === '')" type="warning" @click="toOfficialRecipeByIfsClick" :loading="toBecomeOfficialLoading">异常转正式Recipe</el-button>
<template v-if="isAuth('104002003:reverseSync')">
<el-button v-if="modalData.flag === '2' && detailData.officialFlag === 'Y'" type="primary" @click="syncIfsToPlm" :loading="toBecomeOfficialLoading">数据同步-反向</el-button>
</template>
@ -995,6 +996,7 @@ import {
copyRecipe, // recipe
copyAlternative, // alternative,
toBecomeOfficialRecipe, // Recipe
toOfficialRecipeByIfs, // Recipe
updateManufStructCostDistrib, //
queryRecipeComponentTable, //
queryRecipeByProductTable, //
@ -4684,6 +4686,36 @@ export default {
})
},
// RecipeIFSofficial_flag
toOfficialRecipeByIfsClick () {
this.$confirm('该操作将检查IFS中是否已存在该Recipe替代,若存在则直接将该替代转为正式,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.detailData.updateBy = this.$store.state.user.name
this.toBecomeOfficialLoading = true
toOfficialRecipeByIfs(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).finally(() => {
this.toBecomeOfficialLoading = false
})
})
},
// IFS->PLM
syncIfsToPlm () {
this.$confirm(`警告:该操作将会更新此替代下的所有信息,是否继续?`, '提示', {

33
src/views/modules/part/routingManagement.vue

@ -182,6 +182,8 @@
@click="updateStatusToObsolete" :loading="toBecomeOfficialLoading">Retire</el-button>
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="primary"
@click="toBecomeOfficialRouting" :loading="toBecomeOfficialLoading">转正式Routing</el-button>
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="warning"
@click="toOfficialRoutingByIfsClick" :loading="toBecomeOfficialLoading">异常转正式Routing</el-button>
<template v-if="isAuth('104003001:reverseSync')">
<el-button v-if="modalData.flag === '2' && detailData.officialFlag === 'Y'" type="primary" @click="syncIfsToPlm" :loading="toBecomeOfficialLoading">数据同步-反向</el-button>
</template>
@ -1214,6 +1216,7 @@ import {
copyRouting, // routing
copyAlternative, // alternative
toBecomeOfficialRouting, // Routing
toOfficialRoutingByIfs, // Routing
queryMaxOperationNo, //
queryToolList, //
queryLaborClassByWorkCenterNo, //
@ -5261,6 +5264,36 @@ export default {
})
},
// RoutingIFSofficial_flag
toOfficialRoutingByIfsClick () {
this.$confirm('该操作将检查IFS中是否已存在该Routing替代,若存在则直接将该替代转为正式,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.detailData.updateBy = this.$store.state.user.name
this.toBecomeOfficialLoading = true
toOfficialRoutingByIfs(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).finally(() => {
this.toBecomeOfficialLoading = false
})
})
},
// IFS-PLM
syncIfsToPlm () {
this.$confirm(`警告:该操作将会更新此替代下的所有信息,是否继续?`, '提示', {

Loading…
Cancel
Save