Commit d0f8fe6d authored by jingnan's avatar jingnan 👀

ERP_物料配套申请

parent 215ef029
...@@ -1673,6 +1673,28 @@ export function findDownByNameVnode(component, targetName) { ...@@ -1673,6 +1673,28 @@ export function findDownByNameVnode(component, targetName) {
} }
return null return null
} }
// 获取指令
export function findAndCollectExtProcessPlanInfo(startVal, resultVal = []) {
if (!Array.isArray(resultVal)) {
throw new Error('resultVal must be an array')
}
if (!startVal || !startVal.target) {
return resultVal // 提前返回,避免后续的错误
}
const target = startVal.target
if (target.subTypeName === 'ExtProcessPlanAOR' || target.subTypeName === 'ExtProcessPlanAssembly') {
resultVal.push({
...target,
state: target.joExecutePlan && target.joExecutePlan.length && target.joExecutePlan[0].planState
})
}
if (target.sourceExtProcessUsageLink) {
for (const child of target.sourceExtProcessUsageLink) {
findAndCollectExtProcessPlanInfo(child, resultVal)
}
}
return resultVal
}
export function addMinutes(date, minutes) { export function addMinutes(date, minutes) {
const dateFormat=new Date(date) const dateFormat=new Date(date)
dateFormat.setMinutes(dateFormat.getMinutes() + minutes) dateFormat.setMinutes(dateFormat.getMinutes() + minutes)
...@@ -1683,6 +1705,7 @@ export function addMinutes(date, minutes) { ...@@ -1683,6 +1705,7 @@ export function addMinutes(date, minutes) {
export default { export default {
findByNameVnode, findByNameVnode,
findDownByNameVnode, findDownByNameVnode,
findAndCollectExtProcessPlanInfo,
dateFormat, dateFormat,
treeFindBackArray, treeFindBackArray,
throttle, throttle,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment