|
@@ -172,7 +172,7 @@ export default {
|
|
|
res.forEach((item, index) => {
|
|
res.forEach((item, index) => {
|
|
|
isExist = isExist
|
|
isExist = isExist
|
|
|
? isExist
|
|
? isExist
|
|
|
- : item.taskId === this.current.firstTaskId;
|
|
|
|
|
|
|
+ : item.sourceTaskId === this.current.firstTaskId;
|
|
|
// 如果有首工序id 存储它的下标
|
|
// 如果有首工序id 存储它的下标
|
|
|
if (isExist) {
|
|
if (isExist) {
|
|
|
if (!firstTaskindex && firstTaskindex !== 0) {
|
|
if (!firstTaskindex && firstTaskindex !== 0) {
|
|
@@ -180,7 +180,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
let obj = {
|
|
let obj = {
|
|
|
- id: item.taskId, //工序 id
|
|
|
|
|
|
|
+ id: item.sourceTaskId, //工序 id
|
|
|
name: item.taskName, //工序 名称
|
|
name: item.taskName, //工序 名称
|
|
|
executionTeamName: item.executionTeamName || '', // 工序执行班组
|
|
executionTeamName: item.executionTeamName || '', // 工序执行班组
|
|
|
assignType: 1, // 默认的指派数据
|
|
assignType: 1, // 默认的指派数据
|
|
@@ -197,7 +197,10 @@ export default {
|
|
|
staffDis: false, // 人员按钮
|
|
staffDis: false, // 人员按钮
|
|
|
lineDis: false // 产线按钮
|
|
lineDis: false // 产线按钮
|
|
|
},
|
|
},
|
|
|
- isDisable: teamIdSet.has(item.executionTeamId),
|
|
|
|
|
|
|
+ isDisable:
|
|
|
|
|
+ teamIdSet.has(item.executionTeamId) &&
|
|
|
|
|
+ this.$store.state.user.info.userId ==
|
|
|
|
|
+ item.executionTeamLeaderId,
|
|
|
startDate: '', // 开始日期 (当前工序中最早的计划开始时间)
|
|
startDate: '', // 开始日期 (当前工序中最早的计划开始时间)
|
|
|
endDate: '', // 结束日期 (当前工序中最晚的计划结束时间)
|
|
endDate: '', // 结束日期 (当前工序中最晚的计划结束时间)
|
|
|
workCenterId: item.workCenterId,
|
|
workCenterId: item.workCenterId,
|
|
@@ -212,7 +215,7 @@ export default {
|
|
|
// 存在首工序报工
|
|
// 存在首工序报工
|
|
|
if (isExist) {
|
|
if (isExist) {
|
|
|
this.processList = list;
|
|
this.processList = list;
|
|
|
- this.processId = res[0].taskId;
|
|
|
|
|
|
|
+ this.processId = res[0].sourceTaskId;
|
|
|
// this.handleClick({ name: res[0].taskId });
|
|
// this.handleClick({ name: res[0].taskId });
|
|
|
this.initializeQuery();
|
|
this.initializeQuery();
|
|
|
} else {
|
|
} else {
|
|
@@ -248,6 +251,10 @@ export default {
|
|
|
if (res && res.length > 0) {
|
|
if (res && res.length > 0) {
|
|
|
res.map((el) => {
|
|
res.map((el) => {
|
|
|
let index = processMap[el.taskId];
|
|
let index = processMap[el.taskId];
|
|
|
|
|
+ if (index === undefined || index === null) {
|
|
|
|
|
+ console.warn('initializeQuery skip unknown taskId:', el.taskId);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if (index === 0 && el.assignees && el.assignees.length > 0) {
|
|
if (index === 0 && el.assignees && el.assignees.length > 0) {
|
|
|
isFirstData = true; // 操作过
|
|
isFirstData = true; // 操作过
|
|
|
}
|
|
}
|
|
@@ -686,7 +693,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
this.toolbarLoading = false;
|
|
this.toolbarLoading = false;
|
|
|
- // this.$message.error(err.message);
|
|
|
|
|
|
|
+ this.$message.error(err.message);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 下达
|
|
// 下达
|
|
@@ -897,6 +904,14 @@ export default {
|
|
|
// },
|
|
// },
|
|
|
operationalData(index, res, list) {
|
|
operationalData(index, res, list) {
|
|
|
const dataRow = this.processList[index];
|
|
const dataRow = this.processList[index];
|
|
|
|
|
+ if (!dataRow) {
|
|
|
|
|
+ console.warn('operationalData skip invalid process index:', index);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!Array.isArray(res) || !res[0] || !Array.isArray(res[0].assignees)) {
|
|
|
|
|
+ console.warn('operationalData skip invalid assignees payload');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
let arrMap = {};
|
|
let arrMap = {};
|
|
|
let codeT = null;
|
|
let codeT = null;
|
|
|
|
|
|