| | |
| | | row.processId = value || ""; |
| | | syncProcessOperationFields(row); |
| | | |
| | | // 同一层级只能选一样的工序 |
| | | // 检查同一层级是否已经有其他不同的工序被选中 |
| | | const siblings = findSiblings(dataValue.dataList, row.tempId); |
| | | if (siblings && value) { |
| | | siblings.forEach(sibling => { |
| | | if (sibling.tempId !== row.tempId) { |
| | | sibling.processId = value; |
| | | syncProcessOperationFields(sibling); |
| | | } |
| | | const hasDifferentProcess = siblings.some(sibling => { |
| | | return sibling.tempId !== row.tempId && sibling.processId && sibling.processId !== value; |
| | | }); |
| | | if (hasDifferentProcess) { |
| | | ElMessage.warning("同一层级已存在不同的工序,请先统一工序后再进行修改"); |
| | | } |
| | | } |
| | | }; |
| | | |