|
|
@ -3256,6 +3256,11 @@ |
|
|
attributeDialog: true, |
|
|
attributeDialog: true, |
|
|
uploadDialog: false, |
|
|
uploadDialog: false, |
|
|
saveItemModelFlag: false, |
|
|
saveItemModelFlag: false, |
|
|
|
|
|
mainInfoFlag: false, // 主信息标识 |
|
|
|
|
|
costsInfoFlag: false, // costs标识 |
|
|
|
|
|
manufacturingInfoFlag: false, // Manufacturing标识 |
|
|
|
|
|
planningInfoFlag: false, // planning标识 |
|
|
|
|
|
partItemInfoFlag: false, // 属性信息标识 |
|
|
fromPartModelFlag: false, |
|
|
fromPartModelFlag: false, |
|
|
filterVisible: false, |
|
|
filterVisible: false, |
|
|
isFilterSearch: false, |
|
|
isFilterSearch: false, |
|
|
@ -3294,6 +3299,7 @@ |
|
|
this.searchData.plmPartNo = partNo; |
|
|
this.searchData.plmPartNo = partNo; |
|
|
} |
|
|
} |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
|
|
|
this.setupWatchers() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
activated() { |
|
|
activated() { |
|
|
@ -3323,6 +3329,76 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
// 重置标识 |
|
|
|
|
|
resetFlags () { |
|
|
|
|
|
this.mainInfoFlag = false |
|
|
|
|
|
this.costsInfoFlag = false |
|
|
|
|
|
this.manufacturingInfoFlag = false |
|
|
|
|
|
this.planningInfoFlag = false |
|
|
|
|
|
this.partItemInfoFlag = false |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 设置监听 |
|
|
|
|
|
setupWatchers() { |
|
|
|
|
|
this.teardownWatchers() |
|
|
|
|
|
const groups = { |
|
|
|
|
|
mainInfoFlag: ['partType', 'hazardCode', 'productGroupId4', 'productGroupId3', |
|
|
|
|
|
'umId', 'groupId', 'productGroupId1', 'familyId', 'productGroupId2', 'typeDesignation', |
|
|
|
|
|
'assetClass', 'dimQuality', 'partStatus', 'weightNet', 'uomForWeightNet', 'frequencyClass', |
|
|
|
|
|
'abcClass', 'volumeNet', 'uomForVolumeNet', 'lifecycleStage', 'manufacturingLeadTime', |
|
|
|
|
|
'countryOfOrigin', 'expectedLeadTime', 'durabilityDay', 'regionOfOrigin', 'intrastatConvFactor', |
|
|
|
|
|
'customsStatNo', 'remark', 'inventoryValuationMethod', 'partCostGroupId', 'inventoryPartCostLevel', |
|
|
|
|
|
'invoiceConsideration', 'zeroCostFlag'], |
|
|
|
|
|
costsInfoFlag: ['estimatedMaterialCost'], |
|
|
|
|
|
manufacturingInfoFlag: ['cumLeadTime', 'backFlushPart', 'byProdAsSupplyInMrpDb', 'unprotectedLeadTime', |
|
|
|
|
|
'issueType', 'mrpControlFlagDb', 'fixedLeadTimeDay', 'overReporting', 'useTheoreticalDensityDb', |
|
|
|
|
|
'variableLeadTimeDay', 'overReportTolerance', 'fixedLeadTimeHour', 'density', 'variableLeadTimeHour'], |
|
|
|
|
|
planningInfoFlag: ['planningMethod', 'safetyStock', 'minOrderQty', 'maxOrderQty', 'mulOrderQty', |
|
|
|
|
|
'safetyLeadTime', 'shrinkageFac', 'stdOrderQty'], |
|
|
|
|
|
} |
|
|
|
|
|
Object.entries(groups).forEach(([flagName, keys]) => { |
|
|
|
|
|
keys.forEach(key => { |
|
|
|
|
|
const unwatch = this.$watch( |
|
|
|
|
|
() => this.modalData[key], |
|
|
|
|
|
(newVal, oldVal) => { |
|
|
|
|
|
if (oldVal === undefined) return; // 忽略初始化赋值 |
|
|
|
|
|
if (newVal !== oldVal && !this[flagName]) { |
|
|
|
|
|
this[flagName] = true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
this.watchers.push(unwatch) |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
let isFirstChange = true |
|
|
|
|
|
this.unwatchTable = this.$watch( |
|
|
|
|
|
() => JSON.stringify(this.partItemList), |
|
|
|
|
|
(newVal, oldVal) => { |
|
|
|
|
|
if (isFirstChange) { |
|
|
|
|
|
isFirstChange = false |
|
|
|
|
|
return // 第一次不处理 |
|
|
|
|
|
} |
|
|
|
|
|
if (newVal !== oldVal) { |
|
|
|
|
|
this.partItemInfoFlag = true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 清除监听 |
|
|
|
|
|
teardownWatchers () { |
|
|
|
|
|
// 清除其他信息监听 |
|
|
|
|
|
this.watchers.forEach(unwatch => unwatch()) |
|
|
|
|
|
this.watchers = [] |
|
|
|
|
|
// 清除属性监听 |
|
|
|
|
|
if (this.unwatchTable) { |
|
|
|
|
|
this.unwatchTable() |
|
|
|
|
|
this.unwatchTable = null |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 默认全选 |
|
|
// 默认全选 |
|
|
defaultChecked () { |
|
|
defaultChecked () { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
@ -3574,20 +3650,12 @@ |
|
|
sizeChangeHandle (val) { |
|
|
sizeChangeHandle (val) { |
|
|
this.pageSize = val |
|
|
this.pageSize = val |
|
|
this.pageIndex = 1 |
|
|
this.pageIndex = 1 |
|
|
if ( this.isFilterSearch === false){ |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.queryByAnyField(this.filterSearchData) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.getDataList() |
|
|
}, |
|
|
}, |
|
|
// 当前页 |
|
|
// 当前页 |
|
|
currentChangeHandle (val) { |
|
|
currentChangeHandle (val) { |
|
|
this.pageIndex = val |
|
|
this.pageIndex = val |
|
|
if ( this.isFilterSearch === false){ |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.queryByAnyField(this.filterSearchData) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.getDataList() |
|
|
}, |
|
|
}, |
|
|
// 每页数 |
|
|
// 每页数 |
|
|
locationSizeChangeHandle (val) { |
|
|
locationSizeChangeHandle (val) { |
|
|
@ -3613,7 +3681,7 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// ======== 页签切换相关方法 ======== |
|
|
// ======== 页签切换相关方法 ======== |
|
|
// 未知 |
|
|
|
|
|
|
|
|
|
|
|
selectFlag(row, index) { |
|
|
selectFlag(row, index) { |
|
|
if (row.status !== 'Y') { |
|
|
if (row.status !== 'Y') { |
|
|
return true |
|
|
return true |
|
|
@ -3742,7 +3810,6 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
this.isFilterSearch = false |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 其他页面跳转来的查询方法,如果该料号已经转正,则按照IFS料号跳转 |
|
|
// 其他页面跳转来的查询方法,如果该料号已经转正,则按照IFS料号跳转 |
|
|
@ -3876,6 +3943,10 @@ |
|
|
plmPartNo: '', |
|
|
plmPartNo: '', |
|
|
showInQueryFlag: 'Y', |
|
|
showInQueryFlag: 'Y', |
|
|
temporaryPartFlag: 'Y', |
|
|
temporaryPartFlag: 'Y', |
|
|
|
|
|
mainInfoFlag: false, // 主信息标识 |
|
|
|
|
|
costsInfoFlag: false, // costs标识 |
|
|
|
|
|
manufacturingInfoFlag: false, // Manufacturing标识 |
|
|
|
|
|
planningInfoFlag: false, // planning标识 |
|
|
} |
|
|
} |
|
|
this.partItemList = [] |
|
|
this.partItemList = [] |
|
|
this.inventoryPartTable = 'General' |
|
|
this.inventoryPartTable = 'General' |
|
|
@ -3992,7 +4063,13 @@ |
|
|
ifsPartNo: row.ifsPartNo, |
|
|
ifsPartNo: row.ifsPartNo, |
|
|
showInQueryFlag: row.showInQueryFlag, |
|
|
showInQueryFlag: row.showInQueryFlag, |
|
|
temporaryPartFlag: row.temporaryPartFlag, |
|
|
temporaryPartFlag: row.temporaryPartFlag, |
|
|
|
|
|
mainInfoFlag: false, // 主信息标识 |
|
|
|
|
|
costsInfoFlag: false, // costs标识 |
|
|
|
|
|
manufacturingInfoFlag: false, // Manufacturing标识 |
|
|
|
|
|
planningInfoFlag: false, // planning标识 |
|
|
} |
|
|
} |
|
|
|
|
|
this.resetFlags() // 重置标识 |
|
|
|
|
|
this.setupWatchers() // 设置监听 |
|
|
this.getPartCharacteristicList() |
|
|
this.getPartCharacteristicList() |
|
|
this.inventoryPartTable = 'General' |
|
|
this.inventoryPartTable = 'General' |
|
|
this.modalDisableFlag = true |
|
|
this.modalDisableFlag = true |
|
|
@ -4104,6 +4181,10 @@ |
|
|
ifsPartNo: row.ifsPartNo, |
|
|
ifsPartNo: row.ifsPartNo, |
|
|
showInQueryFlag: row.showInQueryFlag, |
|
|
showInQueryFlag: row.showInQueryFlag, |
|
|
temporaryPartFlag: row.temporaryPartFlag, |
|
|
temporaryPartFlag: row.temporaryPartFlag, |
|
|
|
|
|
mainInfoFlag: false, // 主信息标识 |
|
|
|
|
|
costsInfoFlag: false, // costs标识 |
|
|
|
|
|
manufacturingInfoFlag: false, // Manufacturing标识 |
|
|
|
|
|
planningInfoFlag: false, // planning标识 |
|
|
} |
|
|
} |
|
|
this.getPartCharacteristicList() |
|
|
this.getPartCharacteristicList() |
|
|
this.inventoryPartTable = 'General' |
|
|
this.inventoryPartTable = 'General' |
|
|
@ -4217,6 +4298,10 @@ |
|
|
plmPartNo: row.plmPartNo, |
|
|
plmPartNo: row.plmPartNo, |
|
|
showInQueryFlag: row.showInQueryFlag, |
|
|
showInQueryFlag: row.showInQueryFlag, |
|
|
temporaryPartFlag: row.temporaryPartFlag, |
|
|
temporaryPartFlag: row.temporaryPartFlag, |
|
|
|
|
|
mainInfoFlag: false, // 主信息标识 |
|
|
|
|
|
costsInfoFlag: false, // costs标识 |
|
|
|
|
|
manufacturingInfoFlag: false, // Manufacturing标识 |
|
|
|
|
|
planningInfoFlag: false, // planning标识 |
|
|
} |
|
|
} |
|
|
this.getPartCharacteristicList() |
|
|
this.getPartCharacteristicList() |
|
|
// 查出该物料的BOM和routing的替代 |
|
|
// 查出该物料的BOM和routing的替代 |
|
|
@ -4226,6 +4311,18 @@ |
|
|
this.modalFlag = true |
|
|
this.modalFlag = true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 关闭模态框 |
|
|
|
|
|
closeModal () { |
|
|
|
|
|
this.modalFlag = false |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 模态框关闭事件 |
|
|
|
|
|
handleDialogClose () { |
|
|
|
|
|
if (this.modalData.flag === '2') { |
|
|
|
|
|
this.teardownWatchers() // 清除监听 |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 查出该物料的BOM和routing的替代 |
|
|
// 查出该物料的BOM和routing的替代 |
|
|
getBomAndRoutingList () { |
|
|
getBomAndRoutingList () { |
|
|
getBomAndRoutingList(this.modalData).then(({data}) => { |
|
|
getBomAndRoutingList(this.modalData).then(({data}) => { |
|
|
@ -4714,6 +4811,7 @@ |
|
|
this.saveLoading = true |
|
|
this.saveLoading = true |
|
|
partInformationSave(this.modalData).then(({data}) => { |
|
|
partInformationSave(this.modalData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.searchData.plmPartNo = this.modalData.partNo |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
this.modalFlag = false |
|
|
this.modalFlag = false |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
@ -4728,8 +4826,6 @@ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
this.saveLoading = false |
|
|
this.saveLoading = false |
|
|
this.searchData.plmPartNo = this.modalData.partNo |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
}).catch(()=>{ |
|
|
}).catch(()=>{ |
|
|
this.saveLoading = false |
|
|
this.saveLoading = false |
|
|
}) |
|
|
}) |
|
|
@ -4774,9 +4870,15 @@ |
|
|
this.saveLoading = false |
|
|
this.saveLoading = false |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} 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 |
|
|
this.saveLoading = true |
|
|
partInformationEdit(this.modalData).then(({data}) => { |
|
|
partInformationEdit(this.modalData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.searchData.plmPartNo = this.modalData.plmPartNo |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
this.modalFlag = false |
|
|
this.modalFlag = false |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
@ -4791,8 +4893,6 @@ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
this.saveLoading = false |
|
|
this.saveLoading = false |
|
|
this.searchData.plmPartNo = this.modalData.plmPartNo |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
}).catch(()=>{ |
|
|
}).catch(()=>{ |
|
|
this.saveLoading = false |
|
|
this.saveLoading = false |
|
|
}) |
|
|
}) |
|
|
@ -5675,29 +5775,6 @@ |
|
|
localStorage.setItem('recipeData', JSON.stringify(inData)) |
|
|
localStorage.setItem('recipeData', JSON.stringify(inData)) |
|
|
window.open('#/part-recipeManagement') |
|
|
window.open('#/part-recipeManagement') |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
queryByAnyField(params){ |
|
|
|
|
|
params.no = this.pageIndex |
|
|
|
|
|
params.size = this.pageSize |
|
|
|
|
|
params.site = this.$store.state.user.site |
|
|
|
|
|
params.userId = this.$store.state.user.id.toString() |
|
|
|
|
|
this.dataListLoading = true; |
|
|
|
|
|
partInformationSearchAny(params).then(({data})=>{ |
|
|
|
|
|
if (data && data.code === 0){ |
|
|
|
|
|
this.dataList = data.page.list |
|
|
|
|
|
}else { |
|
|
|
|
|
this.$message.warning(data.msg) |
|
|
|
|
|
} |
|
|
|
|
|
this.dataListLoading = false; |
|
|
|
|
|
this.totalPage = data.page.totalCount |
|
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
|
this.$message.error(error) |
|
|
|
|
|
this.dataListLoading = false; |
|
|
|
|
|
}) |
|
|
|
|
|
this.filterSearchData = params |
|
|
|
|
|
this.isFilterSearch = true |
|
|
|
|
|
this.filterVisible = false |
|
|
|
|
|
}, |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|