소스 검색

导入Excel调整

MaiXinRong 4 년 전
부모
커밋
b9f50aa162
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      app/lib/analysis_excel.js

+ 7 - 2
app/lib/analysis_excel.js

@@ -206,8 +206,13 @@ class ImportBaseTree {
     }
 
     _assignRelaField(temp, node) {
-        _.assignInWith(temp, node,
-            (objValue, srcValue, key) => { return ['name', 'unit'].indexOf(key) > -1 ? objValue : srcValue; });
+        if (!temp.quantity) temp.quantity = node.quantity;
+        if (!temp.dgn_qty1) temp.dgn_qty1 = node.dgn_qty1;
+        if (!temp.dgn_qty2) temp.dgn_qty2 = node.dgn_qty2;
+        if (!temp.unit_price) temp.unit_price = node.unit_price;
+        if (!temp.drawing_code) temp.drawing_code = node.drawing_code;
+        if (!temp.memo) temp.memo = node.memo;
+        if (!temp.total_price) temp.total_price = node.total_price;
     }
 
     /**