|
|
@ -185,6 +185,8 @@ |
|
|
<el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build</el-button> |
|
|
<el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build</el-button> |
|
|
<el-button v-if="detailData.status === 'Buildable'" type="primary" @click="updateStatusToObsolete">Retire</el-button> |
|
|
<el-button v-if="detailData.status === 'Buildable'" type="primary" @click="updateStatusToObsolete">Retire</el-button> |
|
|
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="primary" @click="toBecomeOfficialBom" :loading="toBecomeOfficialLoading">转正式BOM</el-button> |
|
|
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="primary" @click="toBecomeOfficialBom" :loading="toBecomeOfficialLoading">转正式BOM</el-button> |
|
|
|
|
|
<!-- <el-button v-if="modalData.flag === '2' && detailData.officialFlag === 'Y'" type="primary" @click="syncPlmToIfs" :loading="toBecomeOfficialLoading">数据同步-正向</el-button>--> |
|
|
|
|
|
<el-button v-if="modalData.flag === '2' && detailData.officialFlag === 'Y'" type="primary" @click="syncIfsToPlm" :loading="toBecomeOfficialLoading">数据同步-反向</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px"> |
|
|
<el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px"> |
|
|
@ -260,6 +262,7 @@ |
|
|
label="操作"> |
|
|
label="操作"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-link style="cursor: pointer" @click="updateComponentModal(scope.row)">编辑</el-link> |
|
|
<el-link style="cursor: pointer" @click="updateComponentModal(scope.row)">编辑</el-link> |
|
|
|
|
|
<!-- <el-link style="cursor: pointer" @click="copyComponentModal(scope.row)">复制</el-link>--> |
|
|
<el-dropdown trigger="click"> |
|
|
<el-dropdown trigger="click"> |
|
|
<el-link style="cursor: pointer;font-size: 12px"> |
|
|
<el-link style="cursor: pointer;font-size: 12px"> |
|
|
更多 |
|
|
更多 |
|
|
@ -978,6 +981,8 @@ import { |
|
|
queryPartListBom, // 查出可创建BOM的物料 |
|
|
queryPartListBom, // 查出可创建BOM的物料 |
|
|
queryPartListAll, // 查询包含Purchase(Raw)的物料 |
|
|
queryPartListAll, // 查询包含Purchase(Raw)的物料 |
|
|
queryComponentPartBomList, // 查子物料BOM |
|
|
queryComponentPartBomList, // 查子物料BOM |
|
|
|
|
|
syncBomInfoPlmToIfs, // 正向同步替代下的数据 PLM-IFS |
|
|
|
|
|
syncBomInfoIfsToPlm, // 反向同步替代下的数据 IFS-PLM |
|
|
} from '@/api/part/bomManagement.js' |
|
|
} from '@/api/part/bomManagement.js' |
|
|
import ChooseList from '@/views/modules/common/Chooselist' |
|
|
import ChooseList from '@/views/modules/common/Chooselist' |
|
|
import {isAuth} from "../../../utils"; |
|
|
import {isAuth} from "../../../utils"; |
|
|
@ -3364,6 +3369,48 @@ export default { |
|
|
this.componentSaveModal = true |
|
|
this.componentSaveModal = true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 子明细复制模态框 |
|
|
|
|
|
copyComponentModal (row) { |
|
|
|
|
|
this.componentData = { |
|
|
|
|
|
flag: '3', |
|
|
|
|
|
site: row.site, |
|
|
|
|
|
partNo: row.partNo, |
|
|
|
|
|
engChgLevel: row.engChgLevel, |
|
|
|
|
|
bomType: row.bomType, |
|
|
|
|
|
alternativeNo: row.alternativeNo, |
|
|
|
|
|
componentPart: row.componentPart, |
|
|
|
|
|
componentPartDesc: row.componentPartDesc, |
|
|
|
|
|
printUnit: row.printUnit, |
|
|
|
|
|
printUnitName: row.printUnitName, |
|
|
|
|
|
qtyPerAssembly: row.qtyPerAssembly, |
|
|
|
|
|
componentScrap: row.componentScrap, |
|
|
|
|
|
issueType: row.issueType, |
|
|
|
|
|
shrinkageFactor: row.shrinkageFactor, |
|
|
|
|
|
lineItemNo: row.lineItemNo, |
|
|
|
|
|
operationId: row.operationId, |
|
|
|
|
|
operationNo: row.operationNo, |
|
|
|
|
|
issueToLoc: row.issueToLoc, |
|
|
|
|
|
issueToLocName: row.issueToLocName, |
|
|
|
|
|
noteText: row.noteText, |
|
|
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
|
|
lineSequence: row.lineSequence, |
|
|
|
|
|
consumptionItem: row.consumptionItem, |
|
|
|
|
|
productFlag: 'component' |
|
|
|
|
|
} |
|
|
|
|
|
// 获取子料的序号 |
|
|
|
|
|
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 |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 副产品编辑模态框 |
|
|
// 副产品编辑模态框 |
|
|
updateByProductModal (row) { |
|
|
updateByProductModal (row) { |
|
|
this.componentData = { |
|
|
this.componentData = { |
|
|
@ -4465,6 +4512,7 @@ export default { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
this.modalFlag = false |
|
|
this.modalFlag = false |
|
|
|
|
|
this.toBecomeOfficialLoading = false |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
message: '操作成功', |
|
|
message: '操作成功', |
|
|
type: 'success', |
|
|
type: 'success', |
|
|
@ -4472,14 +4520,76 @@ export default { |
|
|
onClose: () => {} |
|
|
onClose: () => {} |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
this.toBecomeOfficialLoading = false |
|
|
this.$alert(data.msg, '错误', { |
|
|
this.$alert(data.msg, '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
}).catch(()=>{ |
|
|
this.toBecomeOfficialLoading = false |
|
|
this.toBecomeOfficialLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 正向同步替代下的数据 PLM-IFS |
|
|
|
|
|
syncPlmToIfs () { |
|
|
|
|
|
this.$confirm(`警告:该操作将会更新此替代下的所有信息,是否继续?`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.detailData.updateBy = this.$store.state.user.name |
|
|
|
|
|
this.toBecomeOfficialLoading = true |
|
|
|
|
|
syncBomInfoPlmToIfs(this.detailData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.refreshSubDetailTable() |
|
|
|
|
|
this.toBecomeOfficialLoading = false |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => {} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.toBecomeOfficialLoading = false |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}).catch(()=>{ |
|
|
}).catch(()=>{ |
|
|
this.toBecomeOfficialLoading = false |
|
|
this.toBecomeOfficialLoading = false |
|
|
}) |
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 反向同步替代下的数据 IFS-PLM |
|
|
|
|
|
syncIfsToPlm () { |
|
|
|
|
|
this.$confirm(`警告:该操作将会更新此替代下的所有信息,是否继续?`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.detailData.updateBy = this.$store.state.user.name |
|
|
|
|
|
this.toBecomeOfficialLoading = true |
|
|
|
|
|
syncBomInfoIfsToPlm(this.detailData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.refreshSubDetailTable() |
|
|
|
|
|
this.toBecomeOfficialLoading = false |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => {} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.toBecomeOfficialLoading = false |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(()=>{ |
|
|
|
|
|
this.toBecomeOfficialLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 根据物料编码查询工序 |
|
|
// 根据物料编码查询工序 |
|
|
|