Browse Source

2025-09-05

master
fengyuan_yang 4 months ago
parent
commit
8691315f2e
  1. 2
      src/api/part/partInformation.js
  2. 1
      src/views/modules/part/bomManagement.vue
  3. 141
      src/views/modules/part/partInformation.vue

2
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)

1
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: '操作成功',

141
src/views/modules/part/partInformation.vue

@ -159,13 +159,19 @@
<el-input v-model="modalData.site" disabled style="width: 60px"></el-input>
</el-form-item>
<el-form-item label="物料编码 / Part No." prop="partNo" :rules="rules.partNo" style="margin-left: -10px">
<el-input v-model="modalData.partNo" :disabled="modalDisableFlag" style="width: 128px" @blur="queryMasterField"></el-input>
<el-input v-model="modalData.partNo" :disabled="modalDisableFlag && !copyFlag2" style="width: 128px" @blur="queryMasterField"></el-input>
</el-form-item>
<el-form-item label="物料名称 / Part Desc." prop="partDesc" :rules="rules.partDesc" style="margin-left: -10px">
<el-input v-model="modalData.partDesc" clearable style="width: 330px"></el-input>
</el-form-item>
<el-form-item v-if="modalData.flag === '2'" :label="' '">
<el-button type="primary" @click="toCopyPartModal">Copy</el-button>
<el-form-item v-if="modalData.flag === '2' && !copyFlag2" :label="' '">
<el-button type="primary" @click="toCopyPartModal">Copy Part</el-button>
</el-form-item>
<el-form-item v-if="modalData.flag === '2' && copyFlag2" :label="' '">
<el-button type="primary" @click="nextPartNo3">Next Part No</el-button>
</el-form-item>
<el-form-item v-if="modalData.flag === '2' && this.modalData.temporaryPartFlag === 'N' && this.modalData.status === 'Y'" :label="' '">
<el-button type="primary" @click="toCopyModal">Copy</el-button>
</el-form-item>
<el-form-item v-if="modalData.flag === '3'" label="IFS物料编码" prop="ifsPartNo" :rules="[{required: true,message: ' ',trigger: ['blur','change']}]" style="margin-left: -10px">
<el-input v-model="modalData.ifsPartNo" clearable style="width: 130px"></el-input>
@ -579,7 +585,7 @@
</div>
</el-tab-pane>
<el-tab-pane v-if="modalDisableFlag" style="margin-top: -10px" label="Revisions" name="Revisions">
<el-tab-pane v-if="modalDisableFlag && !copyFlag2" style="margin-top: -10px" label="Revisions" name="Revisions">
<el-button v-if="modalData.flag !== '4'" type="primary" @click="savePartRevisionModal">新增</el-button>
<el-table
:data="revisionList"
@ -1435,6 +1441,7 @@
getItemExclusionAlreadyExists, //
getPartCharacteristicList, //
queryOfficialPartList, //
copyPart2 //
} from '@/api/part/partInformation.js'
import {
getFileContentList, //
@ -1681,6 +1688,7 @@
manufacturingInfoFlag: false, // Manufacturing
planningInfoFlag: false, // planning
partItemInfoFlag: false, //
copyPartNo: ''
},
revisionData: {
flag: '',
@ -3285,6 +3293,7 @@
filterVisible: false,
isFilterSearch: false,
filterSearchData: {},
copyFlag2: false
}
},
@ -3976,10 +3985,12 @@
costsInfoFlag: false, // costs
manufacturingInfoFlag: false, // Manufacturing
planningInfoFlag: false, // planning
partItemInfoFlag: false //
partItemInfoFlag: false, //
copyPartNo: ''
}
this.partItemList = []
this.inventoryPartTable = 'General'
this.copyFlag2 = false
this.modalDisableFlag = false
this.modalFlag = true
} else {
@ -4097,12 +4108,14 @@
costsInfoFlag: false, // costs
manufacturingInfoFlag: false, // Manufacturing
planningInfoFlag: false, // planning
partItemInfoFlag: false //
partItemInfoFlag: false, //
copyPartNo: ''
}
this.resetFlags() //
this.setupWatchers() //
this.getPartCharacteristicList()
this.inventoryPartTable = 'General'
this.copyFlag2 = false
this.modalDisableFlag = true
this.modalFlag = true
},
@ -4216,10 +4229,12 @@
costsInfoFlag: false, // costs
manufacturingInfoFlag: false, // Manufacturing
planningInfoFlag: false, // planning
partItemInfoFlag: false //
partItemInfoFlag: false, //
copyPartNo: ''
}
this.getPartCharacteristicList()
this.inventoryPartTable = 'General'
this.copyFlag2 = false
this.modalDisableFlag = true
this.modalFlag = true
},
@ -4334,12 +4349,14 @@
costsInfoFlag: false, // costs
manufacturingInfoFlag: false, // Manufacturing
planningInfoFlag: false, // planning
partItemInfoFlag: false //
partItemInfoFlag: false, //
copyPartNo: ''
}
this.getPartCharacteristicList()
// BOMrouting
this.getBomAndRoutingList()
this.inventoryPartTable = 'General'
this.copyFlag2 = false
this.modalDisableFlag = true
this.modalFlag = true
},
@ -4907,32 +4924,50 @@
this.saveLoading = false
})
} else {
this.modalData.mainInfoFlag = this.mainInfoFlag
this.modalData.costsInfoFlag = this.costsInfoFlag
this.modalData.manufacturingInfoFlag = this.manufacturingInfoFlag
this.modalData.planningInfoFlag = this.planningInfoFlag
this.modalData.partItemInfoFlag = this.partItemInfoFlag
this.saveLoading = true
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
})
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 No3')
// 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 No3')
// 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);
// })
},
//

Loading…
Cancel
Save