瀏覽代碼

数据检查、自检调整

MaiXinRong 4 年之前
父節點
當前提交
b6bdcaf247
共有 2 個文件被更改,包括 6 次插入6 次删除
  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) {