Browse Source

导出材料预算价Excel。

chenshilong 3 years ago
parent
commit
f414435bc4
1 changed files with 6 additions and 6 deletions
  1. 6 6
      web/building_saas/main/js/views/project_glj_view.js

+ 6 - 6
web/building_saas/main/js/views/project_glj_view.js

@@ -1863,12 +1863,12 @@ $(function () {
     let rst = [];
     for (let row = 1; row < sheet.rows.length; row++) {
       const rowData = {
-        code: sheetData[row][0].value,
-        name: sheetData[row][1].value,
-        specs: sheetData[row][2].value,
-        unit: sheetData[row][3].value,
-        type: sheetData[row][4].value,
-        unitPrice: sheetData[row][5].value,
+        code: sheetData[row][0] ? sheetData[row][0].value : undefined,
+        name: sheetData[row][1] ? sheetData[row][1].value : undefined,
+        specs: sheetData[row][2] ? sheetData[row][2].value : undefined,
+        unit: sheetData[row][3] ? sheetData[row][3].value : undefined,
+        type: sheetData[row][4] ? sheetData[row][4].value : undefined,
+        unitPrice: sheetData[row][5] ? sheetData[row][5].value : undefined,
       };
       rst.push(rowData);
     }