Procházet zdrojové kódy

清单对比、清单汇总,章级合计,签约列计算调整

MaiXinRong před 5 roky
rodič
revize
081fcca1ed
1 změnil soubory, kde provedl 5 přidání a 4 odebrání
  1. 5 4
      app/public/js/gcl_gather.js

+ 5 - 4
app/public/js/gcl_gather.js

@@ -415,7 +415,7 @@ const gclGatherModel = (function () {
         for (const c of chapter) {
             const cc = { code: c.code, name: c.name, cType: 1 };
             cc.serialNo = serialNo++;
-            cc.filter = '^[\\D]*' + c.code.substr(0, c.code.length - 2) + '[0-9]{2}-';
+            cc.filter = '^[^0-9]*' + c.code.substr(0, c.code.length - 2) + '[0-9]{2}-';
             gclChapter.push(cc);
         }
         gclChapter.push({ name: '未计入章节清单合计', cType: 21, serialNo: serialNo++, });
@@ -464,11 +464,12 @@ const gclGatherModel = (function () {
             }
         }
         for (const d of deal) {
+            if (!d.quantity || !d.unit_price) continue;
             for (const c of otherChapter) {
-            if (c.cType === 41 || c.cType === 11) {
-                c.deal_bills_tp = ZhCalc.add(c.deal_bills_tp, d.total_price);
+                if (c.cType === 41 || c.cType === 11) {
+                    c.deal_bills_tp = ZhCalc.add(c.deal_bills_tp, d.total_price);
+                }
             }
-        }
             const c = _getGclChapter(gclChapter, d);
             c.deal_bills_tp = ZhCalc.add(c.deal_bills_tp, d.total_price);
         }