|
|
|
@ -24,6 +24,7 @@ export default { |
|
|
|
}, |
|
|
|
data(){ |
|
|
|
return{ |
|
|
|
dataListLoading:false, |
|
|
|
routingAlternativeList:[], |
|
|
|
routingVersionList:[], |
|
|
|
handoffVersion:false, |
|
|
|
@ -71,6 +72,91 @@ export default { |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100, |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 102003, |
|
|
|
serialNumber: '102003Table5PartNo', |
|
|
|
tableId: "102003Table5", |
|
|
|
tableName: "报价工艺信息", |
|
|
|
columnProp: 'partNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '物料编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100, |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 102003, |
|
|
|
serialNumber: '102003Table5PartDesc', |
|
|
|
tableId: "102003Table5", |
|
|
|
tableName: "报价工艺信息", |
|
|
|
columnProp: 'partDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '物料描述', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 200, |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 102003, |
|
|
|
serialNumber: '102003Table5Version', |
|
|
|
tableId: "102003Table5", |
|
|
|
tableName: "报价工艺信息", |
|
|
|
columnProp: 'version', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '版本', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80, |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 102003, |
|
|
|
serialNumber: '102003Table5AlternativeNo', |
|
|
|
tableId: "102003Table5", |
|
|
|
tableName: "报价工艺信息", |
|
|
|
columnProp: 'alternativeNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '替代编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100, |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 102003, |
|
|
|
serialNumber: '102003Table5AlternativeDesc', |
|
|
|
tableId: "102003Table5", |
|
|
|
tableName: "报价工艺信息", |
|
|
|
columnProp: 'alternativeDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '替代描述', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120, |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 102003, |
|
|
|
@ -114,7 +200,7 @@ export default { |
|
|
|
columnProp: 'efficiencyFactor', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: '机器效率', |
|
|
|
columnLabel: '效率%', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
@ -182,7 +268,7 @@ export default { |
|
|
|
columnProp: 'laborRunFactor', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: '人工效率', |
|
|
|
columnLabel: '人工生产速度', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
@ -199,7 +285,7 @@ export default { |
|
|
|
columnProp: 'laborSetupTime', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: '人工生产速度', |
|
|
|
columnLabel: '人工调机时长', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
@ -299,22 +385,26 @@ export default { |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
nodeClick(val){ |
|
|
|
this.selectRouting = val.value.split("-") |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.$refs.tree.setCurrentKey(`${this.selectRouting[0]}-${this.selectRouting[1]}`) |
|
|
|
this.$refs.tree.setCurrentKey(`${this.selectRouting[0]}-${this.selectRouting[1]}-${this.selectRouting[2]}-${this.selectRouting[3]}-${this.selectRouting[4]}-${this.selectRouting[5]}`) |
|
|
|
}) |
|
|
|
this.searchQuoteRoutingList() |
|
|
|
}, |
|
|
|
getRoutingTreeStructure(){ |
|
|
|
let params = { |
|
|
|
site:this.detail.site, |
|
|
|
testPartNo:this.detail.productNo |
|
|
|
testPartNo:this.detail.productNo, |
|
|
|
quoteDetailId:this.detail.quotationDetailId |
|
|
|
} |
|
|
|
this.treeLoading = true; |
|
|
|
getRoutingTreeStructure(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.routingTreeStructure = data.rows; |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.$refs.tree.setCurrentKey(`${this.selectRouting[0]}-${this.selectRouting[1]}`) |
|
|
|
this.$refs.tree.setCurrentKey(`${this.selectRouting[0]}-${this.selectRouting[1]}-${this.selectRouting[2]}-${this.selectRouting[3]}-${this.selectRouting[4]}-${this.selectRouting[5]}`) |
|
|
|
}) |
|
|
|
this.searchQuoteRoutingList(); |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
@ -338,7 +428,7 @@ export default { |
|
|
|
}).catch(() => { |
|
|
|
this.selectRouting = JSON.parse(JSON.stringify(this.copyRouting)) |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.$refs.tree.setCurrentKey(`${this.selectRouting[0]}-${this.selectRouting[1]}`) |
|
|
|
this.$refs.tree.setCurrentKey(`${this.selectRouting[0]}-${this.selectRouting[1]}-${this.selectRouting[2]}-${this.selectRouting[3]}-${this.selectRouting[4]}-${this.selectRouting[5]}`) |
|
|
|
}) |
|
|
|
}); |
|
|
|
}, |
|
|
|
@ -369,18 +459,21 @@ export default { |
|
|
|
} |
|
|
|
this.selectRouting = JSON.parse(JSON.stringify(val)) |
|
|
|
this.getRoutingTreeStructure(); |
|
|
|
this.searchQuoteRoutingList(); |
|
|
|
}, |
|
|
|
searchQuoteRoutingList(){ |
|
|
|
let params = { |
|
|
|
site:this.$store.state.user.site, |
|
|
|
testPartNo: this.detail.productNo, |
|
|
|
partNo: this.selectRouting[3], |
|
|
|
version:this.selectRouting[0], |
|
|
|
routingType:this.selectRouting[1], |
|
|
|
alternativeNo:this.selectRouting[2], |
|
|
|
routingType:this.selectRouting[2], |
|
|
|
alternativeNo:this.selectRouting[1], |
|
|
|
id:this.selectRouting[4], |
|
|
|
quoteDetailId:this.detail.quotationDetailId |
|
|
|
} |
|
|
|
this.routingDetailList = []; |
|
|
|
this.dataListLoading = true; |
|
|
|
searchQuoteRoutingList(params).then(({data})=>{ |
|
|
|
this.dataListLoading = false; |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.routingDetailList = data.rows |
|
|
|
this.computedQuoteRoutingCost(); |
|
|
|
@ -388,6 +481,7 @@ export default { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.dataListLoading = false; |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -414,7 +508,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
alternativeRowStyle({row}){ |
|
|
|
if (row.version === this.selectRouting[0] && row.routingType === this.selectRouting[1] && row.alternativeNo === this.selectRouting[2]){ |
|
|
|
if (row.version === this.versionData.version && row.routingType === this.versionData.routingType && row.alternativeNo === this.versionData.alternativeNo){ |
|
|
|
return {'background-color': '#E8F7F6', cursor: 'pointer'} |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -425,9 +519,9 @@ export default { |
|
|
|
}, |
|
|
|
clickAlternative(row){ |
|
|
|
let params = { |
|
|
|
id:this.selectRouting[4], |
|
|
|
site:this.$store.state.user.site, |
|
|
|
testPartNo: this.detail.productNo, |
|
|
|
partNo: this.detail.productNo, |
|
|
|
partNo: row.partNo, |
|
|
|
version:row.version, |
|
|
|
routingType:row.routingType, |
|
|
|
alternativeNo:row.alternativeNo, |
|
|
|
@ -435,13 +529,7 @@ export default { |
|
|
|
} |
|
|
|
updateQuoteRoutingList(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.selectRouting[0] = row.version; |
|
|
|
this.selectRouting[1] = row.routingType; |
|
|
|
this.selectRouting[2] = row.alternativeNo; |
|
|
|
this.$message.success(data.msg) |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.$refs.tree.setCurrentKey(`${this.selectRouting[0]}-${this.selectRouting[1]}`) |
|
|
|
}) |
|
|
|
this.searchQuoteRoutingList(); |
|
|
|
this.handoffVersion = false |
|
|
|
}else { |
|
|
|
@ -452,30 +540,41 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
clickVersionCheck(){ |
|
|
|
this.handoffVersion = true; |
|
|
|
this.routingVersionList = []; |
|
|
|
this.versionData = { |
|
|
|
version:this.selectRouting[0], |
|
|
|
routingType:this.selectRouting[1] |
|
|
|
} |
|
|
|
this.routingAlternativeList = [] |
|
|
|
this.routingVersionList = [] |
|
|
|
this.versionData = {}; |
|
|
|
this.searchQuoteRoutingVersion(); |
|
|
|
}, |
|
|
|
searchQuoteRoutingVersion(){ |
|
|
|
let params = { |
|
|
|
site:this.detail.site, |
|
|
|
quoteDetailId:this.detail.quotationDetailId, |
|
|
|
partNo:this.detail.productNo, |
|
|
|
partNo:this.selectRouting[3], |
|
|
|
id:this.selectRouting[4] |
|
|
|
} |
|
|
|
this.routingVersionList = []; |
|
|
|
searchQuoteRoutingAlternativeNo(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.routingVersionList = data.rows; |
|
|
|
this.selectionVersion();//默认选择项 |
|
|
|
this.handoffVersion = true; |
|
|
|
if (data.row !== undefined && data.row !== null){ |
|
|
|
this.versionData = { |
|
|
|
partNo:data.row.partNo, |
|
|
|
site:data.row.site, |
|
|
|
version:data.row.version, |
|
|
|
routingType:data.row.routingType, |
|
|
|
alternativeNo:data.row.alternativeNo |
|
|
|
} |
|
|
|
}else { |
|
|
|
this.selectionVersion();//默认选择项 |
|
|
|
} |
|
|
|
// 查询替代 |
|
|
|
this.searchRoutingAlternative(this.versionData); |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
selectionVersion(){ |
|
|
|
@ -514,7 +613,7 @@ export default { |
|
|
|
|
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div style="margin-bottom: 5px"><el-link @click="clickVersionCheck">切换版本</el-link></div> |
|
|
|
<div style="margin-bottom: 5px"><el-link style="cursor:pointer;" v-if="this.selectRouting.length === 6" @click="clickVersionCheck">切换版本</el-link></div> |
|
|
|
<el-container> |
|
|
|
<el-aside width="24%" style="padding: 0;" :style="{height: height}" v-loading="treeLoading"> |
|
|
|
<el-tree :data="routingTreeStructure" |
|
|
|
@ -528,7 +627,8 @@ export default { |
|
|
|
</el-aside> |
|
|
|
<el-main style="padding: 0"> |
|
|
|
<el-table :data="routingDetailList" :height="height" |
|
|
|
stripe border style="margin-top: 10px"> |
|
|
|
stripe border element-loading-text = "数据正在加载中" |
|
|
|
v-loading="dataListLoading"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnDetailList" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
@ -547,7 +647,7 @@ export default { |
|
|
|
</el-table> |
|
|
|
</el-main> |
|
|
|
</el-container> |
|
|
|
<el-dialog :visible.sync="handoffVersion" title="工艺版本切换" append-to-body> |
|
|
|
<el-dialog :visible.sync="handoffVersion" title="工艺版本切换" v-drag append-to-body> |
|
|
|
<el-table :data="routingVersionList" :row-style="versionRowStyle" ref="routingVersionTable" style="margin-top: 8px" border :height="240" @row-click="clickVersionTable"> |
|
|
|
<el-table-column label="物料编码" prop="partNo" header-align="center" align="center" show-overflow-tooltip min-width="140"/> |
|
|
|
<el-table-column label="物料描述" prop="partDesc" header-align="center" align="left" show-overflow-tooltip min-width="200"/> |
|
|
|
@ -563,7 +663,7 @@ export default { |
|
|
|
<el-table-column label="类型" prop="routingType" header-align="center" align="center" show-overflow-tooltip min-width="100"/> |
|
|
|
<el-table-column label="操作" min-width="80" header-align="center" align="center"> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<span style="color: #888;cursor:no-drop;" v-if="row.version === selectRouting[0] && row.routingType === selectRouting[1] && row.alternativeNo === selectRouting[2]">选择</span> |
|
|
|
<span style="color: #888;cursor:no-drop;" v-if="row.version === versionData.version && row.routingType === versionData.routingType && row.alternativeNo === versionData.alternativeNo">选择</span> |
|
|
|
<el-link style="cursor:pointer;" v-else @click="clickAlternative(row)">选择</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|