|
|
|
@ -501,7 +501,7 @@ |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px"> |
|
|
|
<el-form-item :label="'重量分配'" prop="weightShare" :rules="componentRules.weightShare"> |
|
|
|
<el-input-number :precision="10" :controls="false" :step="0" v-model="componentData.weightShare" @change="changeWeightShare" style="width: 115px"></el-input-number> |
|
|
|
<el-input-number :precision="10" :controls="false" :step="0" disabled v-model="componentData.weightShare" @change="changeWeightShare" style="width: 115px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'零件-按重量'"> |
|
|
|
<el-input-number :precision="10" :controls="false" :step="0" v-model="componentData.partsByWeight" disabled style="width: 115px"></el-input-number> |
|
|
|
@ -3419,67 +3419,71 @@ export default { |
|
|
|
|
|
|
|
// 子明细新增模态框 |
|
|
|
saveComponentModal () { |
|
|
|
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
|
this.$message.warning('请先选择替代!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.componentData = { |
|
|
|
flag: '1', |
|
|
|
site: this.$store.state.user.site, |
|
|
|
partNo: this.modalData.partNo, |
|
|
|
engChgLevel: this.modalData.engChgLevel, |
|
|
|
bomType: this.modalData.bomType, |
|
|
|
alternativeNo: this.detailData.alternativeNo, |
|
|
|
componentPart: '', |
|
|
|
componentPartDesc: '', |
|
|
|
printUnit: '', |
|
|
|
printUnitName: '', |
|
|
|
qtyPerAssembly: undefined, |
|
|
|
componentScrap: 0, |
|
|
|
issueType: 'Reserve And Backflush', |
|
|
|
shrinkageFactor: 0, |
|
|
|
lineItemNo: '', |
|
|
|
operationId: '', |
|
|
|
operationNo: '', |
|
|
|
issueToLoc: '', |
|
|
|
issueToLocName: '', |
|
|
|
noteText: '', |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
lineSequence: '', |
|
|
|
consumptionItem: 'Consumed', |
|
|
|
productFlag: 'component', |
|
|
|
weightShare: undefined, |
|
|
|
partsByWeight: undefined, |
|
|
|
qtyUom: undefined, |
|
|
|
issuePlannedScrapDb: 'TRUE', |
|
|
|
issueOverreportedQtyDb: 'FALSE', |
|
|
|
fixedQtyFlag: 'Not fixed', |
|
|
|
promisePlanned: 'Promised', |
|
|
|
phantomConsume: 'Not Phantom Consume', |
|
|
|
operCostDistribution: '0', |
|
|
|
genOhCostDistribution: '0', |
|
|
|
qtyKg: undefined, |
|
|
|
byProdAsSupplyInMrpDb: 'FALSE', |
|
|
|
leadtimeOffset: '0', |
|
|
|
stdPlannedItem: '1', |
|
|
|
chargedItem: 'Item not charged', |
|
|
|
excludeFromCalculationsDb: 'FALSE', |
|
|
|
excludeFromAsBuiltDb: 'FALSE', |
|
|
|
lotBatchOriginDb: 'FALSE' |
|
|
|
} |
|
|
|
|
|
|
|
// 获取子料的序号 |
|
|
|
getComponentLineSequence(this.componentData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.componentData.lineSequence = data.lineSequence |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
this.$alert("配方子件的【新增】【删除】操作需到IFS系统中,然后通过【数据同步-反向】同步到PLM系统!", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
this.componentDisableFlag = false |
|
|
|
this.componentSaveModal = true |
|
|
|
// if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
|
// this.$message.warning('请先选择替代!') |
|
|
|
// return |
|
|
|
// } |
|
|
|
// this.componentData = { |
|
|
|
// flag: '1', |
|
|
|
// site: this.$store.state.user.site, |
|
|
|
// partNo: this.modalData.partNo, |
|
|
|
// engChgLevel: this.modalData.engChgLevel, |
|
|
|
// bomType: this.modalData.bomType, |
|
|
|
// alternativeNo: this.detailData.alternativeNo, |
|
|
|
// componentPart: '', |
|
|
|
// componentPartDesc: '', |
|
|
|
// printUnit: '', |
|
|
|
// printUnitName: '', |
|
|
|
// qtyPerAssembly: undefined, |
|
|
|
// componentScrap: 0, |
|
|
|
// issueType: 'Reserve And Backflush', |
|
|
|
// shrinkageFactor: 0, |
|
|
|
// lineItemNo: '', |
|
|
|
// operationId: '', |
|
|
|
// operationNo: '', |
|
|
|
// issueToLoc: '', |
|
|
|
// issueToLocName: '', |
|
|
|
// noteText: '', |
|
|
|
// createBy: this.$store.state.user.name, |
|
|
|
// lineSequence: '', |
|
|
|
// consumptionItem: 'Consumed', |
|
|
|
// productFlag: 'component', |
|
|
|
// weightShare: undefined, |
|
|
|
// partsByWeight: undefined, |
|
|
|
// qtyUom: undefined, |
|
|
|
// issuePlannedScrapDb: 'TRUE', |
|
|
|
// issueOverreportedQtyDb: 'FALSE', |
|
|
|
// fixedQtyFlag: 'Not fixed', |
|
|
|
// promisePlanned: 'Promised', |
|
|
|
// phantomConsume: 'Not Phantom Consume', |
|
|
|
// operCostDistribution: '0', |
|
|
|
// genOhCostDistribution: '0', |
|
|
|
// qtyKg: undefined, |
|
|
|
// byProdAsSupplyInMrpDb: 'FALSE', |
|
|
|
// leadtimeOffset: '0', |
|
|
|
// stdPlannedItem: '1', |
|
|
|
// chargedItem: 'Item not charged', |
|
|
|
// excludeFromCalculationsDb: 'FALSE', |
|
|
|
// excludeFromAsBuiltDb: 'FALSE', |
|
|
|
// lotBatchOriginDb: 'FALSE' |
|
|
|
// } |
|
|
|
// |
|
|
|
// // 获取子料的序号 |
|
|
|
// getComponentLineSequence(this.componentData).then(({data}) => { |
|
|
|
// if (data && data.code === 0) { |
|
|
|
// this.componentData.lineSequence = data.lineSequence |
|
|
|
// } else { |
|
|
|
// this.$alert(data.msg, '错误', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// this.componentDisableFlag = false |
|
|
|
// this.componentSaveModal = true |
|
|
|
}, |
|
|
|
|
|
|
|
// 副产品新增模态框 |
|
|
|
@ -4047,39 +4051,44 @@ export default { |
|
|
|
|
|
|
|
// 删除子物料 |
|
|
|
deleteComponentPart () { |
|
|
|
if (this.checkedDetail.length === 0) { |
|
|
|
this.$message.warning('请选择要删除子物料!') |
|
|
|
return |
|
|
|
} else { |
|
|
|
this.$confirm("请是否确认删除该子明细记录?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
let tempData = { |
|
|
|
informationList: this.checkedDetail, |
|
|
|
productFlag: 'component', |
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
} |
|
|
|
deleteRecipeComponent(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.subDetailList = data.rows.subDetailList |
|
|
|
this.byProductList = data.rows.byProductList |
|
|
|
this.manufStructCostDistribList = data.rows.manufStructCostDistribList |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
this.$alert("配方子件的【新增】【删除】操作需到IFS系统中,然后通过【数据同步-反向】同步到PLM系统!", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
|
|
|
|
// if (this.checkedDetail.length === 0) { |
|
|
|
// this.$message.warning('请选择要删除子物料!') |
|
|
|
// return |
|
|
|
// } else { |
|
|
|
// this.$confirm("请是否确认删除该子明细记录?", "提示", { |
|
|
|
// confirmButtonText: "确定", |
|
|
|
// cancelButtonText: "取消", |
|
|
|
// type: "warning" |
|
|
|
// }).then(() => { |
|
|
|
// let tempData = { |
|
|
|
// informationList: this.checkedDetail, |
|
|
|
// productFlag: 'component', |
|
|
|
// updateBy: this.$store.state.user.name, |
|
|
|
// } |
|
|
|
// deleteRecipeComponent(tempData).then(({data}) => { |
|
|
|
// if (data && data.code === 0) { |
|
|
|
// this.subDetailList = data.rows.subDetailList |
|
|
|
// this.byProductList = data.rows.byProductList |
|
|
|
// this.manufStructCostDistribList = data.rows.manufStructCostDistribList |
|
|
|
// this.$message({ |
|
|
|
// message: '操作成功', |
|
|
|
// type: 'success', |
|
|
|
// duration: 1500, |
|
|
|
// onClose: () => {} |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// this.$alert(data.msg, '错误', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// } |
|
|
|
}, |
|
|
|
|
|
|
|
// 删除子物料 |
|
|
|
|