diff --git a/src/views/modules/part/quicklyCreateBom.vue b/src/views/modules/part/quicklyCreateBom.vue index f4262f7..752eee8 100644 --- a/src/views/modules/part/quicklyCreateBom.vue +++ b/src/views/modules/part/quicklyCreateBom.vue @@ -1020,14 +1020,14 @@ - + - - + + -
+
被复制的物料 @@ -1425,18 +1425,34 @@ export default { deep: true, handler: function (newV, oldV) { if (!newV) { - this.copyData = { + this.copyData= { flag: '', site: this.$store.state.user.site, partNo: '', partDesc: '', + umId2: null, + productGroupId1: null, + productGroupId2: null, + productGroupId3: null, + codeNo: null, + familyID: null, + partType2: null, + routingType: 'Manufacturing', + bomType: 'Manufacturing', + effPhaseInDate: null, + effPhaseOutDate: null, + phaseOutDate: null, + phaseInDate: null, previousVersion: {}, nodeFlag: false, mainPart: '', nodeId: '', engChgLevel: null, - bomFlag: 'N', - routingFlag: 'N', + routingRevision: null, + active: '', + createBy: '', + routingFlag: 'Y', + bomFlag: 'Y', page: 1, limit: 10 } @@ -1540,13 +1556,6 @@ export default { trigger: ['blur', 'change'] } ], - effPhaseOutDate: [ - { - required: true, - message: ' ', - trigger: ['blur', 'change'] - } - ], effPhaseInDate: [ { required: true, @@ -1610,15 +1619,22 @@ export default { codeNo: null, familyID: null, partType2: null, + routingType: 'Manufacturing', + bomType: 'Manufacturing', + effPhaseInDate: null, + effPhaseOutDate: null, + phaseOutDate: null, + phaseInDate: null, previousVersion: {}, nodeFlag: false, mainPart: '', nodeId: '', engChgLevel: null, + routingRevision: null, active: '', createBy: '', - routingFlag: 'N', - bomFlag: 'N', + routingFlag: 'Y', + bomFlag: 'Y', page: 1, limit: 10 }, @@ -4817,8 +4833,8 @@ export default { }, bomInfoRowDblClick1(row){ - // this.copyData.previousVersion.engChgLevel = row.engChgLevel this.$set(this.copyData.previousVersion, 'engChgLevel', row.engChgLevel) + this.$set(this.copyData.previousVersion, 'bomType', row.bomType) }, routingInfoRowDblClick(row){ @@ -4844,6 +4860,7 @@ export default { routingInfoRowDblClick1(row){ this.copyData.previousVersion.routingRevision = row.routingRevision + this.copyData.previousVersion.routingType = row.routingType }, routingInfoRowClick(row) { @@ -5037,6 +5054,10 @@ export default { this.copyData.partNo = this.partCurrentRow.partNo this.copyData.partDesc = this.partCurrentRow.partDesc this.copyData.buNo = this.partCurrentRow.buNo + this.copyData.bomType = 'Manufacturing' + this.copyData.routingType = 'Manufacturing' + this.copyData.effPhaseInDate = new Date() + this.copyData.effPhaseOutDate = new Date() this.copyVisible = true }, @@ -5089,6 +5110,14 @@ export default { this.$message.warning('请先选择要复制的料号!') return } + if (this.copyData.bomFlag&&this.copyData.bomFlag==='Y'&&!this.copyData.previousVersion.engChgLevel) { + this.$message.warning('请选择要复制的BOM版本!') + return + } + if (this.copyData.routingFlag&&this.copyData.routingFlag==='Y'&&!this.copyData.previousVersion.routingRevision) { + this.$message.warning('请选择要复制的routing版本!') + return + } let flag = true if (!this.copyData.partNo||this.copyData.partNo==='') { // 没有料号就先新建 @@ -5129,9 +5158,6 @@ export default { }) } if (this.copyData.bomFlag&&this.copyData.bomFlag==='Y') { - this.copyData.previousVersion.noteText = this.bomCurrentRow1.noteText - this.copyData.previousVersion.engChgLevel = this.bomCurrentRow1.engChgLevel - this.copyData.previousVersion.bomType = this.bomCurrentRow1.bomType await copyBom(this.copyData).then(({data}) => { if (data && data.code === 0) { this.$message({ @@ -5151,9 +5177,6 @@ export default { }) } if (this.copyData.routingFlag&&this.copyData.routingFlag==='Y') { - this.copyData.previousVersion.noteText = this.routingCurrentRow1.noteText - this.copyData.previousVersion.routingRevision = this.routingCurrentRow1.routingRevision - this.copyData.previousVersion.routingType = this.routingCurrentRow1.routingType this.copyData.phaseInDate = this.copyData.effPhaseInDate this.copyData.phaseOutDate = this.copyData.effPhaseOutDate await copyRouting(this.copyData).then(({data}) => {