diff --git a/src/api/part/recipeManagement.js b/src/api/part/recipeManagement.js index da8b143..60cbe6b 100644 --- a/src/api/part/recipeManagement.js +++ b/src/api/part/recipeManagement.js @@ -209,4 +209,11 @@ export const queryPartListAll = data => createAPI(`/plm/recipeManagement/queryPa */ export const queryComponentPartRecipeList = data => createAPI(`/plm/recipeManagement/queryComponentPartRecipeList`,'post',data) +/** + * 反向同步替代下的数据 IFS->PLM + * @param data + * @returns {*} + */ +export const syncRecipeInfoIfsToPlm = data => createAPI(`/plm/recipeManagement/syncRecipeInfoIfsToPlm`,'post',data) + diff --git a/src/views/modules/part/recipeManagement.vue b/src/views/modules/part/recipeManagement.vue index ac49965..404b2ef 100644 --- a/src/views/modules/part/recipeManagement.vue +++ b/src/views/modules/part/recipeManagement.vue @@ -175,6 +175,9 @@ Build Retire 转正式Recipe + @@ -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