|
|
|
|
@ -655,7 +655,7 @@ export default { |
|
|
|
|
standardList: [], //标准 |
|
|
|
|
tempId: 0, |
|
|
|
|
filteredList: [], |
|
|
|
|
dictionaryData:[], |
|
|
|
|
dictionaryData: [], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
@ -666,7 +666,7 @@ export default { |
|
|
|
|
this.getProject(); |
|
|
|
|
this.getTeamSetList(); |
|
|
|
|
this.getStandardList(); |
|
|
|
|
this.getDictionary() |
|
|
|
|
this.getDictionary(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// getPartList(){ |
|
|
|
|
@ -675,10 +675,10 @@ export default { |
|
|
|
|
// }); |
|
|
|
|
// }, |
|
|
|
|
// 获取涂色标、涂色带、涂箭头的系数 |
|
|
|
|
getDictionary(){ |
|
|
|
|
getDictionary({code:'part_info'}).then(res=>{ |
|
|
|
|
this.dictionaryData = res.data.data |
|
|
|
|
}) |
|
|
|
|
getDictionary() { |
|
|
|
|
getDictionary({ code: 'part_info' }).then(res => { |
|
|
|
|
this.dictionaryData = res.data.data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 获取检验项目名字 |
|
|
|
|
projectChange(row, index) { |
|
|
|
|
@ -709,24 +709,22 @@ export default { |
|
|
|
|
processChange(row, index) { |
|
|
|
|
let selectName = this.processSetOption.find(item => item.id == row.processInfo.ppsId); |
|
|
|
|
this.form1.tableData1[index].processInfo.ppsName = selectName.name; |
|
|
|
|
if(this.form1.tableData1[index].processName.indexOf('涂色标') > -1){ |
|
|
|
|
console.log(this.partInfoData,this.dictionaryData,'this.partInfoData'); |
|
|
|
|
if (this.form1.tableData1[index].processName.indexOf('涂色标') > -1) { |
|
|
|
|
// tsbNum 涂色标个数 tsdNum 涂色带个数 涂箭头个数 |
|
|
|
|
let sum_ = 0 |
|
|
|
|
if(this.partInfoData.tsbNum){ |
|
|
|
|
let tsb=this.dictionaryData.find(item => item.dictValue == '涂色标') |
|
|
|
|
sum_ += parseInt(this.partInfoData.tsbNum)*tsb.dictKey |
|
|
|
|
let sum_ = 0; |
|
|
|
|
if (this.partInfoData.tsbNum) { |
|
|
|
|
let tsb = this.dictionaryData.find(item => item.dictValue == '涂色标'); |
|
|
|
|
sum_ += parseInt(this.partInfoData.tsbNum) * tsb.dictKey; |
|
|
|
|
} |
|
|
|
|
if(this.partInfoData.tsdNum){ |
|
|
|
|
let tsd=this.dictionaryData.find(item => item.dictValue == '涂色带') |
|
|
|
|
sum_ += parseInt(this.partInfoData.tsdNum)*tsd.dictKey |
|
|
|
|
if (this.partInfoData.tsdNum) { |
|
|
|
|
let tsd = this.dictionaryData.find(item => item.dictValue == '涂色带'); |
|
|
|
|
sum_ += parseInt(this.partInfoData.tsdNum) * tsd.dictKey; |
|
|
|
|
} |
|
|
|
|
if(this.partInfoData.tsjNum){ |
|
|
|
|
let tsj=this.dictionaryData.find(item => item.dictValue == '涂箭头') |
|
|
|
|
sum_ += parseInt(this.partInfoData.tsjNum)*tsj.dictKey |
|
|
|
|
if (this.partInfoData.tsjNum) { |
|
|
|
|
let tsj = this.dictionaryData.find(item => item.dictValue == '涂箭头'); |
|
|
|
|
sum_ += parseInt(this.partInfoData.tsjNum) * tsj.dictKey; |
|
|
|
|
} |
|
|
|
|
console.log(sum_,'sum_'); |
|
|
|
|
this.form1.tableData1[index].proHours = sum_ |
|
|
|
|
this.form1.tableData1[index].proHours = sum_; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 获取工艺能力名字 |
|
|
|
|
@ -825,8 +823,6 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 组织树转换 |
|
|
|
|
transformCraftTree(responseData) { |
|
|
|
|
console.log('原始数据:', responseData); // 调试用 |
|
|
|
|
|
|
|
|
|
const { partInfo, craftList } = responseData; |
|
|
|
|
const partCode = partInfo?.partCode || '未知零件'; |
|
|
|
|
|
|
|
|
|
@ -841,8 +837,9 @@ export default { |
|
|
|
|
...craft, |
|
|
|
|
label: `${craftInfo?.reworkOrder || '返工单'}`, |
|
|
|
|
children: processList.map(process => { |
|
|
|
|
console.log(989898, process); |
|
|
|
|
const ppsName = |
|
|
|
|
process.ppsName || process.name || process.processName || '未知工序'; |
|
|
|
|
process.processInfo.ppsName || process.processInfo.name || process.processInfo.processName || '未知工序'; |
|
|
|
|
|
|
|
|
|
// 将 projectList 转为第四级子节点 |
|
|
|
|
const projectChildren = (process.projectList || []).map(project => ({ |
|
|
|
|
@ -886,7 +883,6 @@ export default { |
|
|
|
|
if (this.treeLeave === 2) { |
|
|
|
|
this.activeName = '1'; |
|
|
|
|
this.form1.tableData1 = nodes.processList; |
|
|
|
|
console.log('当前节点数据:', nodes.processList); |
|
|
|
|
} |
|
|
|
|
// 根据节点层级加载对应数据 |
|
|
|
|
if (this.treeLeave === 3) { |
|
|
|
|
@ -903,7 +899,6 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 右侧tab切换 |
|
|
|
|
handleClick(value) { |
|
|
|
|
// console.log(999999, value); |
|
|
|
|
this.form1.deleteIds = []; |
|
|
|
|
this.form2.deleteIds = []; |
|
|
|
|
this.form3.deleteIds = []; |
|
|
|
|
@ -1095,7 +1090,6 @@ export default { |
|
|
|
|
|
|
|
|
|
if (this.treeLeave == 2) { |
|
|
|
|
this.form1.tableData1.forEach(item => { |
|
|
|
|
console.log('item4444', item); |
|
|
|
|
newArr.push({ |
|
|
|
|
...item.processInfo, |
|
|
|
|
processProjectVOList: item.projectList || [], |
|
|
|
|
@ -1111,8 +1105,6 @@ export default { |
|
|
|
|
processMoldToolVOList: this.treeNodes.moldToolList || [], |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
console.log('treeLeave', newArr); |
|
|
|
|
// console.log('treeNodes', this.treeNodes); |
|
|
|
|
let query_ = { |
|
|
|
|
craft: { |
|
|
|
|
partId: this.partId, |
|
|
|
|
|