|
@@ -59,6 +59,14 @@ onMounted(() => {
|
|
|
);
|
|
|
}
|
|
|
});
|
|
|
+const labelList = ref({
|
|
|
+ 2: "quantity",
|
|
|
+ 5: "total",
|
|
|
+});
|
|
|
+const textList = ref({
|
|
|
+ 1: "胜德体育总经理:",
|
|
|
+ 2: "申请日期:",
|
|
|
+});
|
|
|
const getSummaries = ({ columns, data }) => {
|
|
|
const sums = [];
|
|
|
columns.forEach((column, index) => {
|
|
@@ -79,168 +87,32 @@ const getSummaries = ({ columns, data }) => {
|
|
|
h("div", { style: { "font-size": "16px", "font-weight": 700, padding: "0 12px" }, innerHTML: "申请人:" }),
|
|
|
]);
|
|
|
return;
|
|
|
- }
|
|
|
- if (index === 1) {
|
|
|
- sums[index] = h("div", { class: "" }, [
|
|
|
- h("div", {
|
|
|
- style: {
|
|
|
- "text-align": "center",
|
|
|
- "border-style": "solid",
|
|
|
- "border-width": "0 1px 1px 0",
|
|
|
- "border-color": "#ebeef5",
|
|
|
- color: "#ebeef5",
|
|
|
- padding: "0 12px",
|
|
|
- height: "35px",
|
|
|
- },
|
|
|
- innerHTML: ".",
|
|
|
- }),
|
|
|
- h("div", {
|
|
|
- style: {
|
|
|
- "text-align": "center",
|
|
|
- "border-style": "solid",
|
|
|
- "border-width": "0 0 1px 0",
|
|
|
- "border-color": "#ebeef5",
|
|
|
- color: "#ebeef5",
|
|
|
- padding: "0 12px",
|
|
|
- height: "35px",
|
|
|
- },
|
|
|
- innerHTML: ".",
|
|
|
- }),
|
|
|
- h("div", {
|
|
|
- style: {
|
|
|
- "text-align": "center",
|
|
|
- "border-style": "solid",
|
|
|
- "border-width": "0 0 1px 0",
|
|
|
- "border-color": "#ebeef5",
|
|
|
- color: "#ebeef5",
|
|
|
- padding: "0 12px",
|
|
|
- height: "35px",
|
|
|
- },
|
|
|
- innerHTML: ".",
|
|
|
- }),
|
|
|
- h("div", { style: { "font-size": "16px", "font-weight": 700, padding: "0 12px" }, innerHTML: "胜德体育总经理:" }),
|
|
|
- ]);
|
|
|
- return;
|
|
|
- }
|
|
|
- if (index === 2) {
|
|
|
+ } else {
|
|
|
sums[index] = h("div", { class: "" }, [
|
|
|
- h("div", {
|
|
|
- style: {
|
|
|
- "text-align": "center",
|
|
|
- "border-style": "solid",
|
|
|
- "border-width": "0 1px 1px 0",
|
|
|
- "border-color": "#ebeef5",
|
|
|
- padding: "0 12px",
|
|
|
- height: "35px",
|
|
|
- },
|
|
|
- innerHTML: getTotal("quantity"),
|
|
|
- }),
|
|
|
- h("div", {
|
|
|
- style: {
|
|
|
- "text-align": "center",
|
|
|
- "border-style": "solid",
|
|
|
- "border-width": "0 0 1px 0",
|
|
|
- "border-color": "#ebeef5",
|
|
|
- color: "#ebeef5",
|
|
|
- padding: "0 12px",
|
|
|
- height: "35px",
|
|
|
- },
|
|
|
- innerHTML: ".",
|
|
|
- }),
|
|
|
- h("div", {
|
|
|
- style: {
|
|
|
- "text-align": "center",
|
|
|
- "border-style": "solid",
|
|
|
- "border-width": "0 0 1px 0",
|
|
|
- "border-color": "#ebeef5",
|
|
|
- color: "#ebeef5",
|
|
|
- padding: "0 12px",
|
|
|
- height: "35px",
|
|
|
- },
|
|
|
- innerHTML: ".",
|
|
|
- }),
|
|
|
- h("div", { style: { "font-size": "16px", "font-weight": 700, padding: "0 12px", "text-align": "left" }, innerHTML: "申请日期:" }),
|
|
|
- ]);
|
|
|
- return;
|
|
|
- }
|
|
|
- if ([1, 3, 4].includes(index)) {
|
|
|
- sums[index] = h("div", { class: "" }, [
|
|
|
- h("div", {
|
|
|
- style: {
|
|
|
- "text-align": "center",
|
|
|
- "border-style": "solid",
|
|
|
- "border-width": "0 1px 1px 0",
|
|
|
- "border-color": "#ebeef5",
|
|
|
- color: "#ebeef5",
|
|
|
- padding: "0 12px",
|
|
|
- height: "35px",
|
|
|
- },
|
|
|
- innerHTML: ".",
|
|
|
- }),
|
|
|
- h("div", {
|
|
|
- style: {
|
|
|
- "text-align": "center",
|
|
|
- "border-style": "solid",
|
|
|
- "border-width": "0 0 1px 0",
|
|
|
- "border-color": "#ebeef5",
|
|
|
- color: "#ebeef5",
|
|
|
- padding: "0 12px",
|
|
|
- height: "35px",
|
|
|
- },
|
|
|
- innerHTML: ".",
|
|
|
- }),
|
|
|
- h("div", {
|
|
|
- style: {
|
|
|
- "text-align": "center",
|
|
|
- "border-style": "solid",
|
|
|
- "border-width": "0 0 1px 0",
|
|
|
- "border-color": "#ebeef5",
|
|
|
- color: "#ebeef5",
|
|
|
- padding: "0 12px",
|
|
|
- height: "35px",
|
|
|
- },
|
|
|
- innerHTML: ".",
|
|
|
- }),
|
|
|
- h("div", {
|
|
|
- style: {
|
|
|
- "text-align": "center",
|
|
|
- "border-style": "solid",
|
|
|
- "border-width": "0 0 1px 0",
|
|
|
- "border-color": "#ebeef5",
|
|
|
- color: "#ebeef5",
|
|
|
- padding: "0 12px",
|
|
|
- height: "35px",
|
|
|
- },
|
|
|
- innerHTML: ".",
|
|
|
- }),
|
|
|
- ]);
|
|
|
- return;
|
|
|
- }
|
|
|
- if (index === 5) {
|
|
|
- sums[index] = h("div", { class: "" }, [
|
|
|
- h("div", {
|
|
|
- style: {
|
|
|
- "text-align": "center",
|
|
|
- "border-style": "solid",
|
|
|
- "border-width": "0 1px 1px 0",
|
|
|
- "border-color": "#ebeef5",
|
|
|
- padding: "0 12px",
|
|
|
- height: "35px",
|
|
|
- },
|
|
|
- innerHTML: getTotal("total"),
|
|
|
- }),
|
|
|
- h("div", {
|
|
|
- style: {
|
|
|
- "text-align": "center",
|
|
|
- "border-style": "solid",
|
|
|
- "border-width": "0 0 1px 0",
|
|
|
- "border-color": "#ebeef5",
|
|
|
- color: "#ebeef5",
|
|
|
- padding: "0 12px",
|
|
|
- height: "35px",
|
|
|
- },
|
|
|
- innerHTML: ".",
|
|
|
- }),
|
|
|
+ [1, 3, 4].includes(index)
|
|
|
+ ? h("div", {
|
|
|
+ style: {
|
|
|
+ "text-align": "center",
|
|
|
+ "border-style": "solid",
|
|
|
+ "border-width": "0 1px 1px 0",
|
|
|
+ "border-color": "#ebeef5",
|
|
|
+ color: "#ebeef5",
|
|
|
+ padding: "0 12px",
|
|
|
+ height: "35px",
|
|
|
+ },
|
|
|
+ innerHTML: ".",
|
|
|
+ })
|
|
|
+ : h("div", {
|
|
|
+ style: {
|
|
|
+ "text-align": "center",
|
|
|
+ "border-style": "solid",
|
|
|
+ "border-width": "0 1px 1px 0",
|
|
|
+ "border-color": "#ebeef5",
|
|
|
+ padding: "0 12px",
|
|
|
+ height: "35px",
|
|
|
+ },
|
|
|
+ innerHTML: getTotal(labelList.value[index]),
|
|
|
+ }),
|
|
|
h("div", {
|
|
|
style: {
|
|
|
"text-align": "center",
|
|
@@ -265,6 +137,20 @@ const getSummaries = ({ columns, data }) => {
|
|
|
},
|
|
|
innerHTML: ".",
|
|
|
}),
|
|
|
+ [3, 4, 5].includes(index)
|
|
|
+ ? h("div", {
|
|
|
+ style: {
|
|
|
+ "text-align": "center",
|
|
|
+ "border-style": "solid",
|
|
|
+ "border-width": "0 0 1px 0",
|
|
|
+ "border-color": "#ebeef5",
|
|
|
+ color: "#ebeef5",
|
|
|
+ padding: "0 12px",
|
|
|
+ height: "35px",
|
|
|
+ },
|
|
|
+ innerHTML: ".",
|
|
|
+ })
|
|
|
+ : h("div", { style: { "font-size": "16px", "font-weight": 700, padding: "0 12px", "text-align": "left" }, innerHTML: textList.value[index] }),
|
|
|
]);
|
|
|
return;
|
|
|
}
|