|
@@ -283,7 +283,8 @@ let rptSignatureHelper = {
|
|
|
for (const stga of STAGE_AUDIT) {
|
|
|
if (stga.aid === userAccId) {
|
|
|
hasAudit = true;
|
|
|
- if (stga.end_time && stga.end_time !== '' && stga.end_time.length > 20) {
|
|
|
+ if (stga.status === 3 && stga.end_time && stga.end_time !== '' && stga.end_time.length > 20) {
|
|
|
+ //只有在审批人通过后才获取审批时间
|
|
|
// let dt = new Date(stga.end_time);
|
|
|
dftDate = (new Date(stga.end_time)).Format('yyyy-MM-dd');
|
|
|
}
|
|
@@ -291,18 +292,30 @@ let rptSignatureHelper = {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (!hasAudit && STAGE_FLOW && STAGE_FLOW.length > 0 && STAGE_FLOW[0].aid === userAccId) {
|
|
|
- if (STAGE_FLOW[0].begin_time && STAGE_FLOW[0].begin_time !== '' && STAGE_FLOW[0].begin_time.length > 20) {
|
|
|
- dftDate = (new Date(STAGE_FLOW[0].begin_time)).Format('yyyy-MM-dd');
|
|
|
+ let isOrgRpt = false;
|
|
|
+ for (const stg of STAGE_LIST) {
|
|
|
+ if (stg.id === current_stage_id) {
|
|
|
+ if (stg.user_id === userAccId) {
|
|
|
+ isOrgRpt = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isOrgRpt && !hasAudit && STAGE_AUDIT_ORG && STAGE_AUDIT_ORG.length > 0) {
|
|
|
+ if (STAGE_AUDIT_ORG[0].begin_time && STAGE_AUDIT_ORG[0].begin_time !== '' && STAGE_AUDIT_ORG[0].begin_time.length > 20) {
|
|
|
+ dftDate = (new Date(STAGE_AUDIT_ORG[0].begin_time)).Format('yyyy-MM-dd');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!isOrgRpt && !hasAudit) {
|
|
|
+ //非审批流程人员以及非原报,则显示期截至时间
|
|
|
+ for (const stg of STAGE_LIST) {
|
|
|
+ if (stg.id === current_stage_id && stg.period) {
|
|
|
+ const period = stg.period.split(' ~ ');
|
|
|
+ if (period.length === 2) {
|
|
|
+ dftDate = period[1];
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- // for (const stg of STAGE_LIST) {
|
|
|
- // if (stg.id === current_stage_id && stg.period) {
|
|
|
- // const period = stg.period.split(' ~ ');
|
|
|
- // if (period.length === 2) {
|
|
|
- // dftDate = period[1];
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
}
|
|
|
if (dftDate !== '') {
|
|
|
elementsStrArr.push('<input id="' + idSuffixStr + '" class="form-control form-control-sm mt-0" placeholder="选择签名日期" type="date" value="' + dftDate + '"');
|