|
|
|
|
@ -679,7 +679,8 @@ export default { |
|
|
|
|
projectChange(row, index) { |
|
|
|
|
let selectName = this.projectOptions.find(item => item.id == row.projectCode); |
|
|
|
|
this.form2.tableData2[index].projectName = selectName.name; |
|
|
|
|
this.form2.tableData2[index].proHours = selectName.standardWorkMinute != -1 ? selectName.standardWorkMinute : 0; |
|
|
|
|
this.form2.tableData2[index].proHours = |
|
|
|
|
selectName.standardWorkMinute != -1 ? selectName.standardWorkMinute : 0; |
|
|
|
|
}, |
|
|
|
|
// 获取检验标准名字 |
|
|
|
|
standardChange(row, index) { |
|
|
|
|
@ -774,7 +775,7 @@ export default { |
|
|
|
|
modelLevelChange() { |
|
|
|
|
this.modelLevelLoading = true; |
|
|
|
|
getModelDetailList({ Id: this.modelLevel }).then(res => { |
|
|
|
|
const templateData = res.data.data; |
|
|
|
|
const templateData = res.data.data.proDetailVOList; |
|
|
|
|
const existing = [...this.form1.tableData1]; |
|
|
|
|
// 将模板中的工序数据映射为表格所需格式 |
|
|
|
|
const mappedData = templateData.map((item, index) => { |
|
|
|
|
@ -782,11 +783,11 @@ export default { |
|
|
|
|
return { |
|
|
|
|
id: null, // 新增时通常设为 null |
|
|
|
|
processNo: this.getProcessNo(this.form1.tableData1), // 自动生成工序号 |
|
|
|
|
ppsId: item.ppsId || item.id, // 假设模板中有 ppsId 或 id |
|
|
|
|
ppsId: item.ppsId, // 假设模板中有 ppsId 或 id |
|
|
|
|
processName: item.processName, |
|
|
|
|
caId: item.caId, |
|
|
|
|
craftName: item.craftName, |
|
|
|
|
proDes: item.proDes || item.description, |
|
|
|
|
proDes: item.proDes, |
|
|
|
|
proHours: item.proHours || '', |
|
|
|
|
setoutHours: item.setoutHours || '', |
|
|
|
|
isMain: item.isMain || '0', |
|
|
|
|
|