diff --git a/package.json b/package.json index f02cc8f..47923bc 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "less": "^4.3.0", "pinia": "^3.0.2", "tdesign-mobile-vue": "^1.17.1", - "timi-tdesign-mobile": "^1.4.0", + "timi-tdesign-mobile": "^1.5.0", "timi-ts": "^1.0.0", "timi-web": "^1.0.2", "timi-web-api": "^1.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a47ecdb..ed78f0f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,8 +44,8 @@ importers: specifier: ^1.17.1 version: 1.17.1(patch_hash=c98db305008fbfd00046666ca890e1c6cb88257c0619418694689cddf8cd78c3)(vue@3.5.40(typescript@5.8.3)) timi-tdesign-mobile: - specifier: ^1.4.0 - version: 1.4.0(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue-router@4.5.1(vue@3.5.40(typescript@5.8.3)))(vue@3.5.40(typescript@5.8.3)) + specifier: ^1.5.0 + version: 1.5.0(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue-router@4.5.1(vue@3.5.40(typescript@5.8.3)))(vue@3.5.40(typescript@5.8.3)) timi-ts: specifier: ^1.0.0 version: 1.0.0 @@ -2742,8 +2742,8 @@ packages: through2@4.0.2: resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} - timi-tdesign-mobile@1.4.0: - resolution: {integrity: sha512-d7HQIW0MqXjPv8hkNWwBlv9UviXesvEG42z7qNemJcSOWSUVg1b59O+DbuEajgmnJGeZ9DqMdbm+x0eHd9l11A==} + timi-tdesign-mobile@1.5.0: + resolution: {integrity: sha512-zp5yGlZaiJsf4QuREbBK7qjqQNteAB7PtWWG98rwGPzEwou6Q/45nEc1CJq47BFsuxjCq+7XIhCFl3eX7GgN6w==} engines: {node: '>=20.0.0'} peerDependencies: vue: ^3.5.0 @@ -5836,7 +5836,7 @@ snapshots: dependencies: readable-stream: 3.6.2 - timi-tdesign-mobile@1.4.0(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue-router@4.5.1(vue@3.5.40(typescript@5.8.3)))(vue@3.5.40(typescript@5.8.3)): + timi-tdesign-mobile@1.5.0(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue-router@4.5.1(vue@3.5.40(typescript@5.8.3)))(vue@3.5.40(typescript@5.8.3)): dependencies: tdesign-mobile-vue: 1.17.1(patch_hash=c98db305008fbfd00046666ca890e1c6cb88257c0619418694689cddf8cd78c3)(vue@3.5.40(typescript@5.8.3)) timi-web: 1.0.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3)) diff --git a/src/api/RecycleAPI.ts b/src/api/RecycleAPI.ts index 13226df..1de33f1 100644 --- a/src/api/RecycleAPI.ts +++ b/src/api/RecycleAPI.ts @@ -26,6 +26,7 @@ import { getCurrentStoreId, withCurrentStoreId } from "@/utils/store"; const CONFIG_URI = "/gao/recycle/config"; const EXCHANGE_URI = "/gao/recycle/exchange"; const ACCOUNT_URI = "/gao/recycle/account"; +const LEDGER_URI = "/gao/recycle/ledger"; const PAYMENT_URI = "/gao/recycle/payment"; const STAT_URI = "/gao/recycle/stat"; @@ -119,9 +120,11 @@ async function accountList(customerId: string): Promise { } /** 按客户分页查询有余额的回收物及全门店汇总。 */ -async function accountCustomers(offset: number, limit: number, recycleItemId?: string, keyword?: string, customerIds?: string[]): Promise { - return await axios.post(`${ACCOUNT_URI}/customers`, undefined, { - params: { storeId: getCurrentStoreId() || undefined, offset, limit, recycleItemId: recycleItemId || undefined, keyword: keyword || undefined, customerIds: customerIds?.length ? customerIds.join(",") : undefined } +async function accountCustomers(index: number, size: number, recycleItemId?: string, keyword?: string, customerIds?: string[]): Promise { + return await axios.post(`${ACCOUNT_URI}/customers`, { + storeId: getCurrentStoreId() || undefined, index, size, + recycleItemId: recycleItemId || undefined, keyword: keyword || undefined, + customerIds: customerIds?.length ? customerIds : undefined }); } @@ -130,11 +133,27 @@ async function accountItems(): Promise { return await axios.post(`${ACCOUNT_URI}/items`, undefined, { params: { storeId: getCurrentStoreId() || undefined } }); } -/** 额度流水,服务端当前最多返回 100 条。 */ -async function accountLedger(customerId: string): Promise { - return await axios.post(`${ACCOUNT_URI}/ledger`, undefined, { - params: { storeId: getCurrentStoreId() || undefined, customerId } - }); +/** 分页查询回收物额度流水。 */ +async function ledgerList(page: { + index: number; size: number; customerId?: string; recycleItemId?: string; keyword?: string; + bizType?: string; beginAt?: number; endAt?: number; +}): Promise> { + return await axios.post(`${LEDGER_URI}/list`, { ...page, storeId: getCurrentStoreId() || undefined }); +} + +/** 查询回收物额度流水详情。 */ +async function ledgerDetail(id: string): Promise { + return await axios.post(`${LEDGER_URI}/detail`, undefined, { params: { id } }); +} + +/** 查询回收物支付详情。 */ +async function paymentDetail(id: string): Promise { + return await axios.post(`${PAYMENT_URI}/detail`, undefined, { params: { id } }); +} + +/** 按客户分页查询额度流水。 */ +async function accountLedger(customerId: string, index: number, size: number): Promise> { + return await ledgerList({ customerId, index, size }); } /** @@ -143,7 +162,7 @@ async function accountLedger(customerId: string): Promise { * 减少不能超过可用额度;调整只动账面,不代表门店收到实物。 */ async function accountAdjust(request: RecycleAccountAdjustRequest): Promise { - await axios.post(`${ACCOUNT_URI}/adjust`, withCurrentStoreId(request)); + await axios.post(`${LEDGER_URI}/adjust`, withCurrentStoreId(request)); } /** 某 SKU 的回收物产出配置。 */ @@ -260,6 +279,9 @@ export default { accountCustomers, accountItems, accountLedger, + ledgerList, + ledgerDetail, + paymentDetail, accountAdjust, yieldList, yieldProductList, diff --git a/src/assets/styles/global.less b/src/assets/styles/global.less index 8663c51..60e62e1 100644 --- a/src/assets/styles/global.less +++ b/src/assets/styles/global.less @@ -111,7 +111,7 @@ html.theme-dark body { --td-search-square-radius: 1rem; top: -1rem; - margin: -1rem 0 1rem 0; + margin: -1rem 0 0 0; padding: 1rem 1rem 0 1rem; z-index: 10; position: sticky; @@ -156,8 +156,11 @@ html.theme-dark body { -webkit-overflow-scrolling: touch; .t-pull-down-refresh__track { + gap: 1rem; height: auto; + display: flex; min-height: 100%; + flex-direction: column; } &.has-dropdown-menu-navbar { diff --git a/src/pages/customer/CustomerRecycleList.vue b/src/pages/customer/CustomerRecycleList.vue index 8e6092d..7333162 100644 --- a/src/pages/customer/CustomerRecycleList.vue +++ b/src/pages/customer/CustomerRecycleList.vue @@ -1,58 +1,105 @@ + + + diff --git a/src/pages/recycle/RecycleLedgerList.vue b/src/pages/recycle/RecycleLedgerList.vue new file mode 100644 index 0000000..bc59384 --- /dev/null +++ b/src/pages/recycle/RecycleLedgerList.vue @@ -0,0 +1,394 @@ + + + + + diff --git a/src/pages/recycle/RecyclePaymentList.vue b/src/pages/recycle/RecycleOrderPaymentList.vue similarity index 55% rename from src/pages/recycle/RecyclePaymentList.vue rename to src/pages/recycle/RecycleOrderPaymentList.vue index 2a80b79..ed446cc 100644 --- a/src/pages/recycle/RecyclePaymentList.vue +++ b/src/pages/recycle/RecycleOrderPaymentList.vue @@ -1,6 +1,12 @@