Browse Source

清单汇总,单位工程取值调整

MaiXinRong 4 years ago
parent
commit
6b618829b3
1 changed files with 7 additions and 3 deletions
  1. 7 3
      app/public/js/gcl_gather.js

+ 7 - 3
app/public/js/gcl_gather.js

@@ -162,9 +162,13 @@ const gclGatherModel = (function () {
      * @param xmj - 计量单元(最底层项目节)
      * @returns {string}
      */
-    function getDwgc(xmj) {
-        const node = getNodeByLevel(xmj, 2);
-        return node ? node.name : '';
+    function getDwgc(peg, xmj) {
+        if (peg) {
+            return peg.name;
+        } else {
+            const node = getNodeByLevel(xmj, 2);
+            return node ? node.name : '';
+        }
     }
 
     /**