diff --git a/src/api/part/partInformation.js b/src/api/part/partInformation.js index ba2608a..a091e15 100644 --- a/src/api/part/partInformation.js +++ b/src/api/part/partInformation.js @@ -239,3 +239,5 @@ export const partInformationEdit2 = data => createAPI(`/plm/partInformation/part export const locationInformationSearch = data => createAPI(`/plm/partInformation/locationInformationSearch`,'post',data) export const queryOfficialPartList = data => createAPI(`/plm/partInformation/queryOfficialPartList`,'post',data) + +export const copyPart2 = data => createAPI(`/plm/partInformation/copyPart2`,'post',data) diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue index 8755235..035fb73 100644 --- a/src/views/modules/part/bomManagement.vue +++ b/src/views/modules/part/bomManagement.vue @@ -5264,6 +5264,7 @@ export default { this.toBecomeOfficialLoading = true syncBomInfoIfsToPlm(this.detailData).then(({data}) => { if (data && data.code === 0) { + this.detailData = data.rows.detailData this.refreshSubDetailTable() this.$message({ message: '操作成功', diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue index d8d9d2b..2489ec1 100644 --- a/src/views/modules/part/partInformation.vue +++ b/src/views/modules/part/partInformation.vue @@ -159,13 +159,19 @@ - + - - Copy + + Copy Part + + + Next Part No + + + Copy @@ -579,7 +585,7 @@ - + 新增 { - if (data && data.code === 0) { - this.searchData.plmPartNo = this.modalData.plmPartNo - this.getDataList() - this.modalFlag = false - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => {} - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - this.saveLoading = false - }).catch(()=>{ - this.saveLoading = false - }) + if (this.copyFlag2) { + copyPart2(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.searchData.ifsPartNo = this.modalData.partNo + this.getDataList() + this.modalFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + this.saveLoading = false + }).catch(()=>{ + this.saveLoading = false + }) + } else { + partInformationEdit(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.searchData.plmPartNo = this.modalData.plmPartNo + this.getDataList() + this.modalFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + this.saveLoading = false + }).catch(()=>{ + this.saveLoading = false + }) + } } }, @@ -4969,6 +5004,14 @@ }) }, + // 复制 + toCopyModal () { + this.modalData.copyPartNo = this.modalData.partNo + this.modalData.partNo = '' + this.modalData.partDesc = '' + this.copyFlag2 = true + }, + // 复制物料的模态框 toCopyPartModal () { this.copyPartData = { @@ -5040,16 +5083,6 @@ if (this.modalData.flag === '3') { // 转正里的copyPart this.copyPartData.copyFlag = 'Y' } - // if (this.modalData.flag === '2') { - // if (this.copyPartData.buNo === '' || this.copyPartData.buNo == null) { - // this.$message.warning('请选择BU!') - // return - // } - // if (this.copyPartData.customerPartNo === '' || this.copyPartData.customerPartNo == null) { - // this.$message.warning('请填写客户料号!') - // return - // } - // } this.copyLoading = true copyPart(this.copyPartData).then(({data}) => { if (data && data.code === 0) { @@ -5467,10 +5500,6 @@ // 下一个物料编码 nextPartNo () { - // if (this.modalData.ifsPartNo.length !== 3) { - // this.$message.warning('IFS Part No的前缀必须是3位!') - // return - // } getNextPartNo(this.modalData).then(({data}) => { if (data && data.code === 0) { this.modalData.ifsPartNo = data.rows @@ -5481,10 +5510,6 @@ // 下一个物料编码 nextPartNo2 () { this.copyPartData.ifsPartNo = this.copyPartData.partNo - // if (this.copyPartData.ifsPartNo.length !== 3) { - // this.$message.warning('To Part No的前缀必须是3位!') - // return - // } getNextPartNo(this.copyPartData).then(({data}) => { if (data && data.code === 0) { this.copyPartData.partNo = data.rows @@ -5492,6 +5517,16 @@ }) }, + // 下一个物料编码 + nextPartNo3 () { + this.modalData.ifsPartNo = this.modalData.partNo + getNextPartNo(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.modalData.partNo = data.rows + } + }) + }, + // 查询物料列表 queryPartModal () { this.fromPartData.limit = this.pageSize2 @@ -5556,10 +5591,6 @@ partNo: this.partCurrentRow.partNo } this.uploadDialog = true - //打开组件 去做新增业务 - // this.$nextTick(() => { - // this.$refs.partUploadFile.init(currentData); - // }) }, // 文件删除