From c4fdbdb6677776b46f45345f1ac02eda197a3119 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Mon, 7 Jul 2025 10:24:37 +0800
Subject: [PATCH] =?UTF-8?q?2025-07-07=20Bom=20Routing=20=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E5=90=8C=E6=AD=A5-=E5=8F=8D=E5=90=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/part/bomManagement.js | 10 ++
src/api/part/routingManagement.js | 5 +
src/views/modules/part/bomManagement.vue | 112 ++++++++++++++++++-
src/views/modules/part/routingManagement.vue | 45 ++++++--
4 files changed, 163 insertions(+), 9 deletions(-)
diff --git a/src/api/part/bomManagement.js b/src/api/part/bomManagement.js
index d73c927..9ba7769 100644
--- a/src/api/part/bomManagement.js
+++ b/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)
+/**
+ * 正向同步替代下的数据 PLM-IFS
+ */
+export const syncBomInfoPlmToIfs = data => createAPI(`/plm/bomManagement/syncBomInfoPlmToIfs`,'post',data)
+
+/**
+ * 反向同步替代下的数据 IFS-PLM
+ */
+export const syncBomInfoIfsToPlm = data => createAPI(`/plm/bomManagement/syncBomInfoIfsToPlm`,'post',data)
+
diff --git a/src/api/part/routingManagement.js b/src/api/part/routingManagement.js
index 76ee5f8..31cfc4d 100644
--- a/src/api/part/routingManagement.js
+++ b/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)
+
+/**
+ * 反向同步替代下的数据 IFS-PLM
+ */
+export const syncRoutingInfoIfsToPlm = data => createAPI(`/plm/routingManagement/syncRoutingInfoIfsToPlm`,'post',data)
diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue
index e6b3e8d..bad5d4e 100644
--- a/src/views/modules/part/bomManagement.vue
+++ b/src/views/modules/part/bomManagement.vue
@@ -185,6 +185,8 @@
Build
Retire
转正式BOM
+
+ 数据同步-反向
@@ -260,6 +262,7 @@
label="操作">
编辑
+
更多
@@ -978,6 +981,8 @@ import {
queryPartListBom, // 查出可创建BOM的物料
queryPartListAll, // 查询包含Purchase(Raw)的物料
queryComponentPartBomList, // 查子物料BOM
+ syncBomInfoPlmToIfs, // 正向同步替代下的数据 PLM-IFS
+ syncBomInfoIfsToPlm, // 反向同步替代下的数据 IFS-PLM
} from '@/api/part/bomManagement.js'
import ChooseList from '@/views/modules/common/Chooselist'
import {isAuth} from "../../../utils";
@@ -3364,6 +3369,48 @@ export default {
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) {
this.componentData = {
@@ -4465,6 +4512,7 @@ export default {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
+ this.toBecomeOfficialLoading = false
this.$message({
message: '操作成功',
type: 'success',
@@ -4472,16 +4520,78 @@ export default {
onClose: () => {}
})
} else {
+ this.toBecomeOfficialLoading = false
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
- this.toBecomeOfficialLoading = false
}).catch(()=>{
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 () {
this.operationData.partNo = this.modalData.partNo
diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue
index 9d7f90c..497c224 100644
--- a/src/views/modules/part/routingManagement.vue
+++ b/src/views/modules/part/routingManagement.vue
@@ -175,14 +175,10 @@
删除
编辑
Copy
- Build
-
- Retire
-
- 转正式Routing
-
+ Build
+ Retire
+ 转正式Routing
+ 数据同步-反向
@@ -1175,6 +1171,7 @@ import {
queryMaxOperationNo, // 查询最大工序号
queryToolList, // 获取工具集合
queryLaborClassByWorkCenterNo, // 通过加工中心查人员等级
+ syncRoutingInfoIfsToPlm, // 反向同步替代下的数据 IFS-PLM
} from '@/api/part/routingManagement.js'
import {
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
routingToolSave() {
if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) {