MaiXinRong vor 2 Wochen
Ursprung
Commit
5007d69b33

+ 7 - 2
app/service/cost_stage.js

@@ -279,8 +279,13 @@ module.exports = app => {
             } else {
                 // 会签,会签人部分审批通过时,只读,但是curSort需按原来的取值
                 stage.curSort = stage.flowAuditorIds.indexOf(accountId) >= 0 ? stage.curAuditors[0].active_order : stage.curAuditors[0].active_order - 1;
-                stage.readOnly = stage.curAuditorIds.indexOf(accountId) < 0;
-                stage.canCheck = stage.readOnly && stage.curAuditorIds.indexOf(accountId) > 0;
+                if (stage.curAuditors[0].audit_type === auditType.key.and) {
+                    stage.readOnly = !_.isEqual(stage.flowAuditorIds, stage.curAuditorIds);
+                    stage.canCheck = true;
+                } else {
+                    stage.readOnly = stage.curAuditorIds.indexOf(accountId) < 0;
+                    stage.canCheck = stage.readOnly && stage.curAuditorIds.indexOf(accountId) > 0;
+                }
             }
             await this.doCheckCanCancel(stage);
         }

+ 1 - 0
app/service/cost_stage_analysis.js

@@ -184,6 +184,7 @@ module.exports = app => {
                             d_order: i+1,
                             code: d.code, name: d.name, party_b: d.party_b || '', tax: d.tax || 0,
                             yf_excl_tax_tp: d.yf_excl_tax_tp || 0, in_excl_tax_tp: d.in_excl_tax_tp || 0, sf_excl_tax_tp: d.sf_excl_tax_tp || 0,
+                            is_deal: d.is_deal,
                         };
                         this.ctx.service.calcTmpl.calcByTemplate(idd, idd, idd, calcTemplate.calc_expr);
                         idd.sf_percent = idd.yf_excl_tax_tp ? this.ctx.helper.mul(this.ctx.helper.div(idd.sf_excl_tax_tp, idd.yf_excl_tax_tp), 100, 2) : 0;

+ 7 - 2
app/service/phase_pay.js

@@ -486,8 +486,13 @@ module.exports = app => {
             } else {
                 // 会签,会签人部分审批通过时,只读,但是curSort需按原来的取值
                 phasePay.curSort = phasePay.flowAuditorIds.indexOf(accountId) >= 0 ? phasePay.curAuditors[0].active_order : phasePay.curAuditors[0].active_order - 1;
-                phasePay.readOnly = phasePay.curAuditorIds.indexOf(accountId) < 0;
-                phasePay.canCheck = phasePay.readOnly && phasePay.curAuditorIds.indexOf(accountId) > 0;
+                if (phasePay.curAuditors[0].audit_type === auditType.key.and) {
+                    phasePay.readOnly = !_.isEqual(phasePay.flowAuditorIds, phasePay.curAuditorIds);
+                    phasePay.canCheck = true;
+                } else {
+                    phasePay.readOnly = phasePay.curAuditorIds.indexOf(accountId) < 0;
+                    phasePay.canCheck = phasePay.readOnly && phasePay.curAuditorIds.indexOf(accountId) > 0;
+                }
             }
             await this.doCheckCanCancel(phasePay);
         }

+ 7 - 2
app/service/safe_stage.js

@@ -245,8 +245,13 @@ module.exports = app => {
             } else {
                 // 会签,会签人部分审批通过时,只读,但是curSort需按原来的取值
                 safeStage.curSort = safeStage.flowAuditorIds.indexOf(accountId) >= 0 ? safeStage.curAuditors[0].active_order : safeStage.curAuditors[0].active_order - 1;
-                safeStage.readOnly = safeStage.curAuditorIds.indexOf(accountId) < 0;
-                safeStage.canCheck = safeStage.readOnly && safeStage.curAuditorIds.indexOf(accountId) > 0;
+                if (safeStage.curAuditors[0].audit_type === auditType.key.and) {
+                    safeStage.readOnly = !_.isEqual(safeStage.flowAuditorIds, safeStage.curAuditorIds);
+                    safeStage.canCheck = true;
+                } else {
+                    safeStage.readOnly = safeStage.curAuditorIds.indexOf(accountId) < 0;
+                    safeStage.canCheck = safeStage.readOnly && safeStage.curAuditorIds.indexOf(accountId) > 0;
+                }
             }
             await this.doCheckCanCancel(safeStage);
         }