Browse Source

2025-07-07

Bom Routing 数据同步-反向
master
fengyuan_yang 6 months ago
parent
commit
c4fdbdb667
  1. 10
      src/api/part/bomManagement.js
  2. 5
      src/api/part/routingManagement.js
  3. 112
      src/views/modules/part/bomManagement.vue
  4. 45
      src/views/modules/part/routingManagement.vue

10
src/api/part/bomManagement.js

@ -209,6 +209,16 @@ export const queryPartListAll = data => createAPI(`/plm/bomManagement/queryPartL
*/ */
export const queryComponentPartBomList = data => createAPI(`/plm/bomManagement/queryComponentPartBomList`,'post',data) export const queryComponentPartBomList = data => createAPI(`/plm/bomManagement/queryComponentPartBomList`,'post',data)
/**
* 正向同步替代下的数据 PLM-IFS
*/
export const syncBomInfoPlmToIfs = data => createAPI(`/plm/bomManagement/syncBomInfoPlmToIfs`,'post',data)
/**
* 反向同步替代下的数据 IFS-PLM
*/
export const syncBomInfoIfsToPlm = data => createAPI(`/plm/bomManagement/syncBomInfoIfsToPlm`,'post',data)

5
src/api/part/routingManagement.js

@ -163,3 +163,8 @@ export const queryToolList = data => createAPI(`/plm/routingManagement/queryTool
* 通过加工中心查人员等级 * 通过加工中心查人员等级
*/ */
export const queryLaborClassByWorkCenterNo = data => createAPI(`/plm/routingManagement/queryLaborClassByWorkCenterNo`,'post',data) export const queryLaborClassByWorkCenterNo = data => createAPI(`/plm/routingManagement/queryLaborClassByWorkCenterNo`,'post',data)
/**
* 反向同步替代下的数据 IFS-PLM
*/
export const syncRoutingInfoIfsToPlm = data => createAPI(`/plm/routingManagement/syncRoutingInfoIfsToPlm`,'post',data)

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

@ -185,6 +185,8 @@
<el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build</el-button> <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="detailData.status === 'Buildable'" type="primary" @click="updateStatusToObsolete">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="primary" @click="toBecomeOfficialBom" :loading="toBecomeOfficialLoading">转正式BOM</el-button>
<!-- <el-button v-if="modalData.flag === '2' && detailData.officialFlag === 'Y'" type="primary" @click="syncPlmToIfs" :loading="toBecomeOfficialLoading">数据同步-正向</el-button>-->
<el-button v-if="modalData.flag === '2' && detailData.officialFlag === 'Y'" type="primary" @click="syncIfsToPlm" :loading="toBecomeOfficialLoading">数据同步-反向</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px"> <el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px">
@ -260,6 +262,7 @@
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link style="cursor: pointer" @click="updateComponentModal(scope.row)">编辑</el-link> <el-link style="cursor: pointer" @click="updateComponentModal(scope.row)">编辑</el-link>
<!-- <el-link style="cursor: pointer" @click="copyComponentModal(scope.row)">复制</el-link>-->
<el-dropdown trigger="click"> <el-dropdown trigger="click">
<el-link style="cursor: pointer;font-size: 12px"> <el-link style="cursor: pointer;font-size: 12px">
更多 更多
@ -978,6 +981,8 @@ import {
queryPartListBom, // BOM queryPartListBom, // BOM
queryPartListAll, // Purchase(Raw) queryPartListAll, // Purchase(Raw)
queryComponentPartBomList, // BOM queryComponentPartBomList, // BOM
syncBomInfoPlmToIfs, // PLM-IFS
syncBomInfoIfsToPlm, // IFS-PLM
} from '@/api/part/bomManagement.js' } from '@/api/part/bomManagement.js'
import ChooseList from '@/views/modules/common/Chooselist' import ChooseList from '@/views/modules/common/Chooselist'
import {isAuth} from "../../../utils"; import {isAuth} from "../../../utils";
@ -3364,6 +3369,48 @@ export default {
this.componentSaveModal = true this.componentSaveModal = true
}, },
//
copyComponentModal (row) {
this.componentData = {
flag: '3',
site: row.site,
partNo: row.partNo,
engChgLevel: row.engChgLevel,
bomType: row.bomType,
alternativeNo: row.alternativeNo,
componentPart: row.componentPart,
componentPartDesc: row.componentPartDesc,
printUnit: row.printUnit,
printUnitName: row.printUnitName,
qtyPerAssembly: row.qtyPerAssembly,
componentScrap: row.componentScrap,
issueType: row.issueType,
shrinkageFactor: row.shrinkageFactor,
lineItemNo: row.lineItemNo,
operationId: row.operationId,
operationNo: row.operationNo,
issueToLoc: row.issueToLoc,
issueToLocName: row.issueToLocName,
noteText: row.noteText,
updateBy: this.$store.state.user.name,
lineSequence: row.lineSequence,
consumptionItem: row.consumptionItem,
productFlag: 'component'
}
//
getComponentLineSequence(this.componentData).then(({data}) => {
if (data && data.code === 0) {
this.componentData.lineSequence = data.lineSequence
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
this.componentDisableFlag = false
this.componentSaveModal = true
},
// //
updateByProductModal (row) { updateByProductModal (row) {
this.componentData = { this.componentData = {
@ -4465,6 +4512,7 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getDataList() this.getDataList()
this.modalFlag = false this.modalFlag = false
this.toBecomeOfficialLoading = false
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -4472,16 +4520,78 @@ export default {
onClose: () => {} onClose: () => {}
}) })
} else { } else {
this.toBecomeOfficialLoading = false
this.$alert(data.msg, '错误', { this.$alert(data.msg, '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
} }
this.toBecomeOfficialLoading = false
}).catch(()=>{ }).catch(()=>{
this.toBecomeOfficialLoading = false this.toBecomeOfficialLoading = false
}) })
}, },
// PLM-IFS
syncPlmToIfs () {
this.$confirm(`警告:该操作将会更新此替代下的所有信息,是否继续?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.detailData.updateBy = this.$store.state.user.name
this.toBecomeOfficialLoading = true
syncBomInfoPlmToIfs(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.refreshSubDetailTable()
this.toBecomeOfficialLoading = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.toBecomeOfficialLoading = false
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).catch(()=>{
this.toBecomeOfficialLoading = false
})
})
},
// IFS-PLM
syncIfsToPlm () {
this.$confirm(`警告:该操作将会更新此替代下的所有信息,是否继续?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.detailData.updateBy = this.$store.state.user.name
this.toBecomeOfficialLoading = true
syncBomInfoIfsToPlm(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.refreshSubDetailTable()
this.toBecomeOfficialLoading = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.toBecomeOfficialLoading = false
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).catch(()=>{
this.toBecomeOfficialLoading = false
})
})
},
// //
queryOperationList () { queryOperationList () {
this.operationData.partNo = this.modalData.partNo this.operationData.partNo = this.modalData.partNo

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

@ -175,14 +175,10 @@
<el-button type="primary" @click="deleteRoutingDetail">删除</el-button> <el-button type="primary" @click="deleteRoutingDetail">删除</el-button>
<el-button type="primary" @click="updateRoutingDetail">编辑</el-button> <el-button type="primary" @click="updateRoutingDetail">编辑</el-button>
<el-button v-if="modalData.flag === '2'" type="primary" @click="copyRoutingAlternative">Copy</el-button> <el-button v-if="modalData.flag === '2'" type="primary" @click="copyRoutingAlternative">Copy</el-button>
<el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build
</el-button>
<el-button
v-if="detailData.status === 'Buildable' && (modalData.effPhaseOutDate == null || modalData.effPhaseOutDate === '')"
type="primary" @click="updateStatusToObsolete">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="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build</el-button>
<el-button v-if="detailData.status === 'Buildable' && (modalData.effPhaseOutDate == null || modalData.effPhaseOutDate === '')" type="primary" @click="updateStatusToObsolete">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="primary" @click="syncIfsToPlm" :loading="toBecomeOfficialLoading">数据同步-反向</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px"> <el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px">
@ -1175,6 +1171,7 @@ import {
queryMaxOperationNo, // queryMaxOperationNo, //
queryToolList, // queryToolList, //
queryLaborClassByWorkCenterNo, // queryLaborClassByWorkCenterNo, //
syncRoutingInfoIfsToPlm, // IFS-PLM
} from '@/api/part/routingManagement.js' } from '@/api/part/routingManagement.js'
import { import {
routingSearchAlternative, // routing routingSearchAlternative, // routing
@ -4826,6 +4823,38 @@ export default {
}) })
}, },
// IFS-PLM
syncIfsToPlm () {
this.$confirm(`警告:该操作将会更新此替代下的所有信息,是否继续?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.detailData.updateBy = this.$store.state.user.name
this.toBecomeOfficialLoading = true
syncRoutingInfoIfsToPlm(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.subDetailList = data.rows.subDetailList
this.toBecomeOfficialLoading = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.toBecomeOfficialLoading = false
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).catch(()=>{
this.toBecomeOfficialLoading = false
})
})
},
// routingTool // routingTool
routingToolSave() { routingToolSave() {
if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) { if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) {

Loading…
Cancel
Save