|
|
|
@ -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 { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 异常转正式Bom(IFS已存在时直接更新official_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(`警告:该操作将会更新此替代下的所有信息,是否继续?`, '提示', { |
|
|
|
|