MaiXinRong 1 年間 前
コミット
97c05fb47d
1 ファイル変更3 行追加3 行削除
  1. 3 3
      app/lib/budget_final.js

+ 3 - 3
app/lib/budget_final.js

@@ -211,9 +211,9 @@ class BudgetFinal {
 
     async _afterLoad() {
         const helper = this.ctx.helper;
-        const checkGaiExist = !!this.finalTree.nodes.find(x => {
-            if (x.gai_tp || x.gai_dgn_qty1 || x.gai_dgn_qty2 || x.gai_dgn_price || x.gai_dgn_qty) return true;
-        });
+        const checkGaiExist = this.finalTree.datas.findIndex(x => {
+            if (x.gai_tp || x.gai_dgn_qty1 || x.gai_dgn_qty2) return true;
+        }) >= 0;
         this.finalTree.afterLoad(node => {
             node.dgn_price = helper.div(node.total_price, node.dgn_qty1, 2);
             node.dgn_qty = node.dgn_qty1