|
@@ -193,20 +193,25 @@ module.exports = app => {
|
|
|
stage.readOnly = true;
|
|
stage.readOnly = true;
|
|
|
stage.curTimes = stage.times;
|
|
stage.curTimes = stage.times;
|
|
|
stage.curOrder = _.max(_.map(stage.auditors, 'order'));
|
|
stage.curOrder = _.max(_.map(stage.auditors, 'order'));
|
|
|
- } else {
|
|
|
|
|
- const ass = stage.auditAssists.find(x => { return stage.flowAuditorIds.indexOf(x.user_id) >= 0 && x.ass_user_id === accountId; });
|
|
|
|
|
- stage.readOnly = stage.flowAuditorIds.indexOf(accountId) < 0 && !ass;
|
|
|
|
|
|
|
+ } else if (stage.curAuditors.length > 0) {
|
|
|
stage.curTimes = stage.times;
|
|
stage.curTimes = stage.times;
|
|
|
- if (!stage.readOnly) {
|
|
|
|
|
|
|
+ const ass = stage.auditAssists.find(x => { return stage.flowAuditorIds.indexOf(x.user_id) >= 0 && x.ass_user_id === accountId; });
|
|
|
|
|
+ const inCurFlow = stage.flowAuditorIds.indexOf(accountId) >= 0 || ass;
|
|
|
|
|
+ if (inCurFlow) {
|
|
|
stage.assist = ass;
|
|
stage.assist = ass;
|
|
|
stage.curOrder = stage.curAuditors[0].order;
|
|
stage.curOrder = stage.curAuditors[0].order;
|
|
|
|
|
+ // 会签,会签人审批通过时,只读,但是curOrder需按原来的取值
|
|
|
|
|
+ if (stage.curAuditors[0].audit_type === auditType.key.and) {
|
|
|
|
|
+ stage.readOnly = !_.isEqual(stage.flowAuditorIds, stage.curAuditorIds);
|
|
|
|
|
+ stage.canCheck = true;
|
|
|
|
|
+ } else if (stage.curAuditors[0].audit_type === auditType.key.union) {
|
|
|
|
|
+ console.log(stage.relaAuditor);
|
|
|
|
|
+ stage.readOnly = stage.relaAuditor.status !== status.checking;
|
|
|
|
|
+ stage.canCheck = !stage.readOnly;
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
stage.curOrder = stage.curAuditors[0].order - 1;
|
|
stage.curOrder = stage.curAuditors[0].order - 1;
|
|
|
- }
|
|
|
|
|
- // 会签,会签人审批通过时,只读,但是curOrder需按原来的取值
|
|
|
|
|
- if (!stage.readOnly) {
|
|
|
|
|
- stage.readOnly = !_.isEqual(stage.flowAuditorIds, stage.curAuditorIds);
|
|
|
|
|
- stage.canCheck = true;
|
|
|
|
|
|
|
+ stage.readOnly = true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (stage.readOnly) {
|
|
if (stage.readOnly) {
|