|
@@ -6,10 +6,9 @@ export const getProcessStatus = (approvalWay: ApprovalWay, accounts: IProcessAcc
|
|
|
if (!isArray(accounts)) {
|
|
if (!isArray(accounts)) {
|
|
|
return accounts.status;
|
|
return accounts.status;
|
|
|
}
|
|
}
|
|
|
- // 若为上报审批,则流程状态直接为 success
|
|
|
|
|
- if (approvalWay === ApprovalWay.REPORT) return ProcessStatus.APPROVED;
|
|
|
|
|
- // 指定用户
|
|
|
|
|
- if (approvalWay === ApprovalWay.ACCOUNT) {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 指定用户 退回上一环节为上报审批时,判断流程状态和指定用户一样
|
|
|
|
|
+ if (approvalWay === ApprovalWay.ACCOUNT || approvalWay === ApprovalWay.REPORT) {
|
|
|
const { status } = accounts[0];
|
|
const { status } = accounts[0];
|
|
|
if (status === ProcessStatus.ACTIVATING) return ProcessStatus.ACTIVATING;
|
|
if (status === ProcessStatus.ACTIVATING) return ProcessStatus.ACTIVATING;
|
|
|
if (status === ProcessStatus.APPROVED) return ProcessStatus.APPROVED;
|
|
if (status === ProcessStatus.APPROVED) return ProcessStatus.APPROVED;
|