Browse Source

2026-03-07

配方BOM增加反向同步
master
fengyuan_yang 1 month ago
parent
commit
c9d14a731e
  1. 7
      src/api/part/recipeManagement.js
  2. 34
      src/views/modules/part/recipeManagement.vue

7
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)

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

@ -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

Loading…
Cancel
Save