Ver código fonte

计量台账,超计判断调整

MaiXinRong 5 anos atrás
pai
commit
e2e92162fc
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      app/public/js/stage.js

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

@@ -1323,13 +1323,13 @@ $(document).ready(() => {
             for (const node of sortData) {
                 if (node.children && node.children.length > 0) continue;
                 if (node.end_gather_qty) {
-                    if (!node.quantity || Math.abs(node.end_gather_qty) > Math.abs(node.quantity)) {
+                    if (!node.quantity || Math.abs(node.end_gather_qty) > Math.abs(ZhCalc.add(node.quantity, node.end_qc_qty))) {
                         const data = JSON.parse(JSON.stringify(node));
                         data.visible = true;
                         this.searchResult.push(data);
                     }
                 } else if (node.end_gather_tp) {
-                    if (!node.total_price || Math.abs(node.end_gather_tp) > Math.abs(node.total_price)) {
+                    if (!node.total_price || Math.abs(node.end_gather_tp) > Math.abs(ZhCalc.add(node.total_price, node.end_qc_tp))) {
                         const data = JSON.parse(JSON.stringify(node));
                         data.visible = true;
                         this.searchResult.push(data);
@@ -1401,7 +1401,7 @@ $(document).ready(() => {
                         let match = false;
                         if (checkOver) {
                             if (sd.end_gather_qty) {
-                                if (!sd.quantity || Math.abs(sd.end_gather_qty) > Math.abs(sd.quantity)) match = true;
+                                if (!sd.quantity || Math.abs(sd.end_gather_qty) > Math.abs(ZhCalc.add(sd.quantity, sd.end_qc_qty))) match = true;
                             }
                         }
                         if (checkEmpty) {