From 728ed397c8c746fbcb15195f95b68aab6777e4bf Mon Sep 17 00:00:00 2001 From: zzh <1368735060@qq.com> Date: Sat, 7 Nov 2026 12:33:54 +0800 Subject: [PATCH 01/11] =?UTF-8?q?feat:=20=E5=AE=98=E7=BD=91=E8=B7=91?= =?UTF-8?q?=E9=81=93=E9=A6=96=E9=A1=B5=E3=80=81=E6=94=B6=E6=AC=BE=E7=A0=81?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=8E=20H5=20=E7=AE=A1=E7=90=86=E5=A2=9E?= =?UTF-8?q?=E5=BC=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- index.html | 15 +- package.json | 4 +- pnpm-lock.yaml | 327 ++-------- src/api/customer/index.ts | 2 + src/api/system/otherConfig.ts | 24 + src/components.d.ts | 1 + src/components/customer-side-rail/index.vue | 7 +- src/components/h5/H5ScanInput.vue | 493 +++++++++++++++ src/constants/pageButtonCatalog.ts | 1 + src/locale/en-US.ts | 11 + src/locale/zh-CN.ts | 10 + src/router/index.ts | 56 ++ src/utils/auth-keepalive.ts | 17 +- src/utils/auth-session-expired.ts | 30 +- src/utils/paymentReceiveQr.ts | 25 + .../h5/admin-center/components/AppTabBar.vue | 103 ++- .../admin-center/components/H5OpsHubSheet.vue | 251 ++++++++ src/views/h5/admin-center/customers/index.vue | 497 +++++++++++++++ src/views/h5/admin-center/layout.vue | 14 +- src/views/h5/admin-center/locale/en-US.ts | 42 ++ src/views/h5/admin-center/locale/zh-CN.ts | 42 ++ src/views/h5/admin-center/login/index.vue | 1 + src/views/h5/admin-center/monitor/index.vue | 14 +- .../h5/admin-center/ops/H5OpsPageHeader.vue | 288 +++++++++ .../h5/admin-center/ops/fulfill-pack.vue | 309 +++++++++ src/views/h5/admin-center/ops/inbound.vue | 285 +++++++++ src/views/h5/admin-center/ops/ops-shared.less | 181 ++++++ src/views/h5/admin-center/ops/outbound.vue | 275 ++++++++ .../h5/admin-center/ops/parcel-arrival.vue | 175 ++++++ src/views/h5/admin-center/styles/tokens.less | 16 +- src/views/h5/admin-center/workplace/index.vue | 64 +- .../h5/customer-center/assistant/index.vue | 34 +- .../components/H5GuestAuthCta.vue | 120 ++++ .../components/H5RechargeSheet.vue | 13 +- src/views/h5/customer-center/layout.vue | 9 + src/views/h5/customer-center/locale/en-US.ts | 27 +- src/views/h5/customer-center/locale/zh-CN.ts | 27 +- src/views/h5/customer-center/login/index.vue | 1 + src/views/h5/customer-center/me/index.vue | 204 +++--- src/views/h5/customer-center/orders/index.vue | 18 +- src/views/h5/customer-center/price/index.vue | 28 +- .../workplace/components/AdminOpsQueue.vue | 3 +- .../workplace/components/AdminWorkplace.vue | 2 +- .../placeOrder/declarationColumnConfig.ts | 4 + src/views/order/placeOrder/index.vue | 75 ++- src/views/site/GradientWaves.vue | 559 ----------------- src/views/site/SiteAdvisorShell.vue | 67 +- src/views/site/SiteDotGrid.vue | 293 +++++++++ src/views/site/SiteFeaturedRoutes.vue | 304 +++++++++ src/views/site/SiteRunway.vue | 330 ++++++++++ src/views/site/index.vue | 81 +-- src/views/site/lib/portal-catalog.ts | 62 +- src/views/site/lib/site-liquid-glass.ts | 231 ------- src/views/site/lib/site-style-lifecycle.ts | 43 ++ src/views/site/lib/site-welcome.ts | 12 + src/views/site/styles/ai-advisor.css | 585 ++++++++++++++---- src/views/system/otherConfig/index.vue | 181 ++++++ src/views/user/recharge/deposit.vue | 15 +- vite.config.ts | 2 + 59 files changed, 5330 insertions(+), 1580 deletions(-) create mode 100644 src/components/h5/H5ScanInput.vue create mode 100644 src/utils/paymentReceiveQr.ts create mode 100644 src/views/h5/admin-center/components/H5OpsHubSheet.vue create mode 100644 src/views/h5/admin-center/customers/index.vue create mode 100644 src/views/h5/admin-center/ops/H5OpsPageHeader.vue create mode 100644 src/views/h5/admin-center/ops/fulfill-pack.vue create mode 100644 src/views/h5/admin-center/ops/inbound.vue create mode 100644 src/views/h5/admin-center/ops/ops-shared.less create mode 100644 src/views/h5/admin-center/ops/outbound.vue create mode 100644 src/views/h5/admin-center/ops/parcel-arrival.vue create mode 100644 src/views/h5/customer-center/components/H5GuestAuthCta.vue delete mode 100644 src/views/site/GradientWaves.vue create mode 100644 src/views/site/SiteDotGrid.vue create mode 100644 src/views/site/SiteFeaturedRoutes.vue create mode 100644 src/views/site/SiteRunway.vue delete mode 100644 src/views/site/lib/site-liquid-glass.ts create mode 100644 src/views/site/lib/site-style-lifecycle.ts diff --git a/index.html b/index.html index 3f1593d..430eeb1 100644 --- a/index.html +++ b/index.html @@ -55,6 +55,8 @@ } var isH5 = isH5Path; + var isAdminH5 = + path === '/h5/admin' || path.indexOf('/h5/admin/') === 0; var isEn = false; var pageBg = '#f0f3f4'; try { @@ -75,11 +77,16 @@ root.style.setProperty('--ai-bg', pageBg); root.style.setProperty('--ai-canvas', pageBg); try { - document.title = isH5 + /* 运营端 /h5/admin 勿复用客户中心标题,避免浏览器顶栏串文案 */ + document.title = isAdminH5 ? isEn - ? 'IDE Customer Center' - : 'IDE客户中心' - : 'IDE I Faster & Simpler'; + ? 'IDE Ops Center' + : 'IDE运营中心' + : isH5 + ? isEn + ? 'IDE Customer Center' + : 'IDE客户中心' + : 'IDE I Faster & Simpler'; } catch (e2) {} if (path === '/login') { var plane = document.createElement('link'); diff --git a/package.json b/package.json index 236349f..49ebd27 100644 --- a/package.json +++ b/package.json @@ -48,11 +48,10 @@ "@codemirror/state": "^6.5.4", "@codemirror/theme-one-dark": "^6.1.3", "@codemirror/view": "^6.39.17", - "@fontsource/zcool-qingke-huangyou": "^5.3.0", - "@glass-sdk/liquid-glass": "~0.0.2", "@handsontable/vue3": "^16.2.0", "@types/lodash-es": "^4.17.12", "@vueuse/core": "^9.3.0", + "@zxing/browser": "^0.2.1", "axios": "^0.24.0", "codemirror": "^6.0.2", "dayjs": "^1.11.5", @@ -68,7 +67,6 @@ "mermaid": "^11.16.0", "mitt": "^3.0.0", "nprogress": "^0.2.0", - "ogl": "^1.0.11", "pinia": "^2.0.23", "qrcode": "^1.5.4", "query-string": "^8.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8ca5495..9130bea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,12 +36,6 @@ importers: '@codemirror/view': specifier: ^6.39.17 version: 6.39.17 - '@fontsource/zcool-qingke-huangyou': - specifier: ^5.3.0 - version: 5.3.0 - '@glass-sdk/liquid-glass': - specifier: ~0.0.2 - version: 0.0.2(react-dom@19.3.1(react@19.3.1))(react@19.3.1) '@handsontable/vue3': specifier: ^16.2.0 version: 16.2.0(handsontable@16.2.0)(vue@3.5.18(typescript@4.9.5)) @@ -51,6 +45,9 @@ importers: '@vueuse/core': specifier: ^9.3.0 version: 9.13.0(vue@3.5.18(typescript@4.9.5)) + '@zxing/browser': + specifier: ^0.2.1 + version: 0.2.1(@zxing/library@0.23.0) axios: specifier: ^0.24.0 version: 0.24.0 @@ -96,9 +93,6 @@ importers: nprogress: specifier: ^0.2.0 version: 0.2.0 - ogl: - specifier: ^1.0.11 - version: 1.0.11 pinia: specifier: ^2.0.23 version: 2.3.1(typescript@4.9.5)(vue@3.5.18(typescript@4.9.5)) @@ -446,9 +440,6 @@ packages: resolution: {integrity: sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==} engines: {node: '>=6.9.0'} - '@babel/runtime@8.1.0': - resolution: {integrity: sha512-MQye/pU7gzXerMzlhScFNH1u4Je6rR8cqJWSgAfD+rIwbbtwG8tVDegoI7sWfcXkfVRW09G7vk2vjxGIuKFfwg==} - '@babel/template@7.27.2': resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==} engines: {node: '>=6.9.0'} @@ -461,33 +452,6 @@ packages: resolution: {integrity: sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==} engines: {node: '>=6.9.0'} - '@base-ui/react@1.9.0': - resolution: {integrity: sha512-S8CSYosASBKtpL8SWUfS78rFElfLijiCgA7oHOK22jCJ95FULsYyKwBNFOgudt0RA+/7yNc7F81bOvQnRgbBiQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - '@date-fns/tz': ^1.2.0 - '@types/react': ^17 || ^18 || ^19 - date-fns: ^4.0.0 - react: ^17 || ^18 || ^19 - react-dom: ^17 || ^18 || ^19 - peerDependenciesMeta: - '@date-fns/tz': - optional: true - '@types/react': - optional: true - date-fns: - optional: true - - '@base-ui/utils@0.5.0': - resolution: {integrity: sha512-dYGGcEttjkYiMoa5nHm8vLaJ2UcuTWxo3BFAwOYXeRg/q7UVVvA6cacEIXEs3FgBfK1CGtW1ptElqs7wsx+t9A==} - peerDependencies: - '@types/react': ^17 || ^18 || ^19 - react: ^17 || ^18 || ^19 - react-dom: ^17 || ^18 || ^19 - peerDependenciesMeta: - '@types/react': - optional: true - '@braintree/sanitize-url@7.1.2': resolution: {integrity: sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==} @@ -962,36 +926,12 @@ packages: '@floating-ui/core@1.7.4': resolution: {integrity: sha512-C3HlIdsBxszvm5McXlB8PeOEWfBhcGBTZGkGlWc2U0KFY5IwG5OQEuQ8rq52DZmcHDlPLd+YFBK+cZcytwIFWg==} - '@floating-ui/core@1.8.0': - resolution: {integrity: sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==} - '@floating-ui/dom@1.7.5': resolution: {integrity: sha512-N0bD2kIPInNHUHehXhMke1rBGs1dwqvC9O9KYMyyjK7iXt7GAhnro7UlcuYcGdS/yYOlq0MAVgrow8IbWJwyqg==} - '@floating-ui/dom@1.8.0': - resolution: {integrity: sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==} - - '@floating-ui/react-dom@2.1.9': - resolution: {integrity: sha512-JDjEFGCpImxDCA7JJKviA0M9+RtmJdj0m/NVU5IMgBK+AmZouAQQ7/+2GLH0GXXY0YMw9oXPB8hKdbPYg5QLYg==} - peerDependencies: - react: '>=16.8.0' - react-dom: '>=16.8.0' - '@floating-ui/utils@0.2.10': resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==} - '@floating-ui/utils@0.2.12': - resolution: {integrity: sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==} - - '@fontsource/zcool-qingke-huangyou@5.3.0': - resolution: {integrity: sha512-6/ld8x/knq1NjDQxLSyg9pDnBPOmtWDb30ZTFk+n8OxfkBoUvPAxh3aV/6+UFGmA5CekJfcgpUwd2/x/weLvSQ==} - - '@glass-sdk/liquid-glass@0.0.2': - resolution: {integrity: sha512-bDVDBXj6Cw++U0k9fcrSPEexnVnj/S4BjxF1t7NVQqW8La1gSVtxzPl9dG2VQxKs7Ik9kWR8Zi32JzyggI5Seg==} - peerDependencies: - react: '>=19.0.0' - react-dom: '>=19.0.0' - '@handsontable/pikaday@1.0.0': resolution: {integrity: sha512-1VN6N38t5/DcjJ7y7XUYrDx1LuzvvzlrFdBdMG90Qo1xc8+LXHqbWbsTEm5Ec5gXTEbDEO53vUT35R+2COmOyg==} @@ -1081,24 +1021,12 @@ packages: '@lezer/xml@1.0.6': resolution: {integrity: sha512-CdDwirL0OEaStFue/66ZmFSeppuL6Dwjlk8qk153mSQwiSH/Dlri4GNymrNWnUmPl2Um7QfV1FO9KFUyX3Twww==} - '@lisse/core@0.7.3': - resolution: {integrity: sha512-WJWGskrOInlIs+DqK1CfAHNIjWBJ8t4AtM1cPn5RZfu2OmQumBdNGAhFuaIg+tgpibqP17GSwEiMq/fT+NCoIw==} - engines: {node: '>=18'} - '@marijn/find-cluster-break@1.0.2': resolution: {integrity: sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==} '@mermaid-js/parser@1.2.0': resolution: {integrity: sha512-oYPyv8A4As1yH5Bx+04iQEQxXuIQDe0GKCNSRgao6z8AM9jixXIfP0vsppRLvGf+nKIOb9/LdpWA4YuJiVvESA==} - '@modelcontextprotocol/core@2.0.0': - resolution: {integrity: sha512-pJCEwGG7Lfr/+PQp9ZTwKXNeO5wzbfKL7H3MYpCorM4oFBoQrdjnBgEoqG+RjhsvS1FKrDbKux+M1HhlnGWqcA==} - engines: {node: '>=20'} - - '@modelcontextprotocol/server@2.0.0': - resolution: {integrity: sha512-YhHWdHfpFMQfd0prsEnxKeS3Qz3ytIGmsS0sth4KDjnacIT7hxk6hXHkJ9KysxlkvTM+WZAtQbbcUhdoP4Hvtw==} - engines: {node: '>=20'} - '@mrmlnc/readdir-enhanced@2.2.1': resolution: {integrity: sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==} engines: {node: '>=4'} @@ -1907,26 +1835,6 @@ packages: '@upsetjs/venn.js@2.0.0': resolution: {integrity: sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==} - '@vgpu/adapter-mock@0.5.0': - resolution: {integrity: sha512-YtgXOFn1qI+8oTJenG2wWbQPA28V0CfE5UJs5Xqbt6qyR/xaZ5LHH2XWTwFcjnqn2b1xQCyTatJCMyyOdweUnw==} - - '@vgpu/adapter-node@0.5.0': - resolution: {integrity: sha512-lgzqFcLDejwRgwlaNStzkwLNU9b4aN2OoPpWqT1UyPmK521BSw2OIQKzAuDIkzNlREla6KNC12G6bthhOzZKzw==} - - '@vgpu/core@0.5.0': - resolution: {integrity: sha512-z80DHRHViv6+FKKkPzggEtT1ZZs/WCKRQbzJuwYdA135DZaSbCMoRK4anhM+I/nOHuDpf7H3xjkwE6rfolWZUw==} - - '@vgpu/wgsl-std@0.5.0': - resolution: {integrity: sha512-NjMyJxwy4evFNCSqFQy4EqAbZ7iU+NUyJYyG9tLUhbdDLzBmfZlk1S3PyRZ9olBFFfEiVW2JNVw10maPKLEs1A==} - - '@vgpu/wgsl@0.5.0': - resolution: {integrity: sha512-PDlDJem7J28C9bk+vPy2kYZEoW8+nYIx2oN4nu7/WF2V7ETx32BtmWcawwMbhiu/CVsobFafML0h0eqLRBNa3Q==} - peerDependencies: - '@vgpu/adapter-node': '>=0.1.6 <1.0.0 || ^0.5.0-rc.0' - peerDependenciesMeta: - '@vgpu/adapter-node': - optional: true - '@vitejs/plugin-vue-jsx@2.1.1': resolution: {integrity: sha512-JgDhxstQlwnHBvZ1BSnU5mbmyQ14/t5JhREc6YH5kWyu2QdAAOsLF6xgHoIWarj8tddaiwFrNzLbWJPudpXKYA==} engines: {node: ^14.18.0 || >=16.0.0} @@ -2033,9 +1941,6 @@ packages: '@vueuse/shared@9.13.0': resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==} - '@webgpu/types@0.1.74': - resolution: {integrity: sha512-lgiI4hbuLcI9unnm2cL/tvCaQU45dp0xcLWJh5uB/9MBGvIA4F8XIk7nSiBeg+K4xWGYwgZKn80LmERI5CxoTA==} - '@wtto00/html2canvas@1.4.3': resolution: {integrity: sha512-jwsb+xL8N+gjrSNABSaFdxmWtE4c7RNFjP20lo1G7gs63Qqo1phhxVBTzxc/apDVh6LgXsU2l5bwKtXd9uz65w==} engines: {node: '>=8.0.0'} @@ -2043,6 +1948,18 @@ packages: '@zumer/snapdom@2.0.2': resolution: {integrity: sha512-W6quT4lMcPu8Q9O/Q6witSfc6/+xuY8C8yDoHug/+o7zYKCNE/e0I3//XsWDkyq9C0mDE0TAWF/8bwCR7x3gHQ==} + '@zxing/browser@0.2.1': + resolution: {integrity: sha512-92pVfVDUXbc15xu9vIEmhNyqIEASMEkDF92CwT6T+7sg2EHXJRktH9CQKoQSXe51UtbNsj+Fm09H/JBWHMs/Sw==} + peerDependencies: + '@zxing/library': ^0.23.0 + + '@zxing/library@0.23.0': + resolution: {integrity: sha512-6fkkoFwP8CHxl6ugnPsj74PLJgX2iRv5zczGAyt5OBzQgxFhuhF0NCEc4t4OvSr8xAv2MRLlI0Iu9ZGDZQ2urA==} + engines: {node: '>= 24.0.0'} + + '@zxing/text-encoding@0.9.0': + resolution: {integrity: sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==} + JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true @@ -5277,9 +5194,6 @@ packages: ofetch@1.4.1: resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} - ogl@1.0.11: - resolution: {integrity: sha512-kUpC154AFfxi16pmZUK4jk3J+8zxwTWGPo03EoYA8QPbzikHoaC82n6pNTbd+oEaJonaE8aPWBlX7ad9zrqLsA==} - once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -5558,10 +5472,6 @@ packages: resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} engines: {node: '>=0.10.0'} - pixelmatch@7.2.0: - resolution: {integrity: sha512-xhcb4yHu9sM/G7foGzoLtXYcC0zHEaOXXjRKhGup0fw78Nf2Tkiapv4EQyMzrbcmQPsllAI7DbFY2UT7PlI9Pg==} - hasBin: true - pkg-types@1.3.1: resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} @@ -5572,10 +5482,6 @@ packages: resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} engines: {node: '>=10.13.0'} - pngjs@7.0.0: - resolution: {integrity: sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==} - engines: {node: '>=14.19.0'} - pngquant-bin@6.0.1: resolution: {integrity: sha512-Q3PUyolfktf+hYio6wsg3SanQzEU/v8aICg/WpzxXcuCMRb7H2Q81okfpcEztbMvw25ILjd3a87doj2N9kvbpQ==} engines: {node: '>=10'} @@ -5776,15 +5682,6 @@ packages: raf@3.4.1: resolution: {integrity: sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==} - react-dom@19.3.1: - resolution: {integrity: sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==} - peerDependencies: - react: ^19.3.1 - - react@19.3.1: - resolution: {integrity: sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==} - engines: {node: '>=0.10.0'} - read-pkg-up@1.0.1: resolution: {integrity: sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==} engines: {node: '>=0.10.0'} @@ -5897,9 +5794,6 @@ packages: require-main-filename@2.0.0: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - reselect@5.3.0: - resolution: {integrity: sha512-XGoLeRAVzUTcJ1qkxPQhDJyIZ5d6zzZD9nT7AEZOaaU9UbWclhycElmhO+VD5bFeLuzhPBaOV2oXC8uG35ZSpg==} - reserved-words@0.1.2: resolution: {integrity: sha512-0S5SrIUJ9LfpbVl4Yzij6VipUdafHrOTzvmfazSw/jeZrZtQK303OPZW+obtkaw7jQlTQppy0UvZWm9872PbRw==} @@ -6153,9 +6047,6 @@ packages: sax@1.4.1: resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} - scheduler@0.28.0: - resolution: {integrity: sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==} - screenfull@5.2.0: resolution: {integrity: sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==} engines: {node: '>=0.10.0'} @@ -6800,6 +6691,10 @@ packages: trough@1.0.5: resolution: {integrity: sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==} + ts-custom-error@3.3.1: + resolution: {integrity: sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==} + engines: {node: '>=14.0.0'} + ts-dedent@2.3.0: resolution: {integrity: sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==} engines: {node: '>=6.10'} @@ -7031,11 +6926,6 @@ packages: resolution: {integrity: sha512-0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A==} engines: {node: '>= 4'} - use-sync-external-store@1.7.0: - resolution: {integrity: sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - use@3.1.1: resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} engines: {node: '>=0.10.0'} @@ -7083,15 +6973,6 @@ packages: resolution: {integrity: sha512-KoJRp8V2EsmeW2pg33CVEOEfGDTmcVLL0wk0fOQJjgXfAunciPylOueKovuzlbWSrTQap1UzgNn8xr5zbBsnPA==} engines: {node: '>=18.18.0'} - vgpu@0.5.0: - resolution: {integrity: sha512-isQfMHRTysYFfT8UWTzqQI/ROw2L7lVkj7xoUJlvIF6FjYxBNS/YNG7qp3tZ7ZvZZ3uwYjso+geQv/bEq5Hl3w==} - hasBin: true - peerDependencies: - three: '>=0.180.0 <0.200.0' - peerDependenciesMeta: - three: - optional: true - vite-plugin-compression@0.5.1: resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==} peerDependencies: @@ -7278,18 +7159,12 @@ packages: w3c-keyname@2.2.8: resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} - webgpu@0.4.0: - resolution: {integrity: sha512-F5pimn3Aoi0zWjuRdiVs5TnrUwSzD2lESBohsIUsqyitWkGRQlXU2fhV6ycXlQTa1bvAf3sjqiUpBEpmSQ5ptA==} - webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} webpack-virtual-modules@0.6.2: resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} - wgpu-matrix@3.4.2: - resolution: {integrity: sha512-IfZFbG7olEYBD76VCZy2TzqM57GKy3LT++AZh37tMHPPByO6R2h61zXGBZFNPi2IzxNivNi8y5dvze5PjaczjA==} - whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} @@ -7457,9 +7332,6 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - zod@4.6.7: - resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==} - zrender@5.6.1: resolution: {integrity: sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==} @@ -7652,8 +7524,6 @@ snapshots: '@babel/runtime@7.28.6': {} - '@babel/runtime@8.1.0': {} - '@babel/template@7.27.2': dependencies: '@babel/code-frame': 7.27.1 @@ -7677,25 +7547,6 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 - '@base-ui/react@1.9.0(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': - dependencies: - '@babel/runtime': 8.1.0 - '@base-ui/utils': 0.5.0(react-dom@19.3.1(react@19.3.1))(react@19.3.1) - '@floating-ui/react-dom': 2.1.9(react-dom@19.3.1(react@19.3.1))(react@19.3.1) - '@floating-ui/utils': 0.2.12 - react: 19.3.1 - react-dom: 19.3.1(react@19.3.1) - use-sync-external-store: 1.7.0(react@19.3.1) - - '@base-ui/utils@0.5.0(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': - dependencies: - '@babel/runtime': 8.1.0 - '@floating-ui/utils': 0.2.12 - react: 19.3.1 - react-dom: 19.3.1(react@19.3.1) - reselect: 5.3.0 - use-sync-external-store: 1.7.0(react@19.3.1) - '@braintree/sanitize-url@7.1.2': {} '@bufbuild/protobuf@2.10.1': {} @@ -8111,46 +7962,13 @@ snapshots: dependencies: '@floating-ui/utils': 0.2.10 - '@floating-ui/core@1.8.0': - dependencies: - '@floating-ui/utils': 0.2.12 - '@floating-ui/dom@1.7.5': dependencies: '@floating-ui/core': 1.7.4 '@floating-ui/utils': 0.2.10 - '@floating-ui/dom@1.8.0': - dependencies: - '@floating-ui/core': 1.8.0 - '@floating-ui/utils': 0.2.12 - - '@floating-ui/react-dom@2.1.9(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': - dependencies: - '@floating-ui/dom': 1.8.0 - react: 19.3.1 - react-dom: 19.3.1(react@19.3.1) - '@floating-ui/utils@0.2.10': {} - '@floating-ui/utils@0.2.12': {} - - '@fontsource/zcool-qingke-huangyou@5.3.0': {} - - '@glass-sdk/liquid-glass@0.0.2(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': - dependencies: - '@base-ui/react': 1.9.0(react-dom@19.3.1(react@19.3.1))(react@19.3.1) - '@lisse/core': 0.7.3 - react: 19.3.1 - react-dom: 19.3.1(react@19.3.1) - vgpu: 0.5.0 - transitivePeerDependencies: - - '@date-fns/tz' - - '@types/react' - - date-fns - - supports-color - - three - '@handsontable/pikaday@1.0.0': {} '@handsontable/vue3@16.2.0(handsontable@16.2.0)(vue@3.5.18(typescript@4.9.5))': @@ -8265,23 +8083,12 @@ snapshots: '@lezer/highlight': 1.2.3 '@lezer/lr': 1.4.8 - '@lisse/core@0.7.3': {} - '@marijn/find-cluster-break@1.0.2': {} '@mermaid-js/parser@1.2.0': dependencies: '@chevrotain/types': 11.1.2 - '@modelcontextprotocol/core@2.0.0': - dependencies: - zod: 4.6.7 - - '@modelcontextprotocol/server@2.0.0': - dependencies: - '@modelcontextprotocol/core': 2.0.0 - zod: 4.6.7 - '@mrmlnc/readdir-enhanced@2.2.1': dependencies: call-me-maybe: 1.0.2 @@ -9105,33 +8912,6 @@ snapshots: d3-selection: 3.0.0 d3-transition: 3.0.1(d3-selection@3.0.0) - '@vgpu/adapter-mock@0.5.0(@vgpu/adapter-node@0.5.0)': - dependencies: - '@vgpu/core': 0.5.0(@vgpu/adapter-node@0.5.0) - transitivePeerDependencies: - - '@vgpu/adapter-node' - - '@vgpu/adapter-node@0.5.0': - dependencies: - '@vgpu/core': 0.5.0(@vgpu/adapter-node@0.5.0) - webgpu: 0.4.0 - transitivePeerDependencies: - - supports-color - - '@vgpu/core@0.5.0(@vgpu/adapter-node@0.5.0)': - dependencies: - '@vgpu/wgsl': 0.5.0(@vgpu/adapter-node@0.5.0) - transitivePeerDependencies: - - '@vgpu/adapter-node' - - '@vgpu/wgsl-std@0.5.0': {} - - '@vgpu/wgsl@0.5.0(@vgpu/adapter-node@0.5.0)': - dependencies: - '@vgpu/wgsl-std': 0.5.0 - optionalDependencies: - '@vgpu/adapter-node': 0.5.0 - '@vitejs/plugin-vue-jsx@2.1.1(vite@6.3.5(@types/node@20.5.1)(jiti@1.21.7)(less@4.4.0)(sass-embedded@1.93.3)(sass@1.93.3)(sugarss@2.0.0)(tsx@4.20.3))(vue@3.5.18(typescript@4.9.5))': dependencies: '@babel/core': 7.28.0 @@ -9315,8 +9095,6 @@ snapshots: - '@vue/composition-api' - vue - '@webgpu/types@0.1.74': {} - '@wtto00/html2canvas@1.4.3': dependencies: css-line-break: 2.1.0 @@ -9324,6 +9102,21 @@ snapshots: '@zumer/snapdom@2.0.2': {} + '@zxing/browser@0.2.1(@zxing/library@0.23.0)': + dependencies: + '@zxing/library': 0.23.0 + optionalDependencies: + '@zxing/text-encoding': 0.9.0 + + '@zxing/library@0.23.0': + dependencies: + ts-custom-error: 3.3.1 + optionalDependencies: + '@zxing/text-encoding': 0.9.0 + + '@zxing/text-encoding@0.9.0': + optional: true + JSONStream@1.3.5: dependencies: jsonparse: 1.3.1 @@ -12918,8 +12711,6 @@ snapshots: node-fetch-native: 1.6.6 ufo: 1.6.1 - ogl@1.0.11: {} - once@1.4.0: dependencies: wrappy: 1.0.2 @@ -13158,10 +12949,6 @@ snapshots: pinkie@2.0.4: {} - pixelmatch@7.2.0: - dependencies: - pngjs: 7.0.0 - pkg-types@1.3.1: dependencies: confbox: 0.1.8 @@ -13176,8 +12963,6 @@ snapshots: pngjs@5.0.0: {} - pngjs@7.0.0: {} - pngquant-bin@6.0.1: dependencies: bin-build: 3.0.0 @@ -13362,13 +13147,6 @@ snapshots: dependencies: performance-now: 2.1.0 - react-dom@19.3.1(react@19.3.1): - dependencies: - react: 19.3.1 - scheduler: 0.28.0 - - react@19.3.1: {} - read-pkg-up@1.0.1: dependencies: find-up: 1.1.2 @@ -13533,8 +13311,6 @@ snapshots: require-main-filename@2.0.0: {} - reselect@5.3.0: {} - reserved-words@0.1.2: {} resize-detector@0.3.0: {} @@ -13777,8 +13553,6 @@ snapshots: sax@1.4.1: optional: true - scheduler@0.28.0: {} - screenfull@5.2.0: {} scroll-into-view-if-needed@2.2.31: @@ -14544,6 +14318,8 @@ snapshots: trough@1.0.5: {} + ts-custom-error@3.3.1: {} + ts-dedent@2.3.0: {} ts-node@10.9.2(@types/node@20.5.1)(typescript@4.9.5): @@ -14854,10 +14630,6 @@ snapshots: url-to-options@1.0.1: {} - use-sync-external-store@1.7.0(react@19.3.1): - dependencies: - react: 19.3.1 - use@3.1.1: {} util-deprecate@1.0.2: {} @@ -14928,22 +14700,6 @@ snapshots: - typescript - utf-8-validate - vgpu@0.5.0: - dependencies: - '@modelcontextprotocol/server': 2.0.0 - '@vgpu/adapter-mock': 0.5.0(@vgpu/adapter-node@0.5.0) - '@vgpu/adapter-node': 0.5.0 - '@vgpu/core': 0.5.0(@vgpu/adapter-node@0.5.0) - '@vgpu/wgsl': 0.5.0(@vgpu/adapter-node@0.5.0) - '@vgpu/wgsl-std': 0.5.0 - '@webgpu/types': 0.1.74 - pixelmatch: 7.2.0 - pngjs: 7.0.0 - wgpu-matrix: 3.4.2 - zod: 4.6.7 - transitivePeerDependencies: - - supports-color - vite-plugin-compression@0.5.1(vite@6.3.5(@types/node@20.5.1)(jiti@1.21.7)(less@4.4.0)(sass-embedded@1.93.3)(sass@1.93.3)(sugarss@2.0.0)(tsx@4.20.3)): dependencies: chalk: 4.1.2 @@ -15157,19 +14913,10 @@ snapshots: w3c-keyname@2.2.8: {} - webgpu@0.4.0: - dependencies: - '@webgpu/types': 0.1.74 - debug: 4.4.1 - transitivePeerDependencies: - - supports-color - webidl-conversions@3.0.1: {} webpack-virtual-modules@0.6.2: {} - wgpu-matrix@3.4.2: {} - whatwg-url@5.0.0: dependencies: tr46: 0.0.3 @@ -15349,8 +15096,6 @@ snapshots: yocto-queue@0.1.0: {} - zod@4.6.7: {} - zrender@5.6.1: dependencies: tslib: 2.3.0 diff --git a/src/api/customer/index.ts b/src/api/customer/index.ts index 6cd2dd8..0a981bf 100644 --- a/src/api/customer/index.ts +++ b/src/api/customer/index.ts @@ -59,6 +59,8 @@ export interface CustomerListParams { salesman?: string customerService?: string agentId?: number + /** 监控 KPI 下钻:total / newToday / online / inactive7d */ + monitorScope?: 'total' | 'newToday' | 'online' | 'inactive7d' | string sortField?: string sortOrder?: string } diff --git a/src/api/system/otherConfig.ts b/src/api/system/otherConfig.ts index 16cd138..41b8161 100644 --- a/src/api/system/otherConfig.ts +++ b/src/api/system/otherConfig.ts @@ -52,6 +52,30 @@ export async function deleteSystemOtherConfig(id: number | string) { assertBusinessOk(res.data) } +export type PaymentReceiveQrChannel = 'alipay' | 'wechat' + +export interface PaymentReceiveQrDto { + alipayUrl?: string + wechatUrl?: string +} + +/** 获取充值收款码(支付宝 / 微信)可访问地址 */ +export async function getPaymentReceiveQr() { + const res = await axiosInstance.get(omsUrl('/system/other-config/payment-qr')) + return unwrapData(res.data) +} + +/** 上传并替换充值收款码图片 */ +export async function uploadPaymentReceiveQr(channel: PaymentReceiveQrChannel, file: File) { + const form = new FormData() + form.append('channel', channel) + form.append('file', file) + const res = await axiosInstance.post(omsUrl('/system/other-config/payment-qr/upload'), form, { + headers: { 'Content-Type': 'multipart/form-data' }, + }) + return unwrapData(res.data) +} + /** 轨迹服务默认配置编码 */ export const TRACK_SERVICE_CONFIG_CODE = 'track_service' diff --git a/src/components.d.ts b/src/components.d.ts index a07ad97..5637a3b 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -30,6 +30,7 @@ declare module 'vue' { FormWrapper: typeof import('./components/global-setting/form-wrapper.vue')['default'] GlobalSetting: typeof import('./components/global-setting/index.vue')['default'] GuideAudienceTabs: typeof import('./components/GuideAudienceTabs/index.vue')['default'] + H5ScanInput: typeof import('./components/h5/H5ScanInput.vue')['default'] HandsontablePro: typeof import('./components/HandsontablePro/index.vue')['default'] HeaderFilterPopover: typeof import('./components/HandsontablePro/HeaderFilterPopover.vue')['default'] InterfaceDetail: typeof import('./components/InterfaceDetail/index.vue')['default'] diff --git a/src/components/customer-side-rail/index.vue b/src/components/customer-side-rail/index.vue index c191120..266075f 100644 --- a/src/components/customer-side-rail/index.vue +++ b/src/components/customer-side-rail/index.vue @@ -827,9 +827,6 @@ onUnmounted(() => { box-shadow 0.14s ease; &.is-account-active { - background: color-mix(in srgb, var(--app-primary-color, #1d7281) 12%, #fff); - box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app-primary-color, #1d7281) 18%, transparent); - :deep(.user-dropdown-trigger) { color: var(--app-primary-color, rgb(var(--primary-6))); } @@ -1020,8 +1017,8 @@ onUnmounted(() => { box-shadow: none; &.is-account-active { - background: color-mix(in srgb, var(--app-primary-color, #1d7281) 12%, #fff); - box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app-primary-color, #1d7281) 18%, transparent); + background: transparent; + box-shadow: none; } } diff --git a/src/components/h5/H5ScanInput.vue b/src/components/h5/H5ScanInput.vue new file mode 100644 index 0000000..6fc84ca --- /dev/null +++ b/src/components/h5/H5ScanInput.vue @@ -0,0 +1,493 @@ + + + + + + + diff --git a/src/constants/pageButtonCatalog.ts b/src/constants/pageButtonCatalog.ts index 7dfd45d..69bd4e8 100644 --- a/src/constants/pageButtonCatalog.ts +++ b/src/constants/pageButtonCatalog.ts @@ -1073,6 +1073,7 @@ const CORE_GROUPS: PageButtonGroup[] = [ { code: 'Create', name: '新增' }, { code: 'Update', name: '修改' }, { code: 'Delete', name: '删除' }, + { code: 'PaymentQr', name: '收款码' }, ]), B('System.BatchEmail', [ { code: 'System.BatchEmail.Use', name: '使用' }, diff --git a/src/locale/en-US.ts b/src/locale/en-US.ts index 513f5c0..878d5ca 100644 --- a/src/locale/en-US.ts +++ b/src/locale/en-US.ts @@ -3929,6 +3929,17 @@ export default { 'system.otherConfig.actions.edit': 'Edit', 'system.otherConfig.actions.delete': 'Delete', 'system.otherConfig.actions.refresh': 'Refresh', + 'system.otherConfig.actions.paymentQr': 'Payment QR', + 'system.otherConfig.paymentQr.title': 'Deposit Payment QR', + 'system.otherConfig.paymentQr.tip': + 'Shown on PC/H5 deposit pages. Changes take effect immediately; default images are used when empty.', + 'system.otherConfig.paymentQr.alipay': 'Alipay', + 'system.otherConfig.paymentQr.wechat': 'WeChat', + 'system.otherConfig.paymentQr.replace': 'Replace', + 'system.otherConfig.paymentQr.empty': 'Not uploaded', + 'system.otherConfig.paymentQr.uploadSuccess': 'Payment QR updated', + 'system.otherConfig.paymentQr.uploadFailed': 'Upload failed', + 'system.otherConfig.paymentQr.loadFailed': 'Failed to load payment QR', 'system.otherConfig.status.enabled': 'Enabled', 'system.otherConfig.status.disabled': 'Disabled', 'system.otherConfig.table.configCode': 'Config Code', diff --git a/src/locale/zh-CN.ts b/src/locale/zh-CN.ts index 9002781..f12292e 100644 --- a/src/locale/zh-CN.ts +++ b/src/locale/zh-CN.ts @@ -3951,6 +3951,16 @@ export default { 'system.otherConfig.actions.edit': '修改', 'system.otherConfig.actions.delete': '删除', 'system.otherConfig.actions.refresh': '刷新', + 'system.otherConfig.actions.paymentQr': '收款码', + 'system.otherConfig.paymentQr.title': '充值收款码', + 'system.otherConfig.paymentQr.tip': '用于客户 PC / H5 充值页展示。更换后立即生效;未上传时前端使用默认图。', + 'system.otherConfig.paymentQr.alipay': '支付宝', + 'system.otherConfig.paymentQr.wechat': '微信', + 'system.otherConfig.paymentQr.replace': '更换图片', + 'system.otherConfig.paymentQr.empty': '尚未上传', + 'system.otherConfig.paymentQr.uploadSuccess': '收款码已更新', + 'system.otherConfig.paymentQr.uploadFailed': '上传失败', + 'system.otherConfig.paymentQr.loadFailed': '加载收款码失败', 'system.otherConfig.status.enabled': '启用', 'system.otherConfig.status.disabled': '禁用', 'system.otherConfig.table.configCode': '配置编码', diff --git a/src/router/index.ts b/src/router/index.ts index d6f5a36..f5a3b6e 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -265,6 +265,62 @@ const router = createRouter({ adminPortalOnly: true, }, }, + { + path: 'customers', + name: 'H5AdminCustomers', + component: () => import('@/views/h5/admin-center/customers/index.vue'), + meta: { + requiresAuth: true, + locale: 'h5Admin.customers.title', + h5HideHeader: true, + h5HideTabBar: true, + adminPortalOnly: true, + }, + }, + { + path: 'ops/parcel-arrival', + name: 'H5AdminOpsParcelArrival', + component: () => import('@/views/h5/admin-center/ops/parcel-arrival.vue'), + meta: { + requiresAuth: true, + locale: 'h5Admin.ops.parcelArrival', + h5HideHeader: true, + adminPortalOnly: true, + }, + }, + { + path: 'ops/inbound', + name: 'H5AdminOpsInbound', + component: () => import('@/views/h5/admin-center/ops/inbound.vue'), + meta: { + requiresAuth: true, + locale: 'h5Admin.ops.inbound', + h5HideHeader: true, + adminPortalOnly: true, + }, + }, + { + path: 'ops/outbound', + name: 'H5AdminOpsOutbound', + component: () => import('@/views/h5/admin-center/ops/outbound.vue'), + meta: { + requiresAuth: true, + locale: 'h5Admin.ops.outbound', + h5HideHeader: true, + adminPortalOnly: true, + }, + }, + { + path: 'ops/fulfill-pack', + name: 'H5AdminOpsFulfillPack', + component: () => import('@/views/h5/admin-center/ops/fulfill-pack.vue'), + meta: { + requiresAuth: true, + locale: 'h5Admin.ops.fulfillPack', + h5HideHeader: true, + adminPortalOnly: true, + }, + }, { path: ':pathMatch(.*)*', name: 'H5AdminCenterFallback', diff --git a/src/utils/auth-keepalive.ts b/src/utils/auth-keepalive.ts index bd4f010..5258264 100644 --- a/src/utils/auth-keepalive.ts +++ b/src/utils/auth-keepalive.ts @@ -1,8 +1,20 @@ import router from '@/router' import { useRbacUserStore } from '@/store/modules/rbac-user' import { handleSessionExpired } from '@/utils/auth-session-expired' +import { isLoginRouteName, ADMIN_H5_LOGIN_PATH } from '@/utils/login-portal' import { watch } from 'vue' +/** PC / H5 登录页:不做保活,也不要因脏 token 在登录页弹「已过期」 */ +function isOnLoginSurface(): boolean { + const route = router.currentRoute.value + const name = route.name != null ? String(route.name) : '' + if (isLoginRouteName(name) || name === 'H5Login' || name === 'H5AdminLogin') { + return true + } + const path = (route.path || '').split('?')[0] + return path.endsWith('/login') || path === ADMIN_H5_LOGIN_PATH +} + // 用户最后一次交互起,1小时后进入“过期/跳登录” const KEEP_ALIVE_IDLE_MS = 60 * 60 * 1000 // 提前 1 分钟续期(尽量减少 accessToken 刚好到期导致的 401) @@ -43,6 +55,7 @@ async function doLogout() { if (userStore.isLoggedIn) { userStore.disableKeepAlive() } + // 登录页由 handleSessionExpired 静默清会话;其它页才提示过期 handleSessionExpired('登录已过期,请重新登录') } @@ -87,8 +100,8 @@ function onUserActivity() { const userStore = useRbacUserStore() if (!userStore.isLoggedIn) return - // 登录页不做保活 - if (router.currentRoute.value.name === 'login' || router.currentRoute.value.name === 'adminLogin') return + // 登录页不做保活(含 /h5/login、/h5/admin/login) + if (isOnLoginSurface()) return // 开启并重置保活倒计时 userStore.enableKeepAlive() diff --git a/src/utils/auth-session-expired.ts b/src/utils/auth-session-expired.ts index 2432f8c..fa7f135 100644 --- a/src/utils/auth-session-expired.ts +++ b/src/utils/auth-session-expired.ts @@ -58,10 +58,24 @@ function redirectToLogin( void router.replace({ name: target.name, query: target.query }) } +function clearLocalSession() { + const rbacUserStore = useRbacUserStore() + if (rbacUserStore.isLoggedIn) { + rbacUserStore.logout() + } + try { + clearToken() + useUserStore().resetInfo() + } catch { + // pinia 未就绪时忽略 + } +} + /** * 统一处理登录失效:至多提示一次并跳转登录页。 * 主动退出或已无 token 时不弹「登录已过期」。 * 访客逛 H5 时接口 401 也不踢登录页。 + * 已在登录/注册页时只静默清会话:用户本来就是来登录的,不应再提示过期。 * @returns 是否实际执行了过期提示 */ export function handleSessionExpired( @@ -75,6 +89,13 @@ export function handleSessionExpired( const currentPath = router.currentRoute.value.fullPath const loginType = rbacUserStore.resolveLoginTypeForRedirect() + // 已在登录页:静默丢掉脏会话,不弹窗、不反复跳转 + if (isOnLoginPage()) { + markSessionEndedByUser() + clearLocalSession() + return false + } + // 主动退出 / 访客无会话:静默;访客可逛页不跳登录 if (!rbacUserStore.isLoggedIn) { markSessionEndedByUser() @@ -83,14 +104,7 @@ export function handleSessionExpired( } markSessionEndedByUser() - rbacUserStore.logout() - - try { - clearToken() - useUserStore().resetInfo() - } catch { - // pinia 未就绪时忽略 - } + clearLocalSession() Message.error(message) redirectToLogin(loginType, currentPath) diff --git a/src/utils/paymentReceiveQr.ts b/src/utils/paymentReceiveQr.ts new file mode 100644 index 0000000..3b74d11 --- /dev/null +++ b/src/utils/paymentReceiveQr.ts @@ -0,0 +1,25 @@ +import { getPaymentReceiveQr } from '@/api/system/otherConfig' +import { resolveOmsAssetUrl } from '@/api/oms/common' +import zfbQrFallback from '@/assets/zfb-biubuy.png' +import wxQrFallback from '@/assets/wx-biubuy.png' + +export type PaymentReceiveQrUrls = { + alipay: string + wechat: string +} + +/** 拉取配置的收款码;未配置或失败时回退本地默认图 */ +export async function loadPaymentReceiveQrUrls(): Promise { + try { + const data = await getPaymentReceiveQr() + return { + alipay: resolveOmsAssetUrl(data?.alipayUrl) || zfbQrFallback, + wechat: resolveOmsAssetUrl(data?.wechatUrl) || wxQrFallback, + } + } catch { + return { + alipay: zfbQrFallback, + wechat: wxQrFallback, + } + } +} diff --git a/src/views/h5/admin-center/components/AppTabBar.vue b/src/views/h5/admin-center/components/AppTabBar.vue index a455f62..464fd21 100644 --- a/src/views/h5/admin-center/components/AppTabBar.vue +++ b/src/views/h5/admin-center/components/AppTabBar.vue @@ -26,6 +26,18 @@ {{ t(item.labelKey) }} + +
+ +
@@ -33,7 +45,7 @@ import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; -import { IconDashboard, IconComputer, IconUser } from '@arco-design/web-vue/es/icon'; +import { IconDashboard, IconComputer, IconUser, IconScan } from '@arco-design/web-vue/es/icon'; import IconTabPackage from '@/assets/icons/h5/tab-package.svg'; defineOptions({ name: 'H5AdminAppTabBar' }); @@ -42,6 +54,10 @@ const props = defineProps<{ orderBadge?: number; }>(); +const emit = defineEmits<{ + (e: 'open-ops'): void; +}>(); + const { t } = useI18n(); const route = useRoute(); const dockRef = ref(null); @@ -203,6 +219,7 @@ watch( z-index: 100; display: flex; align-items: center; + gap: 0; padding: 0 var(--h5-dock-side-inset, 16px) var(--h5-dock-bottom-inset, max(8px, calc(env(safe-area-inset-bottom, 0px) - 12px))); pointer-events: none; @@ -428,4 +445,88 @@ watch( animation: none; } } + +.h5-dock-fab-slot { + position: relative; + flex: 0 0 var(--h5-dock-fab-size, 56px); + width: var(--h5-dock-fab-size, 56px); + height: var(--h5-dock-fab-size, 56px); + margin-left: 12px; + overflow: visible; + pointer-events: none; +} + +.h5-dock-fab { + position: relative; + pointer-events: auto; + display: inline-flex; + align-items: center; + justify-content: center; + width: var(--h5-dock-fab-size, 56px); + height: var(--h5-dock-fab-size, 56px); + padding: 0; + border: none; + border-radius: 50%; + overflow: hidden; + isolation: isolate; + color: var(--app-primary-color); + background: transparent; + cursor: pointer; + -webkit-tap-highlight-color: transparent; + touch-action: manipulation; + transform-origin: center; + transition: transform 0.22s cubic-bezier(0.22, 1.2, 0.36, 1); + + &:active { + transform: scale(0.9); + } +} + +.h5-dock-fab__glass { + position: absolute; + inset: 0; + z-index: 0; + border-radius: inherit; + pointer-events: none; + background: linear-gradient( + 180deg, + rgba(255, 255, 255, 0.38) 0%, + rgba(255, 255, 255, 0.16) 100% + ); + backdrop-filter: blur(32px) saturate(190%) brightness(1.08); + -webkit-backdrop-filter: blur(32px) saturate(190%) brightness(1.08); + + &::after { + content: ''; + position: absolute; + inset: 0; + border-radius: inherit; + padding: 1px; + background: linear-gradient( + 180deg, + rgba(255, 255, 255, 0.92) 0%, + rgba(255, 255, 255, 0.28) 42%, + rgba(255, 255, 255, 0.4) 100% + ); + -webkit-mask: + linear-gradient(#000 0 0) content-box, + linear-gradient(#000 0 0); + -webkit-mask-composite: xor; + mask: + linear-gradient(#000 0 0) content-box, + linear-gradient(#000 0 0); + mask-composite: exclude; + } +} + +.h5-dock-fab__icon { + position: relative; + z-index: 2; + color: var(--app-primary-color); + transition: transform 0.22s ease; +} + +.h5-dock-fab:active .h5-dock-fab__icon { + transform: scale(0.92); +} diff --git a/src/views/h5/admin-center/components/H5OpsHubSheet.vue b/src/views/h5/admin-center/components/H5OpsHubSheet.vue new file mode 100644 index 0000000..77ea3a2 --- /dev/null +++ b/src/views/h5/admin-center/components/H5OpsHubSheet.vue @@ -0,0 +1,251 @@ + + + + + + + diff --git a/src/views/h5/admin-center/customers/index.vue b/src/views/h5/admin-center/customers/index.vue new file mode 100644 index 0000000..25b1cf7 --- /dev/null +++ b/src/views/h5/admin-center/customers/index.vue @@ -0,0 +1,497 @@ + + + + + diff --git a/src/views/h5/admin-center/layout.vue b/src/views/h5/admin-center/layout.vue index 7bbe933..0c35dcd 100644 --- a/src/views/h5/admin-center/layout.vue +++ b/src/views/h5/admin-center/layout.vue @@ -13,7 +13,8 @@ > - + + @@ -28,12 +29,14 @@ import { hideWeChatBrowserNav } from '@/utils/device'; import { H5_ORDER_GROUPS, sumStatusCounts } from '@/constants/h5OrderStatus'; import LoginLangToggle from '@/views/login/components/LoginLangToggle.vue'; import AppTabBar from './components/AppTabBar.vue'; +import H5OpsHubSheet from './components/H5OpsHubSheet.vue'; defineOptions({ name: 'H5AdminCenterLayout' }); const { t, locale } = useI18n(); const route = useRoute(); const orderBadge = ref(0); +const opsHubVisible = ref(false); let idlePreloadHandle: number | null = null; let badgeTimer: ReturnType | null = null; @@ -45,6 +48,10 @@ const headerTitle = computed(() => { return t(key); }); +function syncDocumentTitle() { + document.title = t('h5Admin.documentTitle'); +} + async function refreshOrderBadge() { if (!isLogin()) { orderBadge.value = 0; @@ -68,6 +75,7 @@ function scheduleBadgeRefresh() { onMounted(() => { hideWeChatBrowserNav(); + syncDocumentTitle(); if (isLogin()) { const run = () => void ensureFullLocaleMessages(locale.value); if (typeof window !== 'undefined' && 'requestIdleCallback' in window) { @@ -83,6 +91,10 @@ onMounted(() => { } }); +watch(locale, () => { + syncDocumentTitle(); +}); + onBeforeUnmount(() => { if (badgeTimer) clearTimeout(badgeTimer); if (idlePreloadHandle != null) { diff --git a/src/views/h5/admin-center/locale/en-US.ts b/src/views/h5/admin-center/locale/en-US.ts index 5eb5f91..13e5850 100644 --- a/src/views/h5/admin-center/locale/en-US.ts +++ b/src/views/h5/admin-center/locale/en-US.ts @@ -1,5 +1,6 @@ export default { 'h5Admin.center.title': 'Ops Center', + 'h5Admin.documentTitle': 'IDE Ops Center', 'h5Admin.tab.workplace': 'Home', 'h5Admin.tab.monitor': 'Monitor', 'h5Admin.tab.orders': 'Shipments', @@ -144,4 +145,45 @@ export default { 'h5Admin.monitor.vsYesterday': 'vs yesterday', 'h5Admin.monitor.vsLastWeek': 'vs last week', 'h5Admin.monitor.vsLastMonth': 'vs last month', + + 'h5Admin.customers.title': 'Customers', + 'h5Admin.customers.refresh': 'Refresh', + 'h5Admin.customers.search': 'Search', + 'h5Admin.customers.searchPh': 'Code / name / phone', + 'h5Admin.customers.empty': 'No customers', + 'h5Admin.customers.loadMore': 'Load more', + 'h5Admin.customers.code': 'Code', + 'h5Admin.customers.phone': 'Phone', + 'h5Admin.customers.createTime': 'Registered', + 'h5Admin.customers.lastLogin': 'Last login', + 'h5Admin.customers.onlineBadge': 'Online', + 'h5Admin.customers.hint.total': 'All active customers', + 'h5Admin.customers.hint.newToday': 'Registered today', + 'h5Admin.customers.hint.online': 'Logged in within 30 minutes', + 'h5Admin.customers.hint.inactive7d': 'No login for 7+ days', + + 'h5Admin.ops.fab': 'Ops', + 'h5Admin.ops.hubTitle': 'Warehouse ops', + 'h5Admin.ops.hubHint': 'Arrival, inbound, outbound, and pick', + 'h5Admin.ops.noPermission': 'No ops permission', + 'h5Admin.ops.parcelArrival': 'Parcel arrival', + 'h5Admin.ops.parcelArrivalDesc': 'Scan domestic tracking to arrive', + 'h5Admin.ops.inbound': 'Inbound scan', + 'h5Admin.ops.inboundDesc': 'Scan waybill and enter dimensions', + 'h5Admin.ops.outbound': 'Outbound scan', + 'h5Admin.ops.outboundDesc': 'Scan waybill and verify weight', + 'h5Admin.ops.fulfillPack': 'Fulfill pick', + 'h5Admin.ops.fulfillPackDesc': 'Locate order and confirm pack', + 'h5Admin.ops.scanGunHint': 'Scan into the field with a gun, or tap the scan icon for camera', + 'h5Admin.ops.cameraSheetTitle': 'Camera scan', + 'h5Admin.ops.cameraSheetHint': 'Aim at the barcode; it fills and closes on success', + 'h5Admin.ops.cameraClose': 'Close', + 'h5Admin.ops.torchOn': 'Torch on', + 'h5Admin.ops.torchOff': 'Torch off', + 'h5Admin.ops.recentRecords': 'Recent', + 'h5Admin.ops.emptyRecent': 'No records', + 'h5Admin.ops.lookup': 'Lookup', + 'h5Admin.ops.refresh': 'Refresh', + 'h5Admin.ops.fulfillQueue': 'Pick queue', + 'h5Admin.ops.switchWarehouse': 'Switch warehouse', }; diff --git a/src/views/h5/admin-center/locale/zh-CN.ts b/src/views/h5/admin-center/locale/zh-CN.ts index 77d105c..1485600 100644 --- a/src/views/h5/admin-center/locale/zh-CN.ts +++ b/src/views/h5/admin-center/locale/zh-CN.ts @@ -1,5 +1,6 @@ export default { 'h5Admin.center.title': '运营中心', + 'h5Admin.documentTitle': 'IDE运营中心', 'h5Admin.tab.workplace': '工作台', 'h5Admin.tab.monitor': '监控', 'h5Admin.tab.orders': '运单', @@ -144,4 +145,45 @@ export default { 'h5Admin.monitor.vsYesterday': '较昨日', 'h5Admin.monitor.vsLastWeek': '较上周', 'h5Admin.monitor.vsLastMonth': '较上月', + + 'h5Admin.customers.title': '客户列表', + 'h5Admin.customers.refresh': '刷新', + 'h5Admin.customers.search': '搜索', + 'h5Admin.customers.searchPh': '编号 / 名称 / 手机', + 'h5Admin.customers.empty': '暂无客户', + 'h5Admin.customers.loadMore': '加载更多', + 'h5Admin.customers.code': '编号', + 'h5Admin.customers.phone': '手机', + 'h5Admin.customers.createTime': '注册', + 'h5Admin.customers.lastLogin': '最近登录', + 'h5Admin.customers.onlineBadge': '在线', + 'h5Admin.customers.hint.total': '全部正常客户', + 'h5Admin.customers.hint.newToday': '今日新注册客户', + 'h5Admin.customers.hint.online': '近 30 分钟有登录', + 'h5Admin.customers.hint.inactive7d': '超过 7 天未登录', + + 'h5Admin.ops.fab': '操作', + 'h5Admin.ops.hubTitle': '仓操入口', + 'h5Admin.ops.hubHint': '扫码到仓、入库、出库与代发拣货', + 'h5Admin.ops.noPermission': '暂无操作权限', + 'h5Admin.ops.parcelArrival': '快递到仓', + 'h5Admin.ops.parcelArrivalDesc': '扫国内快递单确认到仓', + 'h5Admin.ops.inbound': '入库扫描', + 'h5Admin.ops.inboundDesc': '扫运单入库并录入材积', + 'h5Admin.ops.outbound': '出库扫描', + 'h5Admin.ops.outboundDesc': '扫运单出库并核对重量', + 'h5Admin.ops.fulfillPack': '代发拣货', + 'h5Admin.ops.fulfillPackDesc': '扫码定位并确认打包', + 'h5Admin.ops.scanGunHint': '扫码枪对准输入框即可;无枪时点右侧扫码图标开摄像头', + 'h5Admin.ops.cameraSheetTitle': '摄像头扫码', + 'h5Admin.ops.cameraSheetHint': '对准条码,识别成功后自动填入并关闭', + 'h5Admin.ops.cameraClose': '关闭', + 'h5Admin.ops.torchOn': '开灯', + 'h5Admin.ops.torchOff': '关灯', + 'h5Admin.ops.recentRecords': '最近记录', + 'h5Admin.ops.emptyRecent': '暂无记录', + 'h5Admin.ops.lookup': '查询', + 'h5Admin.ops.refresh': '刷新', + 'h5Admin.ops.fulfillQueue': '待拣货队列', + 'h5Admin.ops.switchWarehouse': '切换仓库', }; diff --git a/src/views/h5/admin-center/login/index.vue b/src/views/h5/admin-center/login/index.vue index c0fa9c6..ad7c416 100644 --- a/src/views/h5/admin-center/login/index.vue +++ b/src/views/h5/admin-center/login/index.vue @@ -151,6 +151,7 @@ async function handleSubmit() { } onMounted(() => { + document.title = t('h5Admin.documentTitle'); if (isLogin() && rbacUserStore.loginPortalType === OmsLoginType.User) { router.replace(resolveRedirectPath()); } diff --git a/src/views/h5/admin-center/monitor/index.vue b/src/views/h5/admin-center/monitor/index.vue index 9fc6f8d..f4f8505 100644 --- a/src/views/h5/admin-center/monitor/index.vue +++ b/src/views/h5/admin-center/monitor/index.vue @@ -159,11 +159,13 @@

{{ t('h5Admin.monitor.customer.title') }}

-
@@ -179,7 +181,7 @@ {{ card.display }} -
+
@@ -335,6 +337,8 @@ const customerCards = computed(() => { warning: false, icon: iconCustomerTotal, compareKey: 'h5Admin.monitor.vsLastMonth', + path: '/h5/admin/customers', + query: { scope: 'total' }, ...growthMeta(c?.totalCustomersMonthGrowthPercent), }, { @@ -344,6 +348,8 @@ const customerCards = computed(() => { warning: false, icon: iconCustomerNew, compareKey: 'h5Admin.monitor.vsYesterday', + path: '/h5/admin/customers', + query: { scope: 'newToday' }, ...growthMeta(c?.newCustomersGrowthPercent), }, { @@ -353,6 +359,8 @@ const customerCards = computed(() => { warning: false, icon: iconCustomerOnline, compareKey: 'h5Admin.monitor.vsYesterday', + path: '/h5/admin/customers', + query: { scope: 'online' }, ...growthMeta(null), }, { @@ -362,6 +370,8 @@ const customerCards = computed(() => { warning: (c?.inactiveLogin7d || 0) > 0, icon: iconCustomerInactive, compareKey: 'h5Admin.monitor.vsYesterday', + path: '/h5/admin/customers', + query: { scope: 'inactive7d' }, ...growthMeta(null), }, ]; diff --git a/src/views/h5/admin-center/ops/H5OpsPageHeader.vue b/src/views/h5/admin-center/ops/H5OpsPageHeader.vue new file mode 100644 index 0000000..ac63b80 --- /dev/null +++ b/src/views/h5/admin-center/ops/H5OpsPageHeader.vue @@ -0,0 +1,288 @@ + + + + + + + diff --git a/src/views/h5/admin-center/ops/fulfill-pack.vue b/src/views/h5/admin-center/ops/fulfill-pack.vue new file mode 100644 index 0000000..eca4d82 --- /dev/null +++ b/src/views/h5/admin-center/ops/fulfill-pack.vue @@ -0,0 +1,309 @@ + + + + + diff --git a/src/views/h5/admin-center/ops/inbound.vue b/src/views/h5/admin-center/ops/inbound.vue new file mode 100644 index 0000000..9b699c2 --- /dev/null +++ b/src/views/h5/admin-center/ops/inbound.vue @@ -0,0 +1,285 @@ + + + + + diff --git a/src/views/h5/admin-center/ops/ops-shared.less b/src/views/h5/admin-center/ops/ops-shared.less new file mode 100644 index 0000000..e7aa9ef --- /dev/null +++ b/src/views/h5/admin-center/ops/ops-shared.less @@ -0,0 +1,181 @@ +.h5-ops { + padding: 10px 16px 28px; + box-sizing: border-box; +} + +.h5-ops__scan-row { + display: flex; + align-items: center; + gap: 8px; + margin-bottom: 10px; + + > :first-child { + flex: 1; + min-width: 0; + } +} + +.h5-ops__primary { + flex: 0 0 auto; + height: 44px; + padding: 0 14px; + border: none; + border-radius: 12px; + background: var(--app-primary-color, #1d7281); + color: #fff; + font-size: 13px; + white-space: nowrap; + cursor: pointer; + + &:disabled { + opacity: 0.55; + } +} + +.h5-ops__feedback { + margin: 0 0 12px; + padding: 10px 12px; + border-radius: 10px; + font-size: 13px; + line-height: 1.4; + + &.is-success { + background: rgba(0, 180, 42, 0.1); + color: #00b42a; + } + + &.is-error { + background: rgba(245, 63, 63, 0.1); + color: #f53f3f; + } + + &.is-warning { + background: rgba(255, 125, 0, 0.12); + color: #ff7d00; + } +} + +.h5-ops__panel { + margin-bottom: 14px; + padding: 14px; + border-radius: 14px; + background: #fff; + box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); +} + +.h5-ops__waybill { + margin: 0 0 6px; + font-size: 16px; + font-weight: 700; + color: var(--h5-text, #1d2129); + word-break: break-all; +} + +.h5-ops__meta { + margin: 0 0 12px; + font-size: 12px; + color: var(--h5-text-3, #86909c); + line-height: 1.5; +} + +.h5-ops__metrics { + display: grid; + gap: 10px; +} + +.h5-ops__field { + display: grid; + gap: 6px; + + label { + font-size: 12px; + color: var(--h5-text-2, #4e5969); + } + + input { + height: 36px; + padding: 0 10px; + border: none; + border-radius: 10px; + background: var(--h5-well-bg, #f0f3f4); + font-size: 14px; + outline: none; + } +} + +.h5-ops__dims { + display: grid; + grid-template-columns: 1fr auto 1fr auto 1fr; + gap: 6px; + align-items: center; + + span { + color: var(--h5-text-3, #86909c); + } +} + +.h5-ops__recent { + h2 { + margin: 0 0 10px; + font-size: 15px; + color: var(--h5-text, #1d2129); + } +} + +.h5-ops__empty { + margin: 0; + padding: 18px 0; + text-align: center; + font-size: 13px; + color: var(--h5-text-3, #86909c); +} + +.h5-ops__card { + display: grid; + gap: 4px; + margin-bottom: 8px; + padding: 12px; + border-radius: 12px; + background: #fff; + box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); + + strong { + font-size: 14px; + color: var(--h5-text, #1d2129); + word-break: break-all; + } + + span, + em { + font-size: 12px; + color: var(--h5-text-3, #86909c); + font-style: normal; + } + + &.is-active { + outline: 2px solid color-mix(in srgb, var(--app-primary-color) 45%, transparent); + } +} + +.h5-ops__queue-head { + display: flex; + align-items: center; + justify-content: space-between; + gap: 8px; + margin-bottom: 10px; + + h2 { + margin: 0; + } + + button { + height: 28px; + padding: 0 10px; + border: none; + border-radius: 8px; + background: var(--h5-well-bg, #f0f3f4); + color: var(--h5-text-2, #4e5969); + font-size: 12px; + cursor: pointer; + } +} diff --git a/src/views/h5/admin-center/ops/outbound.vue b/src/views/h5/admin-center/ops/outbound.vue new file mode 100644 index 0000000..667b8ea --- /dev/null +++ b/src/views/h5/admin-center/ops/outbound.vue @@ -0,0 +1,275 @@ + + + + + diff --git a/src/views/h5/admin-center/ops/parcel-arrival.vue b/src/views/h5/admin-center/ops/parcel-arrival.vue new file mode 100644 index 0000000..3d3998e --- /dev/null +++ b/src/views/h5/admin-center/ops/parcel-arrival.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/src/views/h5/admin-center/styles/tokens.less b/src/views/h5/admin-center/styles/tokens.less index b6a3abb..da527de 100644 --- a/src/views/h5/admin-center/styles/tokens.less +++ b/src/views/h5/admin-center/styles/tokens.less @@ -12,16 +12,12 @@ --h5-border-soft: #f2f3f5; --h5-radius: 16px; --h5-radius-sm: 12px; - /* pressed:外层白卡 / 内层浅井(阴影偏淡) */ - --h5-shadow: - inset 0 2px 8px rgba(15, 23, 42, 0.07), - inset 0 1px 1px rgba(15, 23, 42, 0.04); - --h5-shadow-lift: - inset 0 3px 10px rgba(15, 23, 42, 0.09), - inset 0 1px 2px rgba(15, 23, 42, 0.05); - --h5-well-bg: #f7f8fa; - --h5-well-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.06); - --h5-well-shadow-deep: inset 0 3px 6px rgba(15, 23, 42, 0.08); + /* 背景块用纯色,不做内阴影 */ + --h5-shadow: none; + --h5-shadow-lift: none; + --h5-well-bg: #f0f3f4; + --h5-well-shadow: none; + --h5-well-shadow-deep: none; --h5-warning: #ff7d00; --h5-warning-bg: #fff7e8; --h5-danger: #f53f3f; diff --git a/src/views/h5/admin-center/workplace/index.vue b/src/views/h5/admin-center/workplace/index.vue index 2747e38..901aac0 100644 --- a/src/views/h5/admin-center/workplace/index.vue +++ b/src/views/h5/admin-center/workplace/index.vue @@ -2,16 +2,18 @@
-

{{ greetText }},{{ displayName }}

{{ t('h5Admin.tab.workplace') }}

-

{{ t('h5Admin.workplace.subtitle') }}

+

+ {{ greetText }},{{ displayName }} + + {{ updatedLabel }} +

-

{{ updatedLabel }}

{{ t('h5Admin.workplace.loadFailed') }}

@@ -443,72 +445,70 @@ onMounted(() => { diff --git a/src/views/h5/customer-center/components/H5RechargeSheet.vue b/src/views/h5/customer-center/components/H5RechargeSheet.vue index 78b5058..7acc789 100644 --- a/src/views/h5/customer-center/components/H5RechargeSheet.vue +++ b/src/views/h5/customer-center/components/H5RechargeSheet.vue @@ -89,7 +89,7 @@
- qrcode + qrcode

{{ t('h5.recharge.qrTip') }}

@@ -147,6 +147,7 @@ import { IconClose, IconPlus } from '@arco-design/web-vue/es/icon'; import zfbQrCode from '@/assets/zfb-biubuy.png'; import wxQrCode from '@/assets/wx-biubuy.png'; import { submitRechargeApplication } from '@/api/recharge/rechargeRecord'; +import { loadPaymentReceiveQrUrls } from '@/utils/paymentReceiveQr'; defineOptions({ name: 'H5RechargeSheet' }); @@ -161,6 +162,8 @@ const emit = defineEmits<{ const { t } = useI18n(); +const zfbQrDisplay = ref(zfbQrCode); +const wxQrDisplay = ref(wxQrCode); const presets = [500, 1000, 1500, 3000]; const amount = ref(500); const customMode = ref(false); @@ -243,8 +246,12 @@ async function submit() { watch( () => props.visible, - (visible) => { - if (visible) resetForm(); + async (visible) => { + if (!visible) return; + resetForm(); + const urls = await loadPaymentReceiveQrUrls(); + zfbQrDisplay.value = urls.alipay; + wxQrDisplay.value = urls.wechat; }, { immediate: true }, ); diff --git a/src/views/h5/customer-center/layout.vue b/src/views/h5/customer-center/layout.vue index 33aa5c0..7539678 100644 --- a/src/views/h5/customer-center/layout.vue +++ b/src/views/h5/customer-center/layout.vue @@ -102,6 +102,10 @@ const headerTitle = computed(() => { return t(key); }); +function syncDocumentTitle() { + document.title = t('h5.documentTitle'); +} + async function refreshOrderBadge() { if (!isLogin()) { orderBadge.value = 0; @@ -134,6 +138,7 @@ function preloadCreateFlow() { onMounted(() => { hideWeChatBrowserNav(); + syncDocumentTitle(); // 访客也可逛顾问等页:空闲补全量语言包(bootstrap 已含 H5 + nanaAssistant) const run = () => { void ensureFullLocaleMessages(locale.value); @@ -170,6 +175,10 @@ watch( } }, ); + +watch(locale, () => { + syncDocumentTitle(); +}); diff --git a/src/views/site/SiteAdvisorShell.vue b/src/views/site/SiteAdvisorShell.vue index c61545f..cbed5e8 100644 --- a/src/views/site/SiteAdvisorShell.vue +++ b/src/views/site/SiteAdvisorShell.vue @@ -17,39 +17,24 @@
-
@@ -233,7 +224,8 @@ import SitePartnerMarquee from './SitePartnerMarquee.vue'; import SiteMessageCard from './SiteMessageCard.vue'; import SiteIllusIcon from './SiteIllusIcon.vue'; - import TextType from './TextType.vue'; + import SiteFeaturedRoutes from './SiteFeaturedRoutes.vue'; + import SiteRunway from './SiteRunway.vue'; import { FULFILL_DOOR_IDS, GROWTH_DOOR_IDS, @@ -284,6 +276,7 @@ 'open-routes': [dest?: string]; 'open-panel': [id: 'pricing' | 'contact']; 'switch-thread': [id: string]; + ask: [payload: { text: string; intentId: string }]; choice: [payload: { id: string; label: string; flowId: string }]; }>(); @@ -305,12 +298,11 @@ (d): d is (typeof HOME_DOORS)[number] => !!d, ); - // 首屏即按视口决定短标题,避免挂载后再切导致 TextType 卡住只剩品牌前缀 const shortTitle = ref( typeof window !== 'undefined' && window.matchMedia('(max-width: 640px)').matches, ); - const titleAnimate = ref( - typeof window === 'undefined' || !window.matchMedia('(prefers-reduced-motion: reduce)').matches, + const runwayTitle = computed(() => + shortTitle.value ? copy.value.titleShort : copy.value.title, ); const draft = computed({ @@ -350,23 +342,18 @@ ); let mqNarrow: MediaQueryList | null = null; - let mqReduce: MediaQueryList | null = null; function syncMediaPrefs() { shortTitle.value = !!mqNarrow?.matches; - titleAnimate.value = !mqReduce?.matches; } onMounted(() => { mqNarrow = window.matchMedia('(max-width: 640px)'); - mqReduce = window.matchMedia('(prefers-reduced-motion: reduce)'); syncMediaPrefs(); mqNarrow.addEventListener('change', syncMediaPrefs); - mqReduce.addEventListener('change', syncMediaPrefs); }); onBeforeUnmount(() => { mqNarrow?.removeEventListener('change', syncMediaPrefs); - mqReduce?.removeEventListener('change', syncMediaPrefs); }); diff --git a/src/views/site/SiteDotGrid.vue b/src/views/site/SiteDotGrid.vue new file mode 100644 index 0000000..8c7bdfe --- /dev/null +++ b/src/views/site/SiteDotGrid.vue @@ -0,0 +1,293 @@ + + + + + diff --git a/src/views/site/SiteFeaturedRoutes.vue b/src/views/site/SiteFeaturedRoutes.vue new file mode 100644 index 0000000..29b563e --- /dev/null +++ b/src/views/site/SiteFeaturedRoutes.vue @@ -0,0 +1,304 @@ + + + diff --git a/src/views/site/SiteRunway.vue b/src/views/site/SiteRunway.vue new file mode 100644 index 0000000..36e011e --- /dev/null +++ b/src/views/site/SiteRunway.vue @@ -0,0 +1,330 @@ + + + + + diff --git a/src/views/site/index.vue b/src/views/site/index.vue index bc5994e..050ffdf 100644 --- a/src/views/site/index.vue +++ b/src/views/site/index.vue @@ -1,54 +1,16 @@ + + + + {{ t('system.otherConfig.paymentQr.tip') }} + +
+ +
+
+
+
+ {{ item.title }} + + + {{ t('system.otherConfig.paymentQr.replace') }} + + +
+
+ +
+ {{ t('system.otherConfig.paymentQr.empty') }} +
+
+
+
+
@@ -204,11 +254,15 @@ import { WECHAT_MP_FOLLOW_CONFIG_CODE, createSystemOtherConfig, deleteSystemOtherConfig, + getPaymentReceiveQr, getSystemOtherConfigDetail, getSystemOtherConfigList, updateSystemOtherConfig, + uploadPaymentReceiveQr, + type PaymentReceiveQrChannel, type SystemOtherConfigDto, } from '@/api/system/otherConfig' +import { resolveOmsAssetUrl } from '@/api/oms/common' import { prodApiOrigin } from '@/utils/rewriteBrowserApiPath' defineOptions({ @@ -610,6 +664,77 @@ async function handleDelete(id?: number | string) { loadData() } +const paymentQrVisible = ref(false) +const paymentQrLoading = ref(false) +const paymentQrUrls = reactive({ + alipay: '', + wechat: '', +}) +const paymentQrUploading = reactive({ + alipay: false, + wechat: false, +}) + +const paymentQrCards = computed(() => [ + { + channel: 'alipay' as PaymentReceiveQrChannel, + title: t('system.otherConfig.paymentQr.alipay'), + url: paymentQrUrls.alipay, + uploading: paymentQrUploading.alipay, + }, + { + channel: 'wechat' as PaymentReceiveQrChannel, + title: t('system.otherConfig.paymentQr.wechat'), + url: paymentQrUrls.wechat, + uploading: paymentQrUploading.wechat, + }, +]) + +function applyPaymentQrDto(data?: { alipayUrl?: string; wechatUrl?: string } | null) { + const stamp = Date.now() + const alipay = resolveOmsAssetUrl(data?.alipayUrl) + const wechat = resolveOmsAssetUrl(data?.wechatUrl) + paymentQrUrls.alipay = alipay ? `${alipay}${alipay.includes('?') ? '&' : '?'}_t=${stamp}` : '' + paymentQrUrls.wechat = wechat ? `${wechat}${wechat.includes('?') ? '&' : '?'}_t=${stamp}` : '' +} + +async function loadPaymentQr() { + paymentQrLoading.value = true + try { + const data = await getPaymentReceiveQr() + applyPaymentQrDto(data) + } catch (e: any) { + Message.error(e?.message || t('system.otherConfig.paymentQr.loadFailed')) + } finally { + paymentQrLoading.value = false + } +} + +async function openPaymentQrModal() { + paymentQrVisible.value = true + await loadPaymentQr() +} + +async function handlePaymentQrUpload(channel: PaymentReceiveQrChannel, option: any) { + const file: File | undefined = option?.fileItem?.file ?? option?.file + if (!file) { + option?.onError?.(new Error('no file')) + return + } + paymentQrUploading[channel] = true + try { + const data = await uploadPaymentReceiveQr(channel, file) + applyPaymentQrDto(data) + option?.onSuccess?.(data) + Message.success(t('system.otherConfig.paymentQr.uploadSuccess')) + } catch (e: any) { + option?.onError?.(e) + Message.error(e?.message || t('system.otherConfig.paymentQr.uploadFailed')) + } finally { + paymentQrUploading[channel] = false + } +} + async function handleModalOk() { try { await formRef.value.validate() @@ -912,4 +1037,60 @@ onMounted(() => { margin-bottom: 16px; } } + +.payment-qr-loading { + display: flex; + align-items: center; + justify-content: center; + min-height: 220px; +} + +.payment-qr-grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 16px; +} + +.payment-qr-card { + display: flex; + flex-direction: column; + gap: 12px; + padding: 12px; + border: 1px solid var(--color-border-2); + border-radius: 8px; + background: #fff; +} + +.payment-qr-card__head { + display: flex; + align-items: center; + justify-content: space-between; + gap: 8px; +} + +.payment-qr-card__title { + font-size: 14px; + font-weight: 600; + color: var(--color-text-1); +} + +.payment-qr-card__preview { + display: flex; + align-items: center; + justify-content: center; + min-height: 220px; + background: var(--color-fill-1, #f7f8fa); + border-radius: 6px; +} + +.payment-qr-card__empty { + color: var(--color-text-3); + font-size: 13px; +} + +@media (max-width: 640px) { + .payment-qr-grid { + grid-template-columns: 1fr; + } +} diff --git a/src/views/user/recharge/deposit.vue b/src/views/user/recharge/deposit.vue index 9449689..ffedbda 100644 --- a/src/views/user/recharge/deposit.vue +++ b/src/views/user/recharge/deposit.vue @@ -103,10 +103,10 @@
- +
- +
@@ -175,7 +175,7 @@ diff --git a/src/components/h5/H5ScanInput.vue b/src/components/h5/H5ScanInput.vue index 6fc84ca..f0b9c77 100644 --- a/src/components/h5/H5ScanInput.vue +++ b/src/components/h5/H5ScanInput.vue @@ -28,42 +28,43 @@
-
-
-

{{ sheetTitle }}

-

{{ sheetHint }}

-
- -
-
@@ -128,6 +129,8 @@ let rafId = 0; let zxingControls: { stop: () => void } | null = null; let lastCode = ''; let lastAt = 0; +let starting = false; +let session = 0; let nativeDetector: { detect: (source: ImageBitmapSource) => Promise>; } | null = null; @@ -236,18 +239,36 @@ async function startZxing() { }); } -async function startCamera() { - error.value = ''; - if (running.value) return; - await nextTick(); - const video = videoRef.value; - if (!video) return; +async function waitForVideo() { + for (let i = 0; i < 20; i += 1) { + if (videoRef.value) return videoRef.value; + await new Promise((resolve) => { + window.requestAnimationFrame(() => resolve()); + }); + } + return videoRef.value; +} +async function startCamera() { + if (running.value || starting) return; + const mine = session; + starting = true; + error.value = ''; try { - if (!window.isSecureContext && location.hostname !== 'localhost') { + // 抽屉内容挂到 body 之后 video 才存在,提前取流会直接返回 + const video = await waitForVideo(); + if (mine !== session || !cameraOpen.value) return; + if (!video) { + throw new Error('取景未就绪,请关闭后重试'); + } + if (!navigator.mediaDevices?.getUserMedia) { + throw new Error('当前浏览器不支持摄像头扫码'); + } + if (!window.isSecureContext && location.hostname !== 'localhost' && location.hostname !== '127.0.0.1') { throw new Error('摄像头需在 HTTPS 或 localhost 下使用'); } await ensureNativeDetector(); + if (mine !== session || !cameraOpen.value) return; if (nativeDetector) { stream = await navigator.mediaDevices.getUserMedia({ @@ -258,6 +279,11 @@ async function startCamera() { height: { ideal: 720 }, }, }); + if (mine !== session || !cameraOpen.value) { + stream.getTracks().forEach((track) => track.stop()); + stream = null; + return; + } video.srcObject = stream; await video.play(); running.value = true; @@ -268,16 +294,23 @@ async function startCamera() { running.value = true; await startZxing(); + if (mine !== session || !cameraOpen.value) { + stopCamera(); + return; + } stream = (video.srcObject as MediaStream) || null; await attachTorchCapability(); } catch (e: any) { running.value = false; + if (mine !== session) return; const msg = e?.name === 'NotAllowedError' ? '未授权摄像头,请在系统设置中允许后重试' : e?.message || '无法打开摄像头'; error.value = msg; emit('error', msg); + } finally { + starting = false; } } @@ -309,18 +342,15 @@ function openCamera() { } function closeCamera() { + session += 1; cameraOpen.value = false; stopCamera(); focusInput(); } -watch(cameraOpen, async (open) => { - if (open) { - await nextTick(); - await startCamera(); - } else { - stopCamera(); - } +watch(cameraOpen, (open) => { + if (open) void startCamera(); + else stopCamera(); }); watch( @@ -340,8 +370,12 @@ defineExpose({ focus: focusInput, openCamera, closeCamera }); diff --git a/src/router/guard/userLoginInfo.ts b/src/router/guard/userLoginInfo.ts index 8a09c13..527d91b 100644 --- a/src/router/guard/userLoginInfo.ts +++ b/src/router/guard/userLoginInfo.ts @@ -20,7 +20,7 @@ import { } from '@/utils/login-portal'; import { preferH5Portal } from '@/utils/device'; import { applyRbacUserToUserStore } from '@/utils/enter-system'; -import { peekPageFlip } from '@/utils/page-transition-flag'; +import { shouldPortalIris } from '@/utils/page-transition-flag'; function buildLoginRedirect(to: { name?: string | symbol | null; @@ -67,7 +67,7 @@ export default function setupUserLoginInfoGuard(router: Router) { tabBarStore.getCacheList.includes(toName); // 门户翻页:跳过顶栏横条,等待感交给翻页动画 if ( - !peekPageFlip() && + !shouldPortalIris(to, from) && !isCachedTabSwitch && !String(to.path || '').startsWith('/h5') && to.path !== '/' diff --git a/src/store/modules/rbac-user.ts b/src/store/modules/rbac-user.ts index 605196c..21071ff 100644 --- a/src/store/modules/rbac-user.ts +++ b/src/store/modules/rbac-user.ts @@ -30,6 +30,15 @@ const OLD_TOKEN_KEY = 'rbac_token' const LOGIN_TYPE_KEY = 'rbac_login_type' const SSO_SESSION_FLAG = 'rbac_sso_session' +/** 中文业务文案可以展示;领域异常码(如 Fake.Rbac.Domain:UserNotExistsOrPwdErr)不展示。 */ +export function loginErrorForUser(raw: string): string { + const msg = raw.trim() + if (!msg) return '' + if (/^[A-Za-z0-9_.]+:[A-Za-z0-9_.]+$/.test(msg)) return '' + if (!/[\u4e00-\u9fff]/.test(msg)) return '' + return msg +} + function isSsoSessionActive(): boolean { return sessionStorage.getItem(SSO_SESSION_FLAG) === '1' } @@ -319,9 +328,9 @@ export const useRbacUserStore = defineStore('rbacUser', () => { await hydrateUserAfterLogin(result) return true } catch (error: unknown) { - // 交给登录页展示业务文案(如「客户已禁用」),勿一律当成账号密码错误 + // 业务文案(如「客户已禁用」)交给登录页;领域异常码不展示 const anyErr = error as { body?: { message?: string }; message?: string } - const msg = String(anyErr?.body?.message || anyErr?.message || '').trim() + const msg = loginErrorForUser(String(anyErr?.body?.message || anyErr?.message || '')) if (msg) throw new Error(msg) return false } diff --git a/src/utils/page-transition-flag.ts b/src/utils/page-transition-flag.ts index 7739f12..a741599 100644 --- a/src/utils/page-transition-flag.ts +++ b/src/utils/page-transition-flag.ts @@ -4,6 +4,16 @@ let skipOnce = false; /** 门户中心虹膜过渡(官网→登录 / 客户↔管理登录,单次消费) */ let pageFlipOnce = false; +/** 过渡进行中:旧页停掉逐帧绘制,新页先不要播入场动画 */ +export const PORTAL_IRIS_ACTIVE_CLASS = 'portal-iris-active'; + +/** 过渡结束后保持静帧,避免入场动画重播把页面再抖一次 */ +export const PORTAL_IRIS_SETTLED_CLASS = 'portal-iris-settled'; + +export function isPortalIrisActive() { + return document.documentElement.classList.contains(PORTAL_IRIS_ACTIVE_CLASS); +} + export function skipNextPageTransition() { skipOnce = true; } @@ -40,6 +50,35 @@ export function peekPageFlip(): boolean { return pageFlipOnce; } +type PortalRouteLike = { + name?: string | symbol | null; + query?: { from?: unknown }; +}; + +function portalRouteName(name: PortalRouteLike['name']) { + return name ? String(name) : ''; +} + +/** + * 是否走中心展开:已武装的翻页、官网进登录、客户登录与管理登录互切。 + * 只读标记,不消费;真正消费仍在 App 的导航守卫里。 + */ +export function shouldPortalIris(to: PortalRouteLike, from: PortalRouteLike): boolean { + if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return false; + if (pageFlipOnce) return true; + const fromName = portalRouteName(from.name); + const toName = portalRouteName(to.name); + if ( + fromName === 'siteRoot' && + (toName === 'login' || toName === 'H5Login') && + to.query?.from === 'official-site' + ) { + return true; + } + const isPcLogin = (name: string) => name === 'login' || name === 'adminLogin'; + return isPcLogin(fromName) && isPcLogin(toName) && fromName !== toName; +} + /** @deprecated 同 peekPageFlip */ export function peekOfficialLoginFlip(): boolean { return peekPageFlip(); diff --git a/src/views/h5/admin-center/locale/en-US.ts b/src/views/h5/admin-center/locale/en-US.ts index 13e5850..7304e74 100644 --- a/src/views/h5/admin-center/locale/en-US.ts +++ b/src/views/h5/admin-center/locale/en-US.ts @@ -32,6 +32,7 @@ export default { 'h5Admin.me.emptyRole': 'No roles', 'h5Admin.me.emptyOrg': 'No organization', 'h5Admin.me.emptyEmail': 'Not set', + 'h5Admin.me.changePassword': 'Change password', 'h5Admin.recharge.title': 'Recharge review', 'h5Admin.recharge.subtitle': 'Approve customer top-ups', diff --git a/src/views/h5/admin-center/locale/zh-CN.ts b/src/views/h5/admin-center/locale/zh-CN.ts index 1485600..4329347 100644 --- a/src/views/h5/admin-center/locale/zh-CN.ts +++ b/src/views/h5/admin-center/locale/zh-CN.ts @@ -32,6 +32,7 @@ export default { 'h5Admin.me.emptyRole': '暂无角色', 'h5Admin.me.emptyOrg': '未分配组织', 'h5Admin.me.emptyEmail': '未填写', + 'h5Admin.me.changePassword': '修改密码', 'h5Admin.recharge.title': '充值审核', 'h5Admin.recharge.subtitle': '审核客户充值申请', diff --git a/src/views/h5/admin-center/login/index.vue b/src/views/h5/admin-center/login/index.vue index ad7c416..3647cef 100644 --- a/src/views/h5/admin-center/login/index.vue +++ b/src/views/h5/admin-center/login/index.vue @@ -68,7 +68,7 @@ import { OmsLoginType } from '@/api/rbac'; import { isLogin, setToken } from '@/utils/auth'; import { applyRbacUserToUserStore } from '@/utils/enter-system'; import { ensureFullLocaleMessages } from '@/locale'; -import { useRbacUserStore } from '@/store/modules/rbac-user'; +import { loginErrorForUser, useRbacUserStore } from '@/store/modules/rbac-user'; import { ADMIN_H5_HOME_PATH, isAdminH5Path } from '@/utils/login-portal'; import logoImg from '@/assets/logo2.png'; import LoginLangToggle from '@/views/login/components/LoginLangToggle.vue'; @@ -144,7 +144,7 @@ async function handleSubmit() { Message.success(t('h5Admin.login.success')); await finishLogin(); } catch (e: any) { - errorBox.value = e?.message || t('h5Admin.login.failed'); + errorBox.value = loginErrorForUser(e?.message || '') || t('h5Admin.login.failed'); } finally { loading.value = false; } diff --git a/src/views/h5/admin-center/me/index.vue b/src/views/h5/admin-center/me/index.vue index 342fecc..b30a878 100644 --- a/src/views/h5/admin-center/me/index.vue +++ b/src/views/h5/admin-center/me/index.vue @@ -25,16 +25,22 @@ {{ t('h5Admin.me.email') }} {{ email }}
+ + + diff --git a/src/views/site/lib/site-urls.ts b/src/views/site/lib/site-urls.ts index 6f66492..b24a7b1 100644 --- a/src/views/site/lib/site-urls.ts +++ b/src/views/site/lib/site-urls.ts @@ -105,6 +105,8 @@ export function warmupOfficialLogin() { document.head.appendChild(prefetch); // 预拉取登录分包,翻页进入时少等 chunk void import('@/views/login/index.vue'); + const hero = new Image(); + hero.src = '/login-assets/hero-plane.webp'; } catch { /* ignore */ } diff --git a/src/views/site/styles/ai-advisor.css b/src/views/site/styles/ai-advisor.css index 6a4e694..e439d4f 100644 --- a/src/views/site/styles/ai-advisor.css +++ b/src/views/site/styles/ai-advisor.css @@ -2550,17 +2550,12 @@ body.command-home .ai-stage-map--eu { } .ai-welcome-airstrip, -.ai-welcome-compose-panel, .ai-welcome-trustline, .ai-intent-section, .ai-trust-bar { animation: ai-welcome-rise 0.78s cubic-bezier(0.22, 1, 0.36, 1) both; } -.ai-welcome-compose-panel { - animation-delay: 0.24s; -} - .ai-welcome-trustline { animation-delay: 0.34s; } @@ -2678,75 +2673,97 @@ body.command-home #navbar .site-nav-avatar:hover { width: 100%; } -/* Welcome compose — light frost, not a heavy card stack */ -.ai-welcome-compose-panel { +/* 提问卡:薄玻璃,点阵透出来 */ +.ai-ask { position: relative; isolation: isolate; overflow: hidden; margin: 0; - padding: 20px 22px 18px; - border-radius: 18px; - border: 1px solid rgba(255, 255, 255, 0.72); - background: rgba(255, 255, 255, 0.55); - backdrop-filter: blur(14px) saturate(140%); - -webkit-backdrop-filter: blur(14px) saturate(140%); - box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65); + padding: 18px 20px 16px; + border-radius: 16px; + border: 1px solid rgba(255, 255, 255, 0.7); + background: rgba(255, 255, 255, 0.28); + box-shadow: none; } -.ai-welcome-compose-panel::before { - display: none; -} - -.ai-welcome-compose-panel > * { - position: relative; - z-index: 1; -} - -.ai-welcome-compose-panel .ai-welcome-cta-link { - position: absolute; - top: 18px; - right: 20px; - z-index: 1; -} - -.ai-welcome-compose-panel .ai-welcome-compose__lead { - padding-right: 7.5em; - text-align: left; -} - -.ai-welcome-cta-link { - display: inline-flex; +.ai-ask__bar { + display: flex; align-items: center; - justify-content: center; - flex-shrink: 0; - min-height: 32px; - padding: 0 14px; - border: 1px solid color-mix(in srgb, var(--ai-accent, #e96a26) 28%, #fff); - border-radius: 999px; - background: color-mix(in srgb, var(--ai-accent, #e96a26) 10%, #fff); - color: var(--ai-accent, #e96a26); - font-size: 0.8rem; - font-weight: 700; - letter-spacing: 0.01em; - text-decoration: none; - white-space: nowrap; - box-shadow: 0 1px 2px rgba(233, 106, 38, 0.08); - transition: - color 0.18s var(--ai-ease), - background 0.18s var(--ai-ease), - border-color 0.18s var(--ai-ease), - box-shadow 0.18s var(--ai-ease), - transform 0.15s var(--ai-ease); + justify-content: space-between; + gap: 16px; + margin: 0 0 10px; } -.ai-welcome-cta-link:hover, -.ai-welcome-cta-link:focus { - color: #fff; - background: var(--ai-accent, #e96a26); - border-color: var(--ai-accent, #e96a26); +.ai-ask__cta { + flex-shrink: 0; + margin-left: auto; + color: var(--ai-accent, #e96a26); + font-size: 0.84rem; + font-weight: 700; + line-height: 1; text-decoration: none; - box-shadow: 0 4px 14px rgba(233, 106, 38, 0.28); - transform: translateY(-1px); +} + +.ai-ask__cta:hover, +.ai-ask__cta:focus-visible { + text-decoration: underline; + text-underline-offset: 3px; +} + +.ai-ask__dests { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px; + min-width: 0; + margin: 0; +} + +.ai-ask__dest { + min-height: 34px; + padding: 0 14px; + border-radius: 999px; + border: 1px solid rgba(18, 24, 32, 0.12); + background: rgba(255, 255, 255, 0.38); + color: #3d4754; + font: inherit; + font-size: 0.84rem; + font-weight: 650; + line-height: 1; + cursor: pointer; + transition: + color 0.15s var(--ai-ease), + background 0.15s var(--ai-ease), + border-color 0.15s var(--ai-ease); +} + +.ai-ask__dest:hover:not(:disabled) { + color: #023e8a; + border-color: rgba(2, 62, 138, 0.35); + background: rgba(255, 255, 255, 0.62); +} + +.ai-ask__dest:focus-visible { + outline: none; + box-shadow: 0 0 0 3px rgba(2, 62, 138, 0.18); +} + +.ai-ask__dest[aria-pressed='true'] { + color: #023e8a; + border-color: rgba(2, 62, 138, 0.55); + background: rgba(2, 62, 138, 0.1); +} + +.ai-ask__dest:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.ai-ask__hint { + margin: 0 0 12px; + font-size: 0.8rem; + line-height: 1.4; + color: #6a7380; } /* 意图区 · 双区分类网格(履约 3 + 代理 featured + 成长 3) */ @@ -2966,7 +2983,7 @@ body.command-home #navbar .site-nav-avatar:hover { padding: 12px 14px; border: 1px solid rgba(255, 255, 255, 0.66); border-radius: 14px; - background: color-mix(in srgb, #fff 52%, transparent); + background: color-mix(in srgb, #fff 46%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 1px 2px rgba(15, 23, 42, 0.04); @@ -2983,10 +3000,35 @@ body.command-home #navbar .site-nav-avatar:hover { -webkit-tap-highlight-color: transparent; } -/* 覆盖 command-home 全局禁 blur:仅精选卡开磨砂,透出点阵 */ +/* 提问卡的点只有 2px,模糊一大就会被白底抹平,所以比线路卡更透、更少糊 */ +body.command-home .ai-ask { + backdrop-filter: blur(6px) saturate(135%) !important; + -webkit-backdrop-filter: blur(6px) saturate(135%) !important; +} + body.command-home .ai-featured-routes__card { - backdrop-filter: blur(18px) saturate(155%) !important; - -webkit-backdrop-filter: blur(18px) saturate(155%) !important; + backdrop-filter: blur(18px) saturate(160%) !important; + -webkit-backdrop-filter: blur(18px) saturate(160%) !important; +} + +.ai-featured-routes__card::before { + content: ''; + position: absolute; + inset: 0; + z-index: 0; + border-radius: inherit; + pointer-events: none; + background: linear-gradient( + 180deg, + rgba(255, 255, 255, 0.55) 0%, + rgba(255, 255, 255, 0.05) 40%, + transparent 62% + ); +} + +.ai-featured-routes__card > * { + position: relative; + z-index: 1; } .ai-featured-routes__card:hover { @@ -3250,7 +3292,11 @@ body.command-home .ai-featured-routes__card { /* 奇数:正梯形 · 亮 */ .ai-intent-ribbon__item:nth-child(odd) .ai-intent-ribbon__face { - background: var(--ai-ribbon-light); + background: linear-gradient( + 180deg, + rgba(255, 255, 255, 0.96) 0%, + rgba(255, 255, 255, 0.62) 100% + ); clip-path: polygon( var(--ai-ribbon-cut) 0, calc(100% - var(--ai-ribbon-cut)) 0, @@ -3261,7 +3307,11 @@ body.command-home .ai-featured-routes__card { /* 偶数:反梯形 · 淡雾 */ .ai-intent-ribbon__item:nth-child(even) .ai-intent-ribbon__face { - background: var(--ai-ribbon-soft); + background: linear-gradient( + 180deg, + rgba(255, 255, 255, 0.84) 0%, + color-mix(in srgb, #d8e4ef 46%, rgba(255, 255, 255, 0.5)) 100% + ); clip-path: polygon( 0 0, 100% 0, @@ -3547,7 +3597,7 @@ body.command-home .ai-featured-routes__card { @media (prefers-reduced-motion: reduce) { .ai-welcome-plane img, .ai-welcome-airstrip, - .ai-welcome-compose-panel, + .ai-ask, .ai-welcome-trustline, .ai-intent-section, .ai-trust-bar { @@ -3579,15 +3629,19 @@ body.command-home .ai-featured-routes__card { height: 42px; } - body.command-home .ai-welcome-compose-panel { + body.command-home .ai-ask { padding: 12px 14px 10px; - border-radius: 18px; - box-shadow: none; + border-radius: 16px; } - body.command-home .ai-welcome-compose-panel .ai-welcome-cta-link { - top: 12px; - right: 14px; + body.command-home .ai-ask__dest { + min-height: 30px; + padding: 0 12px; + font-size: 0.78rem; + } + + body.command-home .ai-ask__hint { + margin-bottom: 8px; } body.command-home .ai-home-dests { @@ -4585,7 +4639,7 @@ body.command-home .ai-welcome-compose__lead { padding: 0 14px; border-radius: var(--ai-chip-radius, 999px); border: 1px solid rgba(18, 24, 32, 0.06); - background: rgba(255, 255, 255, 0.55); + background: rgba(255, 255, 255, 0.72); box-shadow: none; color: var(--ai-text-2); font-size: 0.84rem; @@ -4628,40 +4682,33 @@ body.command-home .ai-welcome-compose__lead { color: var(--ai-text-3); } -/* Welcome input — soft inner field, no heavy nested drop shadow */ +/* 输入框不再铺第二层白,点阵跟提问卡、线路卡是同一层 */ .ai-composer-slot--welcome .ai-composer { min-height: 56px; padding: 12px 12px 12px 18px; - border-radius: 16px; - border: 1px solid rgba(255, 255, 255, 0.9) !important; + border-radius: 14px; + border: 1px solid rgba(255, 255, 255, 0.66) !important; outline: none; - background: rgba(255, 255, 255, 0.72) !important; - backdrop-filter: blur(24px) saturate(170%) !important; - -webkit-backdrop-filter: blur(24px) saturate(170%) !important; - box-shadow: - inset 0 1px 0 rgba(255, 255, 255, 0.95), - inset 0 1px 6px rgba(15, 23, 42, 0.05) !important; + background: transparent !important; + backdrop-filter: none !important; + -webkit-backdrop-filter: none !important; + box-shadow: none !important; transition: - background 0.18s var(--ai-ease), - box-shadow 0.18s var(--ai-ease), - border-color 0.18s var(--ai-ease); + border-color 0.18s var(--ai-ease), + box-shadow 0.18s var(--ai-ease); } .ai-composer-slot--welcome .ai-composer::before, .ai-composer-slot--welcome .ai-composer::after { + content: none !important; display: none !important; } .ai-composer-slot--welcome .ai-composer:focus-within { - border-color: rgba(2, 62, 138, 0.28) !important; + border-color: rgba(255, 255, 255, 0.9) !important; outline: none; - background: rgba(255, 255, 255, 0.88) !important; - backdrop-filter: blur(28px) saturate(180%) !important; - -webkit-backdrop-filter: blur(28px) saturate(180%) !important; - box-shadow: - inset 0 1px 0 rgba(255, 255, 255, 1), - inset 0 1px 6px rgba(15, 23, 42, 0.06), - 0 0 0 3px rgba(2, 62, 138, 0.08) !important; + background: transparent !important; + box-shadow: 0 0 0 3px rgba(2, 62, 138, 0.08) !important; } .ai-composer-slot--welcome .ai-composer-input { @@ -4672,27 +4719,14 @@ body.command-home .ai-welcome-compose__lead { color: var(--ai-text-3, #66707d); } -.ai-composer-slot--welcome .ai-composer-send { - width: 40px; - height: 40px; - font-size: 1.1rem; - box-shadow: none; - background: var(--ai-brand, #023e8a); - color: #fff; -} - -.ai-composer-slot--welcome .ai-composer-send i { - font-size: 1rem; -} - -.ai-composer-slot--welcome .ai-composer-send:hover:not(:disabled):not(.is-empty) { - background: var(--ai-brand-hover, #012a74); - color: #fff; -} - +.ai-composer-slot--welcome .ai-composer-send, +.ai-composer-slot--welcome .ai-composer-send:hover:not(:disabled):not(.is-empty), .ai-composer-slot--welcome .ai-composer-send.is-empty { - background: color-mix(in srgb, var(--ai-brand, #023e8a) 42%, #c5d0db); - color: rgba(255, 255, 255, 0.88); + width: 32px; + height: 32px; + border-radius: 999px; + box-shadow: none; + transform: none; } .ai-composer-dock { @@ -4838,38 +4872,44 @@ body.command-home .ai-welcome-compose__lead { display: inline-flex; align-items: center; justify-content: center; - width: 52px; - height: 52px; + width: 32px; + height: 32px; border: none; - border-radius: 50%; - background: var(--ai-action); + border-radius: 999px; + background: #0d0d0d; color: #fff; - font-size: 1.35rem; - box-shadow: 0 0 0 4px var(--ai-bg); + box-shadow: none; cursor: pointer; - transition: background 0.2s var(--ai-ease), transform 0.15s var(--ai-ease); + transition: background 0.15s var(--ai-ease); } -.ai-composer-send i { - font-size: 1.2rem; - line-height: 1; +.ai-composer-send__mark { + display: block; + width: 18px; + height: 18px; + fill: none; + stroke: currentColor; + stroke-width: 2.25; + stroke-linecap: round; + stroke-linejoin: round; } -.ai-composer-send.is-empty { - background: color-mix(in srgb, var(--ai-text-3) 18%, #e9edf0); - color: color-mix(in srgb, var(--ai-text-3) 70%, #fff); +.ai-composer-send.is-empty, +.ai-composer-send.is-empty:hover { + background: #ececec; + color: #9a9a9a; cursor: default; transform: none; } -.ai-composer-send.is-empty:hover { - background: color-mix(in srgb, var(--ai-text-3) 18%, #e9edf0); +.ai-composer-send:hover:not(:disabled):not(.is-empty) { + background: #2f2f2f; transform: none; } -.ai-composer-send:hover:not(:disabled):not(.is-empty) { - background: var(--ai-action-hover); - transform: translateY(-1px); +.ai-composer-send:focus-visible { + outline: 2px solid #0d0d0d; + outline-offset: 2px; } .ai-composer-send:disabled { @@ -5337,69 +5377,31 @@ body.command-home .ai-welcome-compose__lead { padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px)); } - .ai-welcome-compose-panel { + .ai-ask { padding: 14px 14px 12px; - border-radius: 20px; } - .ai-welcome-compose-panel .ai-welcome-cta-link { - position: static; - display: flex; - align-items: center; - justify-content: center; - width: 100%; - min-height: 44px; - margin: 0 0 10px; - padding: 0 14px; - border-radius: 999px; - border: 1px solid color-mix(in srgb, var(--ai-accent, #e96a26) 28%, #fff); - background: color-mix(in srgb, var(--ai-accent, #e96a26) 12%, #fff); - color: var(--ai-accent, #e96a26); - font-size: 0.95rem; - font-weight: 700; - text-decoration: none; - box-shadow: 0 1px 2px rgba(233, 106, 38, 0.08); + .ai-ask__bar { + gap: 12px; } - .ai-welcome-compose-panel .ai-welcome-cta-link:hover, - .ai-welcome-compose-panel .ai-welcome-cta-link:focus { - color: #fff; - background: var(--ai-accent, #e96a26); - border-color: var(--ai-accent, #e96a26); - text-decoration: none; - } - - .ai-welcome-compose-panel .ai-welcome-compose__lead { - padding-right: 0; - padding-top: 0; - margin-bottom: 10px; - font-size: 0.92rem; - line-height: 1.45; - } - - .ai-home-dests { - display: flex; + .ai-ask__dests { + flex: 1; flex-wrap: nowrap; - gap: 8px; - margin-bottom: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; touch-action: pan-x; - mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 20px), transparent 100%); - -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 20px), transparent 100%); } - .ai-home-dests::-webkit-scrollbar { + .ai-ask__dests::-webkit-scrollbar { display: none; } - .ai-home-dest { + .ai-ask__dest { flex: 0 0 auto; min-height: 40px; - padding: 0 14px; - font-size: 0.88rem; } .ai-welcome-sub { @@ -5428,9 +5430,10 @@ body.command-home .ai-welcome-compose__lead { font-size: 16px; /* iOS 避免自动放大 */ } - .ai-composer-send { - width: 44px; - height: 44px; + .ai-composer-send, + .ai-composer-slot--welcome .ai-composer-send { + width: 32px; + height: 32px; } .ai-composer-dock { -- 2.45.2 From 3bde663e43a9944507b2444f2616441b31a4915f Mon Sep 17 00:00:00 2001 From: zzh <1368735060@qq.com> Date: Sat, 7 Nov 2026 15:39:00 +0800 Subject: [PATCH 03/11] =?UTF-8?q?feat:=20H5=20=E6=9F=A5=E4=BB=B7=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E6=B8=90=E5=85=A5=E6=B8=90=E5=87=BA=EF=BC=8C=E5=8A=A9?= =?UTF-8?q?=E6=89=8B=E5=8F=91=E9=80=81=E9=92=AE=E5=AF=B9=E9=BD=90=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E5=9C=86=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- .../NanaAssistant/AiAdvisorShell.vue | 21 +- .../h5/customer-center/assistant/index.vue | 70 ++++--- src/views/h5/customer-center/price/index.vue | 184 +++++++----------- 3 files changed, 136 insertions(+), 139 deletions(-) diff --git a/src/components/NanaAssistant/AiAdvisorShell.vue b/src/components/NanaAssistant/AiAdvisorShell.vue index 0d2fd5a..73dfda9 100644 --- a/src/components/NanaAssistant/AiAdvisorShell.vue +++ b/src/components/NanaAssistant/AiAdvisorShell.vue @@ -239,10 +239,19 @@
- +
@@ -338,35 +338,61 @@ function promptGuestRegister() { } :deep(.ai-composer-send) { - width: 40px; - height: 40px; - border-radius: 12px; - background: var(--app-primary-color); + width: 32px; + height: 32px; + border: none; + border-radius: 999px; + background: #0d0d0d; color: #fff; + box-shadow: none; opacity: 1; + transform: none; + filter: none; - .arco-icon, + .ai-composer-send__mark, svg { - width: 1.15em; - height: 1.15em; + display: block; + width: 18px; + height: 18px; + fill: none; + stroke: currentColor; + stroke-width: 2.25; + stroke-linecap: round; + stroke-linejoin: round; + } + + &.is-empty, + &.is-empty:hover { + background: #ececec; + color: #9a9a9a; + cursor: default; + transform: none; + filter: none; + } + + &:hover:not(:disabled):not(.is-empty) { + background: #2f2f2f; + transform: none; + filter: none; + } + + &:focus-visible { + outline: 2px solid #0d0d0d; + outline-offset: 2px; + } + + &:disabled:not(.is-empty) { + background: #0d0d0d; color: #fff; - fill: currentColor; - } - - &:disabled { - background: #e5e6eb; - color: #c9cdd4; - opacity: 1; + opacity: 0.45; cursor: not-allowed; - - .arco-icon, - svg { - color: #c9cdd4; - } + transform: none; + filter: none; } - &:not(:disabled):active { - filter: brightness(1.05); + &:not(:disabled):not(.is-empty):active { + background: #2f2f2f; + filter: none; } } diff --git a/src/views/h5/customer-center/price/index.vue b/src/views/h5/customer-center/price/index.vue index 820268f..76acbb4 100644 --- a/src/views/h5/customer-center/price/index.vue +++ b/src/views/h5/customer-center/price/index.vue @@ -218,40 +218,20 @@ class="h5-price-results" :aria-busy="queryLoading" > -
-
-

- {{ t('h5.price.resultCount', { n: sortedResults.length }) }} - · - {{ resultsBarTip }} -

-
- -
-
-
- - + +
+
@@ -271,10 +251,12 @@
+
- -
+
+
+
@@ -2034,11 +2037,6 @@ onMounted(() => { margin-top: 12px; } -.h5-ai-panel--in { - animation: h5-soft-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; - animation-delay: 0.18s; -} - .h5-ai-entry { width: 100%; height: 40px; @@ -2467,21 +2465,42 @@ onMounted(() => { } .h5-price-results { + position: relative; margin-top: 10px; } +/* 查价成功:骨架渐出、报价渐入,同时进行 */ +.h5-stage-enter-active, +.h5-stage-leave-active { + transition: opacity 0.42s ease; +} + +.h5-stage-enter-active { + z-index: 1; + transition-timing-function: ease-out; + transition-duration: 0.48s; +} + +.h5-stage-leave-active { + position: absolute; + z-index: 0; + top: 0; + right: 0; + left: 0; + transition-timing-function: ease-in; + transition-duration: 0.32s; + pointer-events: none; +} + +.h5-stage-enter-from, +.h5-stage-leave-to { + opacity: 0; +} + .h5-results-bar { margin-bottom: 8px; } -.h5-results-bar--in { - animation: h5-soft-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both; -} - -.h5-empty--in { - animation: h5-soft-in 0.36s cubic-bezier(0.22, 1, 0.36, 1) both; -} - .h5-results-bar__row { display: flex; align-items: center; @@ -2548,8 +2567,6 @@ onMounted(() => { border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); - animation: h5-soft-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; - animation-delay: calc(var(--i, 0) * 55ms); } .h5-quote-skel__head { @@ -2646,11 +2663,6 @@ onMounted(() => { text-align: left; transition: transform 0.2s ease, box-shadow 0.2s ease; - &--reveal { - animation: h5-quote-reveal 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; - animation-delay: calc(var(--i, 0) * 48ms); - } - &--ai { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--app-primary-color) 45%, transparent), @@ -2816,7 +2828,6 @@ onMounted(() => { white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.1; - will-change: filter, opacity, transform; small { font-size: 12px; @@ -2830,56 +2841,6 @@ onMounted(() => { } } -/* 价格:模糊 → 清晰(后于卡片半拍) */ -.h5-quote--reveal .h5-quote__price { - animation: h5-price-figure 0.52s cubic-bezier(0.22, 1, 0.36, 1) both; - animation-delay: calc(var(--i, 0) * 48ms + 90ms); -} - -.h5-quote--reveal .ref-label { - animation: h5-soft-in 0.36s cubic-bezier(0.22, 1, 0.36, 1) both; - animation-delay: calc(var(--i, 0) * 48ms + 140ms); -} - -@keyframes h5-soft-in { - from { - opacity: 0; - transform: translateY(6px); - } - to { - opacity: 1; - transform: translateY(0); - } -} - -@keyframes h5-quote-reveal { - from { - opacity: 0; - transform: translateY(10px); - } - to { - opacity: 1; - transform: translateY(0); - } -} - -@keyframes h5-price-figure { - from { - opacity: 0.25; - filter: blur(6px); - transform: translateY(3px) scale(0.99); - } - 55% { - opacity: 1; - filter: blur(1.2px); - } - to { - opacity: 1; - filter: blur(0); - transform: translateY(0) scale(1); - } -} - @keyframes h5-skel-shimmer { 0% { background-position: 100% 0; @@ -2905,22 +2866,15 @@ onMounted(() => { } @media (prefers-reduced-motion: reduce) { - .h5-results-bar--in, - .h5-empty--in, - .h5-ai-panel--in, - .h5-quote-skel, - .h5-quote--reveal, - .h5-quote--reveal .h5-quote__price, - .h5-quote--reveal .ref-label, + .h5-stage-enter-active, + .h5-stage-leave-active { + transition: none !important; + } + .quote-collapsed__pulse, .h5-quote-skel__bone { animation: none !important; } - - .h5-quote--reveal .h5-quote__price { - filter: none; - opacity: 1; - } } .h5-quote__actions { -- 2.45.2 From f77c47898174d514a26b00e595fde9584118fa46 Mon Sep 17 00:00:00 2001 From: zzh <1368735060@qq.com> Date: Sat, 7 Nov 2026 17:56:13 +0800 Subject: [PATCH 04/11] =?UTF-8?q?feat:=20=E5=A4=A7=E5=8C=85/=E4=B8=BB?= =?UTF-8?q?=E5=8D=95=E7=AE=A1=E7=90=86=E6=89=93=E5=8D=B0=E9=9D=A2=E5=8D=95?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E4=BC=98=E5=8C=96=E4=BB=B7=E6=A0=BC=E8=A1=A8?= =?UTF-8?q?=E5=85=AC=E5=BC=8F=E4=B8=8B=E6=8B=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 管理页支持选模板批量打印;标签设计增加大包/主单类型;价格表计算公式改为轻量选项菜单。 Co-authored-by: Cursor --- generate-menu-excel.js | 45 ++ src/api/operation/shipContainer.ts | 204 +++++ src/components/top-nav/RightTopUser.vue | 7 +- src/components/top-nav/index.vue | 3 + src/constants/pageButtonCatalog.ts | 27 + src/locale/en-US.ts | 6 + src/locale/kb/en-US.ts | 1 + src/locale/kb/zh-CN.ts | 1 + src/locale/zh-CN.ts | 6 + src/router/routes/newModules/knowledge.ts | 16 + src/router/routes/newModules/operation.ts | 54 +- src/utils/menu-i18n.ts | 5 + src/utils/menu-icon.ts | 3 + src/utils/route-name-mapper.ts | 16 + src/utils/workplace-care.ts | 21 +- .../channel/composables/useKpiAreaPage.ts | 5 +- src/views/channel/issueTemplate/index.vue | 3 +- src/views/channel/labelDesign/index.vue | 2 + .../components/PriceListHotTable.vue | 275 ++++++- src/views/channel/weightRules/index.vue | 5 +- .../workplace/components/AdminWorkplace.vue | 8 + src/views/home/workplace/locale/en-US.ts | 2 + src/views/home/workplace/locale/zh-CN.ts | 2 + src/views/kb/training/TrainingChecklist.vue | 146 ++++ src/views/kb/training/TrainingRolePicker.vue | 103 +++ src/views/kb/training/checklist-items.ts | 111 +++ src/views/kb/training/handbook-checklist.md | 52 ++ src/views/kb/training/handbook-overview.md | 111 +++ src/views/kb/training/handbook-practice.md | 54 ++ src/views/kb/training/handbook-scripts.md | 61 ++ src/views/kb/training/handbook-week1.md | 58 ++ src/views/kb/training/handbook-week2.md | 94 +++ src/views/kb/training/handbook-week3.md | 95 +++ src/views/kb/training/handbook-week4.md | 91 +++ src/views/kb/training/index.vue | 129 +++ src/views/kb/training/useTrainingProgress.ts | 109 +++ src/views/operation/bagManage/index.vue | 684 ++++++++++++++++ src/views/operation/bagPack/index.vue | 704 +++++++++++++++++ src/views/operation/masterBill/index.vue | 732 ++++++++++++++++++ src/views/operation/masterBoard/index.vue | 597 ++++++++++++++ src/views/operation/outboundScan/index.vue | 56 +- src/views/operation/printLabel/index.vue | 3 + src/views/operation/styles/ops-scan-page.less | 75 ++ src/views/order/orderColumnLabelsZh.ts | 2 + src/views/order/waybillManage/columnConfig.ts | 2 + src/views/order/waybillManage/index.vue | 2 + src/views/user/profile/ProfilePanel.vue | 3 +- vite.config.ts | 11 +- 48 files changed, 4769 insertions(+), 33 deletions(-) create mode 100644 src/api/operation/shipContainer.ts create mode 100644 src/views/kb/training/TrainingChecklist.vue create mode 100644 src/views/kb/training/TrainingRolePicker.vue create mode 100644 src/views/kb/training/checklist-items.ts create mode 100644 src/views/kb/training/handbook-checklist.md create mode 100644 src/views/kb/training/handbook-overview.md create mode 100644 src/views/kb/training/handbook-practice.md create mode 100644 src/views/kb/training/handbook-scripts.md create mode 100644 src/views/kb/training/handbook-week1.md create mode 100644 src/views/kb/training/handbook-week2.md create mode 100644 src/views/kb/training/handbook-week3.md create mode 100644 src/views/kb/training/handbook-week4.md create mode 100644 src/views/kb/training/index.vue create mode 100644 src/views/kb/training/useTrainingProgress.ts create mode 100644 src/views/operation/bagManage/index.vue create mode 100644 src/views/operation/bagPack/index.vue create mode 100644 src/views/operation/masterBill/index.vue create mode 100644 src/views/operation/masterBoard/index.vue diff --git a/generate-menu-excel.js b/generate-menu-excel.js index 1e97c56..8c92029 100644 --- a/generate-menu-excel.js +++ b/generate-menu-excel.js @@ -688,6 +688,51 @@ const menuData = [ hideInMenu: false, parentRoute: '/system', }, + + // 一级菜单 - 知识库 + { + level: 1, + name: '知识库', + permissionCode: 'Knowledge', + route: '/kb', + component: null, + icon: 'icon-book', + order: 8, + hideInMenu: false, + }, + { + level: 2, + name: '培训手册', + permissionCode: 'Knowledge.Training', + route: '/kb/training', + component: 'views/kb/training/index', + icon: 'icon-book', + order: 0, + hideInMenu: false, + parentRoute: '/kb', + }, + { + level: 2, + name: '分类管理', + permissionCode: 'Knowledge.Category', + route: '/kb/category', + component: 'views/kb/category/index', + icon: null, + order: 1, + hideInMenu: false, + parentRoute: '/kb', + }, + { + level: 2, + name: '文章管理', + permissionCode: 'Knowledge.Article', + route: '/kb/article', + component: 'views/kb/article/index', + icon: null, + order: 2, + hideInMenu: false, + parentRoute: '/kb', + }, ]; // 生成 CSV 内容(UTF-8 BOM 以便 Excel 正确识别中文) diff --git a/src/api/operation/shipContainer.ts b/src/api/operation/shipContainer.ts new file mode 100644 index 0000000..65d0a0e --- /dev/null +++ b/src/api/operation/shipContainer.ts @@ -0,0 +1,204 @@ +import { axiosInstance } from '@/api/rbac' +import { assertBusinessOk, omsUrl, unwrapData } from '@/api/oms/common' + +function post(path: string, body?: unknown): Promise { + return axiosInstance.post(omsUrl(path), body).then((res) => { + assertBusinessOk(res.data) + return unwrapData(res.data) as T + }) +} + +function get(path: string, params?: Record): Promise { + return axiosInstance.get(omsUrl(path), { params }).then((res) => { + assertBusinessOk(res.data) + return unwrapData(res.data) as T + }) +} + +export type ShipBagItem = { + id: number + orderId: number + waybillNo: string + orderStatus?: string + orderStatusName?: string + consigneeCountry?: string +} + +export type ShipBag = { + id: number + bagNo: string + bagType: string + status: string + statusName?: string + warehouseId?: number + destinationCountry?: string + destinationPort?: string + channelCode?: string + length?: number + width?: number + height?: number + weight?: number + parcelCount: number + sealTime?: string + shipTime?: string + masterId?: number + remark?: string + createTime?: string + items?: ShipBagItem[] +} + +export type ShipMasterItem = { + id: number + itemType: string + bagId?: number + bagNo?: string + orderId?: number + waybillNo?: string +} + +export type ShipMaster = { + id: number + masterNo: string + externalMawb?: string + status: string + statusName?: string + warehouseId?: number + destinationCountry?: string + destinationPort?: string + flightOrVoyage?: string + length?: number + width?: number + height?: number + weight?: number + bagCount: number + parcelCount: number + sealTime?: string + handTime?: string + remark?: string + createTime?: string + items?: ShipMasterItem[] +} + +export type ShipBagMetaInput = { + bagNo: string + destinationCountry?: string + destinationPort?: string + channelCode?: string + length?: number | null + width?: number | null + height?: number | null + weight?: number | null + remark?: string +} + +export type ShipMasterMetaInput = { + masterNo: string + destinationCountry?: string + destinationPort?: string + flightOrVoyage?: string + length?: number | null + width?: number | null + height?: number | null + weight?: number | null + remark?: string +} + +export type ShipPageResult = { items: T[]; total: number } + +export const createShipBag = (body: { + bagType?: string + warehouseId?: number + destinationCountry?: string + channelCode?: string + remark?: string +}) => post('/operation/bag/create', body) + +export const addParcelToBag = (bagNo: string, waybillNo: string) => + post('/operation/bag/add-parcel', { bagNo, waybillNo }) + +export const removeParcelFromBag = (bagNo: string, waybillNo: string) => + post('/operation/bag/remove-parcel', { bagNo, waybillNo }) + +export const sealShipBag = (bagNo: string) => post('/operation/bag/seal', { bagNo }) + +export const voidShipBag = (bagNo: string) => post('/operation/bag/void', { bagNo }) + +export const updateShipBagMeta = (body: ShipBagMetaInput) => + post('/operation/bag/update-meta', body) + +export const getShipBag = (bagNo: string) => get('/operation/bag/get', { bagNo }) + +export const pageShipBags = (body: { + pageIndex?: number + pageSize?: number + keyword?: string + status?: string + warehouseId?: number +}) => post>('/operation/bag/page', body) + +export type ShipPrintLabelItem = { + bagNo?: string + masterNo?: string + printUrl: string +} + +export type ShipPrintLabelsResult = { + templateName?: string + items: ShipPrintLabelItem[] +} + +/** POST /operation/bag/print-labels */ +export const printShipBagLabels = (body: { bagNos: string[]; labelTemplateId?: number }) => + post('/operation/bag/print-labels', body) + +export const outboundByBag = (bagNo: string, warehouseId?: number) => + post<{ bagNo: string; successCount: number; waybillNos: string[] }>( + '/operation/outbound/bag-create', + { bagNo, warehouseId }, + ) + +export const createShipMaster = (body: { + warehouseId?: number + destinationCountry?: string + flightOrVoyage?: string + externalMawb?: string + remark?: string +}) => post('/operation/master/create', body) + +export const addBagToMaster = (masterNo: string, bagNo: string) => + post('/operation/master/add-bag', { masterNo, bagNo }) + +export const addParcelToMaster = (masterNo: string, waybillNo: string) => + post('/operation/master/add-parcel', { masterNo, waybillNo }) + +export const removeMasterItem = (masterNo: string, itemId: number) => + post('/operation/master/remove-item', { masterNo, itemId }) + +export const sealShipMaster = (masterNo: string) => + post('/operation/master/seal', { masterNo }) + +export const bindMasterMawb = (masterNo: string, externalMawb: string, flightOrVoyage?: string) => + post('/operation/master/bind-mawb', { masterNo, externalMawb, flightOrVoyage }) + +export const updateShipMasterMeta = (body: ShipMasterMetaInput) => + post('/operation/master/update-meta', body) + +export const handOverMaster = (masterNo: string) => + post('/operation/master/hand-over', { masterNo }) + +export const getShipMaster = (masterNo: string) => + get('/operation/master/get', { masterNo }) + +export const pageShipMasters = (body: { + pageIndex?: number + pageSize?: number + keyword?: string + status?: string + warehouseId?: number +}) => post>('/operation/master/page', body) + +/** POST /operation/master/print-labels */ +export const printShipMasterLabels = (body: { + masterNos: string[] + labelTemplateId?: number +}) => post('/operation/master/print-labels', body) diff --git a/src/components/top-nav/RightTopUser.vue b/src/components/top-nav/RightTopUser.vue index a416554..4a6f729 100644 --- a/src/components/top-nav/RightTopUser.vue +++ b/src/components/top-nav/RightTopUser.vue @@ -465,11 +465,8 @@ const pwdForm = reactive({ confirmPassword: '', }); -function validateConfirmPassword( - _rule: unknown, - value: string, - callback: (error?: string) => void -) { +// Arco Form:validator(value, callback) +function validateConfirmPassword(value: string, callback: (error?: string) => void) { if (value !== pwdForm.newPassword) { callback(t('profile.passwordMismatch')); } else { diff --git a/src/components/top-nav/index.vue b/src/components/top-nav/index.vue index d6013c7..75b5987 100644 --- a/src/components/top-nav/index.vue +++ b/src/components/top-nav/index.vue @@ -1015,6 +1015,9 @@ const pathToRouteNameMap: Record = { '/channel/guide': 'ChannelGuide', '/marketing/guide': 'MarketingGuide', '/order/guide': 'OrderGuide', + '/kb/training': 'KbTraining', + '/kb/category': 'KbCategory', + '/kb/article': 'KbArticle', // Track 相关路由 '/track/guide': 'TrackGuide', '/track/order': 'TrackOrder', diff --git a/src/constants/pageButtonCatalog.ts b/src/constants/pageButtonCatalog.ts index 69bd4e8..828dea0 100644 --- a/src/constants/pageButtonCatalog.ts +++ b/src/constants/pageButtonCatalog.ts @@ -310,6 +310,10 @@ export const PAGE_BUTTON_PARENT_ALIASES: Record = { 'Warehouse.BinLocation.Query': 'Warehouse.BinLocation', 'Operation.InboundScan.Query': 'Operation.InboundScan', 'Operation.OutboundScan.Query': 'Operation.OutboundScan', + 'Operation.BagPack.Query': 'Operation.BagPack', + 'Operation.BagManage.Query': 'Operation.BagManage', + 'Operation.MasterBoard.Query': 'Operation.MasterBoard', + 'Operation.MasterBill.Query': 'Operation.MasterBill', 'Operation.PrintLabel.Query': 'Operation.PrintLabel', 'Operation.FulfillPack.Query': 'Operation.FulfillPack', 'Operation.FulfillPack.BatchPrint': 'Operation.FulfillPack', @@ -806,6 +810,28 @@ const CORE_GROUPS: PageButtonGroup[] = [ { code: 'Reset', name: '重置' }, { code: 'Outbound', name: '出库' }, ]), + B('Operation.BagPack', [ + { code: 'Query', name: '查询' }, + { code: 'Create', name: '开袋' }, + { code: 'Seal', name: '封袋' }, + ]), + B('Operation.BagManage', [ + { code: 'Query', name: '查询' }, + { code: 'Seal', name: '封袋' }, + { code: 'Void', name: '作废' }, + { code: 'BatchPrint', name: '批量打印' }, + ]), + B('Operation.MasterBoard', [ + { code: 'Query', name: '查询' }, + { code: 'Create', name: '开主单' }, + { code: 'Seal', name: '封板' }, + ]), + B('Operation.MasterBill', [ + { code: 'Query', name: '查询' }, + { code: 'BindMawb', name: '绑MAWB' }, + { code: 'HandOver', name: '交运' }, + { code: 'BatchPrint', name: '批量打印' }, + ]), B('Operation.PrintLabel', [ { code: 'Query', name: '查询' }, { code: 'Reset', name: '重置' }, @@ -959,6 +985,7 @@ const CORE_GROUPS: PageButtonGroup[] = [ ]), // ── 知识库 ── + B('Knowledge.Training', []), B('Knowledge.Category', [ { code: 'Query', name: '查询' }, { code: 'Knowledge.Category.Edit', name: '编辑' }, diff --git a/src/locale/en-US.ts b/src/locale/en-US.ts index 878d5ca..e509baa 100644 --- a/src/locale/en-US.ts +++ b/src/locale/en-US.ts @@ -1219,6 +1219,10 @@ export default { 'menu.operation': 'Operation', 'menu.operation.inboundScan': 'Inbound Scan', 'menu.operation.outboundScan': 'Outbound Scan', + 'menu.operation.bagPack': 'Bag Packing', + 'menu.operation.bagManage': 'Bag Manage', + 'menu.operation.masterBoard': 'Master Boarding', + 'menu.operation.masterBill': 'Master Bill', 'menu.operation.printLabel': 'Print Label', 'menu.operation.parcelArrival': 'Parcel Arrival', 'menu.operation.fulfillPack': 'Fulfill Pack & Outbound', @@ -4233,6 +4237,8 @@ export default { 'operation.printLabel.labelTemplate.outbound': 'Outbound Label', 'operation.printLabel.labelTemplate.sku': 'SKU Label', 'operation.printLabel.labelTemplate.box': 'Box Mark Label', + 'operation.printLabel.labelTemplate.shipBag': 'Ship Bag Label', + 'operation.printLabel.labelTemplate.shipMaster': 'Ship Master Label', 'operation.printLabel.preview.title': 'Label preview', 'operation.printLabel.preview.empty': 'Scan a number to show order info; open Preview when needed', 'operation.printLabel.preview.product': 'Product', diff --git a/src/locale/kb/en-US.ts b/src/locale/kb/en-US.ts index 1681b51..f2f93cd 100644 --- a/src/locale/kb/en-US.ts +++ b/src/locale/kb/en-US.ts @@ -1,5 +1,6 @@ export default { 'menu.kb': 'Knowledge Base', + 'menu.kb.training': 'Training Handbook', 'menu.kb.category': 'Categories', 'menu.kb.article': 'Articles', diff --git a/src/locale/kb/zh-CN.ts b/src/locale/kb/zh-CN.ts index e989265..326d82b 100644 --- a/src/locale/kb/zh-CN.ts +++ b/src/locale/kb/zh-CN.ts @@ -1,5 +1,6 @@ export default { 'menu.kb': '知识库', + 'menu.kb.training': '培训手册', 'menu.kb.category': '分类管理', 'menu.kb.article': '文章管理', diff --git a/src/locale/zh-CN.ts b/src/locale/zh-CN.ts index f12292e..b7b7a4a 100644 --- a/src/locale/zh-CN.ts +++ b/src/locale/zh-CN.ts @@ -1209,6 +1209,10 @@ export default { 'menu.operation': '操作', 'menu.operation.inboundScan': '入库扫描', 'menu.operation.outboundScan': '出库扫描', + 'menu.operation.bagPack': '装袋作业', + 'menu.operation.bagManage': '大包管理', + 'menu.operation.masterBoard': '打板作业', + 'menu.operation.masterBill': '主单管理', 'menu.operation.printLabel': '打印标签', 'menu.operation.parcelArrival': '快递到仓', 'menu.operation.fulfillPack': '代发打包出库', @@ -4256,6 +4260,8 @@ export default { 'operation.printLabel.labelTemplate.outbound': '出库标签', 'operation.printLabel.labelTemplate.sku': 'sku标签', 'operation.printLabel.labelTemplate.box': '箱唛标签', + 'operation.printLabel.labelTemplate.shipBag': '大包标签', + 'operation.printLabel.labelTemplate.shipMaster': '主单标签', 'operation.printLabel.preview.title': '面单预览', 'operation.printLabel.preview.empty': '扫描单号后显示订单信息,需要时可点预览查看面单', 'operation.printLabel.preview.product': '销售产品', diff --git a/src/router/routes/newModules/knowledge.ts b/src/router/routes/newModules/knowledge.ts index 4fbb87b..6e60950 100644 --- a/src/router/routes/newModules/knowledge.ts +++ b/src/router/routes/newModules/knowledge.ts @@ -12,6 +12,20 @@ const KNOWLEDGE: AppRouteRecordRaw = { order: 8, }, children: [ + { + path: 'training', + name: 'KbTraining', + component: () => import('@/views/kb/training/index.vue'), + meta: { + locale: 'menu.kb.training', + requiresAuth: true, + // 供菜单管理「同步子菜单及按钮」写入二级菜单权限码(不走路由守卫) + menuPermission: 'Knowledge.Training', + order: 0, + icon: 'icon-book', + adminPortalOnly: true, + }, + }, { path: 'category', name: 'KbCategory', @@ -20,6 +34,7 @@ const KNOWLEDGE: AppRouteRecordRaw = { locale: 'menu.kb.category', requiresAuth: true, permission: 'Knowledge.Category.Query', + menuPermission: 'Knowledge.Category', order: 1, }, }, @@ -31,6 +46,7 @@ const KNOWLEDGE: AppRouteRecordRaw = { locale: 'menu.kb.article', requiresAuth: true, permission: 'Knowledge.Article.Query', + menuPermission: 'Knowledge.Article', order: 2, }, }, diff --git a/src/router/routes/newModules/operation.ts b/src/router/routes/newModules/operation.ts index 65ef21a..54931aa 100644 --- a/src/router/routes/newModules/operation.ts +++ b/src/router/routes/newModules/operation.ts @@ -34,6 +34,54 @@ const OPERATION: AppRouteRecordRaw = { order: 2, }, }, + { + path: 'bagPack', + name: 'BagPack', + component: () => import('@/views/operation/bagPack/index.vue'), + meta: { + locale: 'menu.operation.bagPack', + requiresAuth: true, + permission: 'Operation.BagPack.Query', + menuPermission: 'Operation.BagPack', + order: 3, + }, + }, + { + path: 'bagManage', + name: 'BagManage', + component: () => import('@/views/operation/bagManage/index.vue'), + meta: { + locale: 'menu.operation.bagManage', + requiresAuth: true, + permission: 'Operation.BagManage.Query', + menuPermission: 'Operation.BagManage', + order: 4, + }, + }, + { + path: 'masterBoard', + name: 'MasterBoard', + component: () => import('@/views/operation/masterBoard/index.vue'), + meta: { + locale: 'menu.operation.masterBoard', + requiresAuth: true, + permission: 'Operation.MasterBoard.Query', + menuPermission: 'Operation.MasterBoard', + order: 5, + }, + }, + { + path: 'masterBill', + name: 'MasterBill', + component: () => import('@/views/operation/masterBill/index.vue'), + meta: { + locale: 'menu.operation.masterBill', + requiresAuth: true, + permission: 'Operation.MasterBill.Query', + menuPermission: 'Operation.MasterBill', + order: 6, + }, + }, { path: 'printLabel', name: 'PrintLabel', @@ -42,7 +90,7 @@ const OPERATION: AppRouteRecordRaw = { locale: 'menu.operation.printLabel', requiresAuth: true, permission: 'Operation.PrintLabel', - order: 3, + order: 7, }, }, { @@ -53,7 +101,7 @@ const OPERATION: AppRouteRecordRaw = { locale: 'menu.operation.parcelArrival', requiresAuth: true, permission: 'Operation.ParcelArrival.Query', - order: 4, + order: 8, }, }, { @@ -64,7 +112,7 @@ const OPERATION: AppRouteRecordRaw = { locale: 'menu.operation.fulfillPack', requiresAuth: true, permission: 'Operation.FulfillPack', - order: 5, + order: 9, }, }, ], diff --git a/src/utils/menu-i18n.ts b/src/utils/menu-i18n.ts index d6a64bd..a67a351 100644 --- a/src/utils/menu-i18n.ts +++ b/src/utils/menu-i18n.ts @@ -59,6 +59,10 @@ export const MENU_NAME_TO_LOCALE_KEY: Record = { 操作: 'menu.operation', 入库扫描: 'menu.operation.inboundScan', 出库扫描: 'menu.operation.outboundScan', + 装袋作业: 'menu.operation.bagPack', + 大包管理: 'menu.operation.bagManage', + 打板作业: 'menu.operation.masterBoard', + 主单管理: 'menu.operation.masterBill', 打印标签: 'menu.operation.printLabel', 快递到仓: 'menu.operation.parcelArrival', API: 'menu.api', @@ -109,6 +113,7 @@ export const MENU_NAME_TO_LOCALE_KEY: Record = { 技能卡片: 'menu.xhs.skills', 拟人设置: 'menu.xhs.humanSettings', 知识库: 'menu.kb', + 培训手册: 'menu.kb.training', 分类管理: 'menu.kb.category', 文章管理: 'menu.kb.article', } diff --git a/src/utils/menu-icon.ts b/src/utils/menu-icon.ts index 89a585a..79cb9e7 100644 --- a/src/utils/menu-icon.ts +++ b/src/utils/menu-icon.ts @@ -12,6 +12,7 @@ export const TOP_MENU_DEFAULT_ICONS: Record = { 'menu.operation': 'IconSettings', 'menu.api': 'IconComputer', 'menu.system': 'IconSettings', + 'menu.kb': 'IconBook', 'menu.xhs': 'IconBook', } @@ -31,6 +32,7 @@ export const SUB_MENU_DEFAULT_ICONS: Record = { 'menu.finance.rechargeRecord': 'IconList', 'menu.finance.accountFlow': 'IconSwap', 'menu.finance.receivablePayable': 'IconFile', + 'menu.kb.training': 'IconBook', 'menu.order.orderGuide': 'IconBook', 'menu.order.priceCheck': 'IconSearch', 'menu.order.placeOrder': 'IconPlus', @@ -127,6 +129,7 @@ export const PATH_TO_LOCALE_KEY: Record = { '/order/guide': 'menu.order.orderGuide', '/channel/guide': 'menu.channel.channelGuide', '/marketing/guide': 'menu.marketing.marketingGuide', + '/kb/training': 'menu.kb.training', '/agentAdmin/list': 'menu.agentAdmin.list', '/agentAdmin/commission': 'menu.agentAdmin.commission', } diff --git a/src/utils/route-name-mapper.ts b/src/utils/route-name-mapper.ts index a392d62..e1770ea 100644 --- a/src/utils/route-name-mapper.ts +++ b/src/utils/route-name-mapper.ts @@ -22,6 +22,14 @@ const routeNameMap: Record = { '/order/guide': 'OrderGuide', 'order': 'Order', '/order': 'Order', + 'operation_bag_pack': 'BagPack', + '/operation/bagPack': 'BagPack', + 'operation_bag_manage': 'BagManage', + '/operation/bagManage': 'BagManage', + 'operation_master_board': 'MasterBoard', + '/operation/masterBoard': 'MasterBoard', + 'operation_master_bill': 'MasterBill', + '/operation/masterBill': 'MasterBill', // 首页相关 'home_workplace': 'Workplace', @@ -118,6 +126,14 @@ const routeNameMap: Record = { '/marketing': 'Marketing', 'marketing_guide': 'MarketingGuide', '/marketing/guide': 'MarketingGuide', + 'kb': 'Knowledge', + '/kb': 'Knowledge', + 'kb_training': 'KbTraining', + '/kb/training': 'KbTraining', + 'kb_category': 'KbCategory', + '/kb/category': 'KbCategory', + 'kb_article': 'KbArticle', + '/kb/article': 'KbArticle', 'channel_sales_products': 'SalesProducts', '/channel/salesProducts': 'SalesProducts', 'channel_service_channels': 'ServiceChannels', diff --git a/src/utils/workplace-care.ts b/src/utils/workplace-care.ts index 9f8c04f..f7047be 100644 --- a/src/utils/workplace-care.ts +++ b/src/utils/workplace-care.ts @@ -49,6 +49,7 @@ export function resolveCareRoleTone(hasRole: (code: string) => boolean): CareRol /** 员工工作台常用入口:按角色 3~4 个,避免与「今日待办」数字入口重复 */ export type AdminQuickLinkKey = + | 'training' | 'warning' | 'waybill' | 'track' @@ -59,20 +60,28 @@ export function resolveAdminQuickLinkKeys( hasRole: (code: string) => boolean, ): AdminQuickLinkKey[] { const tone = resolveCareRoleTone(hasRole) + let roleLinks: AdminQuickLinkKey[] switch (tone) { case 'finance': - return ['waybill', 'price', 'track'] + roleLinks = ['waybill', 'price', 'track'] + break case 'cs': - return ['waybill', 'track', 'pickup'] + roleLinks = ['waybill', 'track', 'pickup'] + break case 'ops': - return ['waybill', 'pickup', 'track'] + roleLinks = ['waybill', 'pickup', 'track'] + break case 'track': - return ['warning', 'track', 'waybill'] + roleLinks = ['warning', 'track', 'waybill'] + break case 'sales': - return ['waybill', 'price', 'track'] + roleLinks = ['waybill', 'price', 'track'] + break default: - return ['waybill', 'track', 'pickup', 'price'] + roleLinks = ['waybill', 'track', 'pickup', 'price'] } + // 培训手册置顶,方便新人;总量仍控制在 4 个以内 + return ['training', ...roleLinks.filter((k) => k !== 'training')].slice(0, 4) } /** 待办卡紧急度:有量时问题件 / 理赔优先 */ diff --git a/src/views/channel/composables/useKpiAreaPage.ts b/src/views/channel/composables/useKpiAreaPage.ts index 41f79b9..08d5a79 100644 --- a/src/views/channel/composables/useKpiAreaPage.ts +++ b/src/views/channel/composables/useKpiAreaPage.ts @@ -462,14 +462,15 @@ export function useKpiAreaPage(areaType: KpiAreaType) { trigger: 'change', }, { - validator: (_rule: any, value: any, callback: any) => { + // Arco Form:validator(value, callback),不要写成 AntD 的 (rule, value, callback) + validator: (value: any, callback: (error?: string) => void) => { if ( model.matchMode === 'range' && model.leftPostCode && value && isPostcodeRangeInvalid(String(model.leftPostCode).trim(), String(value).trim()) ) { - callback(new Error(t('channel.area.form.rules.postcodeRangeInvalid'))); + callback(t('channel.area.form.rules.postcodeRangeInvalid')); } else { callback(); } diff --git a/src/views/channel/issueTemplate/index.vue b/src/views/channel/issueTemplate/index.vue index 3f2921e..0a3127d 100644 --- a/src/views/channel/issueTemplate/index.vue +++ b/src/views/channel/issueTemplate/index.vue @@ -352,7 +352,8 @@ const formItemList = computed(() => { ifShow: () => formState.handlerType === 'user', rules: [ { - validator: (_rule: unknown, value: number | undefined, callback: (error?: string) => void) => { + // Arco Form:validator(value, callback) + validator: (value: number | undefined, callback: (error?: string) => void) => { if (formState.handlerType !== 'user') { callback() return diff --git a/src/views/channel/labelDesign/index.vue b/src/views/channel/labelDesign/index.vue index 16c236f..ce3685c 100644 --- a/src/views/channel/labelDesign/index.vue +++ b/src/views/channel/labelDesign/index.vue @@ -201,6 +201,8 @@ const typeOptions = computed(() => [ { value: 'outbound', label: t('operation.printLabel.labelTemplate.outbound') }, { value: 'sku', label: t('operation.printLabel.labelTemplate.sku') }, { value: 'box', label: t('operation.printLabel.labelTemplate.box') }, + { value: 'shipBag', label: t('operation.printLabel.labelTemplate.shipBag') }, + { value: 'shipMaster', label: t('operation.printLabel.labelTemplate.shipMaster') }, ]) function typeLabel(type?: string) { diff --git a/src/views/channel/salesProducts/components/PriceListHotTable.vue b/src/views/channel/salesProducts/components/PriceListHotTable.vue index 41449ba..5076821 100644 --- a/src/views/channel/salesProducts/components/PriceListHotTable.vue +++ b/src/views/channel/salesProducts/components/PriceListHotTable.vue @@ -6,10 +6,39 @@ :class="{ 'is-ready': ready }" >
+ + +
+
+ +
+
+
+ + + + diff --git a/src/views/kb/training/TrainingRolePicker.vue b/src/views/kb/training/TrainingRolePicker.vue new file mode 100644 index 0000000..9e63f00 --- /dev/null +++ b/src/views/kb/training/TrainingRolePicker.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/src/views/kb/training/checklist-items.ts b/src/views/kb/training/checklist-items.ts new file mode 100644 index 0000000..8d457ea --- /dev/null +++ b/src/views/kb/training/checklist-items.ts @@ -0,0 +1,111 @@ +export type TrainingWeekKey = 'week1' | 'week2' | 'week3' | 'week4' | 'practice' | 'exam' +export type TrainingRoleKey = 'all' | 'cs' | 'channel' | 'warehouse' | 'implement' + +export interface TrainingChecklistItem { + id: string + week: TrainingWeekKey + label: string + /** 为空表示全岗位;否则仅这些岗位强调 */ + roles?: TrainingRoleKey[] +} + +export const TRAINING_ROLES: { key: TrainingRoleKey; label: string; summary: string }[] = [ + { + key: 'all', + label: '通才 / 未定岗', + summary: '四周全学,约 20 个工作日', + }, + { + key: 'cs', + label: '客服', + summary: '第1+3周为主,第4周轨迹扫一眼;约 12 个工作日', + }, + { + key: 'channel', + label: '渠道运营', + summary: '第2周深挖 + 第3周待排货;第1周快速过;约 12 个工作日', + }, + { + key: 'warehouse', + label: '仓管 / 操作', + summary: '第1周状态 + 第3周入库出库;约 8~10 个工作日', + }, + { + key: 'implement', + label: '实施 / 对接', + summary: '第1周主线 + 第4周轨迹/API;约 10 个工作日', + }, +] + +/** 岗位建议学习的周次(用于课表提示) */ +export const ROLE_WEEK_FOCUS: Record = { + all: ['week1', 'week2', 'week3', 'week4', 'practice', 'exam'], + cs: ['week1', 'week3', 'week4', 'practice', 'exam'], + channel: ['week1', 'week2', 'week3', 'practice', 'exam'], + warehouse: ['week1', 'week3', 'practice', 'exam'], + implement: ['week1', 'week4', 'practice', 'exam'], +} + +export const CHECKLIST_ITEMS: TrainingChecklistItem[] = [ + // 练习包 + { id: 'practice.customer-register', week: 'practice', label: '测服自行注册客户账号(网页端 /login)' }, + { id: 'practice.admin-access', week: 'practice', label: '拿到或申请运营端账号(/admin),权限含订单/渠道/轨迹' }, + { id: 'practice.pick-product', week: 'practice', label: '选定一条已启用销售产品作为练习线(现有产品即可)' }, + { id: 'practice.happy-path', week: 'practice', label: '跑通幸福路径:查价→下单→入库→付款→出库' }, + { id: 'practice.pending-alloc', week: 'practice', label: '人为制造一票待排货,再修好变为待支付' }, + { id: 'practice.draft-fail', week: 'practice', label: '制造/找到一票预报失败草稿,能读失败原因' }, + { id: 'practice.price-vs-order', week: 'practice', label: '复现「查价有价、下单更严」(缺邮编/黑名单等)' }, + { id: 'practice.track-refresh', week: 'practice', label: '出库后在轨迹订单刷新,能读时间轴(有则看未映射)' }, + + // 第1周 + { id: 'w1.map', week: 'week1', label: '画出销售产品 / 服务渠道 / 预报 vs 入库 / 待排货' }, + { id: 'w1.pc-order', week: 'week1', label: '网页端完成查价→下单→看到已预报' }, + { id: 'w1.h5', week: 'week1', label: 'H5 同账号对照查价与订单列表' }, + { id: 'w1.ops-find', week: 'week1', label: '运营端用运单号找到该单并说出状态含义' }, + { id: 'w1.explain', week: 'week1', label: '能解释:客户选销售产品,入库后系统选服务渠道' }, + + // 第2周 + { id: 'w2.zone', week: 'week2', label: '价格分区 / 黑名单 / 偏远各做一组正反例', roles: ['all', 'channel'] }, + { id: 'w2.weight', week: 'week2', label: '按计重规则手算一例计费重', roles: ['all', 'channel'] }, + { id: 'w2.price', week: 'week2', label: '卖价矩阵故意配错,看到「卖价未匹配」', roles: ['all', 'channel'] }, + { id: 'w2.alloc', week: 'week2', label: '理解排货与买价发布;能说明待排货成因', roles: ['all', 'channel', 'cs'] }, + { id: 'w2.publish', week: 'week2', label: '规则+价格都点过发布;故意不发布观察旧规则', roles: ['all', 'channel'] }, + + // 第3周 + { id: 'w3.full', week: 'week3', label: '完整跑通:下单→入库→付款→出库' }, + { id: 'w3.pending', week: 'week3', label: '待排货→重算应付→待支付' }, + { id: 'w3.fee-talk', week: 'week3', label: '用预报/入库件重尺差演练费用解释', roles: ['all', 'cs', 'channel'] }, + { id: 'w3.cross-end', week: 'week3', label: '同一运单号网页端与运营端状态一致' }, + { id: 'w3.warehouse', week: 'week3', label: '跟一次入库/出库扫描(或录屏)', roles: ['all', 'warehouse'] }, + + // 第4周 + { id: 'w4.track', week: 'week4', label: '轨迹订单刷新,能读时间轴', roles: ['all', 'cs', 'implement'] }, + { id: 'w4.unmap', week: 'week4', label: '理解未映射:有原文无标准节点先查内容映射', roles: ['all', 'cs', 'implement'] }, + { id: 'w4.push', week: 'week4', label: '看过一条推送记录(成功或失败原因)', roles: ['all', 'implement', 'cs'] }, + { id: 'w4.api', week: 'week4', label: '能口述上游/下游/映射/应用/发布', roles: ['all', 'implement'] }, + { id: 'w4.log', week: 'week4', label: '打开请求日志对照最终报文', roles: ['all', 'implement'] }, + + // 总验收 + { id: 'exam.flow', week: 'exam', label: '能画出查价→…→轨迹状态流转' }, + { id: 'exam.price-fail', week: 'exam', label: '能解释查价有价下单失败的常见原因' }, + { id: 'exam.pending', week: 'exam', label: '能说明待排货是什么、怎么处理' }, + { id: 'exam.publish', week: 'exam', label: '改价客户仍旧价时,先查是否发布' }, + { id: 'exam.track', week: 'exam', label: '能处理「官网有轨迹你们没有」' }, + { id: 'exam.api', week: 'exam', label: '能说明上游下游映射发布;排错看请求日志' }, + { id: 'exam.ends', week: 'exam', label: '同一运单号:网页端/H5/运营端各在哪找' }, + { id: 'exam.notes', week: 'exam', label: '提交「一票货四端对照」个人笔记' }, +] + +export function itemsForWeek(week: TrainingWeekKey): TrainingChecklistItem[] { + return CHECKLIST_ITEMS.filter((i) => i.week === week) +} + +export function itemsForRole(role: TrainingRoleKey): TrainingChecklistItem[] { + const weeks = new Set(ROLE_WEEK_FOCUS[role]) + return CHECKLIST_ITEMS.filter((i) => { + if (!weeks.has(i.week)) return false + if (!i.roles || i.roles.length === 0) return true + if (role === 'all') return true + return i.roles.includes(role) || i.roles.includes('all') + }) +} diff --git a/src/views/kb/training/handbook-checklist.md b/src/views/kb/training/handbook-checklist.md new file mode 100644 index 0000000..fc813c9 --- /dev/null +++ b/src/views/kb/training/handbook-checklist.md @@ -0,0 +1,52 @@ +# 总验收说明 + +> 验收安排在 **工作日**(建议第 4 周周五或下一周周一)。 +> **下方勾选清单** 即总验收题,勾选保存在本机;带教对照勾选提问即可。 + +--- + +## 带教人 checklist + +- [ ] 测服可自助注册客户;运营账号能开 +- [ ] 练习用现有已启用销售产品即可 +- [ ] **每周五** 30 分钟对照「进度」勾选;周六日不排 +- [ ] 法定假日顺延,不压缩进周末 +- [ ] 第 4 周周五:收「一票货四端对照」笔记 + 过验收勾选 + +--- + +## 个人笔记模板 + +```text +运单号: +客户单号: +销售产品: +网页端截图: +H5 截图: +运营端状态: +预报费用 / 入库费用: +排货渠道: +轨迹最新节点: +本次踩坑: +对应指引章节: +``` + +--- + +## 配套指引 + +| 主题 | 路径 | +|------|------| +| 渠道 | [/channel/guide](/channel/guide) | +| 订单 | [/order/guide](/order/guide) | +| 轨迹 | [/track/guide](/track/guide) | +| API | [/api/apiDebugger](/api/apiDebugger) | +| 话术 | 本页「话术」Tab | +| 练习包 | 本页「练习包」Tab | + +--- + +## 一句话 + +> 先当客户发一票,再当运营配通、查通; +> 钱看渠道发布,货看订单状态,进度看轨迹映射,外系统看 API 发布与日志。 diff --git a/src/views/kb/training/handbook-overview.md b/src/views/kb/training/handbook-overview.md new file mode 100644 index 0000000..009283c --- /dev/null +++ b/src/views/kb/training/handbook-overview.md @@ -0,0 +1,111 @@ +# OMS 新人培训手册 + +> 面向 **运营、客服、实施、仓管** 等内部新人。 +> 只讲业务:怎么理解系统、怎么按月学会、怎么验收。 +> 渠道 / 订单 / 轨迹 / API 的细配与排障,请点开文末「配套指引」。 + +页面上方可选 **岗位轨**(勾选进度按岗位过滤,保存在本机)。 + +--- + +## 计时规则(必读) + +- **只计工作日(周一~周五)**,周六、周日 **不排课、不计入进度**。 +- 通才四周 ≈ **20 个工作日**;遇法定节假日顺延到下一个工作日。 +- 课表里的「周一~周五」均指当周工作日,不是自然日连号。 + +--- + +## 岗位速成(怎么选课) + +| 岗位 | 怎么学 | 大约工期 | +|------|--------|----------| +| **通才 / 未定岗** | 第1~4周全学 + 练习包 | 20 个工作日 | +| **客服** | 第1、3周为主;第4周只学轨迹(周一~周二);话术 Tab 常备 | ≈12 个工作日 | +| **渠道运营** | 第1周快速过;第2周深挖;第3周待排货与费用 | ≈12 个工作日 | +| **仓管 / 操作** | 第1周状态机;第3周入库出库与待排货协同 | ≈8~10 个工作日 | +| **实施 / 对接** | 第1周主线;第4周轨迹+API;练习包场景 1、5 | ≈10 个工作日 | + +测服账号 **自己注册**;产品用环境里已有线路即可 → 见「练习包」Tab。 + +--- + +## 1. 这套系统在干什么? + +| 模块 | 一句话 | 指引页 | +|------|--------|--------| +| **渠道** | 卖什么、卖多少、货走哪条下游 | [/channel/guide](/channel/guide) | +| **订单** | 查价 → 下单 → 入库 → 付款 → 出库 | [/order/guide](/order/guide) | +| **轨迹** | 服务商轨迹翻译成标准节点,再推给客户 | [/track/guide](/track/guide) | +| **API** | 公司标准接口 ↔ 服务商方言 | [/api/apiDebugger](/api/apiDebugger) | + +**主线:** + +``` +渠道定规则并发布 → 客户下单预报计费 → 入库实测改价并排货 +→ 付款出库 → 轨迹上网 →(可选)推客户系统 / 调外部接口 +``` + +订单状态: + +``` +草稿 → 已预报 →(入库)→ 待支付 或 待排货 + ↓(付款) + 待发货 →(出库)→ 待上网 → …轨迹 +``` + +--- + +## 2. 四个端 + +| 端 | 登录入口 | 谁用 | +|----|----------|------| +| **网页端** | `/login` | 发货客户 PC | +| **H5** | `/h5` | 同一客户手机 | +| **运营端** | `/admin` | 内部员工 | +| **客户端** | 与网页端同一客户体系 | 「当客户」优先网页端,再用 H5 对照 | + +**心态:** 先当客户发一票,再当运营配通、查通。 + +--- + +## 3. 四周主题 + +| 周次 | 主题 | +|------|------| +| **第 1 周** | 当客户跑通;分清四端 | +| **第 2 周** | 渠道为什么有价;不发布=没改 | +| **第 3 周** | 订单运营排障;待排货与费用 | +| **第 4 周** | 轨迹 + API | + +```mermaid +flowchart LR + A[第1周 当客户] --> B[第2周 渠道配置] + B --> C[第3周 订单排障] + C --> D[第4周 轨迹与API] +``` + +**刻意先不啃:** 开发 Tab、表结构、脚本细节。 + +--- + +## 4. 每日最小闭环(工作日) + +1. 网页端或 H5 下/查一票 +2. 运营端看同一运单状态与费用 +3. 出库后看轨迹时间轴 +4. 三问:发布了吗?预报还是入库?映射还是推送? + +周末可自愿复习,**不计入是否完成**。 + +--- + +## 5. 配套入口 + +| 主题 | 路径 | +|------|------| +| 练习包 | 本页「练习包」Tab | +| 对客话术 | 本页「话术」Tab | +| 勾选进度 | 本页「进度」Tab | +| 渠道 / 订单 / 轨迹 / API 指引 | `/channel/guide` 等 | +| 工作台 | 运营端工作台「培训手册」快捷入口 | diff --git a/src/views/kb/training/handbook-practice.md b/src/views/kb/training/handbook-practice.md new file mode 100644 index 0000000..b4255b5 --- /dev/null +++ b/src/views/kb/training/handbook-practice.md @@ -0,0 +1,54 @@ +# 测服练习包 + +> 账号请 **自己在测服注册**;销售产品用环境里 **已有已启用产品** 即可,不必新建专线。 +> 勾选进度见本页下方或「进度」Tab(保存在本机浏览器)。 + +--- + +## 1. 开练前准备 + +| 准备项 | 怎么做 | +|--------|--------| +| **客户账号** | 测服网页端 [`/login`](/login) 自行注册;手机可再用 H5 [`/h5`](/h5) 同账号登录 | +| **运营账号** | 向带教/管理员要内部账号,入口 [`/admin`](/admin);至少能看订单、渠道、轨迹 | +| **练习产品** | 在「我要查价 / 我要下单」里任选一条 **已启用** 销售产品;记下编码与目的国 | +| **权限** | 若侧栏没有「培训手册」,让管理员对知识库点一次「同步子菜单」,并勾选角色菜单 | + +--- + +## 2. 必练场景(建议按序) + +| # | 场景 | 你要看到什么 | 备注 | +|---|------|--------------|------| +| 1 | **幸福路径** | 已预报 → 入库后待支付 → 付款 → 出库 → 待上网 | 用任意现有产品;件重尺填完整 | +| 2 | **查价松 / 下单严** | 查价能出参考价;故意缺邮编或踩黑名单时下单失败 | 对客话术:查价仅供参考 | +| 3 | **待排货** | 入库后进待排货;修好配置/重算应付后变待支付 | 可让带教临时关掉某渠道买价或清空排货再恢复 | +| 4 | **预报失败草稿** | 订单停在草稿,有「预报失败原因」 | 常见:分区未匹配、卖价未匹配、未发布 | +| 5 | **轨迹刷新** | 出库后轨迹订单有时间轴;若有未映射会看到原文 | 服务商尚未上网时只有已预报也正常 | + +制造待排货/草稿时 **只用测服**,改完记得还原,避免影响他人。 + +--- + +## 3. 四端对照(同一票) + +对场景 1 的运单号,分别打开: + +| 端 | 看哪里 | +|----|--------| +| 网页端 | [`/order/myOrders`](/order/myOrders) | +| H5 | [`/h5/orders`](/h5/orders) | +| 运营端 | 运单管理 / 我的订单(按权限) | +| 轨迹 | [`/track/order`](/track/order)(出库后) | + +截图或记到个人笔记(模板见「进度 / 验收」)。 + +--- + +## 4. 带教最小配合 + +- 测服可注册客户;运营账号能开 +- 允许新人在测服改练习相关配置(或带教代改演示待排货) +- **每周五** 对照「进度」Tab 勾选情况聊 30 分钟;周六日不排 + +产品不必单独建:现网测服已有线路全部可用。 diff --git a/src/views/kb/training/handbook-scripts.md b/src/views/kb/training/handbook-scripts.md new file mode 100644 index 0000000..99a8abb --- /dev/null +++ b/src/views/kb/training/handbook-scripts.md @@ -0,0 +1,61 @@ +# 对客话术速查 + +> 客服日常页。先安抚,再给原因与下一步;涉及改价/禁运时对齐渠道同事。 +> 细配见 [订单指引](/order/guide)、[轨迹指引](/track/guide)、[渠道指引](/channel/guide)。 + +--- + +## 1. 开场与原则 + +| 原则 | 说法示例 | +|------|----------| +| 查价≠最终价 | 「查价是参考,最终以仓库入库实测重量和尺寸计费为准。」 | +| 状态可查 | 「您报一下运单号或客户单号,我帮您看当前到哪一步。」 | +| 不瞎承诺时效 | 「轨迹以服务商上网为准;我们这边看到节点会同步给您。」 | +| 改配置要发布 | (对内)客户仍旧价 → 先问渠道是否点过发布,别只改草稿 | + +--- + +## 2. 下单 / 费用 + +| 客户或系统说法 | 可对客户说 | 你后台先查 | +|----------------|------------|------------| +| 客户单号已存在 | 「这个客户单号已经用过了,请换一个再提交,或告诉我原单号我帮您查。」 | 同客户是否已有该单 | +| 产品不存在/未启用 | 「当前线路暂时不可用,我帮您看下可发的替代线路。」 | 销售产品是否启用 | +| 地址命中黑名单 | 「这个邮编/地区暂时无法收寄,请换地址或换线路;需要的话我帮您确认禁运范围。」 | 黑名单 + 产品关联 | +| 价格分区未匹配 | 「目的地分区还对不上报价,我请渠道同事核对邮编分区,好了马上回您。」 | 价格分区明细、是否发布 | +| 卖价未匹配 | 「这个重量/货物类型暂时报不出价,我们核对价卡后回您。」 | 卖价矩阵重量段/货物属性 | +| 未命中价格/规则快照 | 「线路规则刚在调整,请稍等我们发布后再下;或先换一条已上线线路。」 | 是否发布 rules/price | +| 查价有价、下单失败 | 「查价比较宽松,下单要完整邮编和地址。请按页面提示补全后再试。」 | 邮编、黑名单、尺寸 | +| 一直草稿 | 「系统还在算预报运费,请稍等刷新;若一直如此,我看失败原因帮您改。」 | 预报失败原因 | +| 入库后比预报贵 | 「入库按实测重和体积重重新计费,体积大或超重都会上调,这是正常规则。」 | 预报 vs 入库件重尺 | +| 一直待排货 | 「货已收到,系统还在匹配承运渠道。我们处理好运费渠道后会变成待支付,再通知您付款。」 | 待排货原因;找渠道补买价/排货 | + +--- + +## 3. 轨迹 + +| 客户说法 | 可对客户说 | 你后台先查 | +|----------|------------|------------| +| 官网有轨迹,你们没有 | 「我马上按单号刷新;若服务商文案还没对上我们的标准节点,会先补映射再更新给您。」 | 刷新;未映射原文;单号类型 | +| 一直显示已预报 | 「仓库出库后,要等服务商上网才会有运输节点。我帮您确认是否已出库、拉取是否已开始。」 | 是否出库;拉取开始节点 | +| 节点乱跳 / 缺段 | 「我们核对一下节点映射,避免关键词过宽;好了会按正确顺序展示。」 | 映射关键词、反向词 | +| 我们系统没收到推送 | 「我查一下贵司推送开关和最近一次推送记录;必要时先手工补推一笔。」 | 自动推送、顺序、推送记录 | + +--- + +## 4. 付款 / 出库 + +| 场景 | 可对客户说 | +|------|------------| +| 催付 | 「您的包裹已入库计费完成,请登录后完成支付,我们才能安排出库。」 | +| 已付未出库 | 「支付已收到,仓库正在排队出库;出库后轨迹会进入待上网。」 | +| 要拦截 | 「请提供运单号,我看当前状态能否拦截;已出库/已上网的需按服务商规则处理。」 | + +--- + +## 5. 对内三句(自己先想清) + +1. 规则/价格 **发布了吗**? +2. 卡在 **预报** 还是 **入库/排货**? +3. 轨迹是 **映射** 问题还是 **推送** 问题? diff --git a/src/views/kb/training/handbook-week1.md b/src/views/kb/training/handbook-week1.md new file mode 100644 index 0000000..bccfcd4 --- /dev/null +++ b/src/views/kb/training/handbook-week1.md @@ -0,0 +1,58 @@ +# 第 1 周:建立业务地图 + 当客户跑通一票 + +**本周目标:** 能口述「一票货从问价到上网」;分清网页端 / H5 / 运营端角色。 +**计时:** 仅周一~周五 5 个工作日;周六日不算。 + +--- + +## 学习安排(工作日) + +| 工作日 | 学什么 | 怎么练 | +|--------|--------|--------| +| **周一** | 读 [渠道指引](/channel/guide)、[订单指引](/order/guide) 前半;画业务脑图 | 纸上画出:销售产品 / 服务渠道 / 预报 vs 入库 / 待排货 | +| **周二** | 继续补脑图;运营端只逛菜单,先别改配置 | 能讲清四个模块各管什么 | +| **周三** | **网页端当客户**:查价 → 下单 → 看状态 → 付款(测服) | 故意漏邮编、错尺寸,感受「查价松、下单严」 | +| **周四** | **H5 对照同一账号** | 同一目的国/重量查价与下单,记下 PC/H5 差异与话术 | +| **周五** | 运营端找到这票:订单/运单、轨迹订单;本周验收 | 对照状态机;能讲清草稿 / 已预报 / 待支付 / 待排货 | + +--- + +## 必记概念 + +### 查价 vs 下单 + +| | 查价 | 下单 | +|--|------|------| +| 目的 | 心里有数 | 真正建单 | +| 尺寸 | 可不填(按实重大致估) | 长宽高实重都必须 > 0 | +| 邮编 | 可不填(不校验黑名单) | 必须有邮编;命中黑名单直接拒单 | +| 是否落库 | 否 | 是,有运单号 | + +**对客话术:** 查价仅供参考;最终以入库实测计费为准。 + +### 幸福路径(先走通) + +假设发马来西亚,销售产品「MY 特惠线」,预报 30×20×10 cm、实重 0.8kg: + +1. 查价 → 看到参考运费 +2. 下单成功 → 很快变 **已预报**,有预报运费 +3. 入库称重变了 → 重算应收 → 排货成功 → **待支付** +4. 客户付款 → **待发货** +5. 出库 → **待上网**,之后看轨迹 + +### 刚下完单还是「草稿」? + +多半预报还在队列里。等几秒刷新;若一直草稿,打开订单看 **预报失败原因**。 + +--- + +## 本周练习 + +请在本页 **下方勾选清单** 完成练习(进度保存在本机)。 +客服 / 仓管 / 实施:本周为必学;渠道运营可快速过状态机后进入第 2 周。 + +--- + +## 周五验收 + +能对客说清「查价仅供参考,最终以入库实测为准」;能画出状态流转;能指出同一票在网页端 / H5 / 运营端分别在哪看。 diff --git a/src/views/kb/training/handbook-week2.md b/src/views/kb/training/handbook-week2.md new file mode 100644 index 0000000..f937896 --- /dev/null +++ b/src/views/kb/training/handbook-week2.md @@ -0,0 +1,94 @@ +# 第 2 周:渠道配置(为什么有价、为什么卡单) + +**本周目标:** 理解钱与走货规则从哪来;会按推荐顺序在测服配一条测试线。 +**计时:** 仅周一~周五 5 个工作日;周六日不算。 + +详配见 [渠道指引](/channel/guide)。 + +--- + +## 心智模型 + +> **销售产品**决定客户怎么买、卖多少钱; +> **服务渠道**决定货怎么走、成本多少; +> **排货**把两者在入库时接上。 +> **改配置不发布 = 等于没改。** + +订单计费读的是 **发布后的快照**,不是你刚改完还没点发布的草稿。 + +--- + +## 新开线路推荐顺序(照着做) + +``` +主数据 + ① 价格分区(国家/邮编落到哪一价区) + ② 黑名单(禁运) + ③ 偏远分区(可选) + ④ 计重规则 + 计重进位 + +成本侧 + ⑤ 建服务渠道(下游通道) + ⑥ 配渠道买价并发布 + +卖价侧 + ⑦ 建销售产品,绑上分区、计重、黑名单等 + ⑧ 配产品卖价 + ⑨ 配排货(挂上可用服务渠道) + ⑩ 写对客说明(可选) + ⑪ 发布「规则」+ 发布「价格」 +``` + +| 发布类型 | 大概包含 | 忘了会怎样 | +|----------|----------|------------| +| **规则(rules)** | 计重、黑名单、偏远、排货等 | 计重/禁运/排货仍按旧版 | +| **价格(price)** | 卖价矩阵 + 价格分区明细 | 运费仍按旧卖价 | + +--- + +## 学习安排(工作日) + +| 工作日 | 重点 | +|--------|------| +| **周一** | 价格分区 / 黑名单 / 偏远:各做一组正反例(邮编多为左开右闭) | +| **周二** | 计重规则 + 进位;用例子算出计费重 | +| **周三** | 卖价矩阵:价区 × 重量段 × 货物属性;故意配错看「卖价未匹配」 | +| **周四** | 服务渠道买价 + 排货;买价不发布 → 入库容易进 **待排货** | +| **周五** | 规则 + 价格发布;对照订单报错表自测;本周验收 | + +--- + +## 必记例子 + +### 计费重 + +产品:体积重 = 长×宽×高 ÷ 6000;实重与体积重取大。 + +- 件:30×20×10、实重 0.8 → 体积重 1.0 → 计费重 **1.0kg** +- 入库后实重变 1.2 → 计费重可能升到更高档 → 应收比预报高,属正常,要跟客户讲清 + +### 黑名单 vs 偏远 + +| | 黑名单 | 偏远 | +|--|--------|------| +| 命中 | **不能下单** | 可以下单,订单标偏远 | +| 运营 | 换地址或改黑名单区 | 留意偏远附加费 | + +### 只配卖价、排货为空 / 买价未发布 + +→ 入库后容易进 **待排货**(货已收,但还没定走哪条下游)。 + +--- + +## 本周练习 + +请在本页 **下方勾选清单** 完成练习。 +**渠道运营** 本周为重头;客服至少要懂「待排货 / 未发布」话术;仓管/实施可略读。 + +产品:用测服 **已有销售产品** 练习发布与排障即可,不必新建专线。 + +--- + +## 周五验收 + +能默写新产品上线 checklist;改价忘发布能自己排查;能说清销售产品 vs 服务渠道。 diff --git a/src/views/kb/training/handbook-week3.md b/src/views/kb/training/handbook-week3.md new file mode 100644 index 0000000..8a0bfa6 --- /dev/null +++ b/src/views/kb/training/handbook-week3.md @@ -0,0 +1,95 @@ +# 第 3 周:订单全链路运营 + 客服排障 + +**本周目标:** 会跟仓、会催付、会看费用争议;网页端 / H5 / 运营端同一票能对上。 +**计时:** 仅周一~周五 5 个工作日;周六日不算。 + +详配与报错表见 [订单指引](/order/guide)。 + +--- + +## 学习安排(工作日) + +| 工作日 | 重点 | +|--------|------| +| **周一** | 幸福路径上半:下单 → 已预报 → 入库 → 待支付 | +| **周二** | 幸福路径下半:付款 → 出库 → 待上网;四端对同一运单号 | +| **周三** | **待排货专项**:看原因、补买价/排货、重算应付 | +| **周四** | 预报 vs 入库费用;常见报错话术演练 | +| **周五** | 批量导入 / 模板映射(若常用);跟一次入库出库;本周验收 | + +--- + +## 入库与待排货 + +入库时系统会: + +1. 写入库实测件重尺 +2. **重算客户应收** +3. **尝试自动排货**(从销售产品排货列表选服务渠道并算成本) + +| 结果 | 订单状态 | 含义 | +|------|----------|------| +| 排货成功 | **待支付** | 可以催客户付款 | +| 排货失败 | **待排货** | 货已收、钱也能算给客户看,但还没定下游渠道 | + +**待排货不是丢单。** 常见原因:排货列表空、渠道未启用、买价未发布、客户不在白名单、重量/分区匹配不到买价。 + +处理完后在订单侧做 **重算应付**(以现场按钮名为准),成功应变为 **待支付**。 + +--- + +## 下单成功后系统在忙什么?(运营视角) + +| 阶段 | 你会看到 | 失败时 | +|------|----------|--------| +| 提交当时 | 有运单号,可能短暂「草稿/处理中」 | — | +| 预报计费 | 变成 **已预报**,有预报应收 | 停在草稿,看预报失败原因 | +| 面单 / 营销等 | 异步,一般不挡下单 | 可稍后重打面单 | +| 入库后 | 实测改价 + 排货 | 待排货或待支付 | + +拦截类自动触发发生在「点下单、还没建成单」之前:命中则直接报错,**不会留下订单**。 + +--- + +## 常见报错 ↔ 怎么回 + +| 客户或系统提示 | 可能原因 | 运营动作 | +|----------------|----------|----------| +| 客户单号已存在 | 同客户重复客户单号 | 换单号,或查是否已下过 | +| 销售产品不存在或未启用 | 产品停用 / 编码错 | 查销售产品状态 | +| 未命中价格/规则快照 | 改过配置 **没发布** | 渠道 → 销售产品 → 发布 | +| 收件地址命中黑名单 | 地址在禁运区 | 换地址,或调整黑名单 | +| 价格分区未匹配 | 邮编/国家不在分区 | 补分区或核对地址 | +| 卖价未匹配 | 重量段/货物属性/价区对不上 | 查卖价矩阵 | +| 查价有价、下单失败 | 查价未校验邮编/黑名单 | 用完整地址再试下单 | +| 一直待排货 | 见上一节 | 先看订单上的待排货原因 | + +--- + +## 推荐日常工作流(运营) + +``` +① 新产品:先在渠道配齐并发布 +② 「我要查价」自测几个国家+重量 +③ 「我要下单」测单 → 确认已预报 +④ 仓库入库 → 确认待支付(待排货则先排障) +⑤ 付款 → 出库 → 轨迹中心看是否上网 +⑥ 客诉对照上表;费用争议核对预报 vs 入库实测 +``` + +常用菜单:查价 `/order/priceCheck`、下单 `/order/placeOrder`、我的订单 `/order/myOrders`;仓侧在 **操作** 菜单(入库/出库扫描)。 + +--- + +## 本周练习 + +请在本页 **下方勾选清单** 完成练习。 +客服 / 仓管 / 渠道运营均为重点周;实施可跟一票幸福路径即可。 + +话术见「话术」Tab;待排货场景见「练习包」。 + +--- + +## 周五验收 + +给一张异常单,能定位是渠道配置、地址问题,还是还在预报队列;能处理待排货到待支付。 diff --git a/src/views/kb/training/handbook-week4.md b/src/views/kb/training/handbook-week4.md new file mode 100644 index 0000000..14b20d2 --- /dev/null +++ b/src/views/kb/training/handbook-week4.md @@ -0,0 +1,91 @@ +# 第 4 周:轨迹对客 + API 对接意识 + +**本周目标:** 客服查轨迹不慌;知道外部系统怎么连进来(业务层,不写代码)。 +**计时:** 仅周一~周五 5 个工作日;周六日不算。 + +详见 [轨迹指引](/track/guide)、[API 指引](/api/apiDebugger)。 + +--- + +## 学习安排(工作日) + +| 工作日 | 重点 | +|--------|------| +| **周一** | 轨迹:状态/内容主数据 → 拉取映射 → 单票刷新;「官网有、我们没有」优先查未映射 | +| **周二** | 推送:自动推送、顺序异常、手工救急;预警概念扫一眼 | +| **周三** | API:上游 / 下游 / 映射 / 应用 / 发布;跟一次调试;看请求日志 | +| **周四** | 串讲:渠道发布 → 客户下单 → 出库 → 轨迹拉取 →(可选)推客户 / 调外部 | +| **周五** | **综合演练**:一票货四端截图对照;整理 FAQ;准备总验收 | + +--- + +## 轨迹心智模型 + +> **拉取** = 把服务商的话翻译成公司标准节点; +> **推送** = 按约定顺序告诉客户。 +> 看到原始轨迹却没有标准节点,优先查 **内容映射**,不是「系统没拉到」。 + +``` +服务商原始轨迹 + → 轨迹中心按规则翻译成「标准节点」 + → 写到轨迹订单 + →(可选)推送给客户系统 / OMS +``` + +### 新服务商接入顺序(运营向) + +``` +① 轨迹状态(已揽收 / 运输中 / 签收 …) +② 轨迹内容(标准话术关联状态) +③ 轨迹标记(可选) +④ 确认拉取接口已通 +⑤ 轨迹拉取:主配置 → 内容映射 → 频率 +⑥ 轨迹推送(若客户要回调) +⑦ 测试单「刷新轨迹」,看时间轴与推送记录 +``` + +### 客服常见问答 + +| 客户说法 | 可能原因 | 怎么处理 | +|----------|----------|----------| +| 官网有轨迹,你们没有 | 未映射 / 间隔未到 / 单号类型不对 | 刷新;看未映射原文;补映射 | +| 一直显示已预报 | 未上网,或拉取未开始 | 看出库、拉取开始节点 | +| 我们系统没收回调 | 自动推送关了、顺序卡了、异常单 | 查推送记录;必要时手工推 | + +--- + +## API(Like API)心智模型 + +> **上游**是公司普通话,**下游**是服务商方言;**映射**是翻译器,**发布**才上岗。 +> 排错先看 **请求日志里真正发出的那一包**。 + +| 名词 | 白话 | +|------|------| +| 上游接口 | 给业务用的标准口(如 `TRACK_QUERY`) | +| 下游接口 | 服务商真实 HTTP | +| 映射 | 字段对照 + 签名脚本 | +| 应用 | 谁有权调用(AppKey) | +| 发布 | 配置生效开关 | + +推荐上手:下游(贴 cURL)→ 上游 → 映射 → 应用授权 → 调试 / 请求日志。 + +**注意:** `/api/apiDebugger` 自由调试 **不会** 自动写回下游配置;正式联调优先在已配置的上下游里调试。 + +--- + +## 本周练习 + +请在本页 **下方勾选清单** 完成练习。 +**实施** 全周必学;**客服** 重点周一~周二轨迹;渠道/仓管可浏览。 + +--- + +## 周五验收 + +能讲清三件事: + +1. 订单卡在哪一段(预报 / 待排货 / 待支付 / 待上网) +2. 轨迹卡在映射还是推送 +3. 接口卡在未发布、鉴权,还是签名/报文字段 + +完成后到「进度」Tab 勾总验收项(安排在工作日)。 diff --git a/src/views/kb/training/index.vue b/src/views/kb/training/index.vue new file mode 100644 index 0000000..62cea05 --- /dev/null +++ b/src/views/kb/training/index.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/src/views/kb/training/useTrainingProgress.ts b/src/views/kb/training/useTrainingProgress.ts new file mode 100644 index 0000000..537f9a4 --- /dev/null +++ b/src/views/kb/training/useTrainingProgress.ts @@ -0,0 +1,109 @@ +import { computed, ref, watch } from 'vue' +import { + CHECKLIST_ITEMS, + TRAINING_ROLES, + itemsForRole, + type TrainingRoleKey, +} from './checklist-items' + +const STORAGE_CHECKED = 'oms.kb.training.checked.v1' +const STORAGE_ROLE = 'oms.kb.training.role.v1' + +function readChecked(): Record { + try { + const raw = localStorage.getItem(STORAGE_CHECKED) + if (!raw) return {} + const parsed = JSON.parse(raw) as Record + return parsed && typeof parsed === 'object' ? parsed : {} + } catch { + return {} + } +} + +function readRole(): TrainingRoleKey { + try { + const raw = localStorage.getItem(STORAGE_ROLE) as TrainingRoleKey | null + if (raw && TRAINING_ROLES.some((r) => r.key === raw)) return raw + } catch { + // ignore + } + return 'all' +} + +const checkedMap = ref>(readChecked()) +const role = ref(readRole()) + +watch( + checkedMap, + (val) => { + try { + localStorage.setItem(STORAGE_CHECKED, JSON.stringify(val)) + } catch { + // ignore quota + } + }, + { deep: true }, +) + +watch(role, (val) => { + try { + localStorage.setItem(STORAGE_ROLE, val) + } catch { + // ignore + } +}) + +export function useTrainingProgress() { + const roleMeta = computed(() => TRAINING_ROLES.find((r) => r.key === role.value)!) + + const relevantItems = computed(() => itemsForRole(role.value)) + + const doneCount = computed( + () => relevantItems.value.filter((i) => checkedMap.value[i.id]).length, + ) + + const totalCount = computed(() => relevantItems.value.length) + + const percent = computed(() => + totalCount.value ? Math.round((doneCount.value / totalCount.value) * 100) : 0, + ) + + function isChecked(id: string) { + return Boolean(checkedMap.value[id]) + } + + function setChecked(id: string, value: boolean) { + checkedMap.value = { ...checkedMap.value, [id]: value } + } + + function toggle(id: string) { + setChecked(id, !isChecked(id)) + } + + function resetAll() { + checkedMap.value = {} + } + + function weekProgress(week: string) { + const items = relevantItems.value.filter((i) => i.week === week) + const done = items.filter((i) => checkedMap.value[i.id]).length + return { done, total: items.length } + } + + return { + role, + roleMeta, + roles: TRAINING_ROLES, + checkedMap, + relevantItems, + allItems: CHECKLIST_ITEMS, + doneCount, + totalCount, + percent, + isChecked, + setChecked, + toggle, + resetAll, + weekProgress, + } +} diff --git a/src/views/operation/bagManage/index.vue b/src/views/operation/bagManage/index.vue new file mode 100644 index 0000000..2afe374 --- /dev/null +++ b/src/views/operation/bagManage/index.vue @@ -0,0 +1,684 @@ + + + + + diff --git a/src/views/operation/bagPack/index.vue b/src/views/operation/bagPack/index.vue new file mode 100644 index 0000000..17dcf8e --- /dev/null +++ b/src/views/operation/bagPack/index.vue @@ -0,0 +1,704 @@ + + + + + diff --git a/src/views/operation/masterBill/index.vue b/src/views/operation/masterBill/index.vue new file mode 100644 index 0000000..9d2d4c6 --- /dev/null +++ b/src/views/operation/masterBill/index.vue @@ -0,0 +1,732 @@ + + + + + diff --git a/src/views/operation/masterBoard/index.vue b/src/views/operation/masterBoard/index.vue new file mode 100644 index 0000000..166144a --- /dev/null +++ b/src/views/operation/masterBoard/index.vue @@ -0,0 +1,597 @@ + + + + + diff --git a/src/views/operation/outboundScan/index.vue b/src/views/operation/outboundScan/index.vue index 85eee2b..a871c93 100644 --- a/src/views/operation/outboundScan/index.vue +++ b/src/views/operation/outboundScan/index.vue @@ -3,11 +3,19 @@
+
+ + 小包出库 + 大包出库 + +
-

{{ $t('operation.outbound.form.hint.supportedTypes') }}

+

+ {{ + scanMode === 'bag' + ? '大包须已封袋;按袋内入库/预报件重尺批量出库。小包也可不装袋单独出库。' + : $t('operation.outbound.form.hint.supportedTypes') + }} +

@@ -51,7 +65,17 @@ {{ feedbackMessage }}

-
+
+
+
+
{{ formData.waybillNumber || '-' }}
+
+ 模式:大包出库(无需再填件重尺) +
+
+
+
+
{{ formData.waybillNumber || '-' }}
@@ -153,6 +177,7 @@ import { useTableContainerHeight } from '@/composables/useTableContainerHeight' import { useOperationScanFocus } from '@/composables/useOperationScanFocus' import { useOperationScanFeedback } from '@/composables/useOperationScanFeedback' import { outboundCreate, outboundRecentList, outboundOrderLookup } from '@/api/operation' +import { outboundByBag } from '@/api/operation/shipContainer' import { withServerFilterColumns } from '@/utils/headerFilterAdapter' const { t } = useI18n() @@ -171,6 +196,7 @@ const { defineOptions({ name: 'OutboundScan' }) +const scanMode = ref<'parcel' | 'bag'>('parcel') const submitting = ref(false) const lookingUp = ref(false) const listLoading = ref(false) @@ -329,6 +355,10 @@ async function ensureOrderLookup(): Promise { } async function onScanEnter() { + if (scanMode.value === 'bag') { + await handleSubmit() + return + } const ok = await ensureOrderLookup() if (!ok) return if (hasMetrics()) { @@ -340,10 +370,28 @@ async function onScanEnter() { async function handleSubmit() { if (!formData.waybillNumber?.trim()) { - showWarning(t('operation.outbound.message.waybillNumberRequired')) + showWarning( + scanMode.value === 'bag' ? '请输入大包号' : t('operation.outbound.message.waybillNumberRequired'), + ) maybeRefocusScan() return } + if (scanMode.value === 'bag') { + submitting.value = true + try { + const result = await outboundByBag(formData.waybillNumber.trim()) + showSuccess(`大包出库成功,共 ${result.successCount} 票`) + handleReset(false) + await loadRecent() + maybeRefocusScan() + } catch (e: any) { + showError(e?.message || t('operation.outbound.message.outboundFailed')) + maybeRefocusScan() + } finally { + submitting.value = false + } + return + } const ok = await ensureOrderLookup() if (!ok) return if (!hasMetrics()) { diff --git a/src/views/operation/printLabel/index.vue b/src/views/operation/printLabel/index.vue index 9b1c1bb..2a7a080 100644 --- a/src/views/operation/printLabel/index.vue +++ b/src/views/operation/printLabel/index.vue @@ -643,6 +643,9 @@ async function loadRecent() { inbound: t('operation.printLabel.labelTemplate.inbound'), outbound: t('operation.printLabel.labelTemplate.outbound'), sku: t('operation.printLabel.labelTemplate.sku'), + box: t('operation.printLabel.labelTemplate.box'), + shipBag: t('operation.printLabel.labelTemplate.shipBag'), + shipMaster: t('operation.printLabel.labelTemplate.shipMaster'), } recentOrders.value = (items || []).map((row: any, idx: number) => { const ok = row.printSuccess === 1 || row.printSuccess === true diff --git a/src/views/operation/styles/ops-scan-page.less b/src/views/operation/styles/ops-scan-page.less index d428364..42bbe66 100644 --- a/src/views/operation/styles/ops-scan-page.less +++ b/src/views/operation/styles/ops-scan-page.less @@ -127,6 +127,81 @@ flex-wrap: wrap; } +.ops-scan__row--setup { + flex-wrap: wrap; + gap: 8px; +} + +/* 扫描模式 / 袋型分段:灰底白块选中,高度与 32px 工具栏按钮一致 */ +.ops-mode.arco-radio-group-button, +.ops-mode { + flex-shrink: 0; + background: var(--color-fill-2) !important; + border: 1px solid var(--color-border-2); + border-radius: 4px; + padding: 2px; + gap: 0; + + :deep(.arco-radio-button) { + margin: 0 !important; + padding: 0 !important; + border: none !important; + background: transparent !important; + box-shadow: none !important; + } + + :deep(.arco-radio-button .arco-radio-button-content) { + display: inline-flex; + align-items: center; + justify-content: center; + min-width: 64px; + height: 28px; + padding: 0 12px; + border-radius: 3px; + font-size: 13px; + line-height: 28px; + color: var(--color-text-2); + background: transparent; + box-shadow: none; + transition: background 0.15s, color 0.15s; + } + + :deep(.arco-radio-button.arco-radio-checked .arco-radio-button-content) { + color: var(--app-primary-color); + font-weight: 600; + background: var(--app-card-bg); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); + } + + :deep(.arco-radio-button:not(.arco-radio-checked):hover .arco-radio-button-content) { + color: var(--app-primary-color); + } + + :deep(.arco-radio-disabled .arco-radio-button-content) { + color: var(--color-text-4); + cursor: not-allowed; + } +} + +.ops-setup-btn { + height: 32px !important; + padding: 0 12px !important; + border-radius: 4px !important; + font-size: 14px; + flex-shrink: 0; +} + +.ops-resume-input { + flex: 1 1 200px; + min-width: 180px; + max-width: 280px; + + :deep(.arco-input-wrapper) { + height: 32px; + border-radius: 4px; + } +} + .ops-scan-input { width: 100%; diff --git a/src/views/order/orderColumnLabelsZh.ts b/src/views/order/orderColumnLabelsZh.ts index 851d24c..63b30dc 100644 --- a/src/views/order/orderColumnLabelsZh.ts +++ b/src/views/order/orderColumnLabelsZh.ts @@ -26,6 +26,8 @@ export const ORDER_COLUMN_LABEL_ZH: Record = { clientNo: '客户单号', trackNo: '跟踪号', serviceNo: '运单号', + shipBagNo: '大包号', + shipMasterNo: '内部主单号', productCode: '产品编码', productName: '销售产品', maxTimeliness: '最大时效(天)', diff --git a/src/views/order/waybillManage/columnConfig.ts b/src/views/order/waybillManage/columnConfig.ts index 3670f38..1803898 100644 --- a/src/views/order/waybillManage/columnConfig.ts +++ b/src/views/order/waybillManage/columnConfig.ts @@ -36,6 +36,8 @@ export const WAYBILL_MANAGE_COLUMN_CATALOG: OrderListColumnDef[] = [ { key: 'clientNo', labelKey: M('customerOrderNo'), width: 150 }, { key: 'trackNo', labelKey: M('trackingNo'), width: 160 }, { key: 'serviceNo', labelKey: M('waybillNo'), width: 200 }, + { key: 'shipBagNo', labelKey: L('shipBagNo'), width: 150 }, + { key: 'shipMasterNo', labelKey: L('shipMasterNo'), width: 150 }, { key: 'downstreamServiceNo', labelKey: M('downstreamServiceNo'), width: 180 }, { key: 'productCode', labelKey: L('productCode'), width: 110 }, { key: 'productName', labelKey: M('shippingMethod'), width: 120 }, diff --git a/src/views/order/waybillManage/index.vue b/src/views/order/waybillManage/index.vue index a1b039c..25e3d8c 100644 --- a/src/views/order/waybillManage/index.vue +++ b/src/views/order/waybillManage/index.vue @@ -333,6 +333,8 @@ serviceNo: serviceNo ?? '', clientNo: clientNo ?? '', trackNo: trackNo ?? '', + shipBagNo: pick(raw, 'shipBagNo', 'ShipBagNo') ?? '', + shipMasterNo: pick(raw, 'shipMasterNo', 'ShipMasterNo') ?? '', waybillNo, customerOrderNo: clientNo ?? '', trackingNo: trackNo ?? '', diff --git a/src/views/user/profile/ProfilePanel.vue b/src/views/user/profile/ProfilePanel.vue index ff4b4d1..8df2592 100644 --- a/src/views/user/profile/ProfilePanel.vue +++ b/src/views/user/profile/ProfilePanel.vue @@ -388,7 +388,8 @@ const contactRows = computed(() => [ }, ]) -function validateConfirmPassword(_rule: unknown, value: string, callback: (error?: string) => void) { +// Arco Form:validator(value, callback) +function validateConfirmPassword(value: string, callback: (error?: string) => void) { if (value !== pwdForm.newPassword) { callback(t('profile.passwordMismatch')) } else { diff --git a/vite.config.ts b/vite.config.ts index f1c8f73..d97a198 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -197,7 +197,7 @@ export default defineConfig(({ mode }) => { secure: false, bypass(req) { const path = req.url?.split('?')[0] ?? ''; - const kbSpaPages = ['/kb/category', '/kb/article']; + const kbSpaPages = ['/kb/category', '/kb/article', '/kb/training']; if (kbSpaPages.some((p) => path === p || path.startsWith(`${p}/`))) { return '/index.html'; } @@ -363,6 +363,10 @@ export default defineConfig(({ mode }) => { const operationSpaPrefixes = [ '/operation/inboundScan', '/operation/outboundScan', + '/operation/bagPack', + '/operation/bagManage', + '/operation/masterBoard', + '/operation/masterBill', '/operation/printLabel', '/operation/parcelArrival', '/operation/fulfillPack', @@ -669,6 +673,10 @@ export default defineConfig(({ mode }) => { // Operation 相关前端路由 '/operation/inboundScan', '/operation/outboundScan', + '/operation/bagPack', + '/operation/bagManage', + '/operation/masterBoard', + '/operation/masterBill', '/operation/printLabel', '/operation/parcelArrival', '/operation/fulfillPack', @@ -692,6 +700,7 @@ export default defineConfig(({ mode }) => { // Knowledge 前端路由(API 为 /kb/admin/*、/kb/portal/*) '/kb/category', '/kb/article', + '/kb/training', // Finance 相关前端路由 '/finance/rechargeRecord', '/finance/accountFlow', -- 2.45.2 From dc3da65e1c51824fe6ac76aa6ab937b4dccc1ed1 Mon Sep 17 00:00:00 2001 From: zzh <1368735060@qq.com> Date: Sat, 7 Nov 2026 18:43:17 +0800 Subject: [PATCH 05/11] =?UTF-8?q?feat:=20=E5=AE=A1=E6=89=B9=E9=85=8D?= =?UTF-8?q?=E7=BD=AE/=E5=BE=85=E5=8A=9E=E9=A1=B5=EF=BC=8C=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=E5=8F=91=E5=B8=83=E6=8F=90=E4=BA=A4=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 系统管理接入审批菜单同步;价格发布返回 PendingApproval 时提示审批单号。 Co-authored-by: Cursor --- src/api/channel/salesProduct.ts | 14 +- src/api/system/approval.ts | 312 +++++++++++ src/constants/pageButtonCatalog.ts | 12 + src/locale/en-US.ts | 66 +++ src/locale/zh-CN.ts | 65 +++ .../routes/newModules/system-management.ts | 27 + src/utils/menu-icon.ts | 4 + src/views/channel/salesProducts/index.vue | 32 +- .../system/approval/definition/index.vue | 489 ++++++++++++++++++ src/views/system/approval/inbox/index.vue | 452 ++++++++++++++++ 10 files changed, 1464 insertions(+), 9 deletions(-) create mode 100644 src/api/system/approval.ts create mode 100644 src/views/system/approval/definition/index.vue create mode 100644 src/views/system/approval/inbox/index.vue diff --git a/src/api/channel/salesProduct.ts b/src/api/channel/salesProduct.ts index 84a5863..a60ca2c 100644 --- a/src/api/channel/salesProduct.ts +++ b/src/api/channel/salesProduct.ts @@ -217,15 +217,27 @@ export async function getSalesProductPublishSyncStatus(params: { }>(res.data) } +export type SalesProductPublishResult = { + decision?: string + Decision?: string + approvalInstanceId?: number + ApprovalInstanceId?: number + approvalInstanceNo?: string + ApprovalInstanceNo?: string + message?: string + Message?: string +} + export async function publishSalesProduct(body: { salesProductId: number | string operatorType: string description?: string /** 价格发布必填:AI 风险分析报告原文 */ aiAnalysisReport?: string -}) { +}): Promise { const res = await axiosInstance.post(omsUrl('/channel/sales-product/publish'), body) assertBusinessOk(res.data) + return unwrapData(res.data) } export async function rollbackSalesProductPublish(body: { diff --git a/src/api/system/approval.ts b/src/api/system/approval.ts new file mode 100644 index 0000000..4a89a83 --- /dev/null +++ b/src/api/system/approval.ts @@ -0,0 +1,312 @@ +import { axiosInstance } from '@/api/rbac' +import { + assertBusinessOk, + extractOmsRequestError, + omsUrl, + parseListPayload, + unwrapData, +} from '@/api/oms/common' + +export interface ApprovalDefinitionDto { + id: number + operationCode: string + operationName: string + isEnabled: boolean + conditionFormula?: string | null + approverType: string + approverIds: string[] + forbidSelfApprove: boolean + remark?: string | null + createTime?: string + updateTime?: string +} + +export interface ApprovalCatalogItem { + code: string + name: string + module: string + supportsCondition: boolean + conditionHint: string +} + +export interface ApprovalInstanceDto { + id: number + instanceNo: string + operationCode: string + bizKey: string + title: string + status: number + statusName: string + applicantUserId: number + applicantUserGuid: string + applicantUserName?: string | null + payloadJson?: string | null + summaryJson?: string | null + definitionSnapshot?: string | null + currentTaskId?: number | null + createTime?: string + completedTime?: string | null + executedTime?: string | null + executeMessage?: string | null + concurrencyStamp?: string | null + canApprove?: boolean + canWithdraw?: boolean + events?: ApprovalEventDto[] +} + +export interface ApprovalEventDto { + id: number + eventType: string + fromStatus?: number | null + toStatus?: number | null + operatorUserName?: string | null + message?: string | null + createTime?: string +} + +function pickString(row: Record, ...keys: string[]) { + for (const key of keys) { + const value = row[key] + if (value != null && String(value).trim()) return String(value).trim() + } + return '' +} + +function pickBool(row: Record, ...keys: string[]) { + for (const key of keys) { + const value = row[key] + if (typeof value === 'boolean') return value + if (value === 1 || value === '1' || value === 'true') return true + if (value === 0 || value === '0' || value === 'false') return false + } + return false +} + +function pickNumber(row: Record, ...keys: string[]) { + for (const key of keys) { + const value = row[key] + if (typeof value === 'number' && Number.isFinite(value)) return value + const n = Number(value) + if (Number.isFinite(n)) return n + } + return 0 +} + +function pickIds(row: Record): string[] { + const raw = row.approverIds ?? row.ApproverIds + if (Array.isArray(raw)) return raw.map((x) => String(x).trim()).filter(Boolean) + if (typeof raw === 'string') { + return raw.split(/[,;,\s]+/).map((x) => x.trim()).filter(Boolean) + } + return [] +} + +export function mapDefinitionRow(row: Record): ApprovalDefinitionDto { + return { + id: pickNumber(row, 'id', 'Id'), + operationCode: pickString(row, 'operationCode', 'OperationCode'), + operationName: pickString(row, 'operationName', 'OperationName'), + isEnabled: pickBool(row, 'isEnabled', 'IsEnabled'), + conditionFormula: pickString(row, 'conditionFormula', 'ConditionFormula') || null, + approverType: pickString(row, 'approverType', 'ApproverType') || 'User', + approverIds: pickIds(row), + forbidSelfApprove: pickBool(row, 'forbidSelfApprove', 'ForbidSelfApprove'), + remark: pickString(row, 'remark', 'Remark') || null, + createTime: pickString(row, 'createTime', 'CreateTime') || undefined, + updateTime: pickString(row, 'updateTime', 'UpdateTime') || undefined, + } +} + +export function mapInstanceRow(row: Record): ApprovalInstanceDto { + const eventsRaw = (row.events ?? row.Events) as Record[] | undefined + return { + id: pickNumber(row, 'id', 'Id'), + instanceNo: pickString(row, 'instanceNo', 'InstanceNo'), + operationCode: pickString(row, 'operationCode', 'OperationCode'), + bizKey: pickString(row, 'bizKey', 'BizKey'), + title: pickString(row, 'title', 'Title'), + status: pickNumber(row, 'status', 'Status'), + statusName: pickString(row, 'statusName', 'StatusName'), + applicantUserId: pickNumber(row, 'applicantUserId', 'ApplicantUserId'), + applicantUserGuid: pickString(row, 'applicantUserGuid', 'ApplicantUserGuid'), + applicantUserName: pickString(row, 'applicantUserName', 'ApplicantUserName') || null, + payloadJson: pickString(row, 'payloadJson', 'PayloadJson') || null, + summaryJson: pickString(row, 'summaryJson', 'SummaryJson') || null, + definitionSnapshot: pickString(row, 'definitionSnapshot', 'DefinitionSnapshot') || null, + currentTaskId: pickNumber(row, 'currentTaskId', 'CurrentTaskId') || null, + createTime: pickString(row, 'createTime', 'CreateTime') || undefined, + completedTime: pickString(row, 'completedTime', 'CompletedTime') || null, + executedTime: pickString(row, 'executedTime', 'ExecutedTime') || null, + executeMessage: pickString(row, 'executeMessage', 'ExecuteMessage') || null, + concurrencyStamp: pickString(row, 'concurrencyStamp', 'ConcurrencyStamp') || null, + canApprove: pickBool(row, 'canApprove', 'CanApprove'), + canWithdraw: pickBool(row, 'canWithdraw', 'CanWithdraw'), + events: Array.isArray(eventsRaw) + ? eventsRaw.map((e) => ({ + id: pickNumber(e, 'id', 'Id'), + eventType: pickString(e, 'eventType', 'EventType'), + fromStatus: pickNumber(e, 'fromStatus', 'FromStatus') || null, + toStatus: pickNumber(e, 'toStatus', 'ToStatus') || null, + operatorUserName: pickString(e, 'operatorUserName', 'OperatorUserName') || null, + message: pickString(e, 'message', 'Message') || null, + createTime: pickString(e, 'createTime', 'CreateTime') || undefined, + })) + : [], + } +} + +export async function getApprovalDefinitionList(params: { + page?: number + pageSize?: number + keyword?: string + isEnabled?: boolean | null +}) { + const res = await axiosInstance.get(omsUrl('/system/approval/definition/list'), { params }) + const { items, total } = parseListPayload(res.data) + return { + items: (items || []).map((row) => mapDefinitionRow(row as Record)), + total, + } +} + +export async function getApprovalCatalog() { + const res = await axiosInstance.get(omsUrl('/system/approval/operation-catalog')) + const payload = unwrapData[] | null>(res.data) + if (!Array.isArray(payload)) return [] as ApprovalCatalogItem[] + return payload.map((row) => ({ + code: pickString(row, 'code', 'Code'), + name: pickString(row, 'name', 'Name'), + module: pickString(row, 'module', 'Module'), + supportsCondition: pickBool(row, 'supportsCondition', 'SupportsCondition'), + conditionHint: pickString(row, 'conditionHint', 'ConditionHint'), + })) +} + +export async function saveApprovalDefinition(body: { + id?: number + operationCode: string + isEnabled: boolean + conditionFormula?: string | null + approverType: string + approverIds: string[] + forbidSelfApprove: boolean + remark?: string | null +}) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/definition/save'), body) + assertBusinessOk(res.data) + return mapDefinitionRow((unwrapData(res.data) || {}) as Record) + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} + +export async function enableApprovalDefinition(id: number, isEnabled: boolean) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/definition/enable'), { id, isEnabled }) + assertBusinessOk(res.data) + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} + +export async function deleteApprovalDefinition(id: number) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/definition/delete'), { id }) + assertBusinessOk(res.data) + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} + +export async function getApprovalMyTodo(params: { + page?: number + pageSize?: number + keyword?: string +}) { + const res = await axiosInstance.get(omsUrl('/system/approval/engine/my-todo'), { params }) + const { items, total } = parseListPayload(res.data) + return { + items: (items || []).map((row) => mapInstanceRow(row as Record)), + total, + } +} + +export async function getApprovalMySubmitted(params: { + page?: number + pageSize?: number + keyword?: string + status?: number | null +}) { + const res = await axiosInstance.get(omsUrl('/system/approval/engine/my-submitted'), { params }) + const { items, total } = parseListPayload(res.data) + return { + items: (items || []).map((row) => mapInstanceRow(row as Record)), + total, + } +} + +export async function getApprovalDetail(id: number) { + const res = await axiosInstance.get(omsUrl('/system/approval/engine/detail'), { params: { id } }) + return mapInstanceRow((unwrapData(res.data) || {}) as Record) +} + +export async function approveApproval(body: { + instanceId: number + comment?: string + concurrencyStamp?: string | null +}) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/engine/approve'), body) + assertBusinessOk(res.data) + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} + +export async function rejectApproval(body: { + instanceId: number + comment: string + concurrencyStamp?: string | null +}) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/engine/reject'), body) + assertBusinessOk(res.data) + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} + +export async function withdrawApproval(body: { + instanceId: number + comment?: string + concurrencyStamp?: string | null +}) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/engine/withdraw'), body) + assertBusinessOk(res.data) + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} + +export async function simulateApprovalSubmit(body: { + operationCode?: string + bizKey?: string + title?: string + payload?: unknown + summary?: unknown +}) { + try { + const res = await axiosInstance.post(omsUrl('/system/approval/engine/simulate-submit'), body) + assertBusinessOk(res.data) + return unwrapData(res.data) as { + decision?: string + instanceId?: number + instanceNo?: string + message?: string + } + } catch (e) { + throw new Error(extractOmsRequestError(e)) + } +} diff --git a/src/constants/pageButtonCatalog.ts b/src/constants/pageButtonCatalog.ts index 828dea0..5b731e5 100644 --- a/src/constants/pageButtonCatalog.ts +++ b/src/constants/pageButtonCatalog.ts @@ -1111,6 +1111,18 @@ const CORE_GROUPS: PageButtonGroup[] = [ { code: 'SaveConfig', name: '保存配置' }, { code: 'TestConnection', name: '测试连接' }, ]), + B('System.ApprovalDefinition', [ + { code: 'Query', name: '查询' }, + { code: 'Create', name: '新增' }, + { code: 'Update', name: '修改' }, + { code: 'Delete', name: '删除' }, + { code: 'Enable', name: '启停' }, + ]), + B('System.ApprovalTask', [ + { code: 'Query', name: '查询' }, + { code: 'Approve', name: '通过' }, + { code: 'Reject', name: '驳回' }, + ]), // ── 小红书 ── B('Xhs.Agent', [ diff --git a/src/locale/en-US.ts b/src/locale/en-US.ts index e509baa..7dc9c47 100644 --- a/src/locale/en-US.ts +++ b/src/locale/en-US.ts @@ -35,6 +35,13 @@ export default { 'common.clear': 'Clear', 'common.delete': 'Delete', 'common.saveSuccess': 'Save successful', + 'common.saveFailed': 'Save failed', + 'common.success': 'Success', + 'common.failed': 'Failed', + 'common.loadFailed': 'Load failed', + 'common.deleteSuccess': 'Deleted', + 'common.deleteFailed': 'Delete failed', + 'common.edit': 'Edit', 'common.importFailed': 'Import failed', 'common.operationFailed': 'Operation failed', 'pagination.pageExceeded': 'Page number exceeds maximum limit, automatically jumped to page {max}', @@ -1450,6 +1457,63 @@ export default { 'menu.system.dataPermUsers': 'User Data Permission', 'menu.system.dataPermTemplates': 'Permission Templates', 'menu.system.dataPermAudit': 'Permission Audit', + 'menu.system.approvalDefinition': 'Approval Config', + 'menu.system.approvalInbox': 'Approval Inbox', + + 'system.approval.definition.searchPlaceholder': 'Operation code / name', + 'system.approval.definition.enabledFilter': 'Status', + 'system.approval.definition.enabled': 'Enabled', + 'system.approval.definition.disabled': 'Disabled', + 'system.approval.definition.addTitle': 'Add approval config', + 'system.approval.definition.editTitle': 'Edit approval config', + 'system.approval.definition.operationCode': 'Operation', + 'system.approval.definition.operationPlaceholder': 'Select operation', + 'system.approval.definition.approverType': 'Approver type', + 'system.approval.definition.approverUser': 'Users', + 'system.approval.definition.approverRole': 'Roles', + 'system.approval.definition.approvers': 'Approvers', + 'system.approval.definition.userPlaceholder': 'Select users', + 'system.approval.definition.rolePlaceholder': 'Select roles', + 'system.approval.definition.condition': 'Condition', + 'system.approval.definition.conditionPlaceholder': 'Optional; empty means always require approval when enabled', + 'system.approval.definition.forbidSelf': 'Forbid self-approve', + 'system.approval.definition.remark': 'Remark', + 'system.approval.definition.toggle': 'Enable/Disable', + 'system.approval.definition.simulate': 'Simulate submit', + 'system.approval.definition.simulateTitle': 'Approval engine simulation', + 'system.approval.definition.deleteConfirm': 'Delete approval config for "{name}"?', + 'system.approval.definition.col.operation': 'Operation', + 'system.approval.definition.col.code': 'Code', + 'system.approval.definition.col.approverType': 'Type', + 'system.approval.definition.col.approvers': 'Approvers', + 'system.approval.definition.col.enabled': 'Status', + 'system.approval.definition.col.updateTime': 'Updated', + 'system.approval.definition.rules.operation': 'Operation is required', + 'system.approval.definition.rules.approverType': 'Approver type is required', + 'system.approval.definition.rules.approvers': 'Approvers are required', + + 'system.approval.inbox.tabTodo': 'My tasks', + 'system.approval.inbox.tabSubmitted': 'Submitted by me', + 'system.approval.inbox.tabsAria': 'Approval inbox tabs', + 'system.approval.inbox.searchPlaceholder': 'No. / title / operation', + 'system.approval.inbox.detailTitle': 'Approval detail', + 'system.approval.inbox.detail': 'Detail', + 'system.approval.inbox.approve': 'Approve', + 'system.approval.inbox.reject': 'Reject', + 'system.approval.inbox.withdraw': 'Withdraw', + 'system.approval.inbox.payload': 'Payload', + 'system.approval.inbox.timeline': 'Timeline', + 'system.approval.inbox.rejectPlaceholder': 'Rejection reason', + 'system.approval.inbox.rejectRequired': 'Rejection reason is required', + 'system.approval.inbox.approveConfirm': 'Approve instance {no}?', + 'system.approval.inbox.withdrawConfirm': 'Withdraw instance {no}?', + 'system.approval.inbox.col.instanceNo': 'No.', + 'system.approval.inbox.col.title': 'Title', + 'system.approval.inbox.col.operation': 'Operation', + 'system.approval.inbox.col.status': 'Status', + 'system.approval.inbox.col.applicant': 'Applicant', + 'system.approval.inbox.col.createTime': 'Submitted at', + 'system.dataPerm.users.title': 'User Data Permission', 'system.dataPerm.users.desc': 'Configure direct five-dimension permissions for internal users', 'system.dataPerm.users.loading': 'Loading users...', @@ -5388,6 +5452,8 @@ export default { 'channel.salesProducts.publish.effectiveTime': 'Effective time', 'channel.salesProducts.publish.effectiveTimeHint': 'Leave empty for immediate effect', 'channel.salesProducts.publish.success': 'Published successfully', + 'channel.salesProducts.publish.pendingApproval': 'Submitted for approval ({no}); takes effect after approval', + 'channel.salesProducts.publish.pendingApprovalFallback': 'Submitted for approval; takes effect after approval', 'channel.salesProducts.publish.fail': 'Publish failed', 'channel.salesProducts.publish.status.synced': 'Content matches the live cache; no republish needed', 'channel.salesProducts.publish.status.changed': '{count} change(s) detected; confirm to update the live cache', diff --git a/src/locale/zh-CN.ts b/src/locale/zh-CN.ts index b7b7a4a..f48ed6c 100644 --- a/src/locale/zh-CN.ts +++ b/src/locale/zh-CN.ts @@ -35,6 +35,13 @@ export default { 'common.clear': '清空', 'common.delete': '删除', 'common.saveSuccess': '保存成功', + 'common.saveFailed': '保存失败', + 'common.success': '操作成功', + 'common.failed': '操作失败', + 'common.loadFailed': '加载失败', + 'common.deleteSuccess': '删除成功', + 'common.deleteFailed': '删除失败', + 'common.edit': '编辑', 'common.importFailed': '导入失败', 'common.operationFailed': '操作失败', 'pagination.pageExceeded': '页码超出最大限制,已自动跳转到第 {max} 页', @@ -1441,6 +1448,62 @@ export default { 'menu.system.dataPermUsers': '用户数据权限', 'menu.system.dataPermTemplates': '权限模板', 'menu.system.dataPermAudit': '权限审计', + 'menu.system.approvalDefinition': '审批配置', + 'menu.system.approvalInbox': '审批待办', + + 'system.approval.definition.searchPlaceholder': '操作编码/名称', + 'system.approval.definition.enabledFilter': '启停状态', + 'system.approval.definition.enabled': '启用', + 'system.approval.definition.disabled': '停用', + 'system.approval.definition.addTitle': '新增审批配置', + 'system.approval.definition.editTitle': '编辑审批配置', + 'system.approval.definition.operationCode': '操作', + 'system.approval.definition.operationPlaceholder': '选择可审批操作', + 'system.approval.definition.approverType': '审批人类型', + 'system.approval.definition.approverUser': '指定用户', + 'system.approval.definition.approverRole': '指定角色', + 'system.approval.definition.approvers': '审批人', + 'system.approval.definition.userPlaceholder': '选择用户', + 'system.approval.definition.rolePlaceholder': '选择角色', + 'system.approval.definition.condition': '触发条件', + 'system.approval.definition.conditionPlaceholder': '可留空;空表示启用即始终需审', + 'system.approval.definition.forbidSelf': '禁止自审', + 'system.approval.definition.remark': '备注', + 'system.approval.definition.toggle': '启停', + 'system.approval.definition.simulate': '模拟提交', + 'system.approval.definition.simulateTitle': '审批引擎模拟单', + 'system.approval.definition.deleteConfirm': '确认删除「{name}」的审批配置?', + 'system.approval.definition.col.operation': '操作名称', + 'system.approval.definition.col.code': '操作编码', + 'system.approval.definition.col.approverType': '类型', + 'system.approval.definition.col.approvers': '审批人', + 'system.approval.definition.col.enabled': '状态', + 'system.approval.definition.col.updateTime': '更新时间', + 'system.approval.definition.rules.operation': '请选择操作', + 'system.approval.definition.rules.approverType': '请选择审批人类型', + 'system.approval.definition.rules.approvers': '请选择审批人', + + 'system.approval.inbox.tabTodo': '待我审批', + 'system.approval.inbox.tabSubmitted': '我发起的', + 'system.approval.inbox.tabsAria': '审批待办分类', + 'system.approval.inbox.searchPlaceholder': '单号/标题/操作码', + 'system.approval.inbox.detailTitle': '审批详情', + 'system.approval.inbox.detail': '详情', + 'system.approval.inbox.approve': '通过', + 'system.approval.inbox.reject': '驳回', + 'system.approval.inbox.withdraw': '撤回', + 'system.approval.inbox.payload': '业务载荷', + 'system.approval.inbox.timeline': '事件时间线', + 'system.approval.inbox.rejectPlaceholder': '请填写驳回意见', + 'system.approval.inbox.rejectRequired': '驳回意见不能为空', + 'system.approval.inbox.approveConfirm': '确认通过审批单 {no}?', + 'system.approval.inbox.withdrawConfirm': '确认撤回审批单 {no}?', + 'system.approval.inbox.col.instanceNo': '单号', + 'system.approval.inbox.col.title': '标题', + 'system.approval.inbox.col.operation': '操作', + 'system.approval.inbox.col.status': '状态', + 'system.approval.inbox.col.applicant': '申请人', + 'system.approval.inbox.col.createTime': '提交时间', 'menu.xhs': '小红书', 'menu.xhs.startService': '启动服务', @@ -5412,6 +5475,8 @@ export default { 'channel.salesProducts.publish.effectiveTime': '生效时间', 'channel.salesProducts.publish.effectiveTimeHint': '不选默认立即生效', 'channel.salesProducts.publish.success': '发布成功', + 'channel.salesProducts.publish.pendingApproval': '已提交审批({no}),通过后生效', + 'channel.salesProducts.publish.pendingApprovalFallback': '已提交审批,通过后生效', 'channel.salesProducts.publish.fail': '发布失败', 'channel.salesProducts.publish.status.synced': '当前内容与线上一致,无需重复发布', 'channel.salesProducts.publish.status.changed': '检测到 {count} 处变更,确认后将更新线上缓存', diff --git a/src/router/routes/newModules/system-management.ts b/src/router/routes/newModules/system-management.ts index f6eb73e..f529269 100644 --- a/src/router/routes/newModules/system-management.ts +++ b/src/router/routes/newModules/system-management.ts @@ -178,6 +178,33 @@ const SYSTEM_MANAGEMENT: AppRouteRecordRaw = { permission: 'Rbac.DataPerm.Audit', }, }, + { + path: 'approval/definition', + name: 'SystemApprovalDefinition', + component: () => import('@/views/system/approval/definition/index.vue'), + meta: { + locale: 'menu.system.approvalDefinition', + requiresAuth: true, + // 供菜单管理「同步子菜单及按钮」写入二级菜单权限码(不走路由守卫) + menuPermission: 'System.ApprovalDefinition', + permission: 'System.ApprovalDefinition.Query', + order: 40, + icon: 'icon-check-circle', + }, + }, + { + path: 'approval/inbox', + name: 'SystemApprovalInbox', + component: () => import('@/views/system/approval/inbox/index.vue'), + meta: { + locale: 'menu.system.approvalInbox', + requiresAuth: true, + menuPermission: 'System.ApprovalTask', + permission: 'System.ApprovalTask.Query', + order: 41, + icon: 'icon-calendar', + }, + }, ], }; diff --git a/src/utils/menu-icon.ts b/src/utils/menu-icon.ts index 79cb9e7..14086a6 100644 --- a/src/utils/menu-icon.ts +++ b/src/utils/menu-icon.ts @@ -95,6 +95,8 @@ export const SUB_MENU_DEFAULT_ICONS: Record = { 'menu.system.dataPermUsers': 'IconUser', 'menu.system.dataPermTemplates': 'IconFile', 'menu.system.dataPermAudit': 'IconHistory', + 'menu.system.approvalDefinition': 'IconCheckCircle', + 'menu.system.approvalInbox': 'IconCalendar', 'menu.xhs.startService': 'IconPlayArrow', 'menu.xhs.analysis': 'IconBarChart', 'menu.xhs.creation': 'IconEdit', @@ -132,6 +134,8 @@ export const PATH_TO_LOCALE_KEY: Record = { '/kb/training': 'menu.kb.training', '/agentAdmin/list': 'menu.agentAdmin.list', '/agentAdmin/commission': 'menu.agentAdmin.commission', + '/system/approval/definition': 'menu.system.approvalDefinition', + '/system/approval/inbox': 'menu.system.approvalInbox', } type MenuIconItem = { diff --git a/src/views/channel/salesProducts/index.vue b/src/views/channel/salesProducts/index.vue index 083e558..ea89832 100644 --- a/src/views/channel/salesProducts/index.vue +++ b/src/views/channel/salesProducts/index.vue @@ -2313,14 +2313,28 @@ } pricePublishSubmitting.value = true; try { - await publishSalesProduct({ + const publishResult = await publishSalesProduct({ salesProductId: Number(pid), operatorType, description: publishDescription.value || undefined, aiAnalysisReport: operatorType === 'price' ? pricePublishAiReport.value.trim() || undefined : undefined, }); - Message.success(t('channel.salesProducts.publish.success')); + const decision = String( + publishResult?.decision ?? publishResult?.Decision ?? '', + ).trim(); + const approvalNo = String( + publishResult?.approvalInstanceNo ?? publishResult?.ApprovalInstanceNo ?? '', + ).trim(); + if (decision === 'PendingApproval') { + Message.info( + approvalNo + ? t('channel.salesProducts.publish.pendingApproval', { no: approvalNo }) + : t('channel.salesProducts.publish.pendingApprovalFallback'), + ); + } else { + Message.success(t('channel.salesProducts.publish.success')); + } if (operatorType === 'rules') { configPublishPending.value = false; rulesPublishPending.value = false; @@ -2334,12 +2348,14 @@ publishConfirmDate.value = dayjs(); clearPricePublishAiReport(); publishModalMethods.closeModal(); - await loadRecordsTabData(pid, true); - if (operatorType === 'price') { - // 不乐观改徽章;等后端 sync-status 重算 - pricePublishPending.value = null; - await loadPriceTabData(pid, { force: true }); - await refreshPricePublishSyncStatus(pid); + if (decision !== 'PendingApproval') { + await loadRecordsTabData(pid, true); + if (operatorType === 'price') { + // 不乐观改徽章;等后端 sync-status 重算 + pricePublishPending.value = null; + await loadPriceTabData(pid, { force: true }); + await refreshPricePublishSyncStatus(pid); + } } } catch (e: any) { Message.error(e?.message || t('channel.salesProducts.publish.fail')); diff --git a/src/views/system/approval/definition/index.vue b/src/views/system/approval/definition/index.vue new file mode 100644 index 0000000..689c959 --- /dev/null +++ b/src/views/system/approval/definition/index.vue @@ -0,0 +1,489 @@ + + + + + diff --git a/src/views/system/approval/inbox/index.vue b/src/views/system/approval/inbox/index.vue new file mode 100644 index 0000000..42ef8f0 --- /dev/null +++ b/src/views/system/approval/inbox/index.vue @@ -0,0 +1,452 @@ + + + + + -- 2.45.2 From 77642cdc94a6d97158a8c2e4d09c518580b9c99c Mon Sep 17 00:00:00 2001 From: zzh <1368735060@qq.com> Date: Mon, 9 Nov 2026 09:18:10 +0800 Subject: [PATCH 06/11] =?UTF-8?q?feat:=20=E5=AE=A1=E6=89=B9=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=8A=BD=E5=B1=89=E4=B8=8E=E5=85=85=E5=80=BC/?= =?UTF-8?q?=E7=AB=99=E5=86=85=E4=BF=A1=E6=B7=B1=E9=93=BE=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 价格与充值待审批就地弹抽屉;审批站内信可打开对应审批单;修复审批页开发态回车空白。 Co-authored-by: Cursor --- src/api/channel/salesProduct.ts | 8 + src/components.d.ts | 1 + src/components/ApprovalDetailDrawer/index.vue | 1016 +++++++++++++++++ src/locale/en-US.ts | 54 +- src/locale/zh-CN.ts | 52 +- src/utils/approvalNoticeLink.ts | 47 + src/views/channel/salesProducts/index.vue | 103 +- src/views/finance/rechargeRecord/index.vue | 87 +- src/views/h5/admin-center/locale/en-US.ts | 3 + src/views/h5/admin-center/locale/zh-CN.ts | 3 + src/views/h5/admin-center/recharge/index.vue | 40 +- .../components/H5RechargeSheet.vue | 18 +- .../workplace/components/announcement.vue | 38 +- src/views/system/announcement/index.vue | 36 +- src/views/system/approval/inbox/index.vue | 132 +-- src/views/user/recharge/deposit.vue | 18 +- vite.config.ts | 13 +- 17 files changed, 1526 insertions(+), 143 deletions(-) create mode 100644 src/components/ApprovalDetailDrawer/index.vue create mode 100644 src/utils/approvalNoticeLink.ts diff --git a/src/api/channel/salesProduct.ts b/src/api/channel/salesProduct.ts index a60ca2c..1101809 100644 --- a/src/api/channel/salesProduct.ts +++ b/src/api/channel/salesProduct.ts @@ -214,6 +214,14 @@ export async function getSalesProductPublishSyncStatus(params: { OnlinePublishTime?: string | null pendingContentHash?: string | null onlineContentHash?: string | null + approvalPending?: boolean + ApprovalPending?: boolean + approvalInstanceId?: number | null + ApprovalInstanceId?: number | null + approvalInstanceNo?: string | null + ApprovalInstanceNo?: string | null + approvalStatusName?: string | null + ApprovalStatusName?: string | null }>(res.data) } diff --git a/src/components.d.ts b/src/components.d.ts index 5637a3b..f8bb9d3 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,6 +12,7 @@ declare module 'vue' { AgentSideRail: typeof import('./components/agent-side-rail/index.vue')['default'] AiAdvisorShell: typeof import('./components/NanaAssistant/AiAdvisorShell.vue')['default'] ApiTest: typeof import('./components/ApiTest/index.vue')['default'] + ApprovalDetailDrawer: typeof import('./components/ApprovalDetailDrawer/index.vue')['default'] BasicLayoutLeftRight: typeof import('./components/BasicLayoutLeftRight/index.vue')['default'] Block: typeof import('./components/global-setting/block.vue')['default'] Cascader: typeof import('./components/CascaderPro/Cascader.vue')['default'] diff --git a/src/components/ApprovalDetailDrawer/index.vue b/src/components/ApprovalDetailDrawer/index.vue new file mode 100644 index 0000000..94a3f13 --- /dev/null +++ b/src/components/ApprovalDetailDrawer/index.vue @@ -0,0 +1,1016 @@ + + + + + diff --git a/src/locale/en-US.ts b/src/locale/en-US.ts index 7dc9c47..79fa9f0 100644 --- a/src/locale/en-US.ts +++ b/src/locale/en-US.ts @@ -1502,7 +1502,39 @@ export default { 'system.approval.inbox.reject': 'Reject', 'system.approval.inbox.withdraw': 'Withdraw', 'system.approval.inbox.payload': 'Payload', + 'system.approval.inbox.basicInfo': 'Basics', + 'system.approval.inbox.bizSummary': 'Business content', + 'system.approval.inbox.noSummary': 'No business summary', + 'system.approval.inbox.rawPayload': 'View raw payload', + 'system.approval.inbox.price.description': 'Description', + 'system.approval.inbox.price.aiReport': 'AI analysis report', + 'system.approval.inbox.price.noAiReport': 'No AI report attached', + 'system.approval.inbox.price.expandReport': 'Expand full AI report', + 'system.approval.inbox.price.skippedAi': 'AI skipped', + 'system.approval.inbox.recharge.customer': 'Customer', + 'system.approval.inbox.recharge.payType': 'Payment method', + 'system.approval.inbox.recharge.serialNo': 'Serial No.', + 'system.approval.inbox.recharge.remark': 'Remark', + 'system.approval.inbox.recharge.screenshot': 'Screenshot', + 'system.approval.inbox.recharge.viewImage': 'View image', + 'system.approval.inbox.recharge.noScreenshot': 'No screenshot', + 'system.approval.inbox.noTimeline': 'No timeline yet', + 'system.approval.inbox.completedTime': 'Completed at', + 'system.approval.inbox.executedTime': 'Executed at', + 'system.approval.inbox.executeMessage': 'Execution result', + 'system.approval.inbox.copy': 'Copy', + 'system.approval.inbox.copySuccess': 'Copied', + 'system.approval.inbox.copyFailed': 'Copy failed', 'system.approval.inbox.timeline': 'Timeline', + 'system.approval.inbox.event.submitted': 'Submitted', + 'system.approval.inbox.event.approved': 'Approved', + 'system.approval.inbox.event.rejected': 'Rejected', + 'system.approval.inbox.event.withdrawn': 'Withdrawn', + 'system.approval.inbox.event.executing': 'Executing', + 'system.approval.inbox.event.executed': 'Executed', + 'system.approval.inbox.event.executeFailed': 'Execution failed', + 'system.approval.inbox.event.rejectCompensateFailed': 'Reject compensate failed', + 'system.approval.inbox.event.withdrawCompensateFailed': 'Withdraw compensate failed', 'system.approval.inbox.rejectPlaceholder': 'Rejection reason', 'system.approval.inbox.rejectRequired': 'Rejection reason is required', 'system.approval.inbox.approveConfirm': 'Approve instance {no}?', @@ -4585,6 +4617,7 @@ export default { 'system.announcement.actions.view': 'View', 'system.announcement.actions.delete': 'Delete', 'system.announcement.actions.readConfirm': 'Confirm Read', + 'system.announcement.actions.openApproval': 'Open approval', 'system.announcement.messageType.inform': 'Inform', 'system.announcement.messageType.message': 'Message', 'system.announcement.messageType.notice': 'Notice', @@ -4788,6 +4821,9 @@ export default { 'user.recharge.deposit.message.uploadVoucherFirst': 'Please upload recharge voucher first', 'user.recharge.deposit.message.submitFailed': 'Submit failed', 'user.recharge.deposit.message.submitSuccess': 'Recharge application submitted, pending review', + 'user.recharge.deposit.message.pendingApproval': 'Submitted for approval ({no}); credited after approval', + 'user.recharge.deposit.message.pendingApprovalFallback': 'Submitted for approval; credited after approval', + 'user.recharge.deposit.message.bypassed': 'Recharge credited', // User - Recharge Record 'user.recharge.record.search.serialNo': 'Serial No', @@ -4795,7 +4831,8 @@ export default { 'user.recharge.record.search.status': 'Recharge Status', 'user.recharge.record.search.statusPlaceholder': 'Please select', 'user.recharge.record.search.statusAll': 'All', - 'user.recharge.record.search.statusPending': 'Pending', + 'user.recharge.record.search.statusPending': 'Pending review', + 'user.recharge.record.search.statusPendingApproval': 'Pending approval', 'user.recharge.record.search.statusSuccess': 'Success', 'user.recharge.record.search.statusFailed': 'Failed', 'user.recharge.record.search.actions.search': 'Search', @@ -4815,18 +4852,25 @@ export default { 'user.recharge.record.message.approveError': 'Approve failed', 'user.recharge.record.message.rejectError': 'Reject failed', 'user.recharge.record.table.serialNo': 'Serial No', + 'user.recharge.record.table.customerCode': 'Customer Code', + 'user.recharge.record.table.customerName': 'Customer Name', 'user.recharge.record.table.payTime': 'Recharge Time', 'user.recharge.record.table.payType': 'Payment Method', 'user.recharge.record.table.payAmount': 'Recharge Amount', 'user.recharge.record.table.payImage': 'Recharge Screenshot', 'user.recharge.record.table.viewImage': 'View', 'user.recharge.record.table.payStatus': 'Recharge Status', + 'user.recharge.record.table.approvalNo': 'Approval No.', + 'user.recharge.record.table.auditTime': 'Audit Time', + 'user.recharge.record.table.auditBy': 'Auditor', 'user.recharge.record.table.remarks': 'Remarks', 'user.recharge.record.message.noPayImage': 'No screenshot available', + 'user.recharge.record.message.approvalDetailMissing': 'Approval instance missing; refresh and retry', 'user.recharge.record.payment.alipay': 'Alipay', 'user.recharge.record.payment.wechat': 'WeChat', 'user.recharge.record.actions.approve': 'Approve', 'user.recharge.record.actions.reject': 'Reject', + 'user.recharge.record.actions.viewApproval': 'View approval', 'user.recharge.record.message.approveSuccess': 'Approved', 'user.recharge.record.message.rejectSuccess': 'Rejected', 'user.recharge.record.message.exportSuccess': 'Exported successfully', @@ -5377,6 +5421,7 @@ export default { 'channel.salesProducts.actions.publishConfig': 'Publish config', 'channel.salesProducts.actions.publishRules': 'Publish rules', 'channel.salesProducts.actions.publishPrice': 'Publish prices', + 'channel.salesProducts.actions.viewPriceApproval': 'View approval', 'channel.salesProducts.actions.add': 'Add', 'channel.salesProducts.actions.edit': 'Edit', 'channel.salesProducts.actions.delete': 'Delete', @@ -5469,9 +5514,12 @@ export default { 'channel.salesProducts.publish.legend.remove': 'Removed', 'channel.salesProducts.publish.legend.change': 'Changed', 'channel.salesProducts.publish.legend.same': 'Unchanged', - 'channel.salesProducts.publish.badge.pending': 'Pending', - 'channel.salesProducts.publish.badge.synced': 'Synced', + 'channel.salesProducts.publish.badge.pending': 'Pending publish', + 'channel.salesProducts.publish.badge.pendingApproval': 'Pending approval', + 'channel.salesProducts.publish.badge.synced': 'Published', 'channel.salesProducts.publish.badge.checking': 'Checking…', + 'channel.salesProducts.publish.approvalNo': 'Approval No. {no}', + 'channel.salesProducts.publish.approvalDetailMissing': 'Approval instance missing; refresh and retry', 'channel.salesProducts.rules.schemeTitle': 'Shipping scheme', 'channel.salesProducts.rules.scheme.costLowest': 'Lowest cost', diff --git a/src/locale/zh-CN.ts b/src/locale/zh-CN.ts index f48ed6c..138a8b5 100644 --- a/src/locale/zh-CN.ts +++ b/src/locale/zh-CN.ts @@ -1493,7 +1493,39 @@ export default { 'system.approval.inbox.reject': '驳回', 'system.approval.inbox.withdraw': '撤回', 'system.approval.inbox.payload': '业务载荷', - 'system.approval.inbox.timeline': '事件时间线', + 'system.approval.inbox.basicInfo': '基本信息', + 'system.approval.inbox.bizSummary': '业务内容', + 'system.approval.inbox.noSummary': '暂无业务摘要', + 'system.approval.inbox.rawPayload': '查看原始载荷', + 'system.approval.inbox.price.description': '发布说明', + 'system.approval.inbox.price.aiReport': 'AI 分析报告', + 'system.approval.inbox.price.noAiReport': '提交时未附带 AI 报告', + 'system.approval.inbox.price.expandReport': '展开完整 AI 报告', + 'system.approval.inbox.price.skippedAi': '已跳过 AI', + 'system.approval.inbox.recharge.customer': '客户', + 'system.approval.inbox.recharge.payType': '支付方式', + 'system.approval.inbox.recharge.serialNo': '流水号', + 'system.approval.inbox.recharge.remark': '备注', + 'system.approval.inbox.recharge.screenshot': '充值截图', + 'system.approval.inbox.recharge.viewImage': '查看大图', + 'system.approval.inbox.recharge.noScreenshot': '未上传截图', + 'system.approval.inbox.noTimeline': '暂无流转记录', + 'system.approval.inbox.completedTime': '完成时间', + 'system.approval.inbox.executedTime': '执行时间', + 'system.approval.inbox.executeMessage': '执行结果', + 'system.approval.inbox.copy': '复制', + 'system.approval.inbox.copySuccess': '单号已复制', + 'system.approval.inbox.copyFailed': '复制失败', + 'system.approval.inbox.timeline': '审批流转', + 'system.approval.inbox.event.submitted': '已提交', + 'system.approval.inbox.event.approved': '已通过', + 'system.approval.inbox.event.rejected': '已驳回', + 'system.approval.inbox.event.withdrawn': '已撤回', + 'system.approval.inbox.event.executing': '执行中', + 'system.approval.inbox.event.executed': '执行成功', + 'system.approval.inbox.event.executeFailed': '执行失败', + 'system.approval.inbox.event.rejectCompensateFailed': '驳回补偿失败', + 'system.approval.inbox.event.withdrawCompensateFailed': '撤回补偿失败', 'system.approval.inbox.rejectPlaceholder': '请填写驳回意见', 'system.approval.inbox.rejectRequired': '驳回意见不能为空', 'system.approval.inbox.approveConfirm': '确认通过审批单 {no}?', @@ -4607,6 +4639,7 @@ export default { 'system.announcement.actions.view': '查看', 'system.announcement.actions.delete': '删除', 'system.announcement.actions.readConfirm': '确认已读', + 'system.announcement.actions.openApproval': '打开审批单', 'system.announcement.messageType.inform': '通知', 'system.announcement.messageType.message': '消息', 'system.announcement.messageType.notice': '公告', @@ -4810,6 +4843,9 @@ export default { 'user.recharge.deposit.message.uploadVoucherFirst': '请先上传充值凭证', 'user.recharge.deposit.message.submitFailed': '提交失败', 'user.recharge.deposit.message.submitSuccess': '充值申请已提交,请等待审核', + 'user.recharge.deposit.message.pendingApproval': '已提交审批({no}),通过后入账', + 'user.recharge.deposit.message.pendingApprovalFallback': '已提交审批,通过后入账', + 'user.recharge.deposit.message.bypassed': '充值已入账', // 用户 - 充值记录 'user.recharge.record.search.serialNo': '流水号', @@ -4818,6 +4854,7 @@ export default { 'user.recharge.record.search.statusPlaceholder': '请选择', 'user.recharge.record.search.statusAll': '全部', 'user.recharge.record.search.statusPending': '待审核', + 'user.recharge.record.search.statusPendingApproval': '待审批', 'user.recharge.record.search.statusSuccess': '成功', 'user.recharge.record.search.statusFailed': '失败', 'user.recharge.record.search.actions.search': '搜索', @@ -4837,18 +4874,25 @@ export default { 'user.recharge.record.message.approveError': '审核失败', 'user.recharge.record.message.rejectError': '拒绝失败', 'user.recharge.record.table.serialNo': '流水号', + 'user.recharge.record.table.customerCode': '客户编码', + 'user.recharge.record.table.customerName': '客户名称', 'user.recharge.record.table.payTime': '充值时间', 'user.recharge.record.table.payType': '支付方式', 'user.recharge.record.table.payAmount': '充值金额', 'user.recharge.record.table.payImage': '充值截图', 'user.recharge.record.table.viewImage': '查看', 'user.recharge.record.table.payStatus': '充值状态', + 'user.recharge.record.table.approvalNo': '审批号', + 'user.recharge.record.table.auditTime': '审核时间', + 'user.recharge.record.table.auditBy': '审核人', 'user.recharge.record.table.remarks': '备注', 'user.recharge.record.message.noPayImage': '暂无充值截图', + 'user.recharge.record.message.approvalDetailMissing': '暂无审批单,请刷新后重试', 'user.recharge.record.payment.alipay': '支付宝', 'user.recharge.record.payment.wechat': '微信', 'user.recharge.record.actions.approve': '通过', 'user.recharge.record.actions.reject': '拒绝', + 'user.recharge.record.actions.viewApproval': '查看审批', 'user.recharge.record.message.approveSuccess': '已通过', 'user.recharge.record.message.rejectSuccess': '已拒绝', 'user.recharge.record.message.exportSuccess': '导出成功', @@ -5400,6 +5444,7 @@ export default { 'channel.salesProducts.actions.publishConfig': '发布配置', 'channel.salesProducts.actions.publishRules': '发布规则', 'channel.salesProducts.actions.publishPrice': '价格发布', + 'channel.salesProducts.actions.viewPriceApproval': '查看审批', 'channel.salesProducts.actions.add': '新增', 'channel.salesProducts.actions.edit': '编辑', 'channel.salesProducts.actions.delete': '删除', @@ -5493,8 +5538,11 @@ export default { 'channel.salesProducts.publish.legend.change': '修改', 'channel.salesProducts.publish.legend.same': '不变', 'channel.salesProducts.publish.badge.pending': '待发布', - 'channel.salesProducts.publish.badge.synced': '已同步', + 'channel.salesProducts.publish.badge.pendingApproval': '待审批', + 'channel.salesProducts.publish.badge.synced': '已发布', 'channel.salesProducts.publish.badge.checking': '检测中…', + 'channel.salesProducts.publish.approvalNo': '审批号 {no}', + 'channel.salesProducts.publish.approvalDetailMissing': '暂无审批单,请刷新后重试', 'channel.salesProducts.rules.schemeTitle': '排货方案', 'channel.salesProducts.rules.scheme.costLowest': '成本最低', diff --git a/src/utils/approvalNoticeLink.ts b/src/utils/approvalNoticeLink.ts new file mode 100644 index 0000000..80da722 --- /dev/null +++ b/src/utils/approvalNoticeLink.ts @@ -0,0 +1,47 @@ +/** 审批站内信深链标记,例:[OMS_APPROVAL:id=12&tab=todo] */ + +export type ApprovalNoticeTab = 'todo' | 'submitted' + +export type ApprovalNoticeLink = { + instanceId: number + tab: ApprovalNoticeTab +} + +const MARKER_RE = /\[OMS_APPROVAL:([^\]]+)\]/i + +export function buildApprovalNoticeMarker( + instanceId: number, + tab: ApprovalNoticeTab = 'todo', +): string { + return `[OMS_APPROVAL:id=${instanceId}&tab=${tab}]` +} + +export function parseApprovalNoticeLink(content?: string | null): ApprovalNoticeLink | null { + const text = String(content || '') + const match = text.match(MARKER_RE) + if (!match?.[1]) return null + const params = new URLSearchParams(match[1].replace(/;/g, '&')) + const id = Number(params.get('id') || 0) + if (!Number.isFinite(id) || id <= 0) return null + const tabRaw = String(params.get('tab') || 'todo').trim() + const tab: ApprovalNoticeTab = tabRaw === 'submitted' ? 'submitted' : 'todo' + return { instanceId: id, tab } +} + +/** 展示给用户时去掉机器标记 */ +export function stripApprovalNoticeMarker(content?: string | null): string { + return String(content || '') + .replace(MARKER_RE, '') + .replace(/\n{3,}/g, '\n\n') + .trim() +} + +export function buildApprovalInboxLocation(link: ApprovalNoticeLink) { + return { + path: '/system/approval/inbox', + query: { + tab: link.tab, + instanceId: String(link.instanceId), + }, + } +} diff --git a/src/views/channel/salesProducts/index.vue b/src/views/channel/salesProducts/index.vue index ea89832..fe12d57 100644 --- a/src/views/channel/salesProducts/index.vue +++ b/src/views/channel/salesProducts/index.vue @@ -52,6 +52,7 @@ import PricePublishAiAssistDrawer from './components/PricePublishAiAssistDrawer.vue'; import type { PricePublishAiAdoptPayload } from './components/PricePublishAiAssistDrawer.vue'; import BillingSimulateDrawer from './components/BillingSimulateDrawer.vue'; + import ApprovalDetailDrawer from '@/components/ApprovalDetailDrawer/index.vue'; import { buildPricePublishAiSkipReport, type PricePublishRiskLevel } from './pricePublishAiSkill'; import { pickResolvedAudit } from '@/utils/auditFields'; import { useUserStore } from '@/store'; @@ -1452,12 +1453,15 @@ return detail?.content ?? detail?.Content ?? null; } - /** 仅展示后端 sync-status.pending,前端不做快照 diff */ + /** 同步态:待发布 / 待审批(+审批号) / 已发布 */ async function refreshPricePublishSyncStatus(productId?: number) { const pid = productId ?? selectedProduct.value; if (pid == null) { pricePublishChecking.value = false; pricePublishPending.value = null; + priceApprovalPending.value = false; + priceApprovalInstanceId.value = null; + priceApprovalInstanceNo.value = ''; return; } const seq = priceTabLoadSeq; @@ -1470,13 +1474,46 @@ if (seq !== priceTabLoadSeq || selectedProduct.value !== pid) return; const pending = status?.pending ?? status?.Pending; pricePublishPending.value = typeof pending === 'boolean' ? pending : null; + const approvalPending = Boolean( + status?.approvalPending ?? status?.ApprovalPending, + ); + priceApprovalPending.value = approvalPending; + const instanceId = + status?.approvalInstanceId ?? status?.ApprovalInstanceId ?? null; + priceApprovalInstanceId.value = + typeof instanceId === 'number' && instanceId > 0 ? instanceId : null; + priceApprovalInstanceNo.value = String( + status?.approvalInstanceNo ?? status?.ApprovalInstanceNo ?? '', + ).trim(); } catch { - if (seq === priceTabLoadSeq) pricePublishPending.value = null; + if (seq === priceTabLoadSeq) { + pricePublishPending.value = null; + priceApprovalPending.value = false; + priceApprovalInstanceId.value = null; + priceApprovalInstanceNo.value = ''; + } } finally { if (seq === priceTabLoadSeq) pricePublishChecking.value = false; } } + const priceApprovalDrawerVisible = ref(false); + + function openPriceApprovalDrawer() { + if (!priceApprovalInstanceId.value) { + Message.warning(t('channel.salesProducts.publish.approvalDetailMissing')); + return; + } + priceApprovalDrawerVisible.value = true; + } + + async function onPriceApprovalChanged() { + const pid = selectedProduct.value; + if (pid == null) return; + await refreshPricePublishSyncStatus(pid); + await loadPriceTabData(pid, { force: true }); + } + let recordsTabLoadedProductId: number | null = null; let recordsLoadSeq = 0; let publishContentSeq = 0; @@ -1635,12 +1672,18 @@ priceTabLoadedProductId = null; pricePublishPending.value = null; pricePublishChecking.value = false; + priceApprovalPending.value = false; + priceApprovalInstanceId.value = null; + priceApprovalInstanceNo.value = ''; effectiveVersion.value = '--'; effectiveTime.value = '--'; } else if (activeTab.value === 'price') { // 切到卖价 tab / 换产品:先清空徽章,等 sync-status 回来再显示 pricePublishPending.value = null; pricePublishChecking.value = false; + priceApprovalPending.value = false; + priceApprovalInstanceId.value = null; + priceApprovalInstanceNo.value = ''; } if (productChanged && activeTab.value !== 'rules') { rulesTabLoadedProductId = null; @@ -1907,6 +1950,9 @@ const publishDiffRows = ref([]); const pricePublishPending = ref(null); const pricePublishChecking = ref(false); + const priceApprovalPending = ref(false); + const priceApprovalInstanceId = ref(null); + const priceApprovalInstanceNo = ref(''); const publishDiffStatus = computed(() => { if (!publishHasOnlineSnapshot.value) return 'first'; @@ -2332,6 +2378,14 @@ ? t('channel.salesProducts.publish.pendingApproval', { no: approvalNo }) : t('channel.salesProducts.publish.pendingApprovalFallback'), ); + if (operatorType === 'price') { + priceApprovalPending.value = true; + priceApprovalInstanceNo.value = approvalNo; + const approvalId = + publishResult?.approvalInstanceId ?? publishResult?.ApprovalInstanceId ?? null; + priceApprovalInstanceId.value = + typeof approvalId === 'number' && approvalId > 0 ? approvalId : null; + } } else { Message.success(t('channel.salesProducts.publish.success')); } @@ -2348,14 +2402,12 @@ publishConfirmDate.value = dayjs(); clearPricePublishAiReport(); publishModalMethods.closeModal(); - if (decision !== 'PendingApproval') { + if (operatorType === 'price') { + await loadRecordsTabData(pid, true); + await loadPriceTabData(pid, { force: true }); + await refreshPricePublishSyncStatus(pid); + } else if (decision !== 'PendingApproval') { await loadRecordsTabData(pid, true); - if (operatorType === 'price') { - // 不乐观改徽章;等后端 sync-status 重算 - pricePublishPending.value = null; - await loadPriceTabData(pid, { force: true }); - await refreshPricePublishSyncStatus(pid); - } } } catch (e: any) { Message.error(e?.message || t('channel.salesProducts.publish.fail')); @@ -4530,6 +4582,15 @@
+ {{ t('channel.salesProducts.actions.viewPriceApproval') }} + + 生效时间:{{ effectiveTime }} {{ t('channel.salesProducts.publish.badge.checking') }} + + {{ t('channel.salesProducts.publish.badge.pendingApproval') }} + + + + + +
@@ -129,6 +135,7 @@ import { useI18n } from 'vue-i18n' import { Message, Modal } from '@arco-design/web-vue' import HandsontablePro from '@/components/HandsontablePro/index.vue' import PaginationPro from '@/components/PaginationPro/index.vue' +import ApprovalDetailDrawer from '@/components/ApprovalDetailDrawer/index.vue' import { useTableContainerHeight } from '@/composables/useTableContainerHeight' import dayjs from 'dayjs' import zfbIcon from '@/assets/zfb.png' @@ -147,17 +154,26 @@ defineOptions({ const { t } = useI18n() const { tableContainerRef, tableHeight } = useTableContainerHeight() +const approvalDrawerVisible = ref(false) +const approvalDrawerInstanceId = ref(null) const handsontableHeight = computed(() => Math.max(tableHeight.value || 0, 400)) interface RechargeRecord { id?: number | string serialNo: string + customerCode: string + customerName: string payTime: string payType: string payAmount: number payImage?: string payStatus: string remarks?: string + auditTime: string + auditBy: string + approvalPending: boolean + approvalInstanceId: number | null + approvalInstanceNo: string } /** 无截图占位(提交时写 "0");GetPublicUrl("0") 也会返回空串 */ @@ -169,18 +185,31 @@ function resolvePayImageUrl(raw: unknown): string | undefined { } function mapRow(item: any): RechargeRecord { - const pt = Number(item.payType) + const pt = Number(item.payType ?? item.PayType) // 接口约定:1-微信 2-支付宝 const payType = pt === 2 ? 'zfb' : 'wx' + const auditTimeRaw = item.auditTime ?? item.AuditTime + const approvalPending = Boolean(item.approvalPending ?? item.ApprovalPending) + const approvalId = item.approvalInstanceId ?? item.ApprovalInstanceId ?? null return { - id: item.id, - serialNo: item.serialNumber ?? '', - payTime: item.rechargeTime ?? '', + id: item.id ?? item.Id, + serialNo: item.serialNumber ?? item.SerialNumber ?? '', + customerCode: item.customerCode ?? item.CustomerCode ?? '', + customerName: item.customerName ?? item.CustomerName ?? '', + payTime: item.rechargeTime ?? item.RechargeTime ?? '', payType, - payAmount: item.rechargeAmount ?? 0, + payAmount: item.rechargeAmount ?? item.RechargeAmount ?? 0, payImage: resolvePayImageUrl(item.rechargeScreenshot ?? item.RechargeScreenshot), - payStatus: String(item.rechargeStatus ?? ''), - remarks: item.remark ?? '', + payStatus: String(item.rechargeStatus ?? item.RechargeStatus ?? ''), + remarks: item.remark ?? item.Remark ?? '', + auditTime: auditTimeRaw ? dayjs(auditTimeRaw).format('YYYY-MM-DD HH:mm:ss') : '', + auditBy: item.auditBy ?? item.AuditBy ?? '', + approvalPending, + approvalInstanceId: + typeof approvalId === 'number' && approvalId > 0 ? approvalId : null, + approvalInstanceNo: String( + item.approvalInstanceNo ?? item.ApprovalInstanceNo ?? '', + ).trim(), } } @@ -284,11 +313,16 @@ onMounted(() => { const hotColumns = computed(() => [ { key: 'serialNo', label: t('user.recharge.record.table.serialNo'), width: 180 }, + { key: 'customerCode', label: t('user.recharge.record.table.customerCode'), width: 120 }, + { key: 'customerName', label: t('user.recharge.record.table.customerName'), width: 140 }, { key: 'payTime', label: t('user.recharge.record.table.payTime'), width: 180 }, { key: 'payType', label: t('user.recharge.record.table.payType'), width: 120 }, { key: 'payAmount', label: t('user.recharge.record.table.payAmount'), width: 120 }, { key: 'payImage', label: t('user.recharge.record.table.payImage'), width: 120 }, { key: 'payStatus', label: t('user.recharge.record.table.payStatus'), width: 100 }, + { key: 'approvalInstanceNo', label: t('user.recharge.record.table.approvalNo'), width: 160 }, + { key: 'auditTime', label: t('user.recharge.record.table.auditTime'), width: 180 }, + { key: 'auditBy', label: t('user.recharge.record.table.auditBy'), width: 120 }, { key: 'remarks', label: t('user.recharge.record.table.remarks'), width: 150 }, ]) @@ -317,6 +351,9 @@ function customCellRenderer(row: number, col: number, value: any, rowData: any): } if (colKey === 'payStatus') { const status = rowData?.payStatus + if (status === '1' && rowData?.approvalPending) { + return buildStatusTagHtml(t('user.recharge.record.search.statusPendingApproval'), 'brand') + } if (status === '1') { return buildStatusTagHtml(t('user.recharge.record.search.statusPending'), 'wait') } @@ -328,14 +365,34 @@ function customCellRenderer(row: number, col: number, value: any, rowData: any): } return '--' } + if (colKey === 'approvalInstanceNo') { + const no = String(rowData?.approvalInstanceNo || '').trim() + if (!no) return '--' + return `${no}` + } if (colKey === 'remarks') { return value ? `${value}` : null } return null } +function openRechargeApprovalDrawer(row?: RechargeRecord | null) { + const id = row?.approvalInstanceId + if (!id) { + Message.warning(t('user.recharge.record.message.approvalDetailMissing')) + return + } + approvalDrawerInstanceId.value = id + approvalDrawerVisible.value = true +} + function actionRenderer(row: any, _rowIndex: number): string { if (String(row?.payStatus) !== '1') return '' + if (row?.approvalPending) { + return wrapWarehouseActions([ + renderWarehouseActionBtn('viewApproval', t('user.recharge.record.actions.viewApproval')), + ]) + } return wrapWarehouseActions([ renderWarehouseActionBtn('approve', t('user.recharge.record.actions.approve')), renderWarehouseActionBtn('reject', t('user.recharge.record.actions.reject')), @@ -344,6 +401,10 @@ function actionRenderer(row: any, _rowIndex: number): string { async function handleActionClick(row: any, _rowIndex: number, action?: string) { if (!row?.id) return + if (action === 'viewApproval') { + openRechargeApprovalDrawer(row) + return + } if (action === 'approve') { Modal.confirm({ title: t('user.recharge.record.modal.approveConfirmTitle'), @@ -391,6 +452,18 @@ async function handleRejectSubmit() { } function handleViewPayImageClick(event: MouseEvent) { + const approvalTrigger = (event.target as HTMLElement | null)?.closest?.( + '[data-role="view-recharge-approval"]', + ) + if (approvalTrigger) { + const rowIndex = Number(approvalTrigger.getAttribute('data-row-index')) + const row = Number.isFinite(rowIndex) ? tableRows.value[rowIndex] : null + event.preventDefault() + event.stopPropagation() + openRechargeApprovalDrawer(row) + return + } + const trigger = (event.target as HTMLElement | null)?.closest?.('[data-role="view-pay-image"]') if (!trigger) return const rowIndex = Number(trigger.getAttribute('data-row-index')) diff --git a/src/views/h5/admin-center/locale/en-US.ts b/src/views/h5/admin-center/locale/en-US.ts index 7304e74..43d25a6 100644 --- a/src/views/h5/admin-center/locale/en-US.ts +++ b/src/views/h5/admin-center/locale/en-US.ts @@ -43,12 +43,15 @@ export default { 'h5Admin.recharge.loadMore': 'Load more', 'h5Admin.recharge.loadFailed': 'Failed to load', 'h5Admin.recharge.tab.pending': 'Pending', + 'h5Admin.recharge.tab.pendingApproval': 'Pending approval', 'h5Admin.recharge.tab.all': 'All', 'h5Admin.recharge.tab.success': 'Approved', 'h5Admin.recharge.tab.failed': 'Rejected', 'h5Admin.recharge.customer': 'Customer', 'h5Admin.recharge.serialNo': 'Serial No.', 'h5Admin.recharge.time': 'Time', + 'h5Admin.recharge.approvalNo': 'Approval No.', + 'h5Admin.recharge.approvalTip': 'In approval flow — handle it in PC Approval Inbox', 'h5Admin.recharge.remark': 'Remark', 'h5Admin.recharge.viewImage': 'Screenshot', 'h5Admin.recharge.approve': 'Approve', diff --git a/src/views/h5/admin-center/locale/zh-CN.ts b/src/views/h5/admin-center/locale/zh-CN.ts index 4329347..99f9952 100644 --- a/src/views/h5/admin-center/locale/zh-CN.ts +++ b/src/views/h5/admin-center/locale/zh-CN.ts @@ -43,12 +43,15 @@ export default { 'h5Admin.recharge.loadMore': '加载更多', 'h5Admin.recharge.loadFailed': '加载失败', 'h5Admin.recharge.tab.pending': '待审核', + 'h5Admin.recharge.tab.pendingApproval': '待审批', 'h5Admin.recharge.tab.all': '全部', 'h5Admin.recharge.tab.success': '已通过', 'h5Admin.recharge.tab.failed': '已驳回', 'h5Admin.recharge.customer': '客户', 'h5Admin.recharge.serialNo': '流水号', 'h5Admin.recharge.time': '时间', + 'h5Admin.recharge.approvalNo': '审批号', + 'h5Admin.recharge.approvalTip': '已进入审批流,请到 PC「审批待办」处理', 'h5Admin.recharge.remark': '备注', 'h5Admin.recharge.viewImage': '查看截图', 'h5Admin.recharge.approve': '通过', diff --git a/src/views/h5/admin-center/recharge/index.vue b/src/views/h5/admin-center/recharge/index.vue index 5768546..6919091 100644 --- a/src/views/h5/admin-center/recharge/index.vue +++ b/src/views/h5/admin-center/recharge/index.vue @@ -67,8 +67,8 @@
¥{{ formatAmount(row.payAmount) }} - - {{ statusLabel(row.payStatus) }} + + {{ statusLabel(row.payStatus, row.approvalPending) }}
@@ -90,6 +90,10 @@ {{ t('h5Admin.recharge.time') }} {{ formatTime(row.payTime) }}

+

+ {{ t('h5Admin.recharge.approvalNo') }} + {{ row.approvalInstanceNo }} +

{{ t('h5Admin.recharge.remark') }} {{ row.remarks }} @@ -105,7 +109,10 @@ > {{ t('h5Admin.recharge.viewImage') }} -