fan0987 1 Minggu lalu
induk
melakukan
d9d4497690
1 mengubah file dengan 46 tambahan dan 40 penghapusan
  1. 46 40
      ruoyi-ui/src/utils/markExcel.js

+ 46 - 40
ruoyi-ui/src/utils/markExcel.js

@@ -1125,6 +1125,7 @@ export const genTotalScoreExcel = (workbook, tableData, zjNames, buyingMode) =>
     worksheet.getCell(`${zjHeader[i]}5`).alignment = {
       vertical: "middle",
       horizontal: "center",
+      wrapText: true
     };
     worksheet.getCell(`${zjHeader[i]}5`).font = {
       name: "宋体",
@@ -1174,7 +1175,7 @@ export const genTotalScoreExcel = (workbook, tableData, zjNames, buyingMode) =>
         bottom: { style: "thin" },
         right: { style: "thin" },
       };
-      let alignment = { vertical: "middle", horizontal: "center" };
+      let alignment = { vertical: "middle", horizontal: "center", wrapText: true };
       let value = data[j];
       worksheet.getCell(`${td}${i + tableStartNum}`).alignment = alignment;
       worksheet.getCell(`${td}${i + tableStartNum}`).value = value;
@@ -1188,51 +1189,55 @@ export const genTotalScoreExcel = (workbook, tableData, zjNames, buyingMode) =>
     row.height = 39;
   }
 
+  
   const zhongbiaorenRowNum = tableData.length + tableStartNum;
-  worksheet.addRow(["预中标人", "", zhongbiaoren]);
-  worksheet.mergeCells(`A${zhongbiaorenRowNum}:B${zhongbiaorenRowNum}`);
-
+  let lastRowNum = 0
+  
   if (buyingMode == 2) { // 评审
-    worksheet.mergeCells(`C${zhongbiaorenRowNum}:H${zhongbiaorenRowNum}`);
+    lastRowNum = zhongbiaorenRowNum
   } else {
+    worksheet.addRow(["预中标人", "", zhongbiaoren]);
+    worksheet.mergeCells(`A${zhongbiaorenRowNum}:B${zhongbiaorenRowNum}`);
     worksheet.mergeCells(`C${zhongbiaorenRowNum}:K${zhongbiaorenRowNum}`);
-  }
 
-  worksheet.getCell(`A${zhongbiaorenRowNum}`).border = {
-    top: { style: "thin" },
-    left: { style: "thin" },
-    bottom: { style: "thin" },
-    right: { style: "thin" },
-  };
-  worksheet.getCell(`A${zhongbiaorenRowNum}`).alignment = {
-    vertical: "middle",
-    horizontal: "center",
-  };
-  worksheet.getCell(`A${zhongbiaorenRowNum}`).font = {
-    name: "宋体",
-    family: 4,
-    size: 12,
-  };
-  worksheet.getCell(`C${zhongbiaorenRowNum}`).border = {
-    top: { style: "thin" },
-    left: { style: "thin" },
-    bottom: { style: "thin" },
-    right: { style: "thin" },
-  };
-  worksheet.getCell(`C${zhongbiaorenRowNum}`).alignment = {
-    vertical: "middle",
-    horizontal: "center",
-  };
-  worksheet.getCell(`C${zhongbiaorenRowNum}`).font = {
-    name: "宋体",
-    family: 4,
-    size: 12,
-  };
+    worksheet.getCell(`A${zhongbiaorenRowNum}`).border = {
+      top: { style: "thin" },
+      left: { style: "thin" },
+      bottom: { style: "thin" },
+      right: { style: "thin" },
+    };
+    worksheet.getCell(`A${zhongbiaorenRowNum}`).alignment = {
+      vertical: "middle",
+      horizontal: "center",
+    };
+    worksheet.getCell(`A${zhongbiaorenRowNum}`).font = {
+      name: "宋体",
+      family: 4,
+      size: 12,
+    };
+  
+    worksheet.getCell(`C${zhongbiaorenRowNum}`).border = {
+      top: { style: "thin" },
+      left: { style: "thin" },
+      bottom: { style: "thin" },
+      right: { style: "thin" },
+    };
+    worksheet.getCell(`C${zhongbiaorenRowNum}`).alignment = {
+      vertical: "middle",
+      horizontal: "center",
+    };
+    worksheet.getCell(`C${zhongbiaorenRowNum}`).font = {
+      name: "宋体",
+      family: 4,
+      size: 12,
+    };
 
-  const rowZhongbiaoren = worksheet.getRow(zhongbiaorenRowNum);
-  rowZhongbiaoren.height = 39;
+    const rowZhongbiaoren = worksheet.getRow(zhongbiaorenRowNum);
+    rowZhongbiaoren.height = 39;
+  
+    lastRowNum = zhongbiaorenRowNum + 1;
+  }
 
-  const lastRowNum = zhongbiaorenRowNum + 1;
   worksheet.addRow(["评标委员会全体成员签字:"]);
   worksheet.mergeCells(`A${lastRowNum}:B${lastRowNum}`);
   worksheet.getCell(`A${lastRowNum}`).alignment = { vertical: "bottom" };
@@ -1326,8 +1331,9 @@ export const genIdeaExcel = (
   worksheet.addRow(["评审小组成员签字:"]);
   worksheet.mergeCells(`A6:B6`);
   worksheet.getCell(`A6`).alignment = { vertical: "middle" };
+
   const rowLast = worksheet.getRow(6);
-  rowLast.height = 45;
+  rowLast.height = 65;
   rowLast.font = { name: "宋体", family: 4, size: 10 };
 };