diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue index eac65a5..a3268a2 100644 --- a/src/views/modules/part/bomManagement.vue +++ b/src/views/modules/part/bomManagement.vue @@ -4549,7 +4549,6 @@ export default { // 粘贴栏 pasteComponentModal () { let tempData = { - site: this.$store.state.user.site, userName: this.$store.state.user.name } this.cleanPasteBarFlag = '' @@ -4580,12 +4579,18 @@ export default { type: "warning" }).then(() => { let tempData = { - site: this.detailData.site, + site: this.$store.state.user.site, // 粘贴时使用当前登录的site partNo: this.detailData.partNo, engChgLevel: this.detailData.engChgLevel, bomType: this.detailData.bomType, alternativeNo: this.detailData.alternativeNo, - informationList: this.checkedPasteBar, + // 将粘贴栏中的子物料的site替换为当前登录的site(或目标BOM的site) + informationList: this.checkedPasteBar.map(item => { + return { + ...item, + site: this.$store.state.user.site + } + }), productFlag: 'component', updateBy: this.$store.state.user.name, cleanPasteBarFlag: this.cleanPasteBarFlag diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue index f01f979..fedf3a4 100644 --- a/src/views/modules/part/routingManagement.vue +++ b/src/views/modules/part/routingManagement.vue @@ -4391,7 +4391,6 @@ export default { // 粘贴栏 pasteComponentModal () { let tempData = { - site: this.$store.state.user.site, userName: this.$store.state.user.name } this.cleanPasteBarFlag = '' @@ -4422,12 +4421,18 @@ export default { type: "warning" }).then(() => { let tempData = { - site: this.detailData.site, + site: this.$store.state.user.site, // 粘贴时使用当前登录的site partNo: this.detailData.partNo, routingRevision: this.detailData.routingRevision, routingType: this.detailData.routingType, alternativeNo: this.detailData.alternativeNo, - informationList: this.checkedPasteBar, + // 将粘贴栏中的子物料的site替换为当前登录的site + informationList: this.checkedPasteBar.map(item => { + return { + ...item, + site: this.$store.state.user.site + } + }), updateBy: this.$store.state.user.name, cleanPasteBarFlag: this.cleanPasteBarFlag }