Compare commits
204
Commits
f6621392b1
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9c761fe33 | ||
|
|
f82b04caff | ||
|
|
0da0c6f493 | ||
|
|
f081ccd3f0 | ||
|
|
09f77467b1 | ||
|
|
85dc96e126 | ||
|
|
49d5c304ac | ||
|
|
efa53b2422 | ||
|
|
6b6c9ed6ed | ||
|
|
f87c0eea27 | ||
|
|
c18da72156 | ||
|
|
d3e5ff73a5 | ||
|
|
7842e3f78d | ||
|
|
cc22b23d88 | ||
|
|
238f229401 | ||
|
|
2fec3edaf3 | ||
|
|
c38e273538 | ||
|
|
32cd42da92 | ||
|
|
69782cecfc | ||
|
|
5f26ba24c6 | ||
|
|
d2f756bc21 | ||
|
|
1663b2d910 | ||
|
|
748214a4b6 | ||
|
|
44cec23147 | ||
|
|
b218fc2345 | ||
|
|
eb74466c30 | ||
|
|
486d438d49 | ||
|
|
53aa1f66ef | ||
|
|
7def9869ff | ||
|
|
f767296e4d | ||
|
|
b879fd3011 | ||
|
|
db55c3ef00 | ||
|
|
af4a9b6d60 | ||
|
|
d3ba0ce38b | ||
|
|
f5be5245d6 | ||
|
|
baf54efb7b | ||
|
|
79e903bcd8 | ||
|
|
119d71b4f5 | ||
|
|
d57d3f86da | ||
|
|
7ff2b3fe28 | ||
|
|
17d2766f82 | ||
|
|
2fd927a90c | ||
|
|
8057e860de | ||
|
|
ffc2942d2b | ||
|
|
22bbcbb7aa | ||
|
|
4dd63fc5fa | ||
|
|
c525bffeca | ||
|
|
8f3da0e386 | ||
|
|
d4ae6d521a | ||
|
|
b36fa18db5 | ||
|
|
f648285406 | ||
|
|
fff0a29947 | ||
|
|
64b61c9c29 | ||
|
|
32065b9c54 | ||
|
|
5d56706eed | ||
|
|
9efae11811 | ||
|
|
9a04757a9e | ||
|
|
e88a27d01f | ||
|
|
b9c367e028 | ||
|
|
7f694bad55 | ||
|
|
014ee537a0 | ||
|
|
5bde60d844 | ||
|
|
799a87641e | ||
|
|
28baa69e8f | ||
|
|
4ed80268b4 | ||
|
|
30c59c2acb | ||
|
|
68904b02a5 | ||
|
|
c0ba9ba39b | ||
|
|
8388a55481 | ||
|
|
b492dd35ea | ||
|
|
acb74cbc9a | ||
|
|
9a51bd2cfd | ||
|
|
4dd54f7e4c | ||
|
|
6705763951 | ||
|
|
4ba18acd25 | ||
|
|
c07371450f | ||
|
|
5fbbb5f88f | ||
|
|
1ed7955764 | ||
|
|
daab1001db | ||
|
|
f5735e6bad | ||
|
|
bd9da83175 | ||
|
|
b59e43c9b7 | ||
|
|
eae50ab909 | ||
|
|
39560bde79 | ||
|
|
8e1430491b | ||
|
|
9fed3785d9 | ||
|
|
eaf431819e | ||
|
|
c7bd4461e2 | ||
|
|
ab7491e6d6 | ||
|
|
d78d100824 | ||
|
|
9908b543ea | ||
|
|
46e7952e49 | ||
|
|
441d62a874 | ||
|
|
1a143aa05b | ||
|
|
f3d69d7df0 | ||
|
|
cd58e8ebc7 | ||
|
|
11d33df46a | ||
|
|
06de9477e5 | ||
|
|
f7ee9273c6 | ||
|
|
e0a420ad08 | ||
|
|
8388904916 | ||
|
|
24fec3c7d7 | ||
|
|
b76ada9d6c | ||
|
|
2083754b16 | ||
|
|
3df09d7d45 | ||
|
|
b878bc356e | ||
|
|
d76977c07c | ||
|
|
d95163663b | ||
|
|
e95151ad51 | ||
|
|
5351911d50 | ||
|
|
e602eecee8 | ||
|
|
70801096dd | ||
|
|
025cba317d | ||
|
|
5ce91ec5d5 | ||
|
|
26140aecb9 | ||
|
|
8d85311bb3 | ||
|
|
8b2fa09cb9 | ||
|
|
4d78466824 | ||
|
|
fe4255c59b | ||
|
|
c6c7c80d97 | ||
|
|
3397bd6a7b | ||
|
|
083d954765 | ||
|
|
78bb38e955 | ||
|
|
4b060fc045 | ||
|
|
2cf966d6e3 | ||
|
|
d23a9b00de | ||
|
|
d89fd9db97 | ||
|
|
94ee14b683 | ||
|
|
a725d3078f | ||
|
|
185a0f9aec | ||
|
|
a528788409 | ||
|
|
1957a78c00 | ||
|
|
acfe9bdd74 | ||
|
|
72471f48de | ||
|
|
415e1fd58d | ||
|
|
698f808f0b | ||
|
|
ea6ec13ea4 | ||
|
|
114c2fd2af | ||
|
|
6119c44394 | ||
|
|
9dab7f7495 | ||
|
|
f5697e111a | ||
|
|
775307f5c0 | ||
|
|
4502881063 | ||
|
|
358add743e | ||
|
|
f67a4036ed | ||
|
|
7ba6620f06 | ||
|
|
9a3652d767 | ||
|
|
450505715a | ||
|
|
9a603a3796 | ||
|
|
2b51619728 | ||
|
|
5f167aae50 | ||
|
|
0d8eb25253 | ||
|
|
74988c0b5e | ||
|
|
e53852b05f | ||
|
|
8d3e87d710 | ||
|
|
c7b07f0c95 | ||
|
|
4c117d87a5 | ||
|
|
59199397e0 | ||
|
|
70d49d022b | ||
|
|
7d16660bfc | ||
|
|
d6bcb12c20 | ||
|
|
e1d87f5788 | ||
|
|
56b8f68449 | ||
|
|
0ac17dea0b | ||
|
|
39e3115fbe | ||
|
|
9c0f7cb3f4 | ||
|
|
7b478bdbf2 | ||
|
|
87d6ff97a3 | ||
|
|
e3bd44e8fc | ||
|
|
324daf9d4d | ||
|
|
37ac683fb4 | ||
|
|
c402d68aea | ||
|
|
e8f6311477 | ||
|
|
fa78a68df6 | ||
|
|
320422856c | ||
|
|
0add4c5cdc | ||
|
|
372e8826a2 | ||
|
|
92a8d4aab1 | ||
|
|
59a1ca8a0d | ||
|
|
5544cfb3ca | ||
|
|
fcd5ef7df9 | ||
|
|
489b406214 | ||
|
|
353148eb7f | ||
|
|
293b4fc6ce | ||
|
|
53b588063e | ||
|
|
0889f29c59 | ||
|
|
f1c004813e | ||
|
|
d67cf55491 | ||
|
|
6384e80758 | ||
|
|
eb32a275f3 | ||
|
|
9150213b0f | ||
|
|
d3af455374 | ||
|
|
4e8163dd18 | ||
|
|
89bbc43f12 | ||
|
|
4199318aa9 | ||
|
|
555189177c | ||
|
|
1622015724 | ||
|
|
f7d8fbf16b | ||
|
|
847f09b14d | ||
|
|
2ae817ec38 | ||
|
|
6d80ffde6c | ||
|
|
44809ad303 | ||
|
|
91cb3ee8c2 | ||
|
|
b2a6d73bac |
@@ -2,6 +2,7 @@
|
|||||||
node_modules
|
node_modules
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
/dist
|
/dist
|
||||||
|
/dist.zip
|
||||||
|
|
||||||
/tests/e2e/videos/
|
/tests/e2e/videos/
|
||||||
/tests/e2e/screenshots/
|
/tests/e2e/screenshots/
|
||||||
|
|||||||
+5
-4
@@ -4,10 +4,11 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host",
|
"dev": "vite --host",
|
||||||
"prod": "vite --mode production",
|
"prod": "vite --mode production",
|
||||||
"build": "vite build",
|
"build": "vite build && node scripts/zip-dist.mjs",
|
||||||
"build:prod": "vite build --mode production",
|
"build:prod": "vite build --mode production && node scripts/zip-dist.mjs",
|
||||||
|
"zip:dist": "node scripts/zip-dist.mjs",
|
||||||
"serve": "vite preview --host",
|
"serve": "vite preview --host",
|
||||||
"typecheck": "vue-tsc --noEmit"
|
"typecheck": "vue-tsc -p jsconfig.json --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "^2.3.1",
|
"@element-plus/icons-vue": "^2.3.1",
|
||||||
@@ -48,7 +49,7 @@
|
|||||||
"prettier": "^2.8.7",
|
"prettier": "^2.8.7",
|
||||||
"sass": "^1.85.1",
|
"sass": "^1.85.1",
|
||||||
"terser": "^5.31.1",
|
"terser": "^5.31.1",
|
||||||
"typescript": "^7.0.2",
|
"typescript": "5.9.3",
|
||||||
"unplugin-auto-import": "^0.11.2",
|
"unplugin-auto-import": "^0.11.2",
|
||||||
"vite": "^5.4.19",
|
"vite": "^5.4.19",
|
||||||
"vite-plugin-compression": "^0.5.1",
|
"vite-plugin-compression": "^0.5.1",
|
||||||
|
|||||||
Generated
+94
-295
@@ -13,31 +13,31 @@ importers:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@element-plus/icons-vue':
|
'@element-plus/icons-vue':
|
||||||
specifier: ^2.3.1
|
specifier: ^2.3.1
|
||||||
version: 2.3.2(vue@3.5.34(typescript@7.0.2))
|
version: 2.3.2(vue@3.5.34(typescript@5.9.3))
|
||||||
'@open-file-viewer/core':
|
'@open-file-viewer/core':
|
||||||
specifier: ^0.1.27
|
specifier: ^0.1.27
|
||||||
version: 0.1.27(pdfjs-dist@6.1.200)
|
version: 0.1.27(pdfjs-dist@6.1.200)
|
||||||
'@open-file-viewer/vue':
|
'@open-file-viewer/vue':
|
||||||
specifier: ^0.1.27
|
specifier: ^0.1.27
|
||||||
version: 0.1.27(@open-file-viewer/core@0.1.27(pdfjs-dist@6.1.200))(vue@3.5.34(typescript@7.0.2))
|
version: 0.1.27(@open-file-viewer/core@0.1.27(pdfjs-dist@6.1.200))(vue@3.5.34(typescript@5.9.3))
|
||||||
'@saber/nf-design-base-elp':
|
'@saber/nf-design-base-elp':
|
||||||
specifier: ^1.3.0
|
specifier: ^1.3.0
|
||||||
version: 1.3.0
|
version: 1.3.0
|
||||||
'@saber/nf-form-design-elp':
|
'@saber/nf-form-design-elp':
|
||||||
specifier: ^1.6.1
|
specifier: ^1.6.1
|
||||||
version: 1.6.1(vue@3.5.34(typescript@7.0.2))
|
version: 1.6.1(vue@3.5.34(typescript@5.9.3))
|
||||||
'@saber/nf-form-elp':
|
'@saber/nf-form-elp':
|
||||||
specifier: ^1.6.3
|
specifier: ^1.6.3
|
||||||
version: 1.7.0
|
version: 1.7.0
|
||||||
'@smallwei/avue':
|
'@smallwei/avue':
|
||||||
specifier: ~3.9.2
|
specifier: ~3.9.2
|
||||||
version: 3.9.2(patch_hash=5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db)(@element-plus/icons-vue@2.3.2(vue@3.5.34(typescript@7.0.2)))(debug@4.4.3(supports-color@7.2.0))(element-plus@2.14.2(vue@3.5.34(typescript@7.0.2)))(vue@3.5.34(typescript@7.0.2))
|
version: 3.9.2(patch_hash=5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db)(@element-plus/icons-vue@2.3.2(vue@3.5.34(typescript@5.9.3)))(debug@4.4.3(supports-color@7.2.0))(element-plus@2.14.2(vue@3.5.34(typescript@5.9.3)))(vue@3.5.34(typescript@5.9.3))
|
||||||
animate.css:
|
animate.css:
|
||||||
specifier: ^4.1.1
|
specifier: ^4.1.1
|
||||||
version: 4.1.1
|
version: 4.1.1
|
||||||
avue-plugin-ueditor:
|
avue-plugin-ueditor:
|
||||||
specifier: ^1.0.4
|
specifier: ^1.0.4
|
||||||
version: 1.0.4(axios@1.16.0(debug@4.4.3(supports-color@7.2.0)))(vue@3.5.34(typescript@7.0.2))
|
version: 1.0.4(axios@1.16.0(debug@4.4.3(supports-color@7.2.0)))(vue@3.5.34(typescript@5.9.3))
|
||||||
axios:
|
axios:
|
||||||
specifier: ^1.13.5
|
specifier: ^1.13.5
|
||||||
version: 1.16.0(debug@4.4.3(supports-color@7.2.0))
|
version: 1.16.0(debug@4.4.3(supports-color@7.2.0))
|
||||||
@@ -58,7 +58,7 @@ importers:
|
|||||||
version: 6.1.0
|
version: 6.1.0
|
||||||
element-plus:
|
element-plus:
|
||||||
specifier: ^2.14.2
|
specifier: ^2.14.2
|
||||||
version: 2.14.2(vue@3.5.34(typescript@7.0.2))
|
version: 2.14.2(vue@3.5.34(typescript@5.9.3))
|
||||||
exceljs:
|
exceljs:
|
||||||
specifier: ^4.4.0
|
specifier: ^4.4.0
|
||||||
version: 4.4.0
|
version: 4.4.0
|
||||||
@@ -85,29 +85,29 @@ importers:
|
|||||||
version: 0.4.0
|
version: 0.4.0
|
||||||
vue:
|
vue:
|
||||||
specifier: ^3.5.13
|
specifier: ^3.5.13
|
||||||
version: 3.5.34(typescript@7.0.2)
|
version: 3.5.34(typescript@5.9.3)
|
||||||
vue-i18n:
|
vue-i18n:
|
||||||
specifier: ^11.4.2
|
specifier: ^11.4.2
|
||||||
version: 11.4.2(vue@3.5.34(typescript@7.0.2))
|
version: 11.4.2(vue@3.5.34(typescript@5.9.3))
|
||||||
vue-pdf-embed:
|
vue-pdf-embed:
|
||||||
specifier: ^2.1.6
|
specifier: ^2.1.6
|
||||||
version: 2.1.6(vue@3.5.34(typescript@7.0.2))
|
version: 2.1.6(vue@3.5.34(typescript@5.9.3))
|
||||||
vue-router:
|
vue-router:
|
||||||
specifier: ^4.3.2
|
specifier: ^4.3.2
|
||||||
version: 4.6.4(vue@3.5.34(typescript@7.0.2))
|
version: 4.6.4(vue@3.5.34(typescript@5.9.3))
|
||||||
vue3-clipboard:
|
vue3-clipboard:
|
||||||
specifier: ^1.0.0
|
specifier: ^1.0.0
|
||||||
version: 1.0.0(vue@3.5.34(typescript@7.0.2))
|
version: 1.0.0(vue@3.5.34(typescript@5.9.3))
|
||||||
vuex:
|
vuex:
|
||||||
specifier: ^4.1.0
|
specifier: ^4.1.0
|
||||||
version: 4.1.0(vue@3.5.34(typescript@7.0.2))
|
version: 4.1.0(vue@3.5.34(typescript@5.9.3))
|
||||||
xlsx:
|
xlsx:
|
||||||
specifier: 0.18.5
|
specifier: 0.18.5
|
||||||
version: 0.18.5
|
version: 0.18.5
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@vitejs/plugin-vue':
|
'@vitejs/plugin-vue':
|
||||||
specifier: ^5.2.4
|
specifier: ^5.2.4
|
||||||
version: 5.2.4(vite@5.4.21(sass@1.99.0)(terser@5.46.2))(vue@3.5.34(typescript@7.0.2))
|
version: 5.2.4(vite@5.4.21(sass@1.99.0)(terser@5.46.2))(vue@3.5.34(typescript@5.9.3))
|
||||||
'@vue/compiler-sfc':
|
'@vue/compiler-sfc':
|
||||||
specifier: ^3.4.27
|
specifier: ^3.4.27
|
||||||
version: 3.5.34
|
version: 3.5.34
|
||||||
@@ -121,11 +121,11 @@ importers:
|
|||||||
specifier: ^5.31.1
|
specifier: ^5.31.1
|
||||||
version: 5.46.2
|
version: 5.46.2
|
||||||
typescript:
|
typescript:
|
||||||
specifier: ^7.0.2
|
specifier: 5.9.3
|
||||||
version: 7.0.2
|
version: 5.9.3
|
||||||
unplugin-auto-import:
|
unplugin-auto-import:
|
||||||
specifier: ^0.11.2
|
specifier: ^0.11.2
|
||||||
version: 0.11.5(@vueuse/core@14.3.0(vue@3.5.34(typescript@7.0.2)))(rollup@4.60.3)
|
version: 0.11.5(@vueuse/core@14.3.0(vue@3.5.34(typescript@5.9.3)))(rollup@4.60.3)
|
||||||
vite:
|
vite:
|
||||||
specifier: ^5.4.19
|
specifier: ^5.4.19
|
||||||
version: 5.4.21(sass@1.99.0)(terser@5.46.2)
|
version: 5.4.21(sass@1.99.0)(terser@5.46.2)
|
||||||
@@ -137,7 +137,7 @@ importers:
|
|||||||
version: 0.4.0(vite@5.4.21(sass@1.99.0)(terser@5.46.2))
|
version: 0.4.0(vite@5.4.21(sass@1.99.0)(terser@5.46.2))
|
||||||
vue-tsc:
|
vue-tsc:
|
||||||
specifier: ^3.3.11
|
specifier: ^3.3.11
|
||||||
version: 3.3.13(typescript@7.0.2)
|
version: 3.3.13(typescript@5.9.3)
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
@@ -771,126 +771,6 @@ packages:
|
|||||||
'@types/web-bluetooth@0.0.21':
|
'@types/web-bluetooth@0.0.21':
|
||||||
resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==}
|
resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==}
|
||||||
|
|
||||||
'@typescript/typescript-aix-ppc64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [ppc64]
|
|
||||||
os: [aix]
|
|
||||||
|
|
||||||
'@typescript/typescript-darwin-arm64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [darwin]
|
|
||||||
|
|
||||||
'@typescript/typescript-darwin-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [darwin]
|
|
||||||
|
|
||||||
'@typescript/typescript-freebsd-arm64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [freebsd]
|
|
||||||
|
|
||||||
'@typescript/typescript-freebsd-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [freebsd]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-arm64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-arm@7.0.2':
|
|
||||||
resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-loong64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [loong64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-mips64el@7.0.2':
|
|
||||||
resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [mips64el]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-ppc64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [ppc64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-riscv64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [riscv64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-s390x@7.0.2':
|
|
||||||
resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [s390x]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-netbsd-arm64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [netbsd]
|
|
||||||
|
|
||||||
'@typescript/typescript-netbsd-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [netbsd]
|
|
||||||
|
|
||||||
'@typescript/typescript-openbsd-arm64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [openbsd]
|
|
||||||
|
|
||||||
'@typescript/typescript-openbsd-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [openbsd]
|
|
||||||
|
|
||||||
'@typescript/typescript-sunos-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [sunos]
|
|
||||||
|
|
||||||
'@typescript/typescript-win32-arm64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [win32]
|
|
||||||
|
|
||||||
'@typescript/typescript-win32-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [win32]
|
|
||||||
|
|
||||||
'@uppy/companion-client@2.2.2':
|
'@uppy/companion-client@2.2.2':
|
||||||
resolution: {integrity: sha512-5mTp2iq97/mYSisMaBtFRry6PTgZA6SIL7LePteOV5x0/DxKfrZW3DEiQERJmYpHzy7k8johpm2gHnEKto56Og==}
|
resolution: {integrity: sha512-5mTp2iq97/mYSisMaBtFRry6PTgZA6SIL7LePteOV5x0/DxKfrZW3DEiQERJmYpHzy7k8johpm2gHnEKto56Og==}
|
||||||
|
|
||||||
@@ -2194,9 +2074,9 @@ packages:
|
|||||||
typedarray@0.0.6:
|
typedarray@0.0.6:
|
||||||
resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==}
|
resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==}
|
||||||
|
|
||||||
typescript@7.0.2:
|
typescript@5.9.3:
|
||||||
resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==}
|
resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
|
||||||
engines: {node: '>=16.20.0'}
|
engines: {node: '>=14.17'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
ufo@1.6.4:
|
ufo@1.6.4:
|
||||||
@@ -2408,9 +2288,9 @@ snapshots:
|
|||||||
|
|
||||||
'@ctrl/tinycolor@4.2.0': {}
|
'@ctrl/tinycolor@4.2.0': {}
|
||||||
|
|
||||||
'@element-plus/icons-vue@2.3.2(vue@3.5.34(typescript@7.0.2))':
|
'@element-plus/icons-vue@2.3.2(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
'@esbuild/aix-ppc64@0.21.5':
|
'@esbuild/aix-ppc64@0.21.5':
|
||||||
optional: true
|
optional: true
|
||||||
@@ -2651,10 +2531,10 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- geotiff
|
- geotiff
|
||||||
|
|
||||||
'@open-file-viewer/vue@0.1.27(@open-file-viewer/core@0.1.27(pdfjs-dist@6.1.200))(vue@3.5.34(typescript@7.0.2))':
|
'@open-file-viewer/vue@0.1.27(@open-file-viewer/core@0.1.27(pdfjs-dist@6.1.200))(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@open-file-viewer/core': 0.1.27(pdfjs-dist@6.1.200)
|
'@open-file-viewer/core': 0.1.27(pdfjs-dist@6.1.200)
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
'@parcel/watcher-android-arm64@2.5.6':
|
'@parcel/watcher-android-arm64@2.5.6':
|
||||||
optional: true
|
optional: true
|
||||||
@@ -2806,9 +2686,9 @@ snapshots:
|
|||||||
codemirror: 5.65.21
|
codemirror: 5.65.21
|
||||||
randomcolor: 0.6.2
|
randomcolor: 0.6.2
|
||||||
|
|
||||||
'@saber/nf-form-design-elp@1.6.1(vue@3.5.34(typescript@7.0.2))':
|
'@saber/nf-form-design-elp@1.6.1(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
vuedraggable: 4.1.0(vue@3.5.34(typescript@7.0.2))
|
vuedraggable: 4.1.0(vue@3.5.34(typescript@5.9.3))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- vue
|
- vue
|
||||||
|
|
||||||
@@ -2820,16 +2700,16 @@ snapshots:
|
|||||||
countup.js: 2.10.0
|
countup.js: 2.10.0
|
||||||
signature_pad: 5.1.3
|
signature_pad: 5.1.3
|
||||||
|
|
||||||
'@smallwei/avue@3.9.2(patch_hash=5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db)(@element-plus/icons-vue@2.3.2(vue@3.5.34(typescript@7.0.2)))(debug@4.4.3(supports-color@7.2.0))(element-plus@2.14.2(vue@3.5.34(typescript@7.0.2)))(vue@3.5.34(typescript@7.0.2))':
|
'@smallwei/avue@3.9.2(patch_hash=5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db)(@element-plus/icons-vue@2.3.2(vue@3.5.34(typescript@5.9.3)))(debug@4.4.3(supports-color@7.2.0))(element-plus@2.14.2(vue@3.5.34(typescript@5.9.3)))(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@element-plus/icons-vue': 2.3.2(vue@3.5.34(typescript@7.0.2))
|
'@element-plus/icons-vue': 2.3.2(vue@3.5.34(typescript@5.9.3))
|
||||||
axios: 0.21.4(debug@4.4.3(supports-color@7.2.0))
|
axios: 0.21.4(debug@4.4.3(supports-color@7.2.0))
|
||||||
countup.js: 1.9.3
|
countup.js: 1.9.3
|
||||||
dayjs: 1.11.20
|
dayjs: 1.11.20
|
||||||
element-plus: 2.14.2(vue@3.5.34(typescript@7.0.2))
|
element-plus: 2.14.2(vue@3.5.34(typescript@5.9.3))
|
||||||
lodash: 4.18.1
|
lodash: 4.18.1
|
||||||
lodash-es: 4.18.1
|
lodash-es: 4.18.1
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- debug
|
- debug
|
||||||
|
|
||||||
@@ -2856,66 +2736,6 @@ snapshots:
|
|||||||
|
|
||||||
'@types/web-bluetooth@0.0.21': {}
|
'@types/web-bluetooth@0.0.21': {}
|
||||||
|
|
||||||
'@typescript/typescript-aix-ppc64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-darwin-arm64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-darwin-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-freebsd-arm64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-freebsd-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-arm64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-arm@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-loong64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-mips64el@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-ppc64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-riscv64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-s390x@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-netbsd-arm64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-netbsd-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-openbsd-arm64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-openbsd-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-sunos-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-win32-arm64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-win32-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@uppy/companion-client@2.2.2':
|
'@uppy/companion-client@2.2.2':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@uppy/utils': 4.1.3
|
'@uppy/utils': 4.1.3
|
||||||
@@ -2945,10 +2765,10 @@ snapshots:
|
|||||||
'@uppy/utils': 4.1.3
|
'@uppy/utils': 4.1.3
|
||||||
nanoid: 3.3.12
|
nanoid: 3.3.12
|
||||||
|
|
||||||
'@vitejs/plugin-vue@5.2.4(vite@5.4.21(sass@1.99.0)(terser@5.46.2))(vue@3.5.34(typescript@7.0.2))':
|
'@vitejs/plugin-vue@5.2.4(vite@5.4.21(sass@1.99.0)(terser@5.46.2))(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
vite: 5.4.21(sass@1.99.0)(terser@5.46.2)
|
vite: 5.4.21(sass@1.99.0)(terser@5.46.2)
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
'@volar/language-core@2.4.28':
|
'@volar/language-core@2.4.28':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -2956,13 +2776,13 @@ snapshots:
|
|||||||
|
|
||||||
'@volar/source-map@2.4.28': {}
|
'@volar/source-map@2.4.28': {}
|
||||||
|
|
||||||
'@volar/typescript@2.4.28(typescript@7.0.2)':
|
'@volar/typescript@2.4.28(typescript@5.9.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@volar/language-core': 2.4.28
|
'@volar/language-core': 2.4.28
|
||||||
path-browserify: 1.0.1
|
path-browserify: 1.0.1
|
||||||
vscode-uri: 3.2.0
|
vscode-uri: 3.2.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 7.0.2
|
typescript: 5.9.3
|
||||||
|
|
||||||
'@vue/compiler-core@3.5.34':
|
'@vue/compiler-core@3.5.34':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -3022,51 +2842,51 @@ snapshots:
|
|||||||
'@vue/shared': 3.5.34
|
'@vue/shared': 3.5.34
|
||||||
csstype: 3.2.3
|
csstype: 3.2.3
|
||||||
|
|
||||||
'@vue/server-renderer@3.5.34(vue@3.5.34(typescript@7.0.2))':
|
'@vue/server-renderer@3.5.34(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/compiler-ssr': 3.5.34
|
'@vue/compiler-ssr': 3.5.34
|
||||||
'@vue/shared': 3.5.34
|
'@vue/shared': 3.5.34
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
'@vue/shared@3.5.34': {}
|
'@vue/shared@3.5.34': {}
|
||||||
|
|
||||||
'@vueuse/core@14.3.0(vue@3.5.34(typescript@7.0.2))':
|
'@vueuse/core@14.3.0(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/web-bluetooth': 0.0.21
|
'@types/web-bluetooth': 0.0.21
|
||||||
'@vueuse/metadata': 14.3.0
|
'@vueuse/metadata': 14.3.0
|
||||||
'@vueuse/shared': 14.3.0(vue@3.5.34(typescript@7.0.2))
|
'@vueuse/shared': 14.3.0(vue@3.5.34(typescript@5.9.3))
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
'@vueuse/metadata@14.3.0': {}
|
'@vueuse/metadata@14.3.0': {}
|
||||||
|
|
||||||
'@vueuse/shared@14.3.0(vue@3.5.34(typescript@7.0.2))':
|
'@vueuse/shared@14.3.0(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
'@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
|
'@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
dom7: 3.0.0
|
dom7: 4.0.6
|
||||||
is-url: 1.2.4
|
is-url: 1.2.4
|
||||||
lodash.throttle: 4.1.1
|
lodash.throttle: 4.1.1
|
||||||
nanoid: 5.1.11
|
nanoid: 5.1.11
|
||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
snabbdom: 3.6.3
|
snabbdom: 3.6.3
|
||||||
|
|
||||||
'@wangeditor-next/code-highlight@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)':
|
'@wangeditor-next/code-highlight@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
dom7: 4.0.6
|
dom7: 4.0.6
|
||||||
prismjs: 1.30.0
|
prismjs: 1.30.0
|
||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
snabbdom: 3.6.3
|
snabbdom: 3.6.3
|
||||||
|
|
||||||
'@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
|
'@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/event-emitter': 0.3.5
|
'@types/event-emitter': 0.3.5
|
||||||
'@uppy/core': 2.3.4
|
'@uppy/core': 2.3.4
|
||||||
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
||||||
dom7: 3.0.0
|
dom7: 4.0.6
|
||||||
event-emitter: 0.3.5
|
event-emitter: 0.3.5
|
||||||
html-void-elements: 3.0.0
|
html-void-elements: 3.0.0
|
||||||
i18next: 23.16.8
|
i18next: 23.16.8
|
||||||
@@ -3087,13 +2907,13 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@uppy/core': 2.3.4
|
'@uppy/core': 2.3.4
|
||||||
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
||||||
'@wangeditor-next/basic-modules': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/basic-modules': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
'@wangeditor-next/code-highlight': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/code-highlight': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
'@wangeditor-next/list-module': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/list-module': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
'@wangeditor-next/table-module': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.debounce@4.0.8)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/table-module': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.debounce@4.0.8)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
'@wangeditor-next/upload-image-module': 2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.foreach@4.5.0)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/upload-image-module': 2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.foreach@4.5.0)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
'@wangeditor-next/video-module': 2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/video-module': 2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
dom7: 4.0.6
|
dom7: 4.0.6
|
||||||
is-hotkey: 0.2.0
|
is-hotkey: 0.2.0
|
||||||
lodash.camelcase: 4.3.0
|
lodash.camelcase: 4.3.0
|
||||||
@@ -3106,16 +2926,16 @@ snapshots:
|
|||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
snabbdom: 3.6.3
|
snabbdom: 3.6.3
|
||||||
|
|
||||||
'@wangeditor-next/list-module@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)':
|
'@wangeditor-next/list-module@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
dom7: 4.0.6
|
dom7: 4.0.6
|
||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
snabbdom: 3.6.3
|
snabbdom: 3.6.3
|
||||||
|
|
||||||
'@wangeditor-next/table-module@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.debounce@4.0.8)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
|
'@wangeditor-next/table-module@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.debounce@4.0.8)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
dom7: 4.0.6
|
dom7: 4.0.6
|
||||||
lodash.debounce: 4.0.8
|
lodash.debounce: 4.0.8
|
||||||
lodash.throttle: 4.1.1
|
lodash.throttle: 4.1.1
|
||||||
@@ -3123,22 +2943,22 @@ snapshots:
|
|||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
snabbdom: 3.6.3
|
snabbdom: 3.6.3
|
||||||
|
|
||||||
'@wangeditor-next/upload-image-module@2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.foreach@4.5.0)(slate@0.123.0)(snabbdom@3.6.3)':
|
'@wangeditor-next/upload-image-module@2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.foreach@4.5.0)(slate@0.123.0)(snabbdom@3.6.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@uppy/core': 2.3.4
|
'@uppy/core': 2.3.4
|
||||||
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
||||||
'@wangeditor-next/basic-modules': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/basic-modules': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
dom7: 4.0.6
|
dom7: 4.0.6
|
||||||
lodash.foreach: 4.5.0
|
lodash.foreach: 4.5.0
|
||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
snabbdom: 3.6.3
|
snabbdom: 3.6.3
|
||||||
|
|
||||||
'@wangeditor-next/video-module@2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
|
'@wangeditor-next/video-module@2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@uppy/core': 2.3.4
|
'@uppy/core': 2.3.4
|
||||||
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
||||||
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
dom7: 4.0.6
|
dom7: 4.0.6
|
||||||
nanoid: 5.1.11
|
nanoid: 5.1.11
|
||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
@@ -3185,10 +3005,10 @@ snapshots:
|
|||||||
slate-history: 0.66.0(slate@0.72.8)
|
slate-history: 0.66.0(slate@0.72.8)
|
||||||
snabbdom: 3.6.3
|
snabbdom: 3.6.3
|
||||||
|
|
||||||
'@wangeditor/editor-for-vue@5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.34(typescript@7.0.2))':
|
'@wangeditor/editor-for-vue@5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@wangeditor/editor': 5.1.23
|
'@wangeditor/editor': 5.1.23
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
'@wangeditor/editor@5.1.23':
|
'@wangeditor/editor@5.1.23':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -3317,12 +3137,12 @@ snapshots:
|
|||||||
|
|
||||||
asynckit@0.4.0: {}
|
asynckit@0.4.0: {}
|
||||||
|
|
||||||
avue-plugin-ueditor@1.0.4(axios@1.16.0(debug@4.4.3(supports-color@7.2.0)))(vue@3.5.34(typescript@7.0.2)):
|
avue-plugin-ueditor@1.0.4(axios@1.16.0(debug@4.4.3(supports-color@7.2.0)))(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@wangeditor/editor': 5.1.23
|
'@wangeditor/editor': 5.1.23
|
||||||
'@wangeditor/editor-for-vue': 5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.34(typescript@7.0.2))
|
'@wangeditor/editor-for-vue': 5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.34(typescript@5.9.3))
|
||||||
axios: 1.16.0(debug@4.4.3(supports-color@7.2.0))
|
axios: 1.16.0(debug@4.4.3(supports-color@7.2.0))
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
axios@0.21.4(debug@4.4.3(supports-color@7.2.0)):
|
axios@0.21.4(debug@4.4.3(supports-color@7.2.0)):
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -3575,15 +3395,15 @@ snapshots:
|
|||||||
tslib: 2.3.0
|
tslib: 2.3.0
|
||||||
zrender: 6.1.0
|
zrender: 6.1.0
|
||||||
|
|
||||||
element-plus@2.14.2(vue@3.5.34(typescript@7.0.2)):
|
element-plus@2.14.2(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@ctrl/tinycolor': 4.2.0
|
'@ctrl/tinycolor': 4.2.0
|
||||||
'@element-plus/icons-vue': 2.3.2(vue@3.5.34(typescript@7.0.2))
|
'@element-plus/icons-vue': 2.3.2(vue@3.5.34(typescript@5.9.3))
|
||||||
'@floating-ui/dom': 1.7.6
|
'@floating-ui/dom': 1.7.6
|
||||||
'@popperjs/core': '@sxzz/popperjs-es@2.11.8'
|
'@popperjs/core': '@sxzz/popperjs-es@2.11.8'
|
||||||
'@types/lodash': 4.17.24
|
'@types/lodash': 4.17.24
|
||||||
'@types/lodash-es': 4.17.12
|
'@types/lodash-es': 4.17.12
|
||||||
'@vueuse/core': 14.3.0(vue@3.5.34(typescript@7.0.2))
|
'@vueuse/core': 14.3.0(vue@3.5.34(typescript@5.9.3))
|
||||||
async-validator: 4.2.5
|
async-validator: 4.2.5
|
||||||
dayjs: 1.11.20
|
dayjs: 1.11.20
|
||||||
lodash: 4.18.1
|
lodash: 4.18.1
|
||||||
@@ -3591,7 +3411,7 @@ snapshots:
|
|||||||
lodash-unified: 1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.18.1)(lodash@4.18.1)
|
lodash-unified: 1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.18.1)(lodash@4.18.1)
|
||||||
memoize-one: 6.0.0
|
memoize-one: 6.0.0
|
||||||
normalize-wheel-es: 1.2.0
|
normalize-wheel-es: 1.2.0
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
vue-component-type-helpers: 3.3.6
|
vue-component-type-helpers: 3.3.6
|
||||||
|
|
||||||
end-of-stream@1.4.5:
|
end-of-stream@1.4.5:
|
||||||
@@ -4352,28 +4172,7 @@ snapshots:
|
|||||||
|
|
||||||
typedarray@0.0.6: {}
|
typedarray@0.0.6: {}
|
||||||
|
|
||||||
typescript@7.0.2:
|
typescript@5.9.3: {}
|
||||||
optionalDependencies:
|
|
||||||
'@typescript/typescript-aix-ppc64': 7.0.2
|
|
||||||
'@typescript/typescript-darwin-arm64': 7.0.2
|
|
||||||
'@typescript/typescript-darwin-x64': 7.0.2
|
|
||||||
'@typescript/typescript-freebsd-arm64': 7.0.2
|
|
||||||
'@typescript/typescript-freebsd-x64': 7.0.2
|
|
||||||
'@typescript/typescript-linux-arm': 7.0.2
|
|
||||||
'@typescript/typescript-linux-arm64': 7.0.2
|
|
||||||
'@typescript/typescript-linux-loong64': 7.0.2
|
|
||||||
'@typescript/typescript-linux-mips64el': 7.0.2
|
|
||||||
'@typescript/typescript-linux-ppc64': 7.0.2
|
|
||||||
'@typescript/typescript-linux-riscv64': 7.0.2
|
|
||||||
'@typescript/typescript-linux-s390x': 7.0.2
|
|
||||||
'@typescript/typescript-linux-x64': 7.0.2
|
|
||||||
'@typescript/typescript-netbsd-arm64': 7.0.2
|
|
||||||
'@typescript/typescript-netbsd-x64': 7.0.2
|
|
||||||
'@typescript/typescript-openbsd-arm64': 7.0.2
|
|
||||||
'@typescript/typescript-openbsd-x64': 7.0.2
|
|
||||||
'@typescript/typescript-sunos-x64': 7.0.2
|
|
||||||
'@typescript/typescript-win32-arm64': 7.0.2
|
|
||||||
'@typescript/typescript-win32-x64': 7.0.2
|
|
||||||
|
|
||||||
ufo@1.6.4: {}
|
ufo@1.6.4: {}
|
||||||
|
|
||||||
@@ -4397,7 +4196,7 @@ snapshots:
|
|||||||
|
|
||||||
universalify@2.0.1: {}
|
universalify@2.0.1: {}
|
||||||
|
|
||||||
unplugin-auto-import@0.11.5(@vueuse/core@14.3.0(vue@3.5.34(typescript@7.0.2)))(rollup@4.60.3):
|
unplugin-auto-import@0.11.5(@vueuse/core@14.3.0(vue@3.5.34(typescript@5.9.3)))(rollup@4.60.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@antfu/utils': 0.7.10
|
'@antfu/utils': 0.7.10
|
||||||
'@rollup/pluginutils': 5.3.0(rollup@4.60.3)
|
'@rollup/pluginutils': 5.3.0(rollup@4.60.3)
|
||||||
@@ -4406,7 +4205,7 @@ snapshots:
|
|||||||
unimport: 1.3.0(rollup@4.60.3)
|
unimport: 1.3.0(rollup@4.60.3)
|
||||||
unplugin: 1.16.1
|
unplugin: 1.16.1
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@vueuse/core': 14.3.0(vue@3.5.34(typescript@7.0.2))
|
'@vueuse/core': 14.3.0(vue@3.5.34(typescript@5.9.3))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- rollup
|
- rollup
|
||||||
|
|
||||||
@@ -4465,54 +4264,54 @@ snapshots:
|
|||||||
|
|
||||||
vue-component-type-helpers@3.3.6: {}
|
vue-component-type-helpers@3.3.6: {}
|
||||||
|
|
||||||
vue-i18n@11.4.2(vue@3.5.34(typescript@7.0.2)):
|
vue-i18n@11.4.2(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@intlify/core-base': 11.4.2
|
'@intlify/core-base': 11.4.2
|
||||||
'@intlify/devtools-types': 11.4.2
|
'@intlify/devtools-types': 11.4.2
|
||||||
'@intlify/shared': 11.4.2
|
'@intlify/shared': 11.4.2
|
||||||
'@vue/devtools-api': 6.6.4
|
'@vue/devtools-api': 6.6.4
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
vue-pdf-embed@2.1.6(vue@3.5.34(typescript@7.0.2)):
|
vue-pdf-embed@2.1.6(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
pdfjs-dist: 6.2.108
|
pdfjs-dist: 6.2.108
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
vue-router@4.6.4(vue@3.5.34(typescript@7.0.2)):
|
vue-router@4.6.4(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/devtools-api': 6.6.4
|
'@vue/devtools-api': 6.6.4
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
vue-tsc@3.3.13(typescript@7.0.2):
|
vue-tsc@3.3.13(typescript@5.9.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@volar/typescript': 2.4.28(typescript@7.0.2)
|
'@volar/typescript': 2.4.28(typescript@5.9.3)
|
||||||
'@vue/language-core': 3.3.13
|
'@vue/language-core': 3.3.13
|
||||||
typescript: 7.0.2
|
typescript: 5.9.3
|
||||||
|
|
||||||
vue3-clipboard@1.0.0(vue@3.5.34(typescript@7.0.2)):
|
vue3-clipboard@1.0.0(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
clipboard: 2.0.11
|
clipboard: 2.0.11
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
vue@3.5.34(typescript@7.0.2):
|
vue@3.5.34(typescript@5.9.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/compiler-dom': 3.5.34
|
'@vue/compiler-dom': 3.5.34
|
||||||
'@vue/compiler-sfc': 3.5.34
|
'@vue/compiler-sfc': 3.5.34
|
||||||
'@vue/runtime-dom': 3.5.34
|
'@vue/runtime-dom': 3.5.34
|
||||||
'@vue/server-renderer': 3.5.34(vue@3.5.34(typescript@7.0.2))
|
'@vue/server-renderer': 3.5.34(vue@3.5.34(typescript@5.9.3))
|
||||||
'@vue/shared': 3.5.34
|
'@vue/shared': 3.5.34
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 7.0.2
|
typescript: 5.9.3
|
||||||
|
|
||||||
vuedraggable@4.1.0(vue@3.5.34(typescript@7.0.2)):
|
vuedraggable@4.1.0(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
sortablejs: 1.14.0
|
sortablejs: 1.14.0
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
vuex@4.1.0(vue@3.5.34(typescript@7.0.2)):
|
vuex@4.1.0(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/devtools-api': 6.6.4
|
'@vue/devtools-api': 6.6.4
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
webpack-virtual-modules@0.6.2: {}
|
webpack-virtual-modules@0.6.2: {}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import { execFileSync } from 'node:child_process';
|
||||||
|
import { existsSync, rmSync, statSync } from 'node:fs';
|
||||||
|
import { resolve } from 'node:path';
|
||||||
|
|
||||||
|
const root = process.cwd();
|
||||||
|
const distDir = resolve(root, 'dist');
|
||||||
|
const zipPath = resolve(root, 'dist.zip');
|
||||||
|
|
||||||
|
if (!existsSync(distDir) || !statSync(distDir).isDirectory()) {
|
||||||
|
console.error('[zip-dist] dist 目录不存在,请先完成构建');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (existsSync(zipPath)) {
|
||||||
|
rmSync(zipPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 压缩 dist 内文件到根级(解压即 index.html / assets,便于直接上传部署)
|
||||||
|
execFileSync('zip', ['-qr', zipPath, '.', '-x', '*.DS_Store', '-x', '__MACOSX/*'], {
|
||||||
|
cwd: distDir,
|
||||||
|
stdio: 'inherit',
|
||||||
|
});
|
||||||
|
|
||||||
|
const sizeMb = (statSync(zipPath).size / (1024 * 1024)).toFixed(2);
|
||||||
|
console.log(`[zip-dist] 已生成 ${zipPath}(${sizeMb} MB)`);
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
import { createCrudApi } from './common';
|
||||||
|
import { APPROVE_TIMEOUT } from '@/api/common';
|
||||||
|
import request from '@/axios';
|
||||||
|
|
||||||
|
const baseUrl = '/blade-transport/contract-change';
|
||||||
|
const api = createCrudApi(baseUrl);
|
||||||
|
|
||||||
|
export const getList = api.getList;
|
||||||
|
export const getDetail = api.getDetail;
|
||||||
|
export const submit = api.submit;
|
||||||
|
export const remove = api.remove;
|
||||||
|
|
||||||
|
export const createFromContract = (contractId, changeType) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/create-from-contract`,
|
||||||
|
method: 'post',
|
||||||
|
params: { contractId, changeType },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const saveDraft = row =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/save-draft`,
|
||||||
|
method: 'post',
|
||||||
|
data: row,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const submitApproval = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/submit-approval`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const approve = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/approve`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
timeout: APPROVE_TIMEOUT,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const reject = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/reject`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const withdraw = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/withdraw`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const markSyncStatus = (ids, syncStatus) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/mark-sync-status`,
|
||||||
|
method: 'post',
|
||||||
|
params: { ids, syncStatus },
|
||||||
|
});
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import { createCrudApi } from './common';
|
import { createCrudApi } from './common';
|
||||||
|
import { APPROVE_TIMEOUT } from '@/api/common';
|
||||||
import request from '@/axios';
|
import request from '@/axios';
|
||||||
|
|
||||||
const baseUrl = '/blade-transport/contract-manage';
|
const baseUrl = '/blade-transport/contract-manage';
|
||||||
@@ -36,8 +37,7 @@ export const approve = id =>
|
|||||||
url: `${baseUrl}/approve`,
|
url: `${baseUrl}/approve`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: { id },
|
params: { id },
|
||||||
// 审批通过后同步推送合规(附件转传可达 20s+),覆盖全局 10s 超时
|
timeout: APPROVE_TIMEOUT,
|
||||||
timeout: 120000,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const reject = id =>
|
export const reject = id =>
|
||||||
@@ -93,10 +93,10 @@ export const expireStats = params =>
|
|||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 按合同负责部门预览下一合同编号 */
|
/** 按平台公司 + 业务部门预览下一合同编号 */
|
||||||
export const nextContractNo = organizationId =>
|
export const nextContractNo = (organizationId, platformCompanyId) =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/next-contract-no`,
|
url: `${baseUrl}/next-contract-no`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { organizationId },
|
params: { organizationId, platformCompanyId },
|
||||||
});
|
});
|
||||||
|
|||||||
+39
-2
@@ -2,6 +2,43 @@ import request from '@/axios';
|
|||||||
|
|
||||||
const baseUrl = '/blade-transport/hcs';
|
const baseUrl = '/blade-transport/hcs';
|
||||||
|
|
||||||
|
/** 进程内缓存,避免列表页重复请求推送开关 */
|
||||||
|
let immediateEnabledCache = null;
|
||||||
|
let immediateEnabledPromise = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询 HCS 即时推送开关(thirdParty.hcs.push.immediate-enabled)。
|
||||||
|
* 关闭时项目管理/合同管理隐藏「推送合规」「批量推送合规」。
|
||||||
|
*/
|
||||||
|
export const getPushConfig = () =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/push-config`,
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
|
||||||
|
export const loadHcsImmediateEnabled = () => {
|
||||||
|
if (immediateEnabledCache !== null) {
|
||||||
|
return Promise.resolve(immediateEnabledCache);
|
||||||
|
}
|
||||||
|
if (immediateEnabledPromise) {
|
||||||
|
return immediateEnabledPromise;
|
||||||
|
}
|
||||||
|
immediateEnabledPromise = getPushConfig()
|
||||||
|
.then(res => {
|
||||||
|
const data = res?.data?.data ?? res?.data ?? {};
|
||||||
|
immediateEnabledCache = data.immediateEnabled === true || data.immediateEnabled === 'true';
|
||||||
|
return immediateEnabledCache;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
immediateEnabledCache = false;
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
immediateEnabledPromise = null;
|
||||||
|
});
|
||||||
|
return immediateEnabledPromise;
|
||||||
|
};
|
||||||
|
|
||||||
// 合规推送涉及 HCS 远程多次调用(风险校验+附件转传+起草),可达 20s+,覆盖全局 10s 超时
|
// 合规推送涉及 HCS 远程多次调用(风险校验+附件转传+起草),可达 20s+,覆盖全局 10s 超时
|
||||||
export const repush = (bizType, id) =>
|
export const repush = (bizType, id) =>
|
||||||
request({
|
request({
|
||||||
@@ -32,11 +69,11 @@ export const refreshMasterData = () =>
|
|||||||
timeout: 60000,
|
timeout: 60000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const getRisk = customerCode =>
|
export const getRisk = (customerCode, creditCode, customerName) =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/risk`,
|
url: `${baseUrl}/risk`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { customerCode },
|
params: { customerCode, creditCode, customerName },
|
||||||
timeout: 30000,
|
timeout: 30000,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -24,11 +24,16 @@ export const getDetail = id =>
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const getCarrierContracts = projectIds =>
|
export const getCarrierContracts = (projectIds, waybillIds = []) =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/carrier-contracts`,
|
url: `${baseUrl}/carrier-contracts`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { projectIds: (projectIds || []).join(',') },
|
params: {
|
||||||
|
projectIds: (projectIds || []).join(','),
|
||||||
|
...(waybillIds || []).filter(Boolean).length
|
||||||
|
? { waybillIds: (waybillIds || []).filter(Boolean).join(',') }
|
||||||
|
: {},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const saveDraft = row =>
|
export const saveDraft = row =>
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
import { createCrudApi } from './common';
|
||||||
|
import { APPROVE_TIMEOUT } from '@/api/common';
|
||||||
|
import request from '@/axios';
|
||||||
|
|
||||||
|
const baseUrl = '/blade-transport/project-change';
|
||||||
|
const api = createCrudApi(baseUrl);
|
||||||
|
|
||||||
|
export const getList = api.getList;
|
||||||
|
export const getDetail = api.getDetail;
|
||||||
|
export const submit = api.submit;
|
||||||
|
export const remove = api.remove;
|
||||||
|
|
||||||
|
export const createFromProject = (projectId, changeType) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/create-from-project`,
|
||||||
|
method: 'post',
|
||||||
|
params: { projectId, changeType },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const saveDraft = row =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/save-draft`,
|
||||||
|
method: 'post',
|
||||||
|
data: row,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const submitApproval = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/submit-approval`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const approve = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/approve`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
timeout: APPROVE_TIMEOUT,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const reject = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/reject`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const withdraw = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/withdraw`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
@@ -14,7 +14,7 @@ export const cancel = api.cancel;
|
|||||||
export const reassign = api.reassign;
|
export const reassign = api.reassign;
|
||||||
export const complete = api.complete;
|
export const complete = api.complete;
|
||||||
export const batchComplete = api.batchComplete;
|
export const batchComplete = api.batchComplete;
|
||||||
/** 确认回单:待确认回单运单完成后转为已完成 */
|
/** 确认回单:回单节点配成「需业务员确认」时用;后端校验司机打卡节点齐全且无未了结异常后才置完成 */
|
||||||
export const confirmReturn = id =>
|
export const confirmReturn = id =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/confirm-return`,
|
url: `${baseUrl}/confirm-return`,
|
||||||
@@ -95,3 +95,5 @@ export const exportImportFailures = data =>
|
|||||||
});
|
});
|
||||||
export const confirmImport = data =>
|
export const confirmImport = data =>
|
||||||
request({ url: `${baseUrl}/import-batch/confirm`, method: 'post', data, timeout: 120000 });
|
request({ url: `${baseUrl}/import-batch/confirm`, method: 'post', data, timeout: 120000 });
|
||||||
|
export const checkImportDuplicates = data =>
|
||||||
|
request({ url: `${baseUrl}/import-batch/duplicates`, method: 'post', data, timeout: 120000 });
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ import request from '@/axios';
|
|||||||
import { ElLoading, ElMessage } from 'element-plus';
|
import { ElLoading, ElMessage } from 'element-plus';
|
||||||
|
|
||||||
/** 审核按钮统一超时:审批通过后可能同步推送金蝶等耗时操作,覆盖全局 10s */
|
/** 审核按钮统一超时:审批通过后可能同步推送金蝶等耗时操作,覆盖全局 10s */
|
||||||
export const APPROVE_TIMEOUT = 30000;
|
export const APPROVE_TIMEOUT = 60 * 1000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件流返回
|
* 文件流返回
|
||||||
|
|||||||
@@ -38,6 +38,15 @@ export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'p
|
|||||||
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
||||||
export const pushKingdee = ids =>
|
export const pushKingdee = ids =>
|
||||||
request({ url: `${baseUrl}/push-kingdee`, method: 'post', timeout: 30000, data: ids });
|
request({ url: `${baseUrl}/push-kingdee`, method: 'post', timeout: 30000, data: ids });
|
||||||
|
// 先票后款:发票明细查询(收票登记明细区块按票号带出发票明细行)
|
||||||
|
export const invoiceDetailQuery = invoiceNo =>
|
||||||
|
request({ url: `${baseUrl}/invoice-detail-query`, method: 'get', params: { invoiceNo } });
|
||||||
|
// 先票后款:结算单认领收票单候选分页(审批通过且未被有效应付结算单认领)
|
||||||
|
export const claimCandidates = params =>
|
||||||
|
request({ url: `${baseUrl}/claim-candidates`, method: 'get', params });
|
||||||
|
// 先票后款:结算单已认领收票登记列表(发票登记对话框回显已认领票)
|
||||||
|
export const claimedReceipts = formalSettlementId =>
|
||||||
|
request({ url: `${baseUrl}/claimed-list`, method: 'get', params: { formalSettlementId } });
|
||||||
|
|
||||||
export const approvalStatusOptions = [
|
export const approvalStatusOptions = [
|
||||||
{ label: '草稿', value: 'draft' },
|
{ label: '草稿', value: 'draft' },
|
||||||
|
|||||||
@@ -27,13 +27,22 @@ export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'p
|
|||||||
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
||||||
// 同步金蝶涉及多次金蝶远程接口调用(A103-2 预检 + A103-1/A103-3 推送),单笔可达 20s+,覆盖全局 10s 超时
|
// 同步金蝶涉及多次金蝶远程接口调用(A103-2 预检 + A103-1/A103-3 推送),单笔可达 20s+,覆盖全局 10s 超时
|
||||||
export const syncKingdee = id =>
|
export const syncKingdee = id =>
|
||||||
request({ url: `${baseUrl}/sync-kingdee`, method: 'post', timeout: 30000, params: { id } });
|
request({ url: `${baseUrl}/sync-kingdee`, method: 'post', timeout: APPROVE_TIMEOUT, params: { id } });
|
||||||
// 批量同步逐单单据级事务串行推送,耗时随单量线性增长
|
// 批量同步逐单单据级事务串行推送,耗时随单量线性增长
|
||||||
export const syncKingdeeBatch = ids =>
|
export const syncKingdeeBatch = ids =>
|
||||||
request({ url: `${baseUrl}/sync-kingdee-batch`, method: 'post', timeout: 30000, data: ids });
|
request({ url: `${baseUrl}/sync-kingdee-batch`, method: 'post', timeout: APPROVE_TIMEOUT, data: ids });
|
||||||
// 回写任务按 paymentNo 分批远程查询 A103-2/A103-4,同样可能超过全局超时
|
// 回写任务按 paymentNo 分批远程查询 A103-2/A103-4,同样可能超过全局超时
|
||||||
export const syncKingdeeResult = () =>
|
export const syncKingdeeResult = () =>
|
||||||
request({ url: `${baseUrl}/sync-kingdee-result`, method: 'post', timeout: 30000 });
|
request({ url: `${baseUrl}/sync-kingdee-result`, method: 'post', timeout: APPROVE_TIMEOUT });
|
||||||
|
// 付款记录付款凭证下载(后端代理 A801-2 流式回源),耗时较普通接口长,放宽到 120s
|
||||||
|
export const downloadRecordVoucher = recordId =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/record/download-voucher`,
|
||||||
|
method: 'get',
|
||||||
|
params: { recordId },
|
||||||
|
responseType: 'blob',
|
||||||
|
timeout: 120000,
|
||||||
|
});
|
||||||
|
|
||||||
export const paymentTypeOptions = [
|
export const paymentTypeOptions = [
|
||||||
{ label: '项目预付', value: 'project_advance' },
|
{ label: '项目预付', value: 'project_advance' },
|
||||||
|
|||||||
@@ -8,20 +8,12 @@ export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get'
|
|||||||
export const updateAttachments = data =>
|
export const updateAttachments = data =>
|
||||||
request({ url: `${baseUrl}/attachments`, method: 'post', data });
|
request({ url: `${baseUrl}/attachments`, method: 'post', data });
|
||||||
export const voidClaim = id => request({ url: `${baseUrl}/void`, method: 'post', params: { id } });
|
export const voidClaim = id => request({ url: `${baseUrl}/void`, method: 'post', params: { id } });
|
||||||
export const queryKingdeeResult = () =>
|
|
||||||
request({ url: `${baseUrl}/query-kingdee-result`, method: 'post' });
|
|
||||||
|
|
||||||
export const claimStatusOptions = [
|
export const claimStatusOptions = [
|
||||||
{ label: '已认领', value: 'claimed' },
|
{ label: '已认领', value: 'claimed' },
|
||||||
{ label: '已作废', value: 'voided' },
|
{ label: '已作废', value: 'voided' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const pushStatusOptions = [
|
|
||||||
{ label: '未推送', value: 'none' },
|
|
||||||
{ label: '已推送', value: 'pushed' },
|
|
||||||
{ label: '推送失败', value: 'failed' },
|
|
||||||
];
|
|
||||||
|
|
||||||
export const kingdeeBillStatusOptions = [
|
export const kingdeeBillStatusOptions = [
|
||||||
{ label: '未生成', value: 'none' },
|
{ label: '未生成', value: 'none' },
|
||||||
{ label: '已推送', value: 'pushed' },
|
{ label: '已推送', value: 'pushed' },
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ import request from '@/axios';
|
|||||||
|
|
||||||
const baseUrl = '/blade-transport/receipt-flow';
|
const baseUrl = '/blade-transport/receipt-flow';
|
||||||
|
|
||||||
|
/** 收款流水同步需远程拉取金蝶收款单并逐条落库,覆盖全局 10s 超时 */
|
||||||
|
export const SYNC_TIMEOUT = 30000;
|
||||||
|
|
||||||
export const getList = (current, size, params) =>
|
export const getList = (current, size, params) =>
|
||||||
request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
|
request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
|
||||||
export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
|
export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
|
||||||
@@ -12,9 +15,7 @@ export const getSettlementCandidates = (keyword, flowId) =>
|
|||||||
params: { keyword, flowId },
|
params: { keyword, flowId },
|
||||||
});
|
});
|
||||||
export const claim = data => request({ url: `${baseUrl}/claim`, method: 'post', data });
|
export const claim = data => request({ url: `${baseUrl}/claim`, method: 'post', data });
|
||||||
export const sync = () => request({ url: `${baseUrl}/sync`, method: 'post' });
|
export const sync = () => request({ url: `${baseUrl}/sync`, method: 'post', timeout: SYNC_TIMEOUT });
|
||||||
export const pushKingdee = flowId =>
|
|
||||||
request({ url: `${baseUrl}/push-kingdee`, method: 'post', params: { flowId } });
|
|
||||||
|
|
||||||
export const claimStatusOptions = [
|
export const claimStatusOptions = [
|
||||||
{ label: '未认领', value: 'unclaimed' },
|
{ label: '未认领', value: 'unclaimed' },
|
||||||
@@ -22,12 +23,6 @@ export const claimStatusOptions = [
|
|||||||
{ label: '认领完成', value: 'claimed' },
|
{ label: '认领完成', value: 'claimed' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const pushStatusOptions = [
|
|
||||||
{ label: '未推送', value: 'none' },
|
|
||||||
{ label: '已推送', value: 'pushed' },
|
|
||||||
{ label: '推送失败', value: 'failed' },
|
|
||||||
];
|
|
||||||
|
|
||||||
export const kingdeeBillStatusOptions = [
|
export const kingdeeBillStatusOptions = [
|
||||||
{ label: '已推送', value: 'pushed' },
|
{ label: '已推送', value: 'pushed' },
|
||||||
{ label: '审核通过', value: 'approved' },
|
{ label: '审核通过', value: 'approved' },
|
||||||
|
|||||||
@@ -58,5 +58,21 @@ export const applyPayments = data =>
|
|||||||
request({ url: `${baseUrl}/apply-payments`, method: 'post', data });
|
request({ url: `${baseUrl}/apply-payments`, method: 'post', data });
|
||||||
export const claimInvoices = data =>
|
export const claimInvoices = data =>
|
||||||
request({ url: `${baseUrl}/claim-invoices`, method: 'post', data });
|
request({ url: `${baseUrl}/claim-invoices`, method: 'post', data });
|
||||||
|
// 先票后款:发票登记确认推送(认领收票单逐单 A302-6 指定应付),涉及多次金蝶远程调用,覆盖全局超时
|
||||||
|
export const invoiceAssignKingdee = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/invoice-assign-kingdee`,
|
||||||
|
method: 'post',
|
||||||
|
timeout: 30000,
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
// 先票后款:查看页重推认领收票单(收票单A303-2+指定应付A302-6 一步式),涉及多次金蝶远程调用,覆盖全局超时
|
||||||
|
export const repushClaimedInvoice = (id, invoiceNo, matchedAmount) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/repush-claimed-invoice`,
|
||||||
|
method: 'post',
|
||||||
|
timeout: 30000,
|
||||||
|
params: { id, invoiceNo, matchedAmount },
|
||||||
|
});
|
||||||
export const queryInvoicePool = params =>
|
export const queryInvoicePool = params =>
|
||||||
request({ url: `${baseUrl}/invoice-pool`, method: 'get', params });
|
request({ url: `${baseUrl}/invoice-pool`, method: 'get', params });
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import request from '@/axios';
|
||||||
|
|
||||||
|
const baseUrl = '/blade-system/business-dept-config';
|
||||||
|
|
||||||
|
export const getList = (current, size, params) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/list`,
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
current,
|
||||||
|
size,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export const getDetail = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/detail`,
|
||||||
|
method: 'get',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const submit = row =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/submit`,
|
||||||
|
method: 'post',
|
||||||
|
data: row,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const remove = ids =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/remove`,
|
||||||
|
method: 'post',
|
||||||
|
params: { ids },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const getByPlatformDept = (platformCompanyId, businessDeptId) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/by-platform-dept`,
|
||||||
|
method: 'get',
|
||||||
|
params: { platformCompanyId, businessDeptId },
|
||||||
|
});
|
||||||
@@ -12,6 +12,7 @@ export const MK_SUBMIT_TIMEOUT = 30000;
|
|||||||
* @param {string} data.bizId 业务主键(后端生成/复用 formInstanceId)
|
* @param {string} data.bizId 业务主键(后端生成/复用 formInstanceId)
|
||||||
* @param {string} [data.subject] 流程标题
|
* @param {string} [data.subject] 流程标题
|
||||||
* @param {string} [data.bizType] 业务类型
|
* @param {string} [data.bizType] 业务类型
|
||||||
|
* @param {Object} [data.tempVarData] MK 临时变量(如 { projectType })
|
||||||
*/
|
*/
|
||||||
export const processSubmit = data => {
|
export const processSubmit = data => {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import request from '@/axios';
|
||||||
|
|
||||||
|
export const getRoleMenuDataScopeTree = roleId => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/role-menu-data-scope/tree',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
roleId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const submitRoleMenuDataScope = data => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/role-menu-data-scope/submit',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -91,3 +91,14 @@ export const recognizeBaiduOcr = (imageUrl, type, side = '') => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const recognizeQualificationCertificateOcr = imageUrl => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-transport/baidu-ocr/qualification-certificate',
|
||||||
|
method: 'post',
|
||||||
|
timeout: 60000,
|
||||||
|
params: {
|
||||||
|
imageUrl,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -152,6 +152,34 @@ export const getScoreTemplate = quantificationId => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** 线下评分 Excel 模板下载 */
|
||||||
|
export const downloadScoreExcelTemplate = quantificationId => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-transport/customer-archive/score-excel-template',
|
||||||
|
method: 'get',
|
||||||
|
responseType: 'blob',
|
||||||
|
params: {
|
||||||
|
quantificationId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 线下评分 Excel 导入(成功返回评分明细 JSON;失败返回失败明细 Excel 流) */
|
||||||
|
export const importScoreExcel = (quantificationId, file) => {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
return request({
|
||||||
|
url: '/blade-transport/customer-archive/score-import',
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
responseType: 'blob',
|
||||||
|
timeout: 60000,
|
||||||
|
params: {
|
||||||
|
quantificationId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const queryKingdeeCustomer = creditCode => {
|
export const queryKingdeeCustomer = creditCode => {
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-transport/bfi/customer/query-by-credit-code',
|
url: '/blade-transport/bfi/customer/query-by-credit-code',
|
||||||
@@ -163,6 +191,42 @@ export const queryKingdeeCustomer = creditCode => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 金蝶供应商编码查询(A901-1):新增客商填写信用代码后即时回显
|
||||||
|
export const querySupplierCode = creditCode => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-transport/customer-archive/query-supplier-code',
|
||||||
|
method: 'get',
|
||||||
|
timeout: 30000,
|
||||||
|
params: {
|
||||||
|
creditCode,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 金蝶开户行查询(A905-3):收款信息填写开户行失焦后精确匹配带出联行号
|
||||||
|
export const queryKingdeeBank = bankName => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-transport/customer-archive/query-bank',
|
||||||
|
method: 'get',
|
||||||
|
timeout: 30000,
|
||||||
|
params: {
|
||||||
|
bankName,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 金蝶联行号校验(A905-3):收款信息保存前按联行号精确匹配,查不到不允许保存
|
||||||
|
export const queryKingdeeBankByNumber = cnapsCode => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-transport/customer-archive/query-bank-by-number',
|
||||||
|
method: 'get',
|
||||||
|
timeout: 30000,
|
||||||
|
params: {
|
||||||
|
cnapsCode,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const syncKingdee = id => {
|
export const syncKingdee = id => {
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-transport/customer-archive/sync-kingdee',
|
url: '/blade-transport/customer-archive/sync-kingdee',
|
||||||
@@ -176,12 +240,11 @@ export const syncKingdee = id => {
|
|||||||
|
|
||||||
export const recognizeBusinessLicenseOcr = imageUrl => {
|
export const recognizeBusinessLicenseOcr = imageUrl => {
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-transport/baidu-ocr/recognize-url',
|
url: '/blade-transport/baidu-ocr/business-license',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
timeout: 60000,
|
timeout: 60000,
|
||||||
params: {
|
params: {
|
||||||
imageUrl,
|
imageUrl,
|
||||||
type: 'business_license',
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="visible" :title="title" width="92%" append-to-body destroy-on-close @open="handleOpen">
|
<el-dialog v-model="visible" :title="title" width="92%" append-to-body align-center destroy-on-close @open="handleOpen">
|
||||||
<el-form :model="query" inline label-width="130px" @submit.prevent>
|
<el-form class="kingdee-pool-dialog__form" :model="query" inline label-position="right" label-width="120px" @submit.prevent>
|
||||||
<el-form-item label="发票号码">
|
<el-form-item label="发票号码">
|
||||||
<el-input v-model="query.invoiceNo" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="query.invoiceNo" clearable placeholder="请输入" @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="开票日期">
|
<el-form-item label="开票日期">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -10,15 +10,16 @@
|
|||||||
type="daterange"
|
type="daterange"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
start-placeholder="开始日期"
|
range-separator="-"
|
||||||
end-placeholder="结束日期"
|
start-placeholder="请选择"
|
||||||
|
end-placeholder="请选择"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="开票单位">
|
<el-form-item label="开票单位">
|
||||||
<el-input v-model="query.salerName" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="query.salerName" clearable placeholder="请输入" @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="受票单位">
|
<el-form-item label="受票单位">
|
||||||
<el-input v-model="query.buyerName" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="query.buyerName" clearable placeholder="请输入" @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="开票单位(销方)">
|
<el-form-item label="开票单位(销方)">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -93,6 +94,9 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button :disabled="loading" @click="resetQuery">重置</el-button>
|
<el-button :disabled="loading" @click="resetQuery">重置</el-button>
|
||||||
<el-button type="primary" :disabled="loading" @click="handleQuery">查询</el-button>
|
<el-button type="primary" :disabled="loading" @click="handleQuery">查询</el-button>
|
||||||
|
<el-tooltip content="按名称检索范围为已同步票,未找到请改用发票号码或税号精确查找" placement="top">
|
||||||
|
<el-icon class="kingdee-pool-dialog__query-tip"><QuestionFilled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -101,7 +105,7 @@
|
|||||||
:data="rows"
|
:data="rows"
|
||||||
:row-key="rowKey"
|
:row-key="rowKey"
|
||||||
border
|
border
|
||||||
height="520"
|
max-height="50vh"
|
||||||
:highlight-current-row="!multiple"
|
:highlight-current-row="!multiple"
|
||||||
@selection-change="selection => (selected = selection)"
|
@selection-change="selection => (selected = selection)"
|
||||||
@row-dblclick="handleRowDblclick"
|
@row-dblclick="handleRowDblclick"
|
||||||
@@ -118,6 +122,7 @@
|
|||||||
</el-radio>
|
</el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column type="index" label="序号" width="70" align="center" :index="indexMethod" />
|
||||||
<el-table-column prop="invoiceNo" label="发票号码" min-width="180" />
|
<el-table-column prop="invoiceNo" label="发票号码" min-width="180" />
|
||||||
<el-table-column prop="invoiceDate" label="开票日期" min-width="120" />
|
<el-table-column prop="invoiceDate" label="开票日期" min-width="120" />
|
||||||
<el-table-column prop="invoiceType" label="发票类型" min-width="140" />
|
<el-table-column prop="invoiceType" label="发票类型" min-width="140" />
|
||||||
@@ -172,8 +177,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="kingdee-pool-dialog__pager">
|
<div class="kingdee-pool-dialog__pagination">
|
||||||
<span class="kingdee-pool-dialog__pager-tip">按名称检索范围为已同步票,未找到请改用发票号码或税号精确查找</span>
|
<span class="kingdee-pool-dialog__pagination-tip">按名称检索范围为已同步票,未找到请改用发票号码或税号精确查找</span>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
v-model:current-page="page.current"
|
v-model:current-page="page.current"
|
||||||
v-model:page-size="page.size"
|
v-model:page-size="page.size"
|
||||||
@@ -323,6 +328,9 @@ export default {
|
|||||||
this.page.current = 1;
|
this.page.current = 1;
|
||||||
this.load();
|
this.load();
|
||||||
},
|
},
|
||||||
|
indexMethod(index) {
|
||||||
|
return (this.page.current - 1) * this.page.size + index + 1;
|
||||||
|
},
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = this.emptyQuery();
|
this.query = this.emptyQuery();
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
@@ -420,15 +428,28 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.kingdee-pool-dialog__pager {
|
.kingdee-pool-dialog__form {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
padding: 12px 12px 4px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
.kingdee-pool-dialog__pagination {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-top: 12px;
|
padding: 16px 0;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
.kingdee-pool-dialog__pager-tip {
|
.kingdee-pool-dialog__pagination-tip {
|
||||||
color: #909399;
|
color: #909399;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.kingdee-pool-dialog__query-tip {
|
||||||
|
margin-left: 8px;
|
||||||
|
color: #909399;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { getDeptTree } from '@/api/system/dept';
|
import { getDeptTree, getPlatformCompanySelect } from '@/api/system/dept';
|
||||||
import { ElCascader } from 'element-plus';
|
import { ElCascader } from 'element-plus';
|
||||||
import { h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
@@ -12,6 +12,12 @@ import { h } from 'vue';
|
|||||||
* 1. 混入本 mixin:mixins: [organizationSearch]
|
* 1. 混入本 mixin:mixins: [organizationSearch]
|
||||||
* 2. option 中「所属组织」列加上 searchslot: true(prop 为 organizationName 或 deptName 均可)
|
* 2. option 中「所属组织」列加上 searchslot: true(prop 为 organizationName 或 deptName 均可)
|
||||||
* 3. 在 created / 初始化时调用 this.loadOrganizationOptions()
|
* 3. 在 created / 初始化时调用 this.loadOrganizationOptions()
|
||||||
|
* 4. 需要「未分配组织」筛选项的页面在 data 里置 enableUnassignedOrgFilter: true;
|
||||||
|
* 该项只追加进搜索树 organizationSearchTreeOptions,表单级联 organizationTreeOptions 不含哨兵
|
||||||
|
* 5. 表单「所属组织」只允许选平台公司的页面(运力管理)在 data 里置
|
||||||
|
* restrictFormOrgToPlatformCompany: true,表单级联样式改用
|
||||||
|
* buildFormOrganizationTree(...) 的结果,并在打开表单时把回显的组织名写进
|
||||||
|
* formOrganizationLegacyName;只影响表单,搜索栏仍是全量组织
|
||||||
*
|
*
|
||||||
* 说明:
|
* 说明:
|
||||||
* - 自动识别 organizationName / deptName 两种 prop,并挂载 column.renderSearch
|
* - 自动识别 organizationName / deptName 两种 prop,并挂载 column.renderSearch
|
||||||
@@ -26,6 +32,17 @@ import { h } from 'vue';
|
|||||||
*/
|
*/
|
||||||
const ORG_PROPS = ['organizationName', 'deptName'];
|
const ORG_PROPS = ['organizationName', 'deptName'];
|
||||||
|
|
||||||
|
// 「未分配组织」筛选项的哨兵值:不是真实组织名,选中后提交给后端的就是这串字面量。
|
||||||
|
// 后端 TransportBusiConstant.UNASSIGNED_ORG_FILTER、DriverMapper.xml / TransportVehicleMapper.xml
|
||||||
|
// 的 organizationName 分支以及司机、车辆导出查询都按它改判为 organization_name = '';
|
||||||
|
// 后端换成空串会让整段组织条件不生效,筛选静默失效。前端与后端这几处必须同步修改。
|
||||||
|
const UNASSIGNED_ORG_FILTER = '__UNASSIGNED_ORG__';
|
||||||
|
|
||||||
|
// 表单「所属组织」限定只能选平台公司时,存量记录里的旧组织名在组织树里已经找不到
|
||||||
|
// (节点被删或改名),用这个 id 补一个只读节点,否则编辑老数据时所属组织显示为空、
|
||||||
|
// 保存即把原值丢掉。
|
||||||
|
const FORM_LEGACY_ORG_ID = '__LEGACY_ORG__';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -34,12 +51,32 @@ export default {
|
|||||||
organizationTreeOptions: [],
|
organizationTreeOptions: [],
|
||||||
organizationTreeFlatOptions: [],
|
organizationTreeFlatOptions: [],
|
||||||
organizationLoading: false,
|
organizationLoading: false,
|
||||||
|
// 组织筛选是否追加「未分配组织」一项;页面在 data 里覆盖为 true 才生效
|
||||||
|
enableUnassignedOrgFilter: false,
|
||||||
|
// 表单「所属组织」是否只允许选平台公司;页面在 data 里覆盖为 true 才生效
|
||||||
|
restrictFormOrgToPlatformCompany: false,
|
||||||
|
// 平台公司部门 id(字符串),loadOrganizationOptions 时一并拉取
|
||||||
|
platformCompanyOrgIds: [],
|
||||||
|
// 表单当前回显的组织名,树里没有同名节点时用它补一个只读选项
|
||||||
|
formOrganizationLegacyName: '',
|
||||||
|
// 进行中的组织数据请求,并发调用共用(不是响应式状态,只做去重)
|
||||||
|
organizationOptionsPromise: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 所属组织级联配置:checkStrictly 允许选中任意层级,不必选到末级
|
// 搜索栏级联的选项:开关打开时在真实组织最前面追加「未分配组织」。
|
||||||
|
// 不能直接改 organizationTreeOptions——司机/车辆页的编辑表单也用这棵树选组织。
|
||||||
|
organizationSearchTreeOptions() {
|
||||||
|
return this.enableUnassignedOrgFilter
|
||||||
|
? [this.unassignedOrgOption(), ...this.organizationTreeOptions]
|
||||||
|
: this.organizationTreeOptions;
|
||||||
|
},
|
||||||
|
// 所属组织级联配置:checkStrictly 允许选中任意层级,不必选到末级。
|
||||||
|
// 限定只能选平台公司时用 disabled 函数只放开平台公司:非平台公司的非末级节点
|
||||||
|
// 在 checkStrictly 下仍可展开(el-cascader 的 expandable 判断),末级节点点击无效,
|
||||||
|
// 两者都选不中。disabled 在节点渲染时求值,平台公司 id 到手后节点会自行重算。
|
||||||
organizationCascaderProps() {
|
organizationCascaderProps() {
|
||||||
return {
|
const props = {
|
||||||
value: 'id',
|
value: 'id',
|
||||||
label: 'label',
|
label: 'label',
|
||||||
children: 'children',
|
children: 'children',
|
||||||
@@ -47,21 +84,31 @@ export default {
|
|||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
expandTrigger: 'click',
|
expandTrigger: 'click',
|
||||||
};
|
};
|
||||||
|
if (this.restrictFormOrgToPlatformCompany) {
|
||||||
|
props.disabled = data => this.platformCompanyOrgDisabled(data);
|
||||||
|
}
|
||||||
|
return props;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadOrganizationOptions() {
|
loadOrganizationOptions() {
|
||||||
if (this.organizationLoading) return;
|
// 并发调用共用同一次请求,返回的 Promise 在数据就绪后才 resolve
|
||||||
|
if (this.organizationOptionsPromise) return this.organizationOptionsPromise;
|
||||||
this.organizationLoading = true;
|
this.organizationLoading = true;
|
||||||
const tenantId = this.userInfo?.tenantId;
|
const tenantId = this.userInfo?.tenantId;
|
||||||
getDeptTree(tenantId)
|
// 平台公司下拉失败不能拖垮组织树,单独兜住,失败时保持上一次的可选范围
|
||||||
.then(res => {
|
const platformCompanyRequest = this.restrictFormOrgToPlatformCompany
|
||||||
|
? getPlatformCompanySelect().catch(() => null)
|
||||||
|
: Promise.resolve(null);
|
||||||
|
this.organizationOptionsPromise = Promise.all([getDeptTree(tenantId), platformCompanyRequest])
|
||||||
|
.then(([res, platformRes]) => {
|
||||||
|
this.applyPlatformCompanyOptions(platformRes);
|
||||||
const source = res.data?.data || res.data || [];
|
const source = res.data?.data || res.data || [];
|
||||||
const tree = this.excludeExternalOrganization
|
const tree = this.excludeExternalOrganization
|
||||||
? this.excludeExternalOrganization(source)
|
? this.excludeExternalOrganization(source)
|
||||||
: source;
|
: source;
|
||||||
this.organizationTreeOptions = this.normalizeOrgTree(tree);
|
this.organizationTreeOptions = this.normalizeOrgTree(tree);
|
||||||
this.organizationTreeFlatOptions = this.flattenOrgTree(this.organizationTreeOptions);
|
this.organizationTreeFlatOptions = this.flattenOrgTree(this.organizationSearchTreeOptions);
|
||||||
const option = this.tableOption || this.option;
|
const option = this.tableOption || this.option;
|
||||||
if (!option) return;
|
if (!option) return;
|
||||||
ORG_PROPS.forEach(prop => {
|
ORG_PROPS.forEach(prop => {
|
||||||
@@ -73,7 +120,21 @@ export default {
|
|||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.organizationLoading = false;
|
this.organizationLoading = false;
|
||||||
|
this.organizationOptionsPromise = null;
|
||||||
});
|
});
|
||||||
|
return this.organizationOptionsPromise;
|
||||||
|
},
|
||||||
|
// 组织树与平台公司列表就绪后执行回调;已加载过则立即执行
|
||||||
|
whenOrganizationOptionsReady(callback) {
|
||||||
|
const pending = this.organizationTreeFlatOptions.length
|
||||||
|
? Promise.resolve()
|
||||||
|
: this.loadOrganizationOptions();
|
||||||
|
return Promise.resolve(pending).then(callback, () => callback());
|
||||||
|
},
|
||||||
|
applyPlatformCompanyOptions(res) {
|
||||||
|
if (!res) return;
|
||||||
|
const list = res.data?.data || res.data || [];
|
||||||
|
this.platformCompanyOrgIds = (Array.isArray(list) ? list : []).map(item => String(item.id));
|
||||||
},
|
},
|
||||||
// 默认排除「外部组织」节点;页面可覆盖
|
// 默认排除「外部组织」节点;页面可覆盖
|
||||||
excludeExternalOrganization(tree = []) {
|
excludeExternalOrganization(tree = []) {
|
||||||
@@ -100,12 +161,20 @@ export default {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 哨兵节点的 id 与 rawLabel 都取哨兵值,resolveOrgName 取到的仍是哨兵而不是某个真实组织名
|
||||||
|
unassignedOrgOption() {
|
||||||
|
return { id: UNASSIGNED_ORG_FILTER, label: '未分配组织', rawLabel: UNASSIGNED_ORG_FILTER };
|
||||||
|
},
|
||||||
flattenOrgTree(tree = []) {
|
flattenOrgTree(tree = []) {
|
||||||
return (tree || []).flatMap(item => [
|
return (tree || []).flatMap(item => [
|
||||||
{ id: String(item.id), label: item.label, rawLabel: item.rawLabel },
|
{ id: String(item.id), label: item.label, rawLabel: item.rawLabel },
|
||||||
...this.flattenOrgTree(item.children || []),
|
...this.flattenOrgTree(item.children || []),
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
|
// 组织列渲染用:空串或纯空白即「未分配组织」(组织列 NOT NULL,无组织存空串)
|
||||||
|
isBlankOrganizationName(value) {
|
||||||
|
return String(value ?? '').trim() === '';
|
||||||
|
},
|
||||||
// 兼容两种入参:级联路径数组(取末级)或单个部门 id
|
// 兼容两种入参:级联路径数组(取末级)或单个部门 id
|
||||||
findOrgById(id) {
|
findOrgById(id) {
|
||||||
const value = Array.isArray(id) ? id.at(-1) : id;
|
const value = Array.isArray(id) ? id.at(-1) : id;
|
||||||
@@ -118,7 +187,9 @@ export default {
|
|||||||
for (const node of tree || []) {
|
for (const node of tree || []) {
|
||||||
const path = [...parents, String(node.id)];
|
const path = [...parents, String(node.id)];
|
||||||
if (String(node.id) === String(target)) return path;
|
if (String(node.id) === String(target)) return path;
|
||||||
const matched = this.findOrgPath(target, node.children, path);
|
// 必须显式传 node.children || []:叶节点的 children 是 undefined,
|
||||||
|
// 传 undefined 会触发默认参数重新拿到整棵树,逐层重复扫描直到爆栈
|
||||||
|
const matched = this.findOrgPath(target, node.children || [], path);
|
||||||
if (matched) return matched;
|
if (matched) return matched;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -127,6 +198,52 @@ export default {
|
|||||||
findOrgName(id) {
|
findOrgName(id) {
|
||||||
return this.findOrgById(id)?.rawLabel || '';
|
return this.findOrgById(id)?.rawLabel || '';
|
||||||
},
|
},
|
||||||
|
// 级联节点的 disabled 判定:只有平台公司可选。页面自建 props 时也复用它
|
||||||
|
platformCompanyOrgDisabled(data) {
|
||||||
|
return !this.platformCompanyOrgIds.includes(String(data?.id ?? ''));
|
||||||
|
},
|
||||||
|
// 组织名对应的节点是否为平台公司;名称在树里不存在时按「不是」处理
|
||||||
|
isPlatformCompanyOrgName(name) {
|
||||||
|
const value = String(name ?? '').trim();
|
||||||
|
if (!value) return false;
|
||||||
|
const node = this.organizationTreeFlatOptions.find(item => item.rawLabel === value);
|
||||||
|
return !!node && this.platformCompanyOrgIds.includes(String(node.id));
|
||||||
|
},
|
||||||
|
// 新增表单的默认组织:只有落在平台公司上才预填,否则留空(不能让用户从默认值
|
||||||
|
// 直接带出一个选不中的组织名)
|
||||||
|
defaultFormOrganizationName(name) {
|
||||||
|
return this.isPlatformCompanyOrgName(name) ? String(name).trim() : '';
|
||||||
|
},
|
||||||
|
// 表单级联的选项树:限定平台公司时,把回显的原组织名补成一个只读节点,
|
||||||
|
// 否则存量记录的组织在树里找不到,编辑时显示为空、保存即丢原值
|
||||||
|
buildFormOrganizationTree(tree = this.organizationTreeOptions) {
|
||||||
|
const source = tree || [];
|
||||||
|
if (!this.restrictFormOrgToPlatformCompany) return source;
|
||||||
|
const name = String(this.formOrganizationLegacyName || '').trim();
|
||||||
|
if (!name) return source;
|
||||||
|
if (this.organizationTreeFlatOptions.some(item => item.rawLabel === name)) return source;
|
||||||
|
return [...source, { id: FORM_LEGACY_ORG_ID, label: name, rawLabel: name }];
|
||||||
|
},
|
||||||
|
// 表单级联回显用的路径:树里有该组织就用真实路径,否则落到原组织兜底节点
|
||||||
|
resolveFormOrgPath(name) {
|
||||||
|
const path = this.resolveOrgPath(name);
|
||||||
|
if (path.length) return path;
|
||||||
|
const value = String(name ?? '').trim();
|
||||||
|
if (!value) return [];
|
||||||
|
return value === String(this.formOrganizationLegacyName || '').trim()
|
||||||
|
? [FORM_LEGACY_ORG_ID]
|
||||||
|
: [];
|
||||||
|
},
|
||||||
|
// 记录表单当前回显的组织名:能匹配真实节点(或已清空)就不需要兜底节点,
|
||||||
|
// 否则记下来,由 buildFormOrganizationTree 补成只读选项
|
||||||
|
syncFormOrganizationLegacy(name) {
|
||||||
|
const value = String(name ?? '').trim();
|
||||||
|
if (!value || this.organizationTreeFlatOptions.some(item => item.rawLabel === value)) {
|
||||||
|
this.formOrganizationLegacyName = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.formOrganizationLegacyName = value;
|
||||||
|
},
|
||||||
// 组织名称 → 级联路径(表单回显用;部门树异步加载完成后会自动重算)
|
// 组织名称 → 级联路径(表单回显用;部门树异步加载完成后会自动重算)
|
||||||
resolveOrgPath(name) {
|
resolveOrgPath(name) {
|
||||||
const value = String(name ?? '').trim();
|
const value = String(name ?? '').trim();
|
||||||
@@ -139,7 +256,13 @@ export default {
|
|||||||
const value = Array.isArray(path)
|
const value = Array.isArray(path)
|
||||||
? path.filter(item => item !== undefined && item !== null && item !== '')
|
? path.filter(item => item !== undefined && item !== null && item !== '')
|
||||||
: [];
|
: [];
|
||||||
return value.length ? this.findOrgById(value)?.rawLabel || '' : '';
|
if (!value.length) return '';
|
||||||
|
const node = this.findOrgById(value);
|
||||||
|
if (node) return node.rawLabel || '';
|
||||||
|
// 原组织兜底节点不在扁平表里,直接取它代表的历史名称
|
||||||
|
return String(value[value.length - 1]) === FORM_LEGACY_ORG_ID
|
||||||
|
? String(this.formOrganizationLegacyName || '').trim()
|
||||||
|
: '';
|
||||||
},
|
},
|
||||||
// 搜索提交前把级联路径数组就地转成组织名称(后端按名称过滤)
|
// 搜索提交前把级联路径数组就地转成组织名称(后端按名称过滤)
|
||||||
normalizeOrganizationSearch(params, prop = 'organizationName') {
|
normalizeOrganizationSearch(params, prop = 'organizationName') {
|
||||||
@@ -155,7 +278,7 @@ export default {
|
|||||||
// 级联单选:modelValue 必须是 id 路径数组,否则控件内部状态会错乱导致无法再次选中
|
// 级联单选:modelValue 必须是 id 路径数组,否则控件内部状态会错乱导致无法再次选中
|
||||||
if (scope.row) scope.row[prop] = Array.isArray(value) ? value : [];
|
if (scope.row) scope.row[prop] = Array.isArray(value) ? value : [];
|
||||||
},
|
},
|
||||||
options: this.organizationTreeOptions,
|
options: this.organizationSearchTreeOptions,
|
||||||
props: {
|
props: {
|
||||||
label: 'label',
|
label: 'label',
|
||||||
value: 'id',
|
value: 'id',
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ export const createOption = () => ({
|
|||||||
delBtn: false,
|
delBtn: false,
|
||||||
selection: true,
|
selection: true,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
|
menuWidth: 320,
|
||||||
menuFixed: 'right',
|
menuFixed: 'right',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export const waybillStatusOptions = [
|
|||||||
{ label: '草稿', value: 'draft' },
|
{ label: '草稿', value: 'draft' },
|
||||||
{ label: '待执行', value: 'pending' },
|
{ label: '待执行', value: 'pending' },
|
||||||
{ label: '进行中', value: 'running' },
|
{ label: '进行中', value: 'running' },
|
||||||
{ label: '待确认回单', value: 'pending_return' },
|
{ label: '待回单确认', value: 'pending_return_confirm' },
|
||||||
{ label: '已完成', value: 'completed' },
|
{ label: '已完成', value: 'completed' },
|
||||||
{ label: '已取消', value: 'cancelled' },
|
{ label: '已取消', value: 'cancelled' },
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -0,0 +1,221 @@
|
|||||||
|
import {
|
||||||
|
approvalStatusOptions,
|
||||||
|
contractCategoryOptions,
|
||||||
|
createCrudOption,
|
||||||
|
hcsSyncStatusOptions,
|
||||||
|
signTypeOptions,
|
||||||
|
} from './common';
|
||||||
|
|
||||||
|
const listDicFormatter = res => {
|
||||||
|
const data = res?.data || res;
|
||||||
|
if (Array.isArray(data)) return data;
|
||||||
|
if (Array.isArray(data?.records)) return data.records;
|
||||||
|
if (Array.isArray(data?.data)) return data.data;
|
||||||
|
if (Array.isArray(data?.data?.records)) return data.data.records;
|
||||||
|
return [];
|
||||||
|
};
|
||||||
|
|
||||||
|
const projectNameDicFormatter = res => {
|
||||||
|
const list = listDicFormatter(res);
|
||||||
|
return list.filter(item => item && item.projectName && String(item.projectName).trim());
|
||||||
|
};
|
||||||
|
|
||||||
|
export const changeTypeOptions = [
|
||||||
|
{ label: '合同信息变更', value: '合同信息变更' },
|
||||||
|
{ label: '结算规则变更', value: '结算规则变更' },
|
||||||
|
];
|
||||||
|
|
||||||
|
export const config = {
|
||||||
|
title: '合同变更',
|
||||||
|
permission: 'contract_change',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
statusTextProp: 'approvalStatusName',
|
||||||
|
deleteStatus: ['draft', 'withdrawn', 'rejected'],
|
||||||
|
editStatus: ['draft', 'withdrawn', 'rejected'],
|
||||||
|
viewStatus: ['approved'],
|
||||||
|
operations: [
|
||||||
|
{
|
||||||
|
action: 'submitApproval',
|
||||||
|
label: '提交',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['draft'],
|
||||||
|
permission: 'contract_change_submit',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'withdraw',
|
||||||
|
label: '撤回',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'contract_change_withdraw',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'mkAudit',
|
||||||
|
label: '流程',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing', 'rejected', 'approved'],
|
||||||
|
permission: 'contract_change_approve',
|
||||||
|
mkOnly: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'approve',
|
||||||
|
label: '通过',
|
||||||
|
type: 'success',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'contract_change_approve',
|
||||||
|
localOnly: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'reject',
|
||||||
|
label: '驳回',
|
||||||
|
type: 'warning',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'contract_change_reject',
|
||||||
|
localOnly: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export const option = createCrudOption([
|
||||||
|
{
|
||||||
|
label: '合同编号',
|
||||||
|
prop: 'contractNo',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 20,
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '合同名称',
|
||||||
|
prop: 'contractName',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 30,
|
||||||
|
minWidth: 180,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '所属项目',
|
||||||
|
prop: 'projectName',
|
||||||
|
search: true,
|
||||||
|
searchType: 'select',
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 60,
|
||||||
|
dicUrl: '/blade-transport/project-apply/list?current=1&size=9999&contractSelectable=true',
|
||||||
|
dicFormatter: projectNameDicFormatter,
|
||||||
|
props: {
|
||||||
|
label: 'projectName',
|
||||||
|
value: 'projectName',
|
||||||
|
},
|
||||||
|
filterable: true,
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '所属组织',
|
||||||
|
prop: 'organizationName',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 10,
|
||||||
|
minWidth: 150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '合同类别',
|
||||||
|
prop: 'contractCategory',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 70,
|
||||||
|
dicData: contractCategoryOptions,
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '签约类型',
|
||||||
|
prop: 'signType',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 50,
|
||||||
|
dicData: signTypeOptions,
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '甲方',
|
||||||
|
prop: 'partyA',
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '乙方',
|
||||||
|
prop: 'partyB',
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '开始日期',
|
||||||
|
prop: 'startDate',
|
||||||
|
type: 'date',
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
valueFormat: 'YYYY-MM-DD',
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '结束日期',
|
||||||
|
prop: 'endDate',
|
||||||
|
type: 'date',
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
valueFormat: 'YYYY-MM-DD',
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '临时效力起',
|
||||||
|
prop: 'temporaryStartDate',
|
||||||
|
type: 'date',
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
valueFormat: 'YYYY-MM-DD',
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '临时效力止',
|
||||||
|
prop: 'temporaryEndDate',
|
||||||
|
type: 'date',
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
valueFormat: 'YYYY-MM-DD',
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '经办人',
|
||||||
|
prop: 'handlerUserName',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '创建时间',
|
||||||
|
prop: 'createTime',
|
||||||
|
type: 'datetime',
|
||||||
|
minWidth: 170,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '审核状态',
|
||||||
|
prop: 'approvalStatus',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 40,
|
||||||
|
dicData: approvalStatusOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '当前节点',
|
||||||
|
prop: 'currentNode',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '当前处理人',
|
||||||
|
prop: 'currentProcessor',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '同步状态',
|
||||||
|
prop: 'syncStatus',
|
||||||
|
type: 'select',
|
||||||
|
dicData: hcsSyncStatusOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
},
|
||||||
|
]);
|
||||||
@@ -65,10 +65,12 @@ export const config = {
|
|||||||
['contractName', '合同名称'],
|
['contractName', '合同名称'],
|
||||||
['projectName', '所属项目'],
|
['projectName', '所属项目'],
|
||||||
['organizationName', '合同负责部门'],
|
['organizationName', '合同负责部门'],
|
||||||
|
['platformCompanyName', '平台公司'],
|
||||||
['contractCategory', '合同类别'],
|
['contractCategory', '合同类别'],
|
||||||
['signType', '签约类型'],
|
['signType', '签约类型'],
|
||||||
['partyA', '甲方'],
|
['partyA', '甲方'],
|
||||||
['partyB', '乙方'],
|
['partyB', '乙方'],
|
||||||
|
['partyC', '丙方'],
|
||||||
['handlerUserName', '经办人'],
|
['handlerUserName', '经办人'],
|
||||||
['signDate', '签订日期'],
|
['signDate', '签订日期'],
|
||||||
['applyDate', '申请日期'],
|
['applyDate', '申请日期'],
|
||||||
@@ -247,11 +249,22 @@ export const option = createCrudOption([
|
|||||||
hide: true,
|
hide: true,
|
||||||
labelWidth: 0,
|
labelWidth: 0,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '客商',
|
||||||
|
prop: 'partyName',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 14,
|
||||||
|
searchPlaceholder: '请输入甲/乙方名称',
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '合同编号',
|
label: '合同编号',
|
||||||
prop: 'contractNo',
|
prop: 'contractNo',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 6,
|
searchOrder: 8,
|
||||||
searchPlaceholder: '请输入',
|
searchPlaceholder: '请输入',
|
||||||
order: 185,
|
order: 185,
|
||||||
maxlength: 100,
|
maxlength: 100,
|
||||||
@@ -264,7 +277,7 @@ export const option = createCrudOption([
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
headerAlign: 'left',
|
headerAlign: 'left',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 7,
|
searchOrder: 1,
|
||||||
searchPlaceholder: '请输入',
|
searchPlaceholder: '请输入',
|
||||||
order: 180,
|
order: 180,
|
||||||
slot: true,
|
slot: true,
|
||||||
@@ -276,7 +289,7 @@ export const option = createCrudOption([
|
|||||||
label: '所属项目',
|
label: '所属项目',
|
||||||
prop: 'projectName',
|
prop: 'projectName',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 8,
|
searchOrder: 11,
|
||||||
searchType: 'select',
|
searchType: 'select',
|
||||||
searchPlaceholder: '请选择',
|
searchPlaceholder: '请选择',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
@@ -311,12 +324,19 @@ export const option = createCrudOption([
|
|||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
rules: selectRule('合同负责部门'),
|
rules: selectRule('合同负责部门'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '平台公司',
|
||||||
|
prop: 'platformCompanyName',
|
||||||
|
minWidth: 180,
|
||||||
|
order: 115,
|
||||||
|
display: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '合同类别',
|
label: '合同类别',
|
||||||
prop: 'contractCategory',
|
prop: 'contractCategory',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 9,
|
searchOrder: 12,
|
||||||
searchPlaceholder: '请选择',
|
searchPlaceholder: '请选择',
|
||||||
order: 170,
|
order: 170,
|
||||||
dicData: contractCategoryOptions,
|
dicData: contractCategoryOptions,
|
||||||
@@ -328,7 +348,7 @@ export const option = createCrudOption([
|
|||||||
prop: 'signType',
|
prop: 'signType',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 10,
|
searchOrder: 13,
|
||||||
searchPlaceholder: '请选择',
|
searchPlaceholder: '请选择',
|
||||||
span: 8,
|
span: 8,
|
||||||
order: 190,
|
order: 190,
|
||||||
@@ -337,11 +357,11 @@ export const option = createCrudOption([
|
|||||||
rules: selectRule('签约类型'),
|
rules: selectRule('签约类型'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '生效类型',
|
label: '合同状态',
|
||||||
prop: 'effectiveType',
|
prop: 'effectiveType',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 5,
|
searchOrder: 6,
|
||||||
searchPlaceholder: '请选择',
|
searchPlaceholder: '请选择',
|
||||||
dicData: effectiveTypeOptions,
|
dicData: effectiveTypeOptions,
|
||||||
hide: true,
|
hide: true,
|
||||||
@@ -350,24 +370,23 @@ export const option = createCrudOption([
|
|||||||
{
|
{
|
||||||
label: '甲方',
|
label: '甲方',
|
||||||
prop: 'partyA',
|
prop: 'partyA',
|
||||||
type: 'select',
|
|
||||||
formslot: true,
|
|
||||||
disabled: true,
|
|
||||||
order: 160,
|
|
||||||
filterable: true,
|
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
rules: selectRule('甲方'),
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '乙方',
|
label: '乙方',
|
||||||
prop: 'partyB',
|
prop: 'partyB',
|
||||||
type: 'select',
|
|
||||||
formslot: true,
|
|
||||||
disabled: true,
|
|
||||||
order: 150,
|
|
||||||
filterable: true,
|
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
rules: selectRule('乙方'),
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '丙方',
|
||||||
|
prop: 'partyC',
|
||||||
|
minWidth: 160,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '合同期限',
|
label: '合同期限',
|
||||||
@@ -613,7 +632,7 @@ export const option = createCrudOption([
|
|||||||
prop: 'hcsSyncStatus',
|
prop: 'hcsSyncStatus',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 6,
|
searchOrder: 7,
|
||||||
searchPlaceholder: '请选择',
|
searchPlaceholder: '请选择',
|
||||||
slot: true,
|
slot: true,
|
||||||
dicData: hcsSyncStatusOptions,
|
dicData: hcsSyncStatusOptions,
|
||||||
@@ -621,6 +640,15 @@ export const option = createCrudOption([
|
|||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '客商风险',
|
||||||
|
prop: 'customerRisk',
|
||||||
|
slot: true,
|
||||||
|
order: 189,
|
||||||
|
minWidth: 150,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '金蝶合同ID',
|
label: '金蝶合同ID',
|
||||||
prop: 'kingdeeId',
|
prop: 'kingdeeId',
|
||||||
@@ -634,7 +662,7 @@ export const option = createCrudOption([
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchPlaceholder: '请选择',
|
searchPlaceholder: '请选择',
|
||||||
searchOrder: 7,
|
searchOrder: 9,
|
||||||
dicData: yesNoOptions,
|
dicData: yesNoOptions,
|
||||||
hide: true,
|
hide: true,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
@@ -646,7 +674,7 @@ export const option = createCrudOption([
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchPlaceholder: '请选择',
|
searchPlaceholder: '请选择',
|
||||||
searchOrder: 8,
|
searchOrder: 10,
|
||||||
dicData: yesNoOptions,
|
dicData: yesNoOptions,
|
||||||
hide: true,
|
hide: true,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
|
|||||||
@@ -0,0 +1,162 @@
|
|||||||
|
import {
|
||||||
|
approvalStatusOptions,
|
||||||
|
createCrudOption,
|
||||||
|
hcsSyncStatusOptions,
|
||||||
|
projectTypeOptions,
|
||||||
|
} from './common';
|
||||||
|
|
||||||
|
export const changeTypeOptions = [
|
||||||
|
{ label: '项目变更', value: '项目变更' },
|
||||||
|
{ label: '项目备案流程(本部流程)', value: '项目备案流程(本部流程)' },
|
||||||
|
{ label: '项目备案流程(运输部流程)', value: '项目备案流程(运输部流程)' },
|
||||||
|
];
|
||||||
|
|
||||||
|
export const config = {
|
||||||
|
title: '项目变更',
|
||||||
|
permission: 'project_change',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
statusTextProp: 'approvalStatusName',
|
||||||
|
deleteStatus: ['draft', 'withdrawn', 'rejected'],
|
||||||
|
editStatus: ['draft', 'withdrawn', 'rejected'],
|
||||||
|
viewStatus: ['approved', 'rejected', 'withdrawn'],
|
||||||
|
operations: [
|
||||||
|
{
|
||||||
|
action: 'submitApproval',
|
||||||
|
label: '提交',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['draft'],
|
||||||
|
permission: 'project_change_submit',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'withdraw',
|
||||||
|
label: '撤回',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'project_change_withdraw',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'mkAudit',
|
||||||
|
label: '流程',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'project_change_approve',
|
||||||
|
mkOnly: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'approve',
|
||||||
|
label: '通过',
|
||||||
|
type: 'success',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'project_change_approve',
|
||||||
|
localOnly: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'reject',
|
||||||
|
label: '驳回',
|
||||||
|
type: 'warning',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'project_change_reject',
|
||||||
|
localOnly: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export const option = createCrudOption([
|
||||||
|
{
|
||||||
|
label: '项目编号',
|
||||||
|
prop: 'projectCode',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 70,
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目名称',
|
||||||
|
prop: 'projectName',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 60,
|
||||||
|
minWidth: 180,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '变更类型',
|
||||||
|
prop: 'changeType',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 10,
|
||||||
|
dicData: changeTypeOptions,
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目类型',
|
||||||
|
prop: 'projectType',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 20,
|
||||||
|
dicData: projectTypeOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '客户名称',
|
||||||
|
prop: 'customerNames',
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '下游承运商',
|
||||||
|
prop: 'carrierNames',
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '承办部门',
|
||||||
|
prop: 'undertakeDeptName',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 50,
|
||||||
|
minWidth: 140,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目负责人',
|
||||||
|
prop: 'principalUserName',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 40,
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '审批状态',
|
||||||
|
prop: 'approvalStatus',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 30,
|
||||||
|
dicData: approvalStatusOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '当前节点',
|
||||||
|
prop: 'currentNode',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '当前处理人',
|
||||||
|
prop: 'currentProcessor',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '审核通过时间',
|
||||||
|
prop: 'approvedTime',
|
||||||
|
type: 'datetime',
|
||||||
|
minWidth: 170,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '同步状态',
|
||||||
|
prop: 'syncStatus',
|
||||||
|
type: 'select',
|
||||||
|
dicData: hcsSyncStatusOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
},
|
||||||
|
]);
|
||||||
@@ -85,13 +85,6 @@ export const config = {
|
|||||||
status: ['draft', 'withdrawn', 'rejected'],
|
status: ['draft', 'withdrawn', 'rejected'],
|
||||||
permission: 'temporary_credit_limit_submit',
|
permission: 'temporary_credit_limit_submit',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
action: 'flow',
|
|
||||||
label: '流程',
|
|
||||||
statusProp: 'approvalStatus',
|
|
||||||
status: ['reviewing'],
|
|
||||||
permission: 'temporary_credit_limit_view',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
action: 'withdraw',
|
action: 'withdraw',
|
||||||
label: '撤回',
|
label: '撤回',
|
||||||
@@ -99,6 +92,14 @@ export const config = {
|
|||||||
status: ['reviewing'],
|
status: ['reviewing'],
|
||||||
permission: 'temporary_credit_limit_withdraw',
|
permission: 'temporary_credit_limit_withdraw',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
action: 'mkAudit',
|
||||||
|
label: '流程',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'temporary_credit_limit_approve',
|
||||||
|
mkOnly: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
action: 'approve',
|
action: 'approve',
|
||||||
label: '审批通过',
|
label: '审批通过',
|
||||||
@@ -106,6 +107,7 @@ export const config = {
|
|||||||
statusProp: 'approvalStatus',
|
statusProp: 'approvalStatus',
|
||||||
status: ['reviewing'],
|
status: ['reviewing'],
|
||||||
permission: 'temporary_credit_limit_approve',
|
permission: 'temporary_credit_limit_approve',
|
||||||
|
localOnly: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action: 'reject',
|
action: 'reject',
|
||||||
@@ -114,6 +116,7 @@ export const config = {
|
|||||||
statusProp: 'approvalStatus',
|
statusProp: 'approvalStatus',
|
||||||
status: ['reviewing'],
|
status: ['reviewing'],
|
||||||
permission: 'temporary_credit_limit_reject',
|
permission: 'temporary_credit_limit_reject',
|
||||||
|
localOnly: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -124,7 +124,8 @@ const formatGoodsInfo = row => {
|
|||||||
const text = Object.entries(groups)
|
const text = Object.entries(groups)
|
||||||
.map(([unit, group]) => {
|
.map(([unit, group]) => {
|
||||||
const quantity = formatGoodsQuantity(group.quantity);
|
const quantity = formatGoodsQuantity(group.quantity);
|
||||||
return `${group.typeName}等${group.count}种货物 | ${quantity}${unit ? ` ${unit}` : ''}`;
|
const typeName = group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
|
||||||
|
return `${typeName} | ${quantity}${unit ? ` ${unit}` : ''}`;
|
||||||
})
|
})
|
||||||
.join('; ');
|
.join('; ');
|
||||||
|
|
||||||
@@ -207,6 +208,9 @@ export const config = {
|
|||||||
transportPlanImportTitle: '导入运输计划',
|
transportPlanImportTitle: '导入运输计划',
|
||||||
transportPlanTemplateUrl: '/blade-transport/transport-plan/export-template',
|
transportPlanTemplateUrl: '/blade-transport/transport-plan/export-template',
|
||||||
attachmentTitle: '附件',
|
attachmentTitle: '附件',
|
||||||
|
defaultForm: {
|
||||||
|
transportType: 'road',
|
||||||
|
},
|
||||||
searchRangeMap: {
|
searchRangeMap: {
|
||||||
planStartDateRange: ['planStartDateStart', 'planStartDateEnd'],
|
planStartDateRange: ['planStartDateStart', 'planStartDateEnd'],
|
||||||
createTimeRange: ['createTimeStart', 'createTimeEnd', '00:00:00', '23:59:59'],
|
createTimeRange: ['createTimeStart', 'createTimeEnd', '00:00:00', '23:59:59'],
|
||||||
|
|||||||
@@ -471,26 +471,20 @@ export const config = {
|
|||||||
endDateRange: ['endDateStart', 'endDateEnd'],
|
endDateRange: ['endDateStart', 'endDateEnd'],
|
||||||
createTimeRange: ['createTimeStart', 'createTimeEnd'],
|
createTimeRange: ['createTimeStart', 'createTimeEnd'],
|
||||||
},
|
},
|
||||||
actions: ['copy', 'cancel', 'reassign', 'complete', 'batchComplete'],
|
actions: ['copy', 'cancel', 'reassign', 'complete', 'batchComplete', 'confirmReturn'],
|
||||||
detailButton: true,
|
detailButton: true,
|
||||||
statusProp: 'businessStatus',
|
statusProp: 'businessStatus',
|
||||||
statusTextProp: 'businessStatusName',
|
statusTextProp: 'businessStatusName',
|
||||||
formatStatus(row, prop, defaultText) {
|
formatStatus(row, prop, defaultText) {
|
||||||
if (prop !== 'businessStatus') return defaultText;
|
if (prop !== 'businessStatus') return defaultText;
|
||||||
const status = String(row.businessStatus || '');
|
const status = String(row.businessStatus || '');
|
||||||
const terminalStatuses = [
|
const terminalStatuses = ['draft', 'completed', 'cancelled', 'waiting_dispatch', 'dispatching'];
|
||||||
'draft',
|
|
||||||
'completed',
|
|
||||||
'cancelled',
|
|
||||||
'waiting_dispatch',
|
|
||||||
'dispatching',
|
|
||||||
'pending_return',
|
|
||||||
];
|
|
||||||
if (status === 'pending_return') return '待确认回单';
|
|
||||||
const needAccept =
|
const needAccept =
|
||||||
row.requireAccept === true ||
|
row.requireAccept === true ||
|
||||||
row.requireAccept === 1 ||
|
row.requireAccept === 1 ||
|
||||||
requiresDriverAcceptConfirmation(row);
|
requiresDriverAcceptConfirmation(row);
|
||||||
|
// 待回单确认由末位打卡产生,司机必然已接单
|
||||||
|
if (status === 'pending_return_confirm') return '待回单确认';
|
||||||
// 需司机接单且尚未接单 → 待执行(含库中仍为 running 的历史数据展示校正)
|
// 需司机接单且尚未接单 → 待执行(含库中仍为 running 的历史数据展示校正)
|
||||||
if (needAccept && !hasDriverAcceptRecord(row) && !terminalStatuses.includes(status)) {
|
if (needAccept && !hasDriverAcceptRecord(row) && !terminalStatuses.includes(status)) {
|
||||||
return '待执行';
|
return '待执行';
|
||||||
@@ -505,20 +499,14 @@ export const config = {
|
|||||||
getDriverRejectReason,
|
getDriverRejectReason,
|
||||||
isDriverRejectedWaybill,
|
isDriverRejectedWaybill,
|
||||||
canEdit(row) {
|
canEdit(row) {
|
||||||
// 进行中、待确认回单不允许编辑
|
// 进行中的运单不允许编辑
|
||||||
if (isInProgressStatus(row, row.businessStatusName)) {
|
if (isInProgressStatus(row, row.businessStatusName)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (String(row.businessStatus || '') === 'pending_return') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return !isDriverRejectedWaybill(row);
|
return !isDriverRejectedWaybill(row);
|
||||||
},
|
},
|
||||||
canCancel(row) {
|
canCancel(row) {
|
||||||
// 进行中、待确认回单不允许取消
|
// 进行中的运单不允许取消;待回单确认仍可取消(与页面 canCancel 一致)
|
||||||
if (String(row.businessStatus || '') === 'pending_return') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return !isInProgressStatus(row, row.businessStatusName);
|
return !isInProgressStatus(row, row.businessStatusName);
|
||||||
},
|
},
|
||||||
deleteStatus: ['draft'],
|
deleteStatus: ['draft'],
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export const invoiceReceiptTableColumns = [
|
|||||||
{ prop: 'createUserName', label: '创建人', minWidth: 110 },
|
{ prop: 'createUserName', label: '创建人', minWidth: 110 },
|
||||||
{ prop: 'createTime', label: '创建时间', minWidth: 170 },
|
{ prop: 'createTime', label: '创建时间', minWidth: 170 },
|
||||||
{ prop: 'kingdeeReceivedInvoiceNo', label: '金蝶单据号', minWidth: 150 },
|
{ prop: 'kingdeeReceivedInvoiceNo', label: '金蝶单据号', minWidth: 150 },
|
||||||
{ prop: 'kingdeePushStatusName', label: '金蝶状态', minWidth: 130 },
|
{ prop: 'kingdeePushStatusName', label: '金蝶状态', minWidth: 130, kingdeeStatus: true },
|
||||||
{ prop: 'kingdeePushMsg', label: '失败原因', minWidth: 160 },
|
{ prop: 'kingdeePushMsg', label: '失败原因', minWidth: 160 },
|
||||||
{ prop: 'attachmentSyncStatusName', label: '附件同步', minWidth: 100 },
|
{ prop: 'attachmentSyncStatusName', label: '附件同步', minWidth: 100 },
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* 付款申请列表(avue-crud)配置
|
* 付款申请列表(avue-crud)配置
|
||||||
* ------------------------------------------------------------------
|
* ------------------------------------------------------------------
|
||||||
* 列表页与其它模块统一使用 avue-crud,头部 4 个按钮(刷新 / 列显隐 / 搜索显隐 /
|
* 列表页与其它模块统一使用 avue-crud,头部按钮(刷新 / 列显隐 / 表格卡片切换)
|
||||||
* 表格卡片切换)由 avue-crud 自带,不做二次封装。
|
* 由 avue-crud 自带,不做二次封装。
|
||||||
*
|
*
|
||||||
* 搜索项与表格列 label 不一致的(如表格列「收款方」/ 搜索项「客户名称」),
|
* 搜索栏与应收/应付明细等页面统一为页面级手写搜索区(见 payment-application.vue),
|
||||||
* 单独定义一个 hide 的搜索列,并用 searchProp 映射到后端字段。
|
* 此处只保留表格列配置。
|
||||||
*
|
|
||||||
* ⚠️ avue 的 searchOrder 为降序排序,值越大越靠前(见 header-search2.js:
|
|
||||||
* `list.sort((a, b) => (b.searchOrder || 0) - (a.searchOrder || 0))`)。
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const textFormatter = (row, value) =>
|
const textFormatter = (row, value) =>
|
||||||
@@ -16,46 +13,10 @@ const textFormatter = (row, value) =>
|
|||||||
|
|
||||||
const moneyFormatter = (row, value) => Number(value || 0).toFixed(2);
|
const moneyFormatter = (row, value) => Number(value || 0).toFixed(2);
|
||||||
|
|
||||||
// 仅用于搜索、不在表格中出现的列
|
export const paymentApplicationOption = () => ({
|
||||||
const searchOnlyColumn = ({ label, prop, searchOrder, searchProp, dicData }) => {
|
|
||||||
const column = {
|
|
||||||
label,
|
|
||||||
prop,
|
|
||||||
search: true,
|
|
||||||
searchOrder,
|
|
||||||
searchPlaceholder: '请输入',
|
|
||||||
hide: true,
|
|
||||||
showColumn: false,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
};
|
|
||||||
if (searchProp) column.searchProp = searchProp;
|
|
||||||
if (dicData) {
|
|
||||||
column.type = 'select';
|
|
||||||
column.searchPlaceholder = '请选择';
|
|
||||||
column.dicData = dicData;
|
|
||||||
}
|
|
||||||
return column;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const paymentApplicationOption = ({
|
|
||||||
paymentTypeOptions = [],
|
|
||||||
approvalStatusOptions = [],
|
|
||||||
kingdeeStatusOptions = [],
|
|
||||||
} = {}) => ({
|
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
calcHeight: 32,
|
calcHeight: 32,
|
||||||
tip: false,
|
tip: false,
|
||||||
searchBtnText: '查询',
|
|
||||||
emptyBtnText: '重置',
|
|
||||||
searchShow: true,
|
|
||||||
searchIcon: true,
|
|
||||||
searchLabelWidth: 88,
|
|
||||||
// 查询/重置紧跟首行 4 个条件(4×5 + 菜单 4 = 24),不再独占下一整行
|
|
||||||
searchMenuSpan: 4,
|
|
||||||
searchIndex: 4,
|
|
||||||
searchMenuPosition: 'right',
|
|
||||||
border: true,
|
border: true,
|
||||||
index: true,
|
index: true,
|
||||||
indexLabel: '序号',
|
indexLabel: '序号',
|
||||||
@@ -73,84 +34,11 @@ export const paymentApplicationOption = ({
|
|||||||
menuFixed: 'right',
|
menuFixed: 'right',
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
column: [
|
column: [
|
||||||
// ---------- 搜索项(前 4 项默认展示,其余折叠;searchOrder 越大越靠前) ----------
|
|
||||||
{
|
|
||||||
label: '单据号',
|
|
||||||
prop: 'paymentNo',
|
|
||||||
slot: true,
|
|
||||||
search: true,
|
|
||||||
searchSpan: 5,
|
|
||||||
searchOrder: 9,
|
|
||||||
searchPlaceholder: '请输入',
|
|
||||||
minWidth: 150,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '日期',
|
|
||||||
prop: 'applyDateRange',
|
|
||||||
type: 'daterange',
|
|
||||||
searchType: 'daterange',
|
|
||||||
search: true,
|
|
||||||
searchSpan: 5,
|
|
||||||
searchOrder: 8,
|
|
||||||
hide: true,
|
|
||||||
showColumn: false,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
...searchOnlyColumn({
|
|
||||||
label: '客户名称',
|
|
||||||
prop: 'payeeNameSearch',
|
|
||||||
searchOrder: 7,
|
|
||||||
searchProp: 'payeeName',
|
|
||||||
}),
|
|
||||||
searchSpan: 5,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
...searchOnlyColumn({
|
|
||||||
label: '项目名称',
|
|
||||||
prop: 'projectNameSearch',
|
|
||||||
searchOrder: 6,
|
|
||||||
searchProp: 'projectName',
|
|
||||||
}),
|
|
||||||
searchSpan: 5,
|
|
||||||
},
|
|
||||||
searchOnlyColumn({
|
|
||||||
label: '关联结算单',
|
|
||||||
prop: 'settlementNo',
|
|
||||||
searchOrder: 4,
|
|
||||||
}),
|
|
||||||
searchOnlyColumn({
|
|
||||||
label: '付款类型',
|
|
||||||
prop: 'paymentType',
|
|
||||||
searchOrder: 3,
|
|
||||||
dicData: paymentTypeOptions,
|
|
||||||
}),
|
|
||||||
searchOnlyColumn({
|
|
||||||
label: '审核状态',
|
|
||||||
prop: 'approvalStatus',
|
|
||||||
searchOrder: 2,
|
|
||||||
dicData: approvalStatusOptions,
|
|
||||||
}),
|
|
||||||
searchOnlyColumn({
|
|
||||||
label: '金蝶单据状态',
|
|
||||||
prop: 'kingdeeStatus',
|
|
||||||
searchOrder: 1,
|
|
||||||
dicData: kingdeeStatusOptions,
|
|
||||||
}),
|
|
||||||
// ---------- 表格列 ----------
|
// ---------- 表格列 ----------
|
||||||
|
{ label: '单据号', prop: 'paymentNo', slot: true, minWidth: 150 },
|
||||||
{ label: '付款类型', prop: 'paymentTypeName', minWidth: 110, formatter: textFormatter },
|
{ label: '付款类型', prop: 'paymentTypeName', minWidth: 110, formatter: textFormatter },
|
||||||
{ label: '所属项目', prop: 'projectName', minWidth: 140, formatter: textFormatter },
|
{ label: '所属项目', prop: 'projectName', minWidth: 140, formatter: textFormatter },
|
||||||
{
|
{ label: '所属组织', prop: 'deptName', minWidth: 120, formatter: textFormatter },
|
||||||
label: '所属组织',
|
|
||||||
prop: 'deptName',
|
|
||||||
search: true,
|
|
||||||
searchOrder: 5,
|
|
||||||
searchslot: true,
|
|
||||||
minWidth: 120,
|
|
||||||
formatter: textFormatter,
|
|
||||||
},
|
|
||||||
{ label: '合同编号', prop: 'contractNo', minWidth: 130, formatter: textFormatter },
|
{ label: '合同编号', prop: 'contractNo', minWidth: 130, formatter: textFormatter },
|
||||||
{ label: '合同名称', prop: 'contractName', minWidth: 140, formatter: textFormatter },
|
{ label: '合同名称', prop: 'contractName', minWidth: 140, formatter: textFormatter },
|
||||||
{ label: '付款方', prop: 'payerName', minWidth: 130, formatter: textFormatter },
|
{ label: '付款方', prop: 'payerName', minWidth: 130, formatter: textFormatter },
|
||||||
@@ -169,7 +57,8 @@ export const paymentApplicationOption = ({
|
|||||||
{ label: '当前节点', prop: 'currentNode', minWidth: 120, formatter: textFormatter },
|
{ label: '当前节点', prop: 'currentNode', minWidth: 120, formatter: textFormatter },
|
||||||
{ label: '当前处理人', prop: 'currentProcessor', minWidth: 120, formatter: textFormatter },
|
{ label: '当前处理人', prop: 'currentProcessor', minWidth: 120, formatter: textFormatter },
|
||||||
{ label: '金蝶单据号', prop: 'kingdeeBillNo', minWidth: 130, formatter: textFormatter },
|
{ label: '金蝶单据号', prop: 'kingdeeBillNo', minWidth: 130, formatter: textFormatter },
|
||||||
{ label: '金蝶单据状态', prop: 'kingdeeStatusName', minWidth: 130, formatter: textFormatter },
|
{ label: '金蝶单据状态', prop: 'kingdeeStatusName', slot: true, minWidth: 130 },
|
||||||
|
{ label: '已指定应付', prop: 'kingdeeAssignStatus', slot: true, minWidth: 120 },
|
||||||
{ label: '金蝶锁状态', prop: 'kingdeeLockStatus', slot: true, minWidth: 150 },
|
{ label: '金蝶锁状态', prop: 'kingdeeLockStatus', slot: true, minWidth: 150 },
|
||||||
{ label: '附件同步', prop: 'attachmentSyncStatusName', minWidth: 100, formatter: textFormatter },
|
{ label: '附件同步', prop: 'attachmentSyncStatusName', minWidth: 100, formatter: textFormatter },
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export const receiptClaimRecordTableColumns = [
|
export const receiptClaimRecordTableColumns = [
|
||||||
{ prop: 'receiptNoticeNo', label: '认领通知单', minWidth: 150, link: true },
|
{ prop: 'receiptNoticeNo', label: '收款单号', minWidth: 150, link: true },
|
||||||
{ prop: 'payerName', label: '付款人', minWidth: 130 },
|
{ prop: 'payerName', label: '付款人', minWidth: 130 },
|
||||||
{ prop: 'receiptAmount', label: '付款金额', minWidth: 130, money: true },
|
{ prop: 'receiptAmount', label: '收款金额', minWidth: 130, money: true },
|
||||||
{ prop: 'counterpartyName', label: '对方户名', minWidth: 150 },
|
{ prop: 'counterpartyName', label: '对方户名', minWidth: 150 },
|
||||||
{ prop: 'counterpartyAccount', label: '对方账号', minWidth: 170 },
|
{ prop: 'counterpartyAccount', label: '对方账号', minWidth: 170 },
|
||||||
{ prop: 'counterpartyBank', label: '对方开户行', minWidth: 150 },
|
{ prop: 'counterpartyBank', label: '对方开户行', minWidth: 150 },
|
||||||
|
|||||||
@@ -1,18 +1,23 @@
|
|||||||
export const receiptFlowTableColumns = [
|
export const receiptFlowTableColumns = [
|
||||||
{ prop: 'receiptNoticeNo', label: '认领通知单', minWidth: 150, link: true },
|
{ prop: 'receiptNoticeNo', label: '收款单号', minWidth: 150, link: true },
|
||||||
{ prop: 'payerName', label: '付款人', minWidth: 130 },
|
{ prop: 'payerName', label: '付款人', minWidth: 130 },
|
||||||
{ prop: 'receiptAmount', label: '付款金额', minWidth: 130, money: true },
|
{ prop: 'receiptAmount', label: '收款金额', minWidth: 130, money: true },
|
||||||
{ prop: 'counterpartyName', label: '对方户名', minWidth: 150 },
|
{ prop: 'counterpartyName', label: '对方户名', minWidth: 150 },
|
||||||
{ prop: 'counterpartyAccount', label: '对方账号', minWidth: 170 },
|
{ prop: 'counterpartyAccount', label: '对方账号', minWidth: 170 },
|
||||||
{ prop: 'counterpartyBank', label: '对方开户行', minWidth: 150 },
|
{ prop: 'counterpartyBank', label: '对方开户行', minWidth: 150 },
|
||||||
|
{ prop: 'payeeName', label: '收款人(公司)', minWidth: 150 },
|
||||||
|
//{ prop: 'orgNumber', label: '收款公司编码', minWidth: 130 },
|
||||||
|
//{ prop: 'openOrgNumber', label: '核算组织编码', minWidth: 130 },
|
||||||
{ prop: 'summary', label: '摘要', minWidth: 160 },
|
{ prop: 'summary', label: '摘要', minWidth: 160 },
|
||||||
{ prop: 'transactionTime', label: '交易时间', minWidth: 170 },
|
{ prop: 'transactionTime', label: '交易时间', minWidth: 170 },
|
||||||
{ prop: 'claimStatusName', label: '认领状态', minWidth: 110, status: true },
|
{ prop: 'claimStatusName', label: '认领状态', minWidth: 110, status: true },
|
||||||
{ prop: 'kingdeeClaimStatusName', label: '公告状态', minWidth: 110 },
|
|
||||||
{ prop: 'claimedAmount', label: '已认领金额', minWidth: 130, money: true },
|
{ prop: 'claimedAmount', label: '已认领金额', minWidth: 130, money: true },
|
||||||
{ prop: 'unclaimedAmount', label: '金蝶未认领金额', minWidth: 140, money: true },
|
{ prop: 'remainingAmount', label: '剩余可认领金额', minWidth: 140, money: true },
|
||||||
{ prop: 'pushStatusName', label: '推送状态', minWidth: 110, status: true },
|
{ prop: 'unmatchAmountRec', label: '未匹配金额', minWidth: 140, money: true },
|
||||||
{ prop: 'pushFailReason', label: '推送失败原因', minWidth: 160 },
|
//{ prop: 'matchAmountRec', label: '已匹配收款金额', minWidth: 140, money: true },
|
||||||
{ prop: 'kingdeeBillNo', label: '金蝶收款单号', minWidth: 150 },
|
//{ prop: 'matchAmountPay', label: '已匹配付款金额', minWidth: 140, money: true },
|
||||||
|
//{ prop: 'unmatchAmountPay', label: '未匹配付款金额', minWidth: 140, money: true },
|
||||||
|
//{ prop: 'settleAmount', label: '已结算金额', minWidth: 130, money: true },
|
||||||
|
//{ prop: 'unsettleAmount', label: '未结算金额', minWidth: 130, money: true },
|
||||||
{ prop: 'kingdeeBillStatusName', label: '金蝶状态', minWidth: 110 },
|
{ prop: 'kingdeeBillStatusName', label: '金蝶状态', minWidth: 110 },
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
/**
|
/**
|
||||||
* 正式结算单列表(avue-crud)配置
|
* 正式结算单列表(avue-crud)配置
|
||||||
* ------------------------------------------------------------------
|
* ------------------------------------------------------------------
|
||||||
* 列表页与其它模块统一使用 avue-crud,头部 4 个按钮(刷新 / 列显隐 / 搜索显隐 /
|
* 列表页与其它模块统一使用 avue-crud,头部按钮(刷新 / 列显隐 / 显示方式)
|
||||||
* 显示方式)由 avue-crud 自带,不做二次封装。
|
* 由 avue-crud 自带,不做二次封装。
|
||||||
|
*
|
||||||
|
* 搜索栏与应收/应付明细页统一为页面级手写搜索区(见 formal-settlement.vue),
|
||||||
|
* 此处只保留表格列配置。
|
||||||
*
|
*
|
||||||
* 表格列复用 formalSettlementTable.js 的 formalSettlementTableColumns(与弹窗内
|
* 表格列复用 formalSettlementTable.js 的 formalSettlementTableColumns(与弹窗内
|
||||||
* 明细表共用同一份列定义),此处只补充 avue 需要的展示/搜索属性,避免两处维护。
|
* 明细表共用同一份列定义),此处只补充 avue 需要的展示属性,避免两处维护。
|
||||||
*
|
|
||||||
* ⚠️ searchOrder 为降序排序,值越大越靠前。
|
|
||||||
* ⚠️ 仅用于搜索的列必须 hide + showColumn: false,否则会混进「列显隐」抽屉。
|
|
||||||
* ⚠️ column 数组顺序 = 表格列顺序,搜索专用列统一放在数组最前面。
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { formatSealTypes } from '@/utils/settlement-seal';
|
||||||
import {
|
import {
|
||||||
approvalStatusOptions,
|
|
||||||
invoiceStatusOptions,
|
|
||||||
kingdeeSyncStatusOptions,
|
kingdeeSyncStatusOptions,
|
||||||
|
kingdeeWriteOffStatusOptions,
|
||||||
paymentStatusOptions,
|
paymentStatusOptions,
|
||||||
} from './formalSettlementSearch';
|
} from './formalSettlementSearch';
|
||||||
import { formalSettlementTableColumns } from './formalSettlementTable';
|
import { formalSettlementTableColumns } from './formalSettlementTable';
|
||||||
@@ -23,6 +22,8 @@ import { formalSettlementTableColumns } from './formalSettlementTable';
|
|||||||
const textFormatter = (row, value) =>
|
const textFormatter = (row, value) =>
|
||||||
value === null || value === undefined || value === '' ? '-' : value;
|
value === null || value === undefined || value === '' ? '-' : value;
|
||||||
|
|
||||||
|
const sealTypesFormatter = (row, value) => formatSealTypes(value) || '-';
|
||||||
|
|
||||||
/** 金额统一展示:两位小数 + 币种 */
|
/** 金额统一展示:两位小数 + 币种 */
|
||||||
const moneyFormatter = (row, value) =>
|
const moneyFormatter = (row, value) =>
|
||||||
`${Number(value || 0).toFixed(2)} ${row?.currency || 'RMB'}`;
|
`${Number(value || 0).toFixed(2)} ${row?.currency || 'RMB'}`;
|
||||||
@@ -30,92 +31,52 @@ const moneyFormatter = (row, value) =>
|
|||||||
const pickLabel = (options, value) =>
|
const pickLabel = (options, value) =>
|
||||||
options.find(item => item.value === value)?.label || value || '-';
|
options.find(item => item.value === value)?.label || value || '-';
|
||||||
|
|
||||||
const searchOnlyColumn = ({ label, prop, searchOrder, type = 'input', dicData }) => {
|
/** 表格列的 avue 增量配置:插槽、覆盖宽度等 */
|
||||||
const column = {
|
|
||||||
label,
|
|
||||||
prop,
|
|
||||||
search: true,
|
|
||||||
searchOrder,
|
|
||||||
searchSpan: 5,
|
|
||||||
hide: true,
|
|
||||||
showColumn: false,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
};
|
|
||||||
if (type === 'select') {
|
|
||||||
column.type = 'select';
|
|
||||||
column.searchPlaceholder = '请选择';
|
|
||||||
column.dicData = dicData || [];
|
|
||||||
} else if (type === 'daterange') {
|
|
||||||
column.type = 'daterange';
|
|
||||||
column.searchType = 'daterange';
|
|
||||||
column.searchPlaceholder = '请选择';
|
|
||||||
} else {
|
|
||||||
column.searchPlaceholder = '请输入';
|
|
||||||
}
|
|
||||||
return column;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 表格列的 avue 增量配置:搜索项、插槽、覆盖宽度等 */
|
|
||||||
const COLUMN_EXTRA = {
|
const COLUMN_EXTRA = {
|
||||||
formalSettlementNo: {
|
formalSettlementNo: { slot: true },
|
||||||
slot: true,
|
sealTypes: { formatter: sealTypesFormatter },
|
||||||
search: true,
|
|
||||||
searchSpan: 5,
|
|
||||||
searchOrder: 12,
|
|
||||||
searchPlaceholder: '请输入',
|
|
||||||
},
|
|
||||||
payerName: { search: true, searchSpan: 5, searchOrder: 7, searchPlaceholder: '请输入' },
|
|
||||||
payeeName: { search: true, searchSpan: 5, searchOrder: 6, searchPlaceholder: '请输入' },
|
|
||||||
projectName: { search: true, searchSpan: 5, searchOrder: 11, searchPlaceholder: '请输入' },
|
|
||||||
deptName: { search: true, searchslot: true, searchSpan: 5, searchOrder: 10 },
|
|
||||||
contractNo: { search: true, searchSpan: 5, searchOrder: 9, searchPlaceholder: '请输入' },
|
|
||||||
invoiceStatusName: { slot: true },
|
invoiceStatusName: { slot: true },
|
||||||
paymentStatusName: { slot: true },
|
paymentStatusName: { slot: true },
|
||||||
approvalStatusName: { slot: true },
|
approvalStatusName: { slot: true },
|
||||||
adjustFlag: {
|
adjustFlag: {
|
||||||
formatter: row => row.adjustStatusName || (row.originFormalSettlementNo ? '调整后单' : '-'),
|
formatter: row => row.adjustStatusName || (row.originFormalSettlementNo ? '调整后单' : '-'),
|
||||||
},
|
},
|
||||||
kingdeeSyncStatus: {
|
kingdeeSyncStatus: { slot: true },
|
||||||
slot: true,
|
|
||||||
search: true,
|
|
||||||
type: 'select',
|
|
||||||
dicData: kingdeeSyncStatusOptions,
|
|
||||||
searchSpan: 5,
|
|
||||||
searchOrder: 2,
|
|
||||||
searchPlaceholder: '请选择',
|
|
||||||
},
|
|
||||||
kingdeeLockStatus: { slot: true },
|
kingdeeLockStatus: { slot: true },
|
||||||
|
kingdeeWriteOffStatus: { slot: true },
|
||||||
|
kingdeeAssignStatus: { slot: true },
|
||||||
createTime: { width: 180 },
|
createTime: { width: 180 },
|
||||||
};
|
};
|
||||||
|
|
||||||
const buildTableColumns = () =>
|
/** 收款/付款结算单按结算类型展示各自标签 */
|
||||||
formalSettlementTableColumns.map(column => {
|
const PAYMENT_FIELD_LABELS = {
|
||||||
|
paidAmount: { payable: '已付合计(含预付)', receivable: '已收合计(含预付)' },
|
||||||
|
paymentStatusName: { payable: '付款状态', receivable: '收款状态' },
|
||||||
|
};
|
||||||
|
|
||||||
|
// 已指定应付仅付款结算单(先票后款 A302-6)有,收款结算单不展示
|
||||||
|
const buildTableColumns = settlementType =>
|
||||||
|
formalSettlementTableColumns
|
||||||
|
.filter(column => !(settlementType === 'receivable' && column.prop === 'kingdeeAssignStatus'))
|
||||||
|
.map(column => {
|
||||||
const extra = { ...(COLUMN_EXTRA[column.prop] || {}) };
|
const extra = { ...(COLUMN_EXTRA[column.prop] || {}) };
|
||||||
|
const label = PAYMENT_FIELD_LABELS[column.prop]?.[settlementType];
|
||||||
|
if (label) extra.label = label;
|
||||||
if (column.money) {
|
if (column.money) {
|
||||||
extra.formatter = moneyFormatter;
|
extra.formatter = moneyFormatter;
|
||||||
extra.align = 'right';
|
extra.align = 'right';
|
||||||
}
|
}
|
||||||
// link / status 标记的列统一走单元格插槽
|
// link / status 标记的列统一走单元格插槽
|
||||||
if (column.link || column.status) extra.slot = true;
|
if (column.link || column.status) extra.slot = true;
|
||||||
if (!extra.formatter) extra.formatter = textFormatter;
|
// 插槽列不挂兜底 formatter:avue 中 formatter 会覆盖单元格插槽渲染
|
||||||
|
if (!extra.slot && !extra.formatter) extra.formatter = textFormatter;
|
||||||
return { ...column, ...extra };
|
return { ...column, ...extra };
|
||||||
});
|
});
|
||||||
|
|
||||||
export const formalSettlementOption = () => ({
|
export const formalSettlementOption = (settlementType = '') => ({
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
calcHeight: 32,
|
calcHeight: 32,
|
||||||
tip: false,
|
tip: false,
|
||||||
searchBtnText: '查询',
|
|
||||||
emptyBtnText: '重置',
|
|
||||||
searchShow: true,
|
|
||||||
searchIcon: true,
|
|
||||||
searchLabelWidth: 88,
|
|
||||||
// 查询/重置紧跟首行 4 个条件(4×5 + 菜单 4 = 24),不再独占下一整行
|
|
||||||
searchMenuSpan: 4,
|
|
||||||
searchIndex: 4,
|
|
||||||
searchMenuPosition: 'right',
|
|
||||||
border: true,
|
border: true,
|
||||||
index: true,
|
index: true,
|
||||||
indexLabel: '序号',
|
indexLabel: '序号',
|
||||||
@@ -130,44 +91,10 @@ export const formalSettlementOption = () => ({
|
|||||||
editBtn: false,
|
editBtn: false,
|
||||||
menuWidth: 320,
|
menuWidth: 320,
|
||||||
menuFixed: 'right',
|
menuFixed: 'right',
|
||||||
column: [
|
column: [...buildTableColumns(settlementType)],
|
||||||
// ---------- 仅搜索列 ----------
|
|
||||||
searchOnlyColumn({
|
|
||||||
label: '预付结算单号',
|
|
||||||
prop: 'preSettlementNo',
|
|
||||||
searchOrder: 8,
|
|
||||||
}),
|
|
||||||
searchOnlyColumn({
|
|
||||||
label: '发票状态',
|
|
||||||
prop: 'invoiceStatus',
|
|
||||||
searchOrder: 5,
|
|
||||||
type: 'select',
|
|
||||||
dicData: invoiceStatusOptions,
|
|
||||||
}),
|
|
||||||
searchOnlyColumn({
|
|
||||||
label: '收付款状态',
|
|
||||||
prop: 'paymentStatus',
|
|
||||||
searchOrder: 4,
|
|
||||||
type: 'select',
|
|
||||||
dicData: paymentStatusOptions,
|
|
||||||
}),
|
|
||||||
searchOnlyColumn({
|
|
||||||
label: '审核状态',
|
|
||||||
prop: 'approvalStatus',
|
|
||||||
searchOrder: 3,
|
|
||||||
type: 'select',
|
|
||||||
dicData: approvalStatusOptions,
|
|
||||||
}),
|
|
||||||
searchOnlyColumn({
|
|
||||||
label: '生成日期',
|
|
||||||
prop: 'createDateRange',
|
|
||||||
searchOrder: 1,
|
|
||||||
type: 'daterange',
|
|
||||||
}),
|
|
||||||
// ---------- 表格列(部分兼搜索项) ----------
|
|
||||||
...buildTableColumns(),
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const kingdeeSyncName = value => pickLabel(kingdeeSyncStatusOptions, value);
|
export const kingdeeSyncName = value => pickLabel(kingdeeSyncStatusOptions, value);
|
||||||
export const paymentStatusName = value => pickLabel(paymentStatusOptions, value);
|
export const kingdeeWriteOffName = value => pickLabel(kingdeeWriteOffStatusOptions, value);
|
||||||
|
export const paymentStatusName = (value, settlementType) =>
|
||||||
|
pickLabel(paymentStatusOptions(settlementType), value);
|
||||||
|
|||||||
@@ -10,6 +10,12 @@ export const formalSettlementFormFields = [
|
|||||||
{ label: '结算金额', prop: 'settlementAmount', readonly: true, money: true },
|
{ label: '结算金额', prop: 'settlementAmount', readonly: true, money: true },
|
||||||
{ label: '业务模式', prop: 'businessModel', type: 'select', optionsKey: 'businessModelOptions' },
|
{ label: '业务模式', prop: 'businessModel', type: 'select', optionsKey: 'businessModelOptions' },
|
||||||
{ label: '运输方式', prop: 'transportType', type: 'select', optionsKey: 'transportTypeOptions' },
|
{ label: '运输方式', prop: 'transportType', type: 'select', optionsKey: 'transportTypeOptions' },
|
||||||
|
{
|
||||||
|
label: '用印类型',
|
||||||
|
prop: 'sealTypes',
|
||||||
|
type: 'multi-select',
|
||||||
|
optionsKey: 'sealTypeOptions',
|
||||||
|
},
|
||||||
{ label: '汇率日期', prop: 'exchangeRateDate', type: 'date', required: true },
|
{ label: '汇率日期', prop: 'exchangeRateDate', type: 'date', required: true },
|
||||||
{ label: '结算汇率', prop: 'exchangeRate', type: 'number', required: true },
|
{ label: '结算汇率', prop: 'exchangeRate', type: 'number', required: true },
|
||||||
{ label: '本位币合计', prop: 'localSettlementAmount', readonly: true, money: true },
|
{ label: '本位币合计', prop: 'localSettlementAmount', readonly: true, money: true },
|
||||||
@@ -29,6 +35,7 @@ export const createFormalSettlementForm = () => ({
|
|||||||
sourceDetailIds: [],
|
sourceDetailIds: [],
|
||||||
businessModel: '',
|
businessModel: '',
|
||||||
transportType: '',
|
transportType: '',
|
||||||
|
sealTypes: [],
|
||||||
exchangeRateDate: '',
|
exchangeRateDate: '',
|
||||||
exchangeRate: 1,
|
exchangeRate: 1,
|
||||||
createUserName: '',
|
createUserName: '',
|
||||||
|
|||||||
@@ -6,27 +6,28 @@ export const approvalStatusOptions = [
|
|||||||
{ label: '已作废', value: 'voided' },
|
{ label: '已作废', value: 'voided' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const invoiceStatusOptions = [
|
/** 发票状态选项按结算类型区分:付款结算单=收票方向,收款结算单=开票方向 */
|
||||||
{ label: '未开/收票', value: 'unreceived' },
|
export const invoiceStatusOptions = (settlementType = '') => {
|
||||||
{ label: '部分开/收票', value: 'partial' },
|
const received = settlementType === 'payable';
|
||||||
{ label: '已开/收票', value: 'completed' },
|
return [
|
||||||
];
|
{ label: received ? '未收票' : '未开票', value: 'unreceived' },
|
||||||
|
{ label: received ? '部分收票' : '部分开票', value: 'partial' },
|
||||||
export const invoiceStatusName = (value, settlementType) => {
|
{ label: received ? '已收票' : '已开票', value: 'completed' },
|
||||||
const payable = settlementType === 'payable';
|
];
|
||||||
const labels = {
|
|
||||||
unreceived: payable ? '未收票' : '未开票',
|
|
||||||
partial: payable ? '部分收票' : '部分开票',
|
|
||||||
completed: payable ? '已收票' : '已开票',
|
|
||||||
};
|
|
||||||
return labels[value] || value || '-';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const paymentStatusOptions = [
|
export const invoiceStatusName = (value, settlementType) =>
|
||||||
{ label: '未收/付款', value: 'unpaid' },
|
invoiceStatusOptions(settlementType).find(item => item.value === value)?.label || value || '-';
|
||||||
{ label: '部分收/付款', value: 'partial' },
|
|
||||||
{ label: '已收/付款', value: 'paid' },
|
/** 收付款状态选项按结算类型区分:付款结算单=付款方向,收款结算单=收款方向 */
|
||||||
];
|
export const paymentStatusOptions = (settlementType = '') => {
|
||||||
|
const suffix = settlementType === 'payable' ? '付款' : '收款';
|
||||||
|
return [
|
||||||
|
{ label: `未${suffix}`, value: 'unpaid' },
|
||||||
|
{ label: `部分${suffix}`, value: 'partial' },
|
||||||
|
{ label: `已${suffix}`, value: 'paid' },
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
export const kingdeeSyncStatusOptions = [
|
export const kingdeeSyncStatusOptions = [
|
||||||
{ label: '未同步', value: 'unsynced' },
|
{ label: '未同步', value: 'unsynced' },
|
||||||
@@ -34,22 +35,7 @@ export const kingdeeSyncStatusOptions = [
|
|||||||
{ label: '同步失败', value: 'failed' },
|
{ label: '同步失败', value: 'failed' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const formalSettlementSearchFields = [
|
export const kingdeeWriteOffStatusOptions = [
|
||||||
{ label: '结算单号', prop: 'formalSettlementNo', type: 'input' },
|
{ label: '未冲销', value: 'unwrittenoff' },
|
||||||
{ label: '预付结算单号', prop: 'preSettlementNo', type: 'input' },
|
{ label: '已冲销', value: 'writtenoff' },
|
||||||
{ label: '项目', prop: 'projectName', type: 'input' },
|
|
||||||
{ label: '所属组织', prop: 'deptName', type: 'cascader' },
|
|
||||||
{ label: '合同编号', prop: 'contractNo', type: 'input' },
|
|
||||||
{ label: '付款方', prop: 'payerName', type: 'input' },
|
|
||||||
{ label: '收款方', prop: 'payeeName', type: 'input' },
|
|
||||||
{ label: '发票状态', prop: 'invoiceStatus', type: 'select', options: invoiceStatusOptions },
|
|
||||||
{ label: '收付款状态', prop: 'paymentStatus', type: 'select', options: paymentStatusOptions },
|
|
||||||
{ label: '审核状态', prop: 'approvalStatus', type: 'select', options: approvalStatusOptions },
|
|
||||||
{
|
|
||||||
label: '金蝶单据状态',
|
|
||||||
prop: 'kingdeeSyncStatus',
|
|
||||||
type: 'select',
|
|
||||||
options: kingdeeSyncStatusOptions,
|
|
||||||
},
|
|
||||||
{ label: '生成日期', prop: 'createDateRange', type: 'daterange' },
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export const formalSettlementTableColumns = [
|
|||||||
{ label: '原币结算金额', prop: 'settlementAmount', minWidth: 145, money: true },
|
{ label: '原币结算金额', prop: 'settlementAmount', minWidth: 145, money: true },
|
||||||
{ label: '业务模式', prop: 'businessModelName', minWidth: 120 },
|
{ label: '业务模式', prop: 'businessModelName', minWidth: 120 },
|
||||||
{ label: '运输方式', prop: 'transportTypeName', minWidth: 120 },
|
{ label: '运输方式', prop: 'transportTypeName', minWidth: 120 },
|
||||||
|
{ label: '用印类型', prop: 'sealTypes', minWidth: 120 },
|
||||||
{ label: '本位币结算金额', prop: 'localSettlementAmount', minWidth: 155, money: true },
|
{ label: '本位币结算金额', prop: 'localSettlementAmount', minWidth: 155, money: true },
|
||||||
{ label: '结算汇率', prop: 'exchangeRate', minWidth: 110 },
|
{ label: '结算汇率', prop: 'exchangeRate', minWidth: 110 },
|
||||||
{ label: '申请付款金额(含预付)', prop: 'appliedPaymentAmount', minWidth: 185, money: true },
|
{ label: '申请付款金额(含预付)', prop: 'appliedPaymentAmount', minWidth: 185, money: true },
|
||||||
@@ -25,7 +26,9 @@ export const formalSettlementTableColumns = [
|
|||||||
{ label: '来源原单号', prop: 'originFormalSettlementNo', minWidth: 170 },
|
{ label: '来源原单号', prop: 'originFormalSettlementNo', minWidth: 170 },
|
||||||
{ label: '金蝶单据号', prop: 'kingdeeBillNo', minWidth: 150 },
|
{ label: '金蝶单据号', prop: 'kingdeeBillNo', minWidth: 150 },
|
||||||
{ label: '金蝶单据状态', prop: 'kingdeeSyncStatus', minWidth: 135 },
|
{ label: '金蝶单据状态', prop: 'kingdeeSyncStatus', minWidth: 135 },
|
||||||
|
{ label: '金蝶冲销状态', prop: 'kingdeeWriteOffStatus', minWidth: 135 },
|
||||||
{ label: '金蝶锁状态', prop: 'kingdeeLockStatus', minWidth: 150 },
|
{ label: '金蝶锁状态', prop: 'kingdeeLockStatus', minWidth: 150 },
|
||||||
|
{ label: '已指定应付', prop: 'kingdeeAssignStatus', minWidth: 120 },
|
||||||
{ label: '附件同步', prop: 'attachmentSyncStatusName', minWidth: 100 },
|
{ label: '附件同步', prop: 'attachmentSyncStatusName', minWidth: 100 },
|
||||||
{ label: '创建人', prop: 'createUserName', minWidth: 110 },
|
{ label: '创建人', prop: 'createUserName', minWidth: 110 },
|
||||||
{ label: '创建时间', prop: 'createTime', minWidth: 170 },
|
{ label: '创建时间', prop: 'createTime', minWidth: 170 },
|
||||||
|
|||||||
@@ -8,12 +8,30 @@ export const preSettlementFormFields = [
|
|||||||
{ label: '合同名称', prop: 'contractId', type: 'contract', required: true },
|
{ label: '合同名称', prop: 'contractId', type: 'contract', required: true },
|
||||||
{ label: '合同编号', prop: 'contractNo', readonly: true },
|
{ label: '合同编号', prop: 'contractNo', readonly: true },
|
||||||
{ label: '项目名称', prop: 'projectName', readonly: true },
|
{ label: '项目名称', prop: 'projectName', readonly: true },
|
||||||
{ label: '收款方', prop: 'payeeName', readonly: true },
|
{
|
||||||
{ label: '付款方', prop: 'payerName', readonly: true },
|
label: '收款方',
|
||||||
|
prop: 'payeeName',
|
||||||
|
type: 'select',
|
||||||
|
optionsKey: 'payeeOptions',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '付款方',
|
||||||
|
prop: 'payerName',
|
||||||
|
type: 'select',
|
||||||
|
optionsKey: 'payerOptions',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
{ label: '结算类型', prop: 'settlementType', readonly: true },
|
{ label: '结算类型', prop: 'settlementType', readonly: true },
|
||||||
{ label: '结算金额', prop: 'settlementAmount', readonly: true, money: true },
|
{ label: '结算金额', prop: 'settlementAmount', readonly: true, money: true },
|
||||||
{ label: '业务模式', prop: 'businessModel', type: 'select', optionsKey: 'businessModelOptions' },
|
{ label: '业务模式', prop: 'businessModel', type: 'select', optionsKey: 'businessModelOptions' },
|
||||||
{ label: '运输方式', prop: 'transportType', type: 'select', optionsKey: 'transportTypeOptions' },
|
{ label: '运输方式', prop: 'transportType', type: 'select', optionsKey: 'transportTypeOptions' },
|
||||||
|
{
|
||||||
|
label: '用印类型',
|
||||||
|
prop: 'sealTypes',
|
||||||
|
type: 'multi-select',
|
||||||
|
optionsKey: 'sealTypeOptions',
|
||||||
|
},
|
||||||
{ label: '汇率日期', prop: 'exchangeRateDate', type: 'date' },
|
{ label: '汇率日期', prop: 'exchangeRateDate', type: 'date' },
|
||||||
{ label: '结算汇率', prop: 'exchangeRate', type: 'number', class: 'exchange-rate-input' },
|
{ label: '结算汇率', prop: 'exchangeRate', type: 'number', class: 'exchange-rate-input' },
|
||||||
{ label: '本位币合计', prop: 'localSettlementAmount', readonly: true, money: true },
|
{ label: '本位币合计', prop: 'localSettlementAmount', readonly: true, money: true },
|
||||||
@@ -24,6 +42,8 @@ export const preSettlementFormFields = [
|
|||||||
|
|
||||||
export const preSettlementFormRules = {
|
export const preSettlementFormRules = {
|
||||||
contractId: [{ required: true, message: '请选择合同名称', trigger: 'change' }],
|
contractId: [{ required: true, message: '请选择合同名称', trigger: 'change' }],
|
||||||
|
payeeName: [{ required: true, message: '请选择收款方', trigger: 'change' }],
|
||||||
|
payerName: [{ required: true, message: '请选择付款方', trigger: 'change' }],
|
||||||
exchangeRateDate: [
|
exchangeRateDate: [
|
||||||
{
|
{
|
||||||
validator: (_rule, value, callback, source) => {
|
validator: (_rule, value, callback, source) => {
|
||||||
@@ -68,6 +88,7 @@ export const emptyPreSettlementForm = () => ({
|
|||||||
settlementAmount: 0,
|
settlementAmount: 0,
|
||||||
businessModel: '',
|
businessModel: '',
|
||||||
transportType: '',
|
transportType: '',
|
||||||
|
sealTypes: [],
|
||||||
localCurrency: 'RMB',
|
localCurrency: 'RMB',
|
||||||
localSettlementAmount: 0,
|
localSettlementAmount: 0,
|
||||||
exchangeRateDate: '',
|
exchangeRateDate: '',
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export const preSettlementTableColumns = [
|
|||||||
{ label: '原币结算金额', prop: 'settlementAmount', minWidth: 140, money: true, precision: 2 },
|
{ label: '原币结算金额', prop: 'settlementAmount', minWidth: 140, money: true, precision: 2 },
|
||||||
{ label: '业务模式', prop: 'businessModelName', minWidth: 120 },
|
{ label: '业务模式', prop: 'businessModelName', minWidth: 120 },
|
||||||
{ label: '运输方式', prop: 'transportTypeName', minWidth: 120 },
|
{ label: '运输方式', prop: 'transportTypeName', minWidth: 120 },
|
||||||
|
{ label: '用印类型', prop: 'sealTypes', minWidth: 120 },
|
||||||
{ label: '本位币结算金额', prop: 'localSettlementAmount', minWidth: 150, money: true, precision: 2 },
|
{ label: '本位币结算金额', prop: 'localSettlementAmount', minWidth: 150, money: true, precision: 2 },
|
||||||
{ label: '结算汇率', prop: 'exchangeRate', minWidth: 110, precision: 2 },
|
{ label: '结算汇率', prop: 'exchangeRate', minWidth: 110, precision: 2 },
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export const searchFields = [
|
|||||||
{ label: '预付结算单号', prop: 'preSettlementNo', type: 'input' },
|
{ label: '预付结算单号', prop: 'preSettlementNo', type: 'input' },
|
||||||
{ label: '正式结算单号', prop: 'formalSettlementNo', type: 'input' },
|
{ label: '正式结算单号', prop: 'formalSettlementNo', type: 'input' },
|
||||||
{ label: '批次号', prop: 'batchNo', type: 'input' },
|
{ label: '批次号', prop: 'batchNo', type: 'input' },
|
||||||
|
{ label: '运单号', prop: 'waybillNo', type: 'input' },
|
||||||
{ label: '车号', prop: 'vehicleNo', type: 'input' },
|
{ label: '车号', prop: 'vehicleNo', type: 'input' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ export default {
|
|||||||
hide: true,
|
hide: true,
|
||||||
span: 24,
|
span: 24,
|
||||||
order: 55,
|
order: 55,
|
||||||
rules: [{ required: true, message: '请选择所属组织', trigger: 'change' }],
|
// 所属组织可为空:为空表示未分配组织,账号的数据权限为空集
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属组织',
|
label: '所属组织',
|
||||||
@@ -203,10 +203,9 @@ export default {
|
|||||||
overHidden: true,
|
overHidden: true,
|
||||||
hide: true,
|
hide: true,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: true,
|
editDisplay: false,
|
||||||
viewDisplay: true,
|
viewDisplay: true,
|
||||||
order: 40,
|
order: 40,
|
||||||
placeholder: '可清空以解绑微信',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '状态',
|
label: '状态',
|
||||||
|
|||||||
+26
-31
@@ -315,29 +315,6 @@ export const userOption = safe => {
|
|||||||
{ label: '承运商', value: 2 },
|
{ label: '承运商', value: 2 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '数据权限范围',
|
|
||||||
prop: 'dataScopeRange',
|
|
||||||
type: 'radio',
|
|
||||||
span: 24,
|
|
||||||
value: 1,
|
|
||||||
dicData: [
|
|
||||||
{ label: '仅所属组织', value: 1 },
|
|
||||||
{ label: '全部组织', value: 2 },
|
|
||||||
{ label: '自定义', value: 3 },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '数据层级范围',
|
|
||||||
prop: 'dataLevelRange',
|
|
||||||
type: 'radio',
|
|
||||||
span: 24,
|
|
||||||
value: 1,
|
|
||||||
dicData: [
|
|
||||||
{ label: '包含下级', value: 1 },
|
|
||||||
{ label: '仅本级', value: 2 },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '备注',
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
@@ -515,17 +492,35 @@ export const treeOption = {
|
|||||||
nodeKey: 'id',
|
nodeKey: 'id',
|
||||||
lazy: true,
|
lazy: true,
|
||||||
treeLoad: function (node, resolve) {
|
treeLoad: function (node, resolve) {
|
||||||
const parentId = node.level === 0 ? 0 : node.data.id;
|
const toTreeNode = item => ({
|
||||||
getDeptLazyTree(parentId).then(res => {
|
|
||||||
resolve(
|
|
||||||
res.data.data.map(item => {
|
|
||||||
return {
|
|
||||||
...item,
|
...item,
|
||||||
leaf: !item.hasChildren,
|
leaf: !item.hasChildren,
|
||||||
};
|
|
||||||
})
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
// 用户管理组织树从第二级开始展示:根层隐藏一级组织,直接展示其子节点
|
||||||
|
if (node.level === 0) {
|
||||||
|
getDeptLazyTree(0)
|
||||||
|
.then(res => {
|
||||||
|
const roots = res.data.data || [];
|
||||||
|
if (!roots.length) {
|
||||||
|
resolve([]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return Promise.all(roots.map(root => getDeptLazyTree(root.id))).then(childResults => {
|
||||||
|
const secondLevel = [];
|
||||||
|
childResults.forEach(childRes => {
|
||||||
|
(childRes.data.data || []).forEach(item => secondLevel.push(toTreeNode(item)));
|
||||||
|
});
|
||||||
|
resolve(secondLevel);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => resolve([]));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getDeptLazyTree(node.data.id)
|
||||||
|
.then(res => {
|
||||||
|
resolve((res.data.data || []).map(toTreeNode));
|
||||||
|
})
|
||||||
|
.catch(() => resolve([]));
|
||||||
},
|
},
|
||||||
addBtn: false,
|
addBtn: false,
|
||||||
menu: false,
|
menu: false,
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ export const option = {
|
|||||||
searchOrder: 1,
|
searchOrder: 1,
|
||||||
searchslot: true,
|
searchslot: true,
|
||||||
slot: true,
|
slot: true,
|
||||||
|
overHidden: true,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -55,6 +56,8 @@ export const option = {
|
|||||||
prop: 'useDepartment',
|
prop: 'useDepartment',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 3,
|
searchOrder: 3,
|
||||||
|
slot: true,
|
||||||
|
overHidden: true,
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,6 +95,28 @@ export default [
|
|||||||
bizType: 'project-apply',
|
bizType: 'project-apply',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/business/project-change/public-view',
|
||||||
|
name: '查看项目变更信息',
|
||||||
|
component: () => import('@/views/business/project-apply-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'project-change',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/business/project-record-change/public-view',
|
||||||
|
name: '查看项目备案信息',
|
||||||
|
component: () => import('@/views/business/project-apply-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'project-record-change',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/business/contract-manage/public-view',
|
path: '/business/contract-manage/public-view',
|
||||||
name: '查看合同信息',
|
name: '查看合同信息',
|
||||||
@@ -106,6 +128,17 @@ export default [
|
|||||||
bizType: 'contract-manage',
|
bizType: 'contract-manage',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/business/contract-change/public-view',
|
||||||
|
name: '查看合同变更信息',
|
||||||
|
component: () => import('@/views/business/contract-change-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'contract-change',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/settlement/pre-settlement/public-view',
|
path: '/settlement/pre-settlement/public-view',
|
||||||
name: '查看预付结算单信息',
|
name: '查看预付结算单信息',
|
||||||
@@ -172,6 +205,39 @@ export default [
|
|||||||
bizType: 'bill-payment',
|
bizType: 'bill-payment',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/business/temporary-credit-limit/public-view',
|
||||||
|
name: '查看临时额度申请信息',
|
||||||
|
component: () => import('@/views/business/temporary-credit-limit-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'temporary-credit-limit',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/transportCapacity/cert-audit-driver/public-view',
|
||||||
|
name: '查看司机认证审核信息',
|
||||||
|
component: () => import('@/views/transportCapacity/cert-audit-driver-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'cert-audit-driver',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/transportCapacity/cert-audit-vehicle/public-view',
|
||||||
|
name: '查看车辆认证审核信息',
|
||||||
|
component: () => import('@/views/transportCapacity/cert-audit-vehicle-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'cert-audit-vehicle',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
name: '主页',
|
name: '主页',
|
||||||
|
|||||||
@@ -104,6 +104,22 @@ export default [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// 兼容旧菜单路径:按 detailNo 解析应付/应收后跳转到拆分后的列表页
|
||||||
|
path: '/settlement/formal-settlement',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '正式结算单兼容跳转',
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
activeMenu: '/settlement/payment-settlement',
|
||||||
|
},
|
||||||
|
component: loadView(() => import('@/views/settlement/formal-settlement-redirect.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/settlement/formal-settlement/form',
|
path: '/settlement/formal-settlement/form',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
@@ -113,7 +129,39 @@ export default [
|
|||||||
name: '新增编辑结算单',
|
name: '新增编辑结算单',
|
||||||
meta: {
|
meta: {
|
||||||
keepAlive: false,
|
keepAlive: false,
|
||||||
// 付款/收款结算单共用表单页,具体高亮菜单由页面按 settlementType 回写
|
// 付款结算单表单入口,高亮付款结算单菜单
|
||||||
|
activeMenu: '/settlement/payment-settlement',
|
||||||
|
},
|
||||||
|
component: loadView(() => import('@/views/settlement/formal-settlement-form.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// 收款结算单表单入口:与付款结算单共用表单组件,仅高亮菜单不同
|
||||||
|
path: '/settlement/receipt-settlement/form',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '新增编辑收款结算单',
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
activeMenu: '/settlement/receipt-settlement',
|
||||||
|
},
|
||||||
|
component: loadView(() => import('@/views/settlement/formal-settlement-form.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// 付款结算单表单入口:与 settlementListPath('payable') + '/form' 对应
|
||||||
|
path: '/settlement/payment-settlement/form',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '新增编辑付款结算单',
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
activeMenu: '/settlement/payment-settlement',
|
activeMenu: '/settlement/payment-settlement',
|
||||||
},
|
},
|
||||||
component: loadView(() => import('@/views/settlement/formal-settlement-form.vue')),
|
component: loadView(() => import('@/views/settlement/formal-settlement-form.vue')),
|
||||||
@@ -198,6 +246,18 @@ export default [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/business/project-change/form',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '项目变更表单',
|
||||||
|
meta: { keepAlive: false, activeMenu: '/business/project-change' },
|
||||||
|
component: loadView(() => import('@/views/business/project-apply.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/business/waybill-manage/form',
|
path: '/business/waybill-manage/form',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
@@ -342,6 +402,18 @@ export default [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/business/contract-change/form',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '合同变更表单',
|
||||||
|
meta: { keepAlive: false, activeMenu: '/business/contract-change' },
|
||||||
|
component: loadView(() => import('@/views/business/contract-manage-change.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/wel',
|
path: '/wel',
|
||||||
component: () =>
|
component: () =>
|
||||||
|
|||||||
@@ -622,7 +622,7 @@
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 合同管理新增/编辑弹窗(business-crud-page 封装 → avue-crud,弹窗带 avue-crud__dialog class)
|
// 合同管理新增/编辑弹窗(avue-crud,弹窗带 avue-crud__dialog class)
|
||||||
// 复刻 waybill-manage 方案:接近全屏、压过库内置 .avue-dialog 的 calc(100% - 200px),
|
// 复刻 waybill-manage 方案:接近全屏、压过库内置 .avue-dialog 的 calc(100% - 200px),
|
||||||
// 并解开 body 的 200px 上限、抵消全局 footer 的 -30px 上移
|
// 并解开 body 的 200px 上限、抵消全局 footer 的 -30px 上移
|
||||||
.contract-manage-dialog.el-dialog {
|
.contract-manage-dialog.el-dialog {
|
||||||
|
|||||||
@@ -26,6 +26,35 @@ const uniqueOrgNames = (values = []) => {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 候选司机取数上限:超出后只能靠关键字缩小范围
|
||||||
|
const DRIVER_CANDIDATE_MAX_SIZE = 200;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 派单候选司机:租户内的司机档案,按岗位等条件过滤。
|
||||||
|
*
|
||||||
|
* 与组织、承运商都无关——司机档案与组织树、承运商之间没有外键,`organization_name`
|
||||||
|
* 只是自由文本,用它做匹配会让小程序自动建档的司机永远进不了候选。
|
||||||
|
*/
|
||||||
|
export const fetchDriverCandidates = async (query = {}) => {
|
||||||
|
const params = { ...query };
|
||||||
|
const size = Math.min(Math.max(Number(params.size) || 50, 50), DRIVER_CANDIDATE_MAX_SIZE);
|
||||||
|
delete params.size;
|
||||||
|
const res = await getDriverList(1, size, params);
|
||||||
|
return extractRecords(res).slice(0, size);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司机候选项的展示文本:姓名(手机尾号后 4 位)。
|
||||||
|
*
|
||||||
|
* 只用于下拉渲染。写回表单的仍是姓名本身,别把带尾号的文本当值用。
|
||||||
|
*/
|
||||||
|
export const driverOptionText = (item = {}) => {
|
||||||
|
const name = normalizeOrgName(item.driverName || item.name);
|
||||||
|
const mobile = String(item.mobile || item.phone || item.driverPhone || '').trim();
|
||||||
|
if (!name) return '';
|
||||||
|
return mobile.length >= 4 ? `${name}(${mobile.slice(-4)})` : name;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解析承运商客商档案上联系人的所属组织(branchName),无联系人时回退客商所属组织。
|
* 解析承运商客商档案上联系人的所属组织(branchName),无联系人时回退客商所属组织。
|
||||||
*/
|
*/
|
||||||
@@ -72,13 +101,6 @@ export const resolveCarrierOrganizationNames = async ({ carrierId, carrierName }
|
|||||||
return orgNames;
|
return orgNames;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const clearCarrierOrganizationCache = (carrier = {}) => {
|
|
||||||
const id = String(carrier.carrierId || '').trim();
|
|
||||||
const name = normalizeOrgName(carrier.carrierName);
|
|
||||||
if (id) orgNameCache.delete(id);
|
|
||||||
if (name) orgNameCache.delete(name);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const matchOrganizationName = (value, orgNames = []) => {
|
export const matchOrganizationName = (value, orgNames = []) => {
|
||||||
const text = normalizeOrgName(value);
|
const text = normalizeOrgName(value);
|
||||||
if (!text || !orgNames.length) return false;
|
if (!text || !orgNames.length) return false;
|
||||||
@@ -90,34 +112,9 @@ const filterByOrganizations = (records = [], orgNames = []) => {
|
|||||||
return records.filter(item => matchOrganizationName(item.organizationName, orgNames));
|
return records.filter(item => matchOrganizationName(item.organizationName, orgNames));
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* 按承运商联系人所属组织筛选司机。
|
|
||||||
* 未选择承运商时返回空列表(需先选承运商)。
|
|
||||||
*/
|
|
||||||
export const fetchDriversByCarrierOrganizations = async (
|
|
||||||
query = {},
|
|
||||||
{ carrierId, carrierName } = {}
|
|
||||||
) => {
|
|
||||||
if (!String(carrierId || '').trim() && !normalizeOrgName(carrierName)) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
const orgNames = await resolveCarrierOrganizationNames({ carrierId, carrierName });
|
|
||||||
if (!orgNames.length) return [];
|
|
||||||
|
|
||||||
const size = Math.max(Number(query.size) || 50, 50);
|
|
||||||
const params = { ...query };
|
|
||||||
delete params.size;
|
|
||||||
// 单组织时用后端模糊条件缩小范围;多组织再前端精确过滤
|
|
||||||
if (orgNames.length === 1) {
|
|
||||||
params.organizationName = orgNames[0];
|
|
||||||
}
|
|
||||||
const res = await getDriverList(1, Math.min(size * 5, 200), params);
|
|
||||||
return filterByOrganizations(extractRecords(res), orgNames).slice(0, size);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按承运商联系人所属组织筛选车辆。
|
* 按承运商联系人所属组织筛选车辆。
|
||||||
* 未选择承运商时返回空列表。
|
* 未选择承运商时返回空列表(需先选承运商)。
|
||||||
*/
|
*/
|
||||||
export const fetchVehiclesByCarrierOrganizations = async (
|
export const fetchVehiclesByCarrierOrganizations = async (
|
||||||
query = {},
|
query = {},
|
||||||
|
|||||||
@@ -106,6 +106,9 @@ const CERT_SNAPSHOT_GROUPS = {
|
|||||||
fields: [
|
fields: [
|
||||||
{ key: 'realName', label: '真实姓名' },
|
{ key: 'realName', label: '真实姓名' },
|
||||||
{ key: 'idCardNo', label: '身份证号' },
|
{ key: 'idCardNo', label: '身份证号' },
|
||||||
|
{ key: 'birthday', label: '出生年月', type: TYPE_DATE },
|
||||||
|
{ key: 'addressRegion', label: '住址' },
|
||||||
|
{ key: 'address', label: '详细地址' },
|
||||||
{ key: 'idCardFrontUrl', label: '身份证正面照', type: TYPE_IMAGE },
|
{ key: 'idCardFrontUrl', label: '身份证正面照', type: TYPE_IMAGE },
|
||||||
{ key: 'idCardBackUrl', label: '身份证反面照', type: TYPE_IMAGE },
|
{ key: 'idCardBackUrl', label: '身份证反面照', type: TYPE_IMAGE },
|
||||||
{ key: 'idCardValidStart', label: '身份证有效期起', type: TYPE_DATE },
|
{ key: 'idCardValidStart', label: '身份证有效期起', type: TYPE_DATE },
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* 业务部门下拉规范化。
|
||||||
|
* rawLabel 保留原始部门名供落库;展示名优先追加所属公司,缺省时用上级组织。
|
||||||
|
*
|
||||||
|
* @param {Array} list 业务部门原始列表
|
||||||
|
* @param {{ alwaysShowCompany?: boolean }} [options]
|
||||||
|
* alwaysShowCompany=true 时始终展示「部门(公司)」;默认仅同名时追加
|
||||||
|
*/
|
||||||
|
export function normalizeBusinessDeptOptions(list, options = {}) {
|
||||||
|
const alwaysShowCompany = !!options.alwaysShowCompany;
|
||||||
|
const source = Array.isArray(list) ? list : [];
|
||||||
|
const nameCount = {};
|
||||||
|
source.forEach(item => {
|
||||||
|
const name = String(item?.deptName || item?.fullName || '').trim();
|
||||||
|
if (!name) return;
|
||||||
|
nameCount[name] = (nameCount[name] || 0) + 1;
|
||||||
|
});
|
||||||
|
return source
|
||||||
|
.map(item => {
|
||||||
|
const id = item?.id == null || item?.id === '' ? '' : String(item.id);
|
||||||
|
if (!id) return null;
|
||||||
|
const rawLabel = item.deptName || item.fullName || id;
|
||||||
|
const companyName = String(item.belongCompanyName || item.parentName || '').trim();
|
||||||
|
const label =
|
||||||
|
companyName && (alwaysShowCompany || nameCount[rawLabel] > 1)
|
||||||
|
? `${rawLabel}(${companyName})`
|
||||||
|
: rawLabel;
|
||||||
|
return {
|
||||||
|
id,
|
||||||
|
value: id,
|
||||||
|
label,
|
||||||
|
rawLabel,
|
||||||
|
parentName: String(item.parentName || '').trim(),
|
||||||
|
belongCompanyName: String(item.belongCompanyName || '').trim(),
|
||||||
|
kingdeeDeptCode: item.kingdeeDeptCode || '',
|
||||||
|
};
|
||||||
|
})
|
||||||
|
.filter(Boolean);
|
||||||
|
}
|
||||||
@@ -21,16 +21,17 @@ export const isKingdeePathAttachment = attachment => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求金蝶文件流:成功返回 Blob;业务失败为 HTTP 200 + R.fail JSON(响应通道未写流时后端即失败),
|
* 请求金蝶文件流(公共核):成功返回 Blob;业务失败为 HTTP 200 + R.fail JSON
|
||||||
* 按 Content-Type 识别并抛出带 msg 的错误;网络级失败拦截器已提示,标记 silent 避免重复提示。
|
* (响应通道未写流时后端即失败),按 Content-Type 识别并抛出带 msg 的错误;
|
||||||
|
* 网络级失败拦截器已提示,标记 silent 避免重复提示。
|
||||||
* 供查看(弹窗内预览)/下载两类入口复用
|
* 供查看(弹窗内预览)/下载两类入口复用
|
||||||
* @param {String} invoiceNo 发票号码
|
* @param {Function} fetcher 文件流请求函数(返回 axios blob 响应)
|
||||||
* @returns {Promise<Blob>}
|
* @returns {Promise<Blob>}
|
||||||
*/
|
*/
|
||||||
export const requestKingdeeFile = async invoiceNo => {
|
const fetchKingdeeBlob = async fetcher => {
|
||||||
let res;
|
let res;
|
||||||
try {
|
try {
|
||||||
res = await downloadInvoicePoolAttachment(invoiceNo);
|
res = await fetcher();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw Object.assign(new Error(error?.message || '附件下载失败'), { silent: true });
|
throw Object.assign(new Error(error?.message || '附件下载失败'), { silent: true });
|
||||||
}
|
}
|
||||||
@@ -51,6 +52,45 @@ export const requestKingdeeFile = async invoiceNo => {
|
|||||||
return blob;
|
return blob;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求金蝶文件流:票池发票按发票号回源(后端代理 A801-2)
|
||||||
|
* @param {String} invoiceNo 发票号码
|
||||||
|
* @returns {Promise<Blob>}
|
||||||
|
*/
|
||||||
|
export const requestKingdeeFile = invoiceNo => fetchKingdeeBlob(() => downloadInvoicePoolAttachment(invoiceNo));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载金蝶侧附件(经 A801-2 后端代理,公共入口),失败统一 ElMessage 提示
|
||||||
|
* @param {Function} fetcher 文件流请求函数
|
||||||
|
* @param {String} fileName 下载文件名
|
||||||
|
*/
|
||||||
|
export const downloadKingdeeFile = async (fetcher, fileName) => {
|
||||||
|
try {
|
||||||
|
const blob = await fetchKingdeeBlob(fetcher);
|
||||||
|
downloadFile(blob, fileName);
|
||||||
|
} catch (error) {
|
||||||
|
if (!error?.silent) ElMessage.error(error?.message || '金蝶附件下载失败');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新窗口预览金蝶侧附件(经 A801-2 后端代理,公共入口):拉取 Blob 转 objectURL
|
||||||
|
* (PDF 可预览;OFD 等浏览器不可预览的格式由浏览器触发下载)
|
||||||
|
* @param {Function} fetcher 文件流请求函数
|
||||||
|
* @param {String} fileName 预览文件名
|
||||||
|
*/
|
||||||
|
export const viewKingdeeFile = async (fetcher, fileName) => {
|
||||||
|
try {
|
||||||
|
const blob = await fetchKingdeeBlob(fetcher);
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
window.open(url, '_blank');
|
||||||
|
// 延迟释放 objectURL:立即回收可能导致新窗口尚未加载完成即失效
|
||||||
|
setTimeout(() => URL.revokeObjectURL(url), 60000);
|
||||||
|
} catch (error) {
|
||||||
|
if (!error?.silent) ElMessage.error(error?.message || '金蝶附件预览失败');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下载金蝶侧发票附件(经 A801-2 后端代理),失败统一 ElMessage 提示
|
* 下载金蝶侧发票附件(经 A801-2 后端代理),失败统一 ElMessage 提示
|
||||||
* @param {String} invoiceNo 发票号码
|
* @param {String} invoiceNo 发票号码
|
||||||
@@ -61,12 +101,7 @@ export const downloadKingdeeInvoiceFile = async (invoiceNo, fileName) => {
|
|||||||
ElMessage.warning('当前发票缺少发票号码,无法下载金蝶侧附件');
|
ElMessage.warning('当前发票缺少发票号码,无法下载金蝶侧附件');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
await downloadKingdeeFile(() => downloadInvoicePoolAttachment(invoiceNo), fileName || `${invoiceNo}.pdf`);
|
||||||
const blob = await requestKingdeeFile(invoiceNo);
|
|
||||||
downloadFile(blob, fileName || `${invoiceNo}.pdf`);
|
|
||||||
} catch (error) {
|
|
||||||
if (!error?.silent) ElMessage.error(error?.message || '金蝶附件下载失败');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,13 +114,5 @@ export const viewKingdeeInvoiceFile = async (invoiceNo, fileName) => {
|
|||||||
ElMessage.warning('当前发票缺少发票号码,无法预览金蝶侧附件');
|
ElMessage.warning('当前发票缺少发票号码,无法预览金蝶侧附件');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
await viewKingdeeFile(() => downloadInvoicePoolAttachment(invoiceNo), fileName || `${invoiceNo}.pdf`);
|
||||||
const blob = await requestKingdeeFile(invoiceNo);
|
|
||||||
const url = URL.createObjectURL(blob);
|
|
||||||
window.open(url, '_blank');
|
|
||||||
// 延迟释放 objectURL:立即回收可能导致新窗口尚未加载完成即失效
|
|
||||||
setTimeout(() => URL.revokeObjectURL(url), 60000);
|
|
||||||
} catch (error) {
|
|
||||||
if (!error?.silent) ElMessage.error(error?.message || '金蝶附件预览失败');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
/**
|
||||||
|
* 金蝶单据状态公共映射
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** 金蝶单据状态 → el-tag 颜色类型(failed 状态列表页悬浮展示失败原因) */
|
||||||
|
export const KINGDEE_STATUS_TAG_TYPES = {
|
||||||
|
synced: 'success',
|
||||||
|
paid: 'success',
|
||||||
|
invoiced: 'success',
|
||||||
|
paying: 'warning',
|
||||||
|
failed: 'danger',
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 金蝶单据状态 → el-tag 颜色类型,未映射状态返回 info */
|
||||||
|
export const kingdeeStatusType = status => KINGDEE_STATUS_TAG_TYPES[status] || 'info';
|
||||||
|
|
||||||
|
/** 收票登记推送状态 → el-tag 颜色类型(已指定应付=绿、已保存收票单=黄、推送失败=红、未推送=灰) */
|
||||||
|
export const KINGDEE_PUSH_STATUS_TAG_TYPES = {
|
||||||
|
unsynced: 'info',
|
||||||
|
pushed: 'warning',
|
||||||
|
assigned: 'success',
|
||||||
|
failed: 'danger',
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 收票登记推送状态 → el-tag 颜色类型,未映射状态返回 info */
|
||||||
|
export const kingdeePushStatusType = status => KINGDEE_PUSH_STATUS_TAG_TYPES[status] || 'info';
|
||||||
|
|
||||||
|
/** 金蝶冲销状态 → el-tag 颜色类型(已冲销=绿、未冲销=黄) */
|
||||||
|
export const KINGDEE_WRITEOFF_TAG_TYPES = {
|
||||||
|
writtenoff: 'success',
|
||||||
|
unwrittenoff: 'warning',
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 金蝶冲销状态 → el-tag 颜色类型,未映射状态(null=未校验)返回 info */
|
||||||
|
export const kingdeeWriteOffTagType = status => KINGDEE_WRITEOFF_TAG_TYPES[status] || 'info';
|
||||||
@@ -15,12 +15,37 @@ export const MK_BIZ = {
|
|||||||
rejected: ['rejected', 'change_rejected', 'withdrawn'],
|
rejected: ['rejected', 'change_rejected', 'withdrawn'],
|
||||||
approved: ['approved', 'change_approved'],
|
approved: ['approved', 'change_approved'],
|
||||||
},
|
},
|
||||||
|
'project-change': {
|
||||||
|
dictName: '提交项目变更审核流',
|
||||||
|
subjectPrefix: '项目变更审批',
|
||||||
|
rejected: ['rejected', 'withdrawn'],
|
||||||
|
approved: ['approved'],
|
||||||
|
},
|
||||||
|
/** 项目备案流程(本部/运输部)共用 */
|
||||||
|
'project-record-change': {
|
||||||
|
dictName: '提交项目备案审核流',
|
||||||
|
subjectPrefix: '项目备案审批',
|
||||||
|
rejected: ['rejected', 'withdrawn'],
|
||||||
|
approved: ['approved'],
|
||||||
|
},
|
||||||
|
'temporary-credit-limit': {
|
||||||
|
dictName: '提交临时额度审核流',
|
||||||
|
subjectPrefix: '临时额度审批',
|
||||||
|
rejected: ['rejected', 'withdrawn'],
|
||||||
|
approved: ['approved'],
|
||||||
|
},
|
||||||
'contract-manage': {
|
'contract-manage': {
|
||||||
dictName: '提交合同审核流',
|
dictName: '提交合同审核流',
|
||||||
subjectPrefix: '合同审批',
|
subjectPrefix: '合同审批',
|
||||||
rejected: ['rejected', 'change_rejected', 'withdrawn'],
|
rejected: ['rejected', 'change_rejected', 'withdrawn'],
|
||||||
approved: ['approved', 'change_approved'],
|
approved: ['approved', 'change_approved'],
|
||||||
},
|
},
|
||||||
|
'contract-change': {
|
||||||
|
dictName: '提交合同变更审核流',
|
||||||
|
subjectPrefix: '合同变更审批',
|
||||||
|
rejected: ['rejected', 'withdrawn'],
|
||||||
|
approved: ['approved'],
|
||||||
|
},
|
||||||
'pre-settlement': {
|
'pre-settlement': {
|
||||||
dictName: '提交预结算审核流',
|
dictName: '提交预结算审核流',
|
||||||
subjectPrefix: '预付结算审批',
|
subjectPrefix: '预付结算审批',
|
||||||
@@ -57,10 +82,42 @@ export const MK_BIZ = {
|
|||||||
rejected: ['returned'],
|
rejected: ['returned'],
|
||||||
approved: ['approved'],
|
approved: ['approved'],
|
||||||
},
|
},
|
||||||
|
'cert-audit-driver': {
|
||||||
|
dictName: '提交司机审核流',
|
||||||
|
subjectPrefix: '司机认证审批',
|
||||||
|
// 认证记录 status:0审核中 1已通过 2已驳回
|
||||||
|
rejected: ['2'],
|
||||||
|
approved: ['1'],
|
||||||
|
},
|
||||||
|
'cert-audit-vehicle': {
|
||||||
|
dictName: '提交车辆审核流',
|
||||||
|
subjectPrefix: '车辆认证审批',
|
||||||
|
rejected: ['2'],
|
||||||
|
approved: ['1'],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** 按认证对象类型解析 MK 业务类型 */
|
||||||
|
export function resolveCertAuditMkBizType(bizType) {
|
||||||
|
return String(bizType || '') === 'vehicle' ? 'cert-audit-vehicle' : 'cert-audit-driver';
|
||||||
|
}
|
||||||
|
|
||||||
const MK_SWITCH_NAME = '开启MK';
|
const MK_SWITCH_NAME = '开启MK';
|
||||||
|
|
||||||
|
/** 项目备案类变更类型(含历史「项目备案调整」) */
|
||||||
|
export const PROJECT_RECORD_CHANGE_TYPES = [
|
||||||
|
'项目备案流程(本部流程)',
|
||||||
|
'项目备案流程(运输部流程)',
|
||||||
|
'项目备案调整',
|
||||||
|
];
|
||||||
|
|
||||||
|
/** 按变更类型选择项目变更 / 项目备案 MK 业务类型 */
|
||||||
|
export function resolveProjectChangeMkBizType(changeType) {
|
||||||
|
return PROJECT_RECORD_CHANGE_TYPES.includes(String(changeType || '').trim())
|
||||||
|
? 'project-record-change'
|
||||||
|
: 'project-change';
|
||||||
|
}
|
||||||
|
|
||||||
/** 进程内缓存,避免每次提交都打字典;登录后同一会话开关一般不变 */
|
/** 进程内缓存,避免每次提交都打字典;登录后同一会话开关一般不变 */
|
||||||
let mkEnabledCache = null;
|
let mkEnabledCache = null;
|
||||||
let mkEnabledPromise = null;
|
let mkEnabledPromise = null;
|
||||||
@@ -142,6 +199,7 @@ export function isMkApprovedStatus(bizType, approvalStatus) {
|
|||||||
* @param {string} [options.subjectName] 标题后缀
|
* @param {string} [options.subjectName] 标题后缀
|
||||||
* @param {string} [options.approvalStatus] 提交前的审批状态
|
* @param {string} [options.approvalStatus] 提交前的审批状态
|
||||||
* @param {boolean} [options.mkEnabled] 调用方已知开关时传入,false 时立即跳过
|
* @param {boolean} [options.mkEnabled] 调用方已知开关时传入,false 时立即跳过
|
||||||
|
* @param {Object} [options.tempVarData] 传给 MK 的临时变量(如项目类型 projectType、用印类型 sealTypes)
|
||||||
* @returns {Promise<boolean>} true=已发起/复用 MK 流程,false=未开启或已跳过
|
* @returns {Promise<boolean>} true=已发起/复用 MK 流程,false=未开启或已跳过
|
||||||
*/
|
*/
|
||||||
export async function submitMkApprovalFlow({
|
export async function submitMkApprovalFlow({
|
||||||
@@ -150,6 +208,7 @@ export async function submitMkApprovalFlow({
|
|||||||
subjectName = '',
|
subjectName = '',
|
||||||
approvalStatus = '',
|
approvalStatus = '',
|
||||||
mkEnabled,
|
mkEnabled,
|
||||||
|
tempVarData,
|
||||||
} = {}) {
|
} = {}) {
|
||||||
const conf = MK_BIZ[bizType];
|
const conf = MK_BIZ[bizType];
|
||||||
if (!conf) {
|
if (!conf) {
|
||||||
@@ -190,12 +249,16 @@ export async function submitMkApprovalFlow({
|
|||||||
const subject = subjectName
|
const subject = subjectName
|
||||||
? `${conf.subjectPrefix}:${subjectName}`
|
? `${conf.subjectPrefix}:${subjectName}`
|
||||||
: `${conf.subjectPrefix}:${bizIdText}`;
|
: `${conf.subjectPrefix}:${bizIdText}`;
|
||||||
await processSubmit({
|
const submitPayload = {
|
||||||
templateCode,
|
templateCode,
|
||||||
bizId: bizIdText,
|
bizId: bizIdText,
|
||||||
subject,
|
subject,
|
||||||
bizType,
|
bizType,
|
||||||
forceNewFormInstance,
|
forceNewFormInstance,
|
||||||
});
|
};
|
||||||
|
if (tempVarData != null && typeof tempVarData === 'object') {
|
||||||
|
submitPayload.tempVarData = tempVarData;
|
||||||
|
}
|
||||||
|
await processSubmit(submitPayload);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
/**
|
||||||
|
* 客商/合同风险标签公共展示逻辑(黑名单=金蝶黑名单 A801-5 命中,与后端 HcsCreditCheckSupport 口径一致):
|
||||||
|
* 等级与黑名单组合展示、等级在前;内部组织客商默认无风险
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** 金蝶黑名单命中判定(客商档案行:失信类别/列入事由任一非空) */
|
||||||
|
export function isKingdeeBlack(category, reason) {
|
||||||
|
return !!(category || reason);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 合同行黑名单判定(推送链路按金蝶命中口径落库 kingdeeBlackStatus=yes) */
|
||||||
|
export function isContractBlack(blackStatus) {
|
||||||
|
return String(blackStatus || '').toLowerCase() === 'yes';
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 风险标签文案:riskLevel=C101-1 等级(0/1/2);isBlack=金蝶黑名单命中;customerKind=internal 显示"无风险" */
|
||||||
|
export function resolveRiskTagName(riskLevel, isBlack, customerKind) {
|
||||||
|
const levelName = { 2: '高风险', 1: '中风险', 0: '低风险' }[riskLevel] || '';
|
||||||
|
if (isBlack) return levelName ? `${levelName}、黑名单` : '黑名单';
|
||||||
|
if (levelName) return levelName;
|
||||||
|
if (customerKind === 'internal') return '无风险';
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 是否红色风险标签(黑名单命中或高风险) */
|
||||||
|
export function isRiskyTag(riskLevel, isBlack) {
|
||||||
|
return isBlack || riskLevel === '2';
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
/** 结算单用印类型固定选项(展示顺序固定) */
|
||||||
|
export const SETTLEMENT_SEAL_TYPE_OPTIONS = [
|
||||||
|
{ dictKey: '公章', dictValue: '公章' },
|
||||||
|
{ dictKey: '业务章', dictValue: '业务章' },
|
||||||
|
];
|
||||||
|
|
||||||
|
const SEAL_TYPE_ORDER = SETTLEMENT_SEAL_TYPE_OPTIONS.map(item => item.dictKey);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析用印类型为数组(兼容顿号、逗号分隔)
|
||||||
|
*/
|
||||||
|
export const parseSealTypes = value => {
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
return value.map(item => String(item || '').trim()).filter(Boolean);
|
||||||
|
}
|
||||||
|
if (value === undefined || value === null || value === '') {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return String(value)
|
||||||
|
.split(/[、,,\s]+/)
|
||||||
|
.map(item => item.trim())
|
||||||
|
.filter(Boolean);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用印类型按固定顺序顿号拼接,供保存与列表展示
|
||||||
|
*/
|
||||||
|
export const formatSealTypes = value => {
|
||||||
|
const selected = new Set(parseSealTypes(value));
|
||||||
|
return SEAL_TYPE_ORDER.filter(item => selected.has(item)).join('、');
|
||||||
|
};
|
||||||
+208
-92
@@ -6,6 +6,7 @@
|
|||||||
:data="data"
|
:data="data"
|
||||||
ref="crud"
|
ref="crud"
|
||||||
v-model="form"
|
v-model="form"
|
||||||
|
v-model:page="page"
|
||||||
:permission="permissionList"
|
:permission="permissionList"
|
||||||
:before-open="beforeOpen"
|
:before-open="beforeOpen"
|
||||||
@row-del="rowDel"
|
@row-del="rowDel"
|
||||||
@@ -50,7 +51,7 @@
|
|||||||
title="角色权限配置"
|
title="角色权限配置"
|
||||||
append-to-body
|
append-to-body
|
||||||
v-model="box"
|
v-model="box"
|
||||||
width="345px"
|
width="960px"
|
||||||
@close="handleDialogClose"
|
@close="handleDialogClose"
|
||||||
>
|
>
|
||||||
<el-tabs type="border-card">
|
<el-tabs type="border-card">
|
||||||
@@ -91,6 +92,7 @@
|
|||||||
ref="treeMenu"
|
ref="treeMenu"
|
||||||
:default-checked-keys="menuTreeObj"
|
:default-checked-keys="menuTreeObj"
|
||||||
:props="props"
|
:props="props"
|
||||||
|
@check="handleMenuCheck"
|
||||||
>
|
>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@@ -100,41 +102,26 @@
|
|||||||
align="middle"
|
align="middle"
|
||||||
style="margin-bottom: 12px; background: #f5f7fa; padding: 6px 10px; border-radius: 4px"
|
style="margin-bottom: 12px; background: #f5f7fa; padding: 6px 10px; border-radius: 4px"
|
||||||
>
|
>
|
||||||
<span style="display: inline-flex; align-items: center">
|
<span style="color: #606266; font-size: 13px"
|
||||||
<el-switch
|
>菜单权限勾选/反选会自动同步到此页;仅展示已勾选菜单,已配置的数据权限会保留。可再调整勾选后点击「设置」批量配置</span
|
||||||
v-model="dataScopeLinked"
|
|
||||||
active-text="节点联动"
|
|
||||||
size="small"
|
|
||||||
@change="handleLinkedChange('treeDataScope')"
|
|
||||||
/>
|
|
||||||
<el-tooltip content="开启后勾选父节点会自动勾选所有子节点,关闭则可独立勾选任意节点" placement="top">
|
|
||||||
<el-icon style="margin-left: 4px; color: #909399; cursor: pointer"><el-icon-question-filled /></el-icon>
|
|
||||||
</el-tooltip>
|
|
||||||
</span>
|
|
||||||
<el-button-group>
|
|
||||||
<el-button
|
|
||||||
size="small"
|
|
||||||
plain
|
|
||||||
@click="handleSelectAll('treeDataScope', dataScopeGrantList)"
|
|
||||||
>全选</el-button
|
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button type="primary" size="small" @click="openDataScopeSetting">设置</el-button>
|
||||||
size="small"
|
|
||||||
plain
|
|
||||||
@click="handleInvertSelect('treeDataScope', dataScopeGrantList, dataScopeLinked)"
|
|
||||||
>反选</el-button
|
|
||||||
>
|
|
||||||
</el-button-group>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-tree
|
<el-tree
|
||||||
:data="dataScopeGrantList"
|
:data="roleDataScopeMenuTree"
|
||||||
show-checkbox
|
show-checkbox
|
||||||
:check-strictly="!dataScopeLinked"
|
|
||||||
node-key="id"
|
node-key="id"
|
||||||
ref="treeDataScope"
|
ref="treeRoleDataScope"
|
||||||
:default-checked-keys="dataScopeTreeObj"
|
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
|
<template #default="{ data }">
|
||||||
|
<span class="role-data-scope-node">
|
||||||
|
<span>{{ data.title }}</span>
|
||||||
|
<span v-if="getMenuScopeLabel(data.id)" class="role-data-scope-tag"
|
||||||
|
>【{{ getMenuScopeLabel(data.id) }}】</span
|
||||||
|
>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="接口权限">
|
<el-tab-pane label="接口权限">
|
||||||
@@ -188,6 +175,33 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="数据权限设置"
|
||||||
|
append-to-body
|
||||||
|
v-model="dataScopeSettingBox"
|
||||||
|
width="560px"
|
||||||
|
class="role-data-scope-setting-dialog"
|
||||||
|
>
|
||||||
|
<el-form label-position="right" label-width="auto">
|
||||||
|
<el-form-item label="角色名称">
|
||||||
|
<el-input v-model="dataScopeSetting.roleName" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据权限">
|
||||||
|
<el-radio-group v-model="dataScopeSetting.scopeType">
|
||||||
|
<el-radio :value="1">所在部门及下级</el-radio>
|
||||||
|
<el-radio :value="2">全部组织</el-radio>
|
||||||
|
<el-radio :value="3">本人创建</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="dataScopeSettingBox = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submitDataScopeSetting">保存</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -196,37 +210,42 @@ import {
|
|||||||
add,
|
add,
|
||||||
getList,
|
getList,
|
||||||
getRole,
|
getRole,
|
||||||
getRoleAlias,
|
|
||||||
getRoleTreeById,
|
getRoleTreeById,
|
||||||
grant,
|
grant,
|
||||||
grantTree,
|
grantTree,
|
||||||
remove,
|
remove,
|
||||||
update,
|
update,
|
||||||
} from '@/api/system/role';
|
} from '@/api/system/role';
|
||||||
|
import { getRoleMenuDataScopeTree, submitRoleMenuDataScope } from '@/api/system/roleDataScope';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import website from '@/config/website';
|
import website from '@/config/website';
|
||||||
import { validatenull } from '@/utils/validate';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {},
|
form: {},
|
||||||
box: false,
|
box: false,
|
||||||
|
dataScopeSettingBox: false,
|
||||||
props: {
|
props: {
|
||||||
label: 'title',
|
label: 'title',
|
||||||
value: 'key',
|
value: 'key',
|
||||||
},
|
},
|
||||||
menuGrantList: [],
|
menuGrantList: [],
|
||||||
dataScopeGrantList: [],
|
|
||||||
apiScopeGrantList: [],
|
apiScopeGrantList: [],
|
||||||
apiGrantList: [],
|
apiGrantList: [],
|
||||||
menuTreeObj: [],
|
menuTreeObj: [],
|
||||||
dataScopeTreeObj: [],
|
|
||||||
apiScopeTreeObj: [],
|
apiScopeTreeObj: [],
|
||||||
menuLinked: false,
|
menuLinked: false,
|
||||||
dataScopeLinked: false,
|
|
||||||
apiScopeLinked: false,
|
apiScopeLinked: false,
|
||||||
currentRoleIds: [],
|
currentRoleIds: [],
|
||||||
|
currentRoleName: '',
|
||||||
|
roleDataScopeMenuTree: [],
|
||||||
|
roleDataScopeMap: {},
|
||||||
|
dataScopeSetting: {
|
||||||
|
roleName: '',
|
||||||
|
scopeType: 2,
|
||||||
|
menuIds: [],
|
||||||
|
},
|
||||||
selectionList: [],
|
selectionList: [],
|
||||||
query: {},
|
query: {},
|
||||||
loading: true,
|
loading: true,
|
||||||
@@ -309,32 +328,19 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '角色别名',
|
label: '角色标识',
|
||||||
labelTip: '用于权限校验与标注的属性,可手动录入也可点击现有别名快速录入',
|
labelTip: '用于权限校验与标注的属性',
|
||||||
prop: 'roleAlias',
|
prop: 'roleAlias',
|
||||||
search: true,
|
search: true,
|
||||||
span: 24,
|
span: 24,
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入角色别名',
|
message: '请输入角色标识',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '现有别名',
|
|
||||||
labelTip: '当前系统已存在的角色别名,点击可快速录入',
|
|
||||||
prop: 'currentAlias',
|
|
||||||
type: 'radio',
|
|
||||||
dicData: [],
|
|
||||||
props: {
|
|
||||||
label: 'roleName',
|
|
||||||
value: 'roleAlias',
|
|
||||||
},
|
|
||||||
hide: true,
|
|
||||||
span: 24,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '角色排序',
|
label: '角色排序',
|
||||||
prop: 'sort',
|
prop: 'sort',
|
||||||
@@ -378,14 +384,6 @@ export default {
|
|||||||
return ids;
|
return ids;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
'form.currentAlias'() {
|
|
||||||
const alias = this.form.currentAlias;
|
|
||||||
if (!validatenull(alias)) {
|
|
||||||
this.form.roleAlias = alias;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
initData(roleId) {
|
initData(roleId) {
|
||||||
getRoleTreeById(roleId).then(res => {
|
getRoleTreeById(roleId).then(res => {
|
||||||
@@ -419,6 +417,11 @@ export default {
|
|||||||
if (!tree) return;
|
if (!tree) return;
|
||||||
const allKeys = this.getAllNodeKeys(dataList);
|
const allKeys = this.getAllNodeKeys(dataList);
|
||||||
tree.setCheckedKeys(allKeys);
|
tree.setCheckedKeys(allKeys);
|
||||||
|
if (treeRef === 'treeMenu') {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.syncDataScopeTreeFromMenu();
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleInvertSelect(treeRef, dataList, isLinked) {
|
handleInvertSelect(treeRef, dataList, isLinked) {
|
||||||
const tree = this.$refs[treeRef];
|
const tree = this.$refs[treeRef];
|
||||||
@@ -433,6 +436,11 @@ export default {
|
|||||||
const invertedKeys = allKeys.filter(key => !checkedKeys.has(key));
|
const invertedKeys = allKeys.filter(key => !checkedKeys.has(key));
|
||||||
tree.setCheckedKeys(invertedKeys);
|
tree.setCheckedKeys(invertedKeys);
|
||||||
}
|
}
|
||||||
|
if (treeRef === 'treeMenu') {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.syncDataScopeTreeFromMenu();
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleLinkedChange(treeRef) {
|
handleLinkedChange(treeRef) {
|
||||||
const tree = this.$refs[treeRef];
|
const tree = this.$refs[treeRef];
|
||||||
@@ -441,6 +449,9 @@ export default {
|
|||||||
const halfCheckedKeys = tree.getHalfCheckedKeys();
|
const halfCheckedKeys = tree.getHalfCheckedKeys();
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
tree.setCheckedKeys([...checkedKeys, ...halfCheckedKeys]);
|
tree.setCheckedKeys([...checkedKeys, ...halfCheckedKeys]);
|
||||||
|
if (treeRef === 'treeMenu') {
|
||||||
|
this.syncDataScopeTreeFromMenu();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// el-tree 会把 setCheckedKeys 的入参记录为默认勾选集并在树数据重载时回放,
|
// el-tree 会把 setCheckedKeys 的入参记录为默认勾选集并在树数据重载时回放,
|
||||||
@@ -450,11 +461,55 @@ export default {
|
|||||||
if (!tree) return;
|
if (!tree) return;
|
||||||
tree.setCheckedKeys(keys);
|
tree.setCheckedKeys(keys);
|
||||||
},
|
},
|
||||||
|
handleMenuCheck() {
|
||||||
|
this.syncDataScopeTreeFromMenu();
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 按当前菜单权限勾选结果过滤数据权限树,并同步勾选状态。
|
||||||
|
* 取消勾选的菜单从数据权限树移除;已配置的数据权限标签仍保留在 roleDataScopeMap。
|
||||||
|
*/
|
||||||
|
syncDataScopeTreeFromMenu() {
|
||||||
|
const treeMenu = this.$refs.treeMenu;
|
||||||
|
if (!treeMenu) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const checkedKeys = treeMenu.getCheckedKeys() || [];
|
||||||
|
const checkedKeySet = new Set(checkedKeys);
|
||||||
|
this.roleDataScopeMenuTree = this.filterMenuTreeByChecked(this.menuGrantList, checkedKeySet);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const treeDataScope = this.$refs.treeRoleDataScope;
|
||||||
|
if (!treeDataScope) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const visibleKeys = new Set(this.getAllNodeKeys(this.roleDataScopeMenuTree));
|
||||||
|
const syncKeys = checkedKeys.filter(key => visibleKeys.has(key));
|
||||||
|
treeDataScope.setCheckedKeys(syncKeys);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 仅保留已勾选菜单及其祖先节点,保持树层级。
|
||||||
|
*/
|
||||||
|
filterMenuTreeByChecked(nodes, checkedKeySet) {
|
||||||
|
if (!nodes || nodes.length === 0) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
const result = [];
|
||||||
|
nodes.forEach(node => {
|
||||||
|
const children = this.filterMenuTreeByChecked(node.children || [], checkedKeySet);
|
||||||
|
if (checkedKeySet.has(node.id) || children.length > 0) {
|
||||||
|
result.push({
|
||||||
|
...node,
|
||||||
|
children,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
},
|
||||||
submit() {
|
submit() {
|
||||||
const menuList = this.$refs.treeMenu.getCheckedKeys();
|
const menuList = this.$refs.treeMenu.getCheckedKeys();
|
||||||
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
|
|
||||||
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
|
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
|
||||||
grant(this.currentRoleIds, menuList, dataScopeList, apiScopeList).then(() => {
|
// 数据权限已改为角色菜单配置;传 null 跳过原生 dataScope 更新,避免误清历史配置
|
||||||
|
grant(this.currentRoleIds, menuList, null, apiScopeList).then(() => {
|
||||||
this.box = false;
|
this.box = false;
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
@@ -465,6 +520,61 @@ export default {
|
|||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getMenuScopeLabel(menuId) {
|
||||||
|
const scope = this.roleDataScopeMap[String(menuId)];
|
||||||
|
return scope ? scope.scopeTypeName : '';
|
||||||
|
},
|
||||||
|
loadRoleDataScopeTree(roleId) {
|
||||||
|
return getRoleMenuDataScopeTree(roleId).then(res => {
|
||||||
|
const data = res.data.data || {};
|
||||||
|
this.currentRoleName = data.roleName || '';
|
||||||
|
// 菜单树由菜单权限勾选实时联动生成;这里只加载已配置的数据权限标签
|
||||||
|
const scopeMap = {};
|
||||||
|
(data.scopes || []).forEach(item => {
|
||||||
|
scopeMap[String(item.menuId)] = item;
|
||||||
|
});
|
||||||
|
this.roleDataScopeMap = scopeMap;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
openDataScopeSetting() {
|
||||||
|
const tree = this.$refs.treeRoleDataScope;
|
||||||
|
if (!tree) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const menuIds = tree.getCheckedKeys();
|
||||||
|
if (!menuIds || menuIds.length === 0) {
|
||||||
|
this.$message.warning('请先勾选要设置的菜单');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.dataScopeSetting = {
|
||||||
|
roleName: this.currentRoleName,
|
||||||
|
scopeType: 2,
|
||||||
|
menuIds,
|
||||||
|
};
|
||||||
|
this.dataScopeSettingBox = true;
|
||||||
|
},
|
||||||
|
submitDataScopeSetting() {
|
||||||
|
const roleId = this.currentRoleIds && this.currentRoleIds[0];
|
||||||
|
if (!roleId) {
|
||||||
|
this.$message.warning('角色信息异常,请重新打开权限配置');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const scopeType = Number(this.dataScopeSetting.scopeType || 2);
|
||||||
|
submitRoleMenuDataScope({
|
||||||
|
roleId,
|
||||||
|
menuIds: this.dataScopeSetting.menuIds,
|
||||||
|
scopeType,
|
||||||
|
deptIds: [],
|
||||||
|
}).then(() => {
|
||||||
|
this.$message.success('数据权限设置成功');
|
||||||
|
this.dataScopeSettingBox = false;
|
||||||
|
this.loadRoleDataScopeTree(roleId).then(() => {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.syncDataScopeTreeFromMenu();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
rowSave(row, done, loading) {
|
rowSave(row, done, loading) {
|
||||||
add(this.withTenantId(row)).then(
|
add(this.withTenantId(row)).then(
|
||||||
() => {
|
() => {
|
||||||
@@ -547,10 +657,6 @@ export default {
|
|||||||
this.form.parentId = '';
|
this.form.parentId = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getRoleAlias().then(res => {
|
|
||||||
const column = this.findColumn(this.option.column, 'currentAlias');
|
|
||||||
column.dicData = res.data.data;
|
|
||||||
});
|
|
||||||
done();
|
done();
|
||||||
},
|
},
|
||||||
handleRole() {
|
handleRole() {
|
||||||
@@ -563,58 +669,54 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.menuTreeObj = [];
|
this.menuTreeObj = [];
|
||||||
this.dataScopeTreeObj = [];
|
|
||||||
this.apiScopeTreeObj = [];
|
this.apiScopeTreeObj = [];
|
||||||
// 保存当前要配置权限的角色ID
|
|
||||||
this.currentRoleIds = this.idsArray;
|
this.currentRoleIds = this.idsArray;
|
||||||
grantTree().then(res => {
|
this.currentRoleName = (this.selectionList[0] && this.selectionList[0].roleName) || '';
|
||||||
this.menuGrantList = res.data.data.menu;
|
const roleId = this.currentRoleIds[0];
|
||||||
this.dataScopeGrantList = res.data.data.dataScope;
|
Promise.all([grantTree(), getRole(this.ids), this.loadRoleDataScopeTree(roleId)]).then(results => {
|
||||||
this.apiScopeGrantList = res.data.data.apiScope;
|
const grantRes = results[0];
|
||||||
getRole(this.ids).then(res => {
|
const roleRes = results[1];
|
||||||
this.menuTreeObj = res.data.data.menu;
|
this.menuGrantList = grantRes.data.data.menu;
|
||||||
this.dataScopeTreeObj = res.data.data.dataScope;
|
this.apiScopeGrantList = grantRes.data.data.apiScope;
|
||||||
this.apiScopeTreeObj = res.data.data.apiScope;
|
this.menuTreeObj = roleRes.data.data.menu;
|
||||||
|
this.apiScopeTreeObj = roleRes.data.data.apiScope;
|
||||||
this.box = true;
|
this.box = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.applyCheckedKeys('treeMenu', this.menuTreeObj);
|
this.applyCheckedKeys('treeMenu', this.menuTreeObj);
|
||||||
this.applyCheckedKeys('treeDataScope', this.dataScopeTreeObj);
|
|
||||||
this.applyCheckedKeys('treeApiScope', this.apiScopeTreeObj);
|
this.applyCheckedKeys('treeApiScope', this.apiScopeTreeObj);
|
||||||
});
|
this.syncDataScopeTreeFromMenu();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleRowRole(row) {
|
handleRowRole(row) {
|
||||||
this.menuTreeObj = [];
|
this.menuTreeObj = [];
|
||||||
this.dataScopeTreeObj = [];
|
|
||||||
this.apiScopeTreeObj = [];
|
this.apiScopeTreeObj = [];
|
||||||
// 保存当前要配置权限的角色ID(单个行操作)
|
|
||||||
this.currentRoleIds = [row.id];
|
this.currentRoleIds = [row.id];
|
||||||
grantTree().then(res => {
|
this.currentRoleName = row.roleName || '';
|
||||||
this.menuGrantList = res.data.data.menu;
|
Promise.all([grantTree(), getRole(row.id), this.loadRoleDataScopeTree(row.id)]).then(results => {
|
||||||
this.dataScopeGrantList = res.data.data.dataScope;
|
const grantRes = results[0];
|
||||||
this.apiScopeGrantList = res.data.data.apiScope;
|
const roleRes = results[1];
|
||||||
getRole(row.id).then(res => {
|
this.menuGrantList = grantRes.data.data.menu;
|
||||||
this.menuTreeObj = res.data.data.menu;
|
this.apiScopeGrantList = grantRes.data.data.apiScope;
|
||||||
this.dataScopeTreeObj = res.data.data.dataScope;
|
this.menuTreeObj = roleRes.data.data.menu;
|
||||||
this.apiScopeTreeObj = res.data.data.apiScope;
|
this.apiScopeTreeObj = roleRes.data.data.apiScope;
|
||||||
this.box = true;
|
this.box = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.applyCheckedKeys('treeMenu', this.menuTreeObj);
|
this.applyCheckedKeys('treeMenu', this.menuTreeObj);
|
||||||
this.applyCheckedKeys('treeDataScope', this.dataScopeTreeObj);
|
|
||||||
this.applyCheckedKeys('treeApiScope', this.apiScopeTreeObj);
|
this.applyCheckedKeys('treeApiScope', this.apiScopeTreeObj);
|
||||||
});
|
this.syncDataScopeTreeFromMenu();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleDialogClose() {
|
handleDialogClose() {
|
||||||
// 对话框关闭时清空选择状态和权限树数据
|
|
||||||
this.menuTreeObj = [];
|
this.menuTreeObj = [];
|
||||||
this.dataScopeTreeObj = [];
|
|
||||||
this.apiScopeTreeObj = [];
|
this.apiScopeTreeObj = [];
|
||||||
this.menuLinked = false;
|
this.menuLinked = false;
|
||||||
this.dataScopeLinked = false;
|
|
||||||
this.apiScopeLinked = false;
|
this.apiScopeLinked = false;
|
||||||
|
this.roleDataScopeMenuTree = [];
|
||||||
|
this.roleDataScopeMap = {};
|
||||||
|
this.currentRoleName = '';
|
||||||
|
this.dataScopeSettingBox = false;
|
||||||
this.selectionClear();
|
this.selectionClear();
|
||||||
},
|
},
|
||||||
handleDelete() {
|
handleDelete() {
|
||||||
@@ -651,7 +753,9 @@ export default {
|
|||||||
onLoad(page, params = {}) {
|
onLoad(page, params = {}) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
|
||||||
this.data = res.data.data;
|
const data = res.data.data || {};
|
||||||
|
this.data = data.records || [];
|
||||||
|
this.page.total = data.total || 0;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.selectionClear();
|
this.selectionClear();
|
||||||
});
|
});
|
||||||
@@ -659,3 +763,15 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.role-data-scope-node {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
.role-data-scope-tag {
|
||||||
|
color: #409eff;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -60,6 +60,13 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<template #menu="{ row, index }">
|
<template #menu="{ row, index }">
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
v-if="hasPermission('airport_master_view')"
|
||||||
|
@click="$refs.crud.rowView(row, index)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="hasPermission('airport_master_edit')"
|
v-if="hasPermission('airport_master_edit')"
|
||||||
@@ -279,7 +286,7 @@ export default {
|
|||||||
editBtn: false,
|
editBtn: false,
|
||||||
selection: true,
|
selection: true,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
menuWidth: 180,
|
menuWidth: 220,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
label: '编码',
|
label: '编码',
|
||||||
|
|||||||
@@ -68,6 +68,13 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<template #menu="{ row, index }">
|
<template #menu="{ row, index }">
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
v-if="permission.currency_view"
|
||||||
|
@click="$refs.crud.rowView(row, index)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="permission.currency_edit"
|
v-if="permission.currency_edit"
|
||||||
@@ -171,7 +178,7 @@ export default {
|
|||||||
editBtn: false,
|
editBtn: false,
|
||||||
selection: true,
|
selection: true,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
menuWidth: 180,
|
menuWidth: 220,
|
||||||
menuFixed: 'right',
|
menuFixed: 'right',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,6 +36,13 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<template #menu="{ row, index }">
|
<template #menu="{ row, index }">
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
v-if="permission.customer_type_view"
|
||||||
|
@click="$refs.crud.rowView(row, index)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="permission.customer_type_edit"
|
v-if="permission.customer_type_edit"
|
||||||
@@ -102,7 +109,7 @@ export default {
|
|||||||
editBtn: false,
|
editBtn: false,
|
||||||
selection: true,
|
selection: true,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
menuWidth: 180,
|
menuWidth: 220,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
label: '中文名称',
|
label: '中文名称',
|
||||||
|
|||||||
@@ -76,6 +76,13 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
<template #menu="{ row, index }">
|
<template #menu="{ row, index }">
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
v-if="permission.fee_item_view"
|
||||||
|
@click="$refs.crud.rowView(row, index)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="permission.fee_item_edit"
|
v-if="permission.fee_item_edit"
|
||||||
@@ -141,7 +148,7 @@ export default {
|
|||||||
editBtn: false,
|
editBtn: false,
|
||||||
selection: true,
|
selection: true,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
menuWidth: 180,
|
menuWidth: 220,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
label: '费用类型',
|
label: '费用类型',
|
||||||
|
|||||||
@@ -46,6 +46,13 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<template #menu="{ row, index }">
|
<template #menu="{ row, index }">
|
||||||
|
<el-link
|
||||||
|
v-if="hasPermission('measurement_unit_view')"
|
||||||
|
type="primary"
|
||||||
|
@click="$refs.crud.rowView(row, index)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="hasPermission('measurement_unit_edit')"
|
v-if="hasPermission('measurement_unit_edit')"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|||||||
@@ -134,6 +134,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #menu="{ row, index }">
|
<template #menu="{ row, index }">
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
v-if="hasPermission('port_terminal_view')"
|
||||||
|
@click="$refs.crud.rowView(row, index)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="hasPermission('port_terminal_edit')"
|
v-if="hasPermission('port_terminal_edit')"
|
||||||
@@ -370,7 +377,7 @@ export default {
|
|||||||
editBtn: false,
|
editBtn: false,
|
||||||
selection: true,
|
selection: true,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
menuWidth: 180,
|
menuWidth: 220,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
label: '编码',
|
label: '编码',
|
||||||
|
|||||||
@@ -60,6 +60,13 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<template #menu="{ row, index }">
|
<template #menu="{ row, index }">
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
v-if="hasPermission('railway_station_view')"
|
||||||
|
@click="$refs.crud.rowView(row, index)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="hasPermission('railway_station_edit')"
|
v-if="hasPermission('railway_station_edit')"
|
||||||
@@ -250,7 +257,7 @@ export default {
|
|||||||
editBtn: false,
|
editBtn: false,
|
||||||
selection: true,
|
selection: true,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
menuWidth: 180,
|
menuWidth: 220,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
label: '编码',
|
label: '编码',
|
||||||
|
|||||||
@@ -280,6 +280,23 @@ export default {
|
|||||||
.filter(Boolean)[0] || '';
|
.filter(Boolean)[0] || '';
|
||||||
},
|
},
|
||||||
applyDefaultDeptSearch() {
|
applyDefaultDeptSearch() {
|
||||||
|
// 超管默认不限组织,避免预填当前组织后看不到其他组织/无组织数据。
|
||||||
|
if (this.isAdmin) {
|
||||||
|
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
||||||
|
if (deptColumn) {
|
||||||
|
deptColumn.searchValue = undefined;
|
||||||
|
}
|
||||||
|
const nextQuery = { ...this.query };
|
||||||
|
delete nextQuery.deptId;
|
||||||
|
delete nextQuery.searchDeptId;
|
||||||
|
this.query = nextQuery;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.crud?.searchForm) {
|
||||||
|
this.$refs.crud.searchForm.searchDeptId = undefined;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
const deptId = this.defaultDeptId();
|
const deptId = this.defaultDeptId();
|
||||||
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
||||||
if (!deptId || !deptColumn) return;
|
if (!deptId || !deptColumn) return;
|
||||||
@@ -298,7 +315,8 @@ export default {
|
|||||||
if (deptColumn) {
|
if (deptColumn) {
|
||||||
deptColumn.dicData = this.deptOptions;
|
deptColumn.dicData = this.deptOptions;
|
||||||
}
|
}
|
||||||
// dicData 异步到位后再回填,避免下拉选项为空时清空已选组织,导致请求丢失 deptId。
|
// 超管不回填默认组织;普通用户在 dicData 到位后再回填,避免下拉清空已选组织。
|
||||||
|
if (this.isAdmin) return;
|
||||||
const deptId = String(this.query.deptId || this.defaultDeptId() || '');
|
const deptId = String(this.query.deptId || this.defaultDeptId() || '');
|
||||||
if (!deptId) return;
|
if (!deptId) return;
|
||||||
if (deptColumn) {
|
if (deptColumn) {
|
||||||
|
|||||||
@@ -12,12 +12,12 @@
|
|||||||
<el-descriptions-item label="方案名称">{{
|
<el-descriptions-item label="方案名称">{{
|
||||||
displayValue(draft.planName)
|
displayValue(draft.planName)
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="适用客商">{{
|
||||||
|
displayValue(draft.customerName || partyOptionLabel(draft.partyRowId))
|
||||||
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="运输方式">{{
|
<el-descriptions-item label="运输方式">{{
|
||||||
transportModeLabel(draft.transportMode)
|
transportModeLabel(draft.transportMode)
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="默认方案">{{
|
|
||||||
isDefaultPlan(draft) ? '是' : '否'
|
|
||||||
}}</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="备注">{{ displayValue(draft.remark) }}</el-descriptions-item>
|
<el-descriptions-item label="备注">{{ displayValue(draft.remark) }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-form
|
<el-form
|
||||||
@@ -37,6 +37,20 @@
|
|||||||
:disabled="readonly" /></el-form-item
|
:disabled="readonly" /></el-form-item
|
||||||
></el-col>
|
></el-col>
|
||||||
<el-col :span="8"
|
<el-col :span="8"
|
||||||
|
><el-form-item label="适用客商" prop="partyRowId"
|
||||||
|
><el-select
|
||||||
|
v-model="draft.partyRowId"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择适用客商"
|
||||||
|
@change="handlePartyChange"
|
||||||
|
><el-option
|
||||||
|
v-for="item in partyOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value" /></el-select></el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="8"
|
||||||
><el-form-item label="运输方式" prop="transportMode"
|
><el-form-item label="运输方式" prop="transportMode"
|
||||||
><el-select
|
><el-select
|
||||||
v-model="draft.transportMode"
|
v-model="draft.transportMode"
|
||||||
@@ -51,16 +65,6 @@
|
|||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value" /></el-select></el-form-item
|
:value="item.value" /></el-select></el-form-item
|
||||||
></el-col>
|
></el-col>
|
||||||
<el-col :span="8"
|
|
||||||
><el-form-item
|
|
||||||
><el-checkbox v-model="draft.defaultPlan" :disabled="readonly">默认方案</el-checkbox
|
|
||||||
><el-tooltip content="同一运输方式仅支持配置一个默认计费方案" placement="top">
|
|
||||||
<el-icon class="billing-plan-editor__default-tip"
|
|
||||||
><InfoFilled
|
|
||||||
/></el-icon> </el-tooltip
|
|
||||||
></el-form-item
|
|
||||||
></el-col
|
|
||||||
>
|
|
||||||
<el-col :span="24"
|
<el-col :span="24"
|
||||||
><el-form-item label="备注"
|
><el-form-item label="备注"
|
||||||
><el-input
|
><el-input
|
||||||
@@ -380,6 +384,7 @@ import { InfoFilled } from '@element-plus/icons-vue';
|
|||||||
import { getDictionary } from '@/api/system/dictbiz';
|
import { getDictionary } from '@/api/system/dictbiz';
|
||||||
import SectionCard from '@/components/section-card/main.vue';
|
import SectionCard from '@/components/section-card/main.vue';
|
||||||
import { currencyUnit } from '@/utils/currency';
|
import { currencyUnit } from '@/utils/currency';
|
||||||
|
// InfoFilled 仅用于保底计费重量列头提示
|
||||||
|
|
||||||
const clone = value => JSON.parse(JSON.stringify(value));
|
const clone = value => JSON.parse(JSON.stringify(value));
|
||||||
/** 计费要素与计量单位维度的对应关系(这些要素可选计费单位) */
|
/** 计费要素与计量单位维度的对应关系(这些要素可选计费单位) */
|
||||||
@@ -433,6 +438,7 @@ export default {
|
|||||||
index: { type: Number, default: -1 },
|
index: { type: Number, default: -1 },
|
||||||
readonly: Boolean,
|
readonly: Boolean,
|
||||||
settlementCurrency: { type: String, default: 'RMB' },
|
settlementCurrency: { type: String, default: 'RMB' },
|
||||||
|
partyOptions: { type: Array, default: () => [] },
|
||||||
},
|
},
|
||||||
emits: ['update:modelValue', 'save'],
|
emits: ['update:modelValue', 'save'],
|
||||||
data() {
|
data() {
|
||||||
@@ -476,6 +482,7 @@ export default {
|
|||||||
cargoRequest: null,
|
cargoRequest: null,
|
||||||
formRules: {
|
formRules: {
|
||||||
planName: [{ required: true, message: '请输入方案名称', trigger: 'blur' }],
|
planName: [{ required: true, message: '请输入方案名称', trigger: 'blur' }],
|
||||||
|
partyRowId: [{ required: true, message: '请选择适用客商', trigger: 'change' }],
|
||||||
transportMode: [{ required: true, message: '请选择运输方式', trigger: 'change' }],
|
transportMode: [{ required: true, message: '请选择运输方式', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -516,10 +523,24 @@ export default {
|
|||||||
handler(value) {
|
handler(value) {
|
||||||
if (this.modelValue) {
|
if (this.modelValue) {
|
||||||
this.draft = this.normalizePlan(value);
|
this.draft = this.normalizePlan(value);
|
||||||
|
this.applyDefaultPartySelection();
|
||||||
this.loadRuleItems();
|
this.loadRuleItems();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
modelValue(visible) {
|
||||||
|
if (visible) {
|
||||||
|
this.$nextTick(() => this.applyDefaultPartySelection());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
partyOptions: {
|
||||||
|
deep: true,
|
||||||
|
handler() {
|
||||||
|
if (this.modelValue) {
|
||||||
|
this.applyDefaultPartySelection();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
displayValue(value) {
|
displayValue(value) {
|
||||||
@@ -539,27 +560,62 @@ export default {
|
|||||||
);
|
);
|
||||||
return this.displayValue(option?.label || this.draft.transportModeLabel || value);
|
return this.displayValue(option?.label || this.draft.transportModeLabel || value);
|
||||||
},
|
},
|
||||||
isDefaultPlan(plan) {
|
|
||||||
return (
|
|
||||||
plan?.defaultPlan === true ||
|
|
||||||
plan?.defaultPlan === 1 ||
|
|
||||||
['true', '1'].includes(String(plan?.defaultPlan).toLowerCase())
|
|
||||||
);
|
|
||||||
},
|
|
||||||
normalizePlan(value = {}) {
|
normalizePlan(value = {}) {
|
||||||
const plan = {
|
const plan = {
|
||||||
planName: '',
|
planName: '',
|
||||||
|
partyRowId: '',
|
||||||
|
partyRole: '',
|
||||||
|
customerId: '',
|
||||||
|
customerName: '',
|
||||||
transportMode: '',
|
transportMode: '',
|
||||||
transportModeLabel: '',
|
transportModeLabel: '',
|
||||||
defaultPlan: false,
|
|
||||||
remark: '',
|
remark: '',
|
||||||
...clone(value || {}),
|
...clone(value || {}),
|
||||||
};
|
};
|
||||||
|
// 一个客商对应一个方案,不再维护默认方案字段
|
||||||
|
delete plan.defaultPlan;
|
||||||
plan.rules = (value?.rules?.length ? value.rules : [defaultRule()]).map(rule =>
|
plan.rules = (value?.rules?.length ? value.rules : [defaultRule()]).map(rule =>
|
||||||
this.normalizeRule(rule)
|
this.normalizeRule(rule)
|
||||||
);
|
);
|
||||||
return plan;
|
return plan;
|
||||||
},
|
},
|
||||||
|
partyOptionLabel(partyRowId) {
|
||||||
|
const matched = (this.partyOptions || []).find(
|
||||||
|
item => String(item.value) === String(partyRowId)
|
||||||
|
);
|
||||||
|
return matched?.label || '';
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 仅一个可选客商时默认选中(客户合同仅一个甲方的常见场景)
|
||||||
|
*/
|
||||||
|
applyDefaultPartySelection() {
|
||||||
|
if (this.readonly) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const options = this.partyOptions || [];
|
||||||
|
if (options.length !== 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const current = String(this.draft.partyRowId || '');
|
||||||
|
const only = options[0];
|
||||||
|
const onlyValue = String(only?.value || only?.partyRowId || '');
|
||||||
|
if (!onlyValue) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (current && current === onlyValue) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.handlePartyChange(only.value || only.partyRowId);
|
||||||
|
},
|
||||||
|
handlePartyChange(partyRowId) {
|
||||||
|
const matched = (this.partyOptions || []).find(
|
||||||
|
item => String(item.value) === String(partyRowId)
|
||||||
|
);
|
||||||
|
this.draft.partyRowId = matched?.partyRowId || matched?.value || '';
|
||||||
|
this.draft.partyRole = matched?.partyRole || '';
|
||||||
|
this.draft.customerId = matched?.customerId || '';
|
||||||
|
this.draft.customerName = matched?.customerName || '';
|
||||||
|
},
|
||||||
normalizeRule(rule = {}) {
|
normalizeRule(rule = {}) {
|
||||||
const next = { ...defaultRule(), ...clone(rule) };
|
const next = { ...defaultRule(), ...clone(rule) };
|
||||||
if (next.billingType === '阶梯单价' && next.minimumBillingWeight === '') {
|
if (next.billingType === '阶梯单价' && next.minimumBillingWeight === '') {
|
||||||
@@ -1032,6 +1088,11 @@ export default {
|
|||||||
this.$refs.formRef.validate(valid => {
|
this.$refs.formRef.validate(valid => {
|
||||||
if (!valid || !this.validateRules()) return;
|
if (!valid || !this.validateRules()) return;
|
||||||
const plan = clone(this.draft);
|
const plan = clone(this.draft);
|
||||||
|
this.handlePartyChange(plan.partyRowId);
|
||||||
|
plan.partyRowId = this.draft.partyRowId;
|
||||||
|
plan.partyRole = this.draft.partyRole;
|
||||||
|
plan.customerId = this.draft.customerId;
|
||||||
|
plan.customerName = this.draft.customerName;
|
||||||
const transportMode = this.transportModeOptions.find(
|
const transportMode = this.transportModeOptions.find(
|
||||||
item => String(item.value) === String(plan.transportMode)
|
item => String(item.value) === String(plan.transportMode)
|
||||||
);
|
);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -38,7 +38,7 @@
|
|||||||
contract.hcsFdId || '-'
|
contract.hcsFdId || '-'
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="客商风险">
|
<el-descriptions-item label="客商风险">
|
||||||
<template v-if="contract.hcsRiskLevel || contract.hcsBlackStatus">
|
<template v-if="contract.hcsRiskLevel || contract.kingdeeBlackStatus">
|
||||||
<el-tag
|
<el-tag
|
||||||
v-if="isBlacklist"
|
v-if="isBlacklist"
|
||||||
type="danger"
|
type="danger"
|
||||||
@@ -130,7 +130,7 @@ export default {
|
|||||||
name: 'HcsContractPanel',
|
name: 'HcsContractPanel',
|
||||||
components: { UploadFilled },
|
components: { UploadFilled },
|
||||||
props: {
|
props: {
|
||||||
// 合同详情行(须含 id/hcsSyncStatus/hcsFdId/hcsRiskLevel/hcsBlackStatus/hcsSpecStatus 等)
|
// 合同详情行(须含 id/hcsSyncStatus/hcsFdId/hcsRiskLevel/kingdeeBlackStatus/hcsSpecStatus 等)
|
||||||
contract: { type: Object, required: true },
|
contract: { type: Object, required: true },
|
||||||
},
|
},
|
||||||
emits: ['refresh'],
|
emits: ['refresh'],
|
||||||
@@ -152,7 +152,7 @@ export default {
|
|||||||
return this.contract.hcsSyncMsg || '';
|
return this.contract.hcsSyncMsg || '';
|
||||||
},
|
},
|
||||||
isBlacklist() {
|
isBlacklist() {
|
||||||
return String(this.contract.hcsBlackStatus || '').toLowerCase() === 'yes';
|
return String(this.contract.kingdeeBlackStatus || '').toLowerCase() === 'yes';
|
||||||
},
|
},
|
||||||
specLabel() {
|
specLabel() {
|
||||||
return SPEC_STATUS_OPTIONS.find(item => item.value === this.contract.hcsSpecStatus)?.label || '';
|
return SPEC_STATUS_OPTIONS.find(item => item.value === this.contract.hcsSpecStatus)?.label || '';
|
||||||
|
|||||||
@@ -294,8 +294,8 @@ export default {
|
|||||||
query: { id: String(customerId), name: '查看客商档案', view: '1' },
|
query: { id: String(customerId), name: '查看客商档案', view: '1' },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
waybillStatusName(value) { return ({ pending: '待执行', waiting: '待执行', running: '进行中', processing: '进行中', completed: '已完成', cancelled: '已取消' })[value] || value || '-'; },
|
waybillStatusName(value) { return ({ pending: '待执行', waiting: '待执行', running: '进行中', processing: '进行中', pending_return_confirm: '待回单确认', completed: '已完成', cancelled: '已取消' })[value] || value || '-'; },
|
||||||
waybillStatusType(value) { return ({ pending: 'info', waiting: 'info', running: 'warning', processing: 'warning', completed: 'success', cancelled: 'danger' })[value] || 'info'; },
|
waybillStatusType(value) { return ({ pending: 'info', waiting: 'info', running: 'warning', processing: 'warning', pending_return_confirm: 'warning', completed: 'success', cancelled: 'danger' })[value] || 'info'; },
|
||||||
statusName(value) { return ({ waiting_dispatch: '待调度', dispatching: '调度中', completed: '调度完成', closed: '调度关闭' })[value] || value || '-'; },
|
statusName(value) { return ({ waiting_dispatch: '待调度', dispatching: '调度中', completed: '调度完成', closed: '调度关闭' })[value] || value || '-'; },
|
||||||
statusType(value) { return ({ waiting_dispatch: 'warning', dispatching: 'success', completed: 'primary', closed: 'danger' })[value] || 'info'; },
|
statusType(value) { return ({ waiting_dispatch: 'warning', dispatching: 'success', completed: 'primary', closed: 'danger' })[value] || 'info'; },
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -195,7 +195,7 @@
|
|||||||
<el-form :model="route" label-position="right" label-width="auto" class="dispatch-form carrier-form">
|
<el-form :model="route" label-position="right" label-width="auto" class="dispatch-form carrier-form">
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<template v-if="isRoad(route)">
|
<template v-if="isRoad(route)">
|
||||||
<el-col :span="6"><el-form-item label="承运商" :required="route.carrierType !== '自运'"><el-select :model-value="route.carrierType !== '自运' ? route.carrierContractId : route.carrierName" filterable clearable placeholder="请选择" :loading="carrierLoading" @change="value => handleCarrierContractChange(route, value)"><el-option v-for="item in carrierOptions" :key="carrierOptionValue(item)" :label="carrierOptionLabel(item)" :value="route.carrierType !== '自运' ? carrierOptionValue(item) : item.carrierName" /></el-select></el-form-item></el-col>
|
<el-col :span="6"><el-form-item label="承运商" :required="route.carrierType !== '自运'"><el-select :model-value="route.carrierType !== '自运' ? carrierSelectedValue(route) : route.carrierName" filterable clearable placeholder="请选择" :loading="carrierLoading" @change="value => handleCarrierContractChange(route, value)"><el-option v-for="item in carrierOptions" :key="carrierOptionValue(item)" :label="carrierOptionLabel(item)" :value="route.carrierType !== '自运' ? carrierOptionValue(item) : item.carrierName" /></el-select></el-form-item></el-col>
|
||||||
<el-col :span="6"
|
<el-col :span="6"
|
||||||
><el-form-item label="司机" :required="route.carrierType !== '承运商'"
|
><el-form-item label="司机" :required="route.carrierType !== '承运商'"
|
||||||
><el-autocomplete
|
><el-autocomplete
|
||||||
@@ -210,7 +210,11 @@
|
|||||||
@mousedown="() => handleDriverFocus(route)"
|
@mousedown="() => handleDriverFocus(route)"
|
||||||
@focus="() => handleDriverFocus(route)"
|
@focus="() => handleDriverFocus(route)"
|
||||||
@select="handleDriverSuggestionSelect"
|
@select="handleDriverSuggestionSelect"
|
||||||
/></el-form-item
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete></el-form-item
|
||||||
></el-col>
|
></el-col>
|
||||||
<el-col :span="6"
|
<el-col :span="6"
|
||||||
><el-form-item
|
><el-form-item
|
||||||
@@ -239,7 +243,11 @@
|
|||||||
@mousedown="() => handleDriverFocus(route)"
|
@mousedown="() => handleDriverFocus(route)"
|
||||||
@focus="() => handleDriverFocus(route)"
|
@focus="() => handleDriverFocus(route)"
|
||||||
@select="handleEscortSuggestionSelect"
|
@select="handleEscortSuggestionSelect"
|
||||||
/></el-form-item
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete></el-form-item
|
||||||
></el-col>
|
></el-col>
|
||||||
<el-col v-if="route.carrierType !== '承运商'" :span="6"
|
<el-col v-if="route.carrierType !== '承运商'" :span="6"
|
||||||
><el-form-item label="押运人手机号"
|
><el-form-item label="押运人手机号"
|
||||||
@@ -247,7 +255,7 @@
|
|||||||
></el-col>
|
></el-col>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-col :span="6"><el-form-item label="承运商" :required="route.carrierType !== '自运'"><el-select :model-value="route.carrierType !== '自运' ? route.carrierContractId : route.carrierName" filterable clearable placeholder="请选择" :loading="carrierLoading" @change="value => handleCarrierContractChange(route, value)"><el-option v-for="item in carrierOptions" :key="carrierOptionValue(item)" :label="carrierOptionLabel(item)" :value="route.carrierType !== '自运' ? carrierOptionValue(item) : item.carrierName" /></el-select></el-form-item></el-col>
|
<el-col :span="6"><el-form-item label="承运商" :required="route.carrierType !== '自运'"><el-select :model-value="route.carrierType !== '自运' ? carrierSelectedValue(route) : route.carrierName" filterable clearable placeholder="请选择" :loading="carrierLoading" @change="value => handleCarrierContractChange(route, value)"><el-option v-for="item in carrierOptions" :key="carrierOptionValue(item)" :label="carrierOptionLabel(item)" :value="route.carrierType !== '自运' ? carrierOptionValue(item) : item.carrierName" /></el-select></el-form-item></el-col>
|
||||||
<el-col :span="6"><el-form-item label="船班号/船次号/班次号" required><el-input v-model="route.vehicleNo" placeholder="请输入" /></el-form-item></el-col>
|
<el-col :span="6"><el-form-item label="船班号/船次号/班次号" required><el-input v-model="route.vehicleNo" placeholder="请输入" /></el-form-item></el-col>
|
||||||
<el-col :span="6"><el-form-item label="船长"><el-input v-model="route.captainName" placeholder="请输入" /></el-form-item></el-col>
|
<el-col :span="6"><el-form-item label="船长"><el-input v-model="route.captainName" placeholder="请输入" /></el-form-item></el-col>
|
||||||
<el-col :span="6"><el-form-item label="联系电话"><el-input v-model="route.driverPhone" placeholder="请输入" /></el-form-item></el-col>
|
<el-col :span="6"><el-form-item label="联系电话"><el-input v-model="route.driverPhone" placeholder="请输入" /></el-form-item></el-col>
|
||||||
@@ -316,7 +324,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as api from '@/api/business/master-order';
|
import * as api from '@/api/business/master-order';
|
||||||
import { fetchDriversByCarrierOrganizations } from '@/utils/carrier-org-resource';
|
import { fetchDriverCandidates, driverOptionText } from '@/utils/carrier-org-resource';
|
||||||
import { formatContractOptionLabel } from '@/utils/contract';
|
import { formatContractOptionLabel } from '@/utils/contract';
|
||||||
import {
|
import {
|
||||||
currencyUnit,
|
currencyUnit,
|
||||||
@@ -403,6 +411,7 @@ export default {
|
|||||||
this.applySelfOperatedCarrierDefaults();
|
this.applySelfOperatedCarrierDefaults();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
driverOptionText,
|
||||||
loadQuantityUnitOptions() {
|
loadQuantityUnitOptions() {
|
||||||
if (this.quantityUnitLoading) return this.quantityUnitLoadPromise;
|
if (this.quantityUnitLoading) return this.quantityUnitLoadPromise;
|
||||||
this.quantityUnitLoading = true;
|
this.quantityUnitLoading = true;
|
||||||
@@ -911,6 +920,8 @@ export default {
|
|||||||
route.carrierName = '';
|
route.carrierName = '';
|
||||||
route.carrierId = '';
|
route.carrierId = '';
|
||||||
route.carrierContractId = '';
|
route.carrierContractId = '';
|
||||||
|
route.carrierPartyId = '';
|
||||||
|
route.carrierPartyRole = '';
|
||||||
this.clearRouteDriverVehicleFields(route);
|
this.clearRouteDriverVehicleFields(route);
|
||||||
if (value === '承运商') {
|
if (value === '承运商') {
|
||||||
route.trailerVehicleNo = '';
|
route.trailerVehicleNo = '';
|
||||||
@@ -921,15 +932,18 @@ export default {
|
|||||||
if (value === '自运') this.applySelfOperatedCarrierDefaults(route);
|
if (value === '自运') this.applySelfOperatedCarrierDefaults(route);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleCarrierContractChange(route, contractId) {
|
handleCarrierContractChange(route, selectedValue) {
|
||||||
const contract = this.carrierOptions.find(
|
const contract = this.carrierOptions.find(
|
||||||
item =>
|
item =>
|
||||||
|
this.carrierOptionValue(item) === String(selectedValue || '') ||
|
||||||
[item.contractId, item.carrierName, item.id].some(
|
[item.contractId, item.carrierName, item.id].some(
|
||||||
value => String(value || '') === String(contractId || '')
|
value => String(value || '') === String(selectedValue || '')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
route.carrierContractId = route.carrierType !== '自运' ? contract?.contractId || '' : '';
|
route.carrierContractId = route.carrierType !== '自运' ? contract?.contractId || '' : '';
|
||||||
route.carrierId = route.carrierType !== '自运' ? contract?.carrierId || '' : '';
|
route.carrierPartyId = route.carrierType !== '自运' ? contract?.carrierPartyId || '' : '';
|
||||||
|
route.carrierPartyRole = route.carrierType !== '自运' ? contract?.carrierPartyRole || '' : '';
|
||||||
|
route.carrierId = route.carrierType !== '自运' ? contract?.carrierId || contract?.customerId || '' : '';
|
||||||
route.carrierName = contract?.carrierName || '';
|
route.carrierName = contract?.carrierName || '';
|
||||||
this.clearRouteDriverVehicleFields(route);
|
this.clearRouteDriverVehicleFields(route);
|
||||||
},
|
},
|
||||||
@@ -944,22 +958,24 @@ export default {
|
|||||||
route.escortPhone = '';
|
route.escortPhone = '';
|
||||||
this.driverOptions = [];
|
this.driverOptions = [];
|
||||||
},
|
},
|
||||||
getRouteCarrierFilter(route = {}) {
|
|
||||||
return {
|
|
||||||
carrierId: route.carrierId || '',
|
|
||||||
carrierName: route.carrierName || '',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
carrierOptionValue(item = {}) {
|
carrierOptionValue(item = {}) {
|
||||||
return item.contractId || item.id || item.value || item.carrierName || '';
|
return [item.contractId || item.id || '', item.carrierPartyId || '', item.carrierName || ''].join(
|
||||||
|
'__'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
carrierSelectedValue(route = {}) {
|
||||||
|
return this.carrierOptionValue({
|
||||||
|
contractId: route.carrierContractId,
|
||||||
|
carrierPartyId: route.carrierPartyId,
|
||||||
|
carrierName: route.carrierName,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
carrierOptionLabel(item) {
|
carrierOptionLabel(item) {
|
||||||
const duplicateCount = this.carrierOptions.filter(option => option.carrierName === item.carrierName).length;
|
const roleLabel = item.carrierPartyRole === 'C' ? '丙方' : item.carrierPartyRole === 'B' ? '乙方' : '';
|
||||||
if (duplicateCount <= 1) {
|
const nameWithRole =
|
||||||
return item.carrierName;
|
roleLabel && item.carrierName ? `${item.carrierName}(${roleLabel})` : item.carrierName;
|
||||||
}
|
|
||||||
const contractLabel = formatContractOptionLabel(item);
|
const contractLabel = formatContractOptionLabel(item);
|
||||||
return contractLabel ? `${item.carrierName}(${contractLabel})` : item.carrierName;
|
return contractLabel ? `${nameWithRole} - ${contractLabel}` : nameWithRole;
|
||||||
},
|
},
|
||||||
driverOptionLabel(item) { return item.driverName || item.name || ''; },
|
driverOptionLabel(item) { return item.driverName || item.name || ''; },
|
||||||
driverOptionKey(item) { return item.id || item.driverId || this.driverOptionLabel(item) || item.mobile; },
|
driverOptionKey(item) { return item.id || item.driverId || this.driverOptionLabel(item) || item.mobile; },
|
||||||
@@ -980,19 +996,22 @@ export default {
|
|||||||
...item,
|
...item,
|
||||||
contractId: item.contractId || item.carrierContractId || item.id || '',
|
contractId: item.contractId || item.carrierContractId || item.id || '',
|
||||||
carrierName:
|
carrierName:
|
||||||
|
item.carrierName ||
|
||||||
item.partyB ||
|
item.partyB ||
|
||||||
item.partyBName ||
|
item.partyBName ||
|
||||||
item.contractPartyB ||
|
item.contractPartyB ||
|
||||||
item.customerContractPartyB ||
|
item.customerContractPartyB ||
|
||||||
item.carrierName ||
|
|
||||||
'',
|
'',
|
||||||
carrierId:
|
carrierId:
|
||||||
|
item.customerId ||
|
||||||
item.partyBId ||
|
item.partyBId ||
|
||||||
item.partyBUserId ||
|
item.partyBUserId ||
|
||||||
item.contractPartyBId ||
|
item.contractPartyBId ||
|
||||||
item.customerContractPartyBId ||
|
item.customerContractPartyBId ||
|
||||||
item.carrierId ||
|
item.carrierId ||
|
||||||
'',
|
'',
|
||||||
|
carrierPartyId: item.carrierPartyId || '',
|
||||||
|
carrierPartyRole: item.carrierPartyRole || '',
|
||||||
}))
|
}))
|
||||||
.filter(item => item.carrierName);
|
.filter(item => item.carrierName);
|
||||||
} finally {
|
} finally {
|
||||||
@@ -1026,36 +1045,22 @@ export default {
|
|||||||
this.activeSuggestRoute = route;
|
this.activeSuggestRoute = route;
|
||||||
},
|
},
|
||||||
async loadDriverOptions(route = {}, keyword = '') {
|
async loadDriverOptions(route = {}, keyword = '') {
|
||||||
const carrier = this.getRouteCarrierFilter(route);
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
this.driverOptions = [];
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
this.driverLoading = true;
|
this.driverLoading = true;
|
||||||
try {
|
try {
|
||||||
this.driverOptions = await fetchDriversByCarrierOrganizations(
|
this.driverOptions = await fetchDriverCandidates({
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' },
|
size: 20,
|
||||||
carrier
|
...(keyword ? { driverName: keyword } : {}),
|
||||||
);
|
posts: '司机',
|
||||||
|
});
|
||||||
return this.driverOptions;
|
return this.driverOptions;
|
||||||
} finally {
|
} finally {
|
||||||
this.driverLoading = false;
|
this.driverLoading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fetchDriverSuggestions(queryString, callback) {
|
fetchDriverSuggestions(queryString, callback) {
|
||||||
const route = this.activeSuggestRoute || {};
|
|
||||||
const carrier = this.getRouteCarrierFilter(route);
|
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
if (!keyword) this.$message.warning('请先选择承运商');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.driverLoading = true;
|
this.driverLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' })
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' },
|
|
||||||
carrier
|
|
||||||
)
|
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.driverOptions = records;
|
this.driverOptions = records;
|
||||||
callback(
|
callback(
|
||||||
@@ -1080,19 +1085,13 @@ export default {
|
|||||||
if (drivingVehicle) route.vehicleNo = drivingVehicle;
|
if (drivingVehicle) route.vehicleNo = drivingVehicle;
|
||||||
},
|
},
|
||||||
fetchEscortSuggestions(queryString, callback) {
|
fetchEscortSuggestions(queryString, callback) {
|
||||||
const route = this.activeSuggestRoute || {};
|
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const carrier = this.getRouteCarrierFilter(route);
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
if (!keyword) this.$message.warning('请先选择承运商');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.escortLoading = true;
|
this.escortLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '押运员' },
|
size: 20,
|
||||||
carrier
|
...(keyword ? { driverName: keyword } : {}),
|
||||||
)
|
posts: '押运员',
|
||||||
|
})
|
||||||
.then(records => {
|
.then(records => {
|
||||||
callback(
|
callback(
|
||||||
records.map(item => ({
|
records.map(item => ({
|
||||||
@@ -1154,7 +1153,7 @@ export default {
|
|||||||
id: `${route.segmentNo}-${item.cargoName}-${Date.now()}-${Math.random()}`,
|
id: `${route.segmentNo}-${item.cargoName}-${Date.now()}-${Math.random()}`,
|
||||||
batchNo,
|
batchNo,
|
||||||
segmentNo: route.segmentNo, relationNo: route.segmentNo, documentType: route.documentType, transportType: route.transportType, carrierType: route.carrierType,
|
segmentNo: route.segmentNo, relationNo: route.segmentNo, documentType: route.documentType, transportType: route.transportType, carrierType: route.carrierType,
|
||||||
carrierContractId: route.carrierContractId, carrierName: route.carrierName, driverName: route.driverName, driverPhone: route.driverPhone, vehicleNo: route.vehicleNo, captainName: route.captainName, cabinNo: route.cabinNo, containerNo: route.containerNo, trailerVehicleNo: route.trailerVehicleNo, escortName: route.escortName, escortPhone: route.escortPhone, mileage: this.normalizeMileage(route.mileage), unitPrice: this.freightItemsForGoods(route, item).unitPrice || '', priceUnit: this.freightItemsForGoods(route, item).priceUnit || '', currency: route.currency || 'RMB', freightAmount: this.freightAmount(this.freightItemsForGoods(route, item)), freightTotal: this.freightTotal(route), otherFeeTotal: route.otherFeeTotal || '', freightJson: this.buildFreightJson(route), routeRemark: route.remark,
|
carrierContractId: route.carrierContractId, carrierPartyId: route.carrierPartyId, carrierPartyRole: route.carrierPartyRole, carrierName: route.carrierName, driverName: route.driverName, driverPhone: route.driverPhone, vehicleNo: route.vehicleNo, captainName: route.captainName, cabinNo: route.cabinNo, containerNo: route.containerNo, trailerVehicleNo: route.trailerVehicleNo, escortName: route.escortName, escortPhone: route.escortPhone, mileage: this.normalizeMileage(route.mileage), unitPrice: this.freightItemsForGoods(route, item).unitPrice || '', priceUnit: this.freightItemsForGoods(route, item).priceUnit || '', currency: route.currency || 'RMB', freightAmount: this.freightAmount(this.freightItemsForGoods(route, item)), freightTotal: this.freightTotal(route), otherFeeTotal: route.otherFeeTotal || '', freightJson: this.buildFreightJson(route), routeRemark: route.remark,
|
||||||
departureName: route.departureName, departureAddress: route.departureAddress, departureContact: route.departureContact, departurePhone: route.departurePhone,
|
departureName: route.departureName, departureAddress: route.departureAddress, departureContact: route.departureContact, departurePhone: route.departurePhone,
|
||||||
arrivalName: route.arrivalName, arrivalAddress: route.arrivalAddress, arrivalContact: route.arrivalContact, arrivalPhone: route.arrivalPhone,
|
arrivalName: route.arrivalName, arrivalAddress: route.arrivalAddress, arrivalContact: route.arrivalContact, arrivalPhone: route.arrivalPhone,
|
||||||
estimatedStartTime: route.estimatedStartTime, estimatedEndTime: route.estimatedEndTime,
|
estimatedStartTime: route.estimatedStartTime, estimatedEndTime: route.estimatedEndTime,
|
||||||
|
|||||||
@@ -352,7 +352,12 @@
|
|||||||
@opened="loadAddressList"
|
@opened="loadAddressList"
|
||||||
>
|
>
|
||||||
<div class="route-dialog__search common-address-dialog__search">
|
<div class="route-dialog__search common-address-dialog__search">
|
||||||
<el-form :model="addressQuery" label-position="right" label-width="auto">
|
<el-form
|
||||||
|
class="dialog-form-label-fixed"
|
||||||
|
:model="addressQuery"
|
||||||
|
label-position="right"
|
||||||
|
label-width="96px"
|
||||||
|
>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="地址名称">
|
<el-form-item label="地址名称">
|
||||||
@@ -446,7 +451,12 @@
|
|||||||
@opened="loadStationList"
|
@opened="loadStationList"
|
||||||
>
|
>
|
||||||
<div class="route-dialog__search">
|
<div class="route-dialog__search">
|
||||||
<el-form :model="stationQuery" label-position="right" label-width="auto">
|
<el-form
|
||||||
|
class="dialog-form-label-fixed"
|
||||||
|
:model="stationQuery"
|
||||||
|
label-position="right"
|
||||||
|
label-width="96px"
|
||||||
|
>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="8"><el-form-item label="站点名称"><el-input v-model="stationQuery.name" clearable placeholder="请输入" /></el-form-item></el-col>
|
<el-col :span="8"><el-form-item label="站点名称"><el-input v-model="stationQuery.name" clearable placeholder="请输入" /></el-form-item></el-col>
|
||||||
<el-col :span="8"><el-form-item label="详细地址"><el-input v-model="stationQuery.detailAddress" clearable placeholder="请输入" /></el-form-item></el-col>
|
<el-col :span="8"><el-form-item label="详细地址"><el-input v-model="stationQuery.detailAddress" clearable placeholder="请输入" /></el-form-item></el-col>
|
||||||
@@ -652,6 +662,8 @@ export default {
|
|||||||
addressQuery: {},
|
addressQuery: {},
|
||||||
addressPage: { current: 1, size: 10, total: 0 },
|
addressPage: { current: 1, size: 10, total: 0 },
|
||||||
addressRegionPaths: { departure: [], arrival: [] },
|
addressRegionPaths: { departure: [], arrival: [] },
|
||||||
|
// 程序回填省市区时抑制 cascader @change,避免空值回调把已填地址清空
|
||||||
|
suppressAddressRegionChange: false,
|
||||||
regionOptions: [],
|
regionOptions: [],
|
||||||
regionLoading: false,
|
regionLoading: false,
|
||||||
regionRequest: null,
|
regionRequest: null,
|
||||||
@@ -889,26 +901,63 @@ export default {
|
|||||||
findRegionPathByName(options = [], regionName = '', parents = []) {
|
findRegionPathByName(options = [], regionName = '', parents = []) {
|
||||||
const target = String(regionName || '').replace(/\s+/g, '');
|
const target = String(regionName || '').replace(/\s+/g, '');
|
||||||
if (!target) return [];
|
if (!target) return [];
|
||||||
|
let suffixMatch = [];
|
||||||
for (const item of options) {
|
for (const item of options) {
|
||||||
const nextParents = [...parents, item];
|
const nextParents = [...parents, item];
|
||||||
const name = nextParents.map(region => region.title || region.name || '').join('');
|
const name = nextParents.map(region => region.title || region.name || '').join('');
|
||||||
if (name === target) return nextParents.map(region => region.id);
|
if (name === target) return nextParents.map(region => region.id);
|
||||||
|
// 常用地址可能缺省名,允许「市+区」后缀命中完整省市区路径
|
||||||
|
if (!suffixMatch.length && name.endsWith(target) && target.length >= 2) {
|
||||||
|
suffixMatch = nextParents.map(region => region.id);
|
||||||
|
}
|
||||||
const path = this.findRegionPathByName(item.children, target, nextParents);
|
const path = this.findRegionPathByName(item.children, target, nextParents);
|
||||||
if (path.length) return path;
|
if (path.length) return path;
|
||||||
}
|
}
|
||||||
return [];
|
return suffixMatch;
|
||||||
},
|
},
|
||||||
findRegionPathByCode(options = [], regionCode = '', parents = []) {
|
findRegionPathByCode(options = [], regionCode = '', parents = []) {
|
||||||
const target = String(regionCode || '').trim();
|
const target = String(regionCode || '').trim();
|
||||||
if (!target) return [];
|
if (!target) return [];
|
||||||
for (const item of options) {
|
for (const item of options) {
|
||||||
const nextParents = [...parents, item];
|
const nextParents = [...parents, item];
|
||||||
if (String(item.id) === target) return nextParents.map(region => region.id);
|
if (String(item.id) === target || String(item.value || '') === target) {
|
||||||
|
return nextParents.map(region => region.id);
|
||||||
|
}
|
||||||
const path = this.findRegionPathByCode(item.children, target, nextParents);
|
const path = this.findRegionPathByCode(item.children, target, nextParents);
|
||||||
if (path.length) return path;
|
if (path.length) return path;
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
|
resolveRegionPath(field) {
|
||||||
|
if (!field) return [];
|
||||||
|
const codePath = this.findRegionPathByCode(
|
||||||
|
this.regionOptions,
|
||||||
|
field.model[field.regionCode]
|
||||||
|
);
|
||||||
|
if (codePath.length) return codePath;
|
||||||
|
const namePath = this.findRegionPathByName(this.regionOptions, field.model[field.name]);
|
||||||
|
if (namePath.length) return namePath;
|
||||||
|
const composed = [field.model[field.provinceName], field.model[field.cityName], field.model[field.districtName]]
|
||||||
|
.filter(Boolean)
|
||||||
|
.join('');
|
||||||
|
return this.findRegionPathByName(this.regionOptions, composed);
|
||||||
|
},
|
||||||
|
setAddressRegionPath(target, path = []) {
|
||||||
|
const nextPath = Array.isArray(path) ? path.map(item => String(item)) : [];
|
||||||
|
const current = this.addressRegionPaths[target] || [];
|
||||||
|
if (
|
||||||
|
current.length === nextPath.length &&
|
||||||
|
current.every((item, index) => String(item) === String(nextPath[index]))
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.suppressAddressRegionChange = true;
|
||||||
|
// Vue3 直接写动态 key,避免整体替换对象导致其它 cascader 重建并触发空 @change
|
||||||
|
this.addressRegionPaths[target] = nextPath;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.suppressAddressRegionChange = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
regionLabels(path = []) {
|
regionLabels(path = []) {
|
||||||
let options = this.regionOptions;
|
let options = this.regionOptions;
|
||||||
const labels = [];
|
const labels = [];
|
||||||
@@ -947,10 +996,22 @@ export default {
|
|||||||
this.setAddressRegionNames(field, [provinceMatch?.[0], cityMatch?.[0], districtMatch?.[0]]);
|
this.setAddressRegionNames(field, [provinceMatch?.[0], cityMatch?.[0], districtMatch?.[0]]);
|
||||||
},
|
},
|
||||||
handleAddressRegionChange(target, value) {
|
handleAddressRegionChange(target, value) {
|
||||||
|
if (this.suppressAddressRegionChange) return;
|
||||||
const field = this.addressModel(target);
|
const field = this.addressModel(target);
|
||||||
const path = Array.isArray(value) ? value.map(item => String(item)) : [];
|
const path = Array.isArray(value) ? value.map(item => String(item)) : [];
|
||||||
this.addressRegionPaths = { ...this.addressRegionPaths, [target]: path };
|
this.setAddressRegionPath(target, path);
|
||||||
if (!field) return;
|
if (!field) return;
|
||||||
|
// 程序回填/重建过程中 cascader 可能短暂抛出空值,不能据此清空已选常用地址
|
||||||
|
if (!path.length) {
|
||||||
|
const hasExisting =
|
||||||
|
String(field.model[field.name] || '').trim() ||
|
||||||
|
String(field.model[field.address] || '').trim() ||
|
||||||
|
String(field.model[field.regionCode] || '').trim();
|
||||||
|
if (hasExisting) {
|
||||||
|
this.$nextTick(() => this.syncAddressRegionPath(target));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
const labels = this.regionLabels(path);
|
const labels = this.regionLabels(path);
|
||||||
field.model[field.name] = labels.join('');
|
field.model[field.name] = labels.join('');
|
||||||
field.model[field.regionCode] = path.at(-1) || '';
|
field.model[field.regionCode] = path.at(-1) || '';
|
||||||
@@ -959,19 +1020,29 @@ export default {
|
|||||||
},
|
},
|
||||||
syncAddressRegionPath(target) {
|
syncAddressRegionPath(target) {
|
||||||
const field = this.addressModel(target);
|
const field = this.addressModel(target);
|
||||||
if (!field) return;
|
if (!field || !this.regionOptions.length) return;
|
||||||
const codePath = this.findRegionPathByCode(this.regionOptions, field.model[field.regionCode]);
|
const path = this.resolveRegionPath(field);
|
||||||
const path = codePath.length
|
this.setAddressRegionPath(target, path);
|
||||||
? codePath
|
|
||||||
: this.findRegionPathByName(this.regionOptions, field.model[field.name]);
|
|
||||||
this.addressRegionPaths = { ...this.addressRegionPaths, [target]: path };
|
|
||||||
if (path.length) this.setAddressRegionNames(field, this.regionLabels(path));
|
if (path.length) this.setAddressRegionNames(field, this.regionLabels(path));
|
||||||
},
|
},
|
||||||
syncAddressRegionPaths() {
|
syncAddressRegionPaths() {
|
||||||
if (!this.regionOptions.length) return;
|
if (!this.regionOptions.length) return;
|
||||||
['departure', 'arrival', ...this.form.routes.map((route, index) => `route-${index}`)].forEach(target => {
|
this.suppressAddressRegionChange = true;
|
||||||
this.syncAddressRegionPath(target);
|
try {
|
||||||
|
['departure', 'arrival', ...this.form.routes.map((route, index) => `route-${index}`)].forEach(
|
||||||
|
target => {
|
||||||
|
const field = this.addressModel(target);
|
||||||
|
if (!field) return;
|
||||||
|
const path = this.resolveRegionPath(field);
|
||||||
|
this.addressRegionPaths[target] = path;
|
||||||
|
if (path.length) this.setAddressRegionNames(field, this.regionLabels(path));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} finally {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.suppressAddressRegionChange = false;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async loadDetail(id) {
|
async loadDetail(id) {
|
||||||
const res = await api.getDetail(id);
|
const res = await api.getDetail(id);
|
||||||
@@ -1145,13 +1216,15 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
addressTransportType(target) {
|
addressTransportType(target) {
|
||||||
if (target.startsWith('route-')) {
|
const key = String(target || '');
|
||||||
return this.form.routes[Number(target.slice(6))]?.transportType || '';
|
if (key.startsWith('route-')) {
|
||||||
|
return String(this.form.routes[Number(key.slice(6))]?.transportType || '');
|
||||||
}
|
}
|
||||||
return target === 'arrival' ? this.form.finalTransportType : this.form.routes[0]?.transportType || '';
|
if (key === 'arrival') return String(this.form.finalTransportType || '');
|
||||||
|
return String(this.form.routes[0]?.transportType || '');
|
||||||
},
|
},
|
||||||
addressTransportMode(target) {
|
addressTransportMode(target) {
|
||||||
const type = this.addressTransportType(target);
|
const type = String(this.addressTransportType(target) || '');
|
||||||
if (type.includes('铁路')) return 'rail';
|
if (type.includes('铁路')) return 'rail';
|
||||||
if (type.includes('水路') || type.includes('水运') || type.includes('海运')) return 'water';
|
if (type.includes('水路') || type.includes('水运') || type.includes('海运')) return 'water';
|
||||||
if (type.includes('航空') || type.includes('空运')) return 'air';
|
if (type.includes('航空') || type.includes('空运')) return 'air';
|
||||||
@@ -1168,25 +1241,11 @@ export default {
|
|||||||
// 展示模式由已选数据决定:有站点编码则显示站点名,否则省市区;暂不按运输方式强制站点限制。
|
// 展示模式由已选数据决定:有站点编码则显示站点名,否则省市区;暂不按运输方式强制站点限制。
|
||||||
return Boolean(siteCode && siteCode !== '/');
|
return Boolean(siteCode && siteCode !== '/');
|
||||||
},
|
},
|
||||||
hasAddressValue(target) {
|
|
||||||
const field = this.addressModel(target);
|
|
||||||
if (!field) return false;
|
|
||||||
return Boolean(
|
|
||||||
String(field.model[field.address] || '').trim() || String(field.model[field.name] || '').trim()
|
|
||||||
);
|
|
||||||
},
|
|
||||||
tipEmptyAddressDetail(target) {
|
|
||||||
// 替代原「请先选择运输方式」placeholder:空地址点击时 toast,已有值不再提示。
|
|
||||||
if (!this.hasAddressValue(target)) {
|
|
||||||
this.$message.warning('请输入详细地址');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
resolveAddressRegionCode(row = {}) {
|
resolveAddressRegionCode(row = {}) {
|
||||||
return row.regionCode || row.districtCode || row.areaCode || row.adcode || '';
|
return row.regionCode || row.districtCode || row.areaCode || row.adcode || '';
|
||||||
},
|
},
|
||||||
openCommonAddress(target) {
|
openCommonAddress(target) {
|
||||||
if (this.isBasicRouteReadonly) return;
|
if (this.isBasicRouteReadonly) return;
|
||||||
this.tipEmptyAddressDetail(target);
|
|
||||||
this.addressTarget = target;
|
this.addressTarget = target;
|
||||||
// 暂不按运输方式限制站点:统一走常用地址选择。
|
// 暂不按运输方式限制站点:统一走常用地址选择。
|
||||||
this.addressQuery = {};
|
this.addressQuery = {};
|
||||||
@@ -1233,8 +1292,9 @@ export default {
|
|||||||
this.stationPage.current = 1;
|
this.stationPage.current = 1;
|
||||||
this.loadStationList();
|
this.loadStationList();
|
||||||
},
|
},
|
||||||
selectStation(row) {
|
async selectStation(row) {
|
||||||
const target = this.addressModel(this.addressTarget);
|
const targetKey = this.addressTarget;
|
||||||
|
const target = this.addressModel(targetKey);
|
||||||
if (!target) return;
|
if (!target) return;
|
||||||
const station = this.normalizeStation(row);
|
const station = this.normalizeStation(row);
|
||||||
target.model[target.name] = station.stationName || station.regionName;
|
target.model[target.name] = station.stationName || station.regionName;
|
||||||
@@ -1245,7 +1305,9 @@ export default {
|
|||||||
target.model[target.siteCode] = station.stationCode;
|
target.model[target.siteCode] = station.stationCode;
|
||||||
this.setAddressRegionNamesFromRow(target, station);
|
this.setAddressRegionNamesFromRow(target, station);
|
||||||
this.stationDialogVisible = false;
|
this.stationDialogVisible = false;
|
||||||
this.loadRegionOptions().then(() => this.syncAddressRegionPath(this.addressTarget));
|
await this.loadRegionOptions();
|
||||||
|
await this.$nextTick();
|
||||||
|
this.syncAddressRegionPath(targetKey);
|
||||||
},
|
},
|
||||||
async loadAddressList() {
|
async loadAddressList() {
|
||||||
this.addressLoading = true;
|
this.addressLoading = true;
|
||||||
@@ -1271,8 +1333,9 @@ export default {
|
|||||||
this.addressPage.current = 1;
|
this.addressPage.current = 1;
|
||||||
this.loadAddressList();
|
this.loadAddressList();
|
||||||
},
|
},
|
||||||
selectAddress(row) {
|
async selectAddress(row) {
|
||||||
const target = this.addressModel(this.addressTarget);
|
const targetKey = this.addressTarget;
|
||||||
|
const target = this.addressModel(targetKey);
|
||||||
if (!target) return;
|
if (!target) return;
|
||||||
target.model[target.name] = row.regionName || row.addressName || '';
|
target.model[target.name] = row.regionName || row.addressName || '';
|
||||||
target.model[target.address] = row.detailAddress || row.address || '';
|
target.model[target.address] = row.detailAddress || row.address || '';
|
||||||
@@ -1284,11 +1347,13 @@ export default {
|
|||||||
target.model[target.siteCode] = '';
|
target.model[target.siteCode] = '';
|
||||||
this.setAddressRegionNamesFromRow(target, row);
|
this.setAddressRegionNamesFromRow(target, row);
|
||||||
this.addressDialogVisible = false;
|
this.addressDialogVisible = false;
|
||||||
this.loadRegionOptions().then(() => this.syncAddressRegionPath(this.addressTarget));
|
await this.loadRegionOptions();
|
||||||
|
// nextTick 确保途经点动态 key 已挂载 cascader 后再回填路径
|
||||||
|
await this.$nextTick();
|
||||||
|
this.syncAddressRegionPath(targetKey);
|
||||||
},
|
},
|
||||||
handleAddressDetailClick(target) {
|
handleAddressDetailClick(target) {
|
||||||
if (this.isBasicRouteReadonly) return;
|
if (this.isBasicRouteReadonly) return;
|
||||||
this.tipEmptyAddressDetail(target);
|
|
||||||
this.openAddressMap(target);
|
this.openAddressMap(target);
|
||||||
},
|
},
|
||||||
openAddressMap(target) {
|
openAddressMap(target) {
|
||||||
@@ -1803,12 +1868,23 @@ export default {
|
|||||||
},
|
},
|
||||||
addRoute() {
|
addRoute() {
|
||||||
if (this.isBasicRouteReadonly) return;
|
if (this.isBasicRouteReadonly) return;
|
||||||
this.form.routes.push(this.createRoute());
|
const index = this.form.routes.length;
|
||||||
|
this.form.routes.push(this.createRoute(index));
|
||||||
|
this.addressRegionPaths[`route-${index}`] = [];
|
||||||
},
|
},
|
||||||
removeRoute(index) {
|
removeRoute(index) {
|
||||||
if (this.isBasicRouteReadonly) return;
|
if (this.isBasicRouteReadonly) return;
|
||||||
this.form.routes.splice(index, 1);
|
this.form.routes.splice(index, 1);
|
||||||
|
const nextPaths = { departure: this.addressRegionPaths.departure || [], arrival: this.addressRegionPaths.arrival || [] };
|
||||||
|
this.form.routes.forEach((route, routeIndex) => {
|
||||||
|
nextPaths[`route-${routeIndex}`] = this.addressRegionPaths[`route-${routeIndex >= index ? routeIndex + 1 : routeIndex}`] || [];
|
||||||
|
});
|
||||||
|
this.suppressAddressRegionChange = true;
|
||||||
|
this.addressRegionPaths = nextPaths;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.suppressAddressRegionChange = false;
|
||||||
this.syncAddressRegionPaths();
|
this.syncAddressRegionPaths();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
goodsKey(row = {}) {
|
goodsKey(row = {}) {
|
||||||
return `${row.cargoName || ''}\u0000${row.cargoType || ''}`;
|
return `${row.cargoName || ''}\u0000${row.cargoType || ''}`;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
:class="{ 'punch-record-photos__grid--edit': editable }"
|
:class="{ 'punch-record-photos__grid--edit': editable }"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-for="(item, groupIndex) in group.items"
|
v-for="item in group.items"
|
||||||
:key="`${item.photo.url}-${item.index}`"
|
:key="`${item.photo.url}-${item.index}`"
|
||||||
class="punch-record-photos__item"
|
class="punch-record-photos__item"
|
||||||
@click="handlePreview(item.index)"
|
@click="handlePreview(item.index)"
|
||||||
@@ -23,8 +23,6 @@
|
|||||||
:lazy="lazy"
|
:lazy="lazy"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
/>
|
/>
|
||||||
<!-- 主图 = 该类型的第一张,按上传顺序取;没有独立字段,也不可切换 -->
|
|
||||||
<div v-if="groupIndex === 0" class="punch-record-photos__badge">主图</div>
|
|
||||||
<el-link
|
<el-link
|
||||||
v-if="editable"
|
v-if="editable"
|
||||||
class="punch-record-photos__remove"
|
class="punch-record-photos__remove"
|
||||||
@@ -59,7 +57,7 @@
|
|||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
// 打卡照片是每个打卡节点必有的一个照片类型,不由过程配置的凭证类型决定;
|
// 打卡照片是每个打卡节点必有的一个照片类型,不由过程配置的凭证类型决定;
|
||||||
// 它与各凭证类型各自最多 9 张,同一类型下第一张即界面上的「主图」。
|
// 它与各凭证类型各自最多 9 张。
|
||||||
const PUNCH_PHOTO_TYPE = '打卡照片';
|
const PUNCH_PHOTO_TYPE = '打卡照片';
|
||||||
// 照片没带类型时的兜底名称,与后端落库时的兜底口径一致
|
// 照片没带类型时的兜底名称,与后端落库时的兜底口径一致
|
||||||
const PHOTO_TYPE_FALLBACK = '凭证';
|
const PHOTO_TYPE_FALLBACK = '凭证';
|
||||||
@@ -252,18 +250,6 @@ const countText = group =>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__badge {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
padding: 0 6px;
|
|
||||||
border-radius: 4px 0 4px 0;
|
|
||||||
background: rgba(64, 158, 255, 0.9);
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 18px;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__remove {
|
&__remove {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|||||||
@@ -1861,7 +1861,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="司机" required>
|
<el-form-item label="司机">
|
||||||
<el-autocomplete
|
<el-autocomplete
|
||||||
v-model="dispatchItemForm.driverName"
|
v-model="dispatchItemForm.driverName"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
@@ -1870,11 +1870,14 @@
|
|||||||
:fetch-suggestions="fetchTaskDriverSuggestions"
|
:fetch-suggestions="fetchTaskDriverSuggestions"
|
||||||
:loading="taskDriverLoading"
|
:loading="taskDriverLoading"
|
||||||
@select="item => handleTaskDriverSelect('dispatch', item)"
|
@select="item => handleTaskDriverSelect('dispatch', item)"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="dispatchItemForm.carrierType === '承运商' ? '手机号' : '司机手机号'"
|
:label="dispatchItemForm.carrierType === '承运商' ? '手机号' : '司机手机号'"
|
||||||
required
|
|
||||||
>
|
>
|
||||||
<el-input v-model="dispatchItemForm.driverPhone" placeholder="请输入" />
|
<el-input v-model="dispatchItemForm.driverPhone" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -1893,7 +1896,11 @@
|
|||||||
:fetch-suggestions="fetchTaskEscortSuggestions"
|
:fetch-suggestions="fetchTaskEscortSuggestions"
|
||||||
:loading="taskEscortLoading"
|
:loading="taskEscortLoading"
|
||||||
@select="handleTaskEscortSelect"
|
@select="handleTaskEscortSelect"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="dispatchItemForm.carrierType !== '承运商'" label="押运人手机号">
|
<el-form-item v-if="dispatchItemForm.carrierType !== '承运商'" label="押运人手机号">
|
||||||
<el-input v-model="dispatchItemForm.escortPhone" placeholder="请输入" />
|
<el-input v-model="dispatchItemForm.escortPhone" placeholder="请输入" />
|
||||||
@@ -2096,7 +2103,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="dispatchIsRoadTransport" label="司机" required>
|
<el-form-item v-if="dispatchIsRoadTransport" label="司机">
|
||||||
<el-autocomplete
|
<el-autocomplete
|
||||||
v-model="dispatchItemForm.driverName"
|
v-model="dispatchItemForm.driverName"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
@@ -2107,7 +2114,7 @@
|
|||||||
@select="item => handleTaskDriverSelect('dispatch', item)"
|
@select="item => handleTaskDriverSelect('dispatch', item)"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="dispatchIsRoadTransport" label="手机号" required>
|
<el-form-item v-if="dispatchIsRoadTransport" label="手机号">
|
||||||
<el-input v-model="dispatchItemForm.driverPhone" placeholder="请输入" />
|
<el-input v-model="dispatchItemForm.driverPhone" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
@@ -2760,7 +2767,7 @@ import {
|
|||||||
getList as getProjectList,
|
getList as getProjectList,
|
||||||
} from '@/api/business/project-apply';
|
} from '@/api/business/project-apply';
|
||||||
import { getList as getCommonRouteList } from '@/api/business/common-route';
|
import { getList as getCommonRouteList } from '@/api/business/common-route';
|
||||||
import { fetchDriversByCarrierOrganizations } from '@/utils/carrier-org-resource';
|
import { fetchDriverCandidates, driverOptionText } from '@/utils/carrier-org-resource';
|
||||||
import { getDictionary } from '@/api/system/dictbiz';
|
import { getDictionary } from '@/api/system/dictbiz';
|
||||||
import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
||||||
import { addressTypeOptions } from '@/option/base/common-address';
|
import { addressTypeOptions } from '@/option/base/common-address';
|
||||||
@@ -3809,6 +3816,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatContractOptionLabel,
|
formatContractOptionLabel,
|
||||||
|
driverOptionText,
|
||||||
initStandaloneFormPage() {
|
initStandaloneFormPage() {
|
||||||
if (!this.isStandaloneFormPage) return;
|
if (!this.isStandaloneFormPage) return;
|
||||||
const mode = this.$route.query.mode === 'edit' ? 'edit' : 'add';
|
const mode = this.$route.query.mode === 'edit' ? 'edit' : 'add';
|
||||||
@@ -3940,9 +3948,9 @@ export default {
|
|||||||
return Object.values(groups)
|
return Object.values(groups)
|
||||||
.map(group => {
|
.map(group => {
|
||||||
const quantity = this.formatDispatchQuantity(group.quantity);
|
const quantity = this.formatDispatchQuantity(group.quantity);
|
||||||
return `${group.typeName}等${group.count}种货物 | ${quantity}${
|
const typeName =
|
||||||
group.unit ? ` ${group.unit}` : ''
|
group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
|
||||||
}`;
|
return `${typeName} | ${quantity}${group.unit ? ` ${group.unit}` : ''}`;
|
||||||
})
|
})
|
||||||
.join('; ');
|
.join('; ');
|
||||||
},
|
},
|
||||||
@@ -4178,6 +4186,7 @@ export default {
|
|||||||
waiting: ['待执行', 'is-pending'],
|
waiting: ['待执行', 'is-pending'],
|
||||||
processing: ['进行中', 'is-processing'],
|
processing: ['进行中', 'is-processing'],
|
||||||
running: ['进行中', 'is-processing'],
|
running: ['进行中', 'is-processing'],
|
||||||
|
pending_return_confirm: ['待回单确认', 'is-pending'],
|
||||||
completed: ['已完成', 'is-completed'],
|
completed: ['已完成', 'is-completed'],
|
||||||
cancelled: ['已取消', 'is-cancelled'],
|
cancelled: ['已取消', 'is-cancelled'],
|
||||||
};
|
};
|
||||||
@@ -4988,16 +4997,8 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchTaskDriverSuggestions(queryString, callback) {
|
fetchTaskDriverSuggestions(queryString, callback) {
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const carrier = this.getDispatchCarrierFilter();
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.taskDriverLoading = true;
|
this.taskDriverLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' })
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' },
|
|
||||||
carrier
|
|
||||||
)
|
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.taskDriverOptions = records;
|
this.taskDriverOptions = records;
|
||||||
callback(
|
callback(
|
||||||
@@ -5017,16 +5018,12 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchTaskEscortSuggestions(queryString, callback) {
|
fetchTaskEscortSuggestions(queryString, callback) {
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const carrier = this.getDispatchCarrierFilter();
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.taskEscortLoading = true;
|
this.taskEscortLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '押运员' },
|
size: 20,
|
||||||
carrier
|
...(keyword ? { driverName: keyword } : {}),
|
||||||
)
|
posts: '押运员',
|
||||||
|
})
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.taskEscortOptions = records;
|
this.taskEscortOptions = records;
|
||||||
callback(records.map(item => ({ ...item, value: item.driverName || item.name || '' })));
|
callback(records.map(item => ({ ...item, value: item.driverName || item.name || '' })));
|
||||||
@@ -7551,12 +7548,13 @@ export default {
|
|||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
const cargoInfo = Object.values(groups)
|
const cargoInfo = Object.values(groups)
|
||||||
.map(
|
.map(group => {
|
||||||
group =>
|
const typeName =
|
||||||
`${group.cargoType}等${group.count}种货物 | ${this.formatDispatchQuantity(
|
group.count > 1 ? `${group.cargoType}等${group.count}种货物` : group.cargoType;
|
||||||
group.quantity
|
return `${typeName} | ${this.formatDispatchQuantity(group.quantity)}${
|
||||||
)}${group.unit ? ` ${group.unit}` : ''}`
|
group.unit ? ` ${group.unit}` : ''
|
||||||
)
|
}`;
|
||||||
|
})
|
||||||
.join('; ');
|
.join('; ');
|
||||||
return cargoInfo || plan.goodsInfo || '';
|
return cargoInfo || plan.goodsInfo || '';
|
||||||
},
|
},
|
||||||
@@ -8044,12 +8042,6 @@ export default {
|
|||||||
this.taskDriverOptions = [];
|
this.taskDriverOptions = [];
|
||||||
this.taskEscortOptions = [];
|
this.taskEscortOptions = [];
|
||||||
},
|
},
|
||||||
getDispatchCarrierFilter() {
|
|
||||||
return {
|
|
||||||
carrierId: this.dispatchItemForm.carrierId || '',
|
|
||||||
carrierName: this.dispatchItemForm.carrierName || '',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
handleDispatchCargoQuantityInput(row, value) {
|
handleDispatchCargoQuantityInput(row, value) {
|
||||||
const text = String(value || '').replace(/[^\d.]/g, '');
|
const text = String(value || '').replace(/[^\d.]/g, '');
|
||||||
const parts = text.split('.');
|
const parts = text.split('.');
|
||||||
@@ -8372,19 +8364,7 @@ export default {
|
|||||||
}
|
}
|
||||||
const fullEntry = row.taskEntryMode === 'full';
|
const fullEntry = row.taskEntryMode === 'full';
|
||||||
const roadTransport = this.resolveTransportMode(row.transportType) === 'road';
|
const roadTransport = this.resolveTransportMode(row.transportType) === 'road';
|
||||||
if (fullEntry) {
|
// 司机与手机号对全部承运类型(承运商 / 自运 / 平台)都是选填,填了才校验格式与长度
|
||||||
// 公路运输时司机/手机号一律必填(含承运类型为承运商)
|
|
||||||
if (roadTransport && row.carrierType) {
|
|
||||||
requiredFields.push(['driverName', '司机']);
|
|
||||||
requiredFields.push(['driverPhone', '手机号']);
|
|
||||||
}
|
|
||||||
} else if (row.carrierType) {
|
|
||||||
requiredFields.push(['driverName', '司机']);
|
|
||||||
requiredFields.push([
|
|
||||||
'driverPhone',
|
|
||||||
row.carrierType === '承运商' ? '手机号' : '司机手机号',
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
const emptyField = requiredFields.find(([prop]) => this.isBillingFieldEmpty(row[prop]));
|
const emptyField = requiredFields.find(([prop]) => this.isBillingFieldEmpty(row[prop]));
|
||||||
if (emptyField) return requiredMessage(emptyField[1]);
|
if (emptyField) return requiredMessage(emptyField[1]);
|
||||||
|
|
||||||
|
|||||||
@@ -484,20 +484,24 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-tabs v-model="previewTab"
|
<el-tabs v-model="previewTab"
|
||||||
><el-tab-pane :label="`运单数(${rows.length})`" name="all" /><el-tab-pane
|
><el-tab-pane :label="`运单数(${rows.length})`" name="all" /><el-tab-pane
|
||||||
:label="`疑似重复(${duplicateRows.length})`"
|
:label="`Excel内重复(${duplicateRows.length})`"
|
||||||
name="duplicate" /></el-tabs
|
name="duplicate" /><el-tab-pane
|
||||||
|
:label="`与已有运单重复(${historyDuplicateRows.length})`"
|
||||||
|
name="history" /></el-tabs
|
||||||
><el-table
|
><el-table
|
||||||
:data="previewRows"
|
:data="previewRows"
|
||||||
border
|
border
|
||||||
max-height="440"
|
max-height="440"
|
||||||
:row-class-name="({ row }) => (row._duplicate ? 'is-duplicate-row' : '')"
|
:row-class-name="
|
||||||
|
({ row }) => (row._duplicate || row._historyWaybillNo ? 'is-duplicate-row' : '')
|
||||||
|
"
|
||||||
@selection-change="rowSelection = $event"
|
@selection-change="rowSelection = $event"
|
||||||
><el-table-column type="selection" width="55" /><el-table-column
|
><el-table-column type="selection" width="55" /><el-table-column
|
||||||
type="index"
|
type="index"
|
||||||
label="序号"
|
label="序号"
|
||||||
width="65"
|
width="65"
|
||||||
/><el-table-column
|
/><el-table-column
|
||||||
v-for="column in detailColumns"
|
v-for="column in previewColumns"
|
||||||
:key="column.prop"
|
:key="column.prop"
|
||||||
:prop="column.prop"
|
:prop="column.prop"
|
||||||
:label="column.label"
|
:label="column.label"
|
||||||
@@ -583,8 +587,6 @@
|
|||||||
><el-link type="primary" @click="saveRow(row)">保存</el-link
|
><el-link type="primary" @click="saveRow(row)">保存</el-link
|
||||||
><el-link type="primary" @click="cancelRow(row)">取消</el-link></template
|
><el-link type="primary" @click="cancelRow(row)">取消</el-link></template
|
||||||
><template v-else
|
><template v-else
|
||||||
><el-link v-if="row._duplicate" type="primary" @click="confirmDuplicateRow(row)"
|
|
||||||
>确认</el-link
|
|
||||||
><el-link type="primary" @click="editRow(row)">编辑</el-link
|
><el-link type="primary" @click="editRow(row)">编辑</el-link
|
||||||
><el-link type="danger" @click="deleteRow(row)">删除</el-link></template
|
><el-link type="danger" @click="deleteRow(row)">删除</el-link></template
|
||||||
></div
|
></div
|
||||||
@@ -716,9 +718,12 @@ const transportTypeOptions = ref([]),
|
|||||||
const rowSelection = ref([]),
|
const rowSelection = ref([]),
|
||||||
previewTab = ref('all');
|
previewTab = ref('all');
|
||||||
const duplicateRows = computed(() => rows.value.filter(row => row._duplicate));
|
const duplicateRows = computed(() => rows.value.filter(row => row._duplicate));
|
||||||
const previewRows = computed(() =>
|
const historyDuplicateRows = computed(() => rows.value.filter(row => row._historyWaybillNo));
|
||||||
previewTab.value === 'duplicate' ? duplicateRows.value : rows.value
|
const previewRows = computed(() => {
|
||||||
);
|
if (previewTab.value === 'duplicate') return duplicateRows.value;
|
||||||
|
if (previewTab.value === 'history') return historyDuplicateRows.value;
|
||||||
|
return rows.value;
|
||||||
|
});
|
||||||
const carrierContractsLoaded = ref(false),
|
const carrierContractsLoaded = ref(false),
|
||||||
hasCarrierContracts = ref(null);
|
hasCarrierContracts = ref(null);
|
||||||
const carrierTypes = ['承运商', '自运'];
|
const carrierTypes = ['承运商', '自运'];
|
||||||
@@ -795,6 +800,16 @@ const detailColumns = [
|
|||||||
{ prop: 'remark', label: '备注', editor: 'textarea', minWidth: 200 },
|
{ prop: 'remark', label: '备注', editor: 'textarea', minWidth: 200 },
|
||||||
{ prop: 'waybillIdentifier', label: '同一运单标识号', editor: 'input', minWidth: 150 },
|
{ prop: 'waybillIdentifier', label: '同一运单标识号', editor: 'input', minWidth: 150 },
|
||||||
];
|
];
|
||||||
|
// 与已有运单重复页签的列与明细一致,只在运单批次号后多一列已有运单号。
|
||||||
|
const previewColumns = computed(() =>
|
||||||
|
previewTab.value === 'history'
|
||||||
|
? [
|
||||||
|
detailColumns[0],
|
||||||
|
{ prop: '_historyWaybillNo', label: '已有运单号', minWidth: 220 },
|
||||||
|
...detailColumns.slice(1),
|
||||||
|
]
|
||||||
|
: detailColumns
|
||||||
|
);
|
||||||
const requiredDetailFields = [
|
const requiredDetailFields = [
|
||||||
{ prop: 'vehicleNo', label: '车牌号/船班号/船次号/班次号' },
|
{ prop: 'vehicleNo', label: '车牌号/船班号/船次号/班次号' },
|
||||||
{ prop: 'transportType', label: '运输方式' },
|
{ prop: 'transportType', label: '运输方式' },
|
||||||
@@ -1187,6 +1202,7 @@ const loadBatchRows = async batchId => {
|
|||||||
batchNo: item.batchNo || form.batchNo,
|
batchNo: item.batchNo || form.batchNo,
|
||||||
}));
|
}));
|
||||||
refreshDuplicateFlags();
|
refreshDuplicateFlags();
|
||||||
|
await refreshHistoryDuplicates();
|
||||||
rowSelection.value = [];
|
rowSelection.value = [];
|
||||||
previewTab.value = 'all';
|
previewTab.value = 'all';
|
||||||
};
|
};
|
||||||
@@ -1381,11 +1397,23 @@ const formatOptionalNumber = value => {
|
|||||||
const normalized = normalizeOptionalImportNumber(value);
|
const normalized = normalizeOptionalImportNumber(value);
|
||||||
return normalized === null || normalized === undefined ? '' : normalized;
|
return normalized === null || normalized === undefined ? '' : normalized;
|
||||||
};
|
};
|
||||||
|
// 明细接口返回运单实体字段 startDate/endDate/estimatedStartTime/estimatedEndTime,
|
||||||
|
// 而明细表与编辑回填按导入列字段名 actualStartDate 等读取,重载后在此对齐,否则实际/预计时间列为空。
|
||||||
|
const detailDateAliases = {
|
||||||
|
actualStartDate: 'startDate',
|
||||||
|
actualEndDate: 'endDate',
|
||||||
|
planStartDate: 'estimatedStartTime',
|
||||||
|
planEndDate: 'estimatedEndTime',
|
||||||
|
};
|
||||||
const normalizeDetailRow = row => {
|
const normalizeDetailRow = row => {
|
||||||
const next = { ...(row || {}) };
|
const next = { ...(row || {}) };
|
||||||
OPTIONAL_NUMBER_PROPS.forEach(prop => {
|
OPTIONAL_NUMBER_PROPS.forEach(prop => {
|
||||||
next[prop] = formatOptionalNumber(next[prop]);
|
next[prop] = formatOptionalNumber(next[prop]);
|
||||||
});
|
});
|
||||||
|
Object.entries(detailDateAliases).forEach(([prop, source]) => {
|
||||||
|
if (String(next[prop] ?? '').trim()) return;
|
||||||
|
if (String(next[source] ?? '').trim()) next[prop] = next[source];
|
||||||
|
});
|
||||||
return next;
|
return next;
|
||||||
};
|
};
|
||||||
const normalizeImportRow = row => ({
|
const normalizeImportRow = row => ({
|
||||||
@@ -1497,6 +1525,8 @@ const fileChange = async (file, list) => {
|
|||||||
if (isValid) {
|
if (isValid) {
|
||||||
// 校验通过,填充表格数据
|
// 校验通过,填充表格数据
|
||||||
rows.value = parsedRows;
|
rows.value = parsedRows;
|
||||||
|
// 传 rows.value(响应式代理),否则后续写入不触发重新渲染
|
||||||
|
await refreshHistoryDuplicates(rows.value);
|
||||||
} else {
|
} else {
|
||||||
// 校验失败,清空数据
|
// 校验失败,清空数据
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
@@ -1514,16 +1544,12 @@ const IMPORT_BATCH_SIZE = 100;
|
|||||||
|
|
||||||
const importFieldText = value => String(value ?? '').trim();
|
const importFieldText = value => String(value ?? '').trim();
|
||||||
|
|
||||||
/** 同一运单批次号下,全部导入字段一致时标记为疑似重复。已在线确认的行不再标为重复。 */
|
/** 同一运单批次号下,全部导入字段一致时标记为 Excel 内重复。 */
|
||||||
const refreshDuplicateFlags = (list = rows.value) => {
|
const refreshDuplicateFlags = (list = rows.value) => {
|
||||||
const groups = new Map();
|
const groups = new Map();
|
||||||
list.forEach(row => {
|
list.forEach(row => {
|
||||||
const signature = detailColumns.map(column => importFieldText(row[column.prop])).join('\u0001');
|
const signature = detailColumns.map(column => importFieldText(row[column.prop])).join('\u0001');
|
||||||
const batchNo = importFieldText(row.batchNo || form.batchNo);
|
const batchNo = importFieldText(row.batchNo || form.batchNo);
|
||||||
if (row._duplicateConfirmed && row._duplicateSignature !== signature) {
|
|
||||||
row._duplicateConfirmed = false;
|
|
||||||
}
|
|
||||||
row._duplicateSignature = signature;
|
|
||||||
const groupKey = `${batchNo}\u0002${signature}`;
|
const groupKey = `${batchNo}\u0002${signature}`;
|
||||||
const group = groups.get(groupKey) || [];
|
const group = groups.get(groupKey) || [];
|
||||||
group.push(row);
|
group.push(row);
|
||||||
@@ -1532,19 +1558,39 @@ const refreshDuplicateFlags = (list = rows.value) => {
|
|||||||
groups.forEach(group => {
|
groups.forEach(group => {
|
||||||
const duplicated = group.length > 1;
|
const duplicated = group.length > 1;
|
||||||
group.forEach(row => {
|
group.forEach(row => {
|
||||||
row._duplicate = duplicated && !row._duplicateConfirmed;
|
row._duplicate = duplicated;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const confirmDuplicateRow = row => {
|
/** 逐行提交给后端与项目下已有运单比对,命中的行带上已有运单号。比对失败不影响导入。 */
|
||||||
row._duplicateConfirmed = true;
|
const refreshHistoryDuplicates = async (list = rows.value) => {
|
||||||
refreshDuplicateFlags();
|
if (!list.length || !form.projectId) {
|
||||||
ElMessage.success('已确认,该行将按正常数据导入');
|
list.forEach(row => {
|
||||||
|
row._historyWaybillNo = '';
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let duplicates = [];
|
||||||
|
try {
|
||||||
|
const res = await api.checkImportDuplicates(buildImportPayload(form.status, list));
|
||||||
|
const data = res?.data?.data ?? res?.data ?? res;
|
||||||
|
duplicates = Array.isArray(data) ? data : [];
|
||||||
|
} catch (error) {
|
||||||
|
console.error('与已有运单重复校验失败:', error);
|
||||||
|
duplicates = [];
|
||||||
|
}
|
||||||
|
const numbersByRow = new Map(
|
||||||
|
duplicates.map(item => [item.rowIndex, (item.waybillNos || []).filter(Boolean)])
|
||||||
|
);
|
||||||
|
list.forEach((row, index) => {
|
||||||
|
row._historyWaybillNo = (numbersByRow.get(index) || []).join('、');
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const stripInternalRowFields = row => {
|
const stripInternalRowFields = row => {
|
||||||
const { _key, _duplicate, _duplicateKey, _duplicateConfirmed, _duplicateSignature, _editing, _editSnapshot, ...data } = row;
|
const { _key, _duplicate, _duplicateKey, _editing, _editSnapshot, _historyWaybillNo, ...data } =
|
||||||
|
row;
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1759,6 +1805,7 @@ const saveRow = row => {
|
|||||||
row._editing = false;
|
row._editing = false;
|
||||||
delete row._editSnapshot;
|
delete row._editSnapshot;
|
||||||
refreshDuplicateFlags();
|
refreshDuplicateFlags();
|
||||||
|
refreshHistoryDuplicates();
|
||||||
};
|
};
|
||||||
const cancelRow = row => {
|
const cancelRow = row => {
|
||||||
if (row._editSnapshot) Object.assign(row, row._editSnapshot);
|
if (row._editSnapshot) Object.assign(row, row._editSnapshot);
|
||||||
@@ -1768,12 +1815,14 @@ const cancelRow = row => {
|
|||||||
const deleteRow = row => {
|
const deleteRow = row => {
|
||||||
rows.value = rows.value.filter(item => item !== row);
|
rows.value = rows.value.filter(item => item !== row);
|
||||||
refreshDuplicateFlags();
|
refreshDuplicateFlags();
|
||||||
|
refreshHistoryDuplicates();
|
||||||
};
|
};
|
||||||
const removeSelectedRows = () => {
|
const removeSelectedRows = () => {
|
||||||
const keys = new Set(rowSelection.value.map(row => row._key));
|
const keys = new Set(rowSelection.value.map(row => row._key));
|
||||||
rows.value = rows.value.filter(row => !keys.has(row._key));
|
rows.value = rows.value.filter(row => !keys.has(row._key));
|
||||||
rowSelection.value = [];
|
rowSelection.value = [];
|
||||||
refreshDuplicateFlags();
|
refreshDuplicateFlags();
|
||||||
|
refreshHistoryDuplicates();
|
||||||
};
|
};
|
||||||
const normalizeOptionalPlanId = value => {
|
const normalizeOptionalPlanId = value => {
|
||||||
if (value === undefined || value === null || value === '') return null;
|
if (value === undefined || value === null || value === '') return null;
|
||||||
@@ -1837,7 +1886,11 @@ const confirmImport = async () => {
|
|||||||
await formRef.value?.validate();
|
await formRef.value?.validate();
|
||||||
if (!validateImportRows()) return;
|
if (!validateImportRows()) return;
|
||||||
const count = rows.value.filter(row => row._duplicate).length;
|
const count = rows.value.filter(row => row._duplicate).length;
|
||||||
if (count) await ElMessageBox.confirm(`当前导入有${count}条疑似重复数据,是否确认导入?`, '提示');
|
if (count)
|
||||||
|
await ElMessageBox.confirm(`当前导入有${count}条Excel内重复数据,是否确认导入?`, '提示');
|
||||||
|
const historyCount = rows.value.filter(row => row._historyWaybillNo).length;
|
||||||
|
if (historyCount)
|
||||||
|
await ElMessageBox.confirm(`当前导入有${historyCount}条与已有运单重复,是否确认导入?`, '提示');
|
||||||
if (form.importType === 'settlement' && form.status === 'completed')
|
if (form.importType === 'settlement' && form.status === 'completed')
|
||||||
await ElMessageBox.confirm('确认后将同时生成运单、应收应付明细、计结算单,是否继续?', '提示');
|
await ElMessageBox.confirm('确认后将同时生成运单、应收应付明细、计结算单,是否继续?', '提示');
|
||||||
|
|
||||||
|
|||||||
@@ -1200,7 +1200,11 @@
|
|||||||
:loading="taskDriverLoading"
|
:loading="taskDriverLoading"
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
@select="handleTaskDriverSelect"
|
@select="handleTaskDriverSelect"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="isRoadTransport"
|
v-if="isRoadTransport"
|
||||||
@@ -1279,7 +1283,11 @@
|
|||||||
:loading="taskEscortLoading"
|
:loading="taskEscortLoading"
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
@select="handleTaskEscortSelect"
|
@select="handleTaskEscortSelect"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="showRoadEscortFields" label="押运人手机号">
|
<el-form-item v-if="showRoadEscortFields" label="押运人手机号">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -1329,7 +1337,7 @@
|
|||||||
<el-form-item label="规格">
|
<el-form-item label="规格">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.specification"
|
v-model="form.specification"
|
||||||
placeholder="选择货物自动回填"
|
placeholder="请填写规格"
|
||||||
clearable
|
clearable
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
/>
|
/>
|
||||||
@@ -1337,7 +1345,7 @@
|
|||||||
<el-form-item label="型号">
|
<el-form-item label="型号">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.model"
|
v-model="form.model"
|
||||||
placeholder="选择货物自动回填"
|
placeholder="请填写型号"
|
||||||
clearable
|
clearable
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
/>
|
/>
|
||||||
@@ -1591,8 +1599,8 @@
|
|||||||
<el-link type="primary" v-if="canCancel(row)" @click="handleAction('cancel', row)">
|
<el-link type="primary" v-if="canCancel(row)" @click="handleAction('cancel', row)">
|
||||||
取消
|
取消
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-link type="primary" v-if="canComplete(row)" @click="handleCompleteAction(row)">
|
<el-link type="primary" v-if="canComplete(row)" @click="handleComplete(row)">
|
||||||
{{ completeActionLabelFor(row) }}
|
{{ completeActionLabel }}
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-link type="primary" v-if="canMaintainMileage(row)" @click="openMileageDialog(row)">
|
<el-link type="primary" v-if="canMaintainMileage(row)" @click="openMileageDialog(row)">
|
||||||
维护里程
|
维护里程
|
||||||
@@ -1653,7 +1661,11 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@select="handleReassignDriverSelect"
|
@select="handleReassignDriverSelect"
|
||||||
@change="handleReassignDriverChange"
|
@change="handleReassignDriverChange"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="手机号"
|
label="手机号"
|
||||||
@@ -2252,6 +2264,13 @@
|
|||||||
<span v-if="record.volume">体积 {{ record.volume }}方</span>
|
<span v-if="record.volume">体积 {{ record.volume }}方</span>
|
||||||
<span v-if="record.quantity">数量 {{ record.quantity }}</span>
|
<span v-if="record.quantity">数量 {{ record.quantity }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 里程只挂在末位节点上(needMileage 由后端下发),显示的是运单里程 -->
|
||||||
|
<div
|
||||||
|
v-if="record.needMileage && Number(record.mileage) > 0"
|
||||||
|
class="waybill-manage-page__punch-record-line"
|
||||||
|
>
|
||||||
|
里程 {{ record.mileage }} 公里
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="record.remark"
|
v-if="record.remark"
|
||||||
class="waybill-manage-page__punch-record-line"
|
class="waybill-manage-page__punch-record-line"
|
||||||
@@ -2848,6 +2867,20 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<!-- 里程只在末位打卡节点出现:后端按「末位 + 计费规则含里程」下发 needMileage,前端不自己推 -->
|
||||||
|
<el-col v-if="waybillPunchEditMileageVisible" :span="8">
|
||||||
|
<el-form-item label="里程">
|
||||||
|
<el-input
|
||||||
|
v-model="waybillPunchEditForm.mileage"
|
||||||
|
maxlength="10"
|
||||||
|
:disabled="waybillPunchEditMileageLocked"
|
||||||
|
placeholder="请输入"
|
||||||
|
@input="handleWaybillPunchMileageInput"
|
||||||
|
>
|
||||||
|
<template #append>公里</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -3683,6 +3716,7 @@ import {
|
|||||||
getVoucherImages as getProcessConfigVoucherImages,
|
getVoucherImages as getProcessConfigVoucherImages,
|
||||||
} from '@/api/business/process-config';
|
} from '@/api/business/process-config';
|
||||||
import {
|
import {
|
||||||
|
getList as getWaybillList,
|
||||||
getPunchRecords as getWaybillPunchRecords,
|
getPunchRecords as getWaybillPunchRecords,
|
||||||
locateVehicle,
|
locateVehicle,
|
||||||
savePunchRecord,
|
savePunchRecord,
|
||||||
@@ -3692,9 +3726,7 @@ import VoucherExecutionDetail from './voucher-execution-detail.vue';
|
|||||||
import PunchRecordPhotos from './punch-record-photos.vue';
|
import PunchRecordPhotos from './punch-record-photos.vue';
|
||||||
import AddressMapPicker from '@/components/address-map-picker/main.vue';
|
import AddressMapPicker from '@/components/address-map-picker/main.vue';
|
||||||
import { getList as getDriverList } from '@/api/transportCapacity/driver';
|
import { getList as getDriverList } from '@/api/transportCapacity/driver';
|
||||||
import {
|
import { fetchDriverCandidates, driverOptionText } from '@/utils/carrier-org-resource';
|
||||||
fetchDriversByCarrierOrganizations,
|
|
||||||
} from '@/utils/carrier-org-resource';
|
|
||||||
import { getDictionary } from '@/api/system/dictbiz';
|
import { getDictionary } from '@/api/system/dictbiz';
|
||||||
import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
||||||
import { addressTypeOptions } from '@/option/base/common-address';
|
import { addressTypeOptions } from '@/option/base/common-address';
|
||||||
@@ -4011,6 +4043,7 @@ export default {
|
|||||||
weight: '',
|
weight: '',
|
||||||
volume: '',
|
volume: '',
|
||||||
quantity: '',
|
quantity: '',
|
||||||
|
mileage: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
photos: [],
|
photos: [],
|
||||||
},
|
},
|
||||||
@@ -4370,9 +4403,15 @@ export default {
|
|||||||
addBtn: this.canCreate,
|
addBtn: this.canCreate,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// 打卡记录编辑入口与运单编辑同权限:能改运单的人才能订正它的打卡流水
|
// 打卡记录编辑入口与运单编辑同权限:能改运单的人才能订正它的打卡流水。
|
||||||
|
// 时间轴的「编辑打卡 / 补卡」链接是本页唯一写入入口,提交固定 punched=true。
|
||||||
|
// 取消打卡不在本页;待回单确认的运单不显示该链接。
|
||||||
canEditWaybillPunchRecord() {
|
canEditWaybillPunchRecord() {
|
||||||
return this.hasPermission(`${this.config.permission}_edit`) && !this.readonlyScope;
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_edit`) &&
|
||||||
|
!this.readonlyScope &&
|
||||||
|
this.statusValue(this.detailRow) !== 'pending_return_confirm'
|
||||||
|
);
|
||||||
},
|
},
|
||||||
waybillPunchEditNode() {
|
waybillPunchEditNode() {
|
||||||
return this.findWaybillPunchEditNodeConfig(this.waybillPunchEditRecord);
|
return this.findWaybillPunchEditNodeConfig(this.waybillPunchEditRecord);
|
||||||
@@ -4407,6 +4446,15 @@ export default {
|
|||||||
waybillPunchEditPunchDisabled() {
|
waybillPunchEditPunchDisabled() {
|
||||||
return this.waybillPunchEditNode?.punch === false;
|
return this.waybillPunchEditNode?.punch === false;
|
||||||
},
|
},
|
||||||
|
// 里程:后端下发 needMileage 才出现(末位打卡节点 + 计费规则含里程);在途打卡不采集里程
|
||||||
|
waybillPunchEditMileageVisible() {
|
||||||
|
const record = this.waybillPunchEditRecord || {};
|
||||||
|
return record.needMileage === true && record.type !== 'enroute';
|
||||||
|
},
|
||||||
|
// 已生成结算单的运单里程冻结:输入框置灰,改动由后端拒绝
|
||||||
|
waybillPunchEditMileageLocked() {
|
||||||
|
return this.waybillPunchEditRecord?.mileageLocked === true;
|
||||||
|
},
|
||||||
waybillPunchEditRules() {
|
waybillPunchEditRules() {
|
||||||
return { punchTime: [{ required: true, message: '请选择打卡时间', trigger: 'change' }] };
|
return { punchTime: [{ required: true, message: '请选择打卡时间', trigger: 'change' }] };
|
||||||
},
|
},
|
||||||
@@ -4595,9 +4643,14 @@ export default {
|
|||||||
},
|
},
|
||||||
taskCarrierValue: {
|
taskCarrierValue: {
|
||||||
get() {
|
get() {
|
||||||
return this.form.carrierType === '自运'
|
if (this.form.carrierType === '自运') {
|
||||||
? this.form.carrierName || ''
|
return this.form.carrierName || '';
|
||||||
: this.form.carrierContractId || this.form.carrierName || '';
|
}
|
||||||
|
return this.taskCarrierOptionValue({
|
||||||
|
carrierContractId: this.form.carrierContractId,
|
||||||
|
carrierPartyId: this.form.carrierPartyId,
|
||||||
|
carrierName: this.form.carrierName,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
this.handleTaskCarrierChange(value);
|
this.handleTaskCarrierChange(value);
|
||||||
@@ -4800,6 +4853,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatContractOptionLabel,
|
formatContractOptionLabel,
|
||||||
|
driverOptionText,
|
||||||
parseRouteChangeContent,
|
parseRouteChangeContent,
|
||||||
// 页面被 keep-alive 缓存/卸载时调用,关闭本页所有 append-to-body 的弹窗,
|
// 页面被 keep-alive 缓存/卸载时调用,关闭本页所有 append-to-body 的弹窗,
|
||||||
// 避免 Teleport 出去的 DOM 残留在 body 上盖住后续页面(详见 data 里的说明)。
|
// 避免 Teleport 出去的 DOM 残留在 body 上盖住后续页面(详见 data 里的说明)。
|
||||||
@@ -4957,9 +5011,9 @@ export default {
|
|||||||
return Object.values(groups)
|
return Object.values(groups)
|
||||||
.map(group => {
|
.map(group => {
|
||||||
const quantity = this.formatQuantity(group.quantity);
|
const quantity = this.formatQuantity(group.quantity);
|
||||||
return `${group.typeName}等${group.count}种货物 | ${quantity}${
|
const typeName =
|
||||||
group.unit ? ` ${group.unit}` : ''
|
group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
|
||||||
}`;
|
return `${typeName} | ${quantity}${group.unit ? ` ${group.unit}` : ''}`;
|
||||||
})
|
})
|
||||||
.join('; ');
|
.join('; ');
|
||||||
},
|
},
|
||||||
@@ -5060,11 +5114,16 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
canCopy(row) {
|
canCopy(row) {
|
||||||
|
if (!row) return false;
|
||||||
|
// 归属本账号可见范围的运单允许复制。跨组织但项目归属本账号的记录会被标成只读,
|
||||||
|
// 只读仅拦截编辑/删除,不拦截复制。具备查看、新增、编辑或复制权限即可使用。
|
||||||
return (
|
return (
|
||||||
this.hasAction('copy') &&
|
this.hasAction('copy') &&
|
||||||
this.hasPermission(`${this.config.permission}_copy`) &&
|
|
||||||
!this.readonlyScope &&
|
!this.readonlyScope &&
|
||||||
!row.readonly
|
(this.hasPermission(`${this.config.permission}_copy`) ||
|
||||||
|
this.hasPermission(`${this.config.permission}_add`) ||
|
||||||
|
this.hasPermission(`${this.config.permission}_edit`) ||
|
||||||
|
this.hasPermission(`${this.config.permission}_view`))
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
canEnable(row) {
|
canEnable(row) {
|
||||||
@@ -5099,7 +5158,8 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const status = this.statusValue(row);
|
const status = this.statusValue(row);
|
||||||
return status === 'pending';
|
// 待回单确认可取消,取消不生成应收应付
|
||||||
|
return status === 'pending' || status === 'pending_return_confirm';
|
||||||
},
|
},
|
||||||
canComplete(row) {
|
canComplete(row) {
|
||||||
if (
|
if (
|
||||||
@@ -5111,29 +5171,18 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const status = this.statusValue(row);
|
const status = this.statusValue(row);
|
||||||
return status === 'processing' || status === 'running' || status === 'pending_return';
|
// 同一枚「完成」按钮覆盖两种状态:待回单确认走确认回单(后端校验司机打卡节点齐全且无未了结异常),
|
||||||
|
// 进行中/处理中二次确认后直接置完成
|
||||||
|
return status === 'processing' || status === 'running' || status === 'pending_return_confirm';
|
||||||
},
|
},
|
||||||
completeActionLabelFor(row) {
|
canConfirmReturn(row) {
|
||||||
return this.statusValue(row) === 'pending_return' ? '确认回单' : this.completeActionLabel;
|
return (
|
||||||
},
|
this.hasAction('confirmReturn') &&
|
||||||
handleCompleteAction(row) {
|
this.hasPermission(`${this.config.permission}_complete`) &&
|
||||||
const isPendingReturn = this.statusValue(row) === 'pending_return';
|
!this.readonlyScope &&
|
||||||
const actionName = this.completeActionLabelFor(row);
|
!row.readonly &&
|
||||||
this.$confirm(`确定${actionName}该${this.config.title}?`, '提示', {
|
this.statusValue(row) === 'pending_return_confirm'
|
||||||
confirmButtonText: '确定',
|
);
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
if (isPendingReturn && typeof this.api.confirmReturn === 'function') {
|
|
||||||
return this.api.confirmReturn(row.id);
|
|
||||||
}
|
|
||||||
return this.api.complete(row.id);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.$message.success(`${actionName}成功`);
|
|
||||||
this.onLoad(this.page, this.query);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
canMaintainMileage(row) {
|
canMaintainMileage(row) {
|
||||||
return (
|
return (
|
||||||
@@ -5948,6 +5997,8 @@ export default {
|
|||||||
weight: record.weight || '',
|
weight: record.weight || '',
|
||||||
volume: record.volume || '',
|
volume: record.volume || '',
|
||||||
quantity: record.quantity || '',
|
quantity: record.quantity || '',
|
||||||
|
// 里程只有正整数口径,后端若仍下发 "200.00" 会过不了提交时的正整数校验
|
||||||
|
mileage: Number(record.mileage) > 0 ? String(Number(record.mileage)) : '',
|
||||||
remark: record.remark || '',
|
remark: record.remark || '',
|
||||||
photos: (record.photos || [])
|
photos: (record.photos || [])
|
||||||
.filter(photo => photo?.url)
|
.filter(photo => photo?.url)
|
||||||
@@ -6023,10 +6074,22 @@ export default {
|
|||||||
photos.splice(index, 1);
|
photos.splice(index, 1);
|
||||||
this.waybillPunchEditForm.photos = photos;
|
this.waybillPunchEditForm.photos = photos;
|
||||||
},
|
},
|
||||||
|
// 里程只收整数:非数字直接丢掉,长度与「维护里程」一致(≤10 位)
|
||||||
|
handleWaybillPunchMileageInput(value) {
|
||||||
|
this.waybillPunchEditForm.mileage = String(value || '')
|
||||||
|
.replace(/\D/g, '')
|
||||||
|
.slice(0, 10);
|
||||||
|
},
|
||||||
async submitWaybillPunchRecordEdit() {
|
async submitWaybillPunchRecordEdit() {
|
||||||
await this.$refs.waybillPunchRecordEditFormRef.validate();
|
await this.$refs.waybillPunchRecordEditFormRef.validate();
|
||||||
const record = this.waybillPunchEditRecord;
|
const record = this.waybillPunchEditRecord;
|
||||||
const form = this.waybillPunchEditForm;
|
const form = this.waybillPunchEditForm;
|
||||||
|
// 管理端里程选填:留空表示不改动运单里程,所以只校验填了值的情况
|
||||||
|
const mileageText = String(form.mileage || '').trim();
|
||||||
|
if (this.waybillPunchEditMileageVisible && mileageText && !/^[1-9]\d{0,9}$/.test(mileageText)) {
|
||||||
|
this.$message.warning('里程必须为不超过10位的正整数');
|
||||||
|
return;
|
||||||
|
}
|
||||||
const submit =
|
const submit =
|
||||||
typeof this.api?.savePunchRecord === 'function' ? this.api.savePunchRecord : savePunchRecord;
|
typeof this.api?.savePunchRecord === 'function' ? this.api.savePunchRecord : savePunchRecord;
|
||||||
this.waybillPunchRecordEditDialog.submitting = true;
|
this.waybillPunchRecordEditDialog.submitting = true;
|
||||||
@@ -6045,6 +6108,8 @@ export default {
|
|||||||
weight: form.weight,
|
weight: form.weight,
|
||||||
volume: form.volume,
|
volume: form.volume,
|
||||||
quantity: form.quantity,
|
quantity: form.quantity,
|
||||||
|
// 不传代表不改;后端按 null 处理
|
||||||
|
mileage: mileageText ? Number(mileageText) : undefined,
|
||||||
remark: form.remark,
|
remark: form.remark,
|
||||||
photos: form.photos.map(photo => ({ url: photo.url, type: photo.type })),
|
photos: form.photos.map(photo => ({ url: photo.url, type: photo.type })),
|
||||||
});
|
});
|
||||||
@@ -6565,7 +6630,7 @@ export default {
|
|||||||
if (status === 'completed') {
|
if (status === 'completed') {
|
||||||
return 'primary';
|
return 'primary';
|
||||||
}
|
}
|
||||||
if (status === 'pending_return') {
|
if (status === 'pending_return_confirm') {
|
||||||
return 'warning';
|
return 'warning';
|
||||||
}
|
}
|
||||||
return 'warning';
|
return 'warning';
|
||||||
@@ -7220,6 +7285,8 @@ export default {
|
|||||||
this.form.carrierName = '';
|
this.form.carrierName = '';
|
||||||
this.form.carrierId = '';
|
this.form.carrierId = '';
|
||||||
this.form.carrierContractId = '';
|
this.form.carrierContractId = '';
|
||||||
|
this.form.carrierPartyId = '';
|
||||||
|
this.form.carrierPartyRole = '';
|
||||||
this.hasProjectProcessConfig = false;
|
this.hasProjectProcessConfig = false;
|
||||||
this.waybillProcessConfigRows = [];
|
this.waybillProcessConfigRows = [];
|
||||||
return;
|
return;
|
||||||
@@ -7234,6 +7301,8 @@ export default {
|
|||||||
this.form.carrierName = '';
|
this.form.carrierName = '';
|
||||||
this.form.carrierId = '';
|
this.form.carrierId = '';
|
||||||
this.form.carrierContractId = '';
|
this.form.carrierContractId = '';
|
||||||
|
this.form.carrierPartyId = '';
|
||||||
|
this.form.carrierPartyRole = '';
|
||||||
this.loadProjectProcessConfigState();
|
this.loadProjectProcessConfigState();
|
||||||
this.loadTaskCarrierOptions(project);
|
this.loadTaskCarrierOptions(project);
|
||||||
if (this.contractSelectEnabled) {
|
if (this.contractSelectEnabled) {
|
||||||
@@ -7690,6 +7759,8 @@ export default {
|
|||||||
this.form.carrierName = '';
|
this.form.carrierName = '';
|
||||||
this.form.carrierId = '';
|
this.form.carrierId = '';
|
||||||
this.form.carrierContractId = '';
|
this.form.carrierContractId = '';
|
||||||
|
this.form.carrierPartyId = '';
|
||||||
|
this.form.carrierPartyRole = '';
|
||||||
this.form.driverId = '';
|
this.form.driverId = '';
|
||||||
this.form.driverName = '';
|
this.form.driverName = '';
|
||||||
this.form.driverPhone = '';
|
this.form.driverPhone = '';
|
||||||
@@ -7744,7 +7815,9 @@ export default {
|
|||||||
},
|
},
|
||||||
taskCarrierOptionValue(item = {}) {
|
taskCarrierOptionValue(item = {}) {
|
||||||
if (this.form.carrierType !== '自运') {
|
if (this.form.carrierType !== '自运') {
|
||||||
return item.carrierContractId || item.value || item.id || '';
|
if (item.value) return item.value;
|
||||||
|
return [item.carrierContractId || item.id || '', item.carrierPartyId || '', item.carrierName || '']
|
||||||
|
.join('__');
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
item.carrierName ||
|
item.carrierName ||
|
||||||
@@ -7782,9 +7855,39 @@ export default {
|
|||||||
names.forEach(append);
|
names.forEach(append);
|
||||||
return options;
|
return options;
|
||||||
},
|
},
|
||||||
|
parseContractPartyRows(partyJson, fallbackName = '', partyRole = 'B') {
|
||||||
|
const rows = this.parseJsonArray(partyJson)
|
||||||
|
.map(item => ({
|
||||||
|
id: item.id || '',
|
||||||
|
customerId: item.customerId || '',
|
||||||
|
customerName: String(item.customerName || '').trim(),
|
||||||
|
creditCode: item.creditCode || '',
|
||||||
|
partyRole,
|
||||||
|
}))
|
||||||
|
.filter(item => item.customerName);
|
||||||
|
if (rows.length) return rows;
|
||||||
|
return String(fallbackName || '')
|
||||||
|
.split(/[、,,]/)
|
||||||
|
.map(name => name.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
.map(name => ({
|
||||||
|
id: '',
|
||||||
|
customerId: '',
|
||||||
|
customerName: name,
|
||||||
|
creditCode: '',
|
||||||
|
partyRole,
|
||||||
|
}));
|
||||||
|
},
|
||||||
getWaybillCarrierContractOptions(contracts = []) {
|
getWaybillCarrierContractOptions(contracts = []) {
|
||||||
const carrierNameCounts = contracts.reduce((counts, contract) => {
|
const options = [];
|
||||||
const carrierName = String(
|
contracts.forEach(contract => {
|
||||||
|
if (!contract?.id) return;
|
||||||
|
const parties = [
|
||||||
|
...this.parseContractPartyRows(contract.partyBJson, contract.partyB, 'B'),
|
||||||
|
...this.parseContractPartyRows(contract.partyCJson, contract.partyC, 'C'),
|
||||||
|
];
|
||||||
|
if (!parties.length) {
|
||||||
|
const fallbackName = String(
|
||||||
contract.partyB ||
|
contract.partyB ||
|
||||||
contract.partyBName ||
|
contract.partyBName ||
|
||||||
contract.contractPartyB ||
|
contract.contractPartyB ||
|
||||||
@@ -7793,44 +7896,35 @@ export default {
|
|||||||
contract.secondPartyName ||
|
contract.secondPartyName ||
|
||||||
''
|
''
|
||||||
).trim();
|
).trim();
|
||||||
if (carrierName) counts[carrierName] = (counts[carrierName] || 0) + 1;
|
if (fallbackName) {
|
||||||
return counts;
|
parties.push({
|
||||||
}, {});
|
id: '',
|
||||||
return contracts
|
customerId: '',
|
||||||
.map(contract => {
|
customerName: fallbackName,
|
||||||
const carrierName = String(
|
creditCode: '',
|
||||||
contract.partyB ||
|
partyRole: 'B',
|
||||||
contract.partyBName ||
|
});
|
||||||
contract.contractPartyB ||
|
}
|
||||||
contract.customerContractPartyB ||
|
}
|
||||||
contract.secondParty ||
|
|
||||||
contract.secondPartyName ||
|
|
||||||
''
|
|
||||||
).trim();
|
|
||||||
if (!carrierName || !contract.id) return null;
|
|
||||||
const contractIdentifier = contract.contractName || contract.contractNo || contract.id;
|
const contractIdentifier = contract.contractName || contract.contractNo || contract.id;
|
||||||
return {
|
parties.forEach(party => {
|
||||||
|
const roleLabel = party.partyRole === 'C' ? '丙方' : '乙方';
|
||||||
|
const optionValue = [contract.id, party.id || '', party.customerName].join('__');
|
||||||
|
options.push({
|
||||||
id: contract.id,
|
id: contract.id,
|
||||||
carrierId:
|
carrierId: party.customerId || '',
|
||||||
contract.partyBId ||
|
value: optionValue,
|
||||||
contract.partyBUserId ||
|
label: `${party.customerName}(${roleLabel}) - ${contractIdentifier}`,
|
||||||
contract.contractPartyBId ||
|
carrierName: party.customerName,
|
||||||
contract.customerContractPartyBId ||
|
fullName: party.customerName,
|
||||||
contract.secondPartyId ||
|
|
||||||
contract.secondPartyUserId ||
|
|
||||||
contract.carrierId ||
|
|
||||||
'',
|
|
||||||
value: contract.id,
|
|
||||||
label:
|
|
||||||
carrierNameCounts[carrierName] > 1
|
|
||||||
? `${carrierName}(${contractIdentifier})`
|
|
||||||
: carrierName,
|
|
||||||
carrierName,
|
|
||||||
fullName: carrierName,
|
|
||||||
carrierContractId: contract.id,
|
carrierContractId: contract.id,
|
||||||
};
|
carrierPartyId: party.id || '',
|
||||||
})
|
carrierPartyRole: party.partyRole,
|
||||||
.filter(Boolean);
|
creditCode: party.creditCode || '',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return options;
|
||||||
},
|
},
|
||||||
resetWaybillCarrierContractState() {
|
resetWaybillCarrierContractState() {
|
||||||
this.waybillCarrierContractRequestId += 1;
|
this.waybillCarrierContractRequestId += 1;
|
||||||
@@ -7860,6 +7954,8 @@ export default {
|
|||||||
this.form.carrierName = '';
|
this.form.carrierName = '';
|
||||||
this.form.carrierId = '';
|
this.form.carrierId = '';
|
||||||
this.form.carrierContractId = '';
|
this.form.carrierContractId = '';
|
||||||
|
this.form.carrierPartyId = '';
|
||||||
|
this.form.carrierPartyRole = '';
|
||||||
}
|
}
|
||||||
return options;
|
return options;
|
||||||
})
|
})
|
||||||
@@ -7950,10 +8046,14 @@ export default {
|
|||||||
);
|
);
|
||||||
if (this.form.carrierType !== '自运') {
|
if (this.form.carrierType !== '自运') {
|
||||||
this.form.carrierContractId = carrier?.carrierContractId || '';
|
this.form.carrierContractId = carrier?.carrierContractId || '';
|
||||||
|
this.form.carrierPartyId = carrier?.carrierPartyId || '';
|
||||||
|
this.form.carrierPartyRole = carrier?.carrierPartyRole || '';
|
||||||
this.form.carrierId = carrier?.carrierId || '';
|
this.form.carrierId = carrier?.carrierId || '';
|
||||||
this.form.carrierName = carrier?.carrierName || '';
|
this.form.carrierName = carrier?.carrierName || '';
|
||||||
} else {
|
} else {
|
||||||
this.form.carrierId = carrier?.carrierContractId ? '' : carrier?.id || '';
|
this.form.carrierId = carrier?.carrierContractId ? '' : carrier?.id || '';
|
||||||
|
this.form.carrierPartyId = '';
|
||||||
|
this.form.carrierPartyRole = '';
|
||||||
this.form.carrierName = value || '';
|
this.form.carrierName = value || '';
|
||||||
}
|
}
|
||||||
// 承运商变更后清空司机/车辆,避免跨组织脏数据
|
// 承运商变更后清空司机/车辆,避免跨组织脏数据
|
||||||
@@ -7967,19 +8067,10 @@ export default {
|
|||||||
this.taskDriverOptions = [];
|
this.taskDriverOptions = [];
|
||||||
this.taskEscortOptions = [];
|
this.taskEscortOptions = [];
|
||||||
},
|
},
|
||||||
getTaskCarrierFilter() {
|
|
||||||
return {
|
|
||||||
carrierId: this.form.carrierId || '',
|
|
||||||
carrierName: this.form.carrierName || '',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
loadTaskDriverOptions() {
|
loadTaskDriverOptions() {
|
||||||
if (!this.taskInfoFormEnabled || this.taskDriverLoading) return Promise.resolve([]);
|
if (!this.taskInfoFormEnabled || this.taskDriverLoading) return Promise.resolve([]);
|
||||||
this.taskDriverLoading = true;
|
this.taskDriverLoading = true;
|
||||||
return fetchDriversByCarrierOrganizations(
|
return fetchDriverCandidates({ size: 9999, posts: '司机' })
|
||||||
{ size: 9999, posts: '司机' },
|
|
||||||
this.getTaskCarrierFilter()
|
|
||||||
)
|
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.taskDriverOptions = records;
|
this.taskDriverOptions = records;
|
||||||
return this.taskDriverOptions;
|
return this.taskDriverOptions;
|
||||||
@@ -7990,16 +8081,8 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchTaskDriverSuggestions(queryString, callback) {
|
fetchTaskDriverSuggestions(queryString, callback) {
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const carrier = this.getTaskCarrierFilter();
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.taskDriverLoading = true;
|
this.taskDriverLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' })
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' },
|
|
||||||
carrier
|
|
||||||
)
|
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.taskDriverOptions = records;
|
this.taskDriverOptions = records;
|
||||||
callback(
|
callback(
|
||||||
@@ -8019,16 +8102,12 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchTaskEscortSuggestions(queryString, callback) {
|
fetchTaskEscortSuggestions(queryString, callback) {
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const carrier = this.getTaskCarrierFilter();
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.taskEscortLoading = true;
|
this.taskEscortLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '押运员' },
|
size: 20,
|
||||||
carrier
|
...(keyword ? { driverName: keyword } : {}),
|
||||||
)
|
posts: '押运员',
|
||||||
|
})
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.taskEscortOptions = records;
|
this.taskEscortOptions = records;
|
||||||
callback(records.map(item => ({ ...item, value: item.driverName || item.name || '' })));
|
callback(records.map(item => ({ ...item, value: item.driverName || item.name || '' })));
|
||||||
@@ -8364,7 +8443,6 @@ export default {
|
|||||||
}
|
}
|
||||||
if (!this.isTaskFullMode) {
|
if (!this.isTaskFullMode) {
|
||||||
requiredFields.push(['cargoName', '货物名称']);
|
requiredFields.push(['cargoName', '货物名称']);
|
||||||
requiredFields.push(['model', '型号']);
|
|
||||||
requiredFields.push(['quantity', '数量']);
|
requiredFields.push(['quantity', '数量']);
|
||||||
}
|
}
|
||||||
const emptyField = requiredFields.find(([prop]) => this.isBillingFieldEmpty(row[prop]));
|
const emptyField = requiredFields.find(([prop]) => this.isBillingFieldEmpty(row[prop]));
|
||||||
@@ -10164,6 +10242,14 @@ export default {
|
|||||||
this.mileageForm = { id: '', mileage: '', mileageRemark: '' };
|
this.mileageForm = { id: '', mileage: '', mileageRemark: '' };
|
||||||
this.$refs.mileageFormRef?.clearValidate();
|
this.$refs.mileageFormRef?.clearValidate();
|
||||||
},
|
},
|
||||||
|
// 行操作「完成」的唯一入口:待回单确认的运单走确认回单(后端校验司机打卡节点齐全且无未了结异常,
|
||||||
|
// 配置里没有确认回单动作时退回普通完成);进行中/处理中的运单二次确认后直接置完成。
|
||||||
|
handleComplete(row) {
|
||||||
|
if (this.canConfirmReturn(row)) {
|
||||||
|
return this.handleAction('confirmReturn', row);
|
||||||
|
}
|
||||||
|
return this.handleAction('complete', row);
|
||||||
|
},
|
||||||
handleAction(action, row) {
|
handleAction(action, row) {
|
||||||
if (action === 'reassign') {
|
if (action === 'reassign') {
|
||||||
this.openReassignDrawer(row);
|
this.openReassignDrawer(row);
|
||||||
@@ -10175,8 +10261,16 @@ export default {
|
|||||||
cancel: '取消',
|
cancel: '取消',
|
||||||
complete: this.completeActionLabel,
|
complete: this.completeActionLabel,
|
||||||
reassign: '重新派单',
|
reassign: '重新派单',
|
||||||
|
confirmReturn: '完成',
|
||||||
}[action];
|
}[action];
|
||||||
this.$confirm(`确定${actionName}该${this.config.title}?`, '提示', {
|
// 回单确认与「完成」都是终态动作(本轮不做撤销),把后果写在提示里,别让人以为还能退回
|
||||||
|
let confirmText = `确定${actionName}该${this.config.title}?`;
|
||||||
|
if (action === 'confirmReturn') {
|
||||||
|
confirmText = '回单确认后该运单将置为已完成,且不可撤销。是否继续?';
|
||||||
|
} else if (action === 'complete') {
|
||||||
|
confirmText = `确定完成该${this.config.title}?完成后将置为已完成,且不可撤销。`;
|
||||||
|
}
|
||||||
|
this.$confirm(confirmText, '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@@ -10229,20 +10323,8 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchReassignDriverSuggestions(queryString, callback) {
|
fetchReassignDriverSuggestions(queryString, callback) {
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const row = this.reassignDrawer.row || {};
|
|
||||||
const carrier = {
|
|
||||||
carrierId: row.carrierId || '',
|
|
||||||
carrierName: row.carrierName || '',
|
|
||||||
};
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.reassignDrawer.driverLoading = true;
|
this.reassignDrawer.driverLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' })
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' },
|
|
||||||
carrier
|
|
||||||
)
|
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.reassignDriverOptions = records;
|
this.reassignDriverOptions = records;
|
||||||
callback(
|
callback(
|
||||||
@@ -10382,11 +10464,11 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const pendingReturnCount = this.selectionList.filter(
|
const pendingReturnCount = this.selectionList.filter(
|
||||||
row => this.statusValue(row) === 'pending_return'
|
row => this.statusValue(row) === 'pending_return_confirm'
|
||||||
).length;
|
).length;
|
||||||
const tip =
|
const tip =
|
||||||
pendingReturnCount > 0
|
pendingReturnCount > 0
|
||||||
? `确定完成选中的运单?其中 ${pendingReturnCount} 条为待确认回单,确认后将转为已完成。`
|
? `确定完成选中的运单?其中 ${pendingReturnCount} 条为待回单确认,确认后将转为已完成。`
|
||||||
: '确定完成选中的运单?';
|
: '确定完成选中的运单?';
|
||||||
this.$confirm(tip, '提示', {
|
this.$confirm(tip, '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
@@ -10402,25 +10484,38 @@ export default {
|
|||||||
this.onLoad(this.page, this.query);
|
this.onLoad(this.page, this.query);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleRoadLoading() {
|
async handleRoadLoading() {
|
||||||
if (!this.selectionList.length) {
|
if (!this.selectionList.length) {
|
||||||
this.$message.warning('请选择至少一条数据');
|
this.$message.warning('请选择至少一条数据');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const nonRoadWaybills = this.selectionList.filter(row => !this.waybillIsRoadTransport(row));
|
const selectedIds = this.selectionList.map(row => row.id).filter(Boolean);
|
||||||
if (nonRoadWaybills.length) {
|
if (!selectedIds.length) {
|
||||||
this.$message.warning('公路配载仅支持运输方式为“公路运输”的运单');
|
this.$message.warning('请选择至少一条数据');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const unavailableWaybills = this.selectionList.filter(
|
// 可配载与否只看后端查询结果
|
||||||
row =>
|
let loadableIds;
|
||||||
!['pending', 'processing', 'running'].includes(this.statusValue(row)) ||
|
try {
|
||||||
row.loadingId ||
|
const res = await getWaybillList(1, selectedIds.length, {
|
||||||
row.loadingManageId ||
|
loadableOnly: 1,
|
||||||
row.loadingNo
|
ids: selectedIds.join(','),
|
||||||
);
|
});
|
||||||
if (unavailableWaybills.length) {
|
loadableIds = new Set(extractRecords(res).map(row => String(row.id)));
|
||||||
this.$message.warning('公路配载仅支持待执行/进行中且未关联有效配载单的运单');
|
} catch (error) {
|
||||||
|
this.$message.error('校验运单可配载状态失败,请重试');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const rejectedRows = this.selectionList.filter(row => !loadableIds.has(String(row.id)));
|
||||||
|
if (rejectedRows.length) {
|
||||||
|
const rejectedText = rejectedRows
|
||||||
|
.map(row => {
|
||||||
|
const reason = this.roadLoadingRejectReasonText(row);
|
||||||
|
const no = row.waybillNo || row.id || '';
|
||||||
|
return `${no}(${reason})`;
|
||||||
|
})
|
||||||
|
.join('、');
|
||||||
|
this.$message.warning(`${rejectedText};公路配载仅支持公路、待执行且未配载的运单`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -10443,6 +10538,13 @@ export default {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 只给后端判定为不可配载的运单生成可读原因,本身不参与准入判定
|
||||||
|
roadLoadingRejectReasonText(row = {}) {
|
||||||
|
if (!this.waybillIsRoadTransport(row)) return '非公路运输';
|
||||||
|
if (String(row.businessStatus || '') !== 'pending') return '状态不是待执行';
|
||||||
|
if (row.loadingNo) return '已关联配载单';
|
||||||
|
return '运单数据可能已变化,请刷新后重试';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<template>
|
||||||
|
<mk-public-shell biz-type="contract-change" :get-form="getForm">
|
||||||
|
<contract-manage-change ref="page" />
|
||||||
|
</mk-public-shell>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MkPublicShell from '@/views/mk/mk-public-shell.vue';
|
||||||
|
import ContractManageChange from '@/views/business/contract-manage-change.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ContractChangePublicView',
|
||||||
|
components: { MkPublicShell, ContractManageChange },
|
||||||
|
methods: {
|
||||||
|
getForm() {
|
||||||
|
const page = this.$refs.page;
|
||||||
|
const row = page?.form || {};
|
||||||
|
return {
|
||||||
|
...row,
|
||||||
|
partyAJson: row.partyAJson || '',
|
||||||
|
partyBJson: row.partyBJson || '',
|
||||||
|
partyCJson: row.partyCJson || '',
|
||||||
|
partyARows: page?.partyARows || [],
|
||||||
|
partyBRows: page?.partyBRows || [],
|
||||||
|
partyCRows: page?.partyCRows || [],
|
||||||
|
subject: row.contractName || row.contractNo || '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,407 @@
|
|||||||
|
<template>
|
||||||
|
<basic-container class="contract-change-page">
|
||||||
|
<avue-crud
|
||||||
|
:option="tableOption"
|
||||||
|
:table-loading="loading"
|
||||||
|
:data="data"
|
||||||
|
v-model:page="page"
|
||||||
|
v-model="tableForm"
|
||||||
|
ref="crud"
|
||||||
|
:permission="permissionList"
|
||||||
|
@search-change="searchChange"
|
||||||
|
@search-reset="searchReset"
|
||||||
|
@selection-change="selectionChange"
|
||||||
|
@current-change="currentChange"
|
||||||
|
@size-change="sizeChange"
|
||||||
|
@refresh-change="refreshChange"
|
||||||
|
@on-load="onLoad"
|
||||||
|
>
|
||||||
|
<template #menu-left>
|
||||||
|
<el-button type="primary" plain :loading="hcsRepushingId === 'batch'" @click="handleHcsBatchRepush">
|
||||||
|
批量同步
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
plain
|
||||||
|
v-if="hasPermission(`${config.permission}_delete`)"
|
||||||
|
@click="handleDelete"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #approvalStatus="{ row }">
|
||||||
|
{{ row.approvalStatusName || statusLabel(row.approvalStatus) }}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #syncStatus="{ row }">
|
||||||
|
<el-tag v-if="row.syncStatus" :type="syncTagType(row.syncStatus)" class="status-text">
|
||||||
|
{{ syncLabel(row.syncStatus) }}
|
||||||
|
</el-tag>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #menu="{ row }">
|
||||||
|
<el-link type="primary" v-if="canView(row)" @click="openForm('view', row)"> 查看 </el-link>
|
||||||
|
<el-link type="primary" v-if="canEdit(row)" @click="openForm('edit', row)"> 编辑 </el-link>
|
||||||
|
<el-link type="danger" v-if="canDelete(row)" @click="rowDel(row)"> 删除 </el-link>
|
||||||
|
<el-link
|
||||||
|
v-for="operation in customOperations(row)"
|
||||||
|
:key="operation.action"
|
||||||
|
:type="
|
||||||
|
operation.type === 'warning'
|
||||||
|
? 'warning'
|
||||||
|
: operation.type === 'success'
|
||||||
|
? 'success'
|
||||||
|
: 'primary'
|
||||||
|
"
|
||||||
|
@click="handleCustomOperation(operation, row)"
|
||||||
|
>
|
||||||
|
{{ operation.label }}
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
</basic-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as api from '@/api/business/contract-change';
|
||||||
|
import { repushBatch as hcsRepushBatch } from '@/api/business/hcs';
|
||||||
|
import { getMKApprovalUrl } from '@/api/system/business-process';
|
||||||
|
import { config, option } from '@/option/business/contract-change';
|
||||||
|
import { approvalStatusOptions } from '@/option/business/common';
|
||||||
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
|
import { isAdministrator } from '@/utils/auth';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
|
const contractChangeFormRoute = '/business/contract-change/form';
|
||||||
|
const contractChangeListRefreshKey = 'contract-change-list-refresh';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ContractChange',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
api,
|
||||||
|
config,
|
||||||
|
tableForm: {},
|
||||||
|
tableOption: this.buildTableOption(),
|
||||||
|
loading: true,
|
||||||
|
data: [],
|
||||||
|
page: {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
query: {},
|
||||||
|
selectionList: [],
|
||||||
|
mkEnabled: false,
|
||||||
|
hcsRepushingId: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['permission', 'userInfo', 'website']),
|
||||||
|
permissionList() {
|
||||||
|
return {
|
||||||
|
addBtn: false,
|
||||||
|
viewBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
isAdmin() {
|
||||||
|
return isAdministrator(this.userInfo);
|
||||||
|
},
|
||||||
|
ids() {
|
||||||
|
return this.selectionList.map(item => item.id).join(',');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
loadMkEnabled()
|
||||||
|
.then(enabled => {
|
||||||
|
this.mkEnabled = enabled;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.mkEnabled = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
if (sessionStorage.getItem(contractChangeListRefreshKey)) {
|
||||||
|
sessionStorage.removeItem(contractChangeListRefreshKey);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
buildTableOption() {
|
||||||
|
return {
|
||||||
|
...option,
|
||||||
|
addBtn: false,
|
||||||
|
viewBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
menuWidth: 320,
|
||||||
|
column: (option.column || []).map(column => ({
|
||||||
|
...column,
|
||||||
|
display: false,
|
||||||
|
align: 'center',
|
||||||
|
headerAlign: 'center',
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
hasPermission(code) {
|
||||||
|
return this.isAdmin || this.validData(this.permission && this.permission[code], false);
|
||||||
|
},
|
||||||
|
statusLabel(status) {
|
||||||
|
return approvalStatusOptions.find(item => item.value === status)?.label || status || '-';
|
||||||
|
},
|
||||||
|
syncLabel(value) {
|
||||||
|
return { unsynced: '待推送', synced: '已推送', failed: '推送失败' }[value] || value;
|
||||||
|
},
|
||||||
|
syncTagType(value) {
|
||||||
|
return { unsynced: 'info', synced: 'success', failed: 'danger' }[value] || 'info';
|
||||||
|
},
|
||||||
|
canHcsRepush(row) {
|
||||||
|
return row.approvalStatus === 'approved' && row.contractId && row.syncStatus !== 'synced';
|
||||||
|
},
|
||||||
|
handleHcsBatchRepush() {
|
||||||
|
if (this.hcsRepushingId) return;
|
||||||
|
if (!this.selectionList.length) {
|
||||||
|
this.$message.warning('请选择至少一条数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const rows = this.selectionList.filter(item => this.canHcsRepush(item));
|
||||||
|
if (!rows.length) {
|
||||||
|
this.$message.warning('请选择审批通过且未同步成功的变更单');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm(`确定同步选中的${rows.length}条合同变更到合规系统?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '正在推送合规,请稍候…',
|
||||||
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
|
});
|
||||||
|
this.hcsRepushingId = 'batch';
|
||||||
|
const contractIds = [...new Set(rows.map(item => item.contractId))];
|
||||||
|
const changeIds = rows.map(item => item.id).join(',');
|
||||||
|
hcsRepushBatch('contract', contractIds)
|
||||||
|
.then(res => {
|
||||||
|
if (res.data?.success === false) {
|
||||||
|
this.$message.error(res.data?.msg || '批量同步失败');
|
||||||
|
return api.markSyncStatus(changeIds, 'failed');
|
||||||
|
}
|
||||||
|
return api.markSyncStatus(changeIds, 'synced').then(() => {
|
||||||
|
this.$message.success(res.data?.data || '批量同步成功');
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => api.markSyncStatus(changeIds, 'failed'))
|
||||||
|
.finally(() => {
|
||||||
|
this.hcsRepushingId = null;
|
||||||
|
loading.close();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
inStatus(row, statusList) {
|
||||||
|
if (!statusList || !statusList.length) return true;
|
||||||
|
return statusList.includes(row.approvalStatus);
|
||||||
|
},
|
||||||
|
canEdit(row) {
|
||||||
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_edit`) &&
|
||||||
|
!row.readonly &&
|
||||||
|
this.inStatus(row, this.config.editStatus)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
canDelete(row) {
|
||||||
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_delete`) &&
|
||||||
|
!row.readonly &&
|
||||||
|
this.inStatus(row, this.config.deleteStatus)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
canView(row) {
|
||||||
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_view`) &&
|
||||||
|
this.inStatus(row, this.config.viewStatus)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
canOperation(operation, row) {
|
||||||
|
if (operation.permission && !this.hasPermission(operation.permission)) return false;
|
||||||
|
if (
|
||||||
|
row.readonly &&
|
||||||
|
['submitApproval', 'withdraw', 'approve', 'reject'].includes(operation.action)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return this.inStatus(row, operation.status);
|
||||||
|
},
|
||||||
|
customOperations(row) {
|
||||||
|
return (this.config.operations || []).filter(operation => {
|
||||||
|
if (operation.mkOnly && !this.mkEnabled) return false;
|
||||||
|
if (operation.localOnly && this.mkEnabled) return false;
|
||||||
|
return this.canOperation(operation, row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
openForm(mode, row = {}) {
|
||||||
|
const query = { mode, id: row.id };
|
||||||
|
if (mode === 'edit') query.name = '编辑合同变更';
|
||||||
|
else if (mode === 'view') query.name = '查看合同变更';
|
||||||
|
this.$router.push({ path: contractChangeFormRoute, query });
|
||||||
|
},
|
||||||
|
handleCustomOperation(operation, row) {
|
||||||
|
if (operation.action === 'mkAudit') {
|
||||||
|
this.handleMkAudit(row);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const run = () => {
|
||||||
|
const request = () => this.api[operation.action](row.id);
|
||||||
|
const afterMk =
|
||||||
|
operation.action === 'submitApproval'
|
||||||
|
? submitMkApprovalFlow({
|
||||||
|
bizType: 'contract-change',
|
||||||
|
bizId: row.id,
|
||||||
|
subjectName: row.contractName || '',
|
||||||
|
approvalStatus: row.approvalStatus || '',
|
||||||
|
mkEnabled: this.mkEnabled,
|
||||||
|
}).then(() => request())
|
||||||
|
: request();
|
||||||
|
const loading =
|
||||||
|
operation.action === 'approve'
|
||||||
|
? this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '正在推送合规,请稍候…',
|
||||||
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
|
})
|
||||||
|
: null;
|
||||||
|
afterMk
|
||||||
|
.then(res => {
|
||||||
|
if (operation.action === 'approve' && res.data?.data === false) {
|
||||||
|
this.$message.warning(res.data?.msg);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.data?.success === false) {
|
||||||
|
this.$message.error(res.data?.msg || `${operation.label}失败,请联系管理员`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$message.success(`${operation.label}成功`);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
})
|
||||||
|
.finally(() => loading && loading.close());
|
||||||
|
};
|
||||||
|
this.$confirm(operation.confirm || `确定${operation.label}该${this.config.title}?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => run());
|
||||||
|
},
|
||||||
|
handleMkAudit(row) {
|
||||||
|
if (!row?.id) {
|
||||||
|
this.$message.warning('变更单ID为空,无法打开审核页');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getMKApprovalUrl({ bizId: String(row.id) })
|
||||||
|
.then(res => {
|
||||||
|
const url = res?.data?.data;
|
||||||
|
if (!url) {
|
||||||
|
this.$message.error('获取审核跳转地址失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
window.open(url, '_blank');
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message.error('获取审核跳转地址失败');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.query = {};
|
||||||
|
this.onLoad(this.page);
|
||||||
|
},
|
||||||
|
searchChange(params, done) {
|
||||||
|
this.query = params;
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad(this.page, params);
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
selectionChange(list) {
|
||||||
|
this.selectionList = list;
|
||||||
|
},
|
||||||
|
selectionClear() {
|
||||||
|
this.selectionList = [];
|
||||||
|
this.$refs.crud?.toggleSelection?.();
|
||||||
|
},
|
||||||
|
currentChange(currentPage) {
|
||||||
|
this.page.currentPage = currentPage;
|
||||||
|
},
|
||||||
|
sizeChange(pageSize) {
|
||||||
|
this.page.pageSize = pageSize;
|
||||||
|
},
|
||||||
|
refreshChange() {
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
},
|
||||||
|
rowDel(row) {
|
||||||
|
this.$confirm('确定将选择数据删除?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
this.api.remove(row.id).then(() => {
|
||||||
|
this.$message.success('删除成功!');
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete() {
|
||||||
|
if (!this.selectionList.length) {
|
||||||
|
this.$message.warning('请选择至少一条数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm('确定将选择数据删除?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
this.api.remove(this.ids).then(() => {
|
||||||
|
this.$message.success('删除成功!');
|
||||||
|
this.selectionClear();
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onLoad(page, params = {}) {
|
||||||
|
this.loading = true;
|
||||||
|
const values = {
|
||||||
|
...this.query,
|
||||||
|
...params,
|
||||||
|
};
|
||||||
|
this.api
|
||||||
|
.getList(page.currentPage, page.pageSize, values)
|
||||||
|
.then(res => {
|
||||||
|
const data = res.data.data || {};
|
||||||
|
this.page.total = data.total || 0;
|
||||||
|
this.data = data.records || [];
|
||||||
|
this.loading = false;
|
||||||
|
this.selectionClear();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.contract-change-page {
|
||||||
|
:deep(.avue-crud__menu) {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,12 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<basic-container class="contract-change-page">
|
<basic-container class="contract-change-page">
|
||||||
<div class="archive-page-form__title">{{ pageTitle }}</div>
|
<div class="archive-page-form__title">{{ pageTitle }}</div>
|
||||||
<el-form ref="formRef" :model="form" :rules="rules" label-position="right" label-width="auto" class="contract-change-form">
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
:disabled="pageReadonly"
|
||||||
|
label-position="right"
|
||||||
|
label-width="auto"
|
||||||
|
class="contract-change-form"
|
||||||
|
>
|
||||||
<section class="change-section contract-basic-section">
|
<section class="change-section contract-basic-section">
|
||||||
<div class="dialog-section-title">基本信息</div>
|
<div class="dialog-section-title">基本信息</div>
|
||||||
<div class="contract-basic-section__grid">
|
<div class="contract-basic-section__grid">
|
||||||
<el-form-item label="变更类型" class="contract-basic-section__change-type">
|
<el-form-item label="变更类型" class="contract-basic-section__change-type">
|
||||||
<el-radio-group v-model="form.changeType">
|
<el-radio-group v-model="form.changeType" :disabled="pageReadonly">
|
||||||
<el-radio label="合同信息变更" />
|
<el-radio label="合同信息变更" />
|
||||||
<el-radio label="结算规则变更" />
|
<el-radio label="结算规则变更" />
|
||||||
<el-radio label="终止合同" />
|
<el-radio label="终止合同" />
|
||||||
@@ -27,8 +35,14 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="合同编号">
|
<el-form-item label="合同编号" prop="contractNo">
|
||||||
<el-input v-model="form.contractNo" disabled />
|
<el-input
|
||||||
|
v-model="form.contractNo"
|
||||||
|
maxlength="100"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入合同编号"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="合同名称" prop="contractName">
|
<el-form-item label="合同名称" prop="contractName">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -52,14 +66,41 @@
|
|||||||
<el-form-item label="项目">
|
<el-form-item label="项目">
|
||||||
<el-input v-model="form.projectName" disabled />
|
<el-input v-model="form.projectName" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="合同负责部门">
|
<el-form-item label="合同负责部门" prop="organizationName">
|
||||||
<el-input v-model="form.organizationName" disabled />
|
<el-select
|
||||||
|
v-model="selectedOrganizationId"
|
||||||
|
placeholder="请选择"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
:loading="businessDeptLoading"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
|
@visible-change="visible => visible && loadBusinessDeptOptions()"
|
||||||
|
@change="handleOrganizationChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in businessDeptOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="甲方">
|
<el-form-item label="平台公司" prop="platformCompanyName">
|
||||||
<el-input v-model="form.partyA" disabled />
|
<el-select
|
||||||
</el-form-item>
|
v-model="form.platformCompanyId"
|
||||||
<el-form-item label="乙方">
|
placeholder="请选择平台公司"
|
||||||
<el-input v-model="form.partyB" disabled />
|
filterable
|
||||||
|
clearable
|
||||||
|
:disabled="isSettlementRuleChange || !form.projectId"
|
||||||
|
@change="handlePlatformCompanyChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in platformCompanyOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="签订日期">
|
<el-form-item label="签订日期">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -258,6 +299,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section
|
||||||
|
v-for="party in partySections"
|
||||||
|
:key="party.role"
|
||||||
|
class="change-section contract-party-section"
|
||||||
|
>
|
||||||
|
<div class="dialog-section-title">{{ party.label }}</div>
|
||||||
|
<el-table :data="party.rows" border empty-text="暂无数据" class="change-table">
|
||||||
|
<el-table-column type="index" label="序号" width="70" align="center" />
|
||||||
|
<el-table-column prop="customerName" label="客商名称" min-width="200" align="center">
|
||||||
|
<template #default="{ row }">{{ row.customerName || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="creditCode" label="统一信用代码" min-width="180" align="center">
|
||||||
|
<template #default="{ row }">{{ row.creditCode || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="contactName" label="联系人" min-width="160" align="center">
|
||||||
|
<template #default="{ row }">{{ row.contactName || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="contactPhone" label="联系电话" min-width="150" align="center">
|
||||||
|
<template #default="{ row }">{{ row.contactPhone || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</section>
|
||||||
|
|
||||||
<contract-attachment-section
|
<contract-attachment-section
|
||||||
title="用印材料"
|
title="用印材料"
|
||||||
description
|
description
|
||||||
@@ -274,7 +338,7 @@
|
|||||||
<div class="section-head">
|
<div class="section-head">
|
||||||
<div class="dialog-section-title">计费信息</div>
|
<div class="dialog-section-title">计费信息</div>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="feeGenerationMode !== 'manual'"
|
v-if="!pageReadonly && feeGenerationMode !== 'manual'"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
@click="addPlan"
|
@click="addPlan"
|
||||||
@@ -285,24 +349,27 @@
|
|||||||
><el-radio label="system">系统生成</el-radio
|
><el-radio label="system">系统生成</el-radio
|
||||||
><el-radio label="manual">账单导入生成</el-radio></el-radio-group
|
><el-radio label="manual">账单导入生成</el-radio></el-radio-group
|
||||||
>
|
>
|
||||||
<el-table :data="plans" border class="change-table"
|
<el-table :data="plans" border class="change-table">
|
||||||
><el-table-column type="index" label="序号" width="70" /><el-table-column
|
<el-table-column type="index" label="序号" width="70" />
|
||||||
prop="planName"
|
<el-table-column prop="planName" label="方案名称" min-width="180" />
|
||||||
label="方案名称"
|
<el-table-column label="适用客商" min-width="180">
|
||||||
min-width="220"
|
<template #default="{ row }">
|
||||||
/><el-table-column label="默认方案" min-width="120"
|
{{ row.customerName || billingPlanCustomerLabel(row) || '-' }}
|
||||||
><template #default="{ row }">{{
|
</template>
|
||||||
row.defaultPlan ? '是' : '否'
|
</el-table-column>
|
||||||
}}</template></el-table-column
|
<el-table-column prop="remark" label="备注" min-width="200" />
|
||||||
><el-table-column prop="remark" label="备注" min-width="260" /><el-table-column
|
<el-table-column v-if="!pageReadonly" label="操作" width="180">
|
||||||
label="操作"
|
<template #default="{ row, $index }">
|
||||||
width="180"
|
<el-link type="primary" @click="editPlan(row, $index)">编辑</el-link>
|
||||||
><template #default="{ row, $index }"
|
<el-link type="danger" @click="plans.splice($index, 1)">删除</el-link>
|
||||||
><el-link type="primary" @click="editPlan(row, $index)">编辑</el-link
|
</template>
|
||||||
><el-link type="danger" @click="plans.splice($index, 1)">删除</el-link></template
|
</el-table-column>
|
||||||
></el-table-column
|
<el-table-column v-else label="操作" width="100">
|
||||||
></el-table
|
<template #default="{ row, $index }">
|
||||||
>
|
<el-link type="primary" @click="editPlan(row, $index)">查看</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="change-section">
|
<section class="change-section">
|
||||||
@@ -410,7 +477,7 @@
|
|||||||
:value="item.value"
|
:value="item.value"
|
||||||
/></el-select></template
|
/></el-select></template
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="操作" width="100"
|
<el-table-column v-if="!pageReadonly" label="操作" width="100"
|
||||||
><template #default="{ $index }"
|
><template #default="{ $index }"
|
||||||
><el-link v-if="$index === 0" type="primary" @click="addCustomPeriodRow">添加</el-link
|
><el-link v-if="$index === 0" type="primary" @click="addCustomPeriodRow">添加</el-link
|
||||||
><el-link v-else type="danger" @click="removeCustomPeriodRow($index)"
|
><el-link v-else type="danger" @click="removeCustomPeriodRow($index)"
|
||||||
@@ -419,7 +486,7 @@
|
|||||||
></el-table-column
|
></el-table-column
|
||||||
>
|
>
|
||||||
<template #empty
|
<template #empty
|
||||||
><el-link type="primary" @click="addCustomPeriodRow">添加</el-link></template
|
><el-link v-if="!pageReadonly" type="primary" @click="addCustomPeriodRow">添加</el-link></template
|
||||||
>
|
>
|
||||||
</el-table>
|
</el-table>
|
||||||
</section>
|
</section>
|
||||||
@@ -455,7 +522,7 @@
|
|||||||
:disabled="isSettlementRuleChange"
|
:disabled="isSettlementRuleChange"
|
||||||
/></template
|
/></template
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column v-if="!isSettlementRuleChange" label="操作" width="100"
|
<el-table-column v-if="!pageReadonly && !isSettlementRuleChange" label="操作" width="100"
|
||||||
><template #default="{ $index }"
|
><template #default="{ $index }"
|
||||||
><el-link type="danger" @click="paymentRatioRows.splice($index, 1)"
|
><el-link type="danger" @click="paymentRatioRows.splice($index, 1)"
|
||||||
>删除</el-link
|
>删除</el-link
|
||||||
@@ -464,7 +531,7 @@
|
|||||||
>
|
>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!isSettlementRuleChange"
|
v-if="!pageReadonly && !isSettlementRuleChange"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
@click="addPaymentRatioRow"
|
@click="addPaymentRatioRow"
|
||||||
@@ -476,7 +543,9 @@
|
|||||||
v-model="planDialogVisible"
|
v-model="planDialogVisible"
|
||||||
:value="planEditor"
|
:value="planEditor"
|
||||||
:index="planEditorIndex"
|
:index="planEditorIndex"
|
||||||
|
:readonly="pageReadonly"
|
||||||
:settlement-currency="form.settlementCurrency"
|
:settlement-currency="form.settlementCurrency"
|
||||||
|
:party-options="billingPartyOptions"
|
||||||
@save="savePlan"
|
@save="savePlan"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -519,8 +588,9 @@
|
|||||||
@update:rows="changeMaterials = $event"
|
@update:rows="changeMaterials = $event"
|
||||||
@upload-to-location="handleAttachmentUploadToLocation"
|
@upload-to-location="handleAttachmentUploadToLocation"
|
||||||
/>
|
/>
|
||||||
<div class="page-footer">
|
<div v-if="!pageReadonly" class="page-footer">
|
||||||
<el-button @click="$router.back()">取消</el-button>
|
<el-button @click="goBack">取消</el-button>
|
||||||
|
<el-button v-if="isContractChangeModule" @click="saveDraft">保存草稿</el-button>
|
||||||
<el-button type="primary" @click="submit">提交</el-button>
|
<el-button type="primary" @click="submit">提交</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -533,8 +603,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as api from '@/api/business/contract-manage';
|
import * as contractApi from '@/api/business/contract-manage';
|
||||||
|
import * as changeApi from '@/api/business/contract-change';
|
||||||
|
import { getDetail as getProjectDetail } from '@/api/business/project-apply';
|
||||||
|
import { getBusinessDeptSelect, getPlatformCompanySelect } from '@/api/system/dept';
|
||||||
|
import { getMkPublicDetail } from '@/api/mk-process';
|
||||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
|
import { normalizeBusinessDeptOptions } from '@/utils/dept';
|
||||||
import BillingPlanEditor from './components/billing-plan-editor.vue';
|
import BillingPlanEditor from './components/billing-plan-editor.vue';
|
||||||
import ContractAttachmentSection, {
|
import ContractAttachmentSection, {
|
||||||
isContractSealMaterialLocation,
|
isContractSealMaterialLocation,
|
||||||
@@ -571,6 +646,8 @@ const defaultContractFormatOptions = [
|
|||||||
{ label: '电子合同', value: '电子合同' },
|
{ label: '电子合同', value: '电子合同' },
|
||||||
{ label: '纸质合同', value: '纸质合同' },
|
{ label: '纸质合同', value: '纸质合同' },
|
||||||
];
|
];
|
||||||
|
const contractChangeListRoute = '/business/contract-change';
|
||||||
|
const contractChangeListRefreshKey = 'contract-change-list-refresh';
|
||||||
const normalizeOptionalPositiveInteger = value => {
|
const normalizeOptionalPositiveInteger = value => {
|
||||||
if (value === undefined || value === null || value === '') return null;
|
if (value === undefined || value === null || value === '') return null;
|
||||||
const number = Number(value);
|
const number = Number(value);
|
||||||
@@ -610,6 +687,45 @@ const normalizeCustomPeriods = (periods = []) =>
|
|||||||
endDay: Number(item?.endDay) > 0 ? Number(item.endDay) : '',
|
endDay: Number(item?.endDay) > 0 ? Number(item.endDay) : '',
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
const createPartyRow = (row = {}) => ({
|
||||||
|
id: row.id || `${Date.now()}${Math.floor(Math.random() * 1000)}`,
|
||||||
|
customerId: row.customerId || '',
|
||||||
|
customerName: row.customerName || '',
|
||||||
|
creditCode: row.creditCode || row.unifiedCreditCode || '',
|
||||||
|
contactId: row.contactId || '',
|
||||||
|
contactName: row.contactName || '',
|
||||||
|
contactPhone: row.contactPhone || '',
|
||||||
|
});
|
||||||
|
|
||||||
|
const partyRoleLabel = role => {
|
||||||
|
if (role === 'A') return '甲方';
|
||||||
|
if (role === 'B') return '乙方';
|
||||||
|
if (role === 'C') return '丙方';
|
||||||
|
return role || '';
|
||||||
|
};
|
||||||
|
|
||||||
|
const normalizePartyRows = (partyJson, fallbackName, requireOne) => {
|
||||||
|
const rows = (() => {
|
||||||
|
if (Array.isArray(partyJson)) return partyJson;
|
||||||
|
if (!partyJson) return [];
|
||||||
|
try {
|
||||||
|
const data = JSON.parse(partyJson);
|
||||||
|
return Array.isArray(data) ? data : [];
|
||||||
|
} catch (error) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
})().map(item => createPartyRow(item));
|
||||||
|
if (rows.length) return rows;
|
||||||
|
if (fallbackName) {
|
||||||
|
return String(fallbackName)
|
||||||
|
.split(/[、,]/)
|
||||||
|
.map(name => name.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
.map(name => createPartyRow({ customerName: name }));
|
||||||
|
}
|
||||||
|
return requireOne ? [createPartyRow()] : [];
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { BillingPlanEditor, ContractAttachmentSection, ElImageViewer, OpenFileViewer },
|
components: { BillingPlanEditor, ContractAttachmentSection, ElImageViewer, OpenFileViewer },
|
||||||
data() {
|
data() {
|
||||||
@@ -617,6 +733,9 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
period: [],
|
period: [],
|
||||||
plans: [],
|
plans: [],
|
||||||
|
partyARows: [],
|
||||||
|
partyBRows: [],
|
||||||
|
partyCRows: [],
|
||||||
attachments: [],
|
attachments: [],
|
||||||
contractFiles: [],
|
contractFiles: [],
|
||||||
contractFileRows: [],
|
contractFileRows: [],
|
||||||
@@ -654,8 +773,12 @@ export default {
|
|||||||
settlementCurrencyOptions: [],
|
settlementCurrencyOptions: [],
|
||||||
settlementModeDictOptions: [],
|
settlementModeDictOptions: [],
|
||||||
contractFormatDictOptions: [],
|
contractFormatDictOptions: [],
|
||||||
|
selectedOrganizationId: '',
|
||||||
|
businessDeptOptions: [],
|
||||||
|
businessDeptLoading: false,
|
||||||
|
platformCompanyOptions: [],
|
||||||
planDialogVisible: false,
|
planDialogVisible: false,
|
||||||
planEditor: { planName: '', defaultPlan: false, remark: '', rules: [] },
|
planEditor: { planName: '', remark: '', rules: [] },
|
||||||
planEditorIndex: -1,
|
planEditorIndex: -1,
|
||||||
billingElements: [
|
billingElements: [
|
||||||
'按重量',
|
'按重量',
|
||||||
@@ -667,7 +790,53 @@ export default {
|
|||||||
'按数量',
|
'按数量',
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
|
contractNo: [
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (this.isSettlementRuleChange) {
|
||||||
|
return callback();
|
||||||
|
}
|
||||||
|
const contractNo = String(value || '').trim();
|
||||||
|
if (!contractNo) {
|
||||||
|
return callback(new Error('请输入合同编号'));
|
||||||
|
}
|
||||||
|
if (contractNo.length > 100) {
|
||||||
|
return callback(new Error('合同编号不能超过100个字符'));
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
contractName: [{ required: true, message: '请输入合同名称', trigger: 'blur' }],
|
contractName: [{ required: true, message: '请输入合同名称', trigger: 'blur' }],
|
||||||
|
organizationName: [
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (this.isSettlementRuleChange) {
|
||||||
|
return callback();
|
||||||
|
}
|
||||||
|
if (!String(value || '').trim()) {
|
||||||
|
return callback(new Error('请选择合同负责部门'));
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
platformCompanyName: [
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (this.isSettlementRuleChange) {
|
||||||
|
return callback();
|
||||||
|
}
|
||||||
|
if (!String(value || '').trim()) {
|
||||||
|
return callback(new Error('请选择平台公司'));
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
|
],
|
||||||
contractAmount: [
|
contractAmount: [
|
||||||
{ required: true, message: '请输入合同金额', trigger: 'blur' },
|
{ required: true, message: '请输入合同金额', trigger: 'blur' },
|
||||||
{
|
{
|
||||||
@@ -689,12 +858,25 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
pageTitle() {
|
pageTitle() {
|
||||||
|
if (this.pageReadonly) return this.$route.query.name || '查看合同变更';
|
||||||
return this.$route.query.name || '合同变更';
|
return this.$route.query.name || '合同变更';
|
||||||
},
|
},
|
||||||
|
isContractChangeModule() {
|
||||||
|
return (
|
||||||
|
this.$route.path === '/business/contract-change/form' ||
|
||||||
|
this.$route.path === '/business/contract-change/public-view'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
isPublicViewPage() {
|
||||||
|
return this.$route.path === '/business/contract-change/public-view';
|
||||||
|
},
|
||||||
|
pageReadonly() {
|
||||||
|
return this.isPublicViewPage || this.$route.query.mode === 'view';
|
||||||
|
},
|
||||||
// 高风险/黑名单客商提示:按合同推送合规留痕 hcs_risk_level/hcs_black_status 判定(与合同详情口径一致)
|
// 高风险/黑名单客商提示:按合同推送合规留痕 hcs_risk_level/hcs_black_status 判定(与合同详情口径一致)
|
||||||
riskTipText() {
|
riskTipText() {
|
||||||
const riskLevel = String(this.form.hcsRiskLevel || '').trim();
|
const riskLevel = String(this.form.hcsRiskLevel || '').trim();
|
||||||
const blacklist = String(this.form.hcsBlackStatus || '').toLowerCase() === 'yes';
|
const blacklist = String(this.form.kingdeeBlackStatus || '').toLowerCase() === 'yes';
|
||||||
if (riskLevel !== '2' && !blacklist) return '';
|
if (riskLevel !== '2' && !blacklist) return '';
|
||||||
const parties = [this.form.partyA, this.form.partyB]
|
const parties = [this.form.partyA, this.form.partyB]
|
||||||
.map(name => String(name || '').trim())
|
.map(name => String(name || '').trim())
|
||||||
@@ -702,9 +884,39 @@ export default {
|
|||||||
.join('、');
|
.join('、');
|
||||||
return `【${parties || '相对方'}】:被列入外部黑名单;涉贪污受贿裁判相关提及方(3年以上及其他);被执行人信息;买卖合同纠纷;劳动纠纷;重大纠纷。提交变更前须上传「特批附件」类型附件`;
|
return `【${parties || '相对方'}】:被列入外部黑名单;涉贪污受贿裁判相关提及方(3年以上及其他);被执行人信息;买卖合同纠纷;劳动纠纷;重大纠纷。提交变更前须上传「特批附件」类型附件`;
|
||||||
},
|
},
|
||||||
|
partySections() {
|
||||||
|
return [
|
||||||
|
{ role: 'A', label: '甲方', rows: this.partyARows },
|
||||||
|
{ role: 'B', label: '乙方', rows: this.partyBRows },
|
||||||
|
{ role: 'C', label: '丙方', rows: this.partyCRows },
|
||||||
|
];
|
||||||
|
},
|
||||||
isSettlementRuleChange() {
|
isSettlementRuleChange() {
|
||||||
return this.form.changeType === '结算规则变更';
|
return this.form.changeType === '结算规则变更';
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 计费方案适用客商:客户合同仅甲方;承运商合同仅乙方、丙方
|
||||||
|
*/
|
||||||
|
billingPartyOptions() {
|
||||||
|
const category = String(this.form.contractCategory || '').trim();
|
||||||
|
const allowedRoles =
|
||||||
|
category === '承运商合同' ? ['B', 'C'] : category === '客户合同' ? ['A'] : ['A', 'B', 'C'];
|
||||||
|
return [
|
||||||
|
...this.partyARows.map(row => ({ ...row, partyRole: 'A' })),
|
||||||
|
...this.partyBRows.map(row => ({ ...row, partyRole: 'B' })),
|
||||||
|
...this.partyCRows.map(row => ({ ...row, partyRole: 'C' })),
|
||||||
|
]
|
||||||
|
.filter(row => allowedRoles.includes(row.partyRole))
|
||||||
|
.filter(row => row.customerName || row.customerId)
|
||||||
|
.map(row => ({
|
||||||
|
value: row.id,
|
||||||
|
label: `${partyRoleLabel(row.partyRole)}-${row.customerName || row.customerId}`,
|
||||||
|
partyRole: row.partyRole,
|
||||||
|
partyRowId: row.id,
|
||||||
|
customerId: row.customerId,
|
||||||
|
customerName: row.customerName,
|
||||||
|
}));
|
||||||
|
},
|
||||||
changeAttachmentLocationOptions() {
|
changeAttachmentLocationOptions() {
|
||||||
if (this.isSettlementRuleChange) {
|
if (this.isSettlementRuleChange) {
|
||||||
return ['变更材料'];
|
return ['变更材料'];
|
||||||
@@ -777,6 +989,136 @@ export default {
|
|||||||
formatContractAmountField() {
|
formatContractAmountField() {
|
||||||
this.form.contractAmount = formatContractAmountInput(this.form.contractAmount);
|
this.form.contractAmount = formatContractAmountInput(this.form.contractAmount);
|
||||||
},
|
},
|
||||||
|
handleOrganizationChange(id) {
|
||||||
|
const organizationId = Array.isArray(id) ? id.at(-1) : id;
|
||||||
|
const organization = this.businessDeptOptions.find(
|
||||||
|
item => String(item.id) === String(organizationId)
|
||||||
|
);
|
||||||
|
Object.assign(
|
||||||
|
this.form,
|
||||||
|
organization
|
||||||
|
? {
|
||||||
|
organizationId: organization.id,
|
||||||
|
organizationName: organization.rawLabel || organization.label,
|
||||||
|
}
|
||||||
|
: { organizationId: '', organizationName: '' }
|
||||||
|
);
|
||||||
|
this.selectedOrganizationId = this.form.organizationId
|
||||||
|
? String(this.form.organizationId)
|
||||||
|
: '';
|
||||||
|
},
|
||||||
|
handlePlatformCompanyChange(value) {
|
||||||
|
const matched = this.platformCompanyOptions.find(item => String(item.id) === String(value));
|
||||||
|
this.form.platformCompanyId = matched ? matched.id : '';
|
||||||
|
this.form.platformCompanyName = matched ? matched.label : '';
|
||||||
|
},
|
||||||
|
loadBusinessDeptOptions() {
|
||||||
|
if (this.businessDeptLoading) return;
|
||||||
|
this.businessDeptLoading = true;
|
||||||
|
getBusinessDeptSelect()
|
||||||
|
.then(res => {
|
||||||
|
this.businessDeptOptions = normalizeBusinessDeptOptions(res.data?.data || []);
|
||||||
|
this.syncCurrentBusinessDeptOption();
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.businessDeptLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
syncCurrentBusinessDeptOption() {
|
||||||
|
if (!this.form.organizationId || !this.form.organizationName) return;
|
||||||
|
if (
|
||||||
|
this.businessDeptOptions.some(item => String(item.id) === String(this.form.organizationId))
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.businessDeptOptions.unshift({
|
||||||
|
id: String(this.form.organizationId),
|
||||||
|
value: String(this.form.organizationId),
|
||||||
|
label: this.form.organizationName,
|
||||||
|
rawLabel: this.form.organizationName,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
parseUndertakeDeptIds(value) {
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
return value.map(item => String(item || '').trim()).filter(Boolean);
|
||||||
|
}
|
||||||
|
return String(value || '')
|
||||||
|
.split(',')
|
||||||
|
.map(item => item.trim())
|
||||||
|
.filter(Boolean);
|
||||||
|
},
|
||||||
|
parseUndertakeDeptNames(value) {
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
return value.map(item => String(item || '').trim()).filter(Boolean);
|
||||||
|
}
|
||||||
|
return String(value || '')
|
||||||
|
.split(/[、,,]/)
|
||||||
|
.map(item => item.trim())
|
||||||
|
.filter(Boolean);
|
||||||
|
},
|
||||||
|
loadProjectPlatformCompanies() {
|
||||||
|
const projectId = this.form.projectId;
|
||||||
|
if (!projectId || String(projectId) === '-1') {
|
||||||
|
this.syncCurrentPlatformCompanyOption();
|
||||||
|
return Promise.resolve([]);
|
||||||
|
}
|
||||||
|
return getProjectDetail(projectId)
|
||||||
|
.then(res => {
|
||||||
|
const project = res.data?.data || res.data || {};
|
||||||
|
const ids = this.parseUndertakeDeptIds(project.undertakeDeptId);
|
||||||
|
const names = this.parseUndertakeDeptNames(project.undertakeDeptName);
|
||||||
|
return this.resolveProjectPlatformCompanyOptions(ids, names);
|
||||||
|
})
|
||||||
|
.then(options => {
|
||||||
|
this.platformCompanyOptions = options;
|
||||||
|
this.syncCurrentPlatformCompanyOption();
|
||||||
|
return options;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.syncCurrentPlatformCompanyOption();
|
||||||
|
return this.platformCompanyOptions;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resolveProjectPlatformCompanyOptions(ids, names) {
|
||||||
|
const fallback = ids.map((id, index) => ({
|
||||||
|
id: String(id),
|
||||||
|
label: names[index] || String(id),
|
||||||
|
}));
|
||||||
|
if (!ids.length) return Promise.resolve([]);
|
||||||
|
return getPlatformCompanySelect()
|
||||||
|
.then(res => {
|
||||||
|
const liveList = (res.data?.data || []).map(item => ({
|
||||||
|
id: String(item.id),
|
||||||
|
label: item.deptName || item.fullName || String(item.id),
|
||||||
|
}));
|
||||||
|
return ids.map((id, index) => {
|
||||||
|
const name = String(names[index] || '').trim();
|
||||||
|
const byId = liveList.find(item => String(item.id) === String(id));
|
||||||
|
if (byId) return byId;
|
||||||
|
const byName = name ? liveList.find(item => item.label === name) : null;
|
||||||
|
if (byName) return byName;
|
||||||
|
return {
|
||||||
|
id: String(id),
|
||||||
|
label: name || String(id),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => fallback);
|
||||||
|
},
|
||||||
|
syncCurrentPlatformCompanyOption() {
|
||||||
|
if (!this.form.platformCompanyId || !this.form.platformCompanyName) return;
|
||||||
|
if (
|
||||||
|
this.platformCompanyOptions.some(
|
||||||
|
item => String(item.id) === String(this.form.platformCompanyId)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.platformCompanyOptions.unshift({
|
||||||
|
id: String(this.form.platformCompanyId),
|
||||||
|
label: this.form.platformCompanyName,
|
||||||
|
});
|
||||||
|
},
|
||||||
loadDictionaries() {
|
loadDictionaries() {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
getSystemDictionary({ code: 'currency_type' }),
|
getSystemDictionary({ code: 'currency_type' }),
|
||||||
@@ -809,13 +1151,29 @@ export default {
|
|||||||
async load() {
|
async load() {
|
||||||
const id = this.$route.query.id;
|
const id = this.$route.query.id;
|
||||||
if (!id) return;
|
if (!id) return;
|
||||||
const res = await api.getDetail(id);
|
let data = {};
|
||||||
const data = res.data?.data || res.data || {};
|
if (this.isPublicViewPage) {
|
||||||
|
const res = await getMkPublicDetail('contract-change', id);
|
||||||
|
data = res.data?.data || res.data || {};
|
||||||
|
} else if (this.isContractChangeModule) {
|
||||||
|
const res = await changeApi.getDetail(id);
|
||||||
|
data = res.data?.data || res.data || {};
|
||||||
|
} else {
|
||||||
|
const res = await contractApi.getDetail(id);
|
||||||
|
data = res.data?.data || res.data || {};
|
||||||
|
}
|
||||||
|
const isChangeRecord = this.isContractChangeModule || this.isPublicViewPage;
|
||||||
this.form = {
|
this.form = {
|
||||||
...data,
|
...data,
|
||||||
changeContent: '',
|
// 独立变更单保留 contractId;旧路由以合同 id 作为主键
|
||||||
changeReason: '',
|
contractId: data.contractId || (isChangeRecord ? data.contractId : data.id),
|
||||||
changeAttachmentsJson: '',
|
organizationId: data.organizationId ? String(data.organizationId) : '',
|
||||||
|
organizationName: data.organizationName || '',
|
||||||
|
platformCompanyId: data.platformCompanyId ? String(data.platformCompanyId) : '',
|
||||||
|
platformCompanyName: data.platformCompanyName || '',
|
||||||
|
changeContent: isChangeRecord ? data.changeContent || '' : '',
|
||||||
|
changeReason: isChangeRecord ? data.changeReason || '' : '',
|
||||||
|
changeAttachmentsJson: data.changeAttachmentsJson || '',
|
||||||
copyCount: normalizeOptionalPositiveInteger(data.copyCount),
|
copyCount: normalizeOptionalPositiveInteger(data.copyCount),
|
||||||
invoiceCycle: normalizeOptionalPositiveInteger(data.invoiceCycle),
|
invoiceCycle: normalizeOptionalPositiveInteger(data.invoiceCycle),
|
||||||
paymentDays: normalizeOptionalPositiveInteger(data.paymentDays),
|
paymentDays: normalizeOptionalPositiveInteger(data.paymentDays),
|
||||||
@@ -823,14 +1181,18 @@ export default {
|
|||||||
templateFlag: data.templateFlag ?? 0,
|
templateFlag: data.templateFlag ?? 0,
|
||||||
electronicSealFlag: data.electronicSealFlag ?? 0,
|
electronicSealFlag: data.electronicSealFlag ?? 0,
|
||||||
archiveStatus: data.archiveStatus || '未归档',
|
archiveStatus: data.archiveStatus || '未归档',
|
||||||
changeType: '合同信息变更',
|
changeType: data.changeType || '合同信息变更',
|
||||||
};
|
};
|
||||||
this.changeMaterials = [];
|
this.selectedOrganizationId = this.form.organizationId ? String(this.form.organizationId) : '';
|
||||||
|
this.changeMaterials = this.parse(data.changeAttachmentsJson);
|
||||||
this.period = data.startDate && data.endDate ? [data.startDate, data.endDate] : [];
|
this.period = data.startDate && data.endDate ? [data.startDate, data.endDate] : [];
|
||||||
|
this.partyARows = normalizePartyRows(data.partyAJson, data.partyA, true);
|
||||||
|
this.partyBRows = normalizePartyRows(data.partyBJson, data.partyB, true);
|
||||||
|
this.partyCRows = normalizePartyRows(data.partyCJson, data.partyC, false);
|
||||||
this.plans = this.parse(data.billingPlanJson);
|
this.plans = this.parse(data.billingPlanJson);
|
||||||
this.attachments = this.mergeChangeAttachments(
|
this.attachments = this.mergeChangeAttachments(
|
||||||
this.parse(data.attachmentsJson),
|
this.parse(data.attachmentsJson),
|
||||||
this.parse(data.changeAttachmentsJson)
|
isChangeRecord ? [] : this.parse(data.changeAttachmentsJson)
|
||||||
);
|
);
|
||||||
this.contractFileRows = normalizeContractFileRows(this.parse(data.contractFileJson));
|
this.contractFileRows = normalizeContractFileRows(this.parse(data.contractFileJson));
|
||||||
const rules = this.parseObject(data.settlementRuleJson);
|
const rules = this.parseObject(data.settlementRuleJson);
|
||||||
@@ -871,6 +1233,72 @@ export default {
|
|||||||
this.feeGenerationMode =
|
this.feeGenerationMode =
|
||||||
data.feeGenerationMode || (Number(data.billingEnabled) === 0 ? 'manual' : 'system');
|
data.feeGenerationMode || (Number(data.billingEnabled) === 0 ? 'manual' : 'system');
|
||||||
this.paymentRatioRows = this.parse(data.paymentRatioJson);
|
this.paymentRatioRows = this.parse(data.paymentRatioJson);
|
||||||
|
this.loadBusinessDeptOptions();
|
||||||
|
this.loadProjectPlatformCompanies();
|
||||||
|
},
|
||||||
|
goBack() {
|
||||||
|
if (this.isContractChangeModule) {
|
||||||
|
this.$router.push(contractChangeListRoute);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$router.back();
|
||||||
|
},
|
||||||
|
buildChangePayload() {
|
||||||
|
if (this.settlementConfigTab === 'pre') this.preSettlementConfig = { ...this.settlementRule };
|
||||||
|
else this.formalSettlementConfig = { ...this.settlementRule };
|
||||||
|
const settlementRule = {
|
||||||
|
preSettlementConfig: this.preSettlementConfig,
|
||||||
|
formalSettlementConfig: this.formalSettlementConfig,
|
||||||
|
};
|
||||||
|
if (this.isSettlementRuleChange) {
|
||||||
|
return {
|
||||||
|
id: this.form.id,
|
||||||
|
contractId: this.form.contractId,
|
||||||
|
changeType: this.form.changeType,
|
||||||
|
changeContent: this.form.changeContent,
|
||||||
|
changeReason: this.form.changeReason,
|
||||||
|
feeGenerationMode: this.feeGenerationMode,
|
||||||
|
billingEnabled: this.feeGenerationMode === 'system' ? 1 : 0,
|
||||||
|
billingPlanJson: JSON.stringify(this.plans),
|
||||||
|
settlementRuleJson: JSON.stringify(settlementRule),
|
||||||
|
preSettlementConfigJson: JSON.stringify(this.preSettlementConfig),
|
||||||
|
formalSettlementConfigJson: JSON.stringify(this.formalSettlementConfig),
|
||||||
|
changeAttachmentsJson: JSON.stringify(this.changeMaterials),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...this.form,
|
||||||
|
contractId: this.form.contractId,
|
||||||
|
changeType: this.form.changeType || '合同信息变更',
|
||||||
|
settlementCurrency: String(this.form.settlementCurrency || '').trim() || 'RMB',
|
||||||
|
copyCount: normalizeOptionalPositiveInteger(this.form.copyCount),
|
||||||
|
invoiceCycle: normalizeOptionalPositiveInteger(this.form.invoiceCycle),
|
||||||
|
paymentDays: normalizeOptionalPositiveInteger(this.form.paymentDays),
|
||||||
|
contractAmount: normalizeOptionalAmount(this.form.contractAmount),
|
||||||
|
startDate: this.period[0],
|
||||||
|
endDate: this.period[1],
|
||||||
|
feeGenerationMode: this.feeGenerationMode,
|
||||||
|
billingEnabled: this.feeGenerationMode === 'system' ? 1 : 0,
|
||||||
|
billingPlanJson: JSON.stringify(this.plans),
|
||||||
|
settlementRuleJson: JSON.stringify(settlementRule),
|
||||||
|
preSettlementConfigJson: JSON.stringify(this.preSettlementConfig),
|
||||||
|
formalSettlementConfigJson: JSON.stringify(this.formalSettlementConfig),
|
||||||
|
paymentRatioJson: JSON.stringify(this.paymentRatioRows),
|
||||||
|
contractFileJson: JSON.stringify(this.contractFileRows),
|
||||||
|
attachmentsJson: JSON.stringify(this.attachments),
|
||||||
|
changeContent: this.form.changeContent,
|
||||||
|
changeReason: this.form.changeReason,
|
||||||
|
changeAttachmentsJson: JSON.stringify(this.changeMaterials),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
async saveDraft() {
|
||||||
|
if (this.form.changeType === '终止合同') {
|
||||||
|
this.$message.warning('终止合同无需保存草稿,请直接提交');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const payload = this.buildChangePayload();
|
||||||
|
await changeApi.saveDraft(payload);
|
||||||
|
this.$message.success('草稿已保存');
|
||||||
},
|
},
|
||||||
parse(value) {
|
parse(value) {
|
||||||
try {
|
try {
|
||||||
@@ -921,10 +1349,32 @@ export default {
|
|||||||
.replace(/\D/g, '')
|
.replace(/\D/g, '')
|
||||||
.replace(/^0+/, '');
|
.replace(/^0+/, '');
|
||||||
},
|
},
|
||||||
addPlan() { this.planEditorIndex = -1; this.planEditor = { planName: `计费方案${this.plans.length + 1}`, defaultPlan: !this.plans.length, remark: '', rules: [{}] }; this.planDialogVisible = true; },
|
addPlan() {
|
||||||
editPlan(row, index) { this.planEditorIndex = index; this.planEditor = JSON.parse(JSON.stringify(row)); this.planDialogVisible = true; },
|
this.planEditorIndex = -1;
|
||||||
toggleDefaultPlan(value) { if (value) this.plans.forEach(item => { item.defaultPlan = false; }); },
|
this.planEditor = {
|
||||||
savePlan(value, index) { if (index < 0) this.plans.push(value); else this.plans.splice(index, 1, value); if (value.defaultPlan) this.plans.forEach((item, current) => { if (current !== (index < 0 ? this.plans.length - 1 : index)) item.defaultPlan = false; }); },
|
planName: `计费方案${this.plans.length + 1}`,
|
||||||
|
remark: '',
|
||||||
|
rules: [{}],
|
||||||
|
};
|
||||||
|
this.planDialogVisible = true;
|
||||||
|
},
|
||||||
|
editPlan(row, index) {
|
||||||
|
this.planEditorIndex = index;
|
||||||
|
this.planEditor = JSON.parse(JSON.stringify(row));
|
||||||
|
this.planDialogVisible = true;
|
||||||
|
},
|
||||||
|
billingPlanCustomerLabel(row) {
|
||||||
|
const matched = this.billingPartyOptions.find(
|
||||||
|
item => String(item.partyRowId) === String(row.partyRowId)
|
||||||
|
);
|
||||||
|
return matched?.label || row.customerName || '';
|
||||||
|
},
|
||||||
|
savePlan(value, index) {
|
||||||
|
const nextPlan = { ...value };
|
||||||
|
delete nextPlan.defaultPlan;
|
||||||
|
if (index < 0) this.plans.push(nextPlan);
|
||||||
|
else this.plans.splice(index, 1, nextPlan);
|
||||||
|
},
|
||||||
handleSettlementTypeChange(value) { if (value !== '月结') { this.settlementRule.billCycleType = ''; this.settlementRule.billCutoffDay = ''; this.settlementRule.customPeriods = []; } else if (this.settlementRule.billCycleType === '自定义多周期') this.settlementRule.customPeriods = normalizeCustomPeriods(this.settlementRule.customPeriods || []); else this.settlementRule.customPeriods = []; if (value !== '固定天数周期结算') this.settlementRule.cycleDays = ''; },
|
handleSettlementTypeChange(value) { if (value !== '月结') { this.settlementRule.billCycleType = ''; this.settlementRule.billCutoffDay = ''; this.settlementRule.customPeriods = []; } else if (this.settlementRule.billCycleType === '自定义多周期') this.settlementRule.customPeriods = normalizeCustomPeriods(this.settlementRule.customPeriods || []); else this.settlementRule.customPeriods = []; if (value !== '固定天数周期结算') this.settlementRule.cycleDays = ''; },
|
||||||
handleCycleTypeChange(value) { if (value !== '固定截单日') this.settlementRule.billCutoffDay = ''; if (value === '自定义多周期') this.settlementRule.customPeriods = normalizeCustomPeriods(this.settlementRule.customPeriods || []); else this.settlementRule.customPeriods = []; },
|
handleCycleTypeChange(value) { if (value !== '固定截单日') this.settlementRule.billCutoffDay = ''; if (value === '自定义多周期') this.settlementRule.customPeriods = normalizeCustomPeriods(this.settlementRule.customPeriods || []); else this.settlementRule.customPeriods = []; },
|
||||||
attachmentUrl(row = {}) { return row.url || row.link || row.fileUrl || row.downloadUrl || row.domain || ''; },
|
attachmentUrl(row = {}) { return row.url || row.link || row.fileUrl || row.downloadUrl || row.domain || ''; },
|
||||||
@@ -965,13 +1415,32 @@ export default {
|
|||||||
validateSettlementRule(rule, label) { if (Number(rule.autoGenerate) !== 1) return true; if (!rule.billStartDate || !rule.settlementType) { this.$message.warning(`${label}:请完整填写账单起始日和结算类型`); return false; } if (rule.settlementType === '月结' && !rule.billCycleType) { this.$message.warning(`${label}:请选择结算周期`); return false; } if (rule.settlementType === '月结' && rule.billCycleType === '固定截单日' && !rule.billCutoffDay) { this.$message.warning(`${label}:请选择账单截单日`); return false; } if (rule.settlementType === '月结' && rule.billCycleType === '自定义多周期') return this.validateCustomPeriods(rule.customPeriods, label); if (rule.settlementType === '固定天数周期结算' && !rule.cycleDays) { this.$message.warning(`${label}:请选择周期天数`); return false; } return true; },
|
validateSettlementRule(rule, label) { if (Number(rule.autoGenerate) !== 1) return true; if (!rule.billStartDate || !rule.settlementType) { this.$message.warning(`${label}:请完整填写账单起始日和结算类型`); return false; } if (rule.settlementType === '月结' && !rule.billCycleType) { this.$message.warning(`${label}:请选择结算周期`); return false; } if (rule.settlementType === '月结' && rule.billCycleType === '固定截单日' && !rule.billCutoffDay) { this.$message.warning(`${label}:请选择账单截单日`); return false; } if (rule.settlementType === '月结' && rule.billCycleType === '自定义多周期') return this.validateCustomPeriods(rule.customPeriods, label); if (rule.settlementType === '固定天数周期结算' && !rule.cycleDays) { this.$message.warning(`${label}:请选择周期天数`); return false; } return true; },
|
||||||
async submit() {
|
async submit() {
|
||||||
if (this.form.changeType === '终止合同') {
|
if (this.form.changeType === '终止合同') {
|
||||||
await api.terminate(this.form.id, this.form.changeReason);
|
const contractId = this.form.contractId || this.form.id;
|
||||||
|
await contractApi.terminate(contractId, this.form.changeReason);
|
||||||
this.$message.success('合同已终止');
|
this.$message.success('合同已终止');
|
||||||
this.$router.back();
|
this.goBack();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await this.$refs.formRef.validate();
|
await this.$refs.formRef.validate();
|
||||||
if (!this.isSettlementRuleChange) {
|
if (!this.isSettlementRuleChange) {
|
||||||
|
const contractNo = String(this.form.contractNo || '').trim();
|
||||||
|
if (!contractNo) {
|
||||||
|
this.$message.warning('请输入合同编号');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (contractNo.length > 100) {
|
||||||
|
this.$message.warning('合同编号不能超过100个字符');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.form.contractNo = contractNo;
|
||||||
|
if (!String(this.form.organizationName || '').trim()) {
|
||||||
|
this.$message.warning('请选择合同负责部门');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!String(this.form.platformCompanyName || '').trim()) {
|
||||||
|
this.$message.warning('请选择平台公司');
|
||||||
|
return;
|
||||||
|
}
|
||||||
const total = this.paymentRatioRows.reduce((sum, row) => sum + Number(row.ratioLimit || 0), 0);
|
const total = this.paymentRatioRows.reduce((sum, row) => sum + Number(row.ratioLimit || 0), 0);
|
||||||
if (this.paymentRatioRows.length && Math.abs(total - 100) > 0.0001) {
|
if (this.paymentRatioRows.length && Math.abs(total - 100) > 0.0001) {
|
||||||
this.$message.warning('付款比例上限合计必须等于100%');
|
this.$message.warning('付款比例上限合计必须等于100%');
|
||||||
@@ -986,48 +1455,22 @@ export default {
|
|||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const settlementRule = {
|
const payload = this.buildChangePayload();
|
||||||
preSettlementConfig: this.preSettlementConfig,
|
if (this.isContractChangeModule) {
|
||||||
formalSettlementConfig: this.formalSettlementConfig,
|
await changeApi.submit(payload);
|
||||||
};
|
await submitMkApprovalFlow({
|
||||||
const payload = this.isSettlementRuleChange
|
bizType: 'contract-change',
|
||||||
? {
|
bizId: this.form.id,
|
||||||
id: this.form.id,
|
subjectName: this.form.contractName || '',
|
||||||
changeType: this.form.changeType,
|
approvalStatus: this.form.approvalStatus || '',
|
||||||
changeContent: this.form.changeContent,
|
mkEnabled: await loadMkEnabled().catch(() => false),
|
||||||
changeReason: this.form.changeReason,
|
});
|
||||||
feeGenerationMode: this.feeGenerationMode,
|
sessionStorage.setItem(contractChangeListRefreshKey, '1');
|
||||||
billingEnabled: this.feeGenerationMode === 'system' ? 1 : 0,
|
this.$message.success('变更已提交');
|
||||||
billingPlanJson: JSON.stringify(this.plans),
|
this.$router.push(contractChangeListRoute);
|
||||||
settlementRuleJson: JSON.stringify(settlementRule),
|
return;
|
||||||
preSettlementConfigJson: JSON.stringify(this.preSettlementConfig),
|
|
||||||
formalSettlementConfigJson: JSON.stringify(this.formalSettlementConfig),
|
|
||||||
changeAttachmentsJson: JSON.stringify(this.changeMaterials),
|
|
||||||
}
|
}
|
||||||
: {
|
await contractApi.submitChange(payload);
|
||||||
...this.form,
|
|
||||||
changeType: this.form.changeType || '合同信息变更',
|
|
||||||
settlementCurrency: String(this.form.settlementCurrency || '').trim() || 'RMB',
|
|
||||||
copyCount: normalizeOptionalPositiveInteger(this.form.copyCount),
|
|
||||||
invoiceCycle: normalizeOptionalPositiveInteger(this.form.invoiceCycle),
|
|
||||||
paymentDays: normalizeOptionalPositiveInteger(this.form.paymentDays),
|
|
||||||
contractAmount: normalizeOptionalAmount(this.form.contractAmount),
|
|
||||||
startDate: this.period[0],
|
|
||||||
endDate: this.period[1],
|
|
||||||
feeGenerationMode: this.feeGenerationMode,
|
|
||||||
billingEnabled: this.feeGenerationMode === 'system' ? 1 : 0,
|
|
||||||
billingPlanJson: JSON.stringify(this.plans),
|
|
||||||
settlementRuleJson: JSON.stringify(settlementRule),
|
|
||||||
preSettlementConfigJson: JSON.stringify(this.preSettlementConfig),
|
|
||||||
formalSettlementConfigJson: JSON.stringify(this.formalSettlementConfig),
|
|
||||||
paymentRatioJson: JSON.stringify(this.paymentRatioRows),
|
|
||||||
contractFileJson: JSON.stringify(this.contractFileRows),
|
|
||||||
attachmentsJson: JSON.stringify(this.attachments),
|
|
||||||
changeContent: this.form.changeContent,
|
|
||||||
changeReason: this.form.changeReason,
|
|
||||||
changeAttachmentsJson: JSON.stringify(this.changeMaterials),
|
|
||||||
};
|
|
||||||
await api.submitChange(payload);
|
|
||||||
await submitMkApprovalFlow({
|
await submitMkApprovalFlow({
|
||||||
bizType: 'contract-manage',
|
bizType: 'contract-manage',
|
||||||
bizId: this.form.id,
|
bizId: this.form.id,
|
||||||
@@ -1047,6 +1490,16 @@ export default {
|
|||||||
.contract-change-page :deep(.basic-container__card) { border: 0; background: transparent; box-shadow: none; }
|
.contract-change-page :deep(.basic-container__card) { border: 0; background: transparent; box-shadow: none; }
|
||||||
.contract-change-form { background: #f5f6fa; }
|
.contract-change-form { background: #f5f6fa; }
|
||||||
.change-section { padding: 20px 24px; background: #fff; border-bottom: 1px solid #eff1f7; margin-top: 12px; }
|
.change-section { padding: 20px 24px; background: #fff; border-bottom: 1px solid #eff1f7; margin-top: 12px; }
|
||||||
|
.contract-party-section {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
padding: 14px 16px 16px;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #fff;
|
||||||
|
border-bottom: 0;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
.contract-party-section > .dialog-section-title { margin-bottom: 16px; color: #303133; }
|
||||||
.contract-basic-section { margin-bottom: 12px; padding: 14px 16px 16px; overflow: hidden; background: #fff; border-bottom: 0; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
|
.contract-basic-section { margin-bottom: 12px; padding: 14px 16px 16px; overflow: hidden; background: #fff; border-bottom: 0; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
|
||||||
.contract-basic-section > .dialog-section-title { margin-bottom: 20px; color: #303133; }
|
.contract-basic-section > .dialog-section-title { margin-bottom: 20px; color: #303133; }
|
||||||
.contract-basic-section__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 48px; }
|
.contract-basic-section__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 48px; }
|
||||||
|
|||||||
@@ -13,8 +13,18 @@ export default {
|
|||||||
components: { MkPublicShell, ContractManage },
|
components: { MkPublicShell, ContractManage },
|
||||||
methods: {
|
methods: {
|
||||||
getForm() {
|
getForm() {
|
||||||
const row = this.$refs.page?.detailRow || {};
|
const page = this.$refs.page;
|
||||||
return { ...row, subject: row.contractName || row.contractNo || '' };
|
const row = page?.detailRow || {};
|
||||||
|
return {
|
||||||
|
...row,
|
||||||
|
partyAJson: row.partyAJson || '',
|
||||||
|
partyBJson: row.partyBJson || '',
|
||||||
|
partyCJson: row.partyCJson || '',
|
||||||
|
partyARows: page?.detailPartyARows || [],
|
||||||
|
partyBRows: page?.detailPartyBRows || [],
|
||||||
|
partyCRows: page?.detailPartyCRows || [],
|
||||||
|
subject: row.contractName || row.contractNo || '',
|
||||||
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -898,16 +898,6 @@
|
|||||||
>
|
>
|
||||||
<div title="配载信息" class="loading-manage-dialog__load-info-card">
|
<div title="配载信息" class="loading-manage-dialog__load-info-card">
|
||||||
<section-card>
|
<section-card>
|
||||||
<div class="loading-manage-dialog__admission-tip">
|
|
||||||
<div class="loading-manage-dialog__admission-title">可配载条件</div>
|
|
||||||
<div class="loading-manage-dialog__admission-text">
|
|
||||||
同时满足以下条件的运单可被配载:运输方式为「公路」;运单状态为「待执行」或「进行中」;未关联其他有效配载单。
|
|
||||||
</div>
|
|
||||||
<div class="loading-manage-dialog__admission-title">配载后状态说明</div>
|
|
||||||
<div class="loading-manage-dialog__admission-text">
|
|
||||||
子运单:按项目过程配置是否需司机接单,无需接单则为进行中,需接单则为待执行。配载单:按所选运单所属项目的过程配置,需接单则为待执行,无需接单则为进行中。
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="loading-manage-dialog__candidate-search">
|
<div class="loading-manage-dialog__candidate-search">
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@@ -1079,31 +1069,12 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in driverOptions"
|
v-for="item in driverOptions"
|
||||||
:key="item.id || item.driverName || item.name"
|
:key="item.id || item.driverName || item.name"
|
||||||
:label="item.driverName || item.name"
|
:label="driverOptionText(item)"
|
||||||
:value="item.driverName || item.name"
|
:value="item.driverName || item.name"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="运输方式">
|
|
||||||
<el-select
|
|
||||||
v-model="candidateQuery.transportType"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
placeholder="请选择"
|
|
||||||
:disabled="dialogMode === 'add'"
|
|
||||||
@visible-change="visible => visible && loadTransportTypeOptions()"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in transportTypeOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</template>
|
</template>
|
||||||
<el-col
|
<el-col
|
||||||
:span="candidateSearchVisible ? 24 : 6"
|
:span="candidateSearchVisible ? 24 : 6"
|
||||||
@@ -1212,6 +1183,16 @@
|
|||||||
min-width="160"
|
min-width="160"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="carrierContractName"
|
||||||
|
label="承运商合同"
|
||||||
|
min-width="160"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.carrierContractName || '-' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="planName"
|
prop="planName"
|
||||||
label="计划名称"
|
label="计划名称"
|
||||||
@@ -1467,7 +1448,7 @@
|
|||||||
<el-select
|
<el-select
|
||||||
:model-value="
|
:model-value="
|
||||||
dialogForm.carrierType === '承运商'
|
dialogForm.carrierType === '承运商'
|
||||||
? dialogForm.carrierContractId
|
? taskCarrierSelectedValue
|
||||||
: dialogForm.carrierName
|
: dialogForm.carrierName
|
||||||
"
|
"
|
||||||
clearable
|
clearable
|
||||||
@@ -1484,7 +1465,7 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in taskCarrierOptions"
|
v-for="item in taskCarrierOptions"
|
||||||
:key="item.id || item.carrierName"
|
:key="carrierOptionValue(item)"
|
||||||
:label="
|
:label="
|
||||||
dialogForm.carrierType === '承运商'
|
dialogForm.carrierType === '承运商'
|
||||||
? formatTaskCarrierContractLabel(item)
|
? formatTaskCarrierContractLabel(item)
|
||||||
@@ -1492,7 +1473,7 @@
|
|||||||
"
|
"
|
||||||
:value="
|
:value="
|
||||||
dialogForm.carrierType === '承运商'
|
dialogForm.carrierType === '承运商'
|
||||||
? item.id
|
? carrierOptionValue(item)
|
||||||
: item.carrierName || item.partyB
|
: item.carrierName || item.partyB
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
@@ -1511,7 +1492,11 @@
|
|||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
:disabled="dialogReadonly || isRunningSelfDriverLocked"
|
:disabled="dialogReadonly || isRunningSelfDriverLocked"
|
||||||
@select="item => handleDriverSuggestionSelect('dialog', item)"
|
@select="item => handleDriverSuggestionSelect('dialog', item)"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="手机号"
|
label="手机号"
|
||||||
@@ -1550,7 +1535,11 @@
|
|||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
@select="item => handleEscortSuggestionSelect('dialog', item)"
|
@select="item => handleEscortSuggestionSelect('dialog', item)"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="dialogForm.carrierType !== '承运商'" label="押运人手机号">
|
<el-form-item v-if="dialogForm.carrierType !== '承运商'" label="押运人手机号">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -1880,7 +1869,7 @@ import { getList as getContractList } from '@/api/business/contract-manage';
|
|||||||
import { getParentOptions as getCargoTypeOptions } from '@/api/base/cargo-type';
|
import { getParentOptions as getCargoTypeOptions } from '@/api/base/cargo-type';
|
||||||
import { getList as getCustomerList } from '@/api/vehicle/customer-archive';
|
import { getList as getCustomerList } from '@/api/vehicle/customer-archive';
|
||||||
import { getList as getDriverList } from '@/api/transportCapacity/driver';
|
import { getList as getDriverList } from '@/api/transportCapacity/driver';
|
||||||
import { fetchDriversByCarrierOrganizations } from '@/utils/carrier-org-resource';
|
import { fetchDriverCandidates, driverOptionText } from '@/utils/carrier-org-resource';
|
||||||
import { formatContractOptionLabel } from '@/utils/contract';
|
import { formatContractOptionLabel } from '@/utils/contract';
|
||||||
import {
|
import {
|
||||||
getList as getProcessConfigList,
|
getList as getProcessConfigList,
|
||||||
@@ -1905,7 +1894,6 @@ import { normalizeMapSearchResults, searchAmapPlaceText } from '@/utils/map-sear
|
|||||||
import { parseRouteChangeContent } from '@/utils/route-change';
|
import { parseRouteChangeContent } from '@/utils/route-change';
|
||||||
|
|
||||||
const defaultTransportType = '';
|
const defaultTransportType = '';
|
||||||
const defaultCandidateTransportType = '';
|
|
||||||
const AMAP_KEY = '653b7cf105ad7fb8ec9b2f5198ade315';
|
const AMAP_KEY = '653b7cf105ad7fb8ec9b2f5198ade315';
|
||||||
const AMAP_SECURITY_CODE = '5aab65c632e48ebae0d0e28f5b28e21a';
|
const AMAP_SECURITY_CODE = '5aab65c632e48ebae0d0e28f5b28e21a';
|
||||||
const loadingCreateWaybillsStorageKey = 'loading-manage-create-waybills';
|
const loadingCreateWaybillsStorageKey = 'loading-manage-create-waybills';
|
||||||
@@ -1946,7 +1934,6 @@ const createCandidateSearchForm = () => ({
|
|||||||
vehicleNo: '',
|
vehicleNo: '',
|
||||||
carrierName: '',
|
carrierName: '',
|
||||||
driverName: '',
|
driverName: '',
|
||||||
transportType: defaultCandidateTransportType,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const createDialogForm = () => ({
|
const createDialogForm = () => ({
|
||||||
@@ -1966,6 +1953,8 @@ const createDialogForm = () => ({
|
|||||||
carrierType: '承运商',
|
carrierType: '承运商',
|
||||||
carrierName: '',
|
carrierName: '',
|
||||||
carrierContractId: '',
|
carrierContractId: '',
|
||||||
|
carrierPartyId: '',
|
||||||
|
carrierPartyRole: '',
|
||||||
escortName: '',
|
escortName: '',
|
||||||
escortPhone: '',
|
escortPhone: '',
|
||||||
departureAddress: '',
|
departureAddress: '',
|
||||||
@@ -2269,6 +2258,13 @@ export default {
|
|||||||
if (!this.taskCarrierLoading && !this.taskCarrierOptions.length) return '暂无可用承运商合同';
|
if (!this.taskCarrierLoading && !this.taskCarrierOptions.length) return '暂无可用承运商合同';
|
||||||
return '请选择';
|
return '请选择';
|
||||||
},
|
},
|
||||||
|
taskCarrierSelectedValue() {
|
||||||
|
return this.carrierOptionValue({
|
||||||
|
id: this.dialogForm.carrierContractId,
|
||||||
|
carrierPartyId: this.dialogForm.carrierPartyId,
|
||||||
|
carrierName: this.dialogForm.carrierName,
|
||||||
|
});
|
||||||
|
},
|
||||||
detailStatusType() {
|
detailStatusType() {
|
||||||
const typeMap = {
|
const typeMap = {
|
||||||
pending: 'success',
|
pending: 'success',
|
||||||
@@ -2401,13 +2397,26 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
parseRouteChangeContent,
|
parseRouteChangeContent,
|
||||||
|
driverOptionText,
|
||||||
formatTaskCarrierContractLabel(item = {}) {
|
formatTaskCarrierContractLabel(item = {}) {
|
||||||
const carrierName = item.carrierName || item.partyB || '';
|
const carrierName = item.carrierName || item.partyB || '';
|
||||||
|
const roleLabel =
|
||||||
|
item.carrierPartyRole === 'C' || item.carrierPartyRole === '丙'
|
||||||
|
? '丙方'
|
||||||
|
: item.carrierPartyRole === 'B' || item.carrierPartyRole === '乙'
|
||||||
|
? '乙方'
|
||||||
|
: '';
|
||||||
const contractLabel = formatContractOptionLabel(item);
|
const contractLabel = formatContractOptionLabel(item);
|
||||||
if (carrierName && contractLabel) {
|
const nameWithRole = roleLabel && carrierName ? `${carrierName}(${roleLabel})` : carrierName;
|
||||||
return `${carrierName}(${contractLabel})`;
|
if (nameWithRole && contractLabel) {
|
||||||
|
return `${nameWithRole} - ${contractLabel}`;
|
||||||
}
|
}
|
||||||
return carrierName || contractLabel;
|
return nameWithRole || contractLabel;
|
||||||
|
},
|
||||||
|
carrierOptionValue(item = {}) {
|
||||||
|
return [item.id || '', item.carrierPartyId || '', item.carrierName || item.partyB || ''].join(
|
||||||
|
'__'
|
||||||
|
);
|
||||||
},
|
},
|
||||||
syncStandaloneTagTitle() {
|
syncStandaloneTagTitle() {
|
||||||
if (!this.isStandalonePage) return;
|
if (!this.isStandalonePage) return;
|
||||||
@@ -2536,9 +2545,9 @@ export default {
|
|||||||
Object.values(groups)
|
Object.values(groups)
|
||||||
.map(group => {
|
.map(group => {
|
||||||
const quantity = this.formatGoodsQuantity(group.quantity);
|
const quantity = this.formatGoodsQuantity(group.quantity);
|
||||||
return `${group.typeName}等${group.count}种货物 | ${quantity}${
|
const typeName =
|
||||||
group.unit ? ` ${group.unit}` : ''
|
group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
|
||||||
}`;
|
return `${typeName} | ${quantity}${group.unit ? ` ${group.unit}` : ''}`;
|
||||||
})
|
})
|
||||||
.join('; ') || '-'
|
.join('; ') || '-'
|
||||||
);
|
);
|
||||||
@@ -3104,7 +3113,6 @@ export default {
|
|||||||
this.dialogMode = mode;
|
this.dialogMode = mode;
|
||||||
this.dialogLoading = true;
|
this.dialogLoading = true;
|
||||||
this.resetDialogData();
|
this.resetDialogData();
|
||||||
if (mode === 'add') this.candidateQuery.transportType = 'road';
|
|
||||||
try {
|
try {
|
||||||
if (row?.id) {
|
if (row?.id) {
|
||||||
const res = await loadingApi.getDetail(row.id);
|
const res = await loadingApi.getDetail(row.id);
|
||||||
@@ -3131,7 +3139,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.dialogForm = createDialogForm();
|
this.dialogForm = createDialogForm();
|
||||||
this.candidateQuery = createCandidateSearchForm();
|
this.candidateQuery = createCandidateSearchForm();
|
||||||
this.candidateQuery.transportType = 'road';
|
|
||||||
await this.loadCandidateWaybills();
|
await this.loadCandidateWaybills();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
@@ -3910,18 +3917,24 @@ export default {
|
|||||||
async loadCandidateWaybills() {
|
async loadCandidateWaybills() {
|
||||||
this.candidateLoading = true;
|
this.candidateLoading = true;
|
||||||
try {
|
try {
|
||||||
|
const selectedProjectId = this.selectedWaybillRows.map(row => row.projectId).find(Boolean);
|
||||||
const query = {
|
const query = {
|
||||||
...this.buildQueryParams(this.candidateQuery),
|
...this.buildQueryParams(this.candidateQuery),
|
||||||
// 与后端 LoadableAdmissionSupport 一致:公路 + 待执行/进行中 + 未关联有效配载单
|
// 公路、待执行、未配载的判定都在后端可配载开关内
|
||||||
|
// 该开关已把候选限定为公路,再按精确运输方式取值筛会漏掉「公路运输」这类历史写法
|
||||||
loadableOnly: 1,
|
loadableOnly: 1,
|
||||||
// 仅查当前账户所属组织及子组织下的运单
|
// allDept=0 表示不指定组织:超管与「数据权限范围=全部组织」的账户后端不过滤组织,
|
||||||
|
// 其余账户限定本组织(不展开下级)
|
||||||
allDept: 0,
|
allDept: 0,
|
||||||
};
|
};
|
||||||
const transportType = this.getCandidateTransportTypeQuery(query.transportType);
|
// 已选运单后,候选列表优先限定同一项目,便于再按承运商合同乙方交集筛选
|
||||||
|
if (selectedProjectId && !query.projectId && !query.projectName) {
|
||||||
|
query.projectId = selectedProjectId;
|
||||||
|
}
|
||||||
const res = await getWaybillList(
|
const res = await getWaybillList(
|
||||||
this.candidatePage.currentPage,
|
this.candidatePage.currentPage,
|
||||||
this.candidatePage.pageSize,
|
this.candidatePage.pageSize,
|
||||||
{ ...query, transportType }
|
query
|
||||||
);
|
);
|
||||||
const page = unwrapPage(res);
|
const page = unwrapPage(res);
|
||||||
this.candidateRows = page.records;
|
this.candidateRows = page.records;
|
||||||
@@ -3930,20 +3943,12 @@ export default {
|
|||||||
this.candidateLoading = false;
|
this.candidateLoading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getCandidateTransportTypeQuery(value) {
|
|
||||||
const normalized = String(value || '')
|
|
||||||
.trim()
|
|
||||||
.toLowerCase();
|
|
||||||
if (['road', '公路运输'].includes(normalized)) return 'road,公路运输';
|
|
||||||
return value || '';
|
|
||||||
},
|
|
||||||
handleCandidateSearch() {
|
handleCandidateSearch() {
|
||||||
this.candidatePage.currentPage = 1;
|
this.candidatePage.currentPage = 1;
|
||||||
this.loadCandidateWaybills();
|
this.loadCandidateWaybills();
|
||||||
},
|
},
|
||||||
handleCandidateReset() {
|
handleCandidateReset() {
|
||||||
this.candidateQuery = createCandidateSearchForm();
|
this.candidateQuery = createCandidateSearchForm();
|
||||||
if (this.dialogMode === 'add') this.candidateQuery.transportType = 'road';
|
|
||||||
this.candidatePage.currentPage = 1;
|
this.candidatePage.currentPage = 1;
|
||||||
this.loadCandidateWaybills();
|
this.loadCandidateWaybills();
|
||||||
},
|
},
|
||||||
@@ -3987,7 +3992,10 @@ export default {
|
|||||||
];
|
];
|
||||||
if (projectIds.length) {
|
if (projectIds.length) {
|
||||||
try {
|
try {
|
||||||
const response = await loadingApi.getCarrierContracts(projectIds);
|
const waybillIds = [...this.selectedWaybillRows, ...selectedRows]
|
||||||
|
.map(row => row.id)
|
||||||
|
.filter(Boolean);
|
||||||
|
const response = await loadingApi.getCarrierContracts(projectIds, waybillIds);
|
||||||
const contracts = response?.data?.data || response?.data || [];
|
const contracts = response?.data?.data || response?.data || [];
|
||||||
const stillAllowed = (Array.isArray(contracts) ? contracts : []).some(
|
const stillAllowed = (Array.isArray(contracts) ? contracts : []).some(
|
||||||
item => String(item.id) === String(contractId)
|
item => String(item.id) === String(contractId)
|
||||||
@@ -4005,14 +4013,50 @@ export default {
|
|||||||
const exists = new Set(
|
const exists = new Set(
|
||||||
this.selectedWaybillRows.map(row => String(row.id || row.waybillNo))
|
this.selectedWaybillRows.map(row => String(row.id || row.waybillNo))
|
||||||
);
|
);
|
||||||
|
// 一张配载单的全部子运单必须同项目:以已选运单(无已选时以本批首张)的项目为准
|
||||||
|
const anchorRow = [...this.selectedWaybillRows, ...selectedRows].find(row =>
|
||||||
|
this.waybillProjectKey(row)
|
||||||
|
);
|
||||||
|
const anchorKey = anchorRow ? this.waybillProjectKey(anchorRow) : '';
|
||||||
|
const mismatchedRows = anchorKey
|
||||||
|
? selectedRows.filter(
|
||||||
|
row => this.waybillProjectKey(row) && this.waybillProjectKey(row) !== anchorKey
|
||||||
|
)
|
||||||
|
: [];
|
||||||
|
if (mismatchedRows.length) {
|
||||||
|
const anchorName = anchorRow.projectName || anchorRow.projectId;
|
||||||
|
const mismatchedText = mismatchedRows
|
||||||
|
.map(
|
||||||
|
row =>
|
||||||
|
`${row.waybillNo || row.id}(项目:${row.projectName || row.projectId || '未知'})`
|
||||||
|
)
|
||||||
|
.join('、');
|
||||||
|
this.$message.warning(
|
||||||
|
`运单 ${mismatchedText} 与已选运单项目「${anchorName}」不一致,不能加入同一配载单`
|
||||||
|
);
|
||||||
|
}
|
||||||
const nextRows = [...this.selectedWaybillRows];
|
const nextRows = [...this.selectedWaybillRows];
|
||||||
selectedRows.forEach(row => {
|
selectedRows.forEach(row => {
|
||||||
|
if (mismatchedRows.includes(row)) return;
|
||||||
const key = String(row.id || row.waybillNo);
|
const key = String(row.id || row.waybillNo);
|
||||||
if (!exists.has(key)) {
|
if (!exists.has(key)) {
|
||||||
nextRows.push(row);
|
nextRows.push(row);
|
||||||
exists.add(key);
|
exists.add(key);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// 承运商类型:新增后须仍存在共同的承运商合同乙方(按客户合同乙方=承运商合同甲方匹配后取交集)
|
||||||
|
if (
|
||||||
|
String(this.dialogForm.carrierType || '').trim() === '承运商' &&
|
||||||
|
nextRows.length > this.selectedWaybillRows.length
|
||||||
|
) {
|
||||||
|
const compatible = await this.hasCompatibleCarrierContracts(nextRows);
|
||||||
|
if (!compatible) {
|
||||||
|
this.$message.warning(
|
||||||
|
'所选运单在同一项目下没有共同的承运商合同乙方,不能加入同一配载单'
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
const prevRouteNodes = [...this.routeNodes];
|
const prevRouteNodes = [...this.routeNodes];
|
||||||
this.selectedWaybillRows = nextRows;
|
this.selectedWaybillRows = nextRows;
|
||||||
if (this.isRunningEdit) {
|
if (this.isRunningEdit) {
|
||||||
@@ -4026,9 +4070,24 @@ export default {
|
|||||||
this.candidateAdding = false;
|
this.candidateAdding = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async hasCompatibleCarrierContracts(rows = []) {
|
||||||
|
const projectId = (rows || []).map(row => row.projectId).find(Boolean);
|
||||||
|
const waybillIds = (rows || []).map(row => row.id).filter(Boolean);
|
||||||
|
if (!projectId || waybillIds.length < 2) return true;
|
||||||
|
try {
|
||||||
|
const response = await loadingApi.getCarrierContracts([projectId], waybillIds);
|
||||||
|
const contracts = response?.data?.data || response?.data || [];
|
||||||
|
return (Array.isArray(contracts) ? contracts : []).length > 0;
|
||||||
|
} catch (error) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
},
|
||||||
async addSelectedWaybills() {
|
async addSelectedWaybills() {
|
||||||
await this.addWaybillRows(this.candidateSelection);
|
await this.addWaybillRows(this.candidateSelection);
|
||||||
},
|
},
|
||||||
|
waybillProjectKey(row = {}) {
|
||||||
|
return String(row.projectId || row.projectName || '').trim();
|
||||||
|
},
|
||||||
removeSelectedWaybill(index) {
|
removeSelectedWaybill(index) {
|
||||||
const row = this.selectedWaybillRows[index];
|
const row = this.selectedWaybillRows[index];
|
||||||
if (this.isSelectedWaybillRemoveLocked(row)) {
|
if (this.isSelectedWaybillRemoveLocked(row)) {
|
||||||
@@ -4517,6 +4576,8 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCarrierTypeChange() {
|
handleCarrierTypeChange() {
|
||||||
this.dialogForm.carrierContractId = '';
|
this.dialogForm.carrierContractId = '';
|
||||||
|
this.dialogForm.carrierPartyId = '';
|
||||||
|
this.dialogForm.carrierPartyRole = '';
|
||||||
this.dialogForm.carrierName = '';
|
this.dialogForm.carrierName = '';
|
||||||
this.dialogForm.carrierId = '';
|
this.dialogForm.carrierId = '';
|
||||||
this.clearDialogDriverVehicleFields();
|
this.clearDialogDriverVehicleFields();
|
||||||
@@ -4527,17 +4588,25 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.dialogForm.carrierType === '自运') {
|
if (this.dialogForm.carrierType === '自运') {
|
||||||
this.dialogForm.carrierContractId = '';
|
this.dialogForm.carrierContractId = '';
|
||||||
|
this.dialogForm.carrierPartyId = '';
|
||||||
|
this.dialogForm.carrierPartyRole = '';
|
||||||
}
|
}
|
||||||
this.loadTaskCarrierOptions();
|
this.loadTaskCarrierOptions();
|
||||||
},
|
},
|
||||||
handleTaskCarrierChange(contractId) {
|
handleTaskCarrierChange(selectedValue) {
|
||||||
const contract = this.taskCarrierOptions.find(item =>
|
const contract = this.taskCarrierOptions.find(
|
||||||
|
item =>
|
||||||
|
this.carrierOptionValue(item) === String(selectedValue || '') ||
|
||||||
[item.id, item.carrierName, item.partyB].some(
|
[item.id, item.carrierName, item.partyB].some(
|
||||||
value => String(value || '') === String(contractId || '')
|
value => String(value || '') === String(selectedValue || '')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
this.dialogForm.carrierContractId =
|
this.dialogForm.carrierContractId =
|
||||||
this.dialogForm.carrierType === '承运商' && contract?.id ? contract.id : '';
|
this.dialogForm.carrierType === '承运商' && contract?.id ? contract.id : '';
|
||||||
|
this.dialogForm.carrierPartyId =
|
||||||
|
this.dialogForm.carrierType === '承运商' ? contract?.carrierPartyId || '' : '';
|
||||||
|
this.dialogForm.carrierPartyRole =
|
||||||
|
this.dialogForm.carrierType === '承运商' ? contract?.carrierPartyRole || '' : '';
|
||||||
this.dialogForm.carrierName = contract?.carrierName || '';
|
this.dialogForm.carrierName = contract?.carrierName || '';
|
||||||
this.dialogForm.carrierId = contract?.carrierId || contract?.customerId || '';
|
this.dialogForm.carrierId = contract?.carrierId || contract?.customerId || '';
|
||||||
this.clearDialogDriverVehicleFields();
|
this.clearDialogDriverVehicleFields();
|
||||||
@@ -4551,12 +4620,6 @@ export default {
|
|||||||
this.dialogForm.escortPhone = '';
|
this.dialogForm.escortPhone = '';
|
||||||
this.driverOptions = [];
|
this.driverOptions = [];
|
||||||
},
|
},
|
||||||
getDialogCarrierFilter() {
|
|
||||||
return {
|
|
||||||
carrierId: this.dialogForm.carrierId || '',
|
|
||||||
carrierName: this.dialogForm.carrierName || '',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
handleDriverChange(value) {
|
handleDriverChange(value) {
|
||||||
const driver = this.driverOptions.find(item => (item.driverName || item.name) === value);
|
const driver = this.driverOptions.find(item => (item.driverName || item.name) === value);
|
||||||
if (driver && !this.dialogForm.driverPhone) {
|
if (driver && !this.dialogForm.driverPhone) {
|
||||||
@@ -4590,16 +4653,12 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchEscortSuggestions(queryString, callback) {
|
fetchEscortSuggestions(queryString, callback) {
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const carrier = this.getDialogCarrierFilter();
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.escortLoading = true;
|
this.escortLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '押运员' },
|
size: 20,
|
||||||
carrier
|
...(keyword ? { driverName: keyword } : {}),
|
||||||
)
|
posts: '押运员',
|
||||||
|
})
|
||||||
.then(records => {
|
.then(records => {
|
||||||
callback(
|
callback(
|
||||||
records.map(item => ({
|
records.map(item => ({
|
||||||
@@ -4679,17 +4738,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async loadDialogDriverOptions(keyword = '') {
|
async loadDialogDriverOptions(keyword = '') {
|
||||||
const carrier = this.getDialogCarrierFilter();
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
this.driverOptions = [];
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
this.driverLoading = true;
|
this.driverLoading = true;
|
||||||
try {
|
try {
|
||||||
this.driverOptions = await fetchDriversByCarrierOrganizations(
|
this.driverOptions = await fetchDriverCandidates({
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' },
|
size: 20,
|
||||||
carrier
|
...(keyword ? { driverName: keyword } : {}),
|
||||||
);
|
posts: '司机',
|
||||||
|
});
|
||||||
return this.driverOptions;
|
return this.driverOptions;
|
||||||
} finally {
|
} finally {
|
||||||
this.driverLoading = false;
|
this.driverLoading = false;
|
||||||
@@ -4720,10 +4775,13 @@ export default {
|
|||||||
}
|
}
|
||||||
this.taskCarrierLoading = true;
|
this.taskCarrierLoading = true;
|
||||||
try {
|
try {
|
||||||
const projectIds = [
|
// 配载单只有一个项目;传入子运单后按客户合同乙方=承运商合同甲方匹配并取承运商合同乙方交集
|
||||||
...new Set(this.selectedWaybillRows.map(row => row.projectId).filter(Boolean)),
|
const projectId = this.selectedWaybillRows.map(row => row.projectId).find(Boolean);
|
||||||
];
|
const waybillIds = this.selectedWaybillRows.map(row => row.id).filter(Boolean);
|
||||||
const response = await loadingApi.getCarrierContracts(projectIds);
|
const response = await loadingApi.getCarrierContracts(
|
||||||
|
projectId ? [projectId] : [],
|
||||||
|
waybillIds
|
||||||
|
);
|
||||||
if (requestId !== this.taskCarrierRequestId) return [];
|
if (requestId !== this.taskCarrierRequestId) return [];
|
||||||
const contracts = response.data?.data || response.data || [];
|
const contracts = response.data?.data || response.data || [];
|
||||||
if (this.dialogForm.carrierType !== '自运') {
|
if (this.dialogForm.carrierType !== '自运') {
|
||||||
@@ -4731,30 +4789,45 @@ export default {
|
|||||||
.map(item => ({
|
.map(item => ({
|
||||||
...item,
|
...item,
|
||||||
carrierName:
|
carrierName:
|
||||||
|
item.carrierName ||
|
||||||
item.partyB ||
|
item.partyB ||
|
||||||
item.partyBName ||
|
item.partyBName ||
|
||||||
item.contractPartyB ||
|
item.contractPartyB ||
|
||||||
item.customerContractPartyB ||
|
item.customerContractPartyB ||
|
||||||
item.carrierName ||
|
|
||||||
'',
|
'',
|
||||||
carrierId:
|
carrierId:
|
||||||
|
item.customerId ||
|
||||||
item.partyBId ||
|
item.partyBId ||
|
||||||
item.partyBUserId ||
|
item.partyBUserId ||
|
||||||
item.contractPartyBId ||
|
item.contractPartyBId ||
|
||||||
item.customerContractPartyBId ||
|
item.customerContractPartyBId ||
|
||||||
item.carrierId ||
|
item.carrierId ||
|
||||||
'',
|
'',
|
||||||
|
carrierPartyId: item.carrierPartyId || '',
|
||||||
|
carrierPartyRole: item.carrierPartyRole || '',
|
||||||
}))
|
}))
|
||||||
.filter(item => item.carrierName);
|
.filter(item => item.carrierName);
|
||||||
const current =
|
const current =
|
||||||
contracts.find(item => String(item.id) === String(this.dialogForm.carrierContractId)) ||
|
this.taskCarrierOptions.find(
|
||||||
|
item =>
|
||||||
|
this.carrierOptionValue(item) === this.taskCarrierSelectedValue ||
|
||||||
|
(String(item.id) === String(this.dialogForm.carrierContractId) &&
|
||||||
|
(!this.dialogForm.carrierPartyId ||
|
||||||
|
String(item.carrierPartyId) === String(this.dialogForm.carrierPartyId)) &&
|
||||||
|
(!this.dialogForm.carrierName ||
|
||||||
|
item.carrierName === this.dialogForm.carrierName))
|
||||||
|
) ||
|
||||||
this.taskCarrierOptions.find(item => item.carrierName === this.dialogForm.carrierName);
|
this.taskCarrierOptions.find(item => item.carrierName === this.dialogForm.carrierName);
|
||||||
if (current) {
|
if (current) {
|
||||||
this.dialogForm.carrierContractId = current.id;
|
this.dialogForm.carrierContractId = current.id;
|
||||||
|
this.dialogForm.carrierPartyId = current.carrierPartyId || '';
|
||||||
|
this.dialogForm.carrierPartyRole = current.carrierPartyRole || '';
|
||||||
this.dialogForm.carrierName = current.carrierName;
|
this.dialogForm.carrierName = current.carrierName;
|
||||||
this.dialogForm.carrierId = current.carrierId || '';
|
this.dialogForm.carrierId = current.carrierId || '';
|
||||||
} else {
|
} else {
|
||||||
this.dialogForm.carrierContractId = '';
|
this.dialogForm.carrierContractId = '';
|
||||||
|
this.dialogForm.carrierPartyId = '';
|
||||||
|
this.dialogForm.carrierPartyRole = '';
|
||||||
this.dialogForm.carrierName = '';
|
this.dialogForm.carrierName = '';
|
||||||
this.dialogForm.carrierId = '';
|
this.dialogForm.carrierId = '';
|
||||||
}
|
}
|
||||||
@@ -4765,19 +4838,22 @@ export default {
|
|||||||
.map(item => ({
|
.map(item => ({
|
||||||
...item,
|
...item,
|
||||||
carrierName:
|
carrierName:
|
||||||
|
item.carrierName ||
|
||||||
item.partyB ||
|
item.partyB ||
|
||||||
item.partyBName ||
|
item.partyBName ||
|
||||||
item.contractPartyB ||
|
item.contractPartyB ||
|
||||||
item.customerContractPartyB ||
|
item.customerContractPartyB ||
|
||||||
item.carrierName ||
|
|
||||||
'',
|
'',
|
||||||
carrierId:
|
carrierId:
|
||||||
|
item.customerId ||
|
||||||
item.partyBId ||
|
item.partyBId ||
|
||||||
item.partyBUserId ||
|
item.partyBUserId ||
|
||||||
item.contractPartyBId ||
|
item.contractPartyBId ||
|
||||||
item.customerContractPartyBId ||
|
item.customerContractPartyBId ||
|
||||||
item.carrierId ||
|
item.carrierId ||
|
||||||
'',
|
'',
|
||||||
|
carrierPartyId: item.carrierPartyId || '',
|
||||||
|
carrierPartyRole: item.carrierPartyRole || '',
|
||||||
}))
|
}))
|
||||||
.filter(item => item.carrierName);
|
.filter(item => item.carrierName);
|
||||||
const current = this.taskCarrierOptions.find(
|
const current = this.taskCarrierOptions.find(
|
||||||
@@ -4993,30 +5069,6 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-manage-dialog__admission-tip {
|
|
||||||
margin-bottom: 12px;
|
|
||||||
padding: 12px 14px;
|
|
||||||
background: #f5f9ff;
|
|
||||||
border: 1px solid #d9ecff;
|
|
||||||
border-radius: 4px;
|
|
||||||
line-height: 1.6;
|
|
||||||
color: #606266;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading-manage-dialog__admission-title {
|
|
||||||
margin-bottom: 4px;
|
|
||||||
color: #303133;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading-manage-dialog__admission-title + .loading-manage-dialog__admission-text + .loading-manage-dialog__admission-title {
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading-manage-dialog__admission-text {
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading-manage-dialog__candidate-search {
|
.loading-manage-dialog__candidate-search {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|||||||
@@ -245,7 +245,7 @@
|
|||||||
<el-radio-group
|
<el-radio-group
|
||||||
v-model="row.confirmMode"
|
v-model="row.confirmMode"
|
||||||
:disabled="dialogReadonly || !row.enabled"
|
:disabled="dialogReadonly || !row.enabled"
|
||||||
@change="handleReturnConfirmChange(row)"
|
@change="syncNodeFields"
|
||||||
>
|
>
|
||||||
<el-radio label="yes">是</el-radio>
|
<el-radio label="yes">是</el-radio>
|
||||||
<el-radio label="no_confirm_complete">无需确认完成</el-radio>
|
<el-radio label="no_confirm_complete">无需确认完成</el-radio>
|
||||||
@@ -253,10 +253,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="process-config-form__require-line">
|
<div class="process-config-form__require-line">
|
||||||
<span class="process-config-form__require-label">确认完成</span>
|
<span class="process-config-form__require-label">确认完成</span>
|
||||||
<el-checkbox
|
<el-checkbox v-model="row.confirmInternal" :disabled="true"
|
||||||
v-model="row.confirmInternal"
|
|
||||||
:disabled="dialogReadonly || !row.enabled || row.confirmMode !== 'yes'"
|
|
||||||
@change="syncNodeFields"
|
|
||||||
>内部人员</el-checkbox
|
>内部人员</el-checkbox
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@@ -492,6 +489,12 @@ const NODE_TEMPLATES = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// 过程配置必须覆盖装货端与卸货端各一个节点;货量下限只看装货端——
|
||||||
|
// 到场没有货量开关,不能拿它顶替货量采集
|
||||||
|
const PICKUP_NODE_KEYS = ['arrive_scene', 'load', 'dispatch'];
|
||||||
|
const DELIVERY_NODE_KEYS = ['unload', 'arrival', 'sign', 'return'];
|
||||||
|
const CARGO_NODE_KEYS = ['load', 'dispatch'];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -538,7 +541,6 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.resetNodeRows();
|
this.resetNodeRows();
|
||||||
this.loadProjectOptions('');
|
this.loadProjectOptions('');
|
||||||
this.applyDefaultDeptSearch();
|
|
||||||
this.initDeptOptions();
|
this.initDeptOptions();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -549,15 +551,18 @@ export default {
|
|||||||
row.confirmDriver = row.confirmMode === 'yes';
|
row.confirmDriver = row.confirmMode === 'yes';
|
||||||
this.syncNodeFields();
|
this.syncNodeFields();
|
||||||
},
|
},
|
||||||
handleReturnConfirmChange(row) {
|
|
||||||
row.confirmInternal = row.confirmMode === 'yes';
|
|
||||||
this.syncNodeFields();
|
|
||||||
},
|
|
||||||
enforceAcceptDriver(node) {
|
enforceAcceptDriver(node) {
|
||||||
if (!node || (node.key !== 'accept' && node.name !== '接单')) return node;
|
if (!node || (node.key !== 'accept' && node.name !== '接单')) return node;
|
||||||
node.confirmDriver = node.confirmMode === 'yes';
|
node.confirmDriver = node.confirmMode === 'yes';
|
||||||
return node;
|
return node;
|
||||||
},
|
},
|
||||||
|
// 回单「确认完成」只有内部人员一种角色,是否确认为「是」时即由内部人员确认,
|
||||||
|
// 界面上只读展示,值始终由 confirmMode 推导
|
||||||
|
enforceReturnInternal(node) {
|
||||||
|
if (!node || (node.key !== 'return' && node.name !== '回单')) return node;
|
||||||
|
node.confirmInternal = node.confirmMode === 'yes';
|
||||||
|
return node;
|
||||||
|
},
|
||||||
initDeptOptions() {
|
initDeptOptions() {
|
||||||
getDeptTree(this.userInfo.tenantId).then(res => {
|
getDeptTree(this.userInfo.tenantId).then(res => {
|
||||||
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
||||||
@@ -566,27 +571,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
defaultDeptId() {
|
|
||||||
const raw = (this.userInfo && (this.userInfo.deptId || this.userInfo.dept_id)) || '';
|
|
||||||
return (
|
|
||||||
String(raw)
|
|
||||||
.split(',')
|
|
||||||
.map(item => item.trim())
|
|
||||||
.filter(Boolean)[0] || ''
|
|
||||||
);
|
|
||||||
},
|
|
||||||
applyDefaultDeptSearch() {
|
|
||||||
const deptId = this.defaultDeptId();
|
|
||||||
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
|
||||||
if (!deptId || !deptColumn) return;
|
|
||||||
deptColumn.searchValue = deptId;
|
|
||||||
this.query = { ...this.query, deptId };
|
|
||||||
this.$nextTick(() => {
|
|
||||||
if (this.$refs.crud?.searchForm) {
|
|
||||||
this.$refs.crud.searchForm.searchDeptId = deptId;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
flattenDept(tree, level = 0) {
|
flattenDept(tree, level = 0) {
|
||||||
return tree.flatMap(item => {
|
return tree.flatMap(item => {
|
||||||
const id =
|
const id =
|
||||||
@@ -724,7 +708,7 @@ export default {
|
|||||||
this.projectLoading = true;
|
this.projectLoading = true;
|
||||||
return getProjectList(1, 50, {
|
return getProjectList(1, 50, {
|
||||||
projectName: keyword,
|
projectName: keyword,
|
||||||
approvalStatus: 'approved',
|
approvalStatuses: 'approved,change_approved',
|
||||||
allDept: this.isAdmin ? 1 : 0,
|
allDept: this.isAdmin ? 1 : 0,
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
@@ -808,7 +792,10 @@ export default {
|
|||||||
this.syncNodeFields();
|
this.syncNodeFields();
|
||||||
},
|
},
|
||||||
syncNodeFields() {
|
syncNodeFields() {
|
||||||
this.nodeRows.forEach(item => this.enforceAcceptDriver(item));
|
this.nodeRows.forEach(item => {
|
||||||
|
this.enforceAcceptDriver(item);
|
||||||
|
this.enforceReturnInternal(item);
|
||||||
|
});
|
||||||
const enabledNodes = this.nodeRows.filter(item => item.enabled);
|
const enabledNodes = this.nodeRows.filter(item => item.enabled);
|
||||||
this.form.includedNodes = enabledNodes.map(item => item.name).join(',');
|
this.form.includedNodes = enabledNodes.map(item => item.name).join(',');
|
||||||
this.form.nodeConfigJson = JSON.stringify(
|
this.form.nodeConfigJson = JSON.stringify(
|
||||||
@@ -935,8 +922,24 @@ export default {
|
|||||||
this.$message.warning('备注不能超过500个字符');
|
this.$message.warning('备注不能超过500个字符');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.enabledNodes.length) {
|
const isEnabledNode = key => this.nodeRows.some(item => item.key === key && item.enabled);
|
||||||
this.$message.warning('请至少选择一个过程节点');
|
if (!PICKUP_NODE_KEYS.some(isEnabledNode)) {
|
||||||
|
this.$message.warning('发货、装货、到场至少选择一个');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!DELIVERY_NODE_KEYS.some(isEnabledNode)) {
|
||||||
|
this.$message.warning('卸货、到货、签收、回单至少选择一个');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 装货端没有节点采集货量时,整条配置在小程序侧等于不采集货量
|
||||||
|
const collectsCargo = CARGO_NODE_KEYS.some(key =>
|
||||||
|
this.nodeRows.some(
|
||||||
|
item =>
|
||||||
|
item.key === key && item.enabled && item.uploadCargo && (item.cargoTypes || []).length
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if (!collectsCargo) {
|
||||||
|
this.$message.warning('发货或装货至少勾选一个货量类型');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const transit = this.nodeRows.find(item => item.key === 'transit');
|
const transit = this.nodeRows.find(item => item.key === 'transit');
|
||||||
@@ -1110,7 +1113,6 @@ export default {
|
|||||||
},
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
this.applyDefaultDeptSearch();
|
|
||||||
this.page.currentPage = 1;
|
this.page.currentPage = 1;
|
||||||
this.onLoad(this.page, this.query);
|
this.onLoad(this.page, this.query);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -84,7 +84,8 @@ export default {
|
|||||||
this.postFormData('save', lbpmFormValues, this.buildFormData());
|
this.postFormData('save', lbpmFormValues, this.buildFormData());
|
||||||
},
|
},
|
||||||
postFormData(status, formValues, formData) {
|
postFormData(status, formValues, formData) {
|
||||||
postMkPublicProcessMessage('project-apply', {
|
const bizType = this.$route.meta?.bizType || 'project-apply';
|
||||||
|
postMkPublicProcessMessage(bizType, {
|
||||||
status,
|
status,
|
||||||
formValues: formValues || {},
|
formValues: formValues || {},
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,375 @@
|
|||||||
|
<template>
|
||||||
|
<basic-container class="project-change-page">
|
||||||
|
<avue-crud
|
||||||
|
:option="tableOption"
|
||||||
|
:table-loading="loading"
|
||||||
|
:data="data"
|
||||||
|
v-model:page="page"
|
||||||
|
v-model="tableForm"
|
||||||
|
ref="crud"
|
||||||
|
:permission="permissionList"
|
||||||
|
@search-change="searchChange"
|
||||||
|
@search-reset="searchReset"
|
||||||
|
@selection-change="selectionChange"
|
||||||
|
@current-change="currentChange"
|
||||||
|
@size-change="sizeChange"
|
||||||
|
@refresh-change="refreshChange"
|
||||||
|
@on-load="onLoad"
|
||||||
|
>
|
||||||
|
<template #menu-left>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
plain
|
||||||
|
v-if="hasPermission(`${config.permission}_delete`)"
|
||||||
|
@click="handleDelete"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #approvalStatus="{ row }">
|
||||||
|
{{ row.approvalStatusName || statusLabel(row.approvalStatus) }}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #syncStatus="{ row }">
|
||||||
|
<el-tag v-if="row.syncStatus" :type="syncTagType(row.syncStatus)" class="status-text">
|
||||||
|
{{ syncLabel(row.syncStatus) }}
|
||||||
|
</el-tag>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #menu="{ row }">
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
v-if="canView(row)"
|
||||||
|
@click="openForm('view', row)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-link>
|
||||||
|
<el-link type="primary" v-if="canEdit(row)" @click="openForm('edit', row)">
|
||||||
|
编辑
|
||||||
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
type="danger"
|
||||||
|
v-if="canDelete(row)"
|
||||||
|
@click="rowDel(row)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
v-for="operation in customOperations(row)"
|
||||||
|
:key="operation.action"
|
||||||
|
:type="operation.type === 'warning' ? 'warning' : operation.type === 'success' ? 'success' : 'primary'"
|
||||||
|
@click="handleCustomOperation(operation, row)"
|
||||||
|
>
|
||||||
|
{{ operation.label }}
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
</basic-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as api from '@/api/business/project-change';
|
||||||
|
import { getMKApprovalUrl } from '@/api/system/business-process';
|
||||||
|
import { config, option } from '@/option/business/project-change';
|
||||||
|
import { approvalStatusOptions } from '@/option/business/common';
|
||||||
|
import {
|
||||||
|
loadMkEnabled,
|
||||||
|
resolveProjectChangeMkBizType,
|
||||||
|
submitMkApprovalFlow,
|
||||||
|
} from '@/utils/mk-approval';
|
||||||
|
import { isAdministrator } from '@/utils/auth';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
|
const projectChangeFormRoute = '/business/project-change/form';
|
||||||
|
const projectChangeListRefreshKey = 'project-change-list-refresh';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ProjectChange',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
api,
|
||||||
|
config,
|
||||||
|
tableForm: {},
|
||||||
|
tableOption: this.buildTableOption(),
|
||||||
|
loading: true,
|
||||||
|
data: [],
|
||||||
|
page: {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
query: {},
|
||||||
|
selectionList: [],
|
||||||
|
mkEnabled: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['permission', 'userInfo', 'website']),
|
||||||
|
permissionList() {
|
||||||
|
return {
|
||||||
|
addBtn: false,
|
||||||
|
viewBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
isAdmin() {
|
||||||
|
return isAdministrator(this.userInfo);
|
||||||
|
},
|
||||||
|
ids() {
|
||||||
|
return this.selectionList.map(item => item.id).join(',');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
loadMkEnabled()
|
||||||
|
.then(enabled => {
|
||||||
|
this.mkEnabled = enabled;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.mkEnabled = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
if (sessionStorage.getItem(projectChangeListRefreshKey)) {
|
||||||
|
sessionStorage.removeItem(projectChangeListRefreshKey);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
buildTableOption() {
|
||||||
|
return {
|
||||||
|
...option,
|
||||||
|
addBtn: false,
|
||||||
|
viewBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
menuWidth: 320,
|
||||||
|
column: (option.column || []).map(column => ({
|
||||||
|
...column,
|
||||||
|
display: false,
|
||||||
|
align: 'center',
|
||||||
|
headerAlign: 'center',
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
hasPermission(code) {
|
||||||
|
return this.isAdmin || this.validData(this.permission && this.permission[code], false);
|
||||||
|
},
|
||||||
|
statusLabel(status) {
|
||||||
|
return approvalStatusOptions.find(item => item.value === status)?.label || status || '-';
|
||||||
|
},
|
||||||
|
syncLabel(value) {
|
||||||
|
return { unsynced: '待推送', synced: '已推送', failed: '推送失败' }[value] || value;
|
||||||
|
},
|
||||||
|
syncTagType(value) {
|
||||||
|
return { unsynced: 'info', synced: 'success', failed: 'danger' }[value] || 'info';
|
||||||
|
},
|
||||||
|
inStatus(row, statusList) {
|
||||||
|
if (!statusList || !statusList.length) return true;
|
||||||
|
return statusList.includes(row.approvalStatus);
|
||||||
|
},
|
||||||
|
canEdit(row) {
|
||||||
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_edit`) &&
|
||||||
|
!row.readonly &&
|
||||||
|
this.inStatus(row, this.config.editStatus)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
canDelete(row) {
|
||||||
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_delete`) &&
|
||||||
|
!row.readonly &&
|
||||||
|
this.inStatus(row, this.config.deleteStatus)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
canView(row) {
|
||||||
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_view`) &&
|
||||||
|
this.inStatus(row, this.config.viewStatus)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
canOperation(operation, row) {
|
||||||
|
if (operation.permission && !this.hasPermission(operation.permission)) return false;
|
||||||
|
if (row.readonly && ['submitApproval', 'withdraw', 'approve', 'reject'].includes(operation.action)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return this.inStatus(row, operation.status);
|
||||||
|
},
|
||||||
|
customOperations(row) {
|
||||||
|
return (this.config.operations || []).filter(operation => {
|
||||||
|
if (operation.mkOnly && !this.mkEnabled) return false;
|
||||||
|
if (operation.localOnly && this.mkEnabled) return false;
|
||||||
|
return this.canOperation(operation, row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
openForm(mode, row = {}) {
|
||||||
|
const query = { mode, id: row.id };
|
||||||
|
if (mode === 'edit') query.name = '编辑项目变更';
|
||||||
|
else if (mode === 'view') query.name = '查看项目变更';
|
||||||
|
this.$router.push({ path: projectChangeFormRoute, query });
|
||||||
|
},
|
||||||
|
handleCustomOperation(operation, row) {
|
||||||
|
if (operation.action === 'mkAudit') {
|
||||||
|
this.handleMkAudit(row);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const run = () => {
|
||||||
|
const request = () => this.api[operation.action](row.id);
|
||||||
|
// 先本地提交再调 MK,避免 MK 回写 reviewing 后本地 submitApproval 被编辑校验拦住。
|
||||||
|
const afterMk =
|
||||||
|
operation.action === 'submitApproval'
|
||||||
|
? request().then(() => {
|
||||||
|
const changeType = row.changeType || '项目变更';
|
||||||
|
return submitMkApprovalFlow({
|
||||||
|
bizType: resolveProjectChangeMkBizType(changeType),
|
||||||
|
bizId: row.id,
|
||||||
|
subjectName: row.projectName || '',
|
||||||
|
approvalStatus: row.approvalStatus || '',
|
||||||
|
mkEnabled: this.mkEnabled,
|
||||||
|
tempVarData: {
|
||||||
|
projectType: row.projectType || '',
|
||||||
|
changeType,
|
||||||
|
变更类型: changeType,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
})
|
||||||
|
: request();
|
||||||
|
const loading =
|
||||||
|
operation.action === 'approve'
|
||||||
|
? this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '正在推送合规,请稍候…',
|
||||||
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
|
})
|
||||||
|
: null;
|
||||||
|
afterMk
|
||||||
|
.then(res => {
|
||||||
|
if (operation.action === 'approve' && res.data?.data === false) {
|
||||||
|
this.$message.warning(res.data?.msg);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.data?.success === false) {
|
||||||
|
this.$message.error(res.data?.msg || `${operation.label}失败,请联系管理员`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$message.success(`${operation.label}成功`);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
})
|
||||||
|
.finally(() => loading && loading.close());
|
||||||
|
};
|
||||||
|
this.$confirm(operation.confirm || `确定${operation.label}该${this.config.title}?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => run());
|
||||||
|
},
|
||||||
|
handleMkAudit(row) {
|
||||||
|
if (!row?.id) {
|
||||||
|
this.$message.warning('变更单ID为空,无法打开审核页');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getMKApprovalUrl({ bizId: String(row.id) })
|
||||||
|
.then(res => {
|
||||||
|
const url = res?.data?.data;
|
||||||
|
if (!url) {
|
||||||
|
this.$message.error('获取审核跳转地址失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
window.open(url, '_blank');
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message.error('获取审核跳转地址失败');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.query = {};
|
||||||
|
this.onLoad(this.page);
|
||||||
|
},
|
||||||
|
searchChange(params, done) {
|
||||||
|
this.query = params;
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad(this.page, params);
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
selectionChange(list) {
|
||||||
|
this.selectionList = list;
|
||||||
|
},
|
||||||
|
selectionClear() {
|
||||||
|
this.selectionList = [];
|
||||||
|
this.$refs.crud?.toggleSelection?.();
|
||||||
|
},
|
||||||
|
currentChange(currentPage) {
|
||||||
|
this.page.currentPage = currentPage;
|
||||||
|
},
|
||||||
|
sizeChange(pageSize) {
|
||||||
|
this.page.pageSize = pageSize;
|
||||||
|
},
|
||||||
|
refreshChange() {
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
},
|
||||||
|
rowDel(row) {
|
||||||
|
this.$confirm('确定将选择数据删除?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
this.api.remove(row.id).then(() => {
|
||||||
|
this.$message.success('删除成功!');
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete() {
|
||||||
|
if (!this.selectionList.length) {
|
||||||
|
this.$message.warning('请选择至少一条数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm('确定将选择数据删除?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
this.api.remove(this.ids).then(() => {
|
||||||
|
this.$message.success('删除成功!');
|
||||||
|
this.selectionClear();
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onLoad(page, params = {}) {
|
||||||
|
this.loading = true;
|
||||||
|
const values = {
|
||||||
|
...this.query,
|
||||||
|
...params,
|
||||||
|
};
|
||||||
|
this.api
|
||||||
|
.getList(page.currentPage, page.pageSize, values)
|
||||||
|
.then(res => {
|
||||||
|
const data = res.data.data || {};
|
||||||
|
this.page.total = data.total || 0;
|
||||||
|
this.data = data.records || [];
|
||||||
|
this.loading = false;
|
||||||
|
this.selectionClear();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.project-change-page {
|
||||||
|
:deep(.avue-crud__menu) {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
<template>
|
||||||
|
<mk-public-shell biz-type="temporary-credit-limit" :get-form="getForm">
|
||||||
|
<div class="temporary-credit-limit-public-view">
|
||||||
|
<div class="temporary-credit-limit-public-view__title">查看临时额度申请</div>
|
||||||
|
<template v-if="detail">
|
||||||
|
<div class="temporary-credit-limit-public-view__section-title">项目额度信息</div>
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item label="项目名称">{{ detail.projectName || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="项目编号">{{ detail.projectCode || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="承办部门">{{ detail.undertakeDeptName || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="项目资金使用额度(万元)">
|
||||||
|
{{ formatAmount(detail.projectFundLimit) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="已使用项目资金使用额度(万元)">
|
||||||
|
{{ formatAmount(detail.usedFundLimit) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="剩余项目资金使用额度(万元)">
|
||||||
|
{{ formatAmount(detail.remainingFundLimit) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<div class="temporary-credit-limit-public-view__section-title">临时额度信息</div>
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item label="申请单号">{{ detail.applicationNo || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请临时额度(万元)">
|
||||||
|
{{ formatAmount(detail.applyLimit) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请有效期至">{{ detail.validUntil || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="审批状态">
|
||||||
|
{{ detail.approvalStatusName || detail.approvalStatus || '-' }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请人">{{ detail.applicantName || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="申请部门">{{ detail.applyDeptName || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="备注" :span="2">{{ detail.remark || '-' }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</template>
|
||||||
|
<el-empty v-else description="暂无数据" />
|
||||||
|
</div>
|
||||||
|
</mk-public-shell>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getMkPublicDetail } from '@/api/mk-process';
|
||||||
|
import MkPublicShell from '@/views/mk/mk-public-shell.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TemporaryCreditLimitPublicView',
|
||||||
|
components: { MkPublicShell },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
detail: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.loadDetail();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadDetail() {
|
||||||
|
const id = this.$route.query.id;
|
||||||
|
if (!id) return;
|
||||||
|
getMkPublicDetail('temporary-credit-limit', id).then(res => {
|
||||||
|
this.detail = res.data?.data || null;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
formatAmount(value) {
|
||||||
|
if (value === undefined || value === null || value === '' || Number(value) === -1) {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
getForm() {
|
||||||
|
const detail = this.detail || {};
|
||||||
|
return {
|
||||||
|
...detail,
|
||||||
|
subject: detail.projectName || detail.applicationNo || '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.temporary-credit-limit-public-view {
|
||||||
|
padding: 16px 20px 24px;
|
||||||
|
|
||||||
|
&__title {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__section-title {
|
||||||
|
position: relative;
|
||||||
|
margin: 16px 0 12px;
|
||||||
|
padding-left: 12px;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #303133;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 50%;
|
||||||
|
width: 4px;
|
||||||
|
height: 14px;
|
||||||
|
margin-top: -7px;
|
||||||
|
background: #409eff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -329,8 +329,10 @@ import {
|
|||||||
getDetail as getProjectDetail,
|
getDetail as getProjectDetail,
|
||||||
getList as getProjectList,
|
getList as getProjectList,
|
||||||
} from '@/api/business/project-apply';
|
} from '@/api/business/project-apply';
|
||||||
|
import { getMKApprovalUrl } from '@/api/system/business-process';
|
||||||
import { config, option } from '@/option/business/temporary-credit-limit';
|
import { config, option } from '@/option/business/temporary-credit-limit';
|
||||||
import { getToken, isAdministrator } from '@/utils/auth';
|
import { getToken, isAdministrator } from '@/utils/auth';
|
||||||
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
import { downloadFileByUrl, downloadXls } from '@/utils/util';
|
import { downloadFileByUrl, downloadXls } from '@/utils/util';
|
||||||
import { ElImageViewer } from 'element-plus';
|
import { ElImageViewer } from 'element-plus';
|
||||||
import { OpenFileViewer } from '@open-file-viewer/vue';
|
import { OpenFileViewer } from '@open-file-viewer/vue';
|
||||||
@@ -426,6 +428,7 @@ export default {
|
|||||||
flowBox: false,
|
flowBox: false,
|
||||||
flowUrl: '',
|
flowUrl: '',
|
||||||
processInstanceId: '',
|
processInstanceId: '',
|
||||||
|
mkEnabled: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -455,6 +458,13 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loadProjectOptions();
|
this.loadProjectOptions();
|
||||||
|
loadMkEnabled()
|
||||||
|
.then(enabled => {
|
||||||
|
this.mkEnabled = !!enabled;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.mkEnabled = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
buildTableOption() {
|
buildTableOption() {
|
||||||
@@ -543,11 +553,19 @@ export default {
|
|||||||
},
|
},
|
||||||
customOperations(row) {
|
customOperations(row) {
|
||||||
return (this.config.operations || []).filter(operation => {
|
return (this.config.operations || []).filter(operation => {
|
||||||
|
if (operation.mkOnly && !this.mkEnabled) return false;
|
||||||
|
if (operation.localOnly && this.mkEnabled) return false;
|
||||||
const permission = operation.permission || `${this.config.permission}_${operation.action}`;
|
const permission = operation.permission || `${this.config.permission}_${operation.action}`;
|
||||||
const statusProp = operation.statusProp || this.config.statusProp || 'status';
|
const statusProp = operation.statusProp || this.config.statusProp || 'status';
|
||||||
|
// MK「流程」入口允许只读行查看审核页;本地审批/提交/撤回仍禁止只读
|
||||||
|
if (
|
||||||
|
row.readonly &&
|
||||||
|
['submitApproval', 'withdraw', 'approve', 'reject'].includes(operation.action)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
this.hasPermission(permission) &&
|
this.hasPermission(permission) &&
|
||||||
!row.readonly &&
|
|
||||||
(!operation.status?.length || operation.status.includes(row[statusProp]))
|
(!operation.status?.length || operation.status.includes(row[statusProp]))
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -736,6 +754,10 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleOperation(operation, row) {
|
handleOperation(operation, row) {
|
||||||
|
if (operation.action === 'mkAudit') {
|
||||||
|
this.handleMkAudit(row);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (operation.action === 'flow') {
|
if (operation.action === 'flow') {
|
||||||
this.openFlow(row);
|
this.openFlow(row);
|
||||||
return;
|
return;
|
||||||
@@ -744,12 +766,49 @@ export default {
|
|||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
const previousApprovalStatus = row.approvalStatus || '';
|
||||||
|
const request = () => this.api[operation.action](row.id);
|
||||||
|
// 先本地提交再调 MK,避免 MK 回写 reviewing 后本地 submitApproval 被编辑校验拦住
|
||||||
|
const afterMk =
|
||||||
|
operation.action === 'submitApproval'
|
||||||
|
? request().then(() =>
|
||||||
|
submitMkApprovalFlow({
|
||||||
|
bizType: 'temporary-credit-limit',
|
||||||
|
bizId: row.id,
|
||||||
|
subjectName: row.projectName || row.applicationNo || '',
|
||||||
|
approvalStatus: previousApprovalStatus,
|
||||||
|
mkEnabled: this.mkEnabled,
|
||||||
})
|
})
|
||||||
.then(() => this.api[operation.action](row.id))
|
)
|
||||||
.then(() => {
|
: request();
|
||||||
|
return afterMk.then(res => {
|
||||||
|
if (res?.data?.success === false) {
|
||||||
|
this.$message.error(res.data?.msg || `${operation.label}失败,请联系管理员`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$message.success(`${operation.label}成功`);
|
this.$message.success(`${operation.label}成功`);
|
||||||
this.onLoad(this.page, this.query);
|
this.onLoad(this.page, this.query);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleMkAudit(row) {
|
||||||
|
if (!row?.id) {
|
||||||
|
this.$message.warning('临时额度申请ID为空,无法打开审核页');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getMKApprovalUrl({ bizId: String(row.id) })
|
||||||
|
.then(res => {
|
||||||
|
const url = res?.data?.data;
|
||||||
|
if (!url) {
|
||||||
|
this.$message.error('获取审核跳转地址失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
window.open(url, '_blank');
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message.error('获取审核跳转地址失败');
|
||||||
|
});
|
||||||
},
|
},
|
||||||
openFlow(row, loaded = false) {
|
openFlow(row, loaded = false) {
|
||||||
const processInstanceId = row.processInstanceId || row.processInstanceID || row.procInstId;
|
const processInstanceId = row.processInstanceId || row.processInstanceID || row.procInstId;
|
||||||
|
|||||||
@@ -577,10 +577,7 @@ export default {
|
|||||||
this.$message.warning(`第${index + 1}条调度明细缺少承运商信息`);
|
this.$message.warning(`第${index + 1}条调度明细缺少承运商信息`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!row.driverName) {
|
// 司机与手机号对全部承运类型都是选填,由调度明细弹窗校验已填部分的格式,此处不重复校验
|
||||||
this.$message.warning(`第${index + 1}条调度明细缺少司机信息`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!row.vehicleNo) {
|
if (!row.vehicleNo) {
|
||||||
this.$message.warning(`第${index + 1}条调度明细缺少车牌号`);
|
this.$message.warning(`第${index + 1}条调度明细缺少车牌号`);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -389,6 +389,18 @@
|
|||||||
v-model="batchQuery.batchNo"
|
v-model="batchQuery.batchNo"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入" /></el-form-item></el-col
|
placeholder="请输入" /></el-form-item></el-col
|
||||||
|
><el-col :span="12"
|
||||||
|
><el-form-item label="项目"
|
||||||
|
><el-select
|
||||||
|
v-model="batchQuery.projectId"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
placeholder="请选择"
|
||||||
|
><el-option
|
||||||
|
v-for="item in projectOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.projectName"
|
||||||
|
:value="item.id" /></el-select></el-form-item></el-col
|
||||||
><el-col :span="12"
|
><el-col :span="12"
|
||||||
><el-form-item label="创建日期"
|
><el-form-item label="创建日期"
|
||||||
><el-date-picker
|
><el-date-picker
|
||||||
@@ -428,6 +440,10 @@
|
|||||||
prop="batchNo"
|
prop="batchNo"
|
||||||
label="运单批次号"
|
label="运单批次号"
|
||||||
min-width="240" /><el-table-column
|
min-width="240" /><el-table-column
|
||||||
|
prop="projectName"
|
||||||
|
label="项目"
|
||||||
|
min-width="180"
|
||||||
|
show-overflow-tooltip /><el-table-column
|
||||||
prop="createTime"
|
prop="createTime"
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
min-width="180" /><el-table-column label="运单数" width="120"
|
min-width="180" /><el-table-column label="运单数" width="120"
|
||||||
@@ -694,7 +710,12 @@ const selectedBatches = ref([]),
|
|||||||
batchRows = ref([]),
|
batchRows = ref([]),
|
||||||
batchSelection = ref([]),
|
batchSelection = ref([]),
|
||||||
batchCreateRange = ref([]);
|
batchCreateRange = ref([]);
|
||||||
const batchQuery = reactive({ batchNo: '', createUser: '', waybillCount: undefined });
|
const batchQuery = reactive({
|
||||||
|
batchNo: '',
|
||||||
|
projectId: '',
|
||||||
|
createUser: '',
|
||||||
|
waybillCount: undefined,
|
||||||
|
});
|
||||||
const batchPage = reactive({ current: 1, size: 10, total: 0 });
|
const batchPage = reactive({ current: 1, size: 10, total: 0 });
|
||||||
const progressQuery = reactive({ businessId: '', attachmentName: '', status: '' });
|
const progressQuery = reactive({ businessId: '', attachmentName: '', status: '' });
|
||||||
const progressPage = reactive({ current: 1, size: 10, total: 0 });
|
const progressPage = reactive({ current: 1, size: 10, total: 0 });
|
||||||
@@ -1023,7 +1044,12 @@ const openBatchDialog = async row => {
|
|||||||
batchDialogMode.value = voucher?.id ? 'change' : 'upload';
|
batchDialogMode.value = voucher?.id ? 'change' : 'upload';
|
||||||
batchTarget.value = voucher?.id ? voucher : undefined;
|
batchTarget.value = voucher?.id ? voucher : undefined;
|
||||||
batchSelection.value = [];
|
batchSelection.value = [];
|
||||||
|
// 弹窗内的搜索条件是模块级状态,不重置就会带着上一次的筛选条件打开。
|
||||||
|
resetBatchSearch();
|
||||||
|
batchRows.value = [];
|
||||||
|
batchPage.total = 0;
|
||||||
batchVisible.value = true;
|
batchVisible.value = true;
|
||||||
|
if (!projectOptions.value.length) await loadProjects();
|
||||||
await loadBatches();
|
await loadBatches();
|
||||||
if (voucher?.waybillBatchNo) {
|
if (voucher?.waybillBatchNo) {
|
||||||
const currentBatch = batchRows.value.find(item => item.batchNo === voucher.waybillBatchNo);
|
const currentBatch = batchRows.value.find(item => item.batchNo === voucher.waybillBatchNo);
|
||||||
@@ -1033,6 +1059,7 @@ const openBatchDialog = async row => {
|
|||||||
const loadBatches = async () => {
|
const loadBatches = async () => {
|
||||||
const res = await api.getWaybillBatches(batchPage.current, batchPage.size, {
|
const res = await api.getWaybillBatches(batchPage.current, batchPage.size, {
|
||||||
batchNo: batchQuery.batchNo,
|
batchNo: batchQuery.batchNo,
|
||||||
|
projectId: batchQuery.projectId,
|
||||||
createUser: batchQuery.createUser,
|
createUser: batchQuery.createUser,
|
||||||
waybillCount: batchQuery.waybillCount,
|
waybillCount: batchQuery.waybillCount,
|
||||||
createTimeStart: batchCreateRange.value?.[0] ? `${batchCreateRange.value[0]} 00:00:00` : '',
|
createTimeStart: batchCreateRange.value?.[0] ? `${batchCreateRange.value[0]} 00:00:00` : '',
|
||||||
@@ -1053,10 +1080,18 @@ const handleWaybillCountInput = value => {
|
|||||||
batchQuery.waybillCount = filtered.replace(/^0+/, '');
|
batchQuery.waybillCount = filtered.replace(/^0+/, '');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const resetBatchQuery = () => {
|
const resetBatchSearch = () => {
|
||||||
Object.assign(batchQuery, { batchNo: '', createUser: '', waybillCount: undefined });
|
Object.assign(batchQuery, {
|
||||||
|
batchNo: '',
|
||||||
|
projectId: '',
|
||||||
|
createUser: '',
|
||||||
|
waybillCount: undefined,
|
||||||
|
});
|
||||||
batchCreateRange.value = [];
|
batchCreateRange.value = [];
|
||||||
batchPage.current = 1;
|
batchPage.current = 1;
|
||||||
|
};
|
||||||
|
const resetBatchQuery = () => {
|
||||||
|
resetBatchSearch();
|
||||||
loadBatches();
|
loadBatches();
|
||||||
};
|
};
|
||||||
const updateWaybillBatch = async (target, selected) => {
|
const updateWaybillBatch = async (target, selected) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
:config="config"
|
:config="config"
|
||||||
:crud-option="option"
|
:crud-option="option"
|
||||||
:detail-id="detailId"
|
:detail-id="detailId"
|
||||||
:menu-width="250"
|
:menu-width="320"
|
||||||
standalone-form-page
|
standalone-form-page
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -2,16 +2,40 @@
|
|||||||
<div ref="page" class="mk-public-biz-view">
|
<div ref="page" class="mk-public-biz-view">
|
||||||
<basic-container>
|
<basic-container>
|
||||||
<div class="mk-public-biz-view__title">{{ pageTitle }}</div>
|
<div class="mk-public-biz-view__title">{{ pageTitle }}</div>
|
||||||
<el-descriptions v-if="detail" :column="2" border>
|
<template v-if="detail">
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
<el-descriptions-item
|
<el-descriptions-item
|
||||||
v-for="item in visibleFields"
|
v-for="item in visibleFields"
|
||||||
:key="item.prop"
|
:key="item.prop"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:span="item.span || 1"
|
:span="item.span || 1"
|
||||||
>
|
>
|
||||||
{{ displayValue(detail[item.prop]) }}
|
{{ fieldDisplayValue(item.prop, detail[item.prop]) }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
<section
|
||||||
|
v-for="party in partySections"
|
||||||
|
:key="party.role"
|
||||||
|
class="mk-public-biz-view__party"
|
||||||
|
>
|
||||||
|
<div class="mk-public-biz-view__party-title">{{ party.label }}</div>
|
||||||
|
<el-table :data="party.rows" border empty-text="暂无数据">
|
||||||
|
<el-table-column type="index" label="序号" width="70" align="center" />
|
||||||
|
<el-table-column prop="customerName" label="客商名称" min-width="180" align="center">
|
||||||
|
<template #default="{ row }">{{ row.customerName || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="creditCode" label="统一信用代码" min-width="160" align="center">
|
||||||
|
<template #default="{ row }">{{ row.creditCode || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="contactName" label="联系人" min-width="140" align="center">
|
||||||
|
<template #default="{ row }">{{ row.contactName || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="contactPhone" label="联系电话" min-width="140" align="center">
|
||||||
|
<template #default="{ row }">{{ row.contactPhone || '-' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
<el-empty v-else description="暂无数据" />
|
<el-empty v-else description="暂无数据" />
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</div>
|
</div>
|
||||||
@@ -19,6 +43,36 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getMkPublicDetail, postMkPublicProcessMessage } from '@/api/mk-process';
|
import { getMkPublicDetail, postMkPublicProcessMessage } from '@/api/mk-process';
|
||||||
|
import { formatSealTypes } from '@/utils/settlement-seal';
|
||||||
|
|
||||||
|
const createPartyRow = (row = {}) => ({
|
||||||
|
customerId: row.customerId || '',
|
||||||
|
customerName: row.customerName || '',
|
||||||
|
creditCode: row.creditCode || row.unifiedCreditCode || '',
|
||||||
|
contactId: row.contactId || '',
|
||||||
|
contactName: row.contactName || '',
|
||||||
|
contactPhone: row.contactPhone || '',
|
||||||
|
});
|
||||||
|
|
||||||
|
const parsePartyRows = (partyJson, fallbackName) => {
|
||||||
|
const rows = (() => {
|
||||||
|
if (Array.isArray(partyJson)) return partyJson;
|
||||||
|
if (!partyJson) return [];
|
||||||
|
try {
|
||||||
|
const data = JSON.parse(partyJson);
|
||||||
|
return Array.isArray(data) ? data : [];
|
||||||
|
} catch (error) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
})().map(item => createPartyRow(item));
|
||||||
|
if (rows.length) return rows;
|
||||||
|
if (!fallbackName) return [];
|
||||||
|
return String(fallbackName)
|
||||||
|
.split(/[、,]/)
|
||||||
|
.map(name => name.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
.map(name => createPartyRow({ customerName: name }));
|
||||||
|
};
|
||||||
|
|
||||||
const FIELD_MAP = {
|
const FIELD_MAP = {
|
||||||
'project-apply': [
|
'project-apply': [
|
||||||
@@ -38,8 +92,6 @@ const FIELD_MAP = {
|
|||||||
{ label: '审核状态', prop: 'approvalStatusName' },
|
{ label: '审核状态', prop: 'approvalStatusName' },
|
||||||
{ label: '当前节点', prop: 'currentNode' },
|
{ label: '当前节点', prop: 'currentNode' },
|
||||||
{ label: '当前处理人', prop: 'currentProcessor' },
|
{ label: '当前处理人', prop: 'currentProcessor' },
|
||||||
{ label: '甲方', prop: 'partyA' },
|
|
||||||
{ label: '乙方', prop: 'partyB' },
|
|
||||||
{ label: '项目名称', prop: 'projectName', span: 2 },
|
{ label: '项目名称', prop: 'projectName', span: 2 },
|
||||||
],
|
],
|
||||||
'pre-settlement': [
|
'pre-settlement': [
|
||||||
@@ -47,6 +99,7 @@ const FIELD_MAP = {
|
|||||||
{ label: '合同名称', prop: 'contractName' },
|
{ label: '合同名称', prop: 'contractName' },
|
||||||
{ label: '项目名称', prop: 'projectName' },
|
{ label: '项目名称', prop: 'projectName' },
|
||||||
{ label: '结算金额', prop: 'settlementAmount' },
|
{ label: '结算金额', prop: 'settlementAmount' },
|
||||||
|
{ label: '用印类型', prop: 'sealTypes' },
|
||||||
{ label: '审核状态', prop: 'approvalStatusName' },
|
{ label: '审核状态', prop: 'approvalStatusName' },
|
||||||
{ label: '当前节点', prop: 'currentNode' },
|
{ label: '当前节点', prop: 'currentNode' },
|
||||||
{ label: '当前处理人', prop: 'currentProcessor' },
|
{ label: '当前处理人', prop: 'currentProcessor' },
|
||||||
@@ -58,6 +111,7 @@ const FIELD_MAP = {
|
|||||||
{ label: '项目名称', prop: 'projectName' },
|
{ label: '项目名称', prop: 'projectName' },
|
||||||
{ label: '合同名称', prop: 'contractName' },
|
{ label: '合同名称', prop: 'contractName' },
|
||||||
{ label: '结算金额', prop: 'settlementAmount' },
|
{ label: '结算金额', prop: 'settlementAmount' },
|
||||||
|
{ label: '用印类型', prop: 'sealTypes' },
|
||||||
{ label: '审核状态', prop: 'approvalStatusName' },
|
{ label: '审核状态', prop: 'approvalStatusName' },
|
||||||
{ label: '当前节点', prop: 'currentNode' },
|
{ label: '当前节点', prop: 'currentNode' },
|
||||||
{ label: '当前处理人', prop: 'currentProcessor' },
|
{ label: '当前处理人', prop: 'currentProcessor' },
|
||||||
@@ -99,6 +153,26 @@ export default {
|
|||||||
visibleFields() {
|
visibleFields() {
|
||||||
return FIELD_MAP[this.bizType] || [];
|
return FIELD_MAP[this.bizType] || [];
|
||||||
},
|
},
|
||||||
|
partySections() {
|
||||||
|
if (!this.detail || this.bizType !== 'contract-manage') return [];
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
role: 'A',
|
||||||
|
label: '甲方',
|
||||||
|
rows: parsePartyRows(this.detail.partyAJson, this.detail.partyA),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
role: 'B',
|
||||||
|
label: '乙方',
|
||||||
|
rows: parsePartyRows(this.detail.partyBJson, this.detail.partyB),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
role: 'C',
|
||||||
|
label: '丙方',
|
||||||
|
rows: parsePartyRows(this.detail.partyCJson, this.detail.partyC),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.handleIframeHeight = () => this.sendIframeHeight();
|
this.handleIframeHeight = () => this.sendIframeHeight();
|
||||||
@@ -192,6 +266,7 @@ export default {
|
|||||||
id: this.getFormId() || detail.id,
|
id: this.getFormId() || detail.id,
|
||||||
subject: this.pageTitle,
|
subject: this.pageTitle,
|
||||||
formInstanceId: this.getFormId(),
|
formInstanceId: this.getFormId(),
|
||||||
|
sealTypes: formatSealTypes(detail.sealTypes) || detail.sealTypes || '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
getFormId() {
|
getFormId() {
|
||||||
@@ -205,6 +280,12 @@ export default {
|
|||||||
''
|
''
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
fieldDisplayValue(prop, value) {
|
||||||
|
if (prop === 'sealTypes') {
|
||||||
|
return formatSealTypes(value) || '-';
|
||||||
|
}
|
||||||
|
return this.displayValue(value);
|
||||||
|
},
|
||||||
displayValue(value) {
|
displayValue(value) {
|
||||||
if (value === null || value === undefined || value === '') return '-';
|
if (value === null || value === undefined || value === '') return '-';
|
||||||
if (Array.isArray(value)) return value.join('、') || '-';
|
if (Array.isArray(value)) return value.join('、') || '-';
|
||||||
@@ -255,5 +336,33 @@ html.mk-iframe-page #app.mk-iframe-page {
|
|||||||
background: #409eff;
|
background: #409eff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__party {
|
||||||
|
margin-top: 16px;
|
||||||
|
padding: 14px 16px 16px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
&__party-title {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 12px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 22px;
|
||||||
|
color: #303133;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 2px;
|
||||||
|
width: 4px;
|
||||||
|
height: 18px;
|
||||||
|
background: #409eff;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -156,9 +156,17 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async handleApprove(row) {
|
async handleApprove(row) {
|
||||||
|
await this.$confirm('确认审批通过该汇票付款?', '提示', { type: 'warning' });
|
||||||
|
// 防止重复点击:请求期间表格遮罩,后续点击直接忽略
|
||||||
|
if (this.loading) return;
|
||||||
|
this.loading = true;
|
||||||
|
try {
|
||||||
await api.approve({ id: row.id });
|
await api.approve({ id: row.id });
|
||||||
this.$message.success('审批通过');
|
this.$message.success('审批通过');
|
||||||
this.loadTable();
|
await this.loadTable();
|
||||||
|
} finally {
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async handleReturn(row) {
|
async handleReturn(row) {
|
||||||
const { value } = await this.$prompt('请输入驳回原因', '审批驳回');
|
const { value } = await this.$prompt('请输入驳回原因', '审批驳回');
|
||||||
|
|||||||
@@ -251,10 +251,10 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="不含税单价" min-width="130">
|
<el-table-column label="合计金额" min-width="140">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="row.unitPriceNoTax"
|
v-model="row.totalAmount"
|
||||||
:disabled="readonly"
|
:disabled="readonly"
|
||||||
:min="0"
|
:min="0"
|
||||||
:precision="2"
|
:precision="2"
|
||||||
@@ -263,9 +263,6 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="不含税金额" min-width="130" align="right">
|
|
||||||
<template #default="{ row }">{{ formatMoney(row.amountNoTax) }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="税率" min-width="110">
|
<el-table-column label="税率" min-width="110">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -282,17 +279,26 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="税额" min-width="120">
|
<el-table-column label="不含税单价" min-width="140" align="right">
|
||||||
<template #default="{ row }">{{ formatMoney(row.taxAmount) }}</template>
|
<template #default="{ row }">{{ formatUnitPrice(row.unitPriceNoTax) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合计" min-width="130" align="right">
|
<el-table-column label="不含税金额" min-width="130" align="right">
|
||||||
<template #default="{ row }">{{ formatMoney(row.totalAmount) }}</template>
|
<template #default="{ row }">{{ formatMoney(row.amountNoTax) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="税额" min-width="120" align="right">
|
||||||
|
<template #default="{ row }">{{ formatMoney(row.taxAmount) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" min-width="170">
|
<el-table-column label="备注" min-width="170">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-input v-model="row.remark" :disabled="readonly" maxlength="200" />
|
<el-input v-model="row.remark" :disabled="readonly" maxlength="200" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column v-if="readonly" label="开票状态" min-width="90" align="center">
|
||||||
|
<template #default="{ row }">{{ sheet.invoiceStatusName || '未开票' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-if="readonly" label="金蝶开票结果备注" min-width="200">
|
||||||
|
<template #default="{ row }">{{ sheet.kingdeeResultRemark }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column v-if="!readonly" label="操作" width="110" fixed="right" align="center">
|
<el-table-column v-if="!readonly" label="操作" width="110" fixed="right" align="center">
|
||||||
<template #default="{ $index }">
|
<template #default="{ $index }">
|
||||||
<div class="invoice-form-page__links">
|
<div class="invoice-form-page__links">
|
||||||
@@ -323,17 +329,8 @@
|
|||||||
<el-table-column label="可开票金额" min-width="140" align="right">
|
<el-table-column label="可开票金额" min-width="140" align="right">
|
||||||
<template #default="{ row }">{{ formatMoney(row.availableInvoiceAmount) }}</template>
|
<template #default="{ row }">{{ formatMoney(row.availableInvoiceAmount) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="分摊发票金额" min-width="160">
|
<el-table-column label="分摊发票金额" min-width="140" align="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">{{ formatMoney(row.allocatedInvoiceAmount) }}</template>
|
||||||
<el-input-number
|
|
||||||
v-model="row.allocatedInvoiceAmount"
|
|
||||||
:disabled="readonly"
|
|
||||||
:min="0"
|
|
||||||
:max="Number(row.availableInvoiceAmount || 0)"
|
|
||||||
:precision="2"
|
|
||||||
:controls="false"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</section-card>
|
</section-card>
|
||||||
@@ -454,6 +451,9 @@
|
|||||||
<el-table-column label="结算金额" min-width="130" align="right">
|
<el-table-column label="结算金额" min-width="130" align="right">
|
||||||
<template #default="{ row }">{{ formatMoney(row.settlementAmount) }}</template>
|
<template #default="{ row }">{{ formatMoney(row.settlementAmount) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="已申请开票金额" min-width="140" align="right">
|
||||||
|
<template #default="{ row }">{{ formatMoney(row.invoicedAmount) }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="可开票金额" min-width="140" align="right">
|
<el-table-column label="可开票金额" min-width="140" align="right">
|
||||||
<template #default="{ row }">{{ formatMoney(row.availableInvoiceAmount) }}</template>
|
<template #default="{ row }">{{ formatMoney(row.availableInvoiceAmount) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -494,6 +494,9 @@ import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.v
|
|||||||
import { getMkPublicDetail } from '@/api/mk-process';
|
import { getMkPublicDetail } from '@/api/mk-process';
|
||||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
|
|
||||||
|
// 提交成功后带标记返回,列表页(keep-alive)据此重新拉取
|
||||||
|
const invoiceApplicationListRefreshKey = 'invoice-application-list-refresh';
|
||||||
|
|
||||||
let localId = 0;
|
let localId = 0;
|
||||||
const emptyLine = () => ({
|
const emptyLine = () => ({
|
||||||
localId: ++localId,
|
localId: ++localId,
|
||||||
@@ -861,7 +864,6 @@ export default {
|
|||||||
keyword: this.settlementDialog.keyword,
|
keyword: this.settlementDialog.keyword,
|
||||||
contractCategory: '客户合同',
|
contractCategory: '客户合同',
|
||||||
settlementType: 'receivable',
|
settlementType: 'receivable',
|
||||||
invoiceStatus: 'unreceived',
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -913,7 +915,7 @@ export default {
|
|||||||
...item,
|
...item,
|
||||||
formalSettlementId: item.id,
|
formalSettlementId: item.id,
|
||||||
settlementId: item.id,
|
settlementId: item.id,
|
||||||
allocatedInvoiceAmount: rows.length === 1 ? Number(item.availableInvoiceAmount || 0) : 0,
|
allocatedInvoiceAmount: 0,
|
||||||
}));
|
}));
|
||||||
this.form.projectName = first.projectName;
|
this.form.projectName = first.projectName;
|
||||||
this.form.deptName = first.deptName;
|
this.form.deptName = first.deptName;
|
||||||
@@ -1108,15 +1110,30 @@ export default {
|
|||||||
addLine(sheet) {
|
addLine(sheet) {
|
||||||
sheet.lines.push(emptyLine());
|
sheet.lines.push(emptyLine());
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 填写合计金额 + 税率后反算:
|
||||||
|
* 合计金额 = 数量 × 不含税单价 × (1 + 税率)
|
||||||
|
* 不含税单价 = 合计金额 / 数量 / (1 + 税率),保留 6 位小数
|
||||||
|
* 不含税金额 = 数量 × 不含税单价,保留 2 位小数
|
||||||
|
*/
|
||||||
recalculateLine(row) {
|
recalculateLine(row) {
|
||||||
const quantity = Number(row.quantity || 0);
|
const quantity = Number(row.quantity || 0);
|
||||||
const unitPrice = Number(row.unitPriceNoTax || 0);
|
const totalAmount = Number(Number(row.totalAmount || 0).toFixed(2));
|
||||||
const amountNoTax = Number((quantity * unitPrice).toFixed(2));
|
|
||||||
const rate = Number(row.taxRate || 0) / 100;
|
const rate = Number(row.taxRate || 0) / 100;
|
||||||
|
row.totalAmount = totalAmount;
|
||||||
|
row.amountWithTax = totalAmount;
|
||||||
|
if (quantity <= 0 || totalAmount <= 0) {
|
||||||
|
row.unitPriceNoTax = 0;
|
||||||
|
row.amountNoTax = 0;
|
||||||
|
row.taxAmount = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const factor = 1 + rate;
|
||||||
|
const unitPriceNoTax = Number((totalAmount / quantity / factor).toFixed(6));
|
||||||
|
const amountNoTax = Number((quantity * unitPriceNoTax).toFixed(2));
|
||||||
|
row.unitPriceNoTax = unitPriceNoTax;
|
||||||
row.amountNoTax = amountNoTax;
|
row.amountNoTax = amountNoTax;
|
||||||
row.taxAmount = rate ? Number((amountNoTax * rate).toFixed(2)) : 0;
|
row.taxAmount = Number((totalAmount - amountNoTax).toFixed(2));
|
||||||
row.totalAmount = Number((amountNoTax + row.taxAmount).toFixed(2));
|
|
||||||
row.amountWithTax = row.totalAmount;
|
|
||||||
},
|
},
|
||||||
validateBusiness() {
|
validateBusiness() {
|
||||||
if (!this.selectedDetailIds.length) throw new Error('请至少选择一条开票明细');
|
if (!this.selectedDetailIds.length) throw new Error('请至少选择一条开票明细');
|
||||||
@@ -1129,12 +1146,14 @@ export default {
|
|||||||
for (const line of sheet.lines) {
|
for (const line of sheet.lines) {
|
||||||
if (!line.goodsCategory || !line.goodsName) throw new Error('请完整填写商品和服务信息');
|
if (!line.goodsCategory || !line.goodsName) throw new Error('请完整填写商品和服务信息');
|
||||||
if (
|
if (
|
||||||
[line.quantity, line.unitPriceNoTax, line.amountNoTax, line.taxRate].some(
|
[line.quantity, line.totalAmount, line.unitPriceNoTax, line.amountNoTax, line.taxRate].some(
|
||||||
Number.isNaN
|
Number.isNaN
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
throw new Error('开票商品行金额格式不正确');
|
throw new Error('开票商品行金额格式不正确');
|
||||||
}
|
}
|
||||||
|
if (Number(line.quantity || 0) <= 0) throw new Error('开票商品行数量必须大于0');
|
||||||
|
if (Number(line.totalAmount || 0) <= 0) throw new Error('开票商品行合计金额必须大于0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1211,6 +1230,7 @@ export default {
|
|||||||
mkEnabled: await loadMkEnabled().catch(() => false),
|
mkEnabled: await loadMkEnabled().catch(() => false),
|
||||||
});
|
});
|
||||||
this.$message.success('提交成功');
|
this.$message.success('提交成功');
|
||||||
|
sessionStorage.setItem(invoiceApplicationListRefreshKey, '1');
|
||||||
this.goBack();
|
this.goBack();
|
||||||
},
|
},
|
||||||
async syncReferenceData() {
|
async syncReferenceData() {
|
||||||
@@ -1234,6 +1254,9 @@ export default {
|
|||||||
formatMoney(value) {
|
formatMoney(value) {
|
||||||
return Number(value || 0).toFixed(2);
|
return Number(value || 0).toFixed(2);
|
||||||
},
|
},
|
||||||
|
formatUnitPrice(value) {
|
||||||
|
return Number(value || 0).toFixed(6);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -125,6 +125,17 @@
|
|||||||
{{ displayValue(row[column.prop]) }}
|
{{ displayValue(row[column.prop]) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<span v-else-if="column.money">{{ formatMoney(row[column.prop]) }}</span>
|
<span v-else-if="column.money">{{ formatMoney(row[column.prop]) }}</span>
|
||||||
|
<template v-else-if="column.prop === 'kingdeeStatusName'">
|
||||||
|
<el-tooltip
|
||||||
|
:disabled="row.kingdeeStatus !== 'failed'"
|
||||||
|
:content="row.kingdeeFailReason || '推送金蝶失败,可点击「同步金蝶」重试'"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
|
<el-tag :type="kingdeeStatusType(row.kingdeeStatus)">{{
|
||||||
|
row.kingdeeStatusName || '-'
|
||||||
|
}}</el-tag>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
<template v-else-if="column.prop === 'kingdeeLockStatus'">
|
<template v-else-if="column.prop === 'kingdeeLockStatus'">
|
||||||
<el-tooltip v-if="lockTag(row).show" :content="lockTag(row).tip" placement="top">
|
<el-tooltip v-if="lockTag(row).show" :content="lockTag(row).tip" placement="top">
|
||||||
<el-tag :type="lockTag(row).type" class="status-text">{{ lockTag(row).label }}</el-tag>
|
<el-tag :type="lockTag(row).type" class="status-text">{{ lockTag(row).label }}</el-tag>
|
||||||
@@ -238,6 +249,12 @@ import TableHeaderTools from '@/components/table-header-tools/main.vue';
|
|||||||
import organizationSearch from '@/mixins/organization-search';
|
import organizationSearch from '@/mixins/organization-search';
|
||||||
import { getMKApprovalUrl } from '@/api/system/business-process';
|
import { getMKApprovalUrl } from '@/api/system/business-process';
|
||||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
|
import { kingdeeStatusType } from '@/utils/kingdee';
|
||||||
|
import { settlementListPath } from '@/utils/settlement-menu';
|
||||||
|
|
||||||
|
// 表单提交成功后带标记返回,keep-alive 缓存的列表页据此重新拉取
|
||||||
|
const invoiceApplicationListRefreshKey = 'invoice-application-list-refresh';
|
||||||
|
const invoiceApplicationListRoute = '/payment/invoice-application';
|
||||||
|
|
||||||
const emptyQuery = () => ({
|
const emptyQuery = () => ({
|
||||||
applicationNo: '',
|
applicationNo: '',
|
||||||
@@ -296,7 +313,28 @@ export default {
|
|||||||
this.mkEnabled = false;
|
this.mkEnabled = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
activated() {
|
||||||
|
this.consumeListRefreshFlag();
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route(to, from) {
|
||||||
|
if (
|
||||||
|
to.path === invoiceApplicationListRoute &&
|
||||||
|
from?.path?.includes('/invoice-application/form')
|
||||||
|
) {
|
||||||
|
this.consumeListRefreshFlag();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/** 表单提交成功后带标记返回时,重新拉取列表 */
|
||||||
|
consumeListRefreshFlag() {
|
||||||
|
if (!sessionStorage.getItem(invoiceApplicationListRefreshKey)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sessionStorage.removeItem(invoiceApplicationListRefreshKey);
|
||||||
|
this.loadTable();
|
||||||
|
},
|
||||||
hasPermission(code) {
|
hasPermission(code) {
|
||||||
return this.permission?.[code] !== false;
|
return this.permission?.[code] !== false;
|
||||||
},
|
},
|
||||||
@@ -360,12 +398,18 @@ export default {
|
|||||||
item => String(item.formalSettlementNo || '').trim() === normalizedNo
|
item => String(item.formalSettlementNo || '').trim() === normalizedNo
|
||||||
);
|
);
|
||||||
if (!row?.id) {
|
if (!row?.id) {
|
||||||
this.$message.warning('未找到对应的付款结算单');
|
this.$message.warning('未找到对应的结算单');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 开票申请关联的多为收款结算单,按单据类型路由到对应表单入口,避免误落付款结算单
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/settlement/formal-settlement/form',
|
path: settlementListPath(row.settlementType) + '/form',
|
||||||
query: { mode: 'view', id: row.id, name: '查看正式结算' },
|
query: {
|
||||||
|
mode: 'view',
|
||||||
|
id: row.id,
|
||||||
|
settlementType: row.settlementType,
|
||||||
|
name: '查看正式结算',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$message.error('正式结算单详情加载失败');
|
this.$message.error('正式结算单详情加载失败');
|
||||||
@@ -500,6 +544,7 @@ export default {
|
|||||||
''
|
''
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
kingdeeStatusType,
|
||||||
lockTag(row) {
|
lockTag(row) {
|
||||||
if (row.kingdeeLockStatus === 'locked') {
|
if (row.kingdeeLockStatus === 'locked') {
|
||||||
return { show: true, type: 'danger', label: '金蝶锁定中', tip: '该单据已被金蝶锁定,不可编辑/作废' };
|
return { show: true, type: 'danger', label: '金蝶锁定中', tip: '该单据已被金蝶锁定,不可编辑/作废' };
|
||||||
|
|||||||
@@ -53,15 +53,6 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="税率">
|
|
||||||
<el-input
|
|
||||||
:model-value="formatRate(form.taxRate)"
|
|
||||||
disabled
|
|
||||||
placeholder="从金蝶票据池带出"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="开票金额">
|
<el-form-item label="开票金额">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -109,22 +100,18 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="关联结算单" prop="settlementIds">
|
<el-form-item label="所属合同" prop="contractNo">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
:content="settlementLabel"
|
:content="form.contractName"
|
||||||
:disabled="!settlementLabel"
|
:disabled="!form.contractName"
|
||||||
placement="top"
|
placement="top"
|
||||||
:show-after="200"
|
:show-after="200"
|
||||||
>
|
>
|
||||||
<div class="receipt-form-page__overflow-trigger">
|
<div class="receipt-form-page__overflow-trigger">
|
||||||
<el-input
|
<el-input :model-value="form.contractNo" readonly placeholder="请选择承运商合同">
|
||||||
:model-value="settlementLabel"
|
|
||||||
readonly
|
|
||||||
placeholder="请选择应付正式结算单"
|
|
||||||
>
|
|
||||||
<template v-if="!readonly" #append>
|
<template v-if="!readonly" #append>
|
||||||
<el-tooltip content="选择付款结算单" placement="top">
|
<el-tooltip content="选择承运商合同" placement="top">
|
||||||
<el-button :icon="Search" @click="openSettlementDialog" />
|
<el-button :icon="Search" @click="openContractDialog" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
@@ -132,11 +119,41 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="承办部门">
|
||||||
|
<el-input :model-value="form.deptName" disabled placeholder="从所属合同带出" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</section-card>
|
</section-card>
|
||||||
|
|
||||||
|
<section-card title="发票明细">
|
||||||
|
<el-table :data="invoiceItems" border empty-text="选择金蝶票据池发票后带出发票明细行">
|
||||||
|
<el-table-column type="index" label="序号" width="64" align="center" />
|
||||||
|
<el-table-column prop="goodsName" label="货物名称" min-width="160" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="specModel" label="规格型号" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="unit" label="单位" min-width="80" align="center" />
|
||||||
|
<el-table-column label="数量" min-width="100" align="right">
|
||||||
|
<template #default="{ row }">{{ formatQuantity(row.num) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="单价" min-width="110" align="right">
|
||||||
|
<template #default="{ row }">{{ formatMoney(row.unitPrice) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="金额" min-width="120" align="right">
|
||||||
|
<template #default="{ row }">{{ formatMoney(row.detailAmount) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="税率" min-width="90" align="center">
|
||||||
|
<template #default="{ row }">{{ formatRateText(row.taxRate) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="税额" min-width="110" align="right">
|
||||||
|
<template #default="{ row }">{{ formatMoney(row.taxAmount) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="goodsCode" label="商品编码" min-width="140" show-overflow-tooltip />
|
||||||
|
</el-table>
|
||||||
|
</section-card>
|
||||||
|
|
||||||
<section-card title="结算信息">
|
<section-card title="结算信息">
|
||||||
<el-table :data="form.settlements" border>
|
<el-table :data="form.settlements" border empty-text="暂无认领数据(认领关系由付款结算单侧维护)">
|
||||||
<el-table-column type="index" label="序号" width="64" align="center" />
|
<el-table-column type="index" label="序号" width="64" align="center" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="结算单号"
|
label="结算单号"
|
||||||
@@ -156,17 +173,8 @@
|
|||||||
<el-table-column label="已收票金额" min-width="150" align="right">
|
<el-table-column label="已收票金额" min-width="150" align="right">
|
||||||
<template #default="{ row }">{{ formatMoney(row.receivedInvoiceAmount) }}</template>
|
<template #default="{ row }">{{ formatMoney(row.receivedInvoiceAmount) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="分摊发票金额" min-width="180">
|
<el-table-column label="分摊发票金额" min-width="150" align="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">{{ formatMoney(row.allocatedInvoiceAmount) }}</template>
|
||||||
<el-input-number
|
|
||||||
v-model="row.allocatedInvoiceAmount"
|
|
||||||
:disabled="readonly"
|
|
||||||
:min="0"
|
|
||||||
:max="remainingAmount(row)"
|
|
||||||
:precision="2"
|
|
||||||
:controls="false"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</section-card>
|
</section-card>
|
||||||
@@ -217,69 +225,46 @@
|
|||||||
@confirm="handleInvoicePicked"
|
@confirm="handleInvoicePicked"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog v-model="contractDialog.visible" title="选择承运商合同" width="920px" append-to-body>
|
||||||
v-model="settlementDialog.visible"
|
<el-form :model="contractDialog.query" label-position="right" label-width="auto" inline @submit.prevent>
|
||||||
title="选择应付正式结算单"
|
<el-form-item label="合同编号">
|
||||||
width="86%"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<div class="receipt-form-page__dialog-search">
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="settlementDialog.keyword"
|
v-model="contractDialog.query.contractNo"
|
||||||
clearable
|
clearable
|
||||||
placeholder="结算单号、项目或合同"
|
placeholder="请输入"
|
||||||
@keyup.enter="loadSettlementCandidates"
|
@keyup.enter="searchContracts"
|
||||||
/>
|
/>
|
||||||
<el-button type="primary" @click="loadSettlementCandidates">查询</el-button>
|
</el-form-item>
|
||||||
</div>
|
<el-form-item label="合同名称">
|
||||||
<el-table
|
<el-input
|
||||||
ref="settlementTable"
|
v-model="contractDialog.query.contractName"
|
||||||
v-loading="settlementDialog.loading"
|
clearable
|
||||||
:data="settlementDialog.rows"
|
placeholder="请输入"
|
||||||
row-key="id"
|
@keyup.enter="searchContracts"
|
||||||
border
|
|
||||||
@selection-change="settlementDialog.selection = $event"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="52" align="center" reserve-selection />
|
|
||||||
<el-table-column
|
|
||||||
prop="formalSettlementNo"
|
|
||||||
label="结算单号"
|
|
||||||
min-width="170"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
</el-form-item>
|
||||||
prop="projectName"
|
<el-form-item>
|
||||||
label="所属项目"
|
<el-button type="primary" :icon="Search" @click="searchContracts">查询</el-button>
|
||||||
min-width="150"
|
<el-button @click="resetContractQuery">重置</el-button>
|
||||||
show-overflow-tooltip
|
</el-form-item>
|
||||||
/>
|
</el-form>
|
||||||
<el-table-column prop="deptName" label="所属组织" min-width="150" show-overflow-tooltip />
|
<el-table v-loading="contractDialog.loading" :data="contractDialog.rows" border>
|
||||||
<el-table-column
|
<el-table-column prop="contractNo" label="合同编号" min-width="180" show-overflow-tooltip />
|
||||||
prop="contractNo"
|
<el-table-column prop="contractName" label="合同名称" min-width="200" show-overflow-tooltip />
|
||||||
label="合同编号"
|
<el-table-column prop="organizationName" label="承办部门" min-width="160" show-overflow-tooltip />
|
||||||
min-width="150"
|
<el-table-column label="操作" width="80" align="center">
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
<el-table-column prop="payerName" label="付款方" min-width="150" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="payeeName" label="收款方" min-width="150" show-overflow-tooltip />
|
|
||||||
<el-table-column label="结算总金额" min-width="140" align="right">
|
|
||||||
<template #default="{ row }">{{ formatMoney(row.settlementAmount) }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="已收票金额" min-width="140" align="right">
|
|
||||||
<template #default="{ row }">{{ formatMoney(row.receivedInvoiceAmount) }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" width="100" fixed="right" align="center">
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-link type="primary" @click.stop="selectSettlement(row)">选择</el-link>
|
<el-button type="primary" link @click="pickContract(row)">选择</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<template #footer>
|
<el-pagination
|
||||||
<el-button @click="settlementDialog.visible = false">取消</el-button>
|
v-model:current-page="contractDialog.page.current"
|
||||||
<el-button type="primary" @click="confirmSettlements">
|
v-model:page-size="contractDialog.page.size"
|
||||||
确定{{ settlementDialog.selection.length ? `(${settlementDialog.selection.length})` : '' }}
|
:total="contractDialog.page.total"
|
||||||
</el-button>
|
layout="total, prev, pager, next"
|
||||||
</template>
|
@current-change="loadContracts"
|
||||||
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
@@ -288,11 +273,15 @@
|
|||||||
import { Search } from '@element-plus/icons-vue';
|
import { Search } from '@element-plus/icons-vue';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import * as api from '@/api/payment/invoiceReceipt';
|
import * as api from '@/api/payment/invoiceReceipt';
|
||||||
|
import { getList as getContractList } from '@/api/business/contract-manage';
|
||||||
import KingdeeInvoicePoolDialog from '@/components/kingdee-invoice-pool-dialog/main.vue';
|
import KingdeeInvoicePoolDialog from '@/components/kingdee-invoice-pool-dialog/main.vue';
|
||||||
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.vue';
|
||||||
import { getMkPublicDetail } from '@/api/mk-process';
|
import { getMkPublicDetail } from '@/api/mk-process';
|
||||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
|
|
||||||
|
// 提交成功后带标记返回,列表页(keep-alive)据此重新拉取
|
||||||
|
const invoiceReceiptListRefreshKey = 'invoice-receipt-list-refresh';
|
||||||
|
|
||||||
const emptyForm = () => ({
|
const emptyForm = () => ({
|
||||||
id: null,
|
id: null,
|
||||||
invoiceNo: '',
|
invoiceNo: '',
|
||||||
@@ -310,6 +299,9 @@ const emptyForm = () => ({
|
|||||||
customerEmails: [],
|
customerEmails: [],
|
||||||
departmentEmails: [],
|
departmentEmails: [],
|
||||||
projectName: '',
|
projectName: '',
|
||||||
|
contractNo: '',
|
||||||
|
contractName: '',
|
||||||
|
deptId: null,
|
||||||
deptName: '',
|
deptName: '',
|
||||||
payerName: '',
|
payerName: '',
|
||||||
payeeName: '',
|
payeeName: '',
|
||||||
@@ -330,26 +322,27 @@ export default {
|
|||||||
form: emptyForm(),
|
form: emptyForm(),
|
||||||
customerEmailOptions: [],
|
customerEmailOptions: [],
|
||||||
departmentEmailOptions: [],
|
departmentEmailOptions: [],
|
||||||
|
invoiceItems: [],
|
||||||
|
contractDialog: {
|
||||||
|
visible: false,
|
||||||
|
loading: false,
|
||||||
|
rows: [],
|
||||||
|
page: { current: 1, size: 10, total: 0 },
|
||||||
|
query: { contractNo: '', contractName: '' },
|
||||||
|
},
|
||||||
invoiceDialog: {
|
invoiceDialog: {
|
||||||
visible: false,
|
visible: false,
|
||||||
},
|
},
|
||||||
settlementDialog: {
|
|
||||||
visible: false,
|
|
||||||
loading: false,
|
|
||||||
keyword: '',
|
|
||||||
rows: [],
|
|
||||||
selection: [],
|
|
||||||
},
|
|
||||||
rules: {
|
rules: {
|
||||||
invoiceNo: [{ required: true, validator: this.validateInvoice, trigger: 'change' }],
|
invoiceNo: [{ required: true, validator: this.validateInvoice, trigger: 'change' }],
|
||||||
settlementIds: [{ required: true, validator: this.validateSettlements, trigger: 'change' }],
|
contractNo: [{ required: true, validator: this.validateContract, trigger: 'change' }],
|
||||||
customerEmails: [{ validator: this.validateEmails, trigger: 'change' }],
|
customerEmails: [{ validator: this.validateEmails, trigger: 'change' }],
|
||||||
departmentEmails: [{ validator: this.validateEmails, trigger: 'change' }],
|
departmentEmails: [{ validator: this.validateEmails, trigger: 'change' }],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['permission']),
|
...mapGetters(['permission', 'userInfo']),
|
||||||
recordId() {
|
recordId() {
|
||||||
return this.$route.query.id || '';
|
return this.$route.query.id || '';
|
||||||
},
|
},
|
||||||
@@ -363,15 +356,6 @@ export default {
|
|||||||
const code = this.recordId ? 'invoice_receipt_edit' : 'invoice_receipt_add';
|
const code = this.recordId ? 'invoice_receipt_edit' : 'invoice_receipt_add';
|
||||||
return this.hasPermission(code);
|
return this.hasPermission(code);
|
||||||
},
|
},
|
||||||
settlementLabel() {
|
|
||||||
return this.form.settlements
|
|
||||||
.map(item => item.formalSettlementNo)
|
|
||||||
.filter(Boolean)
|
|
||||||
.join(',');
|
|
||||||
},
|
|
||||||
settlementIds() {
|
|
||||||
return this.form.settlements.map(item => item.formalSettlementId || item.settlementId);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initialize();
|
this.initialize();
|
||||||
@@ -419,14 +403,13 @@ export default {
|
|||||||
}
|
}
|
||||||
const data = this.unwrapData(await api.getDetail(this.recordId));
|
const data = this.unwrapData(await api.getDetail(this.recordId));
|
||||||
this.applyDetail(data);
|
this.applyDetail(data);
|
||||||
if (this.settlementIds.length) await this.loadReferenceInformation();
|
|
||||||
},
|
},
|
||||||
async loadPublicDetail() {
|
async loadPublicDetail() {
|
||||||
if (!this.recordId) return;
|
if (!this.recordId) return;
|
||||||
const data = this.unwrapData(await getMkPublicDetail('invoice-receipt', this.recordId));
|
const data = this.unwrapData(await getMkPublicDetail('invoice-receipt', this.recordId));
|
||||||
this.applyDetail(data);
|
this.applyDetail(data);
|
||||||
},
|
},
|
||||||
applyDetail(data) {
|
async applyDetail(data) {
|
||||||
this.form = {
|
this.form = {
|
||||||
...emptyForm(),
|
...emptyForm(),
|
||||||
...data,
|
...data,
|
||||||
@@ -438,6 +421,7 @@ export default {
|
|||||||
})),
|
})),
|
||||||
attachments: this.parse(data.attachmentsJson),
|
attachments: this.parse(data.attachmentsJson),
|
||||||
};
|
};
|
||||||
|
await this.loadInvoiceDetail();
|
||||||
},
|
},
|
||||||
validateInvoice(rule, value, callback) {
|
validateInvoice(rule, value, callback) {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
@@ -446,9 +430,9 @@ export default {
|
|||||||
}
|
}
|
||||||
callback();
|
callback();
|
||||||
},
|
},
|
||||||
validateSettlements(rule, value, callback) {
|
validateContract(rule, value, callback) {
|
||||||
if (!this.form.settlements.length) {
|
if (!this.form.contractNo) {
|
||||||
callback(new Error('请选择应付正式结算单'));
|
callback(new Error('请选择所属合同'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
callback();
|
callback();
|
||||||
@@ -469,7 +453,7 @@ export default {
|
|||||||
openInvoiceDialog() {
|
openInvoiceDialog() {
|
||||||
this.invoiceDialog.visible = true;
|
this.invoiceDialog.visible = true;
|
||||||
},
|
},
|
||||||
confirmInvoice(row, options = {}) {
|
async confirmInvoice(row, options = {}) {
|
||||||
const selected = row;
|
const selected = row;
|
||||||
if (!selected) {
|
if (!selected) {
|
||||||
this.$message.warning('请选择一张金蝶票据池发票');
|
this.$message.warning('请选择一张金蝶票据池发票');
|
||||||
@@ -504,92 +488,59 @@ export default {
|
|||||||
...new Set([...this.departmentEmailOptions, ...this.form.departmentEmails]),
|
...new Set([...this.departmentEmailOptions, ...this.form.departmentEmails]),
|
||||||
];
|
];
|
||||||
this.invoiceDialog.visible = false;
|
this.invoiceDialog.visible = false;
|
||||||
|
await this.loadInvoiceDetail();
|
||||||
this.$refs.formRef?.validateField('invoiceNo').catch(() => {});
|
this.$refs.formRef?.validateField('invoiceNo').catch(() => {});
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
async openSettlementDialog() {
|
// 发票明细区块:按票号带出金蝶发票明细行(A801-1 镜像,推送 A303-2 分录同源)
|
||||||
this.settlementDialog.visible = true;
|
async loadInvoiceDetail() {
|
||||||
this.settlementDialog.selection = [];
|
if (!this.form.invoiceNo) {
|
||||||
await this.loadSettlementCandidates();
|
this.invoiceItems = [];
|
||||||
await this.$nextTick();
|
return;
|
||||||
const selectedIds = new Set(this.settlementIds.map(id => String(id)));
|
|
||||||
this.settlementDialog.rows.forEach(row => {
|
|
||||||
if (selectedIds.has(String(row.id))) {
|
|
||||||
this.$refs.settlementTable?.toggleRowSelection(row, true);
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
},
|
|
||||||
async loadSettlementCandidates() {
|
|
||||||
this.settlementDialog.loading = true;
|
|
||||||
try {
|
try {
|
||||||
this.settlementDialog.rows =
|
this.invoiceItems = this.unwrapData(await api.invoiceDetailQuery(this.form.invoiceNo)) || [];
|
||||||
this.unwrapData(
|
} catch {
|
||||||
await api.getSettlementCandidates(this.settlementDialog.keyword, this.form.id)
|
this.invoiceItems = [];
|
||||||
) || [];
|
}
|
||||||
|
},
|
||||||
|
// 所属合同=承运商合同:选择后带出承办部门(结算组织=承办部门对应平台公司金蝶编码,后端派生)
|
||||||
|
openContractDialog() {
|
||||||
|
this.contractDialog.visible = true;
|
||||||
|
this.searchContracts();
|
||||||
|
},
|
||||||
|
searchContracts() {
|
||||||
|
this.contractDialog.page.current = 1;
|
||||||
|
this.loadContracts();
|
||||||
|
},
|
||||||
|
resetContractQuery() {
|
||||||
|
this.contractDialog.query = { contractNo: '', contractName: '' };
|
||||||
|
this.searchContracts();
|
||||||
|
},
|
||||||
|
async loadContracts() {
|
||||||
|
this.contractDialog.loading = true;
|
||||||
|
try {
|
||||||
|
const res = await getContractList(this.contractDialog.page.current, this.contractDialog.page.size, {
|
||||||
|
...this.contractDialog.query,
|
||||||
|
contractCategory: '承运商合同',
|
||||||
|
approvalStatuses: 'approved,change_approved',
|
||||||
|
});
|
||||||
|
const data = this.unwrapData(res) || {};
|
||||||
|
this.contractDialog.rows = data.records || [];
|
||||||
|
this.contractDialog.page.total = Number(data.total || 0);
|
||||||
} finally {
|
} finally {
|
||||||
this.settlementDialog.loading = false;
|
this.contractDialog.loading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async confirmSettlements() {
|
pickContract(row) {
|
||||||
const rows = this.settlementDialog.selection;
|
if (!row) return;
|
||||||
if (!rows.length) {
|
Object.assign(this.form, {
|
||||||
this.$message.warning('请至少选择一张应付正式结算单');
|
contractNo: row.contractNo,
|
||||||
return;
|
contractName: row.contractName,
|
||||||
}
|
deptName: row.organizationName,
|
||||||
const first = rows[0];
|
});
|
||||||
const incompatible = rows.some(
|
this.contractDialog.visible = false;
|
||||||
item =>
|
this.$refs.formRef?.validateField('contractNo').catch(() => {});
|
||||||
String(item.projectId) !== String(first.projectId) ||
|
|
||||||
String(item.deptId) !== String(first.deptId) ||
|
|
||||||
item.payerName !== first.payerName ||
|
|
||||||
item.payeeName !== first.payeeName
|
|
||||||
);
|
|
||||||
if (incompatible) {
|
|
||||||
this.$message.warning('关联结算单必须属于同一项目、组织及收付款方');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const previousAmount = new Map(
|
|
||||||
this.form.settlements.map(item => [
|
|
||||||
String(item.formalSettlementId || item.settlementId),
|
|
||||||
item.allocatedInvoiceAmount,
|
|
||||||
])
|
|
||||||
);
|
|
||||||
this.form.settlements = rows.map(item => ({
|
|
||||||
...item,
|
|
||||||
formalSettlementId: item.id,
|
|
||||||
settlementId: item.id,
|
|
||||||
allocatedInvoiceAmount: previousAmount.has(String(item.id))
|
|
||||||
? Number(previousAmount.get(String(item.id)) || 0)
|
|
||||||
: rows.length === 1
|
|
||||||
? Number(item.settlementAmount || 0)
|
|
||||||
: 0,
|
|
||||||
}));
|
|
||||||
this.form.projectName = first.projectName;
|
|
||||||
this.form.deptName = first.deptName;
|
|
||||||
this.form.payerName = first.payerName;
|
|
||||||
this.form.payeeName = first.payeeName;
|
|
||||||
this.settlementDialog.visible = false;
|
|
||||||
await this.loadReferenceInformation();
|
|
||||||
this.$refs.formRef?.validateField('settlementIds').catch(() => {});
|
|
||||||
},
|
|
||||||
selectSettlement(row) {
|
|
||||||
this.$refs.settlementTable?.toggleRowSelection(row);
|
|
||||||
},
|
|
||||||
async loadReferenceInformation() {
|
|
||||||
const data = this.unwrapData(await api.getReferenceInformation(this.settlementIds.join(',')));
|
|
||||||
this.customerEmailOptions = data.customerEmails || [];
|
|
||||||
this.departmentEmailOptions = [
|
|
||||||
...new Set([...this.departmentEmailOptions, ...(data.departmentEmails || [])]),
|
|
||||||
];
|
|
||||||
if (!this.form.customerEmails.length && this.customerEmailOptions.length) {
|
|
||||||
this.form.customerEmails = [this.customerEmailOptions[0]];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
remainingAmount(row) {
|
|
||||||
return Math.max(
|
|
||||||
Number(row.settlementAmount || 0) - Number(row.receivedInvoiceAmount || 0),
|
|
||||||
0
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
openSettlementDetail(row) {
|
openSettlementDetail(row) {
|
||||||
const id = row.formalSettlementId || row.settlementId || row.id;
|
const id = row.formalSettlementId || row.settlementId || row.id;
|
||||||
@@ -602,15 +553,6 @@ export default {
|
|||||||
validateBusiness() {
|
validateBusiness() {
|
||||||
const invoiceAmount = Number(this.form.invoiceAmount || 0);
|
const invoiceAmount = Number(this.form.invoiceAmount || 0);
|
||||||
if (invoiceAmount <= 0) throw new Error('开票金额必须大于0');
|
if (invoiceAmount <= 0) throw new Error('开票金额必须大于0');
|
||||||
for (const row of this.form.settlements) {
|
|
||||||
const allocated = Number(row.allocatedInvoiceAmount);
|
|
||||||
if (!Number.isFinite(allocated) || allocated < 0) {
|
|
||||||
throw new Error('分摊发票金额必须大于或等于0');
|
|
||||||
}
|
|
||||||
if (allocated - this.remainingAmount(row) > 0.001) {
|
|
||||||
throw new Error(`结算单${row.formalSettlementNo}的累计收票金额不能超过结算总金额`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
payload() {
|
payload() {
|
||||||
return {
|
return {
|
||||||
@@ -631,10 +573,8 @@ export default {
|
|||||||
departmentEmails: this.form.departmentEmails.join(';'),
|
departmentEmails: this.form.departmentEmails.join(';'),
|
||||||
attachmentsJson: JSON.stringify(this.form.attachments || []),
|
attachmentsJson: JSON.stringify(this.form.attachments || []),
|
||||||
remark: this.form.remark,
|
remark: this.form.remark,
|
||||||
settlements: this.form.settlements.map(item => ({
|
// 所属合同仅传编号,合同名称/承办部门由后端按编号带出(结算组织=合同承办部门)
|
||||||
settlementId: item.formalSettlementId || item.settlementId,
|
contractNo: this.form.contractNo,
|
||||||
allocatedInvoiceAmount: item.allocatedInvoiceAmount,
|
|
||||||
})),
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async saveDraft() {
|
async saveDraft() {
|
||||||
@@ -663,6 +603,7 @@ export default {
|
|||||||
mkEnabled: await loadMkEnabled().catch(() => false),
|
mkEnabled: await loadMkEnabled().catch(() => false),
|
||||||
});
|
});
|
||||||
this.$message.success('提交成功');
|
this.$message.success('提交成功');
|
||||||
|
sessionStorage.setItem(invoiceReceiptListRefreshKey, '1');
|
||||||
this.goBack();
|
this.goBack();
|
||||||
},
|
},
|
||||||
async syncReferenceData() {
|
async syncReferenceData() {
|
||||||
@@ -678,8 +619,7 @@ export default {
|
|||||||
this.$message.warning('金蝶票池未查询到该发票');
|
this.$message.warning('金蝶票池未查询到该发票');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.confirmInvoice(invoice, { preserveUserInput: true })) return;
|
if (!(await this.confirmInvoice(invoice, { preserveUserInput: true }))) return;
|
||||||
if (this.settlementIds.length) await this.loadReferenceInformation();
|
|
||||||
this.$message.success('同步成功');
|
this.$message.success('同步成功');
|
||||||
},
|
},
|
||||||
goBack() {
|
goBack() {
|
||||||
@@ -688,8 +628,13 @@ export default {
|
|||||||
formatMoney(value) {
|
formatMoney(value) {
|
||||||
return Number(value || 0).toFixed(2);
|
return Number(value || 0).toFixed(2);
|
||||||
},
|
},
|
||||||
formatRate(value) {
|
formatQuantity(value) {
|
||||||
return value === null || value === undefined || value === '' ? '' : `${Number(value)}%`;
|
const number = Number(value);
|
||||||
|
return Number.isFinite(number) ? String(number) : '-';
|
||||||
|
},
|
||||||
|
formatRateText(value) {
|
||||||
|
if (value === null || value === undefined || value === '') return '-';
|
||||||
|
return `${value}%`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -738,15 +683,6 @@ export default {
|
|||||||
:global(.avue-layout--horizontal .receipt-form-page__actions) {
|
:global(.avue-layout--horizontal .receipt-form-page__actions) {
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
.receipt-form-page__dialog-search {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
gap: 8px;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
.receipt-form-page__dialog-search .el-input {
|
|
||||||
width: 360px;
|
|
||||||
}
|
|
||||||
.receipt-form-page :deep(.el-table) {
|
.receipt-form-page :deep(.el-table) {
|
||||||
--el-table-border-color: #eff1f7;
|
--el-table-border-color: #eff1f7;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,6 +119,9 @@
|
|||||||
<el-tag v-else-if="column.status" :type="statusType(row.approvalStatus)" class="status-text">
|
<el-tag v-else-if="column.status" :type="statusType(row.approvalStatus)" class="status-text">
|
||||||
{{ displayValue(row[column.prop]) }}
|
{{ displayValue(row[column.prop]) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
<el-tag v-else-if="column.kingdeeStatus" :type="kingdeePushStatusType(row.kingdeePushStatus)">
|
||||||
|
{{ displayValue(row[column.prop]) }}
|
||||||
|
</el-tag>
|
||||||
<span v-else-if="column.money">{{ formatMoney(row[column.prop]) }}</span>
|
<span v-else-if="column.money">{{ formatMoney(row[column.prop]) }}</span>
|
||||||
<span v-else>{{ displayValue(row[column.prop]) }}</span>
|
<span v-else>{{ displayValue(row[column.prop]) }}</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -222,6 +225,11 @@ import TableHeaderTools from '@/components/table-header-tools/main.vue';
|
|||||||
import organizationSearch from '@/mixins/organization-search';
|
import organizationSearch from '@/mixins/organization-search';
|
||||||
import { getMKApprovalUrl } from '@/api/system/business-process';
|
import { getMKApprovalUrl } from '@/api/system/business-process';
|
||||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
|
import { kingdeePushStatusType } from '@/utils/kingdee';
|
||||||
|
|
||||||
|
// 表单提交成功后带标记返回,keep-alive 缓存的列表页据此重新拉取
|
||||||
|
const invoiceReceiptListRefreshKey = 'invoice-receipt-list-refresh';
|
||||||
|
const invoiceReceiptListRoute = '/payment/invoice-receipt';
|
||||||
|
|
||||||
const emptyQuery = () => ({
|
const emptyQuery = () => ({
|
||||||
invoiceNo: '',
|
invoiceNo: '',
|
||||||
@@ -281,7 +289,28 @@ export default {
|
|||||||
this.mkEnabled = false;
|
this.mkEnabled = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
activated() {
|
||||||
|
this.consumeListRefreshFlag();
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route(to, from) {
|
||||||
|
if (
|
||||||
|
to.path === invoiceReceiptListRoute &&
|
||||||
|
from?.path?.includes('/invoice-receipt/form')
|
||||||
|
) {
|
||||||
|
this.consumeListRefreshFlag();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/** 表单提交成功后带标记返回时,重新拉取列表 */
|
||||||
|
consumeListRefreshFlag() {
|
||||||
|
if (!sessionStorage.getItem(invoiceReceiptListRefreshKey)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sessionStorage.removeItem(invoiceReceiptListRefreshKey);
|
||||||
|
this.loadTable();
|
||||||
|
},
|
||||||
hasPermission(code) {
|
hasPermission(code) {
|
||||||
return this.permission?.[code] !== false;
|
return this.permission?.[code] !== false;
|
||||||
},
|
},
|
||||||
@@ -455,6 +484,7 @@ export default {
|
|||||||
''
|
''
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
kingdeePushStatusType,
|
||||||
displayValue(value) {
|
displayValue(value) {
|
||||||
return value === null || value === undefined || value === '' ? '-' : value;
|
return value === null || value === undefined || value === '' ? '-' : value;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in contractOptions"
|
v-for="item in contractOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="formatContractOptionLabel(item)"
|
:label="item.contractName || item.contractNo"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -354,11 +354,23 @@
|
|||||||
><el-table-column prop="paidDate" label="付款日期" min-width="150" /><el-table-column
|
><el-table-column prop="paidDate" label="付款日期" min-width="150" /><el-table-column
|
||||||
prop="paymentNo"
|
prop="paymentNo"
|
||||||
label="付款单号"
|
label="付款单号"
|
||||||
min-width="160" /><el-table-column
|
min-width="160" /><el-table-column label="付款凭证" min-width="160"
|
||||||
prop="kingdeeBillNo"
|
><template #default="{ row }"
|
||||||
label="付款凭证"
|
><div v-if="row.voucherFileName" class="payment-form-page__invoice-actions"
|
||||||
min-width="160"
|
><el-link
|
||||||
/></el-table>
|
type="primary"
|
||||||
|
:disabled="kingdeeAttachmentBusy"
|
||||||
|
@click="viewRecordVoucher(row)"
|
||||||
|
>查看</el-link
|
||||||
|
><el-link
|
||||||
|
type="primary"
|
||||||
|
:disabled="kingdeeAttachmentBusy"
|
||||||
|
@click="downloadRecordVoucher(row)"
|
||||||
|
>下载</el-link
|
||||||
|
></div
|
||||||
|
><span v-else>-</span></template
|
||||||
|
></el-table-column
|
||||||
|
></el-table>
|
||||||
</section-card>
|
</section-card>
|
||||||
<section-card>
|
<section-card>
|
||||||
<template #title>
|
<template #title>
|
||||||
@@ -415,7 +427,8 @@
|
|||||||
><el-input
|
><el-input
|
||||||
v-model="row.description"
|
v-model="row.description"
|
||||||
:disabled="readonly"
|
:disabled="readonly"
|
||||||
maxlength="200" /></template></el-table-column
|
maxlength="200"
|
||||||
|
placeholder="请输入" /></template></el-table-column
|
||||||
><el-table-column label="文件大小" width="120"
|
><el-table-column label="文件大小" width="120"
|
||||||
><template #default="{ row }">{{
|
><template #default="{ row }">{{
|
||||||
formatAttachmentSize(row)
|
formatAttachmentSize(row)
|
||||||
@@ -732,13 +745,12 @@ import {
|
|||||||
getList as getCustomerArchiveList,
|
getList as getCustomerArchiveList,
|
||||||
} from '@/api/vehicle/customer-archive';
|
} from '@/api/vehicle/customer-archive';
|
||||||
import { readSettlementTransfer, removeSettlementTransfer } from '@/utils/settlement-transfer';
|
import { readSettlementTransfer, removeSettlementTransfer } from '@/utils/settlement-transfer';
|
||||||
import { formatContractOptionLabel } from '@/utils/contract';
|
import { downloadFile, downloadFileByUrl } from '@/utils/util';
|
||||||
import { downloadFileByUrl } from '@/utils/util';
|
|
||||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
import {
|
import {
|
||||||
downloadKingdeeInvoiceFile,
|
downloadKingdeeFile,
|
||||||
isKingdeePathAttachment,
|
requestKingdeeFile,
|
||||||
viewKingdeeInvoiceFile,
|
viewKingdeeFile,
|
||||||
} from '@/utils/kingdee-attachment';
|
} from '@/utils/kingdee-attachment';
|
||||||
import PdfPreview from '@/components/pdf-preview/main.vue';
|
import PdfPreview from '@/components/pdf-preview/main.vue';
|
||||||
|
|
||||||
@@ -883,8 +895,6 @@ export default {
|
|||||||
// 收款方 C101-1 风险查询留档:risky=高风险/黑名单,tip=后端拼装提示文案
|
// 收款方 C101-1 风险查询留档:risky=高风险/黑名单,tip=后端拼装提示文案
|
||||||
payeeRisky: false,
|
payeeRisky: false,
|
||||||
payeeRiskTip: '',
|
payeeRiskTip: '',
|
||||||
payeeRiskLevel: '',
|
|
||||||
payeeBlackStatus: '',
|
|
||||||
attachmentRuleLoading: false,
|
attachmentRuleLoading: false,
|
||||||
// 最近一次从结算单同步过来的附件 URL,切换结算单时用于整批替换
|
// 最近一次从结算单同步过来的附件 URL,切换结算单时用于整批替换
|
||||||
linkedSettlementAttachmentUrls: [],
|
linkedSettlementAttachmentUrls: [],
|
||||||
@@ -1065,14 +1075,12 @@ export default {
|
|||||||
.toUpperCase();
|
.toUpperCase();
|
||||||
return ['D', 'D级', 'E', 'E级', 'F', 'F级'].includes(level) || level.includes('高风险');
|
return ['D', 'D级', 'E', 'E级', 'F', 'F级'].includes(level) || level.includes('高风险');
|
||||||
},
|
},
|
||||||
// 高风险/黑名单收款方提示(C101-1,同合同新增页风险客商提示口径;强制拦截在后端提交校验与金蝶推送门禁)
|
// 高风险/黑名单收款方提示(C101-1,强制拦截在后端提交校验与金蝶推送门禁):
|
||||||
|
// 等级/黑名单明细以后端 riskTip 为准(黑名单=金蝶命中、等级=C101-1,统一口径),前端不再重复拼接
|
||||||
payeeRiskText() {
|
payeeRiskText() {
|
||||||
if (!this.payeeRisky) return '';
|
if (!this.payeeRisky) return '';
|
||||||
const levelMap = { 0: '低风险', 1: '中风险', 2: '高风险' };
|
|
||||||
const level = levelMap[this.payeeRiskLevel] || '未知';
|
|
||||||
const blacklist = String(this.payeeBlackStatus || '').trim().toLowerCase() === 'yes' ? '是' : '否';
|
|
||||||
const tip = this.payeeRiskTip || `收款方[${this.form.payeeName || ''}]为高风险/黑名单客商`;
|
const tip = this.payeeRiskTip || `收款方[${this.form.payeeName || ''}]为高风险/黑名单客商`;
|
||||||
return `风险等级:${level}|黑名单:${blacklist}。${tip},按集团规定不可直接付款,提交前须上传「特批附件」类型附件,审批通过后将自动发起付款特批`;
|
return `${tip},按集团规定不可直接付款,提交前须上传「特批附件」类型附件,审批通过后将自动发起付款特批`;
|
||||||
},
|
},
|
||||||
requiredAttachmentMaterials() {
|
requiredAttachmentMaterials() {
|
||||||
if (this.form.paymentType === 'project_advance') {
|
if (this.form.paymentType === 'project_advance') {
|
||||||
@@ -1107,6 +1115,8 @@ export default {
|
|||||||
);
|
);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.amountSyncing = false;
|
this.amountSyncing = false;
|
||||||
|
// 程序化赋值不触发校验,需手动重校验以清除/刷新残留错误
|
||||||
|
this.$refs.formRef?.validateField?.('appliedAmount').catch(() => {});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
'form.appliedAmount'(value) {
|
'form.appliedAmount'(value) {
|
||||||
@@ -1136,6 +1146,7 @@ export default {
|
|||||||
);
|
);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.amountSyncing = false;
|
this.amountSyncing = false;
|
||||||
|
this.$refs.formRef?.validateField?.('appliedAmount').catch(() => {});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -1144,7 +1155,6 @@ export default {
|
|||||||
this.initialize();
|
this.initialize();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatContractOptionLabel,
|
|
||||||
hasPermission(code) {
|
hasPermission(code) {
|
||||||
return this.permission?.[code] !== false;
|
return this.permission?.[code] !== false;
|
||||||
},
|
},
|
||||||
@@ -1300,9 +1310,11 @@ export default {
|
|||||||
this.form = {
|
this.form = {
|
||||||
...emptyForm(),
|
...emptyForm(),
|
||||||
...data,
|
...data,
|
||||||
|
// 后端可能返回 -1 占位预付 id,统一归一为 null,防止点击结算单号误跳预付
|
||||||
|
preSettlementId: this.isValidReferenceId(data.preSettlementId) ? data.preSettlementId : null,
|
||||||
preSettlementIds: data.preSettlementIds?.length
|
preSettlementIds: data.preSettlementIds?.length
|
||||||
? data.preSettlementIds
|
? data.preSettlementIds
|
||||||
: data.preSettlementId
|
: this.isValidReferenceId(data.preSettlementId)
|
||||||
? [data.preSettlementId]
|
? [data.preSettlementId]
|
||||||
: [],
|
: [],
|
||||||
attachments: this.parse(data.attachmentsJson),
|
attachments: this.parse(data.attachmentsJson),
|
||||||
@@ -1348,9 +1360,13 @@ export default {
|
|||||||
this.form = {
|
this.form = {
|
||||||
...emptyForm(),
|
...emptyForm(),
|
||||||
...data,
|
...data,
|
||||||
|
// 后端可能返回 -1 占位预付 id,统一归一为 null,防止点击结算单号误跳预付
|
||||||
|
preSettlementId: this.isValidReferenceId(data.preSettlementId)
|
||||||
|
? data.preSettlementId
|
||||||
|
: null,
|
||||||
preSettlementIds: data.preSettlementIds?.length
|
preSettlementIds: data.preSettlementIds?.length
|
||||||
? data.preSettlementIds
|
? data.preSettlementIds
|
||||||
: data.preSettlementId
|
: this.isValidReferenceId(data.preSettlementId)
|
||||||
? [data.preSettlementId]
|
? [data.preSettlementId]
|
||||||
: [],
|
: [],
|
||||||
attachments: this.parse(data.attachmentsJson),
|
attachments: this.parse(data.attachmentsJson),
|
||||||
@@ -1591,17 +1607,22 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
clearFormalReferenceWhenPreOnly() {
|
clearFormalReferenceWhenPreOnly() {
|
||||||
|
// 纯预付引用才收敛为预付;-1 占位 id 不得充当预付关联
|
||||||
const progressAdvance = this.form.paymentType === 'progress_advance';
|
const progressAdvance = this.form.paymentType === 'progress_advance';
|
||||||
const onlyPre =
|
const onlyPre =
|
||||||
progressAdvance ||
|
progressAdvance ||
|
||||||
(this.referenceRows.length > 0 &&
|
(this.referenceRows.length > 0 &&
|
||||||
this.referenceRows.every(item => item.referenceType === 'pre'));
|
this.referenceRows.every(item => item.referenceType === 'pre'));
|
||||||
if (!onlyPre) return;
|
if (!onlyPre) return;
|
||||||
if (!this.form.preSettlementId) {
|
if (!this.isValidReferenceId(this.form.preSettlementId)) {
|
||||||
const preId =
|
const preId =
|
||||||
this.referenceRows.find(item => item.referenceType === 'pre')?.id ||
|
this.referenceRows.find(
|
||||||
(progressAdvance ? this.form.settlementId : null);
|
item => item.referenceType === 'pre' && this.isValidReferenceId(item.id)
|
||||||
if (preId) {
|
)?.id ||
|
||||||
|
(progressAdvance && this.isValidReferenceId(this.form.settlementId)
|
||||||
|
? this.form.settlementId
|
||||||
|
: null);
|
||||||
|
if (this.isValidReferenceId(preId)) {
|
||||||
this.form.preSettlementId = preId;
|
this.form.preSettlementId = preId;
|
||||||
this.form.preSettlementIds = [preId];
|
this.form.preSettlementIds = [preId];
|
||||||
}
|
}
|
||||||
@@ -1612,13 +1633,16 @@ export default {
|
|||||||
},
|
},
|
||||||
restoreReferenceRows(data, fallbackRow) {
|
restoreReferenceRows(data, fallbackRow) {
|
||||||
const relations = Array.isArray(data?.settlements) ? data.settlements : [];
|
const relations = Array.isArray(data?.settlements) ? data.settlements : [];
|
||||||
|
// 行级预付/正式类型以过滤占位 id 后的关联为准,决定点击结算单号的跳转目标
|
||||||
const rows = relations
|
const rows = relations
|
||||||
.map(item => {
|
.map(item => {
|
||||||
const isPre = Boolean(item.preSettlementId || item.preSettlementNo);
|
// 后端用 -1 占位空 id,必须先过滤再判预付,否则正式结算行会被误标为预付
|
||||||
|
const preId = this.isValidReferenceId(item.preSettlementId) ? item.preSettlementId : null;
|
||||||
|
const isPre = Boolean(preId || item.preSettlementNo);
|
||||||
const settlementNo = item.preSettlementNo || item.formalSettlementNo || '';
|
const settlementNo = item.preSettlementNo || item.formalSettlementNo || '';
|
||||||
if (!settlementNo) return null;
|
if (!settlementNo) return null;
|
||||||
return {
|
return {
|
||||||
id: isPre ? item.preSettlementId || item.formalSettlementId : item.formalSettlementId,
|
id: isPre ? preId || item.formalSettlementId : item.formalSettlementId,
|
||||||
settlementNo,
|
settlementNo,
|
||||||
referenceType: isPre ? 'pre' : 'formal',
|
referenceType: isPre ? 'pre' : 'formal',
|
||||||
settlementAmount: Number(Number(item.settlementAmount || 0).toFixed(2)),
|
settlementAmount: Number(Number(item.settlementAmount || 0).toFixed(2)),
|
||||||
@@ -1646,9 +1670,10 @@ export default {
|
|||||||
},
|
},
|
||||||
createReferenceRow(row) {
|
createReferenceRow(row) {
|
||||||
const settlementAmount = Number(row.settlementAmount || 0);
|
const settlementAmount = Number(row.settlementAmount || 0);
|
||||||
|
// 后端以 -1 占位空预付 id,必须先校验否则正式结算行会被误判为预付
|
||||||
const isPre = Boolean(
|
const isPre = Boolean(
|
||||||
row.preSettlementNo ||
|
row.preSettlementNo ||
|
||||||
row.preSettlementId ||
|
this.isValidReferenceId(row.preSettlementId) ||
|
||||||
row.referenceType === 'pre' ||
|
row.referenceType === 'pre' ||
|
||||||
row.paymentType === 'progress_advance'
|
row.paymentType === 'progress_advance'
|
||||||
);
|
);
|
||||||
@@ -1888,55 +1913,80 @@ export default {
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
invoiceAttachmentUrl(row) {
|
|
||||||
return this.attachmentFileUrl(this.invoiceAttachment(row));
|
|
||||||
},
|
|
||||||
invoiceAttachmentName(row) {
|
invoiceAttachmentName(row) {
|
||||||
return (
|
return (
|
||||||
this.attachmentFileName(this.invoiceAttachment(row)) || `${row.invoiceNo || '发票'}.pdf`
|
this.attachmentFileName(this.invoiceAttachment(row)) || `${row.invoiceNo || '发票'}.pdf`
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
async viewInvoiceAttachment(row) {
|
/** 金蝶附件查看/下载互斥闸门(A801-2 拉流较慢,进行中忽略重复点击,结束自动释放) */
|
||||||
const attachment = this.invoiceAttachment(row);
|
async withKingdeeAttachmentBusy(action) {
|
||||||
// 金蝶侧附件(path 型)经后端代理 A801-2 预览,OSS 直链维持本地预览组件
|
|
||||||
if (isKingdeePathAttachment(attachment)) {
|
|
||||||
if (this.kingdeeAttachmentBusy) return;
|
if (this.kingdeeAttachmentBusy) return;
|
||||||
this.kingdeeAttachmentBusy = true;
|
this.kingdeeAttachmentBusy = true;
|
||||||
try {
|
try {
|
||||||
await viewKingdeeInvoiceFile(row.invoiceNo, this.invoiceAttachmentName(row));
|
await action();
|
||||||
} finally {
|
} finally {
|
||||||
this.kingdeeAttachmentBusy = false;
|
this.kingdeeAttachmentBusy = false;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
async viewInvoiceAttachment(row) {
|
||||||
|
await this.withKingdeeAttachmentBusy(async () => {
|
||||||
|
// 发票版式文件按票号走金蝶票池(A801-2 镜像优先/实时回源),登记扫描件仅在票池无此票时兜底
|
||||||
|
try {
|
||||||
|
const blob = await requestKingdeeFile(row.invoiceNo);
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
window.open(url, '_blank');
|
||||||
|
// 延迟释放 objectURL:立即回收可能导致新窗口尚未加载完成即失效
|
||||||
|
setTimeout(() => URL.revokeObjectURL(url), 60000);
|
||||||
return;
|
return;
|
||||||
|
} catch (error) {
|
||||||
|
// 网络级失败(silent,拦截器已提示)不再回退;票池无此票回退登记附件
|
||||||
|
if (error?.silent) return;
|
||||||
}
|
}
|
||||||
|
const attachment = this.invoiceAttachment(row);
|
||||||
if (!this.attachmentFileUrl(attachment)) {
|
if (!this.attachmentFileUrl(attachment)) {
|
||||||
this.$message.warning('当前发票暂无可查看附件');
|
this.$message.warning('当前发票没有金蝶版式文件,也没有登记附件');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.previewAttachment(
|
this.previewAttachment(
|
||||||
{ ...attachment, name: this.invoiceAttachmentName(row) },
|
{ ...attachment, name: this.invoiceAttachmentName(row) },
|
||||||
[attachment]
|
[attachment]
|
||||||
);
|
);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
async downloadInvoiceAttachment(row) {
|
async downloadInvoiceAttachment(row) {
|
||||||
const attachment = this.invoiceAttachment(row);
|
await this.withKingdeeAttachmentBusy(async () => {
|
||||||
// 金蝶侧附件(path 型)经后端代理 A801-2 下载,OSS 直链维持前端直连下载
|
|
||||||
if (isKingdeePathAttachment(attachment)) {
|
|
||||||
if (this.kingdeeAttachmentBusy) return;
|
|
||||||
this.kingdeeAttachmentBusy = true;
|
|
||||||
try {
|
try {
|
||||||
await downloadKingdeeInvoiceFile(row.invoiceNo, this.invoiceAttachmentName(row));
|
const blob = await requestKingdeeFile(row.invoiceNo);
|
||||||
} finally {
|
downloadFile(blob, this.invoiceAttachmentName(row));
|
||||||
this.kingdeeAttachmentBusy = false;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
|
} catch (error) {
|
||||||
|
if (error?.silent) return;
|
||||||
}
|
}
|
||||||
|
const attachment = this.invoiceAttachment(row);
|
||||||
const url = this.attachmentFileUrl(attachment);
|
const url = this.attachmentFileUrl(attachment);
|
||||||
if (!url) {
|
if (!url) {
|
||||||
this.$message.warning('当前发票暂无可下载附件');
|
this.$message.warning('当前发票没有金蝶版式文件,也没有登记附件');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
downloadFileByUrl(url, this.invoiceAttachmentName(row));
|
downloadFileByUrl(url, this.invoiceAttachmentName(row));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 付款记录付款凭证(金蝶电子回单,A801-2 代理):查看=新窗口预览,下载=保存文件 */
|
||||||
|
viewRecordVoucher(row) {
|
||||||
|
return this.withKingdeeAttachmentBusy(() =>
|
||||||
|
viewKingdeeFile(
|
||||||
|
() => api.downloadRecordVoucher(row.id),
|
||||||
|
`${row.paymentNo || '付款记录'}-付款凭证.pdf`
|
||||||
|
)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
downloadRecordVoucher(row) {
|
||||||
|
return this.withKingdeeAttachmentBusy(() =>
|
||||||
|
downloadKingdeeFile(
|
||||||
|
() => api.downloadRecordVoucher(row.id),
|
||||||
|
`${row.paymentNo || '付款记录'}-付款凭证.pdf`
|
||||||
|
)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
attachmentFileName(file) {
|
attachmentFileName(file) {
|
||||||
return String(file?.originalName || file?.name || file?.fileName || '').trim();
|
return String(file?.originalName || file?.name || file?.fileName || '').trim();
|
||||||
@@ -2075,10 +2125,10 @@ export default {
|
|||||||
mergeAutomaticAttachments(
|
mergeAutomaticAttachments(
|
||||||
files,
|
files,
|
||||||
materials,
|
materials,
|
||||||
sourceName,
|
|
||||||
defaultMaterial = null,
|
defaultMaterial = null,
|
||||||
sourceKey = '',
|
sourceKey = '',
|
||||||
keepUnmatched = false
|
keepUnmatched = false,
|
||||||
|
insertIndex = -1
|
||||||
) {
|
) {
|
||||||
const existingUrls = new Set(
|
const existingUrls = new Set(
|
||||||
(this.form.attachments || []).map(file => this.attachmentFileUrl(file)).filter(Boolean)
|
(this.form.attachments || []).map(file => this.attachmentFileUrl(file)).filter(Boolean)
|
||||||
@@ -2102,35 +2152,39 @@ export default {
|
|||||||
url,
|
url,
|
||||||
link: file.link || url,
|
link: file.link || url,
|
||||||
attachmentType: material ? MATERIAL_TYPE_MAP[material.key] : 'other',
|
attachmentType: material ? MATERIAL_TYPE_MAP[material.key] : 'other',
|
||||||
description: file.description || `自动取自${sourceName}`,
|
description: file.description || '',
|
||||||
sourceImported: true,
|
sourceImported: true,
|
||||||
sourceKey: sourceKey || undefined,
|
sourceKey: sourceKey || undefined,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
if (imported.length) this.form.attachments = [...this.form.attachments, ...imported];
|
if (imported.length) {
|
||||||
|
// 回填到被替换附件的原起始位置,避免回显/切换时把用户新传附件顶到前面
|
||||||
|
const attachments = [...this.form.attachments];
|
||||||
|
const insertAt =
|
||||||
|
insertIndex >= 0 ? Math.min(insertIndex, attachments.length) : attachments.length;
|
||||||
|
attachments.splice(insertAt, 0, ...imported);
|
||||||
|
this.form.attachments = attachments;
|
||||||
|
}
|
||||||
return imported;
|
return imported;
|
||||||
},
|
},
|
||||||
/** 移除指定来源的自动关联附件(切换结算单/合同时整批替换) */
|
/** 移除指定来源的自动关联附件(切换结算单/合同时整批替换),返回首个被移除的位置 */
|
||||||
removeAutomaticAttachments(sourceKey, sourceName = '') {
|
removeAutomaticAttachments(sourceKey) {
|
||||||
const previousUrls = new Set(
|
const previousUrls = new Set(
|
||||||
sourceKey === 'settlement' ? this.linkedSettlementAttachmentUrls || [] : []
|
sourceKey === 'settlement' ? this.linkedSettlementAttachmentUrls || [] : []
|
||||||
);
|
);
|
||||||
this.form.attachments = (this.form.attachments || []).filter(file => {
|
let firstRemovedIndex = -1;
|
||||||
|
this.form.attachments = (this.form.attachments || []).filter((file, index) => {
|
||||||
const url = this.attachmentFileUrl(file);
|
const url = this.attachmentFileUrl(file);
|
||||||
if (sourceKey && file.sourceKey === sourceKey) return false;
|
const keep =
|
||||||
if (
|
!(sourceKey && file.sourceKey === sourceKey) &&
|
||||||
sourceName &&
|
!(previousUrls.size && url && previousUrls.has(url));
|
||||||
file.sourceImported &&
|
if (!keep && firstRemovedIndex === -1) firstRemovedIndex = index;
|
||||||
String(file.description || '').includes(`自动取自${sourceName}`)
|
return keep;
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (previousUrls.size && url && previousUrls.has(url)) return false;
|
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
if (sourceKey === 'settlement') {
|
if (sourceKey === 'settlement') {
|
||||||
this.linkedSettlementAttachmentUrls = [];
|
this.linkedSettlementAttachmentUrls = [];
|
||||||
}
|
}
|
||||||
|
return firstRemovedIndex;
|
||||||
},
|
},
|
||||||
/** 按当前结算单附件整批同步:先清旧关联,再写入新结算单上传的附件 */
|
/** 按当前结算单附件整批同步:先清旧关联,再写入新结算单上传的附件 */
|
||||||
syncSettlementAttachments(settlementRows = []) {
|
syncSettlementAttachments(settlementRows = []) {
|
||||||
@@ -2145,14 +2199,14 @@ export default {
|
|||||||
.map(file => this.attachmentFileUrl(file))
|
.map(file => this.attachmentFileUrl(file))
|
||||||
.filter(url => url && nextUrlSet.has(url));
|
.filter(url => url && nextUrlSet.has(url));
|
||||||
}
|
}
|
||||||
this.removeAutomaticAttachments('settlement', '结算单');
|
const removedAt = this.removeAutomaticAttachments('settlement');
|
||||||
const imported = this.mergeAutomaticAttachments(
|
const imported = this.mergeAutomaticAttachments(
|
||||||
settlementFiles,
|
settlementFiles,
|
||||||
settlementMaterials,
|
settlementMaterials,
|
||||||
'结算单',
|
|
||||||
null,
|
null,
|
||||||
'settlement',
|
'settlement',
|
||||||
true
|
true,
|
||||||
|
removedAt
|
||||||
);
|
);
|
||||||
this.linkedSettlementAttachmentUrls = imported
|
this.linkedSettlementAttachmentUrls = imported
|
||||||
.map(file => this.attachmentFileUrl(file))
|
.map(file => this.attachmentFileUrl(file))
|
||||||
@@ -2203,7 +2257,7 @@ export default {
|
|||||||
this.syncSettlementAttachments(settlementRows);
|
this.syncSettlementAttachments(settlementRows);
|
||||||
if (!this.form.contractId) {
|
if (!this.form.contractId) {
|
||||||
this.firstContractPayment = false;
|
this.firstContractPayment = false;
|
||||||
this.removeAutomaticAttachments('contract', '合同');
|
this.removeAutomaticAttachments('contract');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const contractResponse = await getContractDetail(this.form.contractId);
|
const contractResponse = await getContractDetail(this.form.contractId);
|
||||||
@@ -2215,13 +2269,14 @@ export default {
|
|||||||
this.contractSignatureFileAvailable = contractFiles.some(file =>
|
this.contractSignatureFileAvailable = contractFiles.some(file =>
|
||||||
Boolean(this.attachmentFileUrl(file))
|
Boolean(this.attachmentFileUrl(file))
|
||||||
);
|
);
|
||||||
this.removeAutomaticAttachments('contract', '合同');
|
const contractRemovedAt = this.removeAutomaticAttachments('contract');
|
||||||
this.mergeAutomaticAttachments(
|
this.mergeAutomaticAttachments(
|
||||||
contractFiles,
|
contractFiles,
|
||||||
[ATTACHMENT_MATERIALS.contract],
|
[ATTACHMENT_MATERIALS.contract],
|
||||||
'合同',
|
|
||||||
ATTACHMENT_MATERIALS.contract,
|
ATTACHMENT_MATERIALS.contract,
|
||||||
'contract'
|
'contract',
|
||||||
|
false,
|
||||||
|
contractRemovedAt
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2235,14 +2290,15 @@ export default {
|
|||||||
String(item.id || '') !== String(this.form.id || '') &&
|
String(item.id || '') !== String(this.form.id || '') &&
|
||||||
item.approvalStatus !== 'voided'
|
item.approvalStatus !== 'voided'
|
||||||
);
|
);
|
||||||
this.removeAutomaticAttachments('contract', '合同');
|
const contractRemovedAt = this.removeAutomaticAttachments('contract');
|
||||||
if (this.firstContractPayment) {
|
if (this.firstContractPayment) {
|
||||||
this.mergeAutomaticAttachments(
|
this.mergeAutomaticAttachments(
|
||||||
this.parse(contract.contractFileJson),
|
this.parse(contract.contractFileJson),
|
||||||
[ATTACHMENT_MATERIALS.contract],
|
[ATTACHMENT_MATERIALS.contract],
|
||||||
'合同',
|
|
||||||
ATTACHMENT_MATERIALS.contract,
|
ATTACHMENT_MATERIALS.contract,
|
||||||
'contract'
|
'contract',
|
||||||
|
false,
|
||||||
|
contractRemovedAt
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -2341,8 +2397,6 @@ export default {
|
|||||||
this.payeeCustomerLevel = '';
|
this.payeeCustomerLevel = '';
|
||||||
this.payeeRisky = false;
|
this.payeeRisky = false;
|
||||||
this.payeeRiskTip = '';
|
this.payeeRiskTip = '';
|
||||||
this.payeeRiskLevel = '';
|
|
||||||
this.payeeBlackStatus = '';
|
|
||||||
if (!partyBName) {
|
if (!partyBName) {
|
||||||
if (!preserveCurrentValue) this.clearReceiptAccount();
|
if (!preserveCurrentValue) this.clearReceiptAccount();
|
||||||
return;
|
return;
|
||||||
@@ -2381,8 +2435,6 @@ export default {
|
|||||||
const risk = this.unwrapData(await getCustomerRisk(detail.customerCode)) || {};
|
const risk = this.unwrapData(await getCustomerRisk(detail.customerCode)) || {};
|
||||||
this.payeeRisky = Boolean(risk.risky);
|
this.payeeRisky = Boolean(risk.risky);
|
||||||
this.payeeRiskTip = risk.riskTip || '';
|
this.payeeRiskTip = risk.riskTip || '';
|
||||||
this.payeeRiskLevel = risk.fdRiskLevel || '';
|
|
||||||
this.payeeBlackStatus = risk.fdBlackStatus || '';
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 忽略风险查询异常,提交时后端 C101-1 强校验兜底
|
// 忽略风险查询异常,提交时后端 C101-1 强校验兜底
|
||||||
}
|
}
|
||||||
@@ -2702,7 +2754,8 @@ export default {
|
|||||||
this.referenceParams('formal')
|
this.referenceParams('formal')
|
||||||
);
|
);
|
||||||
const data = this.unwrapData(response) || {};
|
const data = this.unwrapData(response) || {};
|
||||||
const records = data.records || [];
|
// 已调整的结算单为调整重推后的归档原单,金额已作废,不可再发起付款
|
||||||
|
const records = (data.records || []).filter(row => row.adjustStatus !== 'adjusted');
|
||||||
this.formalRows = await this.fillReferencePayableAmounts(records, 'settlement_payment');
|
this.formalRows = await this.fillReferencePayableAmounts(records, 'settlement_payment');
|
||||||
this.formalPage.total = Number(data.total || 0);
|
this.formalPage.total = Number(data.total || 0);
|
||||||
} finally {
|
} finally {
|
||||||
@@ -2777,23 +2830,26 @@ export default {
|
|||||||
},
|
},
|
||||||
async openSettlementDetail(row = {}) {
|
async openSettlementDetail(row = {}) {
|
||||||
const settlementNo = String(row.settlementNo || '').trim();
|
const settlementNo = String(row.settlementNo || '').trim();
|
||||||
|
// 行上 referenceType 优先;发票行等只带单号的,按单号回查引用行;都缺省才回落表单级推断
|
||||||
|
const matchedReference = this.referenceRows.find(
|
||||||
|
item => String(item.settlementNo || '').trim() === settlementNo
|
||||||
|
);
|
||||||
|
const referenceType = row.referenceType || matchedReference?.referenceType;
|
||||||
const isPre =
|
const isPre =
|
||||||
row.referenceType === 'pre' ||
|
referenceType === 'pre' ||
|
||||||
this.form.paymentType === 'progress_advance' ||
|
(!referenceType &&
|
||||||
Boolean(this.form.preSettlementId || this.form.preSettlementNo);
|
(this.form.paymentType === 'progress_advance' ||
|
||||||
|
Boolean(
|
||||||
|
this.isValidReferenceId(this.form.preSettlementId) || this.form.preSettlementNo
|
||||||
|
)));
|
||||||
let id =
|
let id =
|
||||||
row.id ||
|
row.id ||
|
||||||
row.preSettlementId ||
|
row.preSettlementId ||
|
||||||
row.settlementId ||
|
row.settlementId ||
|
||||||
|
matchedReference?.id ||
|
||||||
(isPre
|
(isPre
|
||||||
? this.form.preSettlementId || this.form.preSettlementIds?.[0]
|
? this.form.preSettlementId || this.form.preSettlementIds?.[0]
|
||||||
: this.form.settlementId || this.form.settlementIds?.[0]);
|
: this.form.settlementId || this.form.settlementIds?.[0]);
|
||||||
if (!id && settlementNo) {
|
|
||||||
const matched = this.referenceRows.find(
|
|
||||||
item => String(item.settlementNo || '').trim() === settlementNo
|
|
||||||
);
|
|
||||||
id = matched?.id;
|
|
||||||
}
|
|
||||||
if (!id && settlementNo) {
|
if (!id && settlementNo) {
|
||||||
try {
|
try {
|
||||||
const listApi = isPre ? preApi.getList : formalApi.getList;
|
const listApi = isPre ? preApi.getList : formalApi.getList;
|
||||||
@@ -3124,18 +3180,21 @@ export default {
|
|||||||
if (!target) return;
|
if (!target) return;
|
||||||
target.paymentRatio = value;
|
target.paymentRatio = value;
|
||||||
this.syncRowPayment(target, 'ratio');
|
this.syncRowPayment(target, 'ratio');
|
||||||
this.syncHeaderSettlementTotalsFromRows();
|
this.syncHeaderSettlementTotalsFromRows(true);
|
||||||
},
|
},
|
||||||
handleRowAppliedAmountChange(row, value) {
|
handleRowAppliedAmountChange(row, value) {
|
||||||
const target = this.findReferenceRow(row);
|
const target = this.findReferenceRow(row);
|
||||||
if (!target) return;
|
if (!target) return;
|
||||||
target.appliedAmount = value;
|
target.appliedAmount = value;
|
||||||
this.syncRowPayment(target, 'amount');
|
this.syncRowPayment(target, 'amount');
|
||||||
this.syncHeaderSettlementTotalsFromRows();
|
this.syncHeaderSettlementTotalsFromRows(true);
|
||||||
},
|
},
|
||||||
/** 多结算单时仅同步结算金额/可付款金额合计,申请付款金额与比例由上方独立维护 */
|
/**
|
||||||
syncHeaderSettlementTotalsFromRows() {
|
* 结算信息行合计回填付款基本信息。
|
||||||
if (this.referenceRows.length <= 1) return;
|
* @param {boolean} syncApplied 行内编辑时同步申请付款金额与比例;回显加载时保持原值,避免改写历史单据
|
||||||
|
*/
|
||||||
|
syncHeaderSettlementTotalsFromRows(syncApplied = false) {
|
||||||
|
if (!this.referenceRows.length) return;
|
||||||
const settlementAmount = this.referenceRows.reduce(
|
const settlementAmount = this.referenceRows.reduce(
|
||||||
(total, item) => total + Number(item.settlementAmount || 0),
|
(total, item) => total + Number(item.settlementAmount || 0),
|
||||||
0
|
0
|
||||||
@@ -3144,9 +3203,21 @@ export default {
|
|||||||
(total, item) => total + Number(item.payableAmount || 0),
|
(total, item) => total + Number(item.payableAmount || 0),
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
const appliedAmount = this.referenceRows.reduce(
|
||||||
|
(total, item) => total + Number(item.appliedAmount || 0),
|
||||||
|
0
|
||||||
|
);
|
||||||
this.amountSyncing = true;
|
this.amountSyncing = true;
|
||||||
this.form.settlementAmount = Number(settlementAmount.toFixed(2));
|
this.form.settlementAmount = Number(settlementAmount.toFixed(2));
|
||||||
this.form.payableAmount = Number(payableAmount.toFixed(2));
|
this.form.payableAmount = Number(payableAmount.toFixed(2));
|
||||||
|
if (syncApplied) {
|
||||||
|
this.form.appliedAmount = Number(appliedAmount.toFixed(2));
|
||||||
|
if (this.paymentAmountBase) {
|
||||||
|
this.form.paymentRatio = Number(
|
||||||
|
((appliedAmount / this.paymentAmountBase) * 100).toFixed(2)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.amountSyncing = false;
|
this.amountSyncing = false;
|
||||||
this.$refs.formRef?.validateField?.(['settlementAmount', 'appliedAmount']);
|
this.$refs.formRef?.validateField?.(['settlementAmount', 'appliedAmount']);
|
||||||
@@ -3320,6 +3391,18 @@ export default {
|
|||||||
ElMessage.warning(`${exceededRow.settlementNo || '结算单'}付款金额不能超过可付款金额`);
|
ElMessage.warning(`${exceededRow.settlementNo || '结算单'}付款金额不能超过可付款金额`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
const rowAppliedTotal = this.referenceRows.reduce(
|
||||||
|
(total, item) => total + Number(item.appliedAmount || 0),
|
||||||
|
0
|
||||||
|
);
|
||||||
|
// 金蝶按付款基本信息申请金额推单,行合计不等时预付建档分摊会与金蝶金额不一致
|
||||||
|
if (Math.abs(rowAppliedTotal - appliedAmount) > 0.005) {
|
||||||
|
this.clearMessages();
|
||||||
|
ElMessage.warning(
|
||||||
|
`结算行付款金额合计${rowAppliedTotal.toFixed(2)}与申请付款金额${appliedAmount.toFixed(2)}不一致,请调整`
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (this.form.paymentType === 'project_advance' && !this.form.projectId) {
|
if (this.form.paymentType === 'project_advance' && !this.form.projectId) {
|
||||||
this.clearMessages();
|
this.clearMessages();
|
||||||
|
|||||||
@@ -1,13 +1,61 @@
|
|||||||
<template>
|
<template>
|
||||||
<basic-container class="payment-page">
|
<basic-container class="payment-page">
|
||||||
|
<section class="payment-search">
|
||||||
|
<el-form :model="searchForm" label-position="right" label-width="88px" @submit.prevent>
|
||||||
|
<div class="payment-search__grid">
|
||||||
|
<template v-for="field in visibleSearchFields" :key="field.prop">
|
||||||
|
<el-form-item :label="field.label">
|
||||||
|
<el-date-picker
|
||||||
|
v-if="field.type === 'daterange'"
|
||||||
|
v-model="searchForm[field.prop]"
|
||||||
|
type="daterange"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
range-separator="~"
|
||||||
|
start-placeholder="年/月/日"
|
||||||
|
end-placeholder="年/月/日"
|
||||||
|
/>
|
||||||
|
<el-select
|
||||||
|
v-else-if="field.type === 'select'"
|
||||||
|
v-model="searchForm[field.prop]"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in field.options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<el-cascader
|
||||||
|
v-else-if="field.type === 'cascader'"
|
||||||
|
v-model="searchForm[field.prop]"
|
||||||
|
:options="organizationSearchTreeOptions"
|
||||||
|
:props="organizationCascaderProps"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
placeholder="请选择 所属组织"
|
||||||
|
/>
|
||||||
|
<el-input v-else v-model="searchForm[field.prop]" clearable placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<div class="payment-search__actions">
|
||||||
|
<el-button type="primary" @click="handleSearch">查询</el-button>
|
||||||
|
<el-button @click="handleReset">重置</el-button>
|
||||||
|
<el-button text :icon="searchExpanded ? ArrowUp : ArrowDown" @click="toggleSearch">
|
||||||
|
{{ searchExpanded ? '收起' : '展开' }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</section>
|
||||||
<avue-crud
|
<avue-crud
|
||||||
ref="crud"
|
ref="crud"
|
||||||
:option="option"
|
:option="option"
|
||||||
:table-loading="loading"
|
:table-loading="loading"
|
||||||
:data="rows"
|
:data="rows"
|
||||||
v-model:page="page"
|
v-model:page="page"
|
||||||
@search-change="searchChange"
|
|
||||||
@search-reset="searchReset"
|
|
||||||
@selection-change="selectionChange"
|
@selection-change="selectionChange"
|
||||||
@current-change="currentChange"
|
@current-change="currentChange"
|
||||||
@size-change="sizeChange"
|
@size-change="sizeChange"
|
||||||
@@ -68,6 +116,35 @@
|
|||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #kingdeeStatusName="{ row }">
|
||||||
|
<el-tooltip
|
||||||
|
:disabled="row.kingdeeStatus !== 'failed'"
|
||||||
|
:content="row.kingdeeFailReason || '推送金蝶失败,可点击「同步金蝶」重试'"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
|
<el-tag :type="kingdeeStatusType(row.kingdeeStatus)">{{
|
||||||
|
row.kingdeeStatusName || '-'
|
||||||
|
}}</el-tag>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #kingdeeAssignStatus="{ row }">
|
||||||
|
<el-tooltip
|
||||||
|
:disabled="row.kingdeeAssignStatus !== 'failed'"
|
||||||
|
:content="row.kingdeeAssignFailReason || '收票单指定应付失败,可在对应付款结算单查看页重新推送'"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
|
<el-tag
|
||||||
|
v-if="row.kingdeeAssignStatus"
|
||||||
|
:type="{ assigned: 'success', failed: 'danger' }[row.kingdeeAssignStatus] || 'info'"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
{{ { assigned: '已指定应付', failed: '指定失败' }[row.kingdeeAssignStatus] || '未指定' }}
|
||||||
|
</el-tag>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #menu="{ row }">
|
<template #menu="{ row }">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="hasPermission('payment_application_view')"
|
v-if="hasPermission('payment_application_view')"
|
||||||
@@ -145,12 +222,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { ArrowDown, ArrowUp } from '@element-plus/icons-vue';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import * as api from '@/api/payment/paymentApplication';
|
import * as api from '@/api/payment/paymentApplication';
|
||||||
import { paymentApplicationOption } from '@/option/payment/paymentApplication';
|
import { paymentApplicationOption } from '@/option/payment/paymentApplication';
|
||||||
import organizationSearch from '@/mixins/organization-search';
|
import organizationSearch from '@/mixins/organization-search';
|
||||||
import { getMKApprovalUrl } from '@/api/system/business-process';
|
import { getMKApprovalUrl } from '@/api/system/business-process';
|
||||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
|
import { kingdeeStatusType } from '@/utils/kingdee';
|
||||||
|
|
||||||
const paymentApplicationListRoute = '/payment/payment-application';
|
const paymentApplicationListRoute = '/payment/payment-application';
|
||||||
const paymentApplicationListRefreshKey = 'payment-application-list-refresh';
|
const paymentApplicationListRefreshKey = 'payment-application-list-refresh';
|
||||||
@@ -160,6 +239,8 @@ export default {
|
|||||||
mixins: [organizationSearch],
|
mixins: [organizationSearch],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
ArrowDown,
|
||||||
|
ArrowUp,
|
||||||
rows: [],
|
rows: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -167,6 +248,9 @@ export default {
|
|||||||
syncLoading: false,
|
syncLoading: false,
|
||||||
resultSyncing: false,
|
resultSyncing: false,
|
||||||
query: {},
|
query: {},
|
||||||
|
// 手写搜索区(与应收/应付明细同款):模型与展开状态
|
||||||
|
searchForm: {},
|
||||||
|
searchExpanded: false,
|
||||||
option: {},
|
option: {},
|
||||||
page: {
|
page: {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
@@ -179,13 +263,37 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['permission']),
|
...mapGetters(['permission']),
|
||||||
|
// 搜索字段与应收/应付明细同结构;下拉选项沿用 api 常量
|
||||||
|
searchFields() {
|
||||||
|
return [
|
||||||
|
{ label: '单据号', prop: 'paymentNo', type: 'input' },
|
||||||
|
{ label: '日期', prop: 'applyDateRange', type: 'daterange' },
|
||||||
|
{ label: '客户名称', prop: 'payeeName', type: 'input' },
|
||||||
|
{ label: '项目名称', prop: 'projectName', type: 'input' },
|
||||||
|
{ label: '所属组织', prop: 'deptName', type: 'cascader' },
|
||||||
|
{ label: '关联结算单', prop: 'settlementNo', type: 'input' },
|
||||||
|
{ label: '付款类型', prop: 'paymentType', type: 'select', options: api.paymentTypeOptions },
|
||||||
|
{
|
||||||
|
label: '审核状态',
|
||||||
|
prop: 'approvalStatus',
|
||||||
|
type: 'select',
|
||||||
|
options: api.approvalStatusOptions,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '金蝶单据状态',
|
||||||
|
prop: 'kingdeeStatus',
|
||||||
|
type: 'select',
|
||||||
|
options: api.kingdeeStatusOptions,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
|
// 默认折叠只展示一行 4 个条件
|
||||||
|
visibleSearchFields() {
|
||||||
|
return this.searchExpanded ? this.searchFields : this.searchFields.slice(0, 4);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.option = paymentApplicationOption({
|
this.option = paymentApplicationOption();
|
||||||
paymentTypeOptions: api.paymentTypeOptions,
|
|
||||||
approvalStatusOptions: api.approvalStatusOptions,
|
|
||||||
kingdeeStatusOptions: api.kingdeeStatusOptions,
|
|
||||||
});
|
|
||||||
this.loadOrganizationOptions();
|
this.loadOrganizationOptions();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -241,26 +349,30 @@ export default {
|
|||||||
this.$refs.crud?.toggleSelection?.();
|
this.$refs.crud?.toggleSelection?.();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
searchChange(params, done) {
|
// 搜索提交:组织级联路径转名称、日期区间拆成起止参数(与原 avue searchChange 同规则)
|
||||||
// 所属组织级联返回 id 路径数组,转成部门名称给后端
|
buildSearchParams() {
|
||||||
|
const params = { ...this.searchForm };
|
||||||
this.normalizeOrganizationSearch(params, 'deptName');
|
this.normalizeOrganizationSearch(params, 'deptName');
|
||||||
// 日期区间拆成后端需要的起止字段
|
|
||||||
const range = params.applyDateRange || [];
|
const range = params.applyDateRange || [];
|
||||||
delete params.applyDateRange;
|
delete params.applyDateRange;
|
||||||
this.query = {
|
return { ...params, applyStartDate: range[0] || '', applyEndDate: range[1] || '' };
|
||||||
...params,
|
},
|
||||||
applyStartDate: range[0] || '',
|
handleSearch() {
|
||||||
applyEndDate: range[1] || '',
|
this.query = this.buildSearchParams();
|
||||||
};
|
|
||||||
this.page.currentPage = 1;
|
this.page.currentPage = 1;
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
done();
|
|
||||||
},
|
},
|
||||||
searchReset() {
|
handleReset() {
|
||||||
|
this.searchForm = {};
|
||||||
this.query = {};
|
this.query = {};
|
||||||
this.page.currentPage = 1;
|
this.page.currentPage = 1;
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
},
|
},
|
||||||
|
toggleSearch() {
|
||||||
|
this.searchExpanded = !this.searchExpanded;
|
||||||
|
// 搜索区在 avue 外部,高度变化 avue 感知不到,手动触发表格高度重算,保证分页在一屏内
|
||||||
|
this.$nextTick(() => this.$refs.crud?.getTableHeight?.());
|
||||||
|
},
|
||||||
currentChange(currentPage) {
|
currentChange(currentPage) {
|
||||||
this.page.currentPage = currentPage;
|
this.page.currentPage = currentPage;
|
||||||
},
|
},
|
||||||
@@ -328,15 +440,17 @@ export default {
|
|||||||
this.refreshChange();
|
this.refreshChange();
|
||||||
},
|
},
|
||||||
async handleApprove(row) {
|
async handleApprove(row) {
|
||||||
// 防止重复点击:请求进行中忽略后续点击
|
// 防止重复点击:请求进行中忽略后续点击,避免重复审批和重复提示
|
||||||
if (this.approveLoading) return;
|
if (this.approveLoading) return;
|
||||||
this.approveLoading = true;
|
this.approveLoading = true;
|
||||||
const loading = this.$loading({
|
let loading = null;
|
||||||
|
try {
|
||||||
|
await this.$confirm('确认审批通过该付款申请?', '提示', { type: 'warning' });
|
||||||
|
loading = this.$loading({
|
||||||
lock: true,
|
lock: true,
|
||||||
text: '审批处理中,请稍候…',
|
text: '审批处理中,请稍候…',
|
||||||
background: 'rgba(255, 255, 255, 0.6)',
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
});
|
});
|
||||||
try {
|
|
||||||
const res = await api.approve({ id: row.id });
|
const res = await api.approve({ id: row.id });
|
||||||
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
|
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
|
||||||
if (res.data.data === false) {
|
if (res.data.data === false) {
|
||||||
@@ -346,7 +460,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.refreshChange();
|
this.refreshChange();
|
||||||
} finally {
|
} finally {
|
||||||
loading.close();
|
loading?.close();
|
||||||
this.approveLoading = false;
|
this.approveLoading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -394,6 +508,12 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.syncLoading = true;
|
this.syncLoading = true;
|
||||||
|
// 批量同步金蝶逐单串行推送耗时较长,加遮罩防重复操作(照审批通过遮罩)
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '正在批量同步金蝶,请稍候…',
|
||||||
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
|
});
|
||||||
try {
|
try {
|
||||||
const data = this.unwrapData(await api.syncKingdeeBatch(rows.map(row => row.id))) || [];
|
const data = this.unwrapData(await api.syncKingdeeBatch(rows.map(row => row.id))) || [];
|
||||||
const failedList = data.filter(item => String(item).includes('同步失败'));
|
const failedList = data.filter(item => String(item).includes('同步失败'));
|
||||||
@@ -410,6 +530,7 @@ export default {
|
|||||||
this.warnAttachmentNotUploaded(rows.map(row => row.id));
|
this.warnAttachmentNotUploaded(rows.map(row => row.id));
|
||||||
} finally {
|
} finally {
|
||||||
this.syncLoading = false;
|
this.syncLoading = false;
|
||||||
|
loading.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 附件联带同步提示:同步成功但附件未全部上传时追加 warning,重推即自动补传
|
// 附件联带同步提示:同步成功但附件未全部上传时追加 warning,重推即自动补传
|
||||||
@@ -461,6 +582,7 @@ export default {
|
|||||||
''
|
''
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
kingdeeStatusType,
|
||||||
lockTag(row) {
|
lockTag(row) {
|
||||||
if (row.kingdeeLockStatus === 'locked') {
|
if (row.kingdeeLockStatus === 'locked') {
|
||||||
return { show: true, type: 'danger', label: '金蝶锁定中', tip: '该单据已被金蝶锁定,不可编辑/作废' };
|
return { show: true, type: 'danger', label: '金蝶锁定中', tip: '该单据已被金蝶锁定,不可编辑/作废' };
|
||||||
@@ -504,6 +626,56 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
// 搜索区与应收/应付明细页(settlement-detail-page__search)同款样式
|
||||||
|
.payment-search {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
padding: 12px 12px 4px;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||||
|
|
||||||
|
:deep(.el-form-item__label) {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.payment-search__grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4, minmax(220px, 1fr));
|
||||||
|
gap: 8px 24px;
|
||||||
|
align-items: start;
|
||||||
|
|
||||||
|
:deep(.el-form-item) {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-input),
|
||||||
|
:deep(.el-select),
|
||||||
|
:deep(.el-cascader),
|
||||||
|
:deep(.el-date-editor) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.payment-search__actions {
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 8px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 1200px) {
|
||||||
|
.payment-search__grid {
|
||||||
|
grid-template-columns: repeat(2, minmax(220px, 1fr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 760px) {
|
||||||
|
.payment-search__grid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.payment-page :deep(.el-table) {
|
.payment-page :deep(.el-table) {
|
||||||
--el-table-border-color: #eff1f7;
|
--el-table-border-color: #eff1f7;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<section-card title="收款信息">
|
<section-card title="收款信息">
|
||||||
<el-row :gutter="32">
|
<el-row :gutter="32">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="认领通知单">
|
<el-form-item label="收款单号">
|
||||||
<el-input v-model="form.receiptNoticeNo" disabled />
|
<el-input v-model="form.receiptNoticeNo" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<section-card v-if="searchVisible" class="claim-record-page__search">
|
<section-card v-if="searchVisible" class="claim-record-page__search">
|
||||||
<el-form :model="query" label-position="right" label-width="88px" @submit.prevent>
|
<el-form :model="query" label-position="right" label-width="88px" @submit.prevent>
|
||||||
<div class="claim-record-page__search-grid">
|
<div class="claim-record-page__search-grid">
|
||||||
<el-form-item label="认领通知单">
|
<el-form-item label="收款单号">
|
||||||
<el-input v-model="query.receiptNoticeNo" clearable placeholder="请输入" />
|
<el-input v-model="query.receiptNoticeNo" clearable placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="对方户名">
|
<el-form-item label="对方户名">
|
||||||
@@ -56,16 +56,6 @@
|
|||||||
<el-form-item v-show="searchExpanded" label="所属组织">
|
<el-form-item v-show="searchExpanded" label="所属组织">
|
||||||
<el-input v-model="query.claimerDeptName" clearable placeholder="请输入" />
|
<el-input v-model="query.claimerDeptName" clearable placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-show="searchExpanded" label="推送状态">
|
|
||||||
<el-select v-model="query.pushStatus" clearable placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="item in pushStatusOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-show="searchExpanded" label="金蝶单据状态">
|
<el-form-item v-show="searchExpanded" label="金蝶单据状态">
|
||||||
<el-select v-model="query.kingdeeBillStatus" clearable placeholder="请选择">
|
<el-select v-model="query.kingdeeBillStatus" clearable placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -93,9 +83,6 @@
|
|||||||
|
|
||||||
<section class="claim-record-page__table-panel">
|
<section class="claim-record-page__table-panel">
|
||||||
<div class="claim-record-page__toolbar">
|
<div class="claim-record-page__toolbar">
|
||||||
<el-button :loading="refreshing" @click="handleRefreshKingdeeResult">
|
|
||||||
查询金蝶认领结果
|
|
||||||
</el-button>
|
|
||||||
<table-header-tools
|
<table-header-tools
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
v-model:visible-column-keys="visibleColumnKeys"
|
v-model:visible-column-keys="visibleColumnKeys"
|
||||||
@@ -131,11 +118,7 @@
|
|||||||
<el-table-column label="操作" width="120" fixed="right" align="center">
|
<el-table-column label="操作" width="120" fixed="right" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="
|
v-if="hasPermission('receipt_claim_record_void') && row.claimStatus === 'claimed'"
|
||||||
hasPermission('receipt_claim_record_void') &&
|
|
||||||
row.claimStatus === 'claimed' &&
|
|
||||||
row.pushStatus !== 'pushed'
|
|
||||||
"
|
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleVoid(row)"
|
@click="handleVoid(row)"
|
||||||
>作废</el-link
|
>作废</el-link
|
||||||
@@ -181,7 +164,6 @@ const emptyQuery = () => ({
|
|||||||
claimDateRange: [],
|
claimDateRange: [],
|
||||||
claimerDeptName: '',
|
claimerDeptName: '',
|
||||||
kingdeeBillStatus: '',
|
kingdeeBillStatus: '',
|
||||||
pushStatus: '',
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -195,17 +177,15 @@ export default {
|
|||||||
searchExpanded: false,
|
searchExpanded: false,
|
||||||
// 与 avue-crud 一致:搜索项数量超过 searchIndex(默认一行 4 项)时才显示“展开/收起”
|
// 与 avue-crud 一致:搜索项数量超过 searchIndex(默认一行 4 项)时才显示“展开/收起”
|
||||||
searchIndex: 4,
|
searchIndex: 4,
|
||||||
searchItemCount: 11,
|
searchItemCount: 10,
|
||||||
searchVisible: true,
|
searchVisible: true,
|
||||||
tableSize: 'default',
|
tableSize: 'default',
|
||||||
claimStatusOptions: api.claimStatusOptions,
|
claimStatusOptions: api.claimStatusOptions,
|
||||||
kingdeeBillStatusOptions: api.kingdeeBillStatusOptions,
|
kingdeeBillStatusOptions: api.kingdeeBillStatusOptions,
|
||||||
pushStatusOptions: api.pushStatusOptions,
|
|
||||||
columns: receiptClaimRecordTableColumns,
|
columns: receiptClaimRecordTableColumns,
|
||||||
visibleColumnKeys: receiptClaimRecordTableColumns.map(column => column.prop),
|
visibleColumnKeys: receiptClaimRecordTableColumns.map(column => column.prop),
|
||||||
rows: [],
|
rows: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
refreshing: false,
|
|
||||||
page: { current: 1, size: 10, total: 0 },
|
page: { current: 1, size: 10, total: 0 },
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -272,7 +252,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async handleVoid(row) {
|
async handleVoid(row) {
|
||||||
await this.$confirm(
|
await this.$confirm(
|
||||||
'作废后将回退本次认领金额,是否继续?',
|
'作废后将回退本次认领金额,并同步作废合同合规系统认领记录,是否继续?',
|
||||||
'作废认领记录',
|
'作废认领记录',
|
||||||
{ type: 'warning', confirmButtonText: '确定', cancelButtonText: '取消' }
|
{ type: 'warning', confirmButtonText: '确定', cancelButtonText: '取消' }
|
||||||
);
|
);
|
||||||
@@ -280,16 +260,6 @@ export default {
|
|||||||
this.$message.success('作废成功');
|
this.$message.success('作废成功');
|
||||||
await this.loadTable();
|
await this.loadTable();
|
||||||
},
|
},
|
||||||
async handleRefreshKingdeeResult() {
|
|
||||||
this.refreshing = true;
|
|
||||||
try {
|
|
||||||
const updated = Number(this.unwrapData(await api.queryKingdeeResult()) || 0);
|
|
||||||
this.$message.success(`金蝶认领结果回写完成,更新${updated}条`);
|
|
||||||
await this.loadTable();
|
|
||||||
} finally {
|
|
||||||
this.refreshing = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
hasPermission(code) {
|
hasPermission(code) {
|
||||||
return this.isAdmin || this.validData(this.permission?.[code], false);
|
return this.isAdmin || this.validData(this.permission?.[code], false);
|
||||||
},
|
},
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user