From c6b398fa989aba1b40a5b3be16ee9b94c6cbbd02 Mon Sep 17 00:00:00 2001 From: Timi Date: Thu, 17 Sep 2026 01:29:58 +0800 Subject: [PATCH] add customer for FundRecordList.vue --- src/pages/salesOrder/FundRecordList.vue | 190 +++++++++++++++--------- src/router/routes/managementRoutes.ts | 14 ++ 2 files changed, 136 insertions(+), 68 deletions(-) diff --git a/src/pages/salesOrder/FundRecordList.vue b/src/pages/salesOrder/FundRecordList.vue index 8a4db1d..c53f3b9 100644 --- a/src/pages/salesOrder/FundRecordList.vue +++ b/src/pages/salesOrder/FundRecordList.vue @@ -18,7 +18,7 @@ - + + - @@ -90,6 +102,7 @@ import { formatPackageAmount } from "@/utils/package"; import { getFundOperationText, getFundStatusText } from "@/utils/salesOrder"; import { Message } from "@/utils/message"; import { permissionCodes } from "@/utils/permission"; +import { getCustomerPhotoURL } from "@/utils/customer"; import { PassTimeLabel } from "timi-web"; defineOptions({ name: "FundRecordList" }); @@ -184,6 +197,10 @@ function getVerifierText(item: FundRecord): string { return item.verifier?.name || item.verifier?.nick || item.verifierUserId || "未核销"; } +function getCustomerText(item: FundRecord): string { + return item.customer?.name || item.customer?.code || item.customerId || "未知客户"; +} + function getStatusTheme(statusValue?: FundRecordStatus): "success" | "warning" | "danger" | "default" { return statusValue === "VERIFIED" ? "success" : statusValue === "PENDING" ? "warning" : statusValue === "REJECTED" ? "danger" : "default"; } @@ -276,52 +293,76 @@ onUnmounted(() => navBarStore.clearRight()); .item { + .avatar { + width: 3.5rem; + height: 3.5rem; + } + .title { gap: .5rem; display: flex; + font-size: .75rem; align-items: center; + justify-content: space-between; + + .customer { + min-width: 0; + overflow: hidden; + font-weight: 600; + white-space: nowrap; + text-overflow: ellipsis; + } + + .operation { + gap: .5rem; + display: flex; + flex-shrink: 0; + align-items: center; + } } .description { - gap: 0; - color: var(--td-text-color-secondary); display: flex; - font-size: .75rem; - flex-wrap: wrap; - line-height: 1.5; - flex-direction: column; + align-items: start; + justify-content: space-between; - .field { - gap: .25rem; - display: inline-flex; - } - - .label { - color: var(--td-text-color-placeholder); - } - } - - .amounts { - display: flex; - font-size: .75rem; - align-items: end; - flex-direction: column; - - .label { - color: var(--td-text-color-placeholder); - } - - .order-amount, - .unpaid-amount, - .record-amount { - gap: .125rem; + .operator { + gap: 0; + color: var(--td-text-color-secondary); display: flex; - align-items: baseline; - white-space: nowrap; + font-size: .75rem; + flex-wrap: wrap; + line-height: 1.5; + flex-direction: column; + + .field { + gap: .25rem; + display: inline-flex; + } + + .label { + color: var(--td-text-color-placeholder); + } } - .record-amount .value { - font-size: 1.25rem; + .amounts { + display: flex; + font-size: .75rem; + line-height: 1.5; + align-items: end; + flex-direction: column; + + .label { + color: var(--td-text-color-placeholder); + } + + .order-amount, + .unpaid-amount, + .record-amount { + display: flex; + align-items: baseline; + white-space: nowrap; + } } } } @@ -332,4 +373,17 @@ onUnmounted(() => navBarStore.clearRight()); text-align: center; } } + +:deep(.sales-order-record-list .avatar .t-image__img) { + width: 100%; + height: 100%; + object-fit: cover; + border-radius: inherit; +} + +:global(html.theme-dark) .sales-order-record-list { + .fallback { + background: #115e59; + } +} diff --git a/src/router/routes/managementRoutes.ts b/src/router/routes/managementRoutes.ts index 159a3d5..2beb544 100644 --- a/src/router/routes/managementRoutes.ts +++ b/src/router/routes/managementRoutes.ts @@ -173,6 +173,20 @@ export const managementSettingRoutes: RouteRecordRaw[] = [ darkBodyBackground: "#10161f" } }, + { + path: "/management/about/agreement/:id", + name: "Agreement", + component: () => import("@/pages/setting/Agreement.vue"), + meta: { + depth: 4, + navBarVisible: true, + navBarCanBack: true, + navBarTitle: "协议", + tabBarVisible: false, + bodyBackground: "#FFF", + darkBodyBackground: "#10161f" + } + }, { path: "/management/about/service-agreement/:id", name: "ServiceAgreement",