Explorar o código

工料应耗来源展示bug修复

ellisran hai 1 ano
pai
achega
986a41c655
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      app/public/js/material.js

+ 4 - 1
app/public/js/material.js

@@ -1389,7 +1389,7 @@ $(document).ready(() => {
     function setCurBillSourceList(mb_id, ms_id = null) {
         const showSourceList = [];
         if (mb_id) {
-            const list = _.filter(materialListData2, { mb_id, ms_id, is_join: 1 });
+            const list = _.filter(materialListData2, { mb_id, ms_id, is_join: [1, 2] });
             console.log(list);
             if (list.length > 0) {
                 for (const l of list) {
@@ -1423,6 +1423,9 @@ $(document).ready(() => {
             case qtySourceValueConst.gather_minus_qty: qty = ZhCalc.add(info.gather_qty, info.qc_minus_qty); break;
             default: throw '未配置计量来源出错';
         }
+        if (qtySource !== qtySourceValueConst.contract_qty && info.is_join === 2) {
+            qty = ZhCalc.sub(qty, info.qc_qty);
+        }
         return qty;
     }