|
@@ -5,7 +5,6 @@ import dayjs from "dayjs";
|
|
|
* @param {*} sName 项目名称
|
|
|
* @param {*} kaibiaoTime 开标时间
|
|
|
* @param {*} kaibiaoAddress 开标地点
|
|
|
- * @param {*} hName 供应商名称
|
|
|
* @param {*} tableData 数据
|
|
|
*/
|
|
|
export const genExamineExcel = (
|
|
@@ -13,14 +12,14 @@ export const genExamineExcel = (
|
|
|
sName,
|
|
|
kaibiaoTime,
|
|
|
kaibiaoAddress,
|
|
|
- hName,
|
|
|
- tableData
|
|
|
+ tableData,
|
|
|
+ page
|
|
|
) => {
|
|
|
- const worksheet = workbook.addWorksheet("资格审查", {
|
|
|
- pageSetup:{paperSize: 9, orientation:'landscape'}
|
|
|
+ const worksheet = workbook.addWorksheet(`资格审查-${page}`, {
|
|
|
+ pageSetup: { paperSize: 9, orientation: "landscape" },
|
|
|
});
|
|
|
|
|
|
- const columnWidth = [6.07, 29.47, 59.47, 27.26];
|
|
|
+ const columnWidth = [6.07, 29.47, 59.47, 27.26, 27.26, 27.26, 27.26];
|
|
|
for (let cw = 1; cw <= columnWidth.length; cw++) {
|
|
|
worksheet.getColumn(cw).width = columnWidth[cw - 1] + 0.62;
|
|
|
}
|
|
@@ -51,19 +50,37 @@ export const genExamineExcel = (
|
|
|
row3.font = { name: "宋体", family: 4, size: 10 };
|
|
|
|
|
|
worksheet.addRow([`开标地点:${kaibiaoAddress}`]);
|
|
|
- worksheet.mergeCells("A4:C4");
|
|
|
+ worksheet.mergeCells("A4:G4");
|
|
|
worksheet.getCell("A4").alignment = { vertical: "middle" };
|
|
|
const row4 = worksheet.getRow(4);
|
|
|
row4.height = 19;
|
|
|
row4.font = { name: "宋体", family: 4, size: 10 };
|
|
|
|
|
|
- worksheet.addRow(["序号", "审查内容", "得分标准", "投标单位"]);
|
|
|
+ worksheet.addRow([
|
|
|
+ "序号",
|
|
|
+ "审查内容",
|
|
|
+ "得分标准",
|
|
|
+ "投标单位",
|
|
|
+ "投标单位",
|
|
|
+ "投标单位",
|
|
|
+ "投标单位",
|
|
|
+ ]);
|
|
|
|
|
|
const row5 = worksheet.getRow(5);
|
|
|
row5.height = 19;
|
|
|
row5.font = { name: "宋体", family: 4, size: 10 };
|
|
|
|
|
|
- worksheet.addRow(["", "", "", hName]);
|
|
|
+ let hName0 = "";
|
|
|
+ let hName1 = "";
|
|
|
+ let hName2 = "";
|
|
|
+ let hName3 = "";
|
|
|
+ if (tableData.length > 0) {
|
|
|
+ hName0 = tableData[0].hName0 || "";
|
|
|
+ hName1 = tableData[0].hName1 || "";
|
|
|
+ hName2 = tableData[0].hName2 || "";
|
|
|
+ hName3 = tableData[0].hName3 || "";
|
|
|
+ }
|
|
|
+ worksheet.addRow(["", "", "", hName0, hName1, hName2, hName3]);
|
|
|
|
|
|
worksheet.getCell("A6").alignment = {
|
|
|
vertical: "middle",
|
|
@@ -76,7 +93,19 @@ export const genExamineExcel = (
|
|
|
worksheet.mergeCells("B5:B6");
|
|
|
worksheet.mergeCells("C5:C6");
|
|
|
|
|
|
- const tableHeader = ["A5", "B5", "C5", "D5", "D6"];
|
|
|
+ const tableHeader = [
|
|
|
+ "A5",
|
|
|
+ "B5",
|
|
|
+ "C5",
|
|
|
+ "D5",
|
|
|
+ "D6",
|
|
|
+ "E5",
|
|
|
+ "E6",
|
|
|
+ "F5",
|
|
|
+ "F6",
|
|
|
+ "G5",
|
|
|
+ "G6",
|
|
|
+ ];
|
|
|
for (let th of tableHeader) {
|
|
|
worksheet.getCell(th).alignment = {
|
|
|
vertical: "middle",
|
|
@@ -91,15 +120,21 @@ export const genExamineExcel = (
|
|
|
}
|
|
|
const tableStartNum = 7;
|
|
|
|
|
|
- const tbody = ["A", "B", "C", "D"];
|
|
|
+ const tbody = ["A", "B", "C", "D", "E", "F", "G"];
|
|
|
|
|
|
- let isOk = true;
|
|
|
+ let isOk0 = 1;
|
|
|
+ let isOk1 = 1;
|
|
|
+ let isOk2 = 1;
|
|
|
+ let isOk3 = 1;
|
|
|
for (let i = 0; i < tableData.length; i++) {
|
|
|
const data = [
|
|
|
i + 1,
|
|
|
tableData[i].content || "",
|
|
|
tableData[i].standard || "",
|
|
|
- tableData[i].isOk || "",
|
|
|
+ tableData[i].isOk0 || "",
|
|
|
+ tableData[i].isOk1 || "",
|
|
|
+ tableData[i].isOk2 || "",
|
|
|
+ tableData[i].isOk3 || "",
|
|
|
];
|
|
|
for (let j = 0; j < data.length; j++) {
|
|
|
const td = tbody[j];
|
|
@@ -135,8 +170,39 @@ export const genExamineExcel = (
|
|
|
alignment = { vertical: "middle", horizontal: "center" };
|
|
|
value = data[j];
|
|
|
if (td == "D") {
|
|
|
- if (data[j] != "合格") {
|
|
|
- isOk = false;
|
|
|
+ if (hName0) {
|
|
|
+ if (data[j] == "不合格") {
|
|
|
+ isOk0 = 2;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ isOk0 = 3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (td == "E") {
|
|
|
+ if (hName1) {
|
|
|
+ if (data[j] == "不合格") {
|
|
|
+ isOk1 = 2;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ isOk1 = 3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (td == "F") {
|
|
|
+ if (hName2) {
|
|
|
+ if (data[j] == "不合格") {
|
|
|
+ isOk2 = 2;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ isOk2 = 3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (td == "G") {
|
|
|
+ if (hName3) {
|
|
|
+ if (data[j] == "不合格") {
|
|
|
+ isOk3 = 2;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ isOk3 = 3;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -154,8 +220,15 @@ export const genExamineExcel = (
|
|
|
|
|
|
const denfenRowNum = tableData.length + tableStartNum;
|
|
|
worksheet.mergeCells(`A${denfenRowNum}:C${denfenRowNum}`);
|
|
|
- const denFenTd = ["A", "D"];
|
|
|
- const denFenData = ["是否合格", isOk ? "合格" : "不合格"];
|
|
|
+ const okStatus = { 1: "合格", 2: "不合格", 3: "" };
|
|
|
+ const denFenTd = ["A", "D", "E", "F", "G"];
|
|
|
+ const denFenData = [
|
|
|
+ "是否合格",
|
|
|
+ okStatus[isOk0],
|
|
|
+ okStatus[isOk1],
|
|
|
+ okStatus[isOk2],
|
|
|
+ okStatus[isOk3],
|
|
|
+ ];
|
|
|
for (let i = 0; i < denFenData.length; i++) {
|
|
|
const td = denFenTd[i];
|
|
|
worksheet.getCell(`${td + denfenRowNum}`).border = {
|
|
@@ -181,7 +254,7 @@ export const genExamineExcel = (
|
|
|
|
|
|
const lastRowNum = denfenRowNum + 1;
|
|
|
worksheet.addRow(["评审小组成员签字:"]);
|
|
|
- worksheet.mergeCells(`A${lastRowNum}:E${lastRowNum}`);
|
|
|
+ worksheet.mergeCells(`A${lastRowNum}:G${lastRowNum}`);
|
|
|
worksheet.getCell(`A${lastRowNum}`).alignment = { vertical: "middle" };
|
|
|
const rowLast = worksheet.getRow(lastRowNum);
|
|
|
rowLast.height = 23;
|
|
@@ -194,7 +267,6 @@ export const genExamineExcel = (
|
|
|
* @param {*} sName 项目名称
|
|
|
* @param {*} kaibiaoTime 开标时间
|
|
|
* @param {*} kaibiaoAddress 开标地点
|
|
|
- * @param {*} hName 供应商名称
|
|
|
* @param {*} tableData 数据
|
|
|
*/
|
|
|
export const genRespondExcel = (
|
|
@@ -202,13 +274,13 @@ export const genRespondExcel = (
|
|
|
sName,
|
|
|
kaibiaoTime,
|
|
|
kaibiaoAddress,
|
|
|
- hName,
|
|
|
- tableData
|
|
|
+ tableData,
|
|
|
+ page
|
|
|
) => {
|
|
|
- const worksheet = workbook.addWorksheet("响应性", {
|
|
|
- pageSetup:{paperSize: 9, orientation:'landscape'}
|
|
|
+ const worksheet = workbook.addWorksheet(`响应性-${page}`, {
|
|
|
+ pageSetup: { paperSize: 9, orientation: "landscape" },
|
|
|
});
|
|
|
- const columnWidth = [6.07, 29.47, 59.47, 27.26];
|
|
|
+ const columnWidth = [6.07, 29.47, 59.47, 27.26, 27.26, 27.26, 27.26];
|
|
|
for (let cw = 1; cw <= columnWidth.length; cw++) {
|
|
|
worksheet.getColumn(cw).width = columnWidth[cw - 1] + 0.62;
|
|
|
}
|
|
@@ -245,13 +317,31 @@ export const genRespondExcel = (
|
|
|
row4.height = 19;
|
|
|
row4.font = { name: "宋体", family: 4, size: 10 };
|
|
|
|
|
|
- worksheet.addRow(["序号", "审查内容", "得分标准", "投标单位"]);
|
|
|
+ worksheet.addRow([
|
|
|
+ "序号",
|
|
|
+ "审查内容",
|
|
|
+ "得分标准",
|
|
|
+ "投标单位",
|
|
|
+ "投标单位",
|
|
|
+ "投标单位",
|
|
|
+ "投标单位",
|
|
|
+ ]);
|
|
|
|
|
|
const row5 = worksheet.getRow(5);
|
|
|
row5.height = 19;
|
|
|
row5.font = { name: "宋体", family: 4, size: 10 };
|
|
|
|
|
|
- worksheet.addRow(["", "", "", hName]);
|
|
|
+ let hName0 = "";
|
|
|
+ let hName1 = "";
|
|
|
+ let hName2 = "";
|
|
|
+ let hName3 = "";
|
|
|
+ if (tableData.length > 0) {
|
|
|
+ hName0 = tableData[0].hName0 || "";
|
|
|
+ hName1 = tableData[0].hName1 || "";
|
|
|
+ hName2 = tableData[0].hName2 || "";
|
|
|
+ hName3 = tableData[0].hName3 || "";
|
|
|
+ }
|
|
|
+ worksheet.addRow(["", "", "", hName0, hName1, hName2, hName3]);
|
|
|
|
|
|
worksheet.getCell("A6").alignment = {
|
|
|
vertical: "middle",
|
|
@@ -264,7 +354,19 @@ export const genRespondExcel = (
|
|
|
worksheet.mergeCells("B5:B6");
|
|
|
worksheet.mergeCells("C5:C6");
|
|
|
|
|
|
- const tableHeader = ["A5", "B5", "C5", "D5", "D6"];
|
|
|
+ const tableHeader = [
|
|
|
+ "A5",
|
|
|
+ "B5",
|
|
|
+ "C5",
|
|
|
+ "D5",
|
|
|
+ "D6",
|
|
|
+ "E5",
|
|
|
+ "E6",
|
|
|
+ "F5",
|
|
|
+ "F6",
|
|
|
+ "G5",
|
|
|
+ "G6",
|
|
|
+ ];
|
|
|
for (let th of tableHeader) {
|
|
|
worksheet.getCell(th).alignment = {
|
|
|
vertical: "middle",
|
|
@@ -279,15 +381,21 @@ export const genRespondExcel = (
|
|
|
}
|
|
|
const tableStartNum = 7;
|
|
|
|
|
|
- const tbody = ["A", "B", "C", "D"];
|
|
|
+ const tbody = ["A", "B", "C", "D", "E", "F", "G"];
|
|
|
|
|
|
- let isOk = true;
|
|
|
+ let isOk0 = 1;
|
|
|
+ let isOk1 = 1;
|
|
|
+ let isOk2 = 1;
|
|
|
+ let isOk3 = 1;
|
|
|
for (let i = 0; i < tableData.length; i++) {
|
|
|
const data = [
|
|
|
i + 1,
|
|
|
tableData[i].content || "",
|
|
|
tableData[i].standard || "",
|
|
|
- tableData[i].isOk || "",
|
|
|
+ tableData[i].isOk0 || "",
|
|
|
+ tableData[i].isOk1 || "",
|
|
|
+ tableData[i].isOk2 || "",
|
|
|
+ tableData[i].isOk3 || "",
|
|
|
];
|
|
|
for (let j = 0; j < data.length; j++) {
|
|
|
const td = tbody[j];
|
|
@@ -323,8 +431,39 @@ export const genRespondExcel = (
|
|
|
alignment = { vertical: "middle", horizontal: "center" };
|
|
|
value = data[j];
|
|
|
if (td == "D") {
|
|
|
- if (data[j] != "合格") {
|
|
|
- isOk = false;
|
|
|
+ if (hName0) {
|
|
|
+ if (data[j] == "不合格") {
|
|
|
+ isOk0 = 2;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ isOk0 = 3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (td == "E") {
|
|
|
+ if (hName1) {
|
|
|
+ if (data[j] == "不合格") {
|
|
|
+ isOk1 = 2;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ isOk1 = 3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (td == "F") {
|
|
|
+ if (hName2) {
|
|
|
+ if (data[j] == "不合格") {
|
|
|
+ isOk2 = 2;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ isOk2 = 3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (td == "G") {
|
|
|
+ if (hName3) {
|
|
|
+ if (data[j] == "不合格") {
|
|
|
+ isOk3 = 2;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ isOk3 = 3;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -342,8 +481,16 @@ export const genRespondExcel = (
|
|
|
|
|
|
const denfenRowNum = tableData.length + tableStartNum;
|
|
|
worksheet.mergeCells(`A${denfenRowNum}:C${denfenRowNum}`);
|
|
|
- const denFenTd = ["A", "D"];
|
|
|
- const denFenData = ["是否合格", isOk ? "合格" : "不合格"];
|
|
|
+
|
|
|
+ const okStatus = { 1: "合格", 2: "不合格", 3: "" };
|
|
|
+ const denFenTd = ["A", "D", "E", "F", "G"];
|
|
|
+ const denFenData = [
|
|
|
+ "是否合格",
|
|
|
+ okStatus[isOk0],
|
|
|
+ okStatus[isOk1],
|
|
|
+ okStatus[isOk2],
|
|
|
+ okStatus[isOk3],
|
|
|
+ ];
|
|
|
for (let i = 0; i < denFenData.length; i++) {
|
|
|
const td = denFenTd[i];
|
|
|
worksheet.getCell(`${td + denfenRowNum}`).border = {
|
|
@@ -369,7 +516,7 @@ export const genRespondExcel = (
|
|
|
|
|
|
const lastRowNum = denfenRowNum + 1;
|
|
|
worksheet.addRow(["评审小组成员签字:"]);
|
|
|
- worksheet.mergeCells(`A${lastRowNum}:E${lastRowNum}`);
|
|
|
+ worksheet.mergeCells(`A${lastRowNum}:G${lastRowNum}`);
|
|
|
worksheet.getCell(`A${lastRowNum}`).alignment = { vertical: "middle" };
|
|
|
const rowLast = worksheet.getRow(lastRowNum);
|
|
|
rowLast.height = 23;
|
|
@@ -382,7 +529,6 @@ export const genRespondExcel = (
|
|
|
* @param {*} sName 项目名称
|
|
|
* @param {*} kaibiaoTime 开标时间
|
|
|
* @param {*} kaibiaoAddress 开标地点
|
|
|
- * @param {*} hName 供应商名称
|
|
|
* @param {*} tableData 数据
|
|
|
*/
|
|
|
export const genTechExcel = (
|
|
@@ -390,14 +536,16 @@ export const genTechExcel = (
|
|
|
sName,
|
|
|
kaibiaoTime,
|
|
|
kaibiaoAddress,
|
|
|
- hName,
|
|
|
tableData,
|
|
|
sheetName
|
|
|
) => {
|
|
|
const worksheet = workbook.addWorksheet(sheetName, {
|
|
|
- pageSetup:{paperSize: 9, orientation:'landscape'}
|
|
|
+ pageSetup: { paperSize: 9, orientation: "landscape" },
|
|
|
});
|
|
|
- const columnWidth = [3.88, 16.19, 5.47, 65.53, 15.04, 15.04];
|
|
|
+ const columnWidth = [
|
|
|
+ 3.88, 16.19, 5.47, 65.53, 15.04, 15.04, 15.04, 15.04, 15.04, 15.04, 15.04,
|
|
|
+ 15.04,
|
|
|
+ ];
|
|
|
for (let cw = 1; cw <= columnWidth.length; cw++) {
|
|
|
worksheet.getColumn(cw).width = columnWidth[cw - 1] + 0.62;
|
|
|
}
|
|
@@ -434,15 +582,59 @@ export const genTechExcel = (
|
|
|
row4.height = 21;
|
|
|
row4.font = { name: "宋体", family: 4, size: 10 };
|
|
|
|
|
|
- worksheet.addRow(["序号", "审查内容", "分值", "得分标准", "投标单位"]);
|
|
|
+ worksheet.addRow([
|
|
|
+ "序号",
|
|
|
+ "审查内容",
|
|
|
+ "分值",
|
|
|
+ "得分标准",
|
|
|
+ "投标单位",
|
|
|
+ "",
|
|
|
+ "投标单位",
|
|
|
+ "",
|
|
|
+ "投标单位",
|
|
|
+ "",
|
|
|
+ "投标单位",
|
|
|
+ "",
|
|
|
+ ]);
|
|
|
worksheet.mergeCells("E5:F5");
|
|
|
+ worksheet.mergeCells("G5:H5");
|
|
|
+ worksheet.mergeCells("I5:J5");
|
|
|
+ worksheet.mergeCells("K5:L5");
|
|
|
|
|
|
const row5 = worksheet.getRow(5);
|
|
|
row5.height = 17;
|
|
|
row5.font = { name: "宋体", family: 4, size: 10 };
|
|
|
|
|
|
- worksheet.addRow(["", "", "", "", hName]);
|
|
|
+ let hName0 = "";
|
|
|
+ let hName1 = "";
|
|
|
+ let hName2 = "";
|
|
|
+ let hName3 = "";
|
|
|
+ if (tableData.length > 0) {
|
|
|
+ console.log(tableData[0]);
|
|
|
+ hName0 = tableData[0].hName0 || "";
|
|
|
+ hName1 = tableData[0].hName1 || "";
|
|
|
+ hName2 = tableData[0].hName2 || "";
|
|
|
+ hName3 = tableData[0].hName3 || "";
|
|
|
+ }
|
|
|
+ worksheet.addRow([
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ hName0,
|
|
|
+ "",
|
|
|
+ hName1,
|
|
|
+ "",
|
|
|
+ hName2,
|
|
|
+ "",
|
|
|
+ hName3,
|
|
|
+ "",
|
|
|
+ ]);
|
|
|
worksheet.mergeCells("E6:F6");
|
|
|
+ worksheet.mergeCells("G6:H6");
|
|
|
+ worksheet.mergeCells("I6:J6");
|
|
|
+ worksheet.mergeCells("K6:L6");
|
|
|
+
|
|
|
worksheet.getCell("A6").alignment = {
|
|
|
vertical: "middle",
|
|
|
horizontal: "center",
|
|
@@ -451,7 +643,20 @@ export const genTechExcel = (
|
|
|
row6.height = 29;
|
|
|
row6.font = { name: "宋体", family: 4, size: 10 };
|
|
|
|
|
|
- worksheet.addRow(["", "", "", "", "得分", "扣分原因"]);
|
|
|
+ worksheet.addRow([
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "得分",
|
|
|
+ "扣分原因",
|
|
|
+ "得分",
|
|
|
+ "扣分原因",
|
|
|
+ "得分",
|
|
|
+ "扣分原因",
|
|
|
+ "得分",
|
|
|
+ "扣分原因",
|
|
|
+ ]);
|
|
|
|
|
|
worksheet.getCell("A7").alignment = {
|
|
|
vertical: "middle",
|
|
@@ -465,7 +670,28 @@ export const genTechExcel = (
|
|
|
worksheet.mergeCells("C5:C7");
|
|
|
worksheet.mergeCells("D5:D7");
|
|
|
|
|
|
- const tableHeader = ["A5", "B5", "C5", "D5", "E5", "E6", "E7", "F7"];
|
|
|
+ const tableHeader = [
|
|
|
+ "A5",
|
|
|
+ "B5",
|
|
|
+ "C5",
|
|
|
+ "D5",
|
|
|
+ "E5",
|
|
|
+ "E6",
|
|
|
+ "E7",
|
|
|
+ "F7",
|
|
|
+ "G5",
|
|
|
+ "G6",
|
|
|
+ "G7",
|
|
|
+ "H7",
|
|
|
+ "I5",
|
|
|
+ "I6",
|
|
|
+ "I7",
|
|
|
+ "J7",
|
|
|
+ "K5",
|
|
|
+ "K6",
|
|
|
+ "K7",
|
|
|
+ "L7",
|
|
|
+ ];
|
|
|
for (let th of tableHeader) {
|
|
|
worksheet.getCell(th).alignment = {
|
|
|
vertical: "middle",
|
|
@@ -481,16 +707,25 @@ export const genTechExcel = (
|
|
|
|
|
|
const tableStartNum = 8;
|
|
|
|
|
|
- const tbody = ["A", "B", "C", "D", "E", "F"];
|
|
|
- let total = 0;
|
|
|
+ const tbody = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"];
|
|
|
+ let total0 = 0;
|
|
|
+ let total1 = 0;
|
|
|
+ let total2 = 0;
|
|
|
+ let total3 = 0;
|
|
|
for (let i = 0; i < tableData.length; i++) {
|
|
|
const data = [
|
|
|
i + 1,
|
|
|
tableData[i].content || "",
|
|
|
tableData[i].value || "",
|
|
|
tableData[i].standard || "",
|
|
|
- tableData[i].score || "",
|
|
|
- tableData[i].reason || "",
|
|
|
+ tableData[i].score0,
|
|
|
+ tableData[i].reason0 || "",
|
|
|
+ tableData[i].score1,
|
|
|
+ tableData[i].reason1 || "",
|
|
|
+ tableData[i].score2,
|
|
|
+ tableData[i].reason2 || "",
|
|
|
+ tableData[i].score3,
|
|
|
+ tableData[i].reason3 || "",
|
|
|
];
|
|
|
for (let j = 0; j < data.length; j++) {
|
|
|
const td = tbody[j];
|
|
@@ -526,7 +761,16 @@ export const genTechExcel = (
|
|
|
alignment = { vertical: "middle", horizontal: "center" };
|
|
|
value = data[j];
|
|
|
if (td == "E") {
|
|
|
- total += Number(data[j]);
|
|
|
+ total0 += Number(data[j]);
|
|
|
+ }
|
|
|
+ if (td == "G") {
|
|
|
+ total1 += Number(data[j]);
|
|
|
+ }
|
|
|
+ if (td == "I") {
|
|
|
+ total2 += Number(data[j]);
|
|
|
+ }
|
|
|
+ if (td == "K") {
|
|
|
+ total3 += Number(data[j]);
|
|
|
}
|
|
|
}
|
|
|
worksheet.getCell(`${td}${i + tableStartNum}`).alignment = alignment;
|
|
@@ -543,8 +787,18 @@ export const genTechExcel = (
|
|
|
|
|
|
const denfenRowNum = tableData.length + tableStartNum;
|
|
|
worksheet.mergeCells(`A${denfenRowNum}:D${denfenRowNum}`);
|
|
|
- const denFenTd = ["A", "E", "F"];
|
|
|
- const denFenData = ["得分", total, ""];
|
|
|
+ const denFenTd = ["A", "E", "F", "G", "H", "I", "J", "K", "L"];
|
|
|
+ const denFenData = [
|
|
|
+ "得分",
|
|
|
+ hName0 ? total0 : "",
|
|
|
+ "",
|
|
|
+ hName1 ? total1 : "",
|
|
|
+ "",
|
|
|
+ hName2 ? total2 : "",
|
|
|
+ "",
|
|
|
+ hName3 ? total3 : "",
|
|
|
+ "",
|
|
|
+ ];
|
|
|
for (let i = 0; i < denFenData.length; i++) {
|
|
|
const td = denFenTd[i];
|
|
|
worksheet.getCell(`${td + denfenRowNum}`).border = {
|
|
@@ -570,7 +824,7 @@ export const genTechExcel = (
|
|
|
|
|
|
const lastRowNum = denfenRowNum + 1;
|
|
|
worksheet.addRow(["评审小组成员签字:"]);
|
|
|
- worksheet.mergeCells(`A${lastRowNum}:E${lastRowNum}`);
|
|
|
+ worksheet.mergeCells(`A${lastRowNum}:L${lastRowNum}`);
|
|
|
worksheet.getCell(`A${lastRowNum}`).alignment = { vertical: "middle" };
|
|
|
const rowLast = worksheet.getRow(lastRowNum);
|
|
|
rowLast.height = 20;
|
|
@@ -584,9 +838,9 @@ export const genTechExcel = (
|
|
|
*/
|
|
|
export const genBidScoreExcel = (workbook, tableData, materialId, sName) => {
|
|
|
const worksheet = workbook.addWorksheet("报价得分", {
|
|
|
- pageSetup:{paperSize: 9, orientation:'landscape'}
|
|
|
+ pageSetup: { paperSize: 9, orientation: "landscape" },
|
|
|
});
|
|
|
- worksheet.pageSetup.printArea = 'A1:F11';
|
|
|
+ worksheet.pageSetup.printArea = "A1:F11";
|
|
|
|
|
|
const columnWidth = [5, 34.5, 21.13, 21.13, 21.13, 21.13];
|
|
|
for (let cw = 1; cw <= columnWidth.length; cw++) {
|
|
@@ -727,9 +981,9 @@ export const genBidScoreExcel = (workbook, tableData, materialId, sName) => {
|
|
|
*/
|
|
|
export const genTotalScoreExcel = (workbook, tableData, zjNames) => {
|
|
|
const worksheet = workbook.addWorksheet("评分汇总", {
|
|
|
- pageSetup:{paperSize: 9, orientation:'landscape'}
|
|
|
+ pageSetup: { paperSize: 9, orientation: "landscape" },
|
|
|
});
|
|
|
- worksheet.pageSetup.printArea = 'A1:K9';
|
|
|
+ worksheet.pageSetup.printArea = "A1:K9";
|
|
|
const columnWidth = [
|
|
|
4.57, 35.25, 11.75, 11.75, 11.75, 11.75, 11.75, 9.48, 9.48, 9.48, 7.88,
|
|
|
];
|
|
@@ -942,12 +1196,18 @@ export const genIdeaExcel = (
|
|
|
sName,
|
|
|
kaibiaoTime,
|
|
|
kaibiaoAddress,
|
|
|
- idea
|
|
|
+ ideas
|
|
|
) => {
|
|
|
- const worksheet = workbook.addWorksheet("评委意见表", {
|
|
|
- pageSetup:{paperSize: 9, orientation:'portrait', showGridLines: true, fitToPage: true, fitToHeight: 1}
|
|
|
+ const worksheet = workbook.addWorksheet(`评委意见表`, {
|
|
|
+ pageSetup: {
|
|
|
+ paperSize: 9,
|
|
|
+ orientation: "portrait",
|
|
|
+ showGridLines: true,
|
|
|
+ fitToPage: true,
|
|
|
+ fitToHeight: 1,
|
|
|
+ },
|
|
|
});
|
|
|
- worksheet.pageSetup.printArea = 'A1:B6';
|
|
|
+ worksheet.pageSetup.printArea = "A1:B6";
|
|
|
|
|
|
const columnWidth = [40.97, 39.63];
|
|
|
for (let cw = 1; cw <= columnWidth.length; cw++) {
|
|
@@ -987,11 +1247,19 @@ export const genIdeaExcel = (
|
|
|
row4.font = { name: "宋体", family: 4, size: 10 };
|
|
|
|
|
|
let value = "";
|
|
|
- const alignment = { vertical: "top" };
|
|
|
- console.log({ idea });
|
|
|
- if (idea) {
|
|
|
+ const alignment = { vertical: "top", wrapText: true };
|
|
|
+ if (ideas) {
|
|
|
+ let str = "";
|
|
|
+ for (let idea of ideas) {
|
|
|
+ str += idea.idea + "\r\n";
|
|
|
+ }
|
|
|
value = {
|
|
|
- richText: [{ font: { name: "宋体", family: 4, size: 10 }, text: idea }],
|
|
|
+ richText: [
|
|
|
+ {
|
|
|
+ font: { name: "宋体", family: 4, size: 10 },
|
|
|
+ text: str,
|
|
|
+ },
|
|
|
+ ],
|
|
|
};
|
|
|
}
|
|
|
worksheet.mergeCells("A5:B5");
|
|
@@ -1008,38 +1276,49 @@ export const genIdeaExcel = (
|
|
|
rowLast.font = { name: "宋体", family: 4, size: 10 };
|
|
|
};
|
|
|
|
|
|
-export const genEvaluationDocx = (plan, tender, uKaiTime, totalScore1, zjNames, quoteScore) => {
|
|
|
- const toubiaodanwei = totalScore1.map(item => item.hName).join('、');
|
|
|
- const zhuanjia = zjNames.filter(name => name).join('、');
|
|
|
+export const genEvaluationDocx = (
|
|
|
+ plan,
|
|
|
+ tender,
|
|
|
+ uKaiTime,
|
|
|
+ totalScore1,
|
|
|
+ zjNames,
|
|
|
+ quoteScore
|
|
|
+) => {
|
|
|
+ const toubiaodanwei = totalScore1.map((item) => item.hName).join("、");
|
|
|
+ const zhuanjia = zjNames.filter((name) => name).join("、");
|
|
|
const yuzhongbiao = {
|
|
|
- name: '',
|
|
|
- price: 0
|
|
|
+ name: "",
|
|
|
+ price: 0,
|
|
|
};
|
|
|
|
|
|
- let quoteScoreContent = `<p style="margin-top:0pt; margin-bottom:0pt; text-align:justify; line-height:150%; widows:0; orphans:0; font-size:10.5pt">开标记录:</p>`
|
|
|
- quoteScore.forEach(element => {
|
|
|
+ let quoteScoreContent = `<p style="margin-top:0pt; margin-bottom:0pt; text-align:justify; line-height:150%; widows:0; orphans:0; font-size:10.5pt">开标记录:</p>`;
|
|
|
+ quoteScore.forEach((element) => {
|
|
|
quoteScoreContent += `<p style="margin-top:0pt; margin-bottom:0pt; text-align:justify; line-height:150%; widows:0; orphans:0; font-size:10.5pt">
|
|
|
<span style="width:238pt; display:inline-block">投标单位: ${element.hName}</span>
|
|
|
- <span style="width:80pt; display:inline-block"> 投标报价: ${element.quotePrice} 元</span></p>`
|
|
|
+ <span style="width:80pt; display:inline-block"> 投标报价: ${element.quotePrice} 元</span></p>`;
|
|
|
});
|
|
|
|
|
|
- let scoreRankContent = `<p style="margin-top:0pt; margin-bottom:0pt; text-align:justify; line-height:150%; widows:0; orphans:0; font-size:10.5pt">得分排名:</p>`
|
|
|
- totalScore1.forEach(element => {
|
|
|
+ let scoreRankContent = `<p style="margin-top:0pt; margin-bottom:0pt; text-align:justify; line-height:150%; widows:0; orphans:0; font-size:10.5pt">得分排名:</p>`;
|
|
|
+ totalScore1.forEach((element) => {
|
|
|
if (element.size == 1) {
|
|
|
- yuzhongbiao.name = element.hName
|
|
|
- yuzhongbiao.price = quoteScore.find(item => item.hid === element.hid).quotePrice;
|
|
|
+ yuzhongbiao.name = element.hName;
|
|
|
+ yuzhongbiao.price = quoteScore.find(
|
|
|
+ (item) => item.hid === element.hid
|
|
|
+ ).quotePrice;
|
|
|
}
|
|
|
- scoreRankContent += `<p style="margin-top:0pt; margin-bottom:0pt; text-align:justify; line-height:150%; widows:0; orphans:0; font-size:10.5pt">第${element.size}名: ${element.hName} 得分: ${element.totalScore}</p>`
|
|
|
+ scoreRankContent += `<p style="margin-top:0pt; margin-bottom:0pt; text-align:justify; line-height:150%; widows:0; orphans:0; font-size:10.5pt">第${element.size}名: ${element.hName} 得分: ${element.totalScore}</p>`;
|
|
|
});
|
|
|
-
|
|
|
- let content = `<p style="width: 100%;text-align: center;font-size: 35pt;margin-top: 100pt">评 标 决 议</p><p style="font-size: 12pt;margin-top: 30pt;text-align: center;">项目名称: ${plan.aName}</p>`;
|
|
|
- content += `<p style="font-size: 12pt;margin-top: 30pt;text-align: center;">采 购 人: ${tender.sUnit}</p>`;
|
|
|
- content += `<p style="font-size: 12pt;text-align: center;">代理机构: 黑龙江省国辰工程项目管理有限责任公司</p>`;
|
|
|
- content += `<p style="font-size: 12pt;text-align: center;">开标日期: ${dayjs(uKaiTime).format("YYYY年MM月DD日")}</p>`;
|
|
|
- content += `<div style="page-break-after:always"></div>`
|
|
|
|
|
|
- // 创建一个表格的 HTML 字符串
|
|
|
- const tableHTML = `<table cellspacing="0" cellpadding="0" style="border-collapse:collapse">
|
|
|
+ let content = `<p style="width: 100%;text-align: center;font-size: 35pt;margin-top: 100pt">评 标 决 议</p><p style="font-size: 12pt;margin-top: 30pt;text-align: center;">项目名称: ${plan.aName}</p>`;
|
|
|
+ content += `<p style="font-size: 12pt;margin-top: 30pt;text-align: center;">采 购 人: ${tender.sUnit}</p>`;
|
|
|
+ content += `<p style="font-size: 12pt;text-align: center;">代理机构: 黑龙江省国辰工程项目管理有限责任公司</p>`;
|
|
|
+ content += `<p style="font-size: 12pt;text-align: center;">开标日期: ${dayjs(
|
|
|
+ uKaiTime
|
|
|
+ ).format("YYYY年MM月DD日")}</p>`;
|
|
|
+ content += `<div style="page-break-after:always"></div>`;
|
|
|
+
|
|
|
+ // 创建一个表格的 HTML 字符串
|
|
|
+ const tableHTML = `<table cellspacing="0" cellpadding="0" style="border-collapse:collapse">
|
|
|
<tr style="height:22.9pt">
|
|
|
<td colspan="2" style="width:101.6pt; border-style:solid; border-width:0.75pt; padding-right:5.03pt; padding-left:5.03pt; vertical-align:middle">
|
|
|
<p style="margin-top:0pt; margin-bottom:0pt; font-size:10.5pt">
|
|
@@ -1264,7 +1543,7 @@ export const genEvaluationDocx = (plan, tender, uKaiTime, totalScore1, zjNames,
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>`;
|
|
|
- content += tableHTML
|
|
|
+ content += tableHTML;
|
|
|
|
|
|
- return content
|
|
|
-}
|
|
|
+ return content;
|
|
|
+};
|