diff --git a/src/components/DepTree/index.vue b/src/components/DepTree/index.vue index 1eddc3b..b5e4234 100644 --- a/src/components/DepTree/index.vue +++ b/src/components/DepTree/index.vue @@ -191,6 +191,8 @@ defineExpose({ padding-top: 10px; box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1); z-index: 10; + position: sticky; + bottom: 0; } } diff --git a/src/views/admin/system/user/index.vue b/src/views/admin/system/user/index.vue index e4cf480..f57dc02 100644 --- a/src/views/admin/system/user/index.vue +++ b/src/views/admin/system/user/index.vue @@ -5,7 +5,7 @@
{ const resetQuery = () => { queryRef.value?.resetFields() state.queryForm.deptId = "" - queryTreeRef.value.getdeptTree() + depTreeRef.value.getTreeData() getDataList() } diff --git a/src/views/hard/hard-order/index.vue b/src/views/hard/hard-order/index.vue index 15d652e..068ace4 100644 --- a/src/views/hard/hard-order/index.vue +++ b/src/views/hard/hard-order/index.vue @@ -361,65 +361,36 @@ const getSummaries = (param: SummaryMethodProps) => { return } if (column.property === "paymentInformation") { - const totalPriceValues = data.map((item) => Number(item.totalPrice)) - const extraPriceValues = data.map((item) => Number(item.extraPrice)) - const payPriceValues = data.map((item) => Number(item.payPrice)) - if ( - !totalPriceValues.every((value) => Number.isNaN(value)) && - !extraPriceValues.every((value) => Number.isNaN(value)) && - !payPriceValues.every((value) => Number.isNaN(value)) - ) { - // h("div", { style: { textDecoration: "underline" } }, ["Total Cost"]) - sums[index] = h("div", { style: {} }, [ - h("div", {}, [ - h("span", { style: { marginRight: "40px", fontWeight: "bold" } }, ["商品总价"]), - h("span", { style: { color: "#67C260" } }, [ - `${displayPrice( - totalPriceValues.reduce((prev, curr) => { - const value = Number(curr) - if (!Number.isNaN(value)) { - return prev + curr - } else { - return prev - } - }, 0), - )}`, + const priceVNode: VNode[] & string[] = [] + ;[ + { column: "totalPrice", columnName: "商品总价", color: "#67C260" }, + { column: "extraPrice", columnName: "额外支付", color: "#F56E9B" }, + { column: "payPrice", columnName: "实际支付", color: "#355CF6" }, + ].forEach(({ column, columnName, color }: any, index: number) => { + const values = data.map((item) => Number(item[column])) + if (!values.every((value) => Number.isNaN(value))) { + priceVNode.push( + h("div", {}, [ + h("span", { style: { marginRight: "40px", minWidth: "60px", fontWeight: "bold" } }, [columnName]), + h("span", { style: { color, minWidth: "50px", flex: 1 } }, [ + displayPrice( + values.reduce((prev, curr) => { + const value = Number(curr) + if (!Number.isNaN(value)) { + return prev + curr + } else { + return prev + } + }, 0), + ), + ]), ]), - ]), - h("div", { style: {} }, [ - h("span", { style: { marginRight: "40px", fontWeight: "bold" } }, ["额外支付"]), - h("span", { style: { color: "#F56E9B" } }, [ - `${displayPrice( - extraPriceValues.reduce((prev, curr) => { - const value = Number(curr) - if (!Number.isNaN(value)) { - return prev + curr - } else { - return prev - } - }, 0), - )}`, - ]), - ]), - h("div", { style: {} }, [ - h("span", { style: { marginRight: "40px", fontWeight: "bold" } }, ["实际支付"]), - h("span", { style: { color: "#355CF6" } }, [ - `${displayPrice( - payPriceValues.reduce((prev, curr) => { - const value = Number(curr) - if (!Number.isNaN(value)) { - return prev + curr - } else { - return prev - } - }, 0), - )}`, - ]), - ]), - ]) - } else { - sums[index] = "N/A" - } + ) + } else { + priceVNode.push("NaN") + } + }) + sums[index] = h("div", { style: {} }, [...priceVNode]) } else { sums[index] = "" } diff --git a/src/views/hard/hard-sb/index.vue b/src/views/hard/hard-sb/index.vue index a37480c..22a58e1 100644 --- a/src/views/hard/hard-sb/index.vue +++ b/src/views/hard/hard-sb/index.vue @@ -38,7 +38,7 @@ @selection-change="selectionChangHandle" @sort-change="sortChangeHandle" > - +