Commit 60939ab0b062e20ecd727f2b4e8b327d1a61890d
feat(cas): 索赔复核审批单数详情
Showing
14 changed files
with
1052 additions
and
68 deletions
package.json
1 | 1 | { |
2 | - "name": "<feewee>fw-h5app-template</feewee>", | |
2 | + "name": "h5app-cas", | |
3 | 3 | "version": "1.0.0", |
4 | 4 | "scripts": { |
5 | 5 | "reset": "npx rimraf ./**/node_modules", |
... | ... | @@ -27,11 +27,12 @@ |
27 | 27 | "dependencies": { |
28 | 28 | "@ant-design/cssinjs": "^1.21.1", |
29 | 29 | "@ant-design/icons": "^5.4.0", |
30 | - "@feewee/h5app-common": "^0.1.138", | |
30 | + "@feewee/h5app-common": "^0.1.168", | |
31 | 31 | "@modern-js/runtime": "~2.57.0", |
32 | 32 | "ahooks": "^3.8.0", |
33 | 33 | "antd": "^5.20.0", |
34 | 34 | "clsx": "^2.1.1", |
35 | + "currency.js": "^2.0.4", | |
35 | 36 | "dayjs": "^1.11.12", |
36 | 37 | "lodash": "^4.17.21", |
37 | 38 | "query-string": "^9.1.0", |
... | ... | @@ -44,8 +45,8 @@ |
44 | 45 | "@modern-js-app/eslint-config": "~2.57.0", |
45 | 46 | "@modern-js/app-tools": "~2.57.0", |
46 | 47 | "@modern-js/eslint-config": "~2.57.0", |
47 | - "@modern-js/plugin-tailwindcss": "~2.57.0", | |
48 | 48 | "@modern-js/plugin-polyfill": "~2.57.0", |
49 | + "@modern-js/plugin-tailwindcss": "~2.57.0", | |
49 | 50 | "@modern-js/tsconfig": "~2.57.0", |
50 | 51 | "@rsdoctor/rspack-plugin": "^0.3.11", |
51 | 52 | "@types/jest": "^29.5.12", | ... | ... |
pnpm-lock.yaml
... | ... | @@ -15,8 +15,8 @@ importers: |
15 | 15 | specifier: ^5.4.0 |
16 | 16 | version: 5.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) |
17 | 17 | '@feewee/h5app-common': |
18 | - specifier: ^0.1.138 | |
19 | - version: 0.1.141(antd@5.20.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) | |
18 | + specifier: ^0.1.168 | |
19 | + version: 0.1.168(antd@5.20.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) | |
20 | 20 | '@modern-js/runtime': |
21 | 21 | specifier: ~2.57.0 |
22 | 22 | version: 2.57.1(@types/react-dom@18.3.0)(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) |
... | ... | @@ -29,6 +29,9 @@ importers: |
29 | 29 | clsx: |
30 | 30 | specifier: ^2.1.1 |
31 | 31 | version: 2.1.1 |
32 | + currency.js: | |
33 | + specifier: ^2.0.4 | |
34 | + version: 2.0.4 | |
32 | 35 | dayjs: |
33 | 36 | specifier: ^1.11.12 |
34 | 37 | version: 1.11.13 |
... | ... | @@ -151,6 +154,13 @@ packages: |
151 | 154 | react: '>=16.0.0' |
152 | 155 | react-dom: '>=16.0.0' |
153 | 156 | |
157 | + '@ant-design/icons@5.5.1': | |
158 | + resolution: {integrity: sha512-0UrM02MA2iDIgvLatWrj6YTCYe0F/cwXvVE0E2SqGrL7PZireQwgEKTKBisWpZyal5eXZLvuM98kju6YtYne8w==} | |
159 | + engines: {node: '>=8'} | |
160 | + peerDependencies: | |
161 | + react: '>=16.0.0' | |
162 | + react-dom: '>=16.0.0' | |
163 | + | |
154 | 164 | '@ant-design/react-slick@1.1.2': |
155 | 165 | resolution: {integrity: sha512-EzlvzE6xQUBrZuuhSAFTdsr4P2bBBHGZwKFemEfq8gIGyIQCxalYfZW/T2ORbtQx5rU69o+WycP3exY/7T1hGA==} |
156 | 166 | peerDependencies: |
... | ... | @@ -1576,8 +1586,8 @@ packages: |
1576 | 1586 | engines: {node: '>=14', npm: '>=6'} |
1577 | 1587 | hasBin: true |
1578 | 1588 | |
1579 | - '@feewee/h5app-common@0.1.141': | |
1580 | - resolution: {integrity: sha512-21YZ5GqrRh4xzuQcfUzikvOsNVz4PxGMsL9V8H9ISGclkAe+VFjy1SWRDoVTSqSP4HCxjfGrBJJ0sysIMujZNQ==} | |
1589 | + '@feewee/h5app-common@0.1.168': | |
1590 | + resolution: {integrity: sha512-08x8IC2jaJGmM7UaQQcRmkBcJcb13prgOFVbSMkmeBq7+fj/rQxGOQTe2HwjU4NNOHCJOrv2Gjmnufy49GvI5g==} | |
1581 | 1591 | engines: {node: '>=18', npm: '>=6.9.0'} |
1582 | 1592 | peerDependencies: |
1583 | 1593 | antd: '>=5' |
... | ... | @@ -1892,8 +1902,8 @@ packages: |
1892 | 1902 | resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} |
1893 | 1903 | engines: {node: '>= 8'} |
1894 | 1904 | |
1895 | - '@nutui/icons-react@1.0.4': | |
1896 | - resolution: {integrity: sha512-nLFYpJvMBkKzT+PpfMaYoO6vJXMTM0yxAragTkEHt9HAFNjdTdvByCSRfUazHHdLdr1AJxS9h62VB1+jmBEtWA==} | |
1905 | + '@nutui/icons-react@1.0.5': | |
1906 | + resolution: {integrity: sha512-0TYl3Fk+sVz95DKqn/7isYAvaK5YGnaBwMMib4rqYLoqi9GGFwgU9rp2hYXu/X5IYdWgshj0xiuGMK75/vUYbQ==} | |
1897 | 1907 | |
1898 | 1908 | '@nutui/nutui-react@2.6.15': |
1899 | 1909 | resolution: {integrity: sha512-/xX4pB6HSXSWwqnumoJR+omirA9b8HznDvwFHFr/iu+KJn4D658VAVR47T4Z0ROEq9lmErmlcDxjqnxmJOzl6w==} |
... | ... | @@ -2338,14 +2348,14 @@ packages: |
2338 | 2348 | '@swc/plugin-styled-components@2.0.9': |
2339 | 2349 | resolution: {integrity: sha512-0aPv7lNed27qs8JBklLkVSlLhpPRU3YKRnKplObaAyhNWbpbOkCbVSTay5ArFT2Gz1rz844Np7l4DMozEtZRBg==} |
2340 | 2350 | |
2341 | - '@tanstack/react-virtual@3.10.6': | |
2342 | - resolution: {integrity: sha512-xaSy6uUxB92O8mngHZ6CvbhGuqxQ5lIZWCBy+FjhrbHmOwc6BnOnKkYm2FsB1/BpKw/+FVctlMbEtI+F6I1aJg==} | |
2351 | + '@tanstack/react-virtual@3.10.9': | |
2352 | + resolution: {integrity: sha512-OXO2uBjFqA4Ibr2O3y0YMnkrRWGVNqcvHQXmGvMu6IK8chZl3PrDxFXdGZ2iZkSrKh3/qUYoFqYe+Rx23RoU0g==} | |
2343 | 2353 | peerDependencies: |
2344 | 2354 | react: ^16.8.0 || ^17.0.0 || ^18.0.0 |
2345 | 2355 | react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 |
2346 | 2356 | |
2347 | - '@tanstack/virtual-core@3.10.6': | |
2348 | - resolution: {integrity: sha512-1giLc4dzgEKLMx5pgKjL6HlG5fjZMgCjzlKAlpr7yoUtetVPELgER1NtephAI910nMwfPTHNyWKSFmJdHkz2Cw==} | |
2357 | + '@tanstack/virtual-core@3.10.9': | |
2358 | + resolution: {integrity: sha512-kBknKOKzmeR7lN+vSadaKWXaLS0SZZG+oqpQ/k80Q6g9REn6zRHS/ZYdrIzHnpHgy/eWs00SujveUN/GJT2qTw==} | |
2349 | 2359 | |
2350 | 2360 | '@trysound/sax@0.2.0': |
2351 | 2361 | resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} |
... | ... | @@ -3403,6 +3413,10 @@ packages: |
3403 | 3413 | csstype@3.1.3: |
3404 | 3414 | resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} |
3405 | 3415 | |
3416 | + currency.js@2.0.4: | |
3417 | + resolution: {integrity: sha512-6/OplJYgJ0RUlli74d93HJ/OsKVBi8lB1+Z6eJYS1YZzBuIp4qKKHpJ7ad+GvTlWmLR/hLJOWTykN5Nm8NJ7+w==} | |
3418 | + engines: {node: '>=4'} | |
3419 | + | |
3406 | 3420 | current-script-polyfill@1.0.0: |
3407 | 3421 | resolution: {integrity: sha512-qv8s+G47V6Hq+g2kRE5th+ASzzrL7b6l+tap1DHKK25ZQJv3yIFhH96XaQ7NGL+zRW3t/RDbweJf/dJDe5Z5KA==} |
3408 | 3422 | |
... | ... | @@ -5812,6 +5826,10 @@ packages: |
5812 | 5826 | resolution: {integrity: sha512-t6dqMECpCkqfyv2FfwVS1xcB6lgXW/0XZSaKdsCNGYkqMO76AFiJEg4vINzoDKcZa6MS7JX+OHIjwh06K5vczw==} |
5813 | 5827 | engines: {node: '>=18'} |
5814 | 5828 | |
5829 | + query-string@9.1.1: | |
5830 | + resolution: {integrity: sha512-MWkCOVIcJP9QSKU52Ngow6bsAWAPlPK2MludXvcrS2bGZSl+T1qX9MZvRIkqUIkGLJquMJHWfsT6eRqUpp4aWg==} | |
5831 | + engines: {node: '>=18'} | |
5832 | + | |
5815 | 5833 | querystring-es3@0.2.1: |
5816 | 5834 | resolution: {integrity: sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==} |
5817 | 5835 | engines: {node: '>=0.4.x'} |
... | ... | @@ -6091,6 +6109,12 @@ packages: |
6091 | 6109 | react-is@18.3.1: |
6092 | 6110 | resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} |
6093 | 6111 | |
6112 | + react-photo-view@1.2.6: | |
6113 | + resolution: {integrity: sha512-Fq17yxkMIv0oFp7HOJr39HgCZRP6A9K5T5rixJ4flSUYT2OO3V8vNxEExjhIKgIrfmTu+mDnHYEsI9RRWi1JHw==} | |
6114 | + peerDependencies: | |
6115 | + react: '>=16.8.0' | |
6116 | + react-dom: '>=16.8.0' | |
6117 | + | |
6094 | 6118 | react-refresh@0.14.2: |
6095 | 6119 | resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} |
6096 | 6120 | engines: {node: '>=0.10.0'} |
... | ... | @@ -7360,6 +7384,16 @@ snapshots: |
7360 | 7384 | react: 18.3.1 |
7361 | 7385 | react-dom: 18.3.1(react@18.3.1) |
7362 | 7386 | |
7387 | + '@ant-design/icons@5.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': | |
7388 | + dependencies: | |
7389 | + '@ant-design/colors': 7.1.0 | |
7390 | + '@ant-design/icons-svg': 4.4.2 | |
7391 | + '@babel/runtime': 7.25.6 | |
7392 | + classnames: 2.5.1 | |
7393 | + rc-util: 5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) | |
7394 | + react: 18.3.1 | |
7395 | + react-dom: 18.3.1(react@18.3.1) | |
7396 | + | |
7363 | 7397 | '@ant-design/react-slick@1.1.2(react@18.3.1)': |
7364 | 7398 | dependencies: |
7365 | 7399 | '@babel/runtime': 7.25.6 |
... | ... | @@ -9243,13 +9277,13 @@ snapshots: |
9243 | 9277 | - jest |
9244 | 9278 | - supports-color |
9245 | 9279 | |
9246 | - '@feewee/h5app-common@0.1.141(antd@5.20.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': | |
9280 | + '@feewee/h5app-common@0.1.168(antd@5.20.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': | |
9247 | 9281 | dependencies: |
9248 | - '@ant-design/icons': 5.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) | |
9282 | + '@ant-design/icons': 5.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) | |
9249 | 9283 | '@feewee/helper-wasm': 0.2.7 |
9250 | - '@nutui/icons-react': 1.0.4 | |
9284 | + '@nutui/icons-react': 1.0.5 | |
9251 | 9285 | '@nutui/nutui-react': 2.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1) |
9252 | - '@tanstack/react-virtual': 3.10.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1) | |
9286 | + '@tanstack/react-virtual': 3.10.9(react-dom@18.3.1(react@18.3.1))(react@18.3.1) | |
9253 | 9287 | ahooks: 3.8.1(react@18.3.1) |
9254 | 9288 | antd: 5.20.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) |
9255 | 9289 | antd-mobile: 5.37.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) |
... | ... | @@ -9260,9 +9294,10 @@ snapshots: |
9260 | 9294 | js-cookie: 3.0.5 |
9261 | 9295 | localforage: 1.10.0 |
9262 | 9296 | lodash: 4.17.21 |
9263 | - query-string: 9.1.0 | |
9297 | + query-string: 9.1.1 | |
9264 | 9298 | react: 18.3.1 |
9265 | 9299 | react-dom: 18.3.1(react@18.3.1) |
9300 | + react-photo-view: 1.2.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1) | |
9266 | 9301 | transitivePeerDependencies: |
9267 | 9302 | - debug |
9268 | 9303 | |
... | ... | @@ -9964,12 +9999,12 @@ snapshots: |
9964 | 9999 | '@nodelib/fs.scandir': 2.1.5 |
9965 | 10000 | fastq: 1.17.1 |
9966 | 10001 | |
9967 | - '@nutui/icons-react@1.0.4': {} | |
10002 | + '@nutui/icons-react@1.0.5': {} | |
9968 | 10003 | |
9969 | 10004 | '@nutui/nutui-react@2.6.15(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': |
9970 | 10005 | dependencies: |
9971 | 10006 | '@babel/runtime': 7.25.6 |
9972 | - '@nutui/icons-react': 1.0.4 | |
10007 | + '@nutui/icons-react': 1.0.5 | |
9973 | 10008 | '@nutui/touch-emulator': 1.0.0 |
9974 | 10009 | '@react-spring/web': 9.6.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) |
9975 | 10010 | '@use-gesture/react': 10.2.20(react@18.3.1) |
... | ... | @@ -10600,13 +10635,13 @@ snapshots: |
10600 | 10635 | dependencies: |
10601 | 10636 | '@swc/counter': 0.1.3 |
10602 | 10637 | |
10603 | - '@tanstack/react-virtual@3.10.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': | |
10638 | + '@tanstack/react-virtual@3.10.9(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': | |
10604 | 10639 | dependencies: |
10605 | - '@tanstack/virtual-core': 3.10.6 | |
10640 | + '@tanstack/virtual-core': 3.10.9 | |
10606 | 10641 | react: 18.3.1 |
10607 | 10642 | react-dom: 18.3.1(react@18.3.1) |
10608 | 10643 | |
10609 | - '@tanstack/virtual-core@3.10.6': {} | |
10644 | + '@tanstack/virtual-core@3.10.9': {} | |
10610 | 10645 | |
10611 | 10646 | '@trysound/sax@0.2.0': {} |
10612 | 10647 | |
... | ... | @@ -11971,6 +12006,8 @@ snapshots: |
11971 | 12006 | |
11972 | 12007 | csstype@3.1.3: {} |
11973 | 12008 | |
12009 | + currency.js@2.0.4: {} | |
12010 | + | |
11974 | 12011 | current-script-polyfill@1.0.0: {} |
11975 | 12012 | |
11976 | 12013 | data-uri-to-buffer@3.0.1: {} |
... | ... | @@ -14490,6 +14527,12 @@ snapshots: |
14490 | 14527 | filter-obj: 5.1.0 |
14491 | 14528 | split-on-first: 3.0.0 |
14492 | 14529 | |
14530 | + query-string@9.1.1: | |
14531 | + dependencies: | |
14532 | + decode-uri-component: 0.4.1 | |
14533 | + filter-obj: 5.1.0 | |
14534 | + split-on-first: 3.0.0 | |
14535 | + | |
14493 | 14536 | querystring-es3@0.2.1: {} |
14494 | 14537 | |
14495 | 14538 | queue-microtask@1.2.3: {} |
... | ... | @@ -14827,7 +14870,7 @@ snapshots: |
14827 | 14870 | |
14828 | 14871 | rc-util@5.43.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): |
14829 | 14872 | dependencies: |
14830 | - '@babel/runtime': 7.24.5 | |
14873 | + '@babel/runtime': 7.25.6 | |
14831 | 14874 | react: 18.3.1 |
14832 | 14875 | react-dom: 18.3.1(react@18.3.1) |
14833 | 14876 | react-is: 18.3.1 |
... | ... | @@ -14861,6 +14904,11 @@ snapshots: |
14861 | 14904 | |
14862 | 14905 | react-is@18.3.1: {} |
14863 | 14906 | |
14907 | + react-photo-view@1.2.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1): | |
14908 | + dependencies: | |
14909 | + react: 18.3.1 | |
14910 | + react-dom: 18.3.1(react@18.3.1) | |
14911 | + | |
14864 | 14912 | react-refresh@0.14.2: {} |
14865 | 14913 | |
14866 | 14914 | react-router-dom@6.22.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): | ... | ... |
src/components/CardView/index.tsx
0 → 100644
1 | +import type React from 'react'; | |
2 | +import './style.less'; | |
3 | + | |
4 | +interface Props { | |
5 | + style?: React.CSSProperties; | |
6 | + children: React.ReactNode; | |
7 | +} | |
8 | + | |
9 | +export default function CardView({ style, children }: Props) { | |
10 | + return ( | |
11 | + <div className="card-view" style={style}> | |
12 | + {children} | |
13 | + </div> | |
14 | + ); | |
15 | +} | ... | ... |
src/components/CardView/style.less
0 → 100644
src/components/RowText/index.tsx
0 → 100644
1 | +import React from 'react'; | |
2 | +import type { CSSProperties } from 'react'; | |
3 | +import { Row } from '@feewee/h5app-common'; | |
4 | + | |
5 | +import './style.less'; | |
6 | + | |
7 | +interface ComponentProps { | |
8 | + title: string; | |
9 | + content: string | number; | |
10 | + rowStyle?: CSSProperties; | |
11 | + titleStyle?: CSSProperties; | |
12 | + contentStyle?: CSSProperties; | |
13 | +} | |
14 | + | |
15 | +export default function RowText({ title, content, rowStyle, titleStyle, contentStyle }: ComponentProps) { | |
16 | + return ( | |
17 | + <Row className="row-wrapper" style={rowStyle}> | |
18 | + <span className="label" style={titleStyle}> | |
19 | + {title}: | |
20 | + </span> | |
21 | + <span className="content" style={contentStyle}> | |
22 | + {content} | |
23 | + </span> | |
24 | + </Row> | |
25 | + ); | |
26 | +} | ... | ... |
src/components/RowText/style.less
0 → 100644
1 | +.row-wrapper { | |
2 | + margin-bottom: 10px; | |
3 | +} | |
4 | + | |
5 | +.label { | |
6 | + color: #666; | |
7 | + font-size: 14px; | |
8 | + line-height: 14px; | |
9 | + font-weight: 500; | |
10 | +} | |
11 | + | |
12 | +.content { | |
13 | + color: #666; | |
14 | + font-size: 14px; | |
15 | + line-height: 14px; | |
16 | + font-weight: 500; | |
17 | + flex: 1; | |
18 | +} | |
19 | + | |
20 | +.labelBold { | |
21 | + color: #333; | |
22 | + font-size: 15px; | |
23 | + font-weight: bold; | |
24 | +} | |
25 | + | |
26 | +.contentBold { | |
27 | + .labelBold; | |
28 | + flex: 1; | |
29 | +} | ... | ... |
src/routes/ClaimReviewApprove/DetailList/page.tsx
0 → 100644
1 | +/* eslint-disable max-lines */ | |
2 | +import { useEffect, useState, useMemo } from 'react'; | |
3 | +import { helper, PageProvider, PoolTable, usePagination, useUrlParams, FilePreview } from '@feewee/h5app-common'; | |
4 | +import { useNavigate } from '@modern-js/runtime/router'; | |
5 | +import { cloneDeep } from 'lodash'; | |
6 | +import dayjs from 'dayjs'; | |
7 | + | |
8 | +import type { DimensionEnum, QueryTypeEnum } from '../entity'; | |
9 | +import { QueryItemTypeEnum, QueryItemTypeNameMap } from '../entity'; | |
10 | +import { reviewListApi, type ReviewListResult } from '../service'; | |
11 | +import rmb from '@/utils/rmb'; | |
12 | + | |
13 | +interface PageParams { | |
14 | + applyId: number; | |
15 | + queryType: QueryTypeEnum; | |
16 | + queryItemType: QueryItemTypeEnum; | |
17 | + type: DimensionEnum | QueryTypeEnum.USER_PUNISH; | |
18 | + typeId: number; | |
19 | +} | |
20 | + | |
21 | +/** | |
22 | + * 单数明细 | |
23 | + */ | |
24 | +const DetailList = () => { | |
25 | + const params = useUrlParams<PageParams>(); | |
26 | + const navigate = useNavigate(); | |
27 | + | |
28 | + const { queryType, queryItemType } = params; | |
29 | + | |
30 | + // 添加了动态数据后的 list 和 columns | |
31 | + const [assembledList, setAssembledList] = useState<ReviewListResult[]>([]); | |
32 | + | |
33 | + const [delay, setDelay] = useState(true); | |
34 | + const { list, param, setParams, loading, errMsg, resetParam, pagination } = usePagination(reviewListApi, params, delay); | |
35 | + const { current = 1, pageSize = 15 } = param; | |
36 | + | |
37 | + useEffect(() => { | |
38 | + if (params.applyId) { | |
39 | + setDelay(false); | |
40 | + setParams({ ...params, pageSize: 50 }, true); | |
41 | + } | |
42 | + }, []); | |
43 | + | |
44 | + function renderSecondaryAmount(val: number) { | |
45 | + return ( | |
46 | + <span> | |
47 | + <span>{rmb.p(val)}</span>元 | |
48 | + </span> | |
49 | + ); | |
50 | + } | |
51 | + | |
52 | + const columns = useMemo(() => { | |
53 | + let baseColumns = [ | |
54 | + { | |
55 | + title: '索赔单号', | |
56 | + dataIndex: 'claimNo', | |
57 | + width: 120, | |
58 | + }, | |
59 | + { | |
60 | + title: '附件', | |
61 | + dataIndex: 'fid', | |
62 | + width: 150, | |
63 | + render: val => <div style={{ maxWidth: 400 }}>{/* <FeeweeUploadAttachment maxCount={1} fidList={val ? [val] : []} disabled /> */}</div>, | |
64 | + }, | |
65 | + { | |
66 | + title: '索赔类型', | |
67 | + dataIndex: 'claimTypeName', | |
68 | + render: text => text || '--', | |
69 | + }, | |
70 | + ]; | |
71 | + | |
72 | + // 根据 queryItemType 展示不同列 | |
73 | + if ([QueryItemTypeEnum.SYSTEM_TOTAL, QueryItemTypeEnum.SYSTEM_ONLY].includes(queryItemType)) { | |
74 | + baseColumns = baseColumns.concat([ | |
75 | + { | |
76 | + title: '车牌号', | |
77 | + dataIndex: 'plateNo', | |
78 | + render: text => text || '--', | |
79 | + }, | |
80 | + { | |
81 | + title: '车架号', | |
82 | + dataIndex: 'vin', | |
83 | + render: text => text || '--', | |
84 | + }, | |
85 | + { | |
86 | + title: '车辆名称', | |
87 | + dataIndex: 'carName', | |
88 | + render: text => text || '--', | |
89 | + }, | |
90 | + { | |
91 | + title: '系统生成金额', | |
92 | + dataIndex: 'totalFee', | |
93 | + align: 'right', | |
94 | + render: renderSecondaryAmount, | |
95 | + }, | |
96 | + { | |
97 | + title: '差异原因', | |
98 | + dataIndex: 'differenceReason', | |
99 | + render: text => text || '--', | |
100 | + }, | |
101 | + ]); | |
102 | + } else if (queryItemType === QueryItemTypeEnum.IMPORT_ONLY) { | |
103 | + baseColumns = baseColumns.concat([ | |
104 | + { | |
105 | + title: '厂家兑现金额', | |
106 | + dataIndex: 'amount', | |
107 | + width: 100, | |
108 | + align: 'right', | |
109 | + render: renderSecondaryAmount, | |
110 | + }, | |
111 | + ]); | |
112 | + } else if (queryItemType === QueryItemTypeEnum.DIFFERENCE_COUNT) { | |
113 | + baseColumns = baseColumns.concat([ | |
114 | + { | |
115 | + title: '系统生成金额', | |
116 | + dataIndex: 'totalFee', | |
117 | + align: 'center', | |
118 | + children: [ | |
119 | + { | |
120 | + title: '小计', | |
121 | + dataIndex: 'totalFee', | |
122 | + width: 100, | |
123 | + align: 'right', | |
124 | + render: renderSecondaryAmount, | |
125 | + }, | |
126 | + { | |
127 | + title: '工时费', | |
128 | + dataIndex: 'systemManHoursFee', | |
129 | + width: 100, | |
130 | + align: 'right', | |
131 | + render: renderSecondaryAmount, | |
132 | + }, | |
133 | + { | |
134 | + title: '材料费', | |
135 | + dataIndex: 'systemPartFee', | |
136 | + width: 100, | |
137 | + align: 'right', | |
138 | + render: renderSecondaryAmount, | |
139 | + }, | |
140 | + ], | |
141 | + }, | |
142 | + { | |
143 | + title: '提报金额', | |
144 | + dataIndex: 'submitAmount', | |
145 | + align: 'center', | |
146 | + children: [ | |
147 | + { | |
148 | + title: '小计', | |
149 | + dataIndex: 'submitAmount', | |
150 | + width: 100, | |
151 | + align: 'right', | |
152 | + render: renderSecondaryAmount, | |
153 | + }, | |
154 | + { | |
155 | + title: '工时费', | |
156 | + dataIndex: 'submitManHoursFee', | |
157 | + width: 100, | |
158 | + align: 'right', | |
159 | + render: renderSecondaryAmount, | |
160 | + }, | |
161 | + { | |
162 | + title: '材料费', | |
163 | + dataIndex: 'submitPartFee', | |
164 | + width: 100, | |
165 | + align: 'right', | |
166 | + render: renderSecondaryAmount, | |
167 | + }, | |
168 | + ], | |
169 | + }, | |
170 | + { | |
171 | + title: '厂家兑现金额', | |
172 | + dataIndex: 'factoryAmount', // @note 前端定义,仅作数据查找 | |
173 | + align: 'center', | |
174 | + children: [ | |
175 | + { | |
176 | + title: '小计', | |
177 | + dataIndex: 'amount', | |
178 | + width: 100, | |
179 | + align: 'right', | |
180 | + render: renderSecondaryAmount, | |
181 | + }, | |
182 | + // @slot 存放 importData 中的数据 | |
183 | + ], | |
184 | + }, | |
185 | + { | |
186 | + title: '差异金额', | |
187 | + dataIndex: 'claimNo', | |
188 | + align: 'center', | |
189 | + children: [ | |
190 | + { | |
191 | + title: '系统生成与厂家兑现差异', | |
192 | + dataIndex: 'differenceAmount', | |
193 | + width: 100, | |
194 | + align: 'right', | |
195 | + render: val => ( | |
196 | + <span> | |
197 | + <span className="danger">{rmb.p(val)}</span>元 | |
198 | + </span> | |
199 | + ), | |
200 | + }, | |
201 | + { | |
202 | + title: '索赔提报与厂家兑现差异', | |
203 | + dataIndex: 'differenceSubmitAmount', | |
204 | + width: 100, | |
205 | + align: 'right', | |
206 | + render: val => ( | |
207 | + <span> | |
208 | + <span className="danger">{rmb.p(val)}</span>元 | |
209 | + </span> | |
210 | + ), | |
211 | + }, | |
212 | + ], | |
213 | + }, | |
214 | + { | |
215 | + title: '车牌号', | |
216 | + dataIndex: 'plateNo', | |
217 | + render: text => text || '--', | |
218 | + }, | |
219 | + { | |
220 | + title: '车架号', | |
221 | + dataIndex: 'vin', | |
222 | + render: text => text || '--', | |
223 | + }, | |
224 | + { | |
225 | + title: '车辆名称', | |
226 | + dataIndex: 'carName', | |
227 | + render: text => text || '--', | |
228 | + }, | |
229 | + ]); | |
230 | + } else { | |
231 | + baseColumns = baseColumns.concat([ | |
232 | + { | |
233 | + title: '车牌号', | |
234 | + dataIndex: 'plateNo', | |
235 | + render: text => text || '--', | |
236 | + }, | |
237 | + { | |
238 | + title: '车架号', | |
239 | + dataIndex: 'vin', | |
240 | + render: text => text || '--', | |
241 | + }, | |
242 | + { | |
243 | + title: '车辆名称', | |
244 | + dataIndex: 'carName', | |
245 | + render: text => text || '--', | |
246 | + }, | |
247 | + { | |
248 | + title: '厂家兑现金额', | |
249 | + dataIndex: 'amount', | |
250 | + align: 'right', | |
251 | + render: renderSecondaryAmount, | |
252 | + }, | |
253 | + { | |
254 | + title: '系统生成金额', | |
255 | + dataIndex: 'totalFee', | |
256 | + align: 'right', | |
257 | + render: renderSecondaryAmount, | |
258 | + }, | |
259 | + { | |
260 | + title: '差异金额', | |
261 | + dataIndex: 'differenceAmount', | |
262 | + align: 'right', | |
263 | + render: val => ( | |
264 | + <span> | |
265 | + <span className="danger">{rmb.p(val)}</span>元 | |
266 | + </span> | |
267 | + ), | |
268 | + }, | |
269 | + ]); | |
270 | + } | |
271 | + | |
272 | + // 动态列:工时费、配件费、救援费等,差异时放到厂家兑现列中,其余情况追加在列后面 | |
273 | + const extraColumns = []; | |
274 | + // 添加额外动态列数据 | |
275 | + const newList = cloneDeep(list); | |
276 | + if (newList.length > 0) { | |
277 | + // 构建表头 | |
278 | + if (newList[0].importData && ![QueryItemTypeEnum.SYSTEM_TOTAL, QueryItemTypeEnum.SYSTEM_ONLY].includes(queryItemType)) { | |
279 | + const { importData } = newList[0]; | |
280 | + if (importData) { | |
281 | + try { | |
282 | + // { "工时费": 10, "配件费": 20, "救援费": 30, ... } | |
283 | + const data = JSON.parse(importData); | |
284 | + for (const key in data) { | |
285 | + extraColumns.push({ | |
286 | + title: key, | |
287 | + dataIndex: key, | |
288 | + align: 'right', | |
289 | + width: 100, | |
290 | + render: val => <span className="warning">{val}</span>, | |
291 | + }); | |
292 | + } | |
293 | + } catch (e) { | |
294 | + console.error('parse importData fail:', e); | |
295 | + } | |
296 | + } | |
297 | + } | |
298 | + | |
299 | + // 构建表格数据 | |
300 | + // 2. 解析数据,若数据列有 importData 则解析为对象形式 | |
301 | + for (let i = 0; i < newList.length; i++) { | |
302 | + if (newList[i].importData) { | |
303 | + try { | |
304 | + const data = JSON.parse(newList[i].importData); | |
305 | + Object.assign(newList[i], data); | |
306 | + } catch (e) { | |
307 | + console.error('parse importData fail:', e); | |
308 | + } | |
309 | + } | |
310 | + } | |
311 | + | |
312 | + // 处理分页数据 | |
313 | + if (current === 1) { | |
314 | + setAssembledList(newList); | |
315 | + } else { | |
316 | + // 替换当前页数据 | |
317 | + const start = (current - 1) * pageSize; | |
318 | + const end = start + pageSize; | |
319 | + const newPageList = [...assembledList]; | |
320 | + newPageList.splice(start, end - start, ...newList); | |
321 | + setAssembledList(newPageList); | |
322 | + } | |
323 | + } | |
324 | + | |
325 | + // 跟进差异类型,添加额外列 | |
326 | + if (queryItemType === QueryItemTypeEnum.DIFFERENCE_COUNT) { | |
327 | + for (const column of baseColumns) { | |
328 | + // @ts-ignore | |
329 | + if (column.dataIndex === 'factoryAmount') { | |
330 | + // @ts-ignore | |
331 | + column.children = column.children.concat(extraColumns); | |
332 | + break; | |
333 | + } | |
334 | + } | |
335 | + } else { | |
336 | + baseColumns = baseColumns.concat(extraColumns); | |
337 | + } | |
338 | + | |
339 | + // 添加提报信息 | |
340 | + baseColumns = baseColumns.concat([ | |
341 | + { | |
342 | + title: '提报人', | |
343 | + dataIndex: 'claimer', | |
344 | + width: 80, | |
345 | + render: val => val || '--', | |
346 | + }, | |
347 | + { | |
348 | + title: '提报商家', | |
349 | + dataIndex: 'submitDealerName', | |
350 | + render: val => val || '--', | |
351 | + }, | |
352 | + { | |
353 | + title: '提报时间', | |
354 | + dataIndex: 'commitTime', | |
355 | + render: val => dayjs(val).format('YYYY-MM-DD HH:mm:ss'), | |
356 | + }, | |
357 | + ]); | |
358 | + return baseColumns; | |
359 | + }, [queryType, queryItemType, list]); | |
360 | + | |
361 | + return ( | |
362 | + <PageProvider | |
363 | + tittle={QueryItemTypeNameMap[params.queryItemType]} | |
364 | + loading={loading} | |
365 | + errMsg={errMsg} | |
366 | + onBackClick={() => helper.checkBack(() => navigate(-1))} | |
367 | + > | |
368 | + <PoolTable list={assembledList} columns={columns} rowKey="claimNo" {...pagination} /> | |
369 | + </PageProvider> | |
370 | + ); | |
371 | +}; | |
372 | + | |
373 | +export default DetailList; | ... | ... |
src/routes/ClaimReviewApprove/entity.ts
0 → 100644
1 | +export enum MatchStatusEnum { | |
2 | + /** 匹配一致 */ | |
3 | + MATCH = 1, | |
4 | + /** 无工单记录 */ | |
5 | + NO_ORDER = 2, | |
6 | + /** 匹配不一致 */ | |
7 | + NOT_MATCH = 3, | |
8 | +} | |
9 | + | |
10 | +export enum MatchStatusName { | |
11 | + /** 匹配一致 */ | |
12 | + 匹配一致 = 1, | |
13 | + /** 无工单记录 */ | |
14 | + 无工单 = 2, | |
15 | + /** 匹配不一致 */ | |
16 | + 匹配差异 = 3, | |
17 | +} | |
18 | + | |
19 | +export enum DimensionEnum { | |
20 | + /** 索赔类型 */ | |
21 | + CLAIM_TYPE = 1, | |
22 | + /** 索赔人员 */ | |
23 | + CLAIM_USER = 2, | |
24 | + /** 施工门店 */ | |
25 | + CLAIM_SHOP = 3, | |
26 | + /** 差异原因 */ | |
27 | + DIFFERENCE_REASON = 4, | |
28 | +} | |
29 | + | |
30 | +export const DimensionData = [ | |
31 | + { | |
32 | + value: DimensionEnum.CLAIM_TYPE, | |
33 | + title: '索赔类型', | |
34 | + }, | |
35 | + { | |
36 | + value: DimensionEnum.CLAIM_USER, | |
37 | + title: '索赔人员', | |
38 | + }, | |
39 | + { | |
40 | + value: DimensionEnum.CLAIM_SHOP, | |
41 | + title: '施工门店', | |
42 | + }, | |
43 | + { | |
44 | + value: DimensionEnum.DIFFERENCE_REASON, | |
45 | + title: '差异原因', | |
46 | + }, | |
47 | +]; | |
48 | + | |
49 | +export const DimensionNamesMap: Record<string, string> = { | |
50 | + [DimensionEnum.CLAIM_TYPE]: '索赔类型', | |
51 | + [DimensionEnum.CLAIM_USER]: '索赔人员', | |
52 | + [DimensionEnum.CLAIM_SHOP]: '施工门店', | |
53 | + [DimensionEnum.DIFFERENCE_REASON]: '差异原因', | |
54 | +}; | |
55 | + | |
56 | +export enum TypeEnum { | |
57 | + /** 奖励 */ | |
58 | + REWARD = 1, | |
59 | + /** 处罚 */ | |
60 | + PUNISH = 0, | |
61 | +} | |
62 | + | |
63 | +export enum SubTypeEnum { | |
64 | + /** 门店分摊 */ | |
65 | + APPORTION = 1, | |
66 | + /** 门店 */ | |
67 | + SHOP = 2, | |
68 | + /** 人员 */ | |
69 | + USER = 3, | |
70 | +} | |
71 | + | |
72 | +export const SubTypeNameMap = { | |
73 | + [SubTypeEnum.APPORTION]: '门店分摊', | |
74 | + [SubTypeEnum.SHOP]: '门店', | |
75 | + [SubTypeEnum.USER]: '人员', | |
76 | +}; | |
77 | + | |
78 | +export enum QueryTypeEnum { | |
79 | + /** 索赔 */ | |
80 | + REVIEW_BEFORE = 1, | |
81 | + /** 差异 */ | |
82 | + REVIEW_AFTER = 2, | |
83 | + /** 人员处罚 */ | |
84 | + USER_PUNISH = 3, | |
85 | +} | |
86 | + | |
87 | +export enum QueryItemTypeEnum { | |
88 | + /** 霏车车系统 */ | |
89 | + SYSTEM_TOTAL = 1, | |
90 | + /** 系统有,导入无 */ | |
91 | + SYSTEM_ONLY = 2, | |
92 | + /** 导入合计 */ | |
93 | + TOTAL_COUNT = 3, | |
94 | + /** 一致 */ | |
95 | + MATCH_COUNT = 4, | |
96 | + /** 差异 */ | |
97 | + DIFFERENCE_COUNT = 5, | |
98 | + /** 系统无,导入有 */ | |
99 | + IMPORT_ONLY = 6, | |
100 | +} | |
101 | + | |
102 | +export const QueryItemTypeNameMap = { | |
103 | + [QueryItemTypeEnum.SYSTEM_TOTAL]: '霏车车系统单数', | |
104 | + [QueryItemTypeEnum.SYSTEM_ONLY]: '系统有,导入无单数', | |
105 | + [QueryItemTypeEnum.TOTAL_COUNT]: '提报单数', | |
106 | + [QueryItemTypeEnum.MATCH_COUNT]: '匹配一致单数', | |
107 | + [QueryItemTypeEnum.DIFFERENCE_COUNT]: '匹配差异单数', | |
108 | + [QueryItemTypeEnum.IMPORT_ONLY]: '系统无,导入有单数', | |
109 | +}; | ... | ... |
src/routes/ClaimReviewApprove/page.tsx
0 → 100644
1 | +import { Button, helper, Toast, PageProvider } from '@feewee/h5app-common'; | |
2 | +import { Helmet } from '@modern-js/runtime/head'; | |
3 | +import { useNavigate } from '@modern-js/runtime/router'; | |
4 | + | |
5 | +// 索赔复核审批 todo 待迁移 | |
6 | +function Index() { | |
7 | + const navigate = useNavigate(); | |
8 | + | |
9 | + return ( | |
10 | + <PageProvider tittle="索赔复核审批" onBackClick={() => helper.checkBack(() => navigate(-1))}> | |
11 | + <main className="p-4 h-screen h-svh"> | |
12 | + <div className=" mt-4"> | |
13 | + <Button | |
14 | + type="primary" | |
15 | + shape="round" | |
16 | + className="!mx-auto !block !mt-4" | |
17 | + onClick={() => | |
18 | + Toast.show({ | |
19 | + content: '成功提示', | |
20 | + icon: 'success', | |
21 | + }) | |
22 | + } | |
23 | + > | |
24 | + 吐司提示 | |
25 | + </Button> | |
26 | + </div> | |
27 | + </main> | |
28 | + </PageProvider> | |
29 | + ); | |
30 | +} | |
31 | + | |
32 | +export default Index; | ... | ... |
src/routes/ClaimReviewApprove/service.ts
0 → 100644
1 | +import type { PromisePageResp, PageBaseParams } from '@feewee/h5app-common'; | |
2 | +import { host, http } from '@feewee/h5app-common'; | |
3 | + | |
4 | +import type { DimensionEnum, MatchStatusEnum, QueryItemTypeEnum, QueryTypeEnum, SubTypeEnum, TypeEnum } from './entity'; | |
5 | + | |
6 | +export interface DetailResult { | |
7 | + // 申请id | |
8 | + applyId: number; | |
9 | + // 文件id | |
10 | + fid: string; | |
11 | + // 文件名称 | |
12 | + fName: string; | |
13 | + // 文件大小,单位b | |
14 | + fSize: number; | |
15 | + // 品牌名称 | |
16 | + brandName: string; | |
17 | + // 往来单位名称 | |
18 | + contactUnits: string; | |
19 | + // 申报商家 id | |
20 | + applyDealerId: number; | |
21 | + // 申报商家名称 | |
22 | + applyDealerName: string; | |
23 | + // 匹配结果的最早提报时间 | |
24 | + beginTime: number; | |
25 | + // 匹配结果的最晚提报时间 | |
26 | + endTime: number; | |
27 | + // 未复核单数 | |
28 | + notReviewedCount: number; | |
29 | + // 未复核金额 | |
30 | + notReviewedAmount: number; | |
31 | + // 超60天未复核单数 | |
32 | + overtimeNotReviewedCount: number; | |
33 | + // 厂家审核金额 | |
34 | + amount: number; | |
35 | +} | |
36 | + | |
37 | +export interface ClaimBeforeData { | |
38 | + // 类型 | |
39 | + type: DimensionEnum; | |
40 | + // 类型id | |
41 | + typeId: number; | |
42 | + // 类型名称 | |
43 | + typeName: string; | |
44 | + // 系统单数 | |
45 | + systemCount: number; | |
46 | + // 系统金额 | |
47 | + systemAmount: number; | |
48 | + // 系统有,导入无单数 | |
49 | + notExistsCount: number; | |
50 | + // 系统有,导入无金额 | |
51 | + notExistsAmount: number; | |
52 | + // 本次导入 合计单数 | |
53 | + total: number; | |
54 | + // 本次导入 合计金额 | |
55 | + totalAmount: number; | |
56 | + // 本次导入 匹配一致单数 | |
57 | + consistentCount: number; | |
58 | + // 本次导入 匹配一致金额 | |
59 | + consistentAmount: number; | |
60 | + // 本次导入 匹配不一致单数 | |
61 | + nonConsistentCount: number; | |
62 | + // 本次导入 匹配不一致金额 | |
63 | + nonConsistentAmount: number; | |
64 | + // 本次导入,系统无,导入有单数 | |
65 | + importNonSystemCount: number; | |
66 | + // 本次导入,系统无,导入有金额 | |
67 | + importNonSystemAmount: number; | |
68 | +} | |
69 | + | |
70 | +export interface ClaimAfterData { | |
71 | + // 类型id | |
72 | + typeId: number; | |
73 | + // 类型名称 | |
74 | + typeName: string; | |
75 | + // 差异单数 | |
76 | + nonConsistentCount: number; | |
77 | + // 差异金额 | |
78 | + nonConsistentAmount: number; | |
79 | + // 系统金额 | |
80 | + systemAmount: number; | |
81 | + // 厂家金额 | |
82 | + factoryAmount: number; | |
83 | +} | |
84 | + | |
85 | +export interface PunishData { | |
86 | + // 人员id | |
87 | + userId: number; | |
88 | + // 人员名称 | |
89 | + userName: number; | |
90 | + // 提报单数 | |
91 | + submitCount: number; | |
92 | + // 差异单数 | |
93 | + nonConsistentCount: number; | |
94 | + // 差异金额 | |
95 | + nonConsistentAmount: number; | |
96 | + // 差异金额占比 | |
97 | + nonConsistentRate: number; | |
98 | + // 处罚金额 | |
99 | + punishAmount: number; | |
100 | + // 处罚绩效得分率 | |
101 | + punishRate: number; | |
102 | +} | |
103 | + | |
104 | +export interface FactoryPunishOrRewardData { | |
105 | + // 合计金额 | |
106 | + totalAmount: number; | |
107 | + // | |
108 | + items: FactoryPunishOrRewardItem[]; | |
109 | +} | |
110 | + | |
111 | +export interface FactoryPunishOrRewardItem { | |
112 | + // 厂家奖励/处罚id | |
113 | + id: number; | |
114 | + // 文件名称 | |
115 | + fName: string; | |
116 | + // 文件id | |
117 | + fid: string; | |
118 | + // 兑现方式 | |
119 | + cashType: number; | |
120 | + // 处罚类型 | |
121 | + projectTypeName: string; | |
122 | + // 金额 | |
123 | + amount: number; | |
124 | + // 是否门店分摊 | |
125 | + apportion: boolean; | |
126 | + // 是否门店 | |
127 | + shop: boolean; | |
128 | + // 是否人员 | |
129 | + user: boolean; | |
130 | +} | |
131 | + | |
132 | +export interface FactoryPunishOrRewardTypeDetail { | |
133 | + // 对象id | |
134 | + targetId: number; | |
135 | + // 对象名称 | |
136 | + targetName: string; | |
137 | + // 金额 | |
138 | + amount: number; | |
139 | + // 比例 | |
140 | + proportion: number; | |
141 | + // 绩效得分率 | |
142 | + scoringRate: number; | |
143 | + // 岗位名称 | |
144 | + postName: string; | |
145 | + // 在职门店名称 | |
146 | + shopName: string; | |
147 | +} | |
148 | + | |
149 | +export interface ReviewListParams extends PageBaseParams { | |
150 | + applyId: number; | |
151 | + type: DimensionEnum | QueryTypeEnum.USER_PUNISH; | |
152 | + typeId: number; | |
153 | + queryType: QueryTypeEnum; | |
154 | + queryItemType: QueryItemTypeEnum; | |
155 | + keywords?: string; | |
156 | +} | |
157 | + | |
158 | +export interface ReviewListResult { | |
159 | + // 导入数据id | |
160 | + importDataId: number; | |
161 | + // 索赔单号 | |
162 | + claimNo: string; | |
163 | + // 索赔类型 | |
164 | + claimType: number; | |
165 | + // 索赔类型名称 | |
166 | + claimTypeName: string; | |
167 | + // 复核附件 | |
168 | + fid: string; | |
169 | + // 厂家兑现金额 | |
170 | + amount: number; | |
171 | + // 系统生成-总金额 | |
172 | + totalFee: number; | |
173 | + // 系统生成-工时费 | |
174 | + systemManHoursFee: number; | |
175 | + // 系统生成-材料费 | |
176 | + systemPartFee: number; | |
177 | + // 系统生成与厂家差异金额 | |
178 | + differenceAmount: number; | |
179 | + // 提报-总金额 | |
180 | + submitAmount: number; | |
181 | + // 提报-工时费 | |
182 | + submitManHoursFee: number; | |
183 | + // 提报-材料费 | |
184 | + submitPartFee: number; | |
185 | + // 提报-与厂家差异金额 | |
186 | + differenceSubmitAmount: number; | |
187 | + // 上传其他信息:json格式 | |
188 | + importData: string; | |
189 | + // 提报人 | |
190 | + claimer: string; | |
191 | + // 提报商家名称 | |
192 | + submitDealerName: string; | |
193 | + // 提报时间 | |
194 | + commitTime: number; | |
195 | + // VIN | |
196 | + vin: string; | |
197 | + // 车牌号 | |
198 | + plateNo: string; | |
199 | + // 车辆 | |
200 | + carName: string; | |
201 | + // 差异原因 | |
202 | + differenceReasonId: number; | |
203 | + differenceReason: string; | |
204 | + // 是否已复核 1: 未填写差异原因,2: 已填写差异原因 | |
205 | + reviewStatus: number; | |
206 | +} | |
207 | + | |
208 | +export interface DetailListParams { | |
209 | + importDataNo: string; // 导入明细编号,同一文件一致 | |
210 | + claimNo?: string; // 索赔单号 | |
211 | + distributorName?: string; // 经销商 | |
212 | + vin?: string; | |
213 | + claimType?: number; // 索赔类型 | |
214 | + matchStatus?: MatchStatusEnum; // 匹配状态,1:匹配一致,2:无工单记录,3:匹配不一致 | |
215 | + current?: number; | |
216 | + pageSize?: number; | |
217 | +} | |
218 | + | |
219 | +export interface DetailListResult { | |
220 | + id: number; // 复核 id | |
221 | + createTime: number; // 创建时间 | |
222 | + updateTime: number; // 更新时间 | |
223 | + createBy: string; // 创建人 | |
224 | + updateBy: string; // 更新人 | |
225 | + groupId: number; // 集团id | |
226 | + importDataNo: string; // 导入明细编号,同一文件一致 | |
227 | + reviewAmount: number; // 复核后金额 | |
228 | + differenceReason: string; // 差异原因, 1.工时费,材料费差异:2.厂家拒绝:3.漏报:4.其他4s店支付:5.家直接打款到公司账户;6.同一工单分多次提报;7.多个工单一次提报(See: 索赔数据不一致原因) | |
229 | + differenceReasonName: string; // 差异原因名称 | |
230 | + distributorName: string; // 经销商 | |
231 | + claimNo: string; // 索赔单号 | |
232 | + vin: string; // 车架号 | |
233 | + claimType: string; // 索赔类型 | |
234 | + manHoursFee: number; // 工时费 | |
235 | + partFee: number; // 配件费 | |
236 | + rescueFee: number; // 救援费 | |
237 | + totalFee: number; // 总结算费用 | |
238 | + remark: string; // 复核备注 | |
239 | + fids: string; // 附件ids | |
240 | + matchStatus: number; // 匹配状态,1: 匹配一致,2: 匹配不一致,3: 无工单记录(See: 索赔匹配状 | |
241 | +} | |
242 | + | |
243 | +export interface ReviewDetailResult { | |
244 | + claimOrderReviewData: ReviewData; // 复核数据 | |
245 | + claimOrders: ClaimOrder[]; // 索赔单信息 | |
246 | + punishes: ReviewPunish[]; // 处罚信息 | |
247 | +} | |
248 | + | |
249 | +export interface ReviewData { | |
250 | + id: number; // 主键 | |
251 | + createTime: number; // 创建时间 | |
252 | + updateTime: number; // 更新时间 | |
253 | + createBy: string; // 创建人 | |
254 | + updateBy: string; // 更新人 | |
255 | + groupId: number; // 集团id | |
256 | + importDataNo: string; // 导入明细编号,同一文件一致 | |
257 | + reviewAmount: number; // 复核后金额 | |
258 | + differenceReason: string; // 差异原因, 1.工时费,材料费差异;2.厂家拒绝;3.漏报;4.其他4s店支付;5.厂家直接打款到公司账户;6.同一工单分多次提报;7.多个工单一次提报(See: 索赔数据不一致原因) | |
259 | + differenceReasonName: string; // 差异原因名称 | |
260 | + distributorName: string; // 经销商 | |
261 | + claimNo: string; // 索赔单号 | |
262 | + vin: string; // 车架号 | |
263 | + claimType: number; // 索赔类型 | |
264 | + manHoursFee: number; // 工时费 | |
265 | + partFee: number; // 配件费 | |
266 | + rescueFee: number; // 救援费 | |
267 | + totalFee: number; // 总结算费用 | |
268 | + remark: string; // 复核备注 | |
269 | + fids: string; // 附件ids | |
270 | + matchStatus: number; // 匹配状态,1: 匹配一致,2: 匹配不一致,3: 无工单记录(See: 索赔匹配状态) | |
271 | +} | |
272 | + | |
273 | +export interface ClaimOrder { | |
274 | + type: number; // 三包类型(1:首保 2: 三包件5: 市场行动) | |
275 | + claimUsername: number; // 索赔确认/提报员工姓名 | |
276 | + claimSubmitAmount: number; // 提报金额 | |
277 | + claimOrderId: number; // 索赔单id | |
278 | + orderNo: number; // 工单号 | |
279 | + ownerName: number; // 车主姓名 | |
280 | + carName: number; // 车辆名称 | |
281 | + vin: number; // 车辆vin码 | |
282 | + plateNo: number; // 车牌号 | |
283 | + specCode: number; // 车型代码 | |
284 | + receiverName: number; // 接车人姓名 | |
285 | + judgeNames: number; // 故障判断员 | |
286 | +} | |
287 | + | |
288 | +export interface ReviewPunish { | |
289 | + id: number; // 复核id | |
290 | + createTime: number; // 创建时间 | |
291 | + updateTime: number; // 更新时间 | |
292 | + dataId: number; // 索赔复核导入数据id | |
293 | + punishUserId: number; // 处罚人员id | |
294 | + punishUsername: string; // 处罚人员 | |
295 | + punishAmount: number; // 处罚金额 | |
296 | + achievements: number; // 处罚绩效 | |
297 | + punishId: number; // 绩效系统id | |
298 | + shopId: number; | |
299 | + shopName: string; | |
300 | +} | |
301 | + | |
302 | +// 详情 | |
303 | +export function detailApi(applyId: number): Promise<DetailResult> { | |
304 | + return http.get(`${host.cas}/erp/claim/review/apply/detail`, { applyId }); | |
305 | +} | |
306 | + | |
307 | +// 复核前数据 | |
308 | +export function dataBeforeReviewApi(params: { applyId: number; type: DimensionEnum }): Promise<ClaimBeforeData[]> { | |
309 | + return http.get(`${host.cas}/erp/claim/review/apply/before/review`, params); | |
310 | +} | |
311 | + | |
312 | +// 复核后数据 | |
313 | +export function dataAfterReviewApi(params: { applyId: number; type: DimensionEnum }): Promise<ClaimAfterData[]> { | |
314 | + return http.get(`${host.cas}/erp/claim/review/apply/after/review`, params); | |
315 | +} | |
316 | + | |
317 | +// 处罚信息 | |
318 | +export function punishListApi(applyId: number): Promise<PunishData[]> { | |
319 | + return http.get(`${host.cas}/erp/claim/review/apply/punish/list`, { applyId }); | |
320 | +} | |
321 | + | |
322 | +// 厂家处罚/奖励信息 1:奖励 2:处罚 | |
323 | +export function factoryPunishOrRewardListApi(params: { applyId: number; type: TypeEnum }): Promise<FactoryPunishOrRewardData> { | |
324 | + return http.get(`${host.cas}/erp/claim/review/apply/factory/info`, params); | |
325 | +} | |
326 | + | |
327 | +// 厂家处罚/奖励类型详情 1:门店分摊,2:门店,3:人员 | |
328 | +export function factoryPunishOrRewardTypeDetailApi(params: { id: number; type: SubTypeEnum }): Promise<FactoryPunishOrRewardTypeDetail[]> { | |
329 | + return http.get(`${host.cas}/erp/claim/review/apply/factory/info/detail`, params); | |
330 | +} | |
331 | + | |
332 | +// 复核列表 | |
333 | +export function reviewListApi(params: ReviewListParams): PromisePageResp<ReviewListResult> { | |
334 | + return http.get(`${host.cas}/erp/claim/review/apply/import/data/page`, params); | |
335 | +} | |
336 | + | |
337 | +// 详情明细 | |
338 | +export function detailListApi(params: DetailListParams): PromisePageResp<DetailListResult> { | |
339 | + return http.get(`${host.cas}/erp/claim/order/review/data/list`, params); | |
340 | +} | |
341 | + | |
342 | +// 复核详情 | |
343 | +export function reviewDetailApi(id: number): Promise<ReviewDetailResult> { | |
344 | + return http.get(`${host.cas}/erp/claim/order/review/data/${id}`); | |
345 | +} | ... | ... |
src/routes/demo/page.tsx deleted
1 | -import { Helmet } from '@modern-js/runtime/head'; | |
2 | -import { ListRow, Button, Icon, IconFont, Space, PageProvider } from '@feewee/h5app-common'; | |
3 | -import { useSafeState } from 'ahooks'; | |
4 | -import { useEffect } from 'react'; | |
5 | - | |
6 | -const Index = () => { | |
7 | - const [loading, setLoading] = useSafeState(true); | |
8 | - | |
9 | - useEffect(() => { | |
10 | - setTimeout(() => setLoading(false), 2500); | |
11 | - }, []); | |
12 | - | |
13 | - return ( | |
14 | - <> | |
15 | - <Helmet> | |
16 | - {/* 这里面可以映入外部的一些样式或者js之类的,如果有需要的话。也可以调整head里的信息 */} | |
17 | - <link rel="icon" type="image/x-icon" href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico" /> | |
18 | - </Helmet> | |
19 | - <PageProvider tittle="demo页面" loading={loading}> | |
20 | - <main className="p-5"> | |
21 | - <div>demo 页面</div> | |
22 | - <ListRow title="标题" description="副标题" extra="描述文字" radius={6} align="center" onClick={() => console.info('点击事件')} /> | |
23 | - <Button type="primary">默认</Button> | |
24 | - <Space> | |
25 | - <Icon.Add /> | |
26 | - <IconFont name="down" /> | |
27 | - </Space> | |
28 | - </main> | |
29 | - </PageProvider> | |
30 | - </> | |
31 | - ); | |
32 | -}; | |
33 | - | |
34 | -export default Index; |
src/routes/page.tsx
1 | -import { Button, Toast } from '@feewee/h5app-common'; | |
2 | -import { Helmet } from '@modern-js/runtime/head'; | |
1 | +import { Button, PageProvider, Toast } from '@feewee/h5app-common'; | |
3 | 2 | import { useNavigate } from '@modern-js/runtime/router'; |
4 | 3 | |
5 | 4 | function Index() { |
6 | 5 | const navigate = useNavigate(); |
7 | 6 | |
8 | 7 | return ( |
9 | - <> | |
10 | - <Helmet> | |
11 | - <link rel="icon" type="image/x-icon" href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico" /> | |
12 | - </Helmet> | |
8 | + <PageProvider tittle="急救待办"> | |
13 | 9 | <main className="p-4 h-screen h-svh"> |
14 | - <div className="text-center">这是首页</div> | |
15 | 10 | <div className=" mt-4"> |
16 | - <Button type="info" shape="round" fill="outline" className="!mx-auto !block" onClick={() => navigate('/demo')}> | |
17 | - 跳转页面 | |
11 | + <Button | |
12 | + type="info" | |
13 | + shape="round" | |
14 | + fill="outline" | |
15 | + className="!mx-auto !block" | |
16 | + onClick={() => navigate('/ClaimReviewApprove/DetailList?applyId=22&queryType=1&queryItemType=5&type=1&typeId=12')} | |
17 | + > | |
18 | + 索赔复核审批详情 | |
18 | 19 | </Button> |
19 | 20 | |
20 | 21 | <Button |
... | ... | @@ -32,7 +33,7 @@ function Index() { |
32 | 33 | </Button> |
33 | 34 | </div> |
34 | 35 | </main> |
35 | - </> | |
36 | + </PageProvider> | |
36 | 37 | ); |
37 | 38 | } |
38 | 39 | ... | ... |
src/style/global.scss
src/utils/rmb.ts
0 → 100644
1 | +import currency from 'currency.js'; | |
2 | + | |
3 | +type RMBOption = { price?: number; symbol?: boolean; precision?: boolean }; | |
4 | + | |
5 | +// 人民币格式化 | |
6 | +const RMB = ({ price = 0, symbol = true, precision = true }: RMBOption) => { | |
7 | + return currency(price, { | |
8 | + symbol: symbol ? '¥' : '', | |
9 | + precision: precision ? 2 : 0, | |
10 | + }).format(); | |
11 | +}; | |
12 | + | |
13 | +// 人民币格式化-不包含符号和小数 | |
14 | +const rmb = (price?: number) => RMB({ price, symbol: false, precision: false }); | |
15 | + | |
16 | +// 人民币格式化-包含符号,不包含小数 | |
17 | +const rmbS = (price?: number) => RMB({ price, precision: false }); | |
18 | + | |
19 | +// 人民币格式化-包含小数,不包含符号 | |
20 | +const rmbP = (price?: number) => RMB({ price, symbol: false }); | |
21 | + | |
22 | +// 人民币格式化-包含符号和小数 | |
23 | +const rmbSP = (price?: number) => RMB({ price }); | |
24 | + | |
25 | +export default { | |
26 | + _: rmb, | |
27 | + s: rmbS, | |
28 | + p: rmbP, | |
29 | + sp: rmbSP, | |
30 | +}; | ... | ... |