浏览代码

工料应耗来源展示bug修复

ellisran 1 年之前
父节点
当前提交
986a41c655
共有 1 个文件被更改,包括 4 次插入1 次删除
  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;
     }