|
|
|
@ -175,6 +175,9 @@ |
|
|
|
<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> |
|
|
|
<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> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px"> |
|
|
|
@ -999,6 +1002,7 @@ import { |
|
|
|
queryPartListRecipe, // 查出可创建Recipe的物料 |
|
|
|
queryPartListAll, // 查询包含Purchase(Raw)的物料 |
|
|
|
queryComponentPartRecipeList, // 查子物料配方 |
|
|
|
syncRecipeInfoIfsToPlm, // 反向同步替代下的数据 IFS->PLM |
|
|
|
} from '@/api/part/recipeManagement.js' |
|
|
|
import ChooseList from '@/views/modules/common/Chooselist' |
|
|
|
import {isAuth} from "../../../utils"; |
|
|
|
@ -4669,6 +4673,36 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 反向同步替代下的数据 IFS->PLM |
|
|
|
syncIfsToPlm () { |
|
|
|
this.$confirm(`警告:该操作将会更新此替代下的所有信息,是否继续?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.detailData.updateBy = this.$store.state.user.name |
|
|
|
this.toBecomeOfficialLoading = true |
|
|
|
syncRecipeInfoIfsToPlm(this.detailData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.detailData = data.rows.detailData |
|
|
|
this.refreshSubDetailTable() |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).finally(() => { |
|
|
|
this.toBecomeOfficialLoading = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 根据物料编码查询工序 |
|
|
|
queryOperationList () { |
|
|
|
this.operationData.partNo = this.modalData.partNo |
|
|
|
|