From 5b4c1bc991f7a007bc1301e823770914b1607d7d Mon Sep 17 00:00:00 2001 From: wuzilong <704541015@qq.com> Date: Sun, 13 Sep 2026 09:38:23 +0800 Subject: [PATCH] feat(web-admin): add public pound QR page by inventory id Drivers can open a standalone link that renders the shared weighbridge QR card. Co-authored-by: Cursor --- web-admin/src/api/db/public-inventory.ts | 15 ++ web-admin/src/router/routes/staticRoutes.ts | 6 + .../views/public/pl/pound-qrcode/index.vue | 141 ++++++++++++++++++ 3 files changed, 162 insertions(+) create mode 100644 web-admin/src/views/public/pl/pound-qrcode/index.vue diff --git a/web-admin/src/api/db/public-inventory.ts b/web-admin/src/api/db/public-inventory.ts index b930f0b0a..b9bc937fd 100644 --- a/web-admin/src/api/db/public-inventory.ts +++ b/web-admin/src/api/db/public-inventory.ts @@ -19,8 +19,23 @@ export interface PublicInventoryPage { voided: boolean } +export interface PublicPoundQr { + id: string + date?: string + businessType: string + vehicleNo: string + partnerCompany: string + product: string + specification?: string + quantity: number + quantityUnit?: string + remarks?: string +} + export const publicInventoryApi = { getPage: (token: string) => publicPlGet(`/public/db/inventory/${token}`), + getPoundQr: (inventoryId: string) => + publicPlGet(`/public/db/inventory/${inventoryId}/pound-qr`), saveFeedback: ( token: string, data: { siteFeedbackRemark?: string; siteFeedbackImages?: string[] } diff --git a/web-admin/src/router/routes/staticRoutes.ts b/web-admin/src/router/routes/staticRoutes.ts index 33e37c7b1..0e99ad9e2 100644 --- a/web-admin/src/router/routes/staticRoutes.ts +++ b/web-admin/src/router/routes/staticRoutes.ts @@ -111,6 +111,12 @@ export const staticRoutes: AppRouteRecordRaw[] = [ component: () => import('@views/public/pl/outbound/index.vue'), meta: { title: '出库单', isHideTab: true, isPublicMobile: true } }, + { + path: '/public/pl/pound-qrcode/:inventoryId', + name: 'PublicPlPoundQrcode', + component: () => import('@views/public/pl/pound-qrcode/index.vue'), + meta: { title: '磅单二维码', isHideTab: true, isPublicMobile: true } + }, { path: '/public/db/inventory/:token', name: 'PublicDbInventorySite', diff --git a/web-admin/src/views/public/pl/pound-qrcode/index.vue b/web-admin/src/views/public/pl/pound-qrcode/index.vue new file mode 100644 index 000000000..351d45787 --- /dev/null +++ b/web-admin/src/views/public/pl/pound-qrcode/index.vue @@ -0,0 +1,141 @@ + + + + +