|
@@ -5,7 +5,7 @@
|
|
|
<div style="height: calc(100vh - 264px - 88px); overflow-y: auto; overflow-x: hidden">
|
|
|
<el-auto-resizer>
|
|
|
<template #default="{ height, width }">
|
|
|
- <el-table-v2 :columns="columns" :data="tableData" :width="width" :height="height" fixed :cache="10" :header-height="35" :row-height="35">
|
|
|
+ <el-table-v2 :columns="columns" :data="tableData" :width="width" :height="height" fixed :cache="20" :header-height="35" :row-height="35">
|
|
|
<template #row="props">
|
|
|
<Row v-bind="props" />
|
|
|
</template>
|
|
@@ -57,9 +57,17 @@ onMounted(() => {
|
|
|
for (let j = 0; j < res[i].skuSpecList.length; j++) {
|
|
|
if (res[i].skuSpecList[j].bomSpecList && res[i].skuSpecList[j].bomSpecList.length > 0) {
|
|
|
for (let y = 0; y < res[i].skuSpecList[j].bomSpecList.length; y++) {
|
|
|
- let index = 0;
|
|
|
+ let indexOne = 0;
|
|
|
+ if (j === 0 && y === 0) {
|
|
|
+ for (let z = 0; z < res[i].skuSpecList.length; z++) {
|
|
|
+ if (res[i].skuSpecList[z].bomSpecList && res[i].skuSpecList[z].bomSpecList.length > 0) {
|
|
|
+ indexOne = Number(indexOne + res[i].skuSpecList[z].bomSpecList.length);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let indexTwo = 0;
|
|
|
if (y === 0) {
|
|
|
- index = res[i].skuSpecList[j].bomSpecList.length;
|
|
|
+ indexTwo = res[i].skuSpecList[j].bomSpecList.length;
|
|
|
}
|
|
|
list.push({
|
|
|
wlnCreateTime: res[i].wlnCreateTime,
|
|
@@ -81,7 +89,8 @@ onMounted(() => {
|
|
|
packingLaborSummary: res[i].skuSpecList[j].bomSpecList[y].packingLaborSummary,
|
|
|
managementFeeSummary: res[i].skuSpecList[j].bomSpecList[y].managementFeeSummary,
|
|
|
unitPriceSKU: res[i].skuSpecList[j].unitPrice,
|
|
|
- index: index,
|
|
|
+ indexOne: indexOne,
|
|
|
+ indexTwo: indexTwo,
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -90,7 +99,8 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
list.push({
|
|
|
- index: 1,
|
|
|
+ indexOne: 1,
|
|
|
+ indexTwo: 1,
|
|
|
total: total,
|
|
|
wlnCreateTime: "总计:",
|
|
|
});
|
|
@@ -232,19 +242,33 @@ const columns = computed(() => {
|
|
|
},
|
|
|
];
|
|
|
});
|
|
|
-const mergeColumn = [0, 1, 2, 3, 4, 5, 16, 17, 18];
|
|
|
+const mergeColumnOne = [0, 1, 2];
|
|
|
+const mergeColumnTwo = [3, 4, 5, 16, 17, 18];
|
|
|
const Row = ({ rowData, cells }) => {
|
|
|
- if (rowData.index > 1) {
|
|
|
- for (let i = 0; i < mergeColumn.length; i++) {
|
|
|
- const cell = cells[mergeColumn[i]];
|
|
|
+ if (rowData.indexOne > 1) {
|
|
|
+ for (let i = 0; i < mergeColumnOne.length; i++) {
|
|
|
+ const cell = cells[mergeColumnOne[i]];
|
|
|
+ const style = {
|
|
|
+ ...cell.props.style,
|
|
|
+ backgroundColor: "#fff",
|
|
|
+ height: `${rowData.indexOne * 35 - 1}px`,
|
|
|
+ alignSelf: "flex-start",
|
|
|
+ zIndex: 1,
|
|
|
+ };
|
|
|
+ cells[mergeColumnOne[i]] = cloneVNode(cell, { style });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (rowData.indexTwo > 1) {
|
|
|
+ for (let i = 0; i < mergeColumnTwo.length; i++) {
|
|
|
+ const cell = cells[mergeColumnTwo[i]];
|
|
|
const style = {
|
|
|
...cell.props.style,
|
|
|
backgroundColor: "#fff",
|
|
|
- height: `${rowData.index * 35 - 1}px`,
|
|
|
+ height: `${rowData.indexTwo * 35 - 1}px`,
|
|
|
alignSelf: "flex-start",
|
|
|
zIndex: 1,
|
|
|
};
|
|
|
- cells[mergeColumn[i]] = cloneVNode(cell, { style });
|
|
|
+ cells[mergeColumnTwo[i]] = cloneVNode(cell, { style });
|
|
|
}
|
|
|
}
|
|
|
return cells;
|