|
|
|
@ -318,7 +318,8 @@ |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
<el-footer style="height:30px;margin-top:20px;text-align:center"> |
|
|
|
<el-button :loading="saveAllLoading" type="primary" @click="saveData">保存</el-button> |
|
|
|
<el-button :loading="saveAllLoading" type="primary" @click="saveData(true)">应用</el-button> |
|
|
|
<el-button :loading="saveAllLoading" type="primary" @click="saveData(false)">保存</el-button> |
|
|
|
<el-button type="primary" @click="closeModal">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
@ -2690,7 +2691,7 @@ export default { |
|
|
|
/** |
|
|
|
* bom新增/编辑 |
|
|
|
*/ |
|
|
|
saveData () { |
|
|
|
saveData (isClose) { |
|
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
|
this.$message.warning('请选择物料编码!') |
|
|
|
return |
|
|
|
@ -2742,31 +2743,16 @@ export default { |
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
informationList: this.subDetailList |
|
|
|
} |
|
|
|
if (this.modalData.flag === '1') { |
|
|
|
// if (this.modalData.flag === '1') { |
|
|
|
this.saveAllLoading = true |
|
|
|
bomManagementSave(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
this.modalFlag = false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
this.saveAllLoading = false |
|
|
|
}) |
|
|
|
if (isClose) { |
|
|
|
this.updateModal(data.rows) |
|
|
|
} else { |
|
|
|
this.saveAllLoading = true |
|
|
|
bomManagementEdit(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
this.modalFlag = false |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
@ -2780,7 +2766,26 @@ export default { |
|
|
|
} |
|
|
|
this.saveAllLoading = false |
|
|
|
}) |
|
|
|
} |
|
|
|
// } else { |
|
|
|
// this.saveAllLoading = true |
|
|
|
// bomManagementEdit(tempData).then(({data}) => { |
|
|
|
// if (data && data.code === 0) { |
|
|
|
// this.getDataList() |
|
|
|
// this.modalFlag = false |
|
|
|
// this.$message({ |
|
|
|
// message: '操作成功', |
|
|
|
// type: 'success', |
|
|
|
// duration: 1500, |
|
|
|
// onClose: () => {} |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// this.$alert(data.msg, '错误', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// this.saveAllLoading = false |
|
|
|
// }) |
|
|
|
// } |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
|