Browse Source

数据检查、自检调整

MaiXinRong 4 years ago
parent
commit
b6bdcaf247
2 changed files with 6 additions and 6 deletions
  1. 3 3
      app/lib/ledger.js
  2. 3 3
      app/public/js/ledger_check.js

+ 3 - 3
app/lib/ledger.js

@@ -622,9 +622,9 @@ class checkData {
     }
 
     _getRatio(type, status) {
-        if (type === 'gxby') return null;
-        const gs = this.ctx.session.sessionProject.dagl_status.find(x => { return x.value === status });
-        return gs ? gs.ratio : null;
+        const statusConst = type === 'gxby' ? this.ctx.session.sessionProject.gxby_status : this.ctx.session.sessionProject.dagl_status;
+        const sc = statusConst.find(x => { return x.value === status });
+        return sc ? sc.ratio : null;
     }
 
 

+ 3 - 3
app/public/js/ledger_check.js

@@ -157,9 +157,9 @@ const ledgerCheckUtil = {
             return list.other;
         };
         const getRatio = function (type, status) {
-            if (type === 'gxby') return null;
-            const gs = option.status.dagl.find(x => { return x.value === status });
-            return gs ? gs.ratio : null;
+            const statusConst = type === 'gxby' ? option.status.gxby : option.status.dagl;
+            const sc = statusConst.dagl.find(x => { return x.value === status });
+            return sc ? sc.ratio : null;
         };
         const getValid = function (type, status, limit) {
             if (limit) {