Browse Source

2025-09-05

master
fengyuan_yang 1 year 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()
// 查出该物料的BOM和routing的替代
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 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);
// })
},
// 文件删除

Loading…
Cancel
Save