|
|
@ -602,33 +602,25 @@ export default { |
|
|
}, |
|
|
}, |
|
|
handleChangeVersion(){ |
|
|
handleChangeVersion(){ |
|
|
let node = this.$refs.tree.getCurrentNode(); |
|
|
let node = this.$refs.tree.getCurrentNode(); |
|
|
let row = { |
|
|
|
|
|
routingRevision:null, |
|
|
|
|
|
alternativeNo: '', |
|
|
|
|
|
routingType: null, |
|
|
|
|
|
} |
|
|
|
|
|
if (this.treeData.length === 0){ |
|
|
if (this.treeData.length === 0){ |
|
|
this.$message.warning("未维护BOM结构") |
|
|
this.$message.warning("未维护BOM结构") |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (this.dataList.length > 0){ |
|
|
|
|
|
row = this.dataList[0]; |
|
|
|
|
|
} |
|
|
|
|
|
if (node){ |
|
|
if (node){ |
|
|
this.routing = { |
|
|
this.routing = { |
|
|
partNo: node.partNo, |
|
|
partNo: node.partNo, |
|
|
buNo: node.buNo, |
|
|
buNo: node.buNo, |
|
|
site: node.site, |
|
|
site: node.site, |
|
|
routingType: row.routingType, |
|
|
|
|
|
routingRevision: row.routingRevision, |
|
|
|
|
|
alternativeNo: row.alternativeNo, |
|
|
|
|
|
|
|
|
routingType: node.bomType, |
|
|
|
|
|
routingRevision: node.engChgLevel, |
|
|
|
|
|
alternativeNo: node.alternativeNo, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
this.handleQueryVersionList(); |
|
|
this.handleQueryVersionList(); |
|
|
this.versionVisible = true; |
|
|
this.versionVisible = true; |
|
|
}, |
|
|
}, |
|
|
versionRowStyle({row}){ |
|
|
versionRowStyle({row}){ |
|
|
if (row.routingRevision === this.routing.routingRevision){ |
|
|
|
|
|
|
|
|
if (row.routingRevision === this.routing.routingRevision && row.routingType === this.routing.routingType){ |
|
|
return { 'background-color': '#E8F7F6' }; |
|
|
return { 'background-color': '#E8F7F6' }; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -636,14 +628,11 @@ export default { |
|
|
let node = this.$refs.tree.getCurrentNode(); |
|
|
let node = this.$refs.tree.getCurrentNode(); |
|
|
let params = { |
|
|
let params = { |
|
|
treeId: node.id, |
|
|
treeId: node.id, |
|
|
routingType: this.routing.routingType, |
|
|
|
|
|
} |
|
|
} |
|
|
queryQuoteDetailRoutingVersion(params).then(({data})=>{ |
|
|
queryQuoteDetailRoutingVersion(params).then(({data})=>{ |
|
|
if (data && data.code === 0){ |
|
|
if (data && data.code === 0){ |
|
|
this.versionList = data.rows; |
|
|
this.versionList = data.rows; |
|
|
if (this.versionList.length > 0){ |
|
|
|
|
|
this.handleQueryAlternativeList(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.handleQueryAlternativeList(); |
|
|
}else { |
|
|
}else { |
|
|
this.$message.warning(data.msg); |
|
|
this.$message.warning(data.msg); |
|
|
} |
|
|
} |
|
|
@ -668,10 +657,11 @@ export default { |
|
|
versionRowClick(row){ |
|
|
versionRowClick(row){ |
|
|
this.routing.routingType = row.routingType; |
|
|
this.routing.routingType = row.routingType; |
|
|
this.routing.routingRevision = row.routingRevision; |
|
|
this.routing.routingRevision = row.routingRevision; |
|
|
|
|
|
this.handleQueryAlternativeList(); |
|
|
}, |
|
|
}, |
|
|
alternativeRowStyle({row}){ |
|
|
alternativeRowStyle({row}){ |
|
|
if (this.dataList.length > 0){ |
|
|
if (this.dataList.length > 0){ |
|
|
if (this.dataList[0].alternativeNo === row.alternativeNo && this.dataList[0].routingRevision === row.routingRevision){ |
|
|
|
|
|
|
|
|
if (this.routing.alternativeNo === row.alternativeNo && this.routing.routingRevision === row.routingRevision && this.routing.routingType === row.routingType){ |
|
|
return { 'background-color': '#E8F7F6' }; |
|
|
return { 'background-color': '#E8F7F6' }; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -684,7 +674,7 @@ export default { |
|
|
versionNo: this.quoteDetail.versionNo, |
|
|
versionNo: this.quoteDetail.versionNo, |
|
|
site: row.site, |
|
|
site: row.site, |
|
|
partNo: row.partNo, |
|
|
partNo: row.partNo, |
|
|
buNo: row.buNo, |
|
|
|
|
|
|
|
|
buNo: "*", |
|
|
quoteNo: this.quoteDetail.quoteNo, |
|
|
quoteNo: this.quoteDetail.quoteNo, |
|
|
routingType: row.routingType, |
|
|
routingType: row.routingType, |
|
|
routingRevision: row.routingRevision, |
|
|
routingRevision: row.routingRevision, |
|
|
@ -736,9 +726,6 @@ export default { |
|
|
isAllRouting(newVal,oldVal){ |
|
|
isAllRouting(newVal,oldVal){ |
|
|
this.handleQueryDetailRouting(); |
|
|
this.handleQueryDetailRouting(); |
|
|
}, |
|
|
}, |
|
|
'routing.routingRevision'(newVal,oldVal){ |
|
|
|
|
|
this.handleQueryAlternativeList(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|