| | |
| | | '@element-plus/icons-vue': |
| | | specifier: 2.3.1 |
| | | version: 2.3.1(vue@3.4.31) |
| | | '@vue-office/docx': |
| | | specifier: ^1.6.3 |
| | | version: 1.6.3(vue-demi@0.14.10(vue@3.4.31))(vue@3.4.31) |
| | | '@vue-office/excel': |
| | | specifier: ^1.7.14 |
| | | version: 1.7.14(vue-demi@0.14.10(vue@3.4.31))(vue@3.4.31) |
| | | '@vueup/vue-quill': |
| | | specifier: 1.2.0 |
| | | version: 1.2.0(vue@3.4.31) |
| | | '@vueuse/core': |
| | | specifier: 10.11.0 |
| | | version: 10.11.0(vue@3.4.31) |
| | | autofit.js: |
| | | specifier: ^3.2.8 |
| | | version: 3.2.8 |
| | | axios: |
| | | specifier: 0.28.1 |
| | | version: 0.28.1 |
| | |
| | | pinia: |
| | | specifier: 2.1.7 |
| | | version: 2.1.7(vue@3.4.31) |
| | | print-js: |
| | | specifier: ^1.6.0 |
| | | version: 1.6.0 |
| | | qrcode: |
| | | specifier: ^1.5.4 |
| | | version: 1.5.4 |
| | | sortablejs: |
| | | specifier: ^1.15.6 |
| | | version: 1.15.6 |
| | |
| | | vue-cropper: |
| | | specifier: 1.1.1 |
| | | version: 1.1.1 |
| | | vue-easy-lightbox: |
| | | specifier: ^1.19.0 |
| | | version: 1.19.0(vue@3.4.31) |
| | | vue-esign: |
| | | specifier: ^1.1.4 |
| | | version: 1.1.4 |
| | | vue-router: |
| | | specifier: 4.4.0 |
| | | version: 4.4.0(vue@3.4.31) |
| | |
| | | resolution: {integrity: sha512-de6TFZYIvJwRNjmW3+gaXiZ2DaWL5D5yGmSYzkdzjBDS3W+B9JQ48oZEsmMvemqjtAFzE16DIBLqd6IQQRuG9Q==} |
| | | cpu: [arm] |
| | | os: [linux] |
| | | libc: [glibc] |
| | | |
| | | '@rollup/rollup-linux-arm-musleabihf@4.40.2': |
| | | resolution: {integrity: sha512-urjaEZubdIkacKc930hUDOfQPysezKla/O9qV+O89enqsqUmQm8Xj8O/vh0gHg4LYfv7Y7UsE3QjzLQzDYN1qg==} |
| | | cpu: [arm] |
| | | os: [linux] |
| | | libc: [musl] |
| | | |
| | | '@rollup/rollup-linux-arm64-gnu@4.40.2': |
| | | resolution: {integrity: sha512-KlE8IC0HFOC33taNt1zR8qNlBYHj31qGT1UqWqtvR/+NuCVhfufAq9fxO8BMFC22Wu0rxOwGVWxtCMvZVLmhQg==} |
| | | cpu: [arm64] |
| | | os: [linux] |
| | | libc: [glibc] |
| | | |
| | | '@rollup/rollup-linux-arm64-musl@4.40.2': |
| | | resolution: {integrity: sha512-j8CgxvfM0kbnhu4XgjnCWJQyyBOeBI1Zq91Z850aUddUmPeQvuAy6OiMdPS46gNFgy8gN1xkYyLgwLYZG3rBOg==} |
| | | cpu: [arm64] |
| | | os: [linux] |
| | | libc: [musl] |
| | | |
| | | '@rollup/rollup-linux-loongarch64-gnu@4.40.2': |
| | | resolution: {integrity: sha512-Ybc/1qUampKuRF4tQXc7G7QY9YRyeVSykfK36Y5Qc5dmrIxwFhrOzqaVTNoZygqZ1ZieSWTibfFhQ5qK8jpWxw==} |
| | | cpu: [loong64] |
| | | os: [linux] |
| | | libc: [glibc] |
| | | |
| | | '@rollup/rollup-linux-powerpc64le-gnu@4.40.2': |
| | | resolution: {integrity: sha512-3FCIrnrt03CCsZqSYAOW/k9n625pjpuMzVfeI+ZBUSDT3MVIFDSPfSUgIl9FqUftxcUXInvFah79hE1c9abD+Q==} |
| | | cpu: [ppc64] |
| | | os: [linux] |
| | | libc: [glibc] |
| | | |
| | | '@rollup/rollup-linux-riscv64-gnu@4.40.2': |
| | | resolution: {integrity: sha512-QNU7BFHEvHMp2ESSY3SozIkBPaPBDTsfVNGx3Xhv+TdvWXFGOSH2NJvhD1zKAT6AyuuErJgbdvaJhYVhVqrWTg==} |
| | | cpu: [riscv64] |
| | | os: [linux] |
| | | libc: [glibc] |
| | | |
| | | '@rollup/rollup-linux-riscv64-musl@4.40.2': |
| | | resolution: {integrity: sha512-5W6vNYkhgfh7URiXTO1E9a0cy4fSgfE4+Hl5agb/U1sa0kjOLMLC1wObxwKxecE17j0URxuTrYZZME4/VH57Hg==} |
| | | cpu: [riscv64] |
| | | os: [linux] |
| | | libc: [musl] |
| | | |
| | | '@rollup/rollup-linux-s390x-gnu@4.40.2': |
| | | resolution: {integrity: sha512-B7LKIz+0+p348JoAL4X/YxGx9zOx3sR+o6Hj15Y3aaApNfAshK8+mWZEf759DXfRLeL2vg5LYJBB7DdcleYCoQ==} |
| | | cpu: [s390x] |
| | | os: [linux] |
| | | libc: [glibc] |
| | | |
| | | '@rollup/rollup-linux-x64-gnu@4.40.2': |
| | | resolution: {integrity: sha512-lG7Xa+BmBNwpjmVUbmyKxdQJ3Q6whHjMjzQplOs5Z+Gj7mxPtWakGHqzMqNER68G67kmCX9qX57aRsW5V0VOng==} |
| | | cpu: [x64] |
| | | os: [linux] |
| | | libc: [glibc] |
| | | |
| | | '@rollup/rollup-linux-x64-musl@4.40.2': |
| | | resolution: {integrity: sha512-tD46wKHd+KJvsmije4bUskNuvWKFcTOIM9tZ/RrmIvcXnbi0YK/cKS9FzFtAm7Oxi2EhV5N2OpfFB348vSQRXA==} |
| | | cpu: [x64] |
| | | os: [linux] |
| | | libc: [musl] |
| | | |
| | | '@rollup/rollup-win32-arm64-msvc@4.40.2': |
| | | resolution: {integrity: sha512-Bjv/HG8RRWLNkXwQQemdsWw4Mg+IJ29LK+bJPW2SCzPKOUaMmPEppQlu/Fqk1d7+DX3V7JbFdbkh/NMmurT6Pg==} |
| | |
| | | vite: ^5.0.0 |
| | | vue: ^3.2.25 |
| | | |
| | | '@vue-office/docx@1.6.3': |
| | | resolution: {integrity: sha512-Cs+3CAaRBOWOiW4XAhTwwxJ0dy8cPIf6DqfNvYcD3YACiLwO4kuawLF2IAXxyijhbuOeoFsfvoVbOc16A/4bZA==} |
| | | peerDependencies: |
| | | '@vue/composition-api': ^1.7.1 |
| | | vue: ^2.0.0 || >=3.0.0 |
| | | vue-demi: ^0.14.6 |
| | | peerDependenciesMeta: |
| | | '@vue/composition-api': |
| | | optional: true |
| | | |
| | | '@vue-office/excel@1.7.14': |
| | | resolution: {integrity: sha512-pVUgt+emDQUnW7q22CfnQ+jl43mM/7IFwYzOg7lwOwPEbiVB4K4qEQf+y/bc4xGXz75w1/e3Kz3G6wAafmFBFg==} |
| | | peerDependencies: |
| | | '@vue/composition-api': ^1.7.1 |
| | | vue: ^2.0.0 || >=3.0.0 |
| | | vue-demi: ^0.14.6 |
| | | peerDependenciesMeta: |
| | | '@vue/composition-api': |
| | | optional: true |
| | | |
| | | '@vue/compiler-core@3.4.31': |
| | | resolution: {integrity: sha512-skOiodXWTV3DxfDhB4rOf3OGalpITLlgCeOwb+Y9GJpfQ8ErigdBUHomBzvG78JoVE8MJoQsb+qhZiHfKeNeEg==} |
| | | |
| | |
| | | |
| | | '@vue/compiler-dom@3.5.14': |
| | | resolution: {integrity: sha512-1aOCSqxGOea5I80U2hQJvXYpPm/aXo95xL/m/mMhgyPUsKe9jhjwWpziNAw7tYRnbz1I61rd9Mld4W9KmmRoug==} |
| | | |
| | | '@vue/compiler-sfc@2.7.16': |
| | | resolution: {integrity: sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==} |
| | | |
| | | '@vue/compiler-sfc@3.4.31': |
| | | resolution: {integrity: sha512-einJxqEw8IIJxzmnxmJBuK2usI+lJonl53foq+9etB2HAzlPjAS/wa7r0uUpXw5ByX3/0uswVSrjNb17vJm1kQ==} |
| | |
| | | engines: {node: '>= 4.5.0'} |
| | | hasBin: true |
| | | |
| | | autofit.js@3.2.8: |
| | | resolution: {integrity: sha512-albZNwDIXvcRneEDyZLW3uAIOH0cUQG/TnCGQ7jpfnL0gPn/+1ZNVRuEz3ZuzZvVkQ4HQRplGHjUeMRtPNxjLQ==} |
| | | |
| | | available-typed-arrays@1.0.7: |
| | | resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} |
| | | engines: {node: '>= 0.4'} |
| | |
| | | resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} |
| | | engines: {node: '>= 0.4'} |
| | | |
| | | camelcase@5.3.1: |
| | | resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} |
| | | engines: {node: '>=6'} |
| | | |
| | | chalk@1.1.3: |
| | | resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} |
| | | engines: {node: '>=0.10.0'} |
| | |
| | | |
| | | clipboard@2.0.11: |
| | | resolution: {integrity: sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==} |
| | | |
| | | cliui@6.0.0: |
| | | resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} |
| | | |
| | | clone@2.1.2: |
| | | resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==} |
| | |
| | | supports-color: |
| | | optional: true |
| | | |
| | | decamelize@1.2.0: |
| | | resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} |
| | | engines: {node: '>=0.10.0'} |
| | | |
| | | decode-uri-component@0.2.2: |
| | | resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} |
| | | engines: {node: '>=0.10'} |
| | |
| | | |
| | | delegate@3.2.0: |
| | | resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==} |
| | | |
| | | dijkstrajs@1.0.3: |
| | | resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==} |
| | | |
| | | dom-serializer@0.2.2: |
| | | resolution: {integrity: sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==} |
| | |
| | | resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} |
| | | engines: {node: '>=8'} |
| | | |
| | | find-up@4.1.0: |
| | | resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} |
| | | engines: {node: '>=8'} |
| | | |
| | | follow-redirects@1.15.9: |
| | | resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} |
| | | engines: {node: '>=4.0'} |
| | |
| | | fuse.js@6.6.2: |
| | | resolution: {integrity: sha512-cJaJkxCCxC8qIIcPBF9yGxY0W/tVZS3uEISDxhYIdtk8OL93pe+6Zj7LjCqVV4dzbqcriOZ+kQ/NE4RXZHsIGA==} |
| | | engines: {node: '>=10'} |
| | | |
| | | get-caller-file@2.0.5: |
| | | resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} |
| | | engines: {node: 6.* || 8.* || >= 10.*} |
| | | |
| | | get-intrinsic@1.3.0: |
| | | resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} |
| | |
| | | resolution: {integrity: sha512-WunYko2W1NcdfAFpuLUoucsgULmgDBRkdxHxWQ7mK0cQqwPiy8E1enjuRBrhLtZkB5iScJ1XIPdhVEFK8aOLSg==} |
| | | engines: {node: '>=14'} |
| | | |
| | | locate-path@5.0.0: |
| | | resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} |
| | | engines: {node: '>=8'} |
| | | |
| | | lodash-es@4.17.21: |
| | | resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} |
| | | |
| | |
| | | resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} |
| | | engines: {node: '>= 0.4'} |
| | | |
| | | p-limit@2.3.0: |
| | | resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} |
| | | engines: {node: '>=6'} |
| | | |
| | | p-locate@4.1.0: |
| | | resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} |
| | | engines: {node: '>=8'} |
| | | |
| | | p-try@2.2.0: |
| | | resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} |
| | | engines: {node: '>=6'} |
| | | |
| | | package-json-from-dist@1.0.1: |
| | | resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} |
| | | |
| | |
| | | pascalcase@0.1.1: |
| | | resolution: {integrity: sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==} |
| | | engines: {node: '>=0.10.0'} |
| | | |
| | | path-exists@4.0.0: |
| | | resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} |
| | | engines: {node: '>=8'} |
| | | |
| | | path-key@3.1.1: |
| | | resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} |
| | |
| | | pkg-types@2.1.0: |
| | | resolution: {integrity: sha512-wmJwA+8ihJixSoHKxZJRBQG1oY8Yr9pGLzRmSsNms0iNWyHHAlZCa7mmKiFR10YPZuz/2k169JiS/inOjBCZ2A==} |
| | | |
| | | pngjs@5.0.0: |
| | | resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} |
| | | engines: {node: '>=10.13.0'} |
| | | |
| | | posix-character-classes@0.1.1: |
| | | resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==} |
| | | engines: {node: '>=0.10.0'} |
| | |
| | | resolution: {integrity: sha512-spBB5sgC4cv2YcW03f/IAUN1pgDJWNWD8FzkyY4mArLUMJW+KlQhlmUdKAHQuPfb00Jl5xIfImeOsf6YL8QK7Q==} |
| | | engines: {node: '>=0.10.0'} |
| | | |
| | | prettier@2.8.8: |
| | | resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} |
| | | engines: {node: '>=10.13.0'} |
| | | hasBin: true |
| | | |
| | | print-js@1.6.0: |
| | | resolution: {integrity: sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==} |
| | | |
| | | proto-list@1.2.4: |
| | | resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} |
| | | |
| | | proxy-from-env@1.1.0: |
| | | resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} |
| | | |
| | | qrcode@1.5.4: |
| | | resolution: {integrity: sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==} |
| | | engines: {node: '>=10.13.0'} |
| | | hasBin: true |
| | | |
| | | quansync@0.2.10: |
| | | resolution: {integrity: sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==} |
| | |
| | | repeat-string@1.6.1: |
| | | resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} |
| | | engines: {node: '>=0.10'} |
| | | |
| | | require-directory@2.1.1: |
| | | resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} |
| | | engines: {node: '>=0.10.0'} |
| | | |
| | | require-main-filename@2.0.0: |
| | | resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} |
| | | |
| | | resolve-url@0.2.1: |
| | | resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} |
| | |
| | | resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==} |
| | | engines: {node: '>=10'} |
| | | hasBin: true |
| | | |
| | | set-blocking@2.0.0: |
| | | resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} |
| | | |
| | | set-function-length@1.2.2: |
| | | resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} |
| | |
| | | '@vue/composition-api': |
| | | optional: true |
| | | |
| | | vue-easy-lightbox@1.19.0: |
| | | resolution: {integrity: sha512-YxLXgjEn91UF3DuK1y8u3Pyx2sJ7a/MnBpkyrBSQkvU1glzEJASyAZ7N+5yDpmxBQDVMwCsL2VmxWGIiFrWCgA==} |
| | | engines: {node: '>=14.18.3'} |
| | | peerDependencies: |
| | | vue: ^3.0.0 |
| | | |
| | | vue-esign@1.1.4: |
| | | resolution: {integrity: sha512-7Ix5PdcyyhVfsvrT9a+yp5+36gbQ0/bpDO+QSLT58IgJ5t164PEptOy5Nslw8bZbk3n3Hc7SP5B8eXQ8X8W+OA==} |
| | | |
| | | vue-router@4.4.0: |
| | | resolution: {integrity: sha512-HB+t2p611aIZraV2aPSRNXf0Z/oLZFrlygJm+sZbdJaW6lcFqEDQwnzUBXn+DApw+/QzDU/I9TeWx9izEjTmsA==} |
| | | peerDependencies: |
| | | vue: ^3.2.0 |
| | | |
| | | vue@2.7.16: |
| | | resolution: {integrity: sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==} |
| | | deprecated: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details. |
| | | |
| | | vue@3.4.31: |
| | | resolution: {integrity: sha512-njqRrOy7W3YLAlVqSKpBebtZpDVg21FPoaq1I7f/+qqBThK9ChAIjkRWgeP6Eat+8C+iia4P3OYqpATP21BCoQ==} |
| | |
| | | resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} |
| | | engines: {node: '>= 0.4'} |
| | | |
| | | which-module@2.0.1: |
| | | resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} |
| | | |
| | | which-typed-array@1.1.19: |
| | | resolution: {integrity: sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==} |
| | | engines: {node: '>= 0.4'} |
| | |
| | | engines: {node: '>= 8'} |
| | | hasBin: true |
| | | |
| | | wrap-ansi@6.2.0: |
| | | resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} |
| | | engines: {node: '>=8'} |
| | | |
| | | wrap-ansi@7.0.0: |
| | | resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} |
| | | engines: {node: '>=10'} |
| | |
| | | wrap-ansi@8.1.0: |
| | | resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} |
| | | engines: {node: '>=12'} |
| | | |
| | | y18n@4.0.3: |
| | | resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} |
| | | |
| | | yargs-parser@18.1.3: |
| | | resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} |
| | | engines: {node: '>=6'} |
| | | |
| | | yargs@15.4.1: |
| | | resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} |
| | | engines: {node: '>=8'} |
| | | |
| | | zrender@5.6.0: |
| | | resolution: {integrity: sha512-uzgraf4njmmHAbEUxMJ8Oxg+P3fT04O+9p7gY+wJRVxo8Ge+KmYv0WJev945EH4wFuc4OY2NLXz46FZrWS9xJg==} |
| | |
| | | vite: 5.3.2(@types/node@22.15.18)(sass@1.77.5) |
| | | vue: 3.4.31 |
| | | |
| | | '@vue-office/docx@1.6.3(vue-demi@0.14.10(vue@3.4.31))(vue@3.4.31)': |
| | | dependencies: |
| | | vue: 3.4.31 |
| | | vue-demi: 0.14.10(vue@3.4.31) |
| | | |
| | | '@vue-office/excel@1.7.14(vue-demi@0.14.10(vue@3.4.31))(vue@3.4.31)': |
| | | dependencies: |
| | | vue: 3.4.31 |
| | | vue-demi: 0.14.10(vue@3.4.31) |
| | | |
| | | '@vue/compiler-core@3.4.31': |
| | | dependencies: |
| | | '@babel/parser': 7.27.2 |
| | |
| | | dependencies: |
| | | '@vue/compiler-core': 3.5.14 |
| | | '@vue/shared': 3.5.14 |
| | | |
| | | '@vue/compiler-sfc@2.7.16': |
| | | dependencies: |
| | | '@babel/parser': 7.27.2 |
| | | postcss: 8.5.3 |
| | | source-map: 0.6.1 |
| | | optionalDependencies: |
| | | prettier: 2.8.8 |
| | | |
| | | '@vue/compiler-sfc@3.4.31': |
| | | dependencies: |
| | |
| | | |
| | | atob@2.1.2: {} |
| | | |
| | | autofit.js@3.2.8: {} |
| | | |
| | | available-typed-arrays@1.0.7: |
| | | dependencies: |
| | | possible-typed-array-names: 1.1.0 |
| | |
| | | call-bind-apply-helpers: 1.0.2 |
| | | get-intrinsic: 1.3.0 |
| | | |
| | | camelcase@5.3.1: {} |
| | | |
| | | chalk@1.1.3: |
| | | dependencies: |
| | | ansi-styles: 2.2.1 |
| | |
| | | good-listener: 1.2.2 |
| | | select: 1.1.2 |
| | | tiny-emitter: 2.1.0 |
| | | |
| | | cliui@6.0.0: |
| | | dependencies: |
| | | string-width: 4.2.3 |
| | | strip-ansi: 6.0.1 |
| | | wrap-ansi: 6.2.0 |
| | | |
| | | clone@2.1.2: {} |
| | | |
| | |
| | | dependencies: |
| | | ms: 2.1.3 |
| | | |
| | | decamelize@1.2.0: {} |
| | | |
| | | decode-uri-component@0.2.2: {} |
| | | |
| | | deep-equal@1.1.2: |
| | |
| | | delayed-stream@1.0.0: {} |
| | | |
| | | delegate@3.2.0: {} |
| | | |
| | | dijkstrajs@1.0.3: {} |
| | | |
| | | dom-serializer@0.2.2: |
| | | dependencies: |
| | |
| | | dependencies: |
| | | to-regex-range: 5.0.1 |
| | | |
| | | find-up@4.1.0: |
| | | dependencies: |
| | | locate-path: 5.0.0 |
| | | path-exists: 4.0.0 |
| | | |
| | | follow-redirects@1.15.9: {} |
| | | |
| | | for-each@0.3.5: |
| | |
| | | functions-have-names@1.2.3: {} |
| | | |
| | | fuse.js@6.6.2: {} |
| | | |
| | | get-caller-file@2.0.5: {} |
| | | |
| | | get-intrinsic@1.3.0: |
| | | dependencies: |
| | |
| | | pkg-types: 2.1.0 |
| | | quansync: 0.2.10 |
| | | |
| | | locate-path@5.0.0: |
| | | dependencies: |
| | | p-locate: 4.1.0 |
| | | |
| | | lodash-es@4.17.21: {} |
| | | |
| | | lodash-unified@1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.17.21)(lodash@4.17.21): |
| | |
| | | object-keys: 1.1.1 |
| | | safe-push-apply: 1.0.0 |
| | | |
| | | p-limit@2.3.0: |
| | | dependencies: |
| | | p-try: 2.2.0 |
| | | |
| | | p-locate@4.1.0: |
| | | dependencies: |
| | | p-limit: 2.3.0 |
| | | |
| | | p-try@2.2.0: {} |
| | | |
| | | package-json-from-dist@1.0.1: {} |
| | | |
| | | parchment@1.1.4: {} |
| | | |
| | | pascalcase@0.1.1: {} |
| | | |
| | | path-exists@4.0.0: {} |
| | | |
| | | path-key@3.1.1: {} |
| | | |
| | |
| | | confbox: 0.2.2 |
| | | exsolve: 1.0.5 |
| | | pathe: 2.0.3 |
| | | |
| | | pngjs@5.0.0: {} |
| | | |
| | | posix-character-classes@0.1.1: {} |
| | | |
| | |
| | | posthtml-parser: 0.2.1 |
| | | posthtml-render: 1.4.0 |
| | | |
| | | prettier@2.8.8: |
| | | optional: true |
| | | |
| | | print-js@1.6.0: {} |
| | | |
| | | proto-list@1.2.4: {} |
| | | |
| | | proxy-from-env@1.1.0: {} |
| | | |
| | | qrcode@1.5.4: |
| | | dependencies: |
| | | dijkstrajs: 1.0.3 |
| | | pngjs: 5.0.0 |
| | | yargs: 15.4.1 |
| | | |
| | | quansync@0.2.10: {} |
| | | |
| | |
| | | repeat-element@1.1.4: {} |
| | | |
| | | repeat-string@1.6.1: {} |
| | | |
| | | require-directory@2.1.1: {} |
| | | |
| | | require-main-filename@2.0.0: {} |
| | | |
| | | resolve-url@0.2.1: {} |
| | | |
| | |
| | | select@1.1.2: {} |
| | | |
| | | semver@7.7.2: {} |
| | | |
| | | set-blocking@2.0.0: {} |
| | | |
| | | set-function-length@1.2.2: |
| | | dependencies: |
| | |
| | | dependencies: |
| | | vue: 3.4.31 |
| | | |
| | | vue-easy-lightbox@1.19.0(vue@3.4.31): |
| | | dependencies: |
| | | vue: 3.4.31 |
| | | |
| | | vue-esign@1.1.4: |
| | | dependencies: |
| | | vue: 2.7.16 |
| | | |
| | | vue-router@4.4.0(vue@3.4.31): |
| | | dependencies: |
| | | '@vue/devtools-api': 6.6.4 |
| | | vue: 3.4.31 |
| | | |
| | | vue@2.7.16: |
| | | dependencies: |
| | | '@vue/compiler-sfc': 2.7.16 |
| | | csstype: 3.1.3 |
| | | |
| | | vue@3.4.31: |
| | | dependencies: |
| | |
| | | is-weakmap: 2.0.2 |
| | | is-weakset: 2.0.4 |
| | | |
| | | which-module@2.0.1: {} |
| | | |
| | | which-typed-array@1.1.19: |
| | | dependencies: |
| | | available-typed-arrays: 1.0.7 |
| | |
| | | dependencies: |
| | | isexe: 2.0.0 |
| | | |
| | | wrap-ansi@6.2.0: |
| | | dependencies: |
| | | ansi-styles: 4.3.0 |
| | | string-width: 4.2.3 |
| | | strip-ansi: 6.0.1 |
| | | |
| | | wrap-ansi@7.0.0: |
| | | dependencies: |
| | | ansi-styles: 4.3.0 |
| | |
| | | string-width: 5.1.2 |
| | | strip-ansi: 7.1.0 |
| | | |
| | | y18n@4.0.3: {} |
| | | |
| | | yargs-parser@18.1.3: |
| | | dependencies: |
| | | camelcase: 5.3.1 |
| | | decamelize: 1.2.0 |
| | | |
| | | yargs@15.4.1: |
| | | dependencies: |
| | | cliui: 6.0.0 |
| | | decamelize: 1.2.0 |
| | | find-up: 4.1.0 |
| | | get-caller-file: 2.0.5 |
| | | require-directory: 2.1.1 |
| | | require-main-filename: 2.0.0 |
| | | set-blocking: 2.0.0 |
| | | string-width: 4.2.3 |
| | | which-module: 2.0.1 |
| | | y18n: 4.0.3 |
| | | yargs-parser: 18.1.3 |
| | | |
| | | zrender@5.6.0: |
| | | dependencies: |
| | | tslib: 2.3.0 |
| | |
| | | url: '/basic/customer-follow/'+id, |
| | | method: 'delete', |
| | | }) |
| | | } |
| | | |
| | | // å访æé-æ°å¢/æ´æ° |
| | | export function addReturnVisit(data) { |
| | | return request({ |
| | | url: '/basic/customer-follow/return-visit', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // è·åå访æé详æ
|
| | | export function getReturnVisit(id) { |
| | | return request({ |
| | | url: '/basic/customer-follow/return-visit/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | |
| | | url: '/afterSalesNearExpiryService/delete?ids=' + ids, |
| | | method: 'delete', |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // æ¥è¯¢ææå®¢æ·ä¿¡æ¯ |
| | | // /basic/customer/list |
| | | export function getAllCustomerList(query) { |
| | | return request({ |
| | | url: '/basic/customer/list', |
| | | method: 'get', |
| | | params: query, |
| | | }) |
| | | } |
| | | |
| | | // æ ¹æ®å®¢æ·æ¥è¯¢éå®è®¢åå· |
| | | // afterSalesService/listSalesLedger |
| | | export function getSalesLedger(query) { |
| | | return request({ |
| | | url: '/afterSalesService/listSalesLedger', |
| | | method: 'get', |
| | | params: query, |
| | | }) |
| | | } |
| | | |
| | | // æ ¹æ®éå®è®¢åå·æ¥è¯¢éå®è®¢å详æ
|
| | | // afterSalesService/count |
| | | export function getSalesLedgerDetail(query) { |
| | | return request({ |
| | | url: '/afterSalesService/count', |
| | | method: 'get', |
| | | params: query, |
| | | }) |
| | | } |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // è·åæå¡è§åå表 |
| | | // è·åçæ¬¡å表 |
| | | export function getAttendanceRules(query) { |
| | | return request({ |
| | | url: "/personalAttendanceLocationConfig/listPage", |
| | |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢æå¡è§å |
| | | // æ°å¢ç次 |
| | | export function addAttendanceRule(data) { |
| | | return request({ |
| | | url: "/personalAttendanceLocationConfig/add", |
| | |
| | | }); |
| | | } |
| | | |
| | | // æ´æ°æå¡è§å |
| | | // æ´æ°ç次 |
| | | export function updateAttendanceRule(data) { |
| | | return request({ |
| | | url: "/attendanceRules/update", |
| | |
| | | }); |
| | | } |
| | | |
| | | // å 餿å¡è§å |
| | | // å é¤ç次 |
| | | export function deleteAttendanceRule(ids) { |
| | | return request({ |
| | | url: `/personalAttendanceLocationConfig/del`, |
| | |
| | | }); |
| | | } |
| | | |
| | | // è·åå个æå¡è§å详æ
|
| | | // è·ååä¸ªçæ¬¡è¯¦æ
|
| | | export function getAttendanceRuleDetail(id) { |
| | | return request({ |
| | | url: `/attendanceRules/detail/${id}`, |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // çæ¬¡ç¸å
³æ¥å£ |
| | | |
| | | import request from "@/utils/request"; |
| | | |
| | | // 绩æç®¡ç-çæ¬¡-å页æ¥è¯¢ |
| | | export function page(query) { |
| | | return request({ |
| | | url: "/performanceShift/page", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 绩æç®¡ç-çæ¬¡-年份å页æ¥è¯¢ |
| | | export function pageYear(query) { |
| | | return request({ |
| | | url: "/performanceShift/pageYear", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 绩æç®¡ç-çæ¬¡-æç |
| | | export function add(data) { |
| | | return request({ |
| | | url: "/performanceShift/add", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 绩æç®¡ç-çæ¬¡-æ¶é´é
ç½®-æ¥è¯¢æ¶é´é
ç½®ä¿¡æ¯ |
| | | export function list(query) { |
| | | return request({ |
| | | url: "/shiftTime/list", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 绩æç®¡ç-çæ¬¡-æ¶é´é
ç½®-æ°å¢ |
| | | export function shiftAdd(data) { |
| | | return request({ |
| | | url: "/shiftTime/add", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 绩æç®¡ç-çæ¬¡-æ¶é´é
ç½®-ä¿®æ¹ |
| | | export function shiftUpdate(data) { |
| | | return request({ |
| | | url: "/shiftTime/update", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 绩æç®¡ç-çæ¬¡-æ¶é´é
ç½®-å é¤ |
| | | export function shiftRemove(query) { |
| | | return request({ |
| | | url: "/shiftTime/remove", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 绩æç®¡ç-çæ¬¡-å¯¼åº |
| | | export function exportFile(query) { |
| | | return request({ |
| | | url: "/performanceShift/export", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 绩æç®¡ç-çæ¬¡-å¯¼åº |
| | | export function obtainItemParameterList(query) { |
| | | return request({ |
| | | url: "/laboratoryScope/obtainItemParameterList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 绩æç®¡ç-çæ¬¡-çæ¬¡ç¶æä¿®æ¹ |
| | | export function update(data) { |
| | | return request({ |
| | | url: "/performanceShift/update", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // è·åç¨æ·å表 |
| | | // export function selectUserCondition(query) { |
| | | // return request({ |
| | | // url: "/system/newUser/selectUserCondition", |
| | | // method: "get", |
| | | // params: query, |
| | | // }); |
| | | // } |
| | | export function selectUserCondition() { |
| | | return request({ |
| | | url: '/system/user/userListNoPage', |
| | | method: 'get' |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // 社ä¼ä¿é©è®¾ç½® |
| | | import request from "@/utils/request"; |
| | | |
| | | // å页æ¥è¯¢å表 |
| | | export function socialSecurityListPage(query) { |
| | | return request({ |
| | | url: "/socialSecurity/plan/listPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢è¯¦æ
|
| | | export function socialSecurityInfo(id) { |
| | | return request({ |
| | | url: "/socialSecurity/plan/" + id, |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢ |
| | | export function socialSecurityAdd(data) { |
| | | return request({ |
| | | url: "/socialSecurity/plan/add", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function socialSecurityUpdate(data) { |
| | | return request({ |
| | | url: "/socialSecurity/plan/update", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // å é¤ |
| | | export function socialSecurityDelete(ids) { |
| | | return request({ |
| | | url: "/socialSecurity/plan/delete", |
| | | method: "delete", |
| | | data: ids, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | // 项ç®è§è² |
| | | |
| | | // å页æ¥è¯¢ |
| | | export function findRoleListPage(query) { |
| | | return request({ |
| | | url: "/projectManagement/roles/listPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | export function createRole(params) { |
| | | return request({ |
| | | url: "/projectManagement/roles/add", |
| | | method: "post", |
| | | data: params, |
| | | }); |
| | | } |
| | | |
| | | export function updateRole(params) { |
| | | return request({ |
| | | url: "/projectManagement/roles/update", |
| | | method: "post", |
| | | data: params, |
| | | }); |
| | | } |
| | | |
| | | export function deleteRoles(params) { |
| | | return request({ |
| | | url: "/projectManagement/roles/delete", |
| | | method: "delete", |
| | | data: params, |
| | | }); |
| | | } |
| | |
| | | <el-form-item label="æéæ¶é´ï¼" |
| | | prop="reminderTime"> |
| | | <el-date-picker v-model="reminderForm.reminderTime" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="datetime" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | format="YYYY-MM-DD HH:mm:ss" |
| | | placeholder="è¯·éæ©æéæ¶é´" |
| | | style="width: 100%" /> |
| | | </el-form-item> |
| | |
| | | <!-- 客æ·è¯¦æ
å¯¹è¯æ¡ --> |
| | | <el-dialog title="客æ·è¯¦æ
" |
| | | v-model="detailDialogVisible" |
| | | width="800px" |
| | | width="1000px" |
| | | @close="closeDetailDialog"> |
| | | <!-- 客æ·åºæ¬ä¿¡æ¯ --> |
| | | <div class="detail-section"> |
| | |
| | | label="è·è¿æ¹å¼" |
| | | width="100" /> |
| | | <el-table-column prop="followUpLevel" |
| | | label="è·è¿ç¨åº¦" |
| | | width="120" /> |
| | | label="è·è¿ç¨åº¦" /> |
| | | <el-table-column prop="followerUserName" |
| | | label="è·è¿äºº" |
| | | width="100" /> |
| | | <el-table-column prop="content" |
| | | label="å
容" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="éä»¶" |
| | | width="100" |
| | | align="center"> |
| | | <template #default="{ row }"> |
| | | <el-button type="info" |
| | | link |
| | | size="small" |
| | | @click="openAttachmentDialog(row)"> |
| | | <el-icon> |
| | | <Paperclip /> |
| | | </el-icon> |
| | | éä»¶ |
| | | <!-- {{ row.fileList && row.fileList.length > 0 ? row.fileList.length : 'ä¸ä¼ ' }} --> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" |
| | | width="150" |
| | | align="center"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- éä»¶ä¸ä¼ å¼¹çª --> |
| | | <el-dialog title="é件管ç" |
| | | v-model="attachmentDialogVisible" |
| | | width="600px" |
| | | @close="closeAttachmentDialog"> |
| | | <div class="attachment-section"> |
| | | <div class="upload-area"> |
| | | <el-upload ref="attachmentUploadRef" |
| | | :action="getAttachmentUploadUrl()" |
| | | :headers="attachmentUploadHeaders" |
| | | :file-list="currentAttachmentList" |
| | | :on-success="handleAttachmentSuccess" |
| | | :on-error="handleAttachmentError" |
| | | :on-remove="handleAttachmentRemove" |
| | | :before-upload="beforeAttachmentUpload" |
| | | multiple |
| | | :limit="10" |
| | | name="files"> |
| | | <el-button type="primary"> |
| | | <el-icon> |
| | | <Upload /> |
| | | </el-icon> |
| | | ä¸ä¼ éä»¶ |
| | | </el-button> |
| | | <template #tip> |
| | | <div class="el-upload__tip"> |
| | | æ¯æä¸ä¼ å¾çãææ¡£çæä»¶ï¼å个æä»¶ä¸è¶
è¿50MB |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | </div> |
| | | <div v-if="currentAttachmentList.length > 0" |
| | | class="attachment-list"> |
| | | <h4>å·²ä¸ä¼ éä»¶ï¼</h4> |
| | | <el-table :data="currentAttachmentList" |
| | | border |
| | | size="small"> |
| | | <el-table-column prop="name" |
| | | label="æä»¶å" |
| | | show-overflow-tooltip /> |
| | | <el-table-column prop="size" |
| | | label="大å°" |
| | | width="100"> |
| | | <template #default="{ row }"> |
| | | {{ formatFileSize(row.size) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" |
| | | width="120" |
| | | align="center"> |
| | | <template #default="{ row, $index }"> |
| | | <el-button type="primary" |
| | | link |
| | | size="small" |
| | | @click="downloadAttachment(row)"> |
| | | ä¸è½½ |
| | | </el-button> |
| | | <el-button type="danger" |
| | | link |
| | | size="small" |
| | | @click="deleteAttachment(row, $index)"> |
| | | å é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div v-else |
| | | class="no-attachment"> |
| | | ææ éä»¶ |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="closeAttachmentDialog">å
³é</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { onMounted, ref, reactive, getCurrentInstance, toRefs } from "vue"; |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import { Search, Paperclip, Upload } from "@element-plus/icons-vue"; |
| | | import { |
| | | addCustomer, |
| | | delCustomer, |
| | |
| | | addCustomerFollow, |
| | | updateCustomerFollow, |
| | | delCustomerFollow, |
| | | addReturnVisit, |
| | | getReturnVisit, |
| | | } from "@/api/basicData/customerFile.js"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import { userListNoPage } from "@/api/system/user.js"; |
| | |
| | | // å访æéç¸å
³ |
| | | const reminderDialogVisible = ref(false); |
| | | const reminderFormRef = ref(); |
| | | const currentCustomerId = ref(); |
| | | const reminderForm = reactive({ |
| | | customerName: "", |
| | | reminderSwitch: false, |
| | |
| | | maintenanceTime: "", |
| | | }); |
| | | const negotiationRecords = ref([]); |
| | | |
| | | // éä»¶ç¸å
³ |
| | | const attachmentDialogVisible = ref(false); |
| | | const attachmentUploadRef = ref(); |
| | | const currentAttachmentList = ref([]); |
| | | const currentFollowRecord = ref({}); |
| | | const attachmentUploadHeaders = { Authorization: "Bearer " + getToken() }; |
| | | |
| | | // 卿æå»ºä¸ä¼ URL |
| | | const getAttachmentUploadUrl = () => { |
| | | const baseUrl = |
| | | import.meta.env.VITE_APP_BASE_API + "/basic/customer-follow/upload"; |
| | | return currentFollowRecord.value.id |
| | | ? `${baseUrl}/${currentFollowRecord.value.id}` |
| | | : baseUrl; |
| | | }; |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | |
| | | |
| | | // æå¼å访æéå¼¹çª |
| | | const openReminderDialog = row => { |
| | | currentCustomerId.value = row.id; |
| | | reminderForm.customerName = row.customerName; |
| | | reminderForm.reminderSwitch = false; |
| | | reminderForm.reminderContent = ""; |
| | | reminderForm.reminderTime = ""; |
| | | |
| | | // å°è¯è·åå·²æçå访æé |
| | | getReturnVisit(row.id) |
| | | .then(res => { |
| | | if (res.code === 200 && res.data) { |
| | | reminderForm.reminderSwitch = res.data.isEnabled === 1; |
| | | reminderForm.reminderContent = res.data.content; |
| | | reminderForm.reminderTime = res.data.reminderTime; |
| | | reminderForm.id = res.data.id; |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | console.error("è·åå访æé失败:", error); |
| | | }); |
| | | |
| | | reminderDialogVisible.value = true; |
| | | }; |
| | |
| | | proxy.resetForm("reminderFormRef"); |
| | | reminderDialogVisible.value = false; |
| | | }; |
| | | const submitvalue = ref({}); |
| | | |
| | | // æäº¤å访æé |
| | | const submitReminderForm = () => { |
| | | console.log("æäº¤å访æéæ°æ®:", userStore.id, userStore); |
| | | proxy.$refs.reminderFormRef.validate(valid => { |
| | | if (valid) { |
| | | // è¿éå设ä¸ä¸ªæ¥å£æ¥æäº¤å访æéæ°æ® |
| | | // å®é
项ç®ä¸éè¦æ ¹æ®å端æ¥å£è¿è¡è°æ´ |
| | | console.log("æäº¤å访æéæ°æ®:", reminderForm); |
| | | if (reminderForm.id) { |
| | | submitvalue.value = { |
| | | id: reminderForm.id, |
| | | customerId: currentCustomerId.value, |
| | | isEnabled: reminderForm.reminderSwitch ? 1 : 0, |
| | | content: reminderForm.reminderContent, |
| | | reminderTime: reminderForm.reminderTime, |
| | | remindUserId: userStore.id, |
| | | }; |
| | | } else { |
| | | submitvalue.value = { |
| | | customerId: currentCustomerId.value, |
| | | isEnabled: reminderForm.reminderSwitch ? 1 : 0, |
| | | content: reminderForm.reminderContent, |
| | | reminderTime: reminderForm.reminderTime, |
| | | remindUserId: userStore.id, |
| | | }; |
| | | } |
| | | |
| | | // æ¨¡ææ¥å£è°ç¨ |
| | | setTimeout(() => { |
| | | proxy.$modal.msgSuccess("å访æé设置æå"); |
| | | closeReminderDialog(); |
| | | }, 1000); |
| | | console.log("æäº¤å访æéæ°æ®:", submitvalue.value); |
| | | |
| | | // è°ç¨æ¥å£ |
| | | addReturnVisit(submitvalue.value) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | proxy.$modal.msgSuccess("å访æé设置æå"); |
| | | closeReminderDialog(); |
| | | } else { |
| | | proxy.$modal.msgError(res.msg || "设置失败"); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | console.error("设置å访æé失败:", error); |
| | | proxy.$modal.msgError("设置失败"); |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | |
| | | }); |
| | | }; |
| | | |
| | | // æå¼éä»¶å¼¹çª |
| | | const openAttachmentDialog = row => { |
| | | currentFollowRecord.value = row; |
| | | // 转æ¢ä¸ºç¬¦åElement Plus fileListæ ¼å¼çæ°ç» |
| | | currentAttachmentList.value = (row.fileList || []).map((file, index) => ({ |
| | | name: file.fileName, |
| | | url: file.fileUrl, |
| | | size: file.fileSize, |
| | | id: file.id, |
| | | uid: file.id || index, |
| | | status: "success", |
| | | })); |
| | | |
| | | attachmentDialogVisible.value = true; |
| | | }; |
| | | |
| | | // å
³ééä»¶å¼¹çª |
| | | const closeAttachmentDialog = () => { |
| | | attachmentDialogVisible.value = false; |
| | | currentFollowRecord.value = {}; |
| | | currentAttachmentList.value = []; |
| | | }; |
| | | |
| | | // éä»¶ä¸ä¼ æå |
| | | const handleAttachmentSuccess = (response, file, fileList) => { |
| | | if (response.code === 200) { |
| | | proxy.$modal.msgSuccess("ä¸ä¼ æå"); |
| | | // æ´æ°å½åè®°å½çéä»¶å表 |
| | | currentAttachmentList.value = fileList.map(item => ({ |
| | | name: item.name, |
| | | size: item.size, |
| | | url: item.response?.data?.url || item.url, |
| | | id: item.response?.data?.id, |
| | | uid: item.uid, |
| | | status: "success", |
| | | })); |
| | | // æ´æ°åè®°å½ä¸çfilesåæ®µ |
| | | if (currentFollowRecord.value) { |
| | | currentFollowRecord.value.files = [...currentAttachmentList.value]; |
| | | } |
| | | } else { |
| | | proxy.$modal.msgError(response.msg || "ä¸ä¼ 失败"); |
| | | } |
| | | }; |
| | | |
| | | // éä»¶ä¸ä¼ 失败 |
| | | const handleAttachmentError = (error, file, fileList) => { |
| | | console.error("ä¸ä¼ 失败:", error); |
| | | proxy.$modal.msgError("ä¸ä¼ 失败"); |
| | | }; |
| | | |
| | | // éä»¶ç§»é¤ |
| | | const handleAttachmentRemove = (file, fileList) => { |
| | | currentAttachmentList.value = fileList; |
| | | // æ´æ°åè®°å½ä¸çfilesåæ®µ |
| | | if (currentFollowRecord.value) { |
| | | currentFollowRecord.value.files = [...fileList]; |
| | | } |
| | | }; |
| | | |
| | | // éä»¶ä¸ä¼ åæ ¡éª |
| | | const beforeAttachmentUpload = file => { |
| | | const maxSize = 50 * 1024 * 1024; // 50MB |
| | | if (file.size > maxSize) { |
| | | proxy.$modal.msgError("æä»¶å¤§å°ä¸è½è¶
è¿50MB"); |
| | | return false; |
| | | } |
| | | return true; |
| | | }; |
| | | |
| | | // æ ¼å¼åæä»¶å¤§å° |
| | | const formatFileSize = size => { |
| | | if (size < 1024) { |
| | | return size + " B"; |
| | | } else if (size < 1024 * 1024) { |
| | | return (size / 1024).toFixed(2) + " KB"; |
| | | } else { |
| | | return (size / (1024 * 1024)).toFixed(2) + " MB"; |
| | | } |
| | | }; |
| | | |
| | | // ä¸è½½éä»¶ |
| | | const downloadAttachment = row => { |
| | | if (row.url) { |
| | | // proxy.download(row.url, {}, row.name); |
| | | proxy.$download.name(row.url); |
| | | } else { |
| | | proxy.$modal.msgError("ä¸è½½é¾æ¥ä¸åå¨"); |
| | | } |
| | | }; |
| | | |
| | | // å é¤éä»¶ |
| | | const deleteAttachment = (row, index) => { |
| | | ElMessageBox.confirm("ç¡®å®è¦å é¤è¿ä¸ªéä»¶åï¼", "å é¤æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | // è°ç¨å端æ¥å£å é¤éä»¶ |
| | | const deleteUrl = |
| | | import.meta.env.VITE_APP_BASE_API + |
| | | "/basic/customer-follow/file/" + |
| | | row.id; |
| | | fetch(deleteUrl, { |
| | | method: "DELETE", |
| | | headers: { |
| | | Authorization: "Bearer " + getToken(), |
| | | "Content-Type": "application/json", |
| | | }, |
| | | }) |
| | | .then(response => response.json()) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | // å 餿ååæ´æ°æ¬å°æä»¶å表 |
| | | currentAttachmentList.value.splice(index, 1); |
| | | // æ´æ°åè®°å½ä¸çfilesåæ®µ |
| | | if (currentFollowRecord.value) { |
| | | currentFollowRecord.value.files = [ |
| | | ...currentAttachmentList.value, |
| | | ]; |
| | | } |
| | | proxy.$modal.msgSuccess("å 餿å"); |
| | | } else { |
| | | proxy.$modal.msgError(res.msg || "å é¤å¤±è´¥"); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | console.error("å é¤é件失败:", error); |
| | | proxy.$modal.msgError("å é¤å¤±è´¥"); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶å é¤"); |
| | | }); |
| | | }; |
| | | |
| | | // è·åå½åæ¥æå¹¶æ ¼å¼å为 YYYY-MM-DD |
| | | function getCurrentDate() { |
| | | const today = new Date(); |
| | |
| | | color: #999; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .attachment-section { |
| | | .upload-area { |
| | | margin-bottom: 20px; |
| | | padding: 20px; |
| | | background-color: #f9f9f9; |
| | | border-radius: 4px; |
| | | border: 1px dashed #d9d9d9; |
| | | |
| | | .el-upload__tip { |
| | | margin-top: 10px; |
| | | color: #909399; |
| | | } |
| | | } |
| | | |
| | | .attachment-list { |
| | | h4 { |
| | | margin: 0 0 10px 0; |
| | | font-size: 14px; |
| | | color: #606266; |
| | | } |
| | | } |
| | | |
| | | .no-attachment { |
| | | text-align: center; |
| | | padding: 40px; |
| | | color: #909399; |
| | | font-size: 14px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="time in timeOptions" |
| | | v-for="time in startTimeOptions" |
| | | :key="time.value" |
| | | :label="time.label" |
| | | :value="time.value" |
| | |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="time in timeOptions" |
| | | v-for="time in endTimeOptions" |
| | | :key="time.value" |
| | | :label="time.label" |
| | | :value="time.value" |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref, reactive, onMounted} from 'vue' |
| | | import {ref, reactive, onMounted, computed, watch} from 'vue' |
| | | import {ElMessage} from 'element-plus' |
| | | import {Plus, Document, Promotion, Bell} from '@element-plus/icons-vue' |
| | | import {getRoomEnum, saveMeetingApplication} from '@/api/collaborativeApproval/meeting.js' |
| | |
| | | description: '' |
| | | }) |
| | | |
| | | // è¡¨åæ ¡éªè§å |
| | | const rules = { |
| | | title: [{required: true, message: '请è¾å
¥ä¼è®®ä¸»é¢', trigger: 'blur'}], |
| | | roomId: [{required: true, message: 'è¯·éæ©ä¼è®®å®¤', trigger: 'change'}], |
| | | host: [{required: true, message: '请è¾å
¥ä¸»æäºº', trigger: 'blur'}], |
| | | meetingDate: [{required: true, message: 'è¯·éæ©ä¼è®®æ¥æ', trigger: 'change'}], |
| | | startTime: [{required: true, message: 'è¯·éæ©å¼å§æ¶é´', trigger: 'change'}], |
| | | endTime: [{required: true, message: 'è¯·éæ©ç»ææ¶é´', trigger: 'change'}], |
| | | participants: [{required: true, message: 'è¯·éæ©åä¼äººå', trigger: 'change'}] |
| | | } |
| | | |
| | | // 表åå¼ç¨ |
| | | const meetingFormRef = ref(null) |
| | | |
| | |
| | | // æ¶é´é项ï¼ä»¥åå°æ¶ä¸ºé´éï¼ |
| | | const timeOptions = ref([]) |
| | | |
| | | const getTimeInMinutes = (time) => { |
| | | if (!time) return -1 |
| | | const [hour, minute] = time.split(':').map(Number) |
| | | return hour * 60 + minute |
| | | } |
| | | |
| | | const isToday = (dateText) => { |
| | | if (!dateText) return false |
| | | const [year, month, day] = dateText.split('-').map(Number) |
| | | const now = new Date() |
| | | return year === now.getFullYear() && month === now.getMonth() + 1 && day === now.getDate() |
| | | } |
| | | |
| | | const validateStartTime = (_rule, value, callback) => { |
| | | if (!value) { |
| | | callback() |
| | | return |
| | | } |
| | | |
| | | if (isToday(meetingForm.meetingDate)) { |
| | | const now = new Date() |
| | | const currentMinutes = now.getHours() * 60 + now.getMinutes() |
| | | if (getTimeInMinutes(value) > currentMinutes) { |
| | | callback(new Error('å½å¤©å¼å§æ¶é´ä¸è½æäºå½åæ¶é´')) |
| | | return |
| | | } |
| | | } |
| | | |
| | | callback() |
| | | } |
| | | |
| | | const validateEndTime = (_rule, value, callback) => { |
| | | if (!value || !meetingForm.startTime) { |
| | | callback() |
| | | return |
| | | } |
| | | |
| | | if (getTimeInMinutes(value) <= getTimeInMinutes(meetingForm.startTime)) { |
| | | callback(new Error('ç»ææ¶é´å¿
须大äºå¼å§æ¶é´')) |
| | | return |
| | | } |
| | | |
| | | callback() |
| | | } |
| | | |
| | | // è¡¨åæ ¡éªè§å |
| | | const rules = { |
| | | title: [{required: true, message: '请è¾å
¥ä¼è®®ä¸»é¢', trigger: 'blur'}], |
| | | roomId: [{required: true, message: 'è¯·éæ©ä¼è®®å®¤', trigger: 'change'}], |
| | | host: [{required: true, message: '请è¾å
¥ä¸»æäºº', trigger: 'blur'}], |
| | | meetingDate: [{required: true, message: 'è¯·éæ©ä¼è®®æ¥æ', trigger: 'change'}], |
| | | startTime: [ |
| | | {required: true, message: 'è¯·éæ©å¼å§æ¶é´', trigger: 'change'}, |
| | | {validator: validateStartTime, trigger: 'change'} |
| | | ], |
| | | endTime: [ |
| | | {required: true, message: 'è¯·éæ©ç»ææ¶é´', trigger: 'change'}, |
| | | {validator: validateEndTime, trigger: 'change'} |
| | | ], |
| | | participants: [{required: true, message: 'è¯·éæ©åä¼äººå', trigger: 'change'}] |
| | | } |
| | | |
| | | const startTimeOptions = computed(() => { |
| | | if (!isToday(meetingForm.meetingDate)) { |
| | | return timeOptions.value |
| | | } |
| | | const now = new Date() |
| | | const currentMinutes = now.getHours() * 60 + now.getMinutes() |
| | | return timeOptions.value.filter(item => getTimeInMinutes(item.value) <= currentMinutes) |
| | | }) |
| | | |
| | | const endTimeOptions = computed(() => { |
| | | if (!meetingForm.startTime) { |
| | | return timeOptions.value |
| | | } |
| | | const startMinutes = getTimeInMinutes(meetingForm.startTime) |
| | | return timeOptions.value.filter(item => getTimeInMinutes(item.value) > startMinutes) |
| | | }) |
| | | |
| | | // åå§åæ¶é´é项 |
| | | const initTimeOptions = () => { |
| | | const options = [] |
| | | const now = new Date() |
| | | const currentHour = now.getHours() |
| | | const currentMinute = now.getMinutes() |
| | | // meetingDate æ¯ "yyyy-MM-dd" |
| | | const meetingDate = new Date(meetingForm.meetingDate) |
| | | |
| | | const isSameDay = |
| | | now.getFullYear() === meetingDate.getFullYear() && |
| | | now.getMonth() === meetingDate.getMonth() && |
| | | now.getDate() === meetingDate.getDate() |
| | | |
| | | console.log('æ¯å¦åä¸å¤©:', isSameDay) |
| | | for (let hour = 8; hour <= 18; hour++) { |
| | | // å¼å§æ¶é´å¿
é¡»æäºå½åæ¶é´ |
| | | if (hour < currentHour) { |
| | | if (hour < currentHour && isSameDay) { |
| | | continue |
| | | } |
| | | if (hour === currentHour && currentMinute > 30) { |
| | | if (hour === currentHour && currentMinute > 30 && isSameDay) { |
| | | continue |
| | | } |
| | | // æ¯ä¸ªå°æ¶æ·»å 两个éé¡¹ï¼æ´ç¹ååç¹ |
| | |
| | | timeOptions.value = options |
| | | } |
| | | |
| | | watch(() => meetingForm.meetingDate, () => { |
| | | if (meetingForm.startTime && !startTimeOptions.value.some(item => item.value === meetingForm.startTime)) { |
| | | meetingForm.startTime = '' |
| | | } |
| | | if (meetingForm.endTime && !endTimeOptions.value.some(item => item.value === meetingForm.endTime)) { |
| | | meetingForm.endTime = '' |
| | | } |
| | | if (meetingForm.startTime) { |
| | | meetingFormRef.value?.validateField('startTime') |
| | | } |
| | | if (meetingForm.endTime) { |
| | | meetingFormRef.value?.validateField('endTime') |
| | | } |
| | | initTimeOptions() |
| | | }) |
| | | |
| | | watch(() => meetingForm.startTime, () => { |
| | | if (meetingForm.endTime && getTimeInMinutes(meetingForm.endTime) <= getTimeInMinutes(meetingForm.startTime)) { |
| | | meetingForm.endTime = '' |
| | | } |
| | | if (meetingForm.endTime) { |
| | | meetingFormRef.value?.validateField('endTime') |
| | | } |
| | | |
| | | }) |
| | | |
| | | // ç¦ç¨æ¥æï¼ç¦ç¨ä»å¤©ä¹åçæ¥æï¼ |
| | | const disabledDate = (time) => { |
| | | // ç¦ç¨ä»å¤©ä¹åçæ¥æ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">å馿¥æï¼</span> |
| | | <el-date-picker |
| | | v-model="searchForm.feedbackDate" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="date" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | @change="handleQuery" |
| | | /> |
| | | <span class="search_title ml10">å¤çæ¥æï¼</span> |
| | | <el-date-picker |
| | | v-model="searchForm.disDate" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="date" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | @change="handleQuery" |
| | | /> |
| | | <span style = "margin-left: 10px;" class="search_title">å¤çç¶æï¼</span> |
| | | <el-select v-model="searchForm.status" placeholder="è¯·éæ©ç¶æ" @change="handleQuery" style="width: 140px" clearable> |
| | | <el-option label="å¾
å¤ç" :value="1"></el-option> |
| | | <el-option label="å·²å¤ç" :value="2"></el-option> |
| | | </el-select> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >æç´¢</el-button |
| | | > |
| | | <el-button @click="handleOut" style="margin-left: 10px">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="search-wrapper"> |
| | | <el-form |
| | | :model="searchForm" |
| | | class="demo-form-inline" |
| | | > |
| | | <el-row :gutter="20"> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-input |
| | | v-model="searchForm.afterSalesServiceNo" |
| | | placeholder="请è¾å
¥å·¥åç¼å·" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-select |
| | | v-model="searchForm.status" |
| | | placeholder="è¯·éæ©å·¥åç¶æ" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in workOrderStatusOptions" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-select |
| | | v-model="searchForm.urgency" |
| | | placeholder="è¯·éæ©ç´§æ¥ç¨åº¦" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in degreeOfUrgencyOptions" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-select |
| | | v-model="searchForm.serviceType" |
| | | placeholder="è¯·éæ©å®åç±»å" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in classificationOptions" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-input |
| | | v-model="searchForm.orderNo" |
| | | placeholder="请è¾å
¥éå®åå·" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | |
| | | |
| | | <!-- æé® --> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="handleQuery"> |
| | | æç´¢ |
| | | </el-button> |
| | | <el-button @click="handleReset"> |
| | | éç½® |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_list"> |
| | | <PIMTable |
| | | rowKey="id" |
| | |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | /* |
| | | post_sale_waiting_list æ°å¢çå®ååç±» |
| | | degree_of_urgency æ°å¢çç´§æ¥ç¨åº¦ |
| | | work_order_status 主页çå·¥åç¶æ |
| | | */ |
| | | const { post_sale_waiting_list, degree_of_urgency, work_order_status } = proxy.useDict( |
| | | "post_sale_waiting_list", |
| | | "degree_of_urgency", |
| | | "work_order_status", |
| | | ); |
| | | |
| | | const classificationOptions = computed(() => post_sale_waiting_list?.value || []); |
| | | const degreeOfUrgencyOptions = computed(() => degree_of_urgency?.value || []); |
| | | const workOrderStatusOptions = computed(() => work_order_status?.value || []); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "å¤çç¶æ", |
| | | prop: "status", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return "å¾
å¤ç"; |
| | | } else if (params == 2) { |
| | | return "å·²å¤ç"; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return "danger"; |
| | | } else if (params == 2) { |
| | | return "success"; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: "å馿¥æ", |
| | | prop: "feedbackDate", |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "ç»è®°äºº", |
| | | prop: "checkNickName", |
| | | }, |
| | | { |
| | | label: "客æ·åç§°", |
| | | prop: "customerName", |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: "é®é¢æè¿°", |
| | | prop: "proDesc", |
| | | width:300 |
| | | }, |
| | | { |
| | | label: "å
³èé¨é¨", |
| | | prop: "deptName", |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: "å¤ç人", |
| | | prop: "disposeNickName", |
| | | }, |
| | | { |
| | | label: "å¤çç»æ", |
| | | prop: "disRes", |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: "å¤çæ¥æ", |
| | | prop: "disDate", |
| | | width: 150, |
| | | }, |
| | | label: "å·¥åç¼å·", |
| | | prop:"afterSalesServiceNo", |
| | | width: 150, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "éå®åå·", |
| | | prop:"salesContractNo", |
| | | width: 150, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "å¤çç¶æ", |
| | | prop: "status", |
| | | dataType: "tag", |
| | | |
| | | formatData: (params) => { |
| | | if (params === 1) { |
| | | return "å¾
å¤ç"; |
| | | } else if (params === 2) { |
| | | return "å·²å¤ç"; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params === 1) { |
| | | return "danger"; |
| | | } else if (params === 2) { |
| | | return "success"; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "å馿¥æ", |
| | | prop: "feedbackDate", |
| | | width: 150, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "ç»è®°äºº", |
| | | prop: "checkNickName", |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "ç´§æ¥ç¨åº¦", |
| | | prop: "urgency", |
| | | // æ ¹æ®degreeOfUrgencyOptionsåå
¸å»èªå¨å¹é
|
| | | formatData: (params) => { |
| | | if (params) { |
| | | const item = degreeOfUrgencyOptions.value.find(item => item.value === params); |
| | | return item?.label || params; |
| | | } |
| | | return null; |
| | | }, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "å®åç±»å", |
| | | prop: "serviceType", |
| | | // æ ¹æ®classificationOptionsåå
¸å»èªå¨å¹é
|
| | | formatData: (params) => { |
| | | if (params) { |
| | | const item = classificationOptions.value.find(item => item.value === params); |
| | | return item?.label || params; |
| | | } |
| | | return null; |
| | | }, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "é®é¢æè¿°", |
| | | prop: "disRes", |
| | | width:300, |
| | | }, |
| | | { |
| | | label: "å
³èé¨é¨", |
| | | prop: "deptName", |
| | | width: 200, |
| | | align: "center" |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "æä½", |
| | |
| | | const fileListDialogVisible = ref(false) |
| | | const currentFileRow = ref(null) |
| | | |
| | | // éç½® |
| | | const handleReset = () => { |
| | | Object.keys(searchForm.value).forEach(key => { |
| | | searchForm.value[key] = "" |
| | | }) |
| | | } |
| | | |
| | | // æå¼éä»¶å¼¹æ¡ |
| | | const openFilesFormDia = async (row) => { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | .search-wrapper { |
| | | background: white; |
| | | padding: 1rem 1rem 0 1rem; |
| | | border: 8px; |
| | | border-radius: 16px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog v-model="visible" title="éæ©äº§å" width="900px" destroy-on-close :close-on-click-modal="false"> |
| | | <el-form :inline="true" :model="query" class="mb-2"> |
| | | <el-form-item label="产ååç±»"> |
| | | <el-input v-model="query.productCategory" placeholder="è¾å
¥äº§ååç±»" clearable @keyup.enter="onSearch" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="åºæ¬åä½"> |
| | | <el-input v-model="query.unit" placeholder="è¾å
¥åºæ¬åä½" clearable @keyup.enter="onSearch" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button type="primary" @click="onSearch">æç´¢</el-button> |
| | | <el-button @click="columnsDialogVisible = true">åè¡¨åæ®µ</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <!-- å表 --> |
| | | <el-table ref="tableRef" v-loading="loading" :data="tableData" height="420" highlight-current-row row-key="id" |
| | | @selection-change="handleSelectionChange" @select="handleSelect"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column type="index" label="åºå·" width="60" /> |
| | | <template v-for="column in visibleColumns" :key="column.prop"> |
| | | <el-table-column :prop="column.prop" :label="column.label" :min-width="column.minWidth" show-overflow-tooltip align="center" /> |
| | | </template> |
| | | </el-table> |
| | | |
| | | <div class="mt-3" style="margin-top: 10px;display: flex; justify-content: flex-end;"> |
| | | |
| | | |
| | | <el-pagination background layout="total, sizes, prev, pager, next, jumper" :total="total" |
| | | v-model:page-size="page.pageSize" v-model:current-page="page.pageNum" :page-sizes="[10, 20, 50, 100]" |
| | | @size-change="onPageChange" @current-change="onPageChange" /> |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <el-button type="primary" :disabled="multipleSelection.length === 0" @click="onConfirm"> |
| | | ç¡®å® |
| | | </el-button> |
| | | <el-button @click="close()">åæ¶</el-button> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <el-dialog v-model="columnsDialogVisible" title="èªå®ä¹æ¾ç¤ºå项" width="600px"> |
| | | <el-checkbox-group v-model="selectedColumns"> |
| | | <el-checkbox v-for="column in allColumns" :key="column.prop" :label="column.prop" :disabled="column.disabled"> |
| | | {{ column.label }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | <template #footer> |
| | | <el-button @click="resetColumns">æ¢å¤é»è®¤</el-button> |
| | | <el-button type="primary" @click="saveColumns">ä¿å</el-button> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { computed, onMounted, reactive, ref, watch, nextTick } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | |
| | | const props = defineProps({ |
| | | modelValue: Boolean, |
| | | single: Boolean, // æ¯å¦åªè½éæ©ä¸ä¸ªï¼é»è®¤falseï¼å¯éæ©å¤ä¸ªï¼ |
| | | products: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | selectedIds: { |
| | | type: Array, |
| | | default: () => [] |
| | | } |
| | | }); |
| | | |
| | | const emit = defineEmits(['update:modelValue', 'confirm']); |
| | | |
| | | const visible = computed({ |
| | | get: () => props.modelValue, |
| | | set: (v) => emit("update:modelValue", v), |
| | | }); |
| | | |
| | | const query = reactive({ |
| | | productName: "", |
| | | model: "", |
| | | }); |
| | | |
| | | const page = reactive({ |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | }); |
| | | |
| | | const loading = ref(false); |
| | | const tableData = ref([]); |
| | | const total = ref(0); |
| | | const multipleSelection = ref([]); |
| | | const tableRef = ref(); |
| | | |
| | | const columnsDialogVisible = ref(false); |
| | | |
| | | const allColumns = ref([ |
| | | { prop: 'productCategory', label: '产ååç±»', selected: true, disabled: false }, |
| | | { prop: 'unit', label: 'åºæ¬åä½', selected: true, disabled: false }, |
| | | ]); |
| | | |
| | | const selectedColumns = ref(allColumns.value.filter(c => c.selected).map(c => c.prop)); |
| | | |
| | | const visibleColumns = computed(() => { |
| | | return allColumns.value.filter(c => selectedColumns.value.includes(c.prop)); |
| | | }); |
| | | |
| | | const resetColumns = () => { |
| | | selectedColumns.value = allColumns.value.filter(c => c.selected).map(c => c.prop); |
| | | }; |
| | | |
| | | const saveColumns = () => { |
| | | if (selectedColumns.value.length < 1) { |
| | | ElMessage.warning("å表项æ¾ç¤ºä¸å¾å°äº1项"); |
| | | return; |
| | | } |
| | | columnsDialogVisible.value = false; |
| | | }; |
| | | |
| | | function close() { |
| | | visible.value = false; |
| | | } |
| | | |
| | | const handleSelectionChange = (val) => { |
| | | if (props.single && val.length > 1) { |
| | | // 妿éå¶ä¸ºåä¸ªéæ©ï¼åªä¿çæåä¸ä¸ªéä¸ç |
| | | const lastSelected = val[val.length - 1]; |
| | | multipleSelection.value = [lastSelected]; |
| | | // æ¸
ç©ºè¡¨æ ¼éä¸ç¶æï¼ç¶åéæ°é䏿åä¸ä¸ª |
| | | nextTick(() => { |
| | | if (tableRef.value) { |
| | | tableRef.value.clearSelection(); |
| | | tableRef.value.toggleRowSelection(lastSelected, true); |
| | | } |
| | | }); |
| | | } else { |
| | | multipleSelection.value = val; |
| | | } |
| | | } |
| | | |
| | | // å¤çåä¸ªéæ© |
| | | const handleSelect = (selection, row) => { |
| | | if (props.single) { |
| | | // 妿éå¶ä¸ºåä¸ªï¼æ¸
空å
¶ä»éæ©ï¼åªä¿çå½åè¡ |
| | | if (selection.includes(row)) { |
| | | // éä¸å½åè¡æ¶ï¼æ¸
空å
¶ä»éä¸ |
| | | multipleSelection.value = [row]; |
| | | nextTick(() => { |
| | | if (tableRef.value) { |
| | | tableData.value.forEach((item) => { |
| | | if (item.id !== row.id) { |
| | | tableRef.value.toggleRowSelection(item, false); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | function onSearch() { |
| | | page.pageNum = 1; |
| | | loadData(); |
| | | } |
| | | |
| | | function onReset() { |
| | | query.productName = ""; |
| | | query.model = ""; |
| | | page.pageNum = 1; |
| | | loadData(); |
| | | } |
| | | |
| | | function onPageChange() { |
| | | loadData(); |
| | | } |
| | | |
| | | function onConfirm() { |
| | | if (multipleSelection.value.length === 0) { |
| | | ElMessage.warning("è¯·éæ©ä¸æ¡äº§å"); |
| | | return; |
| | | } |
| | | if (props.single && multipleSelection.value.length > 1) { |
| | | ElMessage.warning("åªè½éæ©ä¸ä¸ªäº§å"); |
| | | return; |
| | | } |
| | | emit("confirm", props.single ? [multipleSelection.value[0]] : multipleSelection.value); |
| | | close(); |
| | | } |
| | | |
| | | async function loadData() { |
| | | loading.value = true; |
| | | try { |
| | | multipleSelection.value = []; // 翻页/æç´¢åæ¸
ç©ºéæ©æ´ç¬¦å颿 |
| | | |
| | | let filtered = props.products || []; |
| | | // æ¬å°æç´¢è¿æ»¤ |
| | | if (query.productName) { |
| | | filtered = filtered.filter(item => item.productName && item.productName.includes(query.productName)); |
| | | } |
| | | if (query.model) { |
| | | filtered = filtered.filter(item => item.model && item.model.includes(query.model)); |
| | | } |
| | | |
| | | total.value = filtered.length; |
| | | // å端å页 |
| | | const start = (page.pageNum - 1) * page.pageSize; |
| | | const end = start + page.pageSize; |
| | | tableData.value = filtered.slice(start, end); |
| | | |
| | | // èªå¨åæ¾éä¸ç¶æ |
| | | nextTick(() => { |
| | | if (tableRef.value) { |
| | | tableData.value.forEach(row => { |
| | | if (props.selectedIds && props.selectedIds.includes(row.id)) { |
| | | tableRef.value.toggleRowSelection(row, true); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } finally { |
| | | loading.value = false; |
| | | } |
| | | } |
| | | |
| | | // çå¬å¼¹çªæå¼ï¼éç½®éæ© |
| | | watch(() => props.modelValue, (visible) => { |
| | | if (visible) { |
| | | // æ¯æ¬¡æå¼æ¶éæ°åå§åéä¸ç¶æï¼multipleSelection ä¼éè¿ loadData ä¸çåæ¾é»è¾èªå¨æ´æ°ï¼ä½åå§é置空é¿å
éå¤ï¼ |
| | | multipleSelection.value = []; |
| | | page.pageNum = 1; |
| | | loadData(); |
| | | } |
| | | }); |
| | | |
| | | // ç嬿°æ®æºåå |
| | | watch(() => props.products, () => { |
| | | loadData(); |
| | | }, { deep: true }); |
| | | |
| | | onMounted(() => { |
| | | loadData() |
| | | }) |
| | | </script> |
| | |
| | | <div> |
| | | <el-dialog |
| | | v-model="dialogFormVisible" |
| | | title="å®åç»è®°" |
| | | width="70%" |
| | | title="æ°å¢å®åå" |
| | | width="90%" |
| | | @close="closeDia" |
| | | > |
| | | <el-form |
| | | :model="form" |
| | | label-width="140px" |
| | | label-position="top" |
| | | :rules="rules" |
| | | ref="formRef" |
| | | > |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å馿¶é´ï¼" prop="feedbackDate"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="form.feedbackDate" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="date" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»è®°äººï¼" prop="checkUserId"> |
| | | <el-select |
| | | v-model="form.checkUserId" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in userList" |
| | | :key="item.userId" |
| | | :label="item.nickName" |
| | | :value="item.userId" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="客æ·åç§°ï¼" prop="customerName"> |
| | | <el-input |
| | | v-model="form.customerName" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é®é¢æè¿°ï¼" prop="proDesc"> |
| | | <el-input |
| | | v-model="form.proDesc" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | type="textarea" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div> |
| | | <span class="descriptions">åºç¡èµæ</span> |
| | | <el-form |
| | | :model="form" |
| | | label-width="140px" |
| | | label-position="top" |
| | | :rules="rules" |
| | | ref="formRef" |
| | | > |
| | | <el-row :gutter="30"> |
| | | <el-col :span="4"> |
| | | <el-form-item label="客æ·åç§°ï¼" prop="customerName"> |
| | | <el-select |
| | | v-model="form.customerName" |
| | | filterable |
| | | @change="customerNameChange" |
| | | > |
| | | <el-option |
| | | v-for="item in customerNameOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="å®åç±»åï¼" prop="serviceType"> |
| | | <el-select |
| | | v-model="form.serviceType" |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="dict in serviceTypeOptions" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="å
³èéå®åå·ï¼" prop="salesContractNo"> |
| | | <el-select |
| | | v-model="form.salesContractNo" |
| | | @change="associatedSalesOrderNumberChange" |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in associatedSalesOrderNumberOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="ç´§æ¥ç¨åº¦ï¼" prop="urgency"> |
| | | <el-select |
| | | v-model="form.urgency" |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="dict in urgencyOptions" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="é®é¢æè¿°ï¼" prop="disRes"> |
| | | <el-input |
| | | v-model="form.disRes" |
| | | placeholder="请è¾å
¥é®é¢æè¿°" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <hr> |
| | | <div style="padding-top: 20px"> |
| | | <div style="display: flex; justify-content: space-between"> |
| | | <span class="descriptions">å
³è产å</span> |
| | | <el-button |
| | | type="primary" |
| | | style="margin-right: 12px; margin-bottom: 10px" |
| | | @click="isShowProductSelectDialog = true" |
| | | > |
| | | éæ©äº§å |
| | | </el-button> |
| | | </div> |
| | | <PIMTable |
| | | :isShowPagination="false" |
| | | rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | > |
| | | <template #shippingStatus="{ row }"> |
| | | <el-tag :type="getShippingStatusType(row)" size="small"> |
| | | {{ getShippingStatusText(row) }} |
| | | </el-tag> |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确认</el-button> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- éæ©äº§åå¼¹çª --> |
| | | <ProductSelectDialog |
| | | v-model="isShowProductSelectDialog" |
| | | :products="currentSalesOrderProducts" |
| | | :selected-ids="currentSelectedProductIds" |
| | | @confirm="handleSelectProducts" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import { ref, reactive, toRefs, getCurrentInstance, computed } from "vue"; |
| | | import ProductSelectDialog from "./ProductSelectDialog.vue"; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | | import {userListNoPageByTenantId} from "@/api/system/user.js"; |
| | | import {afterSalesServiceAdd, afterSalesServiceUpdate} from "@/api/customerService/index.js"; |
| | | import {afterSalesServiceAdd, afterSalesServiceUpdate, getAllCustomerList, getSalesLedger } from "@/api/customerService/index.js"; |
| | | import { getCurrentDate } from "@/utils/index.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | const emit = defineEmits(['close']) |
| | | const dialogFormVisible = ref(false); |
| | | const operationType = ref('') |
| | | const formRef = ref(null) |
| | | const customerNameOptions = ref([]) |
| | | const userStore = useUserStore(); |
| | | |
| | | const data = reactive({ |
| | | form: { |
| | | feedbackDate: "", |
| | | checkUserId: "", |
| | | customerName: "", |
| | | proDesc: "", |
| | | topic: "", |
| | | serviceType: "", |
| | | urgency: "", |
| | | salesLedgerId: null, |
| | | productModelIds: "", |
| | | customerId: null, |
| | | salesContractNo: "", |
| | | disRes: "", |
| | | customerName: "" |
| | | }, |
| | | rules: { |
| | | customerName: [{required: true, message: "è¯·éæ©å®¢æ·åç§°", trigger: "change"}], |
| | | serviceType: [{required: true, message: "è¯·éæ©å®åç±»å", trigger: "change"}], |
| | | urgency: [{required: true, message: "è¯·éæ©ç´§æ¥ç¨åº¦", trigger: "change"}], |
| | | feedbackDate: [{required: true, message: "è¯·éæ©", trigger: "change"}], |
| | | checkUserId: [{required: true, message: "è¯·éæ©", trigger: "change"}], |
| | | customerName: [{required: true, message: "请è¾å
¥", trigger: "blur"}], |
| | | proDesc: [{required: true, message: "请è¾å
¥", trigger: "blur"}], |
| | | } |
| | | }) |
| | | |
| | | // èªå®ä¹æ ¡éªå½æ°ï¼å¤ææ¯å¦éè¦æ ¡éªå®åç¼å· |
| | | |
| | | const { form, rules } = toRefs(data); |
| | | const userList = ref([]) |
| | | |
| | | const formatCurrency = (val) => { |
| | | if (val === null || val === undefined || val === '') return '-' |
| | | const num = Number(val) |
| | | return Number.isFinite(num) ? num.toFixed(2) : '-' |
| | | } |
| | | |
| | | const { post_sale_waiting_list, degree_of_urgency } = proxy.useDict( |
| | | "post_sale_waiting_list", |
| | | "degree_of_urgency" |
| | | ); |
| | | |
| | | const serviceTypeOptions = computed(() => post_sale_waiting_list?.value || []); |
| | | const urgencyOptions = computed(() => degree_of_urgency?.value || []); |
| | | |
| | | const tableColumn = ref([ |
| | | { label: "产å大类", prop: "productCategory" }, |
| | | { label: "è§æ ¼åå·", prop: "specificationModel" }, |
| | | { label: "åä½", prop: "unit" }, |
| | | { |
| | | label: "产åç¶æ", |
| | | prop: "approveStatus", |
| | | width: 100, |
| | | align: "center", |
| | | dataType: "tag", |
| | | formatData: (v) => (v === 1 ? "å
è¶³" : "ä¸è¶³"), |
| | | formatType: (v) => (v === 1 ? "success" : "danger"), |
| | | }, |
| | | { |
| | | label: "åè´§ç¶æ", |
| | | align: "center", |
| | | width: 140, |
| | | dataType: "slot", |
| | | slot: "shippingStatus", |
| | | }, |
| | | { label: "å¿«éå
¬å¸", prop: "expressCompany", width: 140 }, |
| | | { label: "å¿«éåå·", prop: "expressNumber", width: 160 }, |
| | | { label: "å货车ç", prop: "shippingCarNumber", minWidth: 100, align: "center" }, |
| | | { label: "åè´§æ¥æ", prop: "shippingDate", minWidth: 100, align: "center" }, |
| | | { label: "æ°é", prop: "quantity", width: 100 }, |
| | | { label: "ç¨ç(%)", prop: "taxRate", width: 100 }, |
| | | { |
| | | label: "å«ç¨åä»·(å
)", |
| | | prop: "taxInclusiveUnitPrice", |
| | | width: 160, |
| | | formatData: formatCurrency, |
| | | }, |
| | | { |
| | | label: "å«ç¨æ»ä»·(å
)", |
| | | prop: "taxInclusiveTotalPrice", |
| | | width: 160, |
| | | formatData: formatCurrency, |
| | | }, |
| | | { |
| | | label: "ä¸å«ç¨æ»ä»·(å
)", |
| | | prop: "taxExclusiveTotalPrice", |
| | | width: 160, |
| | | formatData: formatCurrency, |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | tableData.value = tableData.value.filter(i => i.id !== row.id) |
| | | }, |
| | | |
| | | }, |
| | | ], |
| | | }, |
| | | ]) |
| | | const tableData = ref([]) |
| | | // éæ©äº§åå¼¹çª |
| | | const isShowProductSelectDialog = ref(false) |
| | | const handleSelectProducts = (rows) => { |
| | | if (!Array.isArray(rows)) return |
| | | const existingIds = new Set(tableData.value.map(i => i.id)) |
| | | const mapped = rows |
| | | .filter(r => !existingIds.has(r.id)) |
| | | .map(r => ({ |
| | | id: r.id, |
| | | productCategory: r.productName, |
| | | specificationModel: r.model, |
| | | unit: r.unit || '', |
| | | approveStatus: null, |
| | | shippingStatus: '', |
| | | expressCompany: '', |
| | | expressNumber: '', |
| | | shippingCarNumber: '', |
| | | shippingDate: '', |
| | | quantity: 0, |
| | | taxRate: 0, |
| | | taxInclusiveUnitPrice: 0, |
| | | taxInclusiveTotalPrice: 0, |
| | | taxExclusiveTotalPrice: 0, |
| | | })) |
| | | tableData.value = tableData.value.concat(mapped) |
| | | } |
| | | const currentSelectedProductIds = computed(() => { |
| | | return tableData.value.map(item => item.id) |
| | | }) |
| | | |
| | | const associatedSalesOrderNumberChange = () => { |
| | | const opt = associatedSalesOrderNumberOptions.value.find( |
| | | (item) => item.value === form.value.salesContractNo |
| | | ) |
| | | tableData.value = opt?.productData || [] |
| | | form.value.salesLedgerId = opt?.id || null |
| | | } |
| | | |
| | | const associatedSalesOrderNumberOptions = ref([]) |
| | | |
| | | const currentSalesOrderProducts = computed(() => { |
| | | const opt = associatedSalesOrderNumberOptions.value.find( |
| | | (item) => item.value === form.value.salesContractNo |
| | | ) |
| | | return opt?.productData || [] |
| | | }) |
| | | |
| | | const customerNameChange = (val) => { |
| | | const opt = customerNameOptions.value.find(item => item.value === val); |
| | | if (opt) { |
| | | form.value.customerId = opt.id; |
| | | } |
| | | getSalesLedger({ |
| | | customerName: form.value.customerName |
| | | }).then(res => { |
| | | if(res.code === 200){ |
| | | associatedSalesOrderNumberOptions.value = res.data.records.map(item => ({ |
| | | label: item.salesContractNo, |
| | | value: item.salesContractNo, |
| | | productData:item.productData, |
| | | id: item.id |
| | | })) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const getShippingStatusText = (row) => { |
| | | if (!row) return 'å¾
åè´§' |
| | | if (row.shippingDate || row.shippingCarNumber) { |
| | | return 'å·²åè´§' |
| | | } |
| | | const status = row.shippingStatus |
| | | if (status === null || status === undefined || status === '') { |
| | | return 'å¾
åè´§' |
| | | } |
| | | const map = { |
| | | 'å¾
åè´§': 'å¾
åè´§', |
| | | 'å¾
å®¡æ ¸': 'å¾
å®¡æ ¸', |
| | | 'å®¡æ ¸ä¸': 'å®¡æ ¸ä¸', |
| | | 'å®¡æ ¸æç»': 'å®¡æ ¸æç»', |
| | | 'å®¡æ ¸éè¿': 'å®¡æ ¸éè¿', |
| | | 'å·²åè´§': 'å·²åè´§' |
| | | } |
| | | return map[String(status).trim()] || 'å¾
åè´§' |
| | | } |
| | | |
| | | const getShippingStatusType = (row) => { |
| | | if (!row) return 'info' |
| | | if (row.shippingDate || row.shippingCarNumber) { |
| | | return 'success' |
| | | } |
| | | const status = row.shippingStatus |
| | | if (status === null || status === undefined || status === '') { |
| | | return 'info' |
| | | } |
| | | const map = { |
| | | 'å¾
åè´§': 'info', |
| | | 'å¾
å®¡æ ¸': 'warning', |
| | | 'å®¡æ ¸ä¸': 'warning', |
| | | 'å®¡æ ¸æç»': 'danger', |
| | | 'å®¡æ ¸éè¿': 'success', |
| | | 'å·²åè´§': 'success' |
| | | } |
| | | return map[String(status).trim()] || 'info' |
| | | } |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openDialog = (type, row) => { |
| | | const openDialog =async (type, row) => { |
| | | // 请æ±å¤ä¸ªæ¥å£ï¼è·åæ°æ® |
| | | let res = await getAllCustomerList(); |
| | | if(res.records){ |
| | | customerNameOptions.value = res.records.map(item => ({ |
| | | label: item.customerName, |
| | | value: item.customerName, |
| | | id: item.id |
| | | })); |
| | | } |
| | | |
| | | |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | form.value = {} |
| | | proxy.resetForm("formRef"); |
| | | form.value.checkUserId = userStore.id; |
| | | form.value.feedbackDate = getCurrentDate(); |
| | | // æ°å¢æ¶æ¸
空已éå
³è产å |
| | | if (type === "add") { |
| | | tableData.value = [] |
| | | } |
| | | userListNoPageByTenantId().then((res) => { |
| | | userList.value = res.data; |
| | | }); |
| | | if (type === "edit") { |
| | | form.value = {...row} |
| | | if (form.value.customerName) { |
| | | const res = await getSalesLedger({ customerName: form.value.customerName }) |
| | | if (res?.code === 200) { |
| | | console.log(res) |
| | | associatedSalesOrderNumberOptions.value = (res.data?.records || []).map(item => ({ |
| | | label: item.salesContractNo, |
| | | value: item.salesContractNo, |
| | | productData: item.productData, |
| | | id: item.id |
| | | })) |
| | | } |
| | | } |
| | | console.log(form.value) |
| | | } |
| | | } |
| | | // const setName = (code) => { |
| | | // const index = userList.value.findIndex(item => item.deviceModel === code); |
| | | // if (index > -1) { |
| | | // console.log(userList) |
| | | // form.value.name = userList.value[index].deviceName; |
| | | // } |
| | | // } |
| | | const submitForm = () => { |
| | | proxy.$refs["formRef"].validate(valid => { |
| | | if (valid) { |
| | | // å¹é
产ååå·IDs |
| | | form.value.productModelIds = tableData.value.map(item => item.id).join(",") |
| | | if (operationType.value === "add") { |
| | | afterSalesServiceAdd(form.value).then(response => { |
| | | proxy.$modal.msgSuccess("æ°å¢æå") |
| | |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style scoped lang="scss"> |
| | | .descriptions { |
| | | margin-bottom: 20px; |
| | | display: inline-block; |
| | | font-size: 1rem; |
| | | font-weight: 600; |
| | | padding-left: 12px; |
| | | position: relative; |
| | | } |
| | | |
| | | </style> |
| | | .descriptions::before { |
| | | content: ""; |
| | | position: absolute; |
| | | left: 0; |
| | | top: 50%; |
| | | transform: translateY(-50%); |
| | | width: 4px; |
| | | height: 1rem; |
| | | background-color: #002FA7; /* Element é»è®¤çº¢è² */ |
| | | border-radius: 2px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">å馿¥æï¼</span> |
| | | <el-date-picker |
| | | v-model="searchForm.feedbackDate" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="date" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | @change="handleQuery" |
| | | /> |
| | | <span style="margin-left: 10px;" class="search_title">å¤çç¶æï¼</span> |
| | | <el-select v-model="searchForm.status" placeholder="è¯·éæ©ç¶æ" @change="handleQuery" style="width: 140px" clearable> |
| | | <el-option label="å¾
å¤ç" :value="1"></el-option> |
| | | <el-option label="å·²å¤ç" :value="2"></el-option> |
| | | </el-select> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >æç´¢</el-button |
| | | > |
| | | </div> |
| | | <div> |
| | | <el-button type="primary" @click="openForm('add')">æ°å¢</el-button> |
| | | <el-button @click="handleOut">导åº</el-button> |
| | | <el-button type="danger" plain @click="handleDelete">å é¤</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :isSelection="true" |
| | | @selection-change="handleSelectionChange" |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination" |
| | | ></PIMTable> |
| | | </div> |
| | | <form-dia ref="formDia" @close="handleQuery"></form-dia> |
| | | </div> |
| | | <div class="app-container"> |
| | | <div class="workorder-stats"> |
| | | <div |
| | | v-for="(item, index) in statsList" |
| | | :key="index" |
| | | class="stat-card" |
| | | > |
| | | <div class="stat-icon" :style="{ backgroundColor: item.bgColor }"> |
| | | <el-icon :color="item.color" :size="20"> |
| | | <component :is="item.icon" /> |
| | | </el-icon> |
| | | </div> |
| | | <div class="stat-info"> |
| | | <div class="stat-number">{{ item.count }}</div> |
| | | <div class="stat-label">{{ item.label }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="search-wrapper"> |
| | | <el-form |
| | | :model="searchForm" |
| | | class="demo-form-inline" |
| | | > |
| | | <el-row :gutter="20"> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-input |
| | | v-model="searchForm.afterSalesServiceNo" |
| | | placeholder="请è¾å
¥å·¥åç¼å·" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-select |
| | | v-model="searchForm.status" |
| | | placeholder="è¯·éæ©å·¥åç¶æ" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in workOrderStatusOptions" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-select |
| | | v-model="searchForm.urgency" |
| | | placeholder="è¯·éæ©ç´§æ¥ç¨åº¦" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in degreeOfUrgencyOptions" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-select |
| | | v-model="searchForm.serviceType" |
| | | placeholder="è¯·éæ©å®åç±»å" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in classificationOptions" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-input |
| | | v-model="searchForm.orderNo" |
| | | placeholder="请è¾å
¥éå®åå·" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | |
| | | |
| | | <!-- æé® --> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="handleQuery"> |
| | | æç´¢ |
| | | </el-button> |
| | | <el-button @click="handleReset"> |
| | | éç½® |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_list"> |
| | | <div class="table_header" style="display: flex; justify-content: space-between; align-items: center;"> |
| | | <div> |
| | | <el-button type="primary" @click="openForm('add')">æ°å¢å®åå</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button @click="handleOut">导åº</el-button> |
| | | <el-button type="danger" plain @click="handleDelete">å é¤</el-button> |
| | | </div> |
| | | </div> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :height="tableHeight" |
| | | :isSelection="true" |
| | | @selection-change="handleSelectionChange" |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination" |
| | | ></PIMTable> |
| | | </div> |
| | | <form-dia ref="formDia" @close="handleQuery"></form-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {onMounted, ref, getCurrentInstance, nextTick} from "vue"; |
| | | import {onMounted, reactive, ref, toRefs, computed, getCurrentInstance, nextTick} from "vue"; |
| | | import FormDia from "@/views/customerService/feedbackRegistration/components/formDia.vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import {afterSalesServiceDelete, afterSalesServiceListPage} from "@/api/customerService/index.js"; |
| | | import {afterSalesServiceDelete, afterSalesServiceListPage, getSalesLedgerDetail} from "@/api/customerService/index.js"; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const userStore = useUserStore() |
| | | import { Document, FolderOpened, UserFilled } from "@element-plus/icons-vue" |
| | | import { markRaw } from 'vue' |
| | | |
| | | const statsList = ref([ |
| | | { |
| | | icon: markRaw(Document), |
| | | count: 0, |
| | | label: 'å
¨é¨å·¥å', |
| | | color: '#4080ff', |
| | | bgColor: '#eaf2ff' |
| | | }, |
| | | { |
| | | icon: markRaw(FolderOpened), |
| | | count: 0, |
| | | label: 'å·²å¤ç', |
| | | color: '#ff9a2e', |
| | | bgColor: '#fff5e6' |
| | | }, |
| | | { |
| | | icon: markRaw(UserFilled), |
| | | count: 0, |
| | | label: '已宿', |
| | | color: '#00b42a', |
| | | bgColor: '#e6f7ed' |
| | | }, |
| | | ]) |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | feedbackDate: "", |
| | | }, |
| | | searchForm : { |
| | | customerName: "", |
| | | status: "", |
| | | urgency: "", |
| | | serviceType: "", |
| | | reviewStatus: "", |
| | | orderNo: "", |
| | | } |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "å¤çç¶æ", |
| | | prop: "status", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return "å¾
å¤ç"; |
| | | } else if (params == 2) { |
| | | return "å·²å¤ç"; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return "danger"; |
| | | } else if (params == 2) { |
| | | return "success"; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: "å馿¥æ", |
| | | prop: "feedbackDate", |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "ç»è®°äºº", |
| | | prop: "checkNickName", |
| | | }, |
| | | { |
| | | label: "客æ·åç§°", |
| | | prop: "customerName", |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: "é®é¢æè¿°", |
| | | prop: "proDesc", |
| | | width:300 |
| | | }, |
| | | { |
| | | label: "å
³èé¨é¨", |
| | | prop: "deptName", |
| | | width: 200, |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openForm("edit", row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.status !== 1 |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "å·¥åç¼å·", |
| | | prop:"afterSalesServiceNo", |
| | | width: 150, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "éå®åå·", |
| | | prop:"salesContractNo", |
| | | width: 150, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "å¤çç¶æ", |
| | | prop: "status", |
| | | dataType: "tag", |
| | | |
| | | formatData: (params) => { |
| | | if (params === 1) { |
| | | return "å¾
å¤ç"; |
| | | } else if (params === 2) { |
| | | return "å·²å¤ç"; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params === 1) { |
| | | return "danger"; |
| | | } else if (params === 2) { |
| | | return "success"; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "å馿¥æ", |
| | | prop: "feedbackDate", |
| | | width: 150, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "ç»è®°äºº", |
| | | prop: "checkNickName", |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "ç´§æ¥ç¨åº¦", |
| | | prop: "urgency", |
| | | // æ ¹æ®degreeOfUrgencyOptionsåå
¸å»èªå¨å¹é
|
| | | formatData: (params) => { |
| | | if (params) { |
| | | const item = degreeOfUrgencyOptions.value.find(item => item.value === params); |
| | | return item?.label || params; |
| | | } |
| | | return null; |
| | | }, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "å®åç±»å", |
| | | prop: "serviceType", |
| | | // æ ¹æ®classificationOptionsåå
¸å»èªå¨å¹é
|
| | | formatData: (params) => { |
| | | if (params) { |
| | | const item = classificationOptions.value.find(item => item.value === params); |
| | | return item?.label || params; |
| | | } |
| | | return null; |
| | | }, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "é®é¢æè¿°", |
| | | prop: "disRes", |
| | | width:300, |
| | | }, |
| | | { |
| | | label: "å
³èé¨é¨", |
| | | prop: "deptName", |
| | | width: 200, |
| | | align: "center" |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | console.log(row) |
| | | openForm("edit", row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.status !== 1 |
| | | } |
| | | }, |
| | | ], |
| | | align: "center" |
| | | }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0, |
| | | current: 1, |
| | | size: 100, |
| | | total: 0, |
| | | }); |
| | | const selectedRows = ref([]); |
| | | const tableHeight = computed(() => "calc(100% -80px)"); |
| | | |
| | | const handleReset = () => { |
| | | Object.keys(searchForm.value).forEach(key => { |
| | | searchForm.value[key] = "" |
| | | }) |
| | | } |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | | selectedRows.value = selection; |
| | | }; |
| | | const formDia = ref() |
| | | |
| | | // åå
¸è·å |
| | | /* |
| | | post_sale_waiting_list æ°å¢çå®ååç±» |
| | | degree_of_urgency æ°å¢çç´§æ¥ç¨åº¦ |
| | | work_order_status 主页çå·¥åç¶æ |
| | | review_status é¦é¡µçå®¡æ ¸ç¶æ |
| | | */ |
| | | const { post_sale_waiting_list, degree_of_urgency, work_order_status, review_status } = proxy.useDict( |
| | | "post_sale_waiting_list", |
| | | "degree_of_urgency", |
| | | "work_order_status", |
| | | "review_status" |
| | | ); |
| | | |
| | | const classificationOptions = computed(() => post_sale_waiting_list?.value || []); |
| | | const degreeOfUrgencyOptions = computed(() => degree_of_urgency?.value || []); |
| | | const workOrderStatusOptions = computed(() => work_order_status?.value || []); |
| | | |
| | | // æ¥è¯¢å表 |
| | | /** æç´¢æé®æä½ */ |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | getList(); |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | afterSalesServiceListPage({ ...searchForm.value, ...page }).then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records; |
| | | page.total = res.data.total; |
| | | }); |
| | | tableLoading.value = true; |
| | | getSalesLedgerDetails() |
| | | afterSalesServiceListPage({ ...searchForm.value, ...page }).then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records; |
| | | page.total = res.data.total; |
| | | }); |
| | | }; |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openForm = (type, row) => { |
| | | nextTick(() => { |
| | | formDia.value?.openDialog(type, row) |
| | | }) |
| | | nextTick(() => { |
| | | formDia.value?.openDialog(type, row) |
| | | }) |
| | | }; |
| | | |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | | // æ£æ¥æ¯å¦æä»äººç»´æ¤çæ°æ® |
| | | const unauthorizedData = selectedRows.value.filter(item => item.checkUserId !== userStore.id); |
| | | if (unauthorizedData.length > 0) { |
| | | proxy.$modal.msgWarning("ä¸å¯å é¤ä»äººç»´æ¤çæ°æ®"); |
| | | return; |
| | | } |
| | | ids = selectedRows.value.map((item) => item.id); |
| | | } else { |
| | | proxy.$modal.msgWarning("è¯·éæ©æ°æ®"); |
| | | return; |
| | | } |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å é¤ï¼æ¯å¦ç¡®è®¤å é¤ï¼", "å é¤æç¤º", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | tableLoading.value = true; |
| | | afterSalesServiceDelete(ids) |
| | | .then((res) => { |
| | | proxy.$modal.msgSuccess("å 餿å"); |
| | | getList(); |
| | | }) |
| | | .finally(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | function handleDelete() { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | | // æ£æ¥æ¯å¦æä»äººç»´æ¤çæ°æ® |
| | | const unauthorizedData = selectedRows.value.filter(item => item.checkUserId !== userStore.id); |
| | | if (unauthorizedData.length > 0) { |
| | | proxy.$modal.msgWarning("ä¸å¯å é¤ä»äººç»´æ¤çæ°æ®"); |
| | | return; |
| | | } |
| | | ids = selectedRows.value.map((item) => item.id); |
| | | } else { |
| | | proxy.$modal.msgWarning("è¯·éæ©æ°æ®"); |
| | | return; |
| | | } |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å é¤ï¼æ¯å¦ç¡®è®¤å é¤ï¼", "å é¤æç¤º", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | tableLoading.value = true; |
| | | afterSalesServiceDelete(ids) |
| | | .then(() => { |
| | | proxy.$modal.msgSuccess("å 餿å"); |
| | | getList(); |
| | | }) |
| | | .finally(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | |
| | | // å¯¼åº |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/afterSalesService/export", {}, "åé¦ç»è®°.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/afterSalesService/export", {}, "åé¦ç»è®°.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | |
| | | // è·åç»è®¡æ°æ®å¹¶å·æ°é¡¶é¨å¡ç |
| | | const getSalesLedgerDetails = () => { |
| | | getSalesLedgerDetail({}).then((res) => { |
| | | if (res.code === 200) { |
| | | statsList.value[0].count = res.data.filter((item) => item.status === 3)[0].count; |
| | | statsList.value[1].count = res.data.filter((item) => item.status === 2)[0].count; |
| | | statsList.value[2].count = res.data.filter((item) => item.status === 1)[0].count; |
| | | |
| | | // }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | getList(); |
| | | |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style scoped lang="scss"> |
| | | .search-wrapper { |
| | | background: white; |
| | | padding: 1rem 1rem 0 1rem; |
| | | border: 8px; |
| | | border-radius: 16px; |
| | | } |
| | | |
| | | </style> |
| | | .expand-btn { |
| | | width: 100%; |
| | | padding: 20px; /* ä¸ä¸å·¦å³å20pxï¼ç¹å»è¿ä¸ªèå´é½è½è§¦åäºä»¶ */ |
| | | cursor: pointer; /* é¼ æ æ¬æµ®æ¾ç¤ºæåï¼æåä½éª */ |
| | | text-align: center; |
| | | } |
| | | |
| | | .workorder-stats { |
| | | display: flex; |
| | | gap: 16px; |
| | | padding-bottom:1rem; |
| | | border-radius: 8px; |
| | | } |
| | | |
| | | .stat-card { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | padding: 20px; |
| | | background-color: #fff; |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06); |
| | | } |
| | | |
| | | .stat-icon { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | width: 48px; |
| | | height: 48px; |
| | | border-radius: 8px; |
| | | } |
| | | |
| | | .stat-info { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 4px; |
| | | } |
| | | |
| | | .stat-number { |
| | | font-size: 24px; |
| | | font-weight: 600; |
| | | color: #303133; |
| | | line-height: 1; |
| | | } |
| | | |
| | | .stat-label { |
| | | font-size: 14px; |
| | | color: #909399; |
| | | line-height: 1; |
| | | } |
| | | .table_header{ |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | .table_list { |
| | | height: calc(100vh - 380px); |
| | | min-height: 360px; |
| | | background: #fff; |
| | | margin-top: 20px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | :deep(.table_list .pagination-container) { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | margin-top: auto; |
| | | padding: 12px 0 0; |
| | | } |
| | | |
| | | :deep(.table_list .el-pagination) { |
| | | flex-wrap: nowrap; |
| | | justify-content: flex-end; |
| | | width: 100%; |
| | | } |
| | | </style> |
| | |
| | | }); |
| | | |
| | | const dialogTitle = computed(() => { |
| | | if (props.operationType === "add") return "æ°å¢æå¡è§å"; |
| | | if (props.operationType === "edit") return "ç¼è¾æå¡è§å"; |
| | | return "æ¥çæå¡è§å"; |
| | | if (props.operationType === "add") return "æ°å¢ç次"; |
| | | if (props.operationType === "edit") return "ç¼è¾ç次"; |
| | | return "æ¥ççæ¬¡"; |
| | | }); |
| | | |
| | | // è¡¨åæ°æ® |
| | |
| | | <div class="app-container"> |
| | | <!-- 页颿 é¢åæä½æé® --> |
| | | <div class="page-header"> |
| | | <div class="title">æå¡è§åé
ç½®</div> |
| | | <div class="title">çæ¬¡é
ç½®</div> |
| | | <div class="actions"> |
| | | <el-button type="primary" |
| | | @click="openForm('add')"> |
| | | <el-icon> |
| | | <Plus /> |
| | | </el-icon> |
| | | æ°å¢è§å |
| | | æ°å¢ç次 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> --> |
| | | <!-- è§åå表 --> |
| | | <!-- çæ¬¡å表 --> |
| | | <el-card shadow="never" |
| | | class="mb16"> |
| | | <el-table :data="tableData" |
| | |
| | | @pagination="paginationChange" |
| | | class="mt10" /> |
| | | </el-card> |
| | | <!-- æ°å¢/ç¼è¾è§åå¼¹çª --> |
| | | <!-- æ°å¢/ç¼è¾çæ¬¡å¼¹çª --> |
| | | <rule-form ref="ruleFormRef" |
| | | v-model="dialogVisible" |
| | | :operation-type="operationType" |
| | |
| | | return ""; |
| | | }; |
| | | |
| | | // æ¥è¯¢è§åå表 |
| | | // æ¥è¯¢ç次å表 |
| | | const fetchData = () => { |
| | | tableLoading.value = true; |
| | | getAttendanceRules({ ...page, ...searchForm }) |
| | |
| | | dialogVisible.value = true; |
| | | }; |
| | | |
| | | // å é¤è§å |
| | | // å é¤ç次 |
| | | const handleDelete = id => { |
| | | ElMessageBox.confirm("ç¡®å®è¦å é¤è¿æ¡è§ååï¼", "å é¤ç¡®è®¤", { |
| | | ElMessageBox.confirm("ç¡®å®è¦å é¤è¿æ¡ç次åï¼", "å é¤ç¡®è®¤", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | |
| | | </el-descriptions> |
| | | </el-card> --> |
| | | <div class="attendance-operation"> |
| | | <el-button @click="handleBack" |
| | | type="default" |
| | | size="small" |
| | | style="margin-right: 16px"> |
| | | <el-icon> |
| | | <ArrowLeft /> |
| | | </el-icon> |
| | | è¿åæç管ç |
| | | </el-button> |
| | | <!-- æ¥è¯¢æ¡ä»¶ï¼ç®¡çåè夿¥æ¥ï¼ --> |
| | | <el-form :model="searchForm" |
| | | :inline="true" |
| | |
| | | |
| | | <script setup> |
| | | import { ref, reactive, computed, onMounted, onBeforeUnmount } from "vue"; |
| | | import { useRouter } from "vue-router"; |
| | | import { ElMessage, ElMessageBox } from "element-plus"; |
| | | import { |
| | | createPersonalAttendanceRecord, |
| | |
| | | } from "@/api/personnelManagement/personalAttendanceRecords.js"; |
| | | import Pagination from "@/components/Pagination/index.vue"; |
| | | import { deptTreeSelect } from "@/api/system/user.js"; |
| | | import { Refresh, Search } from "@element-plus/icons-vue"; |
| | | import { Refresh, Search, ArrowLeft } from "@element-plus/icons-vue"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const router = useRouter(); |
| | | const tableLoading = ref(false); |
| | | // å页忰 |
| | | const page = reactive({ |
| | |
| | | fetchDeptOptions(); |
| | | }); |
| | | |
| | | // è¿åæç管çé¡µé¢ |
| | | const handleBack = () => { |
| | | router.push({ |
| | | path: "/personnelManagement/classsSheduling/index", |
| | | }); |
| | | }; |
| | | |
| | | onBeforeUnmount(() => { |
| | | if (timer) { |
| | | clearInterval(timer); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="class-page"> |
| | | <div class="search-container"> |
| | | <div class="search-form"> |
| | | <div class="search-row"> |
| | | <div class="search-item"> |
| | | <label class="search-label">éæ©æ¶é´ï¼</label> |
| | | <div class="search-input-group"> |
| | | <el-date-picker v-model="query.year" |
| | | type="year" |
| | | size="small" |
| | | format="YYYY" |
| | | placeholder="鿩年" |
| | | @change="refreshTable()" |
| | | style="width: 90px" |
| | | :clearable="false" /> |
| | | <el-select v-model="query.month" |
| | | clearable |
| | | placeholder="éæ©æ" |
| | | style="width: 70px; margin-left: 8px" |
| | | size="small" |
| | | @change="refreshTable()"> |
| | | <el-option v-for="item in monthOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" /> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="search-item"> |
| | | <el-input v-model="query.userName" |
| | | placeholder="请è¾å
¥äººååç§°" |
| | | size="small" |
| | | style="width: 120px" |
| | | clearable |
| | | @keyup.enter="refreshTable()" /> |
| | | </div> |
| | | <div class="search-item"> |
| | | <el-tree-select v-model="query.deptId" |
| | | :data="deptOptions" |
| | | :props="{ value: 'id', label: 'label', children: 'children' }" |
| | | value-key="id" |
| | | placeholder="è¯·éæ©é¨é¨" |
| | | size="small" |
| | | clearable |
| | | @change="refreshTable()" |
| | | style="width: 140px" /> |
| | | </div> |
| | | <div class="search-actions"> |
| | | <el-button size="small" |
| | | type="primary" |
| | | @click="refreshTable()" |
| | | :icon="Search"> |
| | | æ¥è¯¢ |
| | | </el-button> |
| | | <el-button size="small" |
| | | @click="refresh()" |
| | | :icon="Refresh" |
| | | style="margin-left: 8px"> |
| | | éç½® |
| | | </el-button> |
| | | </div> |
| | | <div class="search-buttons"> |
| | | <el-button size="small" |
| | | type="primary" |
| | | @click="configTime" |
| | | :icon="Setting"> |
| | | çæ¬¡é
ç½® |
| | | </el-button> |
| | | <el-button size="small" |
| | | type="success" |
| | | @click="handleDown" |
| | | :loading="downLoading" |
| | | :icon="Download" |
| | | style="margin-left: 8px"> |
| | | å¯¼åº |
| | | </el-button> |
| | | <el-button size="small" |
| | | type="warning" |
| | | @click="schedulingVisible = true" |
| | | :icon="Calendar" |
| | | style="margin-left: 8px"> |
| | | æç |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="scheduling-container" |
| | | v-loading="pageLoading"> |
| | | <!-- æåº¦æç --> |
| | | <div class="scheduling-table" |
| | | v-show="query.month"> |
| | | <div class="scheduling-left"> |
| | | <div class="scheduling-header"> |
| | | 人ååç§° |
| | | </div> |
| | | <div class="scheduling-user" |
| | | :class="{ 'scheduling-user-hover': currentUserIndex == index }" |
| | | v-for="(item, index) in listForm" |
| | | :key="'e' + index" |
| | | @mouseenter="onMouseEnter(index)" |
| | | @mouseleave="currentUserIndex = null"> |
| | | <div class="user-avatar"> |
| | | {{ item.name ? item.name.charAt(0) : "" }} |
| | | </div> |
| | | <div class="user-details"> |
| | | <h4 class="user-name">{{ item.name }}</h4> |
| | | <!-- <div class="user-stats"> |
| | | <span class="stat-item">æ©:{{ item.day0 }}</span> |
| | | <span class="stat-item">ä¸:{{ item.day1 }}</span> |
| | | <span class="stat-item">å¤:{{ item.day2 }}</span> |
| | | <span class="stat-item">ä¼:{{ item.day3 }}</span> |
| | | <span class="stat-item">å:{{ item.day4 }}</span> |
| | | <span class="stat-item">å·®:{{ item.day6 }}</span> |
| | | </div> --> |
| | | <div class="user-total"> |
| | | <span class="total-label">å计åºå¤:</span> |
| | | <span class="total-value">{{ item.monthlyAttendance.totalAttendance }}天</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="scheduling-right"> |
| | | <div class="scheduling-calendar"> |
| | | <div class="calendar-header"> |
| | | <div class="calendar-header-item" |
| | | v-for="(item, index) in weeks" |
| | | :key="'b' + index"> |
| | | <span class="week-number" |
| | | v-if="item.week == '卿¥'">{{ item.weekNum }}å¨</span> |
| | | <div class="day-info"> |
| | | <span class="day-number">{{ item.day }}</span> |
| | | <span class="day-week">{{ item.week.charAt(1) }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="calendar-body"> |
| | | <div class="calendar-row" |
| | | v-for="(item, index) in listForm" |
| | | :key="'c' + index" |
| | | :class="{ 'calendar-row-hover': currentUserIndex == index }" |
| | | @mouseenter="onMouseEnter(index)" |
| | | @mouseleave="currentUserIndex = null"> |
| | | <div class="calendar-cell" |
| | | v-for="(m, i) in item.list" |
| | | :key="'d' + i"> |
| | | <el-dropdown trigger="click" |
| | | placement="bottom" |
| | | @command="(e) => handleCommand(e, m)" |
| | | class="shift-dropdown"> |
| | | <div class="shift-box" |
| | | :class="{ |
| | | 'shift-box-early': m.shift === '0', |
| | | 'shift-box-mid': m.shift === '1', |
| | | 'shift-box-night': m.shift === '2', |
| | | 'shift-box-rest': m.shift === '3', |
| | | 'shift-box-leave': m.shift === '4', |
| | | 'shift-box-other': m.shift === '5', |
| | | 'shift-box-business': m.shift === '6', |
| | | }"> |
| | | <span class="shift-text">{{ getShiftByDic(m.shift) || 'â' }}</span> |
| | | </div> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item v-for="(n, j) in classType" |
| | | :key="'h' + j" |
| | | :command="n.id">{{ n.locationName |
| | | }}</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 年度æç --> |
| | | <div class="yearly-table" |
| | | v-show="!query.month"> |
| | | <div class="scheduling-left"> |
| | | <div class="scheduling-header"> |
| | | 人ååç§° |
| | | </div> |
| | | <div class="scheduling-user" |
| | | :class="{ 'scheduling-user-hover': currentUserIndex == index }" |
| | | v-for="(item, index) in yearList" |
| | | :key="'e' + index" |
| | | @mouseenter="onMouseEnter(index)" |
| | | @mouseleave="currentUserIndex = null"> |
| | | <div class="user-avatar"> |
| | | {{ item.name ? item.name.charAt(0) : "" }} |
| | | </div> |
| | | <div class="user-details"> |
| | | <h4 class="user-name">{{ item.name }}</h4> |
| | | <!-- <div class="user-stats"> |
| | | <span class="stat-item">æ©:{{ item.day0 }}</span> |
| | | <span class="stat-item">ä¸:{{ item.day1 }}</span> |
| | | <span class="stat-item">å¤:{{ item.day2 }}</span> |
| | | <span class="stat-item">ä¼:{{ item.day3 }}</span> |
| | | <span class="stat-item">å:{{ item.day4 }}</span> |
| | | <span class="stat-item">å·®:{{ item.day6 }}</span> |
| | | </div> --> |
| | | <div class="user-total"> |
| | | <span class="total-label">å计åºå¤:</span> |
| | | <span class="total-value">{{ item.work_time }}天</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="scheduling-right"> |
| | | <div class="yearly-calendar"> |
| | | <div class="yearly-header"> |
| | | <div class="yearly-header-item" |
| | | v-for="(item, index) in monthList" |
| | | :key="'b' + index"> |
| | | <span class="month-name">{{ item }}æ</span> |
| | | </div> |
| | | </div> |
| | | <div class="yearly-body"> |
| | | <div class="yearly-row" |
| | | v-for="(item, index) in yearList" |
| | | :key="'c' + index" |
| | | :class="{ 'calendar-row-hover': currentUserIndex == index }" |
| | | @mouseenter="onMouseEnter(index)" |
| | | @mouseleave="currentUserIndex = null"> |
| | | <div class="yearly-cell" |
| | | v-for="(m, i) in item.monthList" |
| | | :key="'d' + i"> |
| | | <div class="monthly-attendance"> |
| | | <span class="attendance-label">å计åºå¤ï¼</span> |
| | | <span class="attendance-value">{{ m.totalMonthAttendance }}</span> |
| | | </div> |
| | | <!-- <div class="monthly-stats"> |
| | | <span class="stat-item">æ©:{{ m.day0 }}</span> |
| | | <span class="stat-item">ä¸:{{ m.day1 }}</span> |
| | | <span class="stat-item">å¤:{{ m.day2 }}</span> |
| | | <span class="stat-item">ä¼:{{ m.day3 }}</span> |
| | | <span class="stat-item">å:{{ m.day4 }}</span> |
| | | <span class="stat-item">å·®:{{ m.day6 }}</span> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="display: flex; justify-content: flex-end; margin-top: 10px; margin-right: 30px"> |
| | | <el-pagination background |
| | | @current-change="currentChange" |
| | | :page-size="pageSize" |
| | | :current-page="currentPage" |
| | | layout="total, prev, pager, next, jumper" |
| | | :total="total"> |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog title="æç" |
| | | v-model="schedulingVisible" |
| | | width="400px"> |
| | | <div class="search_thing"> |
| | | <div class="search_label" |
| | | style="width: 90px"> |
| | | <span style="color: red; margin-right: 4px">*</span>卿¬¡ï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="schedulingQuery.week" |
| | | type="week" |
| | | format="YYYY 第 ww å¨" |
| | | placeholder="鿩卿¬¡" |
| | | style="width: 100%"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label" |
| | | style="width: 90px"> |
| | | <span style="color: red; margin-right: 4px">*</span>人ååç§°ï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-select v-model="schedulingQuery.userId" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | multiple |
| | | clearable |
| | | collapse-tags> |
| | | <el-option v-for="item in personList" |
| | | :key="item.userId" |
| | | :label="item.nickName" |
| | | :value="item.userId"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label" |
| | | style="width: 90px"> |
| | | <span style="color: red; margin-right: 4px">*</span>çæ¬¡ï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-select v-model="schedulingQuery.shift" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%"> |
| | | <el-option v-for="item in classType" |
| | | :key="item.id" |
| | | :label="item.locationName" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="schedulingVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" |
| | | @click="confirmScheduling" |
| | | :loading="loading">ç¡® å®</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, reactive, onMounted, getCurrentInstance } from "vue"; |
| | | import { useRouter } from "vue-router"; |
| | | import { |
| | | page, |
| | | pageYear, |
| | | add, |
| | | exportFile, |
| | | update, |
| | | selectUserCondition, |
| | | } from "@/api/personnelManagement/class"; |
| | | import { deptTreeSelect } from "@/api/system/user.js"; |
| | | import { getAttendanceRules } from "@/api/personnelManagement/attendanceRules.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const router = useRouter(); |
| | | |
| | | // æ¥è¯¢æ¡ä»¶ |
| | | const query = reactive({ |
| | | userName: "", |
| | | deptId: "", |
| | | year: new Date(), |
| | | month: new Date().getMonth() + 1, |
| | | }); |
| | | |
| | | // æä»½é项 |
| | | const monthOptions = [ |
| | | { value: 1, label: "1æ" }, |
| | | { value: 2, label: "2æ" }, |
| | | { value: 3, label: "3æ" }, |
| | | { value: 4, label: "4æ" }, |
| | | { value: 5, label: "5æ" }, |
| | | { value: 6, label: "6æ" }, |
| | | { value: 7, label: "7æ" }, |
| | | { value: 8, label: "8æ" }, |
| | | { value: 9, label: "9æ" }, |
| | | { value: 10, label: "10æ" }, |
| | | { value: 11, label: "11æ" }, |
| | | { value: 12, label: "12æ" }, |
| | | ]; |
| | | |
| | | // é¨é¨å表 |
| | | const deptOptions = ref([]); |
| | | |
| | | // å¨å表 |
| | | const weeks = ref([ |
| | | { weekNum: 1, week: "å¨ä¸", day: "01" }, |
| | | { weekNum: 1, week: "å¨äº", day: "02" }, |
| | | { weekNum: 1, week: "å¨ä¸", day: "03" }, |
| | | { weekNum: 1, week: "å¨å", day: "04" }, |
| | | { weekNum: 1, week: "å¨äº", day: "05" }, |
| | | { weekNum: 1, week: "å¨å
", day: "06" }, |
| | | { weekNum: 2, week: "卿¥", day: "07" }, |
| | | { weekNum: 2, week: "å¨ä¸", day: "08" }, |
| | | { weekNum: 2, week: "å¨äº", day: "09" }, |
| | | { weekNum: 2, week: "å¨ä¸", day: "10" }, |
| | | { weekNum: 2, week: "å¨å", day: "11" }, |
| | | { weekNum: 2, week: "å¨äº", day: "12" }, |
| | | { weekNum: 2, week: "å¨å
", day: "13" }, |
| | | { weekNum: 3, week: "卿¥", day: "14" }, |
| | | { weekNum: 3, week: "å¨ä¸", day: "15" }, |
| | | { weekNum: 3, week: "å¨äº", day: "16" }, |
| | | { weekNum: 3, week: "å¨ä¸", day: "17" }, |
| | | { weekNum: 3, week: "å¨å", day: "18" }, |
| | | { weekNum: 3, week: "å¨äº", day: "19" }, |
| | | { weekNum: 3, week: "å¨å
", day: "20" }, |
| | | { weekNum: 4, week: "卿¥", day: "21" }, |
| | | { weekNum: 4, week: "å¨ä¸", day: "22" }, |
| | | { weekNum: 4, week: "å¨äº", day: "23" }, |
| | | { weekNum: 4, week: "å¨ä¸", day: "24" }, |
| | | { weekNum: 4, week: "å¨å", day: "25" }, |
| | | { weekNum: 4, week: "å¨äº", day: "26" }, |
| | | { weekNum: 4, week: "å¨å
", day: "27" }, |
| | | { weekNum: 5, week: "卿¥", day: "28" }, |
| | | { weekNum: 5, week: "å¨ä¸", day: "29" }, |
| | | { weekNum: 5, week: "å¨äº", day: "30" }, |
| | | ]); |
| | | |
| | | // çæ¬¡ç±»å |
| | | const classType = ref([]); |
| | | |
| | | // å½åç¨æ·ç´¢å¼ |
| | | const currentUserIndex = ref(null); |
| | | |
| | | // æçå¼¹çªæ¾ç¤ºç¶æ |
| | | const schedulingVisible = ref(false); |
| | | |
| | | // 人åå表 |
| | | const personList = ref([]); |
| | | |
| | | // å è½½ç¶æ |
| | | const loading = ref(false); |
| | | |
| | | // æçæ¥è¯¢æ¡ä»¶ |
| | | const schedulingQuery = reactive({ |
| | | week: "", |
| | | userId: null, |
| | | shift: "", |
| | | }); |
| | | |
| | | // åè¡¨æ°æ® |
| | | const listForm = ref([ |
| | | { |
| | | id: 1, |
| | | name: "å¼ ä¸", |
| | | monthlyAttendance: { |
| | | totalAttendance: 22, |
| | | æ©ç: 10, |
| | | ä¸ç: 8, |
| | | å¤ç: 4, |
| | | 伿¯: 6, |
| | | 请å: 0, |
| | | åºå·®: 0, |
| | | }, |
| | | day0: 10, |
| | | day1: 8, |
| | | day2: 4, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 0, |
| | | list: [ |
| | | { id: 1, shift: "0" }, |
| | | { id: 2, shift: "0" }, |
| | | { id: 3, shift: "1" }, |
| | | { id: 4, shift: "1" }, |
| | | { id: 5, shift: "2" }, |
| | | { id: 6, shift: "2" }, |
| | | { id: 7, shift: "3" }, |
| | | { id: 8, shift: "0" }, |
| | | { id: 9, shift: "0" }, |
| | | { id: 10, shift: "1" }, |
| | | { id: 11, shift: "1" }, |
| | | { id: 12, shift: "2" }, |
| | | { id: 13, shift: "2" }, |
| | | { id: 14, shift: "3" }, |
| | | { id: 15, shift: "0" }, |
| | | { id: 16, shift: "0" }, |
| | | { id: 17, shift: "1" }, |
| | | { id: 18, shift: "1" }, |
| | | { id: 19, shift: "2" }, |
| | | { id: 20, shift: "2" }, |
| | | { id: 21, shift: "3" }, |
| | | { id: 22, shift: "0" }, |
| | | { id: 23, shift: "0" }, |
| | | { id: 24, shift: "1" }, |
| | | { id: 25, shift: "1" }, |
| | | { id: 26, shift: "2" }, |
| | | { id: 27, shift: "2" }, |
| | | { id: 28, shift: "3" }, |
| | | { id: 29, shift: "0" }, |
| | | { id: 30, shift: "0" }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: "æå", |
| | | monthlyAttendance: { |
| | | totalAttendance: 20, |
| | | æ©ç: 8, |
| | | ä¸ç: 6, |
| | | å¤ç: 6, |
| | | 伿¯: 8, |
| | | 请å: 2, |
| | | åºå·®: 0, |
| | | }, |
| | | day0: 8, |
| | | day1: 6, |
| | | day2: 6, |
| | | day3: 8, |
| | | day4: 2, |
| | | day6: 0, |
| | | list: [ |
| | | { id: 31, shift: "1" }, |
| | | { id: 32, shift: "1" }, |
| | | { id: 33, shift: "2" }, |
| | | { id: 34, shift: "2" }, |
| | | { id: 35, shift: "3" }, |
| | | { id: 36, shift: "0" }, |
| | | { id: 37, shift: "0" }, |
| | | { id: 38, shift: "1" }, |
| | | { id: 39, shift: "1" }, |
| | | { id: 40, shift: "2" }, |
| | | { id: 41, shift: "2" }, |
| | | { id: 42, shift: "3" }, |
| | | { id: 43, shift: "0" }, |
| | | { id: 44, shift: "0" }, |
| | | { id: 45, shift: "1" }, |
| | | { id: 46, shift: "1" }, |
| | | { id: 47, shift: "2" }, |
| | | { id: 48, shift: "2" }, |
| | | { id: 49, shift: "3" }, |
| | | { id: 50, shift: "0" }, |
| | | { id: 51, shift: "0" }, |
| | | { id: 52, shift: "4" }, |
| | | { id: 53, shift: "4" }, |
| | | { id: 54, shift: "1" }, |
| | | { id: 55, shift: "1" }, |
| | | { id: 56, shift: "2" }, |
| | | { id: 57, shift: "2" }, |
| | | { id: 58, shift: "3" }, |
| | | { id: 59, shift: "0" }, |
| | | { id: 60, shift: "0" }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 3, |
| | | name: "çäº", |
| | | monthlyAttendance: { |
| | | totalAttendance: 23, |
| | | æ©ç: 9, |
| | | ä¸ç: 9, |
| | | å¤ç: 5, |
| | | 伿¯: 5, |
| | | 请å: 0, |
| | | åºå·®: 2, |
| | | }, |
| | | day0: 9, |
| | | day1: 9, |
| | | day2: 5, |
| | | day3: 5, |
| | | day4: 0, |
| | | day6: 2, |
| | | list: [ |
| | | { id: 61, shift: "2" }, |
| | | { id: 62, shift: "2" }, |
| | | { id: 63, shift: "3" }, |
| | | { id: 64, shift: "0" }, |
| | | { id: 65, shift: "0" }, |
| | | { id: 66, shift: "1" }, |
| | | { id: 67, shift: "1" }, |
| | | { id: 68, shift: "2" }, |
| | | { id: 69, shift: "2" }, |
| | | { id: 70, shift: "3" }, |
| | | { id: 71, shift: "0" }, |
| | | { id: 72, shift: "0" }, |
| | | { id: 73, shift: "1" }, |
| | | { id: 74, shift: "1" }, |
| | | { id: 75, shift: "2" }, |
| | | { id: 76, shift: "2" }, |
| | | { id: 77, shift: "3" }, |
| | | { id: 78, shift: "0" }, |
| | | { id: 79, shift: "0" }, |
| | | { id: 80, shift: "1" }, |
| | | { id: 81, shift: "1" }, |
| | | { id: 82, shift: "6" }, |
| | | { id: 83, shift: "6" }, |
| | | { id: 84, shift: "2" }, |
| | | { id: 85, shift: "2" }, |
| | | { id: 86, shift: "3" }, |
| | | { id: 87, shift: "0" }, |
| | | { id: 88, shift: "0" }, |
| | | { id: 89, shift: "1" }, |
| | | { id: 90, shift: "1" }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 4, |
| | | name: "å¼ ä¸", |
| | | monthlyAttendance: { |
| | | totalAttendance: 22, |
| | | æ©ç: 10, |
| | | ä¸ç: 8, |
| | | å¤ç: 4, |
| | | 伿¯: 6, |
| | | 请å: 0, |
| | | åºå·®: 0, |
| | | }, |
| | | day0: 10, |
| | | day1: 8, |
| | | day2: 4, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 0, |
| | | list: [ |
| | | { id: 1, shift: "0" }, |
| | | { id: 2, shift: "0" }, |
| | | { id: 3, shift: "1" }, |
| | | { id: 4, shift: "1" }, |
| | | { id: 5, shift: "2" }, |
| | | { id: 6, shift: "2" }, |
| | | { id: 7, shift: "3" }, |
| | | { id: 8, shift: "0" }, |
| | | { id: 9, shift: "0" }, |
| | | { id: 10, shift: "1" }, |
| | | { id: 11, shift: "1" }, |
| | | { id: 12, shift: "2" }, |
| | | { id: 13, shift: "2" }, |
| | | { id: 14, shift: "3" }, |
| | | { id: 15, shift: "0" }, |
| | | { id: 16, shift: "0" }, |
| | | { id: 17, shift: "1" }, |
| | | { id: 18, shift: "1" }, |
| | | { id: 19, shift: "2" }, |
| | | { id: 20, shift: "2" }, |
| | | { id: 21, shift: "3" }, |
| | | { id: 22, shift: "0" }, |
| | | { id: 23, shift: "0" }, |
| | | { id: 24, shift: "1" }, |
| | | { id: 25, shift: "1" }, |
| | | { id: 26, shift: "2" }, |
| | | { id: 27, shift: "2" }, |
| | | { id: 28, shift: "3" }, |
| | | { id: 29, shift: "0" }, |
| | | { id: 30, shift: "0" }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 5, |
| | | name: "å¼ ä¸", |
| | | monthlyAttendance: { |
| | | totalAttendance: 22, |
| | | æ©ç: 10, |
| | | ä¸ç: 8, |
| | | å¤ç: 4, |
| | | 伿¯: 6, |
| | | 请å: 0, |
| | | åºå·®: 0, |
| | | }, |
| | | day0: 10, |
| | | day1: 8, |
| | | day2: 4, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 0, |
| | | list: [ |
| | | { id: 1, shift: "0" }, |
| | | { id: 2, shift: "0" }, |
| | | { id: 3, shift: "1" }, |
| | | { id: 4, shift: "1" }, |
| | | { id: 5, shift: "2" }, |
| | | { id: 6, shift: "2" }, |
| | | { id: 7, shift: "3" }, |
| | | { id: 8, shift: "0" }, |
| | | { id: 9, shift: "0" }, |
| | | { id: 10, shift: "1" }, |
| | | { id: 11, shift: "1" }, |
| | | { id: 12, shift: "2" }, |
| | | { id: 13, shift: "2" }, |
| | | { id: 14, shift: "3" }, |
| | | { id: 15, shift: "0" }, |
| | | { id: 16, shift: "0" }, |
| | | { id: 17, shift: "1" }, |
| | | { id: 18, shift: "1" }, |
| | | { id: 19, shift: "2" }, |
| | | { id: 20, shift: "2" }, |
| | | { id: 21, shift: "3" }, |
| | | { id: 22, shift: "0" }, |
| | | { id: 23, shift: "0" }, |
| | | { id: 24, shift: "1" }, |
| | | { id: 25, shift: "1" }, |
| | | { id: 26, shift: "2" }, |
| | | { id: 27, shift: "2" }, |
| | | { id: 28, shift: "3" }, |
| | | { id: 29, shift: "0" }, |
| | | { id: 30, shift: "0" }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 6, |
| | | name: "å¼ ä¸", |
| | | monthlyAttendance: { |
| | | totalAttendance: 22, |
| | | æ©ç: 10, |
| | | ä¸ç: 8, |
| | | å¤ç: 4, |
| | | 伿¯: 6, |
| | | 请å: 0, |
| | | åºå·®: 0, |
| | | }, |
| | | day0: 10, |
| | | day1: 8, |
| | | day2: 4, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 0, |
| | | list: [ |
| | | { id: 1, shift: "0" }, |
| | | { id: 2, shift: "0" }, |
| | | { id: 3, shift: "1" }, |
| | | { id: 4, shift: "1" }, |
| | | { id: 5, shift: "2" }, |
| | | { id: 6, shift: "2" }, |
| | | { id: 7, shift: "3" }, |
| | | { id: 8, shift: "0" }, |
| | | { id: 9, shift: "0" }, |
| | | { id: 10, shift: "1" }, |
| | | { id: 11, shift: "1" }, |
| | | { id: 12, shift: "2" }, |
| | | { id: 13, shift: "2" }, |
| | | { id: 14, shift: "3" }, |
| | | { id: 15, shift: "0" }, |
| | | { id: 16, shift: "0" }, |
| | | { id: 17, shift: "1" }, |
| | | { id: 18, shift: "1" }, |
| | | { id: 19, shift: "2" }, |
| | | { id: 20, shift: "2" }, |
| | | { id: 21, shift: "3" }, |
| | | { id: 22, shift: "0" }, |
| | | { id: 23, shift: "0" }, |
| | | { id: 24, shift: "1" }, |
| | | { id: 25, shift: "1" }, |
| | | { id: 26, shift: "2" }, |
| | | { id: 27, shift: "2" }, |
| | | { id: 28, shift: "3" }, |
| | | { id: 29, shift: "0" }, |
| | | { id: 30, shift: "0" }, |
| | | ], |
| | | }, |
| | | ]); |
| | | |
| | | // å½å页 |
| | | const currentPage = ref(1); |
| | | |
| | | // æ¯é¡µæ¡æ° |
| | | const pageSize = ref(6); |
| | | |
| | | // æ»æ¡æ° |
| | | const total = ref(3); |
| | | |
| | | // 页é¢å è½½ç¶æ |
| | | const pageLoading = ref(false); |
| | | |
| | | // æä»½å表 |
| | | const monthList = ref([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]); |
| | | |
| | | // 年度å表 |
| | | const yearList = ref([ |
| | | { |
| | | id: 1, |
| | | name: "å¼ ä¸", |
| | | work_time: 260, |
| | | day0: 98, |
| | | day1: 78, |
| | | day2: 46, |
| | | day3: 74, |
| | | day4: 14, |
| | | day6: 10, |
| | | monthList: [ |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 10, |
| | | day1: 8, |
| | | day2: 4, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 19, |
| | | day0: 7, |
| | | day1: 6, |
| | | day2: 6, |
| | | day3: 9, |
| | | day4: 3, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 23, |
| | | day0: 9, |
| | | day1: 9, |
| | | day2: 5, |
| | | day3: 5, |
| | | day4: 0, |
| | | day6: 2, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 21, |
| | | day0: 8, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 7, |
| | | day4: 0, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 9, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 1, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 18, |
| | | day0: 6, |
| | | day1: 6, |
| | | day2: 6, |
| | | day3: 8, |
| | | day4: 4, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 23, |
| | | day0: 10, |
| | | day1: 9, |
| | | day2: 4, |
| | | day3: 5, |
| | | day4: 0, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 9, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 21, |
| | | day0: 8, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 7, |
| | | day4: 0, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 9, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 1, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 19, |
| | | day0: 7, |
| | | day1: 7, |
| | | day2: 5, |
| | | day3: 8, |
| | | day4: 2, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 23, |
| | | day0: 10, |
| | | day1: 9, |
| | | day2: 4, |
| | | day3: 5, |
| | | day4: 0, |
| | | day6: 0, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: "æå", |
| | | work_time: 252, |
| | | day0: 90, |
| | | day1: 72, |
| | | day2: 50, |
| | | day3: 76, |
| | | day4: 18, |
| | | day6: 8, |
| | | monthList: [ |
| | | { |
| | | totalMonthAttendance: 21, |
| | | day0: 9, |
| | | day1: 7, |
| | | day2: 5, |
| | | day3: 7, |
| | | day4: 2, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 18, |
| | | day0: 6, |
| | | day1: 6, |
| | | day2: 6, |
| | | day3: 10, |
| | | day4: 4, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 8, |
| | | day1: 8, |
| | | day2: 6, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 2, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 20, |
| | | day0: 7, |
| | | day1: 6, |
| | | day2: 7, |
| | | day3: 8, |
| | | day4: 0, |
| | | day6: 2, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 21, |
| | | day0: 8, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 7, |
| | | day4: 1, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 17, |
| | | day0: 5, |
| | | day1: 5, |
| | | day2: 7, |
| | | day3: 9, |
| | | day4: 5, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 9, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 21, |
| | | day0: 8, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 7, |
| | | day4: 1, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 20, |
| | | day0: 7, |
| | | day1: 6, |
| | | day2: 7, |
| | | day3: 8, |
| | | day4: 0, |
| | | day6: 2, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 21, |
| | | day0: 8, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 7, |
| | | day4: 1, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 18, |
| | | day0: 6, |
| | | day1: 6, |
| | | day2: 6, |
| | | day3: 9, |
| | | day4: 3, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 9, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 0, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 3, |
| | | name: "çäº", |
| | | work_time: 268, |
| | | day0: 102, |
| | | day1: 82, |
| | | day2: 48, |
| | | day3: 70, |
| | | day4: 10, |
| | | day6: 14, |
| | | monthList: [ |
| | | { |
| | | totalMonthAttendance: 23, |
| | | day0: 10, |
| | | day1: 9, |
| | | day2: 4, |
| | | day3: 5, |
| | | day4: 0, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 21, |
| | | day0: 8, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 2, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 24, |
| | | day0: 10, |
| | | day1: 9, |
| | | day2: 5, |
| | | day3: 4, |
| | | day4: 0, |
| | | day6: 3, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 9, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 2, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 23, |
| | | day0: 10, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 5, |
| | | day4: 1, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 21, |
| | | day0: 8, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 7, |
| | | day4: 1, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 23, |
| | | day0: 10, |
| | | day1: 9, |
| | | day2: 4, |
| | | day3: 5, |
| | | day4: 0, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 9, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 23, |
| | | day0: 10, |
| | | day1: 9, |
| | | day2: 4, |
| | | day3: 5, |
| | | day4: 0, |
| | | day6: 2, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 9, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 1, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 21, |
| | | day0: 8, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 7, |
| | | day4: 0, |
| | | day6: 2, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 24, |
| | | day0: 10, |
| | | day1: 9, |
| | | day2: 5, |
| | | day3: 4, |
| | | day4: 0, |
| | | day6: 3, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 4, |
| | | name: "èµµå
", |
| | | work_time: 248, |
| | | day0: 88, |
| | | day1: 70, |
| | | day2: 50, |
| | | day3: 78, |
| | | day4: 20, |
| | | day6: 6, |
| | | monthList: [ |
| | | { |
| | | totalMonthAttendance: 20, |
| | | day0: 8, |
| | | day1: 6, |
| | | day2: 6, |
| | | day3: 8, |
| | | day4: 3, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 17, |
| | | day0: 5, |
| | | day1: 5, |
| | | day2: 7, |
| | | day3: 10, |
| | | day4: 5, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 21, |
| | | day0: 7, |
| | | day1: 7, |
| | | day2: 7, |
| | | day3: 7, |
| | | day4: 1, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 19, |
| | | day0: 6, |
| | | day1: 6, |
| | | day2: 7, |
| | | day3: 9, |
| | | day4: 2, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 20, |
| | | day0: 7, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 8, |
| | | day4: 2, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 16, |
| | | day0: 4, |
| | | day1: 4, |
| | | day2: 8, |
| | | day3: 10, |
| | | day4: 6, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 21, |
| | | day0: 8, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 7, |
| | | day4: 1, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 20, |
| | | day0: 7, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 8, |
| | | day4: 2, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 19, |
| | | day0: 6, |
| | | day1: 6, |
| | | day2: 7, |
| | | day3: 9, |
| | | day4: 2, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 20, |
| | | day0: 7, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 8, |
| | | day4: 2, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 18, |
| | | day0: 6, |
| | | day1: 6, |
| | | day2: 6, |
| | | day3: 9, |
| | | day4: 4, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 21, |
| | | day0: 8, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 7, |
| | | day4: 1, |
| | | day6: 1, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 5, |
| | | name: "é±ä¸", |
| | | work_time: 266, |
| | | day0: 100, |
| | | day1: 84, |
| | | day2: 46, |
| | | day3: 72, |
| | | day4: 12, |
| | | day6: 12, |
| | | monthList: [ |
| | | { |
| | | totalMonthAttendance: 23, |
| | | day0: 10, |
| | | day1: 9, |
| | | day2: 4, |
| | | day3: 5, |
| | | day4: 0, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 21, |
| | | day0: 8, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 1, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 23, |
| | | day0: 9, |
| | | day1: 9, |
| | | day2: 5, |
| | | day3: 5, |
| | | day4: 0, |
| | | day6: 2, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 9, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 2, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 9, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 1, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 20, |
| | | day0: 7, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 8, |
| | | day4: 2, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 23, |
| | | day0: 10, |
| | | day1: 9, |
| | | day2: 4, |
| | | day3: 5, |
| | | day4: 0, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 9, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 0, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 23, |
| | | day0: 9, |
| | | day1: 9, |
| | | day2: 5, |
| | | day3: 5, |
| | | day4: 0, |
| | | day6: 2, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 22, |
| | | day0: 9, |
| | | day1: 8, |
| | | day2: 5, |
| | | day3: 6, |
| | | day4: 1, |
| | | day6: 1, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 20, |
| | | day0: 7, |
| | | day1: 7, |
| | | day2: 6, |
| | | day3: 8, |
| | | day4: 2, |
| | | day6: 0, |
| | | }, |
| | | { |
| | | totalMonthAttendance: 23, |
| | | day0: 10, |
| | | day1: 9, |
| | | day2: 4, |
| | | day3: 5, |
| | | day4: 0, |
| | | day6: 0, |
| | | }, |
| | | ], |
| | | }, |
| | | ]); |
| | | |
| | | // 导åºå è½½ç¶æ |
| | | const downLoading = ref(false); |
| | | |
| | | // è·åé¨é¨å表 |
| | | const fetchDeptOptions = () => { |
| | | deptTreeSelect().then(response => { |
| | | deptOptions.value = filterDisabledDept( |
| | | JSON.parse(JSON.stringify(response.data)) |
| | | ); |
| | | }); |
| | | }; |
| | | |
| | | // è¿æ»¤ç¦ç¨çé¨é¨ |
| | | const filterDisabledDept = deptList => { |
| | | return deptList.filter(dept => { |
| | | if (dept.disabled) { |
| | | return false; |
| | | } |
| | | if (dept.children && dept.children.length) { |
| | | dept.children = filterDisabledDept(dept.children); |
| | | } |
| | | return true; |
| | | }); |
| | | }; |
| | | |
| | | // å·æ° |
| | | const refresh = () => { |
| | | listForm.value = []; |
| | | yearList.value = []; |
| | | currentPage.value = 1; |
| | | query.userName = ""; |
| | | query.deptId = ""; |
| | | query.year = new Date(); |
| | | query.month = new Date().getMonth() + 1; |
| | | if (query.month) { |
| | | init(); |
| | | } else { |
| | | initYear(); |
| | | } |
| | | }; |
| | | |
| | | // å·æ°è¡¨æ ¼ |
| | | const refreshTable = () => { |
| | | currentPage.value = 1; |
| | | if (query.month) { |
| | | listForm.value = []; |
| | | init(); |
| | | } else { |
| | | yearList.value = []; |
| | | initYear(); |
| | | } |
| | | }; |
| | | |
| | | // é¡µç æ¹å |
| | | const currentChange = num => { |
| | | currentPage.value = num; |
| | | if (query.month) { |
| | | init(); |
| | | } else { |
| | | initYear(); |
| | | } |
| | | }; |
| | | |
| | | // æ°åè½¬ä¸æ |
| | | const transFromNumber = num => { |
| | | let changeNum = ["é¶", "ä¸", "äº", "ä¸", "å", "äº", "å
", "ä¸", "å
«", "ä¹"]; |
| | | let unit = ["", "å", "ç¾", "å", "ä¸"]; |
| | | num = parseInt(num); |
| | | let getWan = temp => { |
| | | let strArr = temp.toString().split("").reverse(); |
| | | let newNum = ""; |
| | | for (var i = 0; i < strArr.length; i++) { |
| | | newNum = |
| | | (i == 0 && strArr[i] == 0 |
| | | ? "" |
| | | : i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 |
| | | ? "" |
| | | : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i])) + |
| | | newNum; |
| | | } |
| | | return newNum; |
| | | }; |
| | | let overWan = Math.floor(num / 10000); |
| | | let noWan = num % 10000; |
| | | if (noWan.toString().length < 4) noWan = "0" + noWan; |
| | | return overWan ? getWan(overWan) + "ä¸" + getWan(noWan) : getWan(num); |
| | | }; |
| | | |
| | | // åå§åæåº¦æ°æ® |
| | | const init = () => { |
| | | pageLoading.value = true; |
| | | console.log(query.year, "query.year"); |
| | | let year = query.year.getFullYear(); |
| | | let month0 = query.month ? query.month : new Date().getMonth() + 1; |
| | | let month = month0 > 9 ? month0 : "0" + month0; |
| | | page({ |
| | | size: pageSize.value, |
| | | current: currentPage.value, |
| | | time: year + "-" + month + "-01 00:00:00", |
| | | userName: query.userName, |
| | | deptId: query.deptId, |
| | | }) |
| | | .then(res => { |
| | | pageLoading.value = false; |
| | | total.value = res.data.page.total; |
| | | listForm.value = res.data.page.records.map(item => { |
| | | for (let key in item.monthlyAttendance) { |
| | | let type = getDayByDic(key); |
| | | if (type != undefined || type != null) { |
| | | item[`day${type}`] = item.monthlyAttendance[key]; |
| | | } |
| | | } |
| | | return item; |
| | | }); |
| | | let headerList = res.data.headerList; |
| | | weeks.value = []; |
| | | headerList.forEach(item => { |
| | | let obj = { |
| | | weekNum: item.weekly, |
| | | week: item.headerTime.split(" ")[1], |
| | | day: item.headerTime.split(" ")[0], |
| | | }; |
| | | weeks.value.push(obj); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | pageLoading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | // åå§åå¹´åº¦æ°æ® |
| | | const initYear = () => { |
| | | pageLoading.value = true; |
| | | let year = query.year.getFullYear(); |
| | | pageYear({ |
| | | size: pageSize.value, |
| | | current: currentPage.value, |
| | | time: year + "-01-01 00:00:00", |
| | | userName: query.userName, |
| | | deptId: query.deptId, |
| | | }).then(res => { |
| | | pageLoading.value = false; |
| | | total.value = res.data.total; |
| | | yearList.value = res.data.records.map(item => { |
| | | for (let key in item.year) { |
| | | let type = getDayByDic(key); |
| | | if (type != undefined || type != null) { |
| | | item[`day${type}`] = item.year[key]; |
| | | } |
| | | } |
| | | item.monthList = []; |
| | | for (let m in item.month) { |
| | | let obj = {}; |
| | | for (let key in item.month[m]) { |
| | | let type = getDayByDic(key); |
| | | if (type != undefined || type != null) { |
| | | obj[`day${type}`] = item.month[m][key]; |
| | | } |
| | | } |
| | | obj.totalMonthAttendance = item.month[m].totalMonthAttendance; |
| | | item.monthList.push(obj); |
| | | } |
| | | return item; |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | | // é¼ æ è¿å
¥ |
| | | const onMouseEnter = index => { |
| | | currentUserIndex.value = index; |
| | | }; |
| | | |
| | | // 确认æç |
| | | const confirmScheduling = () => { |
| | | if (!schedulingQuery.week) { |
| | | proxy.$modal.msgError("è¯·éæ©å¨æ¬¡"); |
| | | return; |
| | | } |
| | | let time = schedulingQuery.week.getTime(); |
| | | |
| | | // æ ¼å¼åæ¥æä¸º YYYY-MM-DD æ ¼å¼ |
| | | const formatDate = date => { |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(date.getDate()).padStart(2, "0"); |
| | | return `${year}-${month}-${day}`; |
| | | }; |
| | | |
| | | let startWeek = |
| | | formatDate(new Date(time - 24 * 60 * 60 * 1000)) + " 00:00:00"; |
| | | let endWeek = |
| | | formatDate(new Date(time + 24 * 60 * 60 * 1000 * 5)) + " 00:00:00"; |
| | | |
| | | if (!schedulingQuery.userId || schedulingQuery.userId.length == 0) { |
| | | proxy.$modal.msgError("è¯·éæ©äººå"); |
| | | return; |
| | | } |
| | | if (!schedulingQuery.shift) { |
| | | proxy.$modal.msgError("è¯·éæ©çæ¬¡"); |
| | | return; |
| | | } |
| | | loading.value = true; |
| | | add({ |
| | | startWeek, |
| | | endWeek, |
| | | userId: schedulingQuery.userId.join(","), |
| | | shift: schedulingQuery.shift, |
| | | }) |
| | | .then(res => { |
| | | loading.value = false; |
| | | proxy.$modal.msgSuccess("æä½æå"); |
| | | schedulingVisible.value = false; |
| | | schedulingQuery.week = ""; |
| | | schedulingQuery.userId = null; |
| | | schedulingQuery.shift = ""; |
| | | refresh(); |
| | | }) |
| | | .catch(err => { |
| | | loading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | // æ¶é´é
ç½® |
| | | const configTime = () => { |
| | | // 跳转å°è夿å¡é¡µé¢ |
| | | router.push({ |
| | | path: "/personnelManagement/checkinRules", |
| | | }); |
| | | }; |
| | | |
| | | // 夿æ¯å¦ä¸ºç©ºå¯¹è±¡ |
| | | const isObjectEmpty = obj => { |
| | | return Object.keys(obj).some(key => !obj[key]); |
| | | }; |
| | | |
| | | // å¯¼åº |
| | | const handleDown = () => { |
| | | let year = query.year.getFullYear(); |
| | | let time = ""; |
| | | if (query.month) { |
| | | let month = query.month > 9 ? query.month : "0" + query.month; |
| | | time = year + "-" + month + "-01 00:00:00"; |
| | | } else { |
| | | time = year + "-01-01 00:00:00"; |
| | | } |
| | | downLoading.value = true; |
| | | exportFile({ |
| | | time, |
| | | userName: query.userName, |
| | | deptId: query.deptId, |
| | | isMonth: query.month ? true : false, |
| | | }) |
| | | .then(res => { |
| | | proxy.$modal.msgSuccess("ä¸è½½æå"); |
| | | downLoading.value = false; |
| | | const blob = new Blob([res], { |
| | | type: "application/force-download", |
| | | }); |
| | | let fileName = ""; |
| | | if (query.month) { |
| | | fileName = year + "-" + query.month + " çæ¬¡ä¿¡æ¯"; |
| | | } else { |
| | | fileName = year + " çæ¬¡æ±æ»"; |
| | | } |
| | | proxy.$download.saveAs(blob, fileName + ".xlsx"); |
| | | }) |
| | | .catch(err => { |
| | | downLoading.value = false; |
| | | }); |
| | | }; |
| | | // å¤çå½ä»¤ |
| | | const handleCommand = (e, m) => { |
| | | if (e != m.shift) { |
| | | update({ |
| | | id: m.id, |
| | | shift: e, |
| | | }).then(res => { |
| | | proxy.$modal.msgSuccess("æä½æå"); |
| | | m.shift = e; |
| | | }); |
| | | } |
| | | }; |
| | | // æ¥è¯¢è§åå表 |
| | | const fetchData = () => { |
| | | getAttendanceRules({ current: -1, size: -1 }).then(res => { |
| | | classType.value = res.data.records; |
| | | }); |
| | | }; |
| | | // è·åç¨æ· |
| | | const getUsers = () => { |
| | | // selectUserCondition({ type: 1 }).then(res => { |
| | | // let arr = res.data; |
| | | // personList.value = arr; |
| | | // }); |
| | | selectUserCondition().then(res => { |
| | | let arr = res.data; |
| | | personList.value = arr; |
| | | }); |
| | | }; |
| | | |
| | | // æ ¹æ®åå
¸è·åæ¥æ |
| | | const getDayByDic = e => { |
| | | let obj = classType.value.find(m => m.locationName == e); |
| | | if (obj) { |
| | | return obj.id; |
| | | } |
| | | }; |
| | | |
| | | // æ ¹æ®åå
¸è·åçæ¬¡ |
| | | const getShiftByDic = e => { |
| | | let obj = classType.value.find(m => m.id == e); |
| | | if (obj) { |
| | | return obj.locationName; |
| | | } |
| | | return "æ "; |
| | | }; |
| | | |
| | | // åå§å |
| | | onMounted(() => { |
| | | fetchData(); |
| | | getUsers(); |
| | | fetchDeptOptions(); |
| | | if (query.month) { |
| | | init(); |
| | | } else { |
| | | initYear(); |
| | | } |
| | | monthList.value = []; |
| | | for (let i = 12; i > 0; i--) { |
| | | monthList.value.push(i); |
| | | } |
| | | monthList.value.reverse(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .class-page { |
| | | padding: 16px; |
| | | } |
| | | |
| | | .form_title { |
| | | height: 36px; |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | font-weight: 800; |
| | | } |
| | | |
| | | /* æç´¢åºåæ ·å¼ */ |
| | | .search-container { |
| | | background: #f9fafb; |
| | | border-radius: 8px; |
| | | padding: 20px; |
| | | margin-bottom: 20px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | } |
| | | |
| | | .search-form { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 16px; |
| | | } |
| | | |
| | | .search-row { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 16px; |
| | | flex-wrap: nowrap; |
| | | overflow-x: auto; |
| | | } |
| | | |
| | | .search-item { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 6px; |
| | | } |
| | | |
| | | .search-label { |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | color: #333; |
| | | min-width: 65px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search-input-group { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search-actions { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-left: 8px; |
| | | } |
| | | |
| | | .search-buttons { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | flex: 1; |
| | | } |
| | | |
| | | /* ååºå¼è°æ´ */ |
| | | @media (max-width: 1200px) { |
| | | .search-row { |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-item { |
| | | gap: 4px; |
| | | } |
| | | |
| | | .search-label { |
| | | min-width: 60px; |
| | | font-size: 13px; |
| | | } |
| | | |
| | | .search-actions { |
| | | margin-left: 4px; |
| | | } |
| | | |
| | | .search-buttons { |
| | | margin-left: 12px; |
| | | } |
| | | } |
| | | |
| | | @media (max-width: 992px) { |
| | | .search-row { |
| | | flex-wrap: wrap; |
| | | justify-content: flex-start; |
| | | } |
| | | |
| | | .search-buttons { |
| | | margin-left: 0; |
| | | margin-top: 12px; |
| | | width: 100%; |
| | | justify-content: flex-start; |
| | | } |
| | | } |
| | | |
| | | /* æçå®¹å¨ */ |
| | | .scheduling-container { |
| | | width: 100%; |
| | | min-height: calc(100vh - 280px); |
| | | background-color: #fff; |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | overflow: hidden; |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | /* æçè¡¨æ ¼ */ |
| | | .scheduling-table { |
| | | display: flex; |
| | | width: 100%; |
| | | height: calc(100vh - 280px); |
| | | } |
| | | |
| | | /* 左侧人åä¿¡æ¯ */ |
| | | .scheduling-left { |
| | | width: 240px; |
| | | min-width: 240px; |
| | | background-color: #f9fafb; |
| | | border-right: 1px solid #e5e7eb; |
| | | } |
| | | |
| | | /* å³ä¾§æçå
容 */ |
| | | .scheduling-right { |
| | | flex: 1; |
| | | overflow-x: auto; |
| | | } |
| | | |
| | | /* 表头 */ |
| | | .scheduling-header { |
| | | height: 48px; |
| | | line-height: 48px; |
| | | padding: 0 20px; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | color: #333; |
| | | background-color: #f3f4f6; |
| | | border-bottom: 1px solid #e5e7eb; |
| | | } |
| | | |
| | | /* 人åä¿¡æ¯è¡ */ |
| | | .scheduling-user { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 10px 10px; |
| | | border-bottom: 1px solid #e5e7eb; |
| | | transition: all 0.3s ease; |
| | | height: 65px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .scheduling-user:hover, |
| | | .scheduling-user-hover { |
| | | background-color: rgba(59, 130, 246, 0.05); |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | /* ç¨æ·å¤´å */ |
| | | .user-avatar { |
| | | width: 42px; |
| | | height: 42px; |
| | | border-radius: 50%; |
| | | background: linear-gradient(135deg, #3b82f6, #60a5fa); |
| | | color: #fff; |
| | | font-size: 18px; |
| | | font-weight: 600; |
| | | text-align: center; |
| | | line-height: 42px; |
| | | margin-right: 16px; |
| | | box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2); |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | .scheduling-user:hover .user-avatar { |
| | | transform: scale(1.05); |
| | | box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3); |
| | | } |
| | | |
| | | /* ç¨æ·è¯¦æ
*/ |
| | | .user-details { |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | height: 100%; |
| | | } |
| | | |
| | | /* ç¨æ·å */ |
| | | .user-name { |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | color: #333; |
| | | margin: 0 0 6px 0; |
| | | line-height: 1.2; |
| | | } |
| | | |
| | | /* ç¨æ·ç»è®¡ */ |
| | | .user-stats { |
| | | /* display: flex; */ |
| | | /* flex-wrap: wrap; |
| | | gap: 10px; */ |
| | | margin-bottom: 4px; |
| | | } |
| | | |
| | | .stat-item { |
| | | font-size: 12px; |
| | | color: #666; |
| | | /* background-color: #f9fafb; */ |
| | | /* padding: 2px 8px; */ |
| | | padding-right: 4px; |
| | | /* border-radius: 10px; */ |
| | | /* border: 1px solid #e5e7eb; */ |
| | | /* transition: all 0.3s ease; */ |
| | | } |
| | | |
| | | .scheduling-user:hover .stat-item { |
| | | background-color: rgba(59, 130, 246, 0.1); |
| | | border-color: rgba(59, 130, 246, 0.3); |
| | | } |
| | | |
| | | /* å计åºå¤ */ |
| | | .user-total { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .total-label { |
| | | font-size: 12px; |
| | | color: #666; |
| | | margin-right: 6px; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .total-value { |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | color: #3b82f6; |
| | | background-color: rgba(59, 130, 246, 0.1); |
| | | padding: 2px 10px; |
| | | border-radius: 10px; |
| | | border: 1px solid rgba(59, 130, 246, 0.2); |
| | | } |
| | | |
| | | /* æ¥åå¤´é¨ */ |
| | | .calendar-header { |
| | | display: flex; |
| | | |
| | | border-bottom: 1px solid #e5e7eb; |
| | | } |
| | | |
| | | .calendar-header-item { |
| | | width: 50px; |
| | | min-width: 50px; |
| | | height: 48px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-right: 1px solid #e5e7eb; |
| | | background-color: #f3f4f6; |
| | | position: relative; |
| | | } |
| | | |
| | | .week-number { |
| | | position: absolute; |
| | | top: 6px; |
| | | font-size: 10px; |
| | | font-weight: 600; |
| | | color: #3b82f6; |
| | | background-color: #dbeafe; |
| | | padding: 3px 6px; |
| | | border-radius: 12px; |
| | | box-shadow: 0 1px 3px rgba(59, 130, 246, 0.2); |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | .week-number:hover { |
| | | background-color: #3b82f6; |
| | | color: #fff; |
| | | transform: translateY(-1px); |
| | | } |
| | | |
| | | .day-info { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | } |
| | | |
| | | .day-number { |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | color: #333; |
| | | } |
| | | |
| | | .day-week { |
| | | font-size: 12px; |
| | | color: #666; |
| | | } |
| | | |
| | | /* æ¥åä¸»ä½ */ |
| | | .calendar-body { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | /* æ¥åè¡ */ |
| | | .calendar-row { |
| | | display: flex; |
| | | border-bottom: 1px solid #e5e7eb; |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | .calendar-row:hover, |
| | | .calendar-row-hover { |
| | | background-color: rgba(59, 130, 246, 0.03); |
| | | } |
| | | |
| | | /* æ¥ååå
æ ¼ */ |
| | | .calendar-cell { |
| | | width: 50px; |
| | | min-width: 50px; |
| | | height: 65px; |
| | | border-right: 1px solid #e5e7eb; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | /* çæ¬¡ä¸ææ¡ */ |
| | | .shift-dropdown { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | /* çæ¬¡æ¡ */ |
| | | .shift-box { |
| | | width: 90%; |
| | | height: 80%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 6px; |
| | | font-size: 12px; |
| | | font-weight: 500; |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | .shift-box:hover { |
| | | transform: scale(1.05); |
| | | } |
| | | |
| | | /* çæ¬¡ç±»åæ ·å¼ */ |
| | | .shift-box-early { |
| | | background: rgba(59, 130, 246, 0.15); |
| | | color: #3b82f6; |
| | | } |
| | | |
| | | .shift-box-mid { |
| | | background: rgba(139, 92, 246, 0.15); |
| | | color: #8b5cf6; |
| | | } |
| | | |
| | | .shift-box-night { |
| | | background: rgba(245, 158, 11, 0.15); |
| | | color: #f59e0b; |
| | | } |
| | | |
| | | .shift-box-rest { |
| | | background: rgba(16, 185, 129, 0.15); |
| | | color: #10b981; |
| | | } |
| | | |
| | | .shift-box-leave { |
| | | background: rgba(239, 68, 68, 0.15); |
| | | color: #ef4444; |
| | | } |
| | | |
| | | .shift-box-other { |
| | | background: rgba(236, 72, 153, 0.15); |
| | | color: #ec4899; |
| | | } |
| | | |
| | | .shift-box-business { |
| | | background: rgba(17, 24, 39, 0.15); |
| | | color: #111827; |
| | | } |
| | | |
| | | /* çæ¬¡ææ¬ */ |
| | | .shift-text { |
| | | text-align: center; |
| | | } |
| | | |
| | | /* å¹´åº¦è¡¨æ ¼ */ |
| | | .yearly-table { |
| | | display: flex; |
| | | width: 100%; |
| | | height: calc(100vh - 280px); |
| | | } |
| | | |
| | | /* 年度æ¥å */ |
| | | .yearly-calendar { |
| | | width: 100%; |
| | | } |
| | | |
| | | /* 年度表头 */ |
| | | .yearly-header { |
| | | display: grid; |
| | | grid-template-columns: repeat(12, 1fr); |
| | | background-color: #f3f4f6; |
| | | border-bottom: 1px solid #e5e7eb; |
| | | } |
| | | |
| | | .yearly-header-item { |
| | | height: 48px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-right: 1px solid #e5e7eb; |
| | | } |
| | | |
| | | .month-name { |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | color: #333; |
| | | } |
| | | |
| | | /* å¹´åº¦ä¸»ä½ */ |
| | | .yearly-body { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | /* å¹´åº¦è¡ */ |
| | | .yearly-row { |
| | | display: grid; |
| | | grid-template-columns: repeat(12, 1fr); |
| | | border-bottom: 1px solid #e5e7eb; |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | /* 年度åå
æ ¼ */ |
| | | .yearly-cell { |
| | | padding: 12px; |
| | | border-right: 1px solid #e5e7eb; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | } |
| | | |
| | | /* æåº¦åºå¤ */ |
| | | .monthly-attendance { |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .attendance-label { |
| | | font-size: 12px; |
| | | color: #666; |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .attendance-value { |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | color: #333; |
| | | } |
| | | |
| | | /* æåº¦ç»è®¡ */ |
| | | .monthly-stats { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 4px; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .monthly-stats .stat-item { |
| | | font-size: 11px; |
| | | } |
| | | |
| | | /* æ»å¨æ¡æ ·å¼ */ |
| | | .scheduling-right::-webkit-scrollbar { |
| | | height: 8px; |
| | | } |
| | | |
| | | .scheduling-right::-webkit-scrollbar-track { |
| | | background: #f1f1f1; |
| | | } |
| | | |
| | | .scheduling-right::-webkit-scrollbar-thumb { |
| | | background: #c1c1c1; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .scheduling-right::-webkit-scrollbar-thumb:hover { |
| | | background: #a8a8a8; |
| | | } |
| | | |
| | | .search_label { |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | color: #333; |
| | | margin-bottom: 8px; |
| | | margin-top: 12px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-card class="form-card" shadow="never"> |
| | | <template #header> |
| | | <span class="card-title"> |
| | | <span class="card-title-line">|</span> |
| | | åºæ¬ä¿¡æ¯ |
| | | </span> |
| | | </template> |
| | | |
| | | <el-row :gutter="24"> |
| | | <el-col :span="5"> |
| | | <el-form-item label="åå·¥ç¼å·" prop="staffNo"> |
| | | <el-input |
| | | v-model="form.staffNo" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="20" |
| | | show-word-limit |
| | | :disabled="operationType !== 'add'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="å§å" prop="staffName"> |
| | | <el-input |
| | | v-model="form.staffName" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="50" |
| | | show-word-limit |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="å«å" prop="aliasName"> |
| | | <el-input |
| | | v-model="form.aliasName" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="50" |
| | | show-word-limit |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="ææº" prop="phone"> |
| | | <el-input |
| | | v-model="form.phone" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="11" |
| | | show-word-limit |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="æ§å«" prop="sex"> |
| | | <el-select |
| | | v-model="form.sex" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="ç·" value="ç·" /> |
| | | <el-option label="女" value="女" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="24"> |
| | | <el-col :span="5"> |
| | | <el-form-item label="åºçæ¥æ" prop="birthDate"> |
| | | <el-date-picker |
| | | v-model="form.birthDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="å¹´é¾" prop="age"> |
| | | <el-input-number |
| | | v-model="form.age" |
| | | :min="0" |
| | | :max="150" |
| | | :precision="0" |
| | | :step="1" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="ç±è´¯" prop="nativePlace"> |
| | | <el-input |
| | | v-model="form.nativePlace" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="50" |
| | | show-word-limit |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="æ°æ" prop="nation"> |
| | | <el-input |
| | | v-model="form.nation" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="20" |
| | | show-word-limit |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="å©å§»ç¶åµ" prop="maritalStatus"> |
| | | <el-select |
| | | v-model="form.maritalStatus" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="æªå©" value="single" /> |
| | | <el-option label="å·²å©" value="married" /> |
| | | <el-option label="离å¼" value="divorced" /> |
| | | <el-option label="丧å¶" value="widowed" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="24"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="è§è²" prop="roleIds"> |
| | | <el-select |
| | | v-model="form.roleIds" |
| | | multiple |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in roleOptions" |
| | | :key="item.roleId" |
| | | :label="item.roleName" |
| | | :value="item.roleId" |
| | | :disabled="item.status == 1" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { toRefs } from "vue"; |
| | | |
| | | const props = defineProps({ |
| | | form: { type: Object, required: true }, |
| | | operationType: { type: String, default: "add" }, |
| | | roleOptions: { type: Array, default: () => [] }, |
| | | }); |
| | | |
| | | const { form, operationType, roleOptions } = toRefs(props); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .form-card { |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .card-title-line { |
| | | color: #f56c6c; |
| | | margin-right: 4px; |
| | | } |
| | | </style> |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <!-- æè²ç»å --> |
| | | <el-card class="form-card" shadow="never"> |
| | | <template #header> |
| | | <span class="card-title"> |
| | | <span class="card-title-line">|</span> |
| | | æè²ç»å |
| | | </span> |
| | | </template> |
| | | <el-table :data="form.educationList" border> |
| | | <el-table-column label="å¦å" prop="degree" width="120"> |
| | | <template #default="{ row }"> |
| | | <el-select |
| | | v-model="row.degree" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="ä¸ä¸å以ä¸" value="secondary" /> |
| | | <el-option label="大ä¸" value="junior_college" /> |
| | | <el-option label="æ¬ç§" value="bachelor" /> |
| | | <el-option label="ç¡å£«" value="master" /> |
| | | <el-option label="å士å以ä¸" value="doctor" /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ¯ä¸é¢æ ¡" prop="school" min-width="160"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model="row.school" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="30" |
| | | show-word-limit |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å
¥å¦æ¶é´" prop="admissionDate" width="150"> |
| | | <template #default="{ row }"> |
| | | <el-date-picker |
| | | v-model="row.admissionDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | clearable |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ¯ä¸æ¶é´" prop="graduationDate" width="150"> |
| | | <template #default="{ row }"> |
| | | <el-date-picker |
| | | v-model="row.graduationDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | clearable |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ä¸ä¸" prop="major" min-width="140"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model="row.major" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="20" |
| | | show-word-limit |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¦ä½" prop="academicDegree" width="140"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model="row.academicDegree" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="20" |
| | | show-word-limit |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="80" align="center"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | v-if="form.educationList.length > 1" |
| | | type="primary" |
| | | link |
| | | @click="removeEducationRow(scope.$index)" |
| | | > |
| | | å é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="table-add-row" @click="addEducationRow">æ°å»ºä¸è¡</div> |
| | | </el-card> |
| | | |
| | | <!-- å·¥ä½ç»å --> |
| | | <el-card class="form-card" shadow="never"> |
| | | <template #header> |
| | | <span class="card-title"> |
| | | <span class="card-title-line">|</span> |
| | | å·¥ä½ç»å |
| | | </span> |
| | | </template> |
| | | <el-table :data="form.workExperienceList" border> |
| | | <el-table-column label="åå
¬å¸" prop="company" min-width="180"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model="row.company" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="30" |
| | | show-word-limit |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åå
¬å¸é¨é¨" prop="department" min-width="140"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model="row.department" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="20" |
| | | show-word-limit |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åå
¬å¸èä½" prop="position" min-width="140"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model="row.position" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="20" |
| | | show-word-limit |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¼å§æ¥æ" prop="startDate" width="150"> |
| | | <template #default="{ row }"> |
| | | <el-date-picker |
| | | v-model="row.startDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | clearable |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç»ææ¥æ" prop="endDate" width="150"> |
| | | <template #default="{ row }"> |
| | | <el-date-picker |
| | | v-model="row.endDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | clearable |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥ä½æè¿°" prop="description" min-width="220"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model="row.description" |
| | | type="textarea" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="500" |
| | | show-word-limit |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="80" align="center"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | v-if="form.workExperienceList.length > 1" |
| | | type="primary" |
| | | link |
| | | @click="removeWorkRow(scope.$index)" |
| | | > |
| | | å é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="table-add-row" @click="addWorkRow">æ°å»ºä¸è¡</div> |
| | | </el-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { toRefs } from "vue"; |
| | | |
| | | const props = defineProps({ |
| | | form: { type: Object, required: true }, |
| | | }); |
| | | |
| | | const emit = defineEmits(["update:form"]); |
| | | |
| | | const { form } = toRefs(props); |
| | | |
| | | const addEducationRow = () => { |
| | | form.value.educationList.push({ |
| | | degree: "", |
| | | school: "", |
| | | admissionDate: "", |
| | | graduationDate: "", |
| | | major: "", |
| | | academicDegree: "", |
| | | }); |
| | | }; |
| | | |
| | | const removeEducationRow = (index) => { |
| | | if (form.value.educationList.length <= 1) return; |
| | | form.value.educationList.splice(index, 1); |
| | | }; |
| | | |
| | | const addWorkRow = () => { |
| | | form.value.workExperienceList.push({ |
| | | company: "", |
| | | department: "", |
| | | position: "", |
| | | startDate: "", |
| | | endDate: "", |
| | | description: "", |
| | | }); |
| | | }; |
| | | |
| | | const removeWorkRow = (index) => { |
| | | if (form.value.workExperienceList.length <= 1) return; |
| | | form.value.workExperienceList.splice(index, 1); |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .form-card { |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .card-title-line { |
| | | color: #f56c6c; |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .table-add-row { |
| | | margin-top: 8px; |
| | | color: #409eff; |
| | | cursor: pointer; |
| | | font-size: 14px; |
| | | } |
| | | </style> |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <!-- ç´§æ¥è系人 --> |
| | | <el-card class="form-card" shadow="never"> |
| | | <template #header> |
| | | <span class="card-title"> |
| | | <span class="card-title-line">|</span> |
| | | ç´§æ¥è系人 |
| | | </span> |
| | | </template> |
| | | <el-table :data="form.emergencyContacts" border> |
| | | <el-table-column label="ç´§æ¥è系人å§å" prop="name" min-width="160"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model="row.name" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="50" |
| | | show-word-limit |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç´§æ¥è系人å
³ç³»" prop="relation" min-width="140"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model="row.relation" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="20" |
| | | show-word-limit |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç´§æ¥èç³»äººææº" prop="phone" width="160"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model="row.phone" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="11" |
| | | show-word-limit |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç´§æ¥è系人ä½å" prop="address" min-width="220"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model="row.address" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="50" |
| | | show-word-limit |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="80" align="center"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | v-if="form.emergencyContacts.length > 1" |
| | | type="primary" |
| | | link |
| | | @click="removeEmergencyRow(scope.$index)" |
| | | > |
| | | å é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="table-add-row" @click="addEmergencyRow">æ°å»ºä¸è¡</div> |
| | | </el-card> |
| | | |
| | | <!-- ææéä»¶ --> |
| | | <el-card class="form-card" shadow="never"> |
| | | <template #header> |
| | | <div class="card-title"> |
| | | <span class="card-title-line">|</span> |
| | | <span>ææéä»¶</span> |
| | | <span class="upload-tip"> |
| | | å¾çæ¯æjpegãjpgãpngçæ ¼å¼ï¼éä»¶æä»¶æ¯æpdfãrarãzipãdocãdocxæ ¼å¼ã |
| | | </span> |
| | | </div> |
| | | </template> |
| | | <el-form-item label="éä»¶"> |
| | | <el-upload |
| | | v-model:file-list="form.attachments" |
| | | action="#" |
| | | :auto-upload="false" |
| | | multiple |
| | | list-type="picture-card" |
| | | > |
| | | <el-icon> |
| | | <Plus /> |
| | | </el-icon> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { toRefs } from "vue"; |
| | | import { Plus } from "@element-plus/icons-vue"; |
| | | |
| | | const props = defineProps({ |
| | | form: { type: Object, required: true }, |
| | | }); |
| | | |
| | | const { form } = toRefs(props); |
| | | |
| | | const addEmergencyRow = () => { |
| | | form.value.emergencyContacts.push({ |
| | | name: "", |
| | | relation: "", |
| | | phone: "", |
| | | address: "", |
| | | }); |
| | | }; |
| | | |
| | | const removeEmergencyRow = (index) => { |
| | | if (form.value.emergencyContacts.length <= 1) return; |
| | | form.value.emergencyContacts.splice(index, 1); |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .form-card { |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .card-title-line { |
| | | color: #f56c6c; |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .table-add-row { |
| | | margin-top: 8px; |
| | | color: #409eff; |
| | | cursor: pointer; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .upload-tip { |
| | | margin-left: 12px; |
| | | font-size: 12px; |
| | | color: #909399; |
| | | } |
| | | </style> |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-card class="form-card" shadow="never"> |
| | | <template #header> |
| | | <span class="card-title"> |
| | | <span class="card-title-line">|</span> |
| | | å¨èä¿¡æ¯ |
| | | </span> |
| | | </template> |
| | | |
| | | <el-row :gutter="24"> |
| | | <el-col :span="5"> |
| | | <el-form-item label="å·¥å·" prop="jobNo"> |
| | | <el-input |
| | | v-model="form.jobNo" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="20" |
| | | show-word-limit |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="å工类å" prop="staffType"> |
| | | <el-select |
| | | v-model="form.staffType" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="æ£å¼åå·¥" value="official" /> |
| | | <el-option label="è¯ç¨åå·¥" value="probation" /> |
| | | <el-option label="å®ä¹ ç" value="intern" /> |
| | | <el-option label="å
¼è" value="part_time" /> |
| | | <el-option label="å³å¡/å¤å
" value="outsourcing" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="å
¥èæ¥æ" prop="entryDate"> |
| | | <el-date-picker |
| | | v-model="form.entryDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="è¯ç¨æï¼æï¼" prop="probationPeriod"> |
| | | <el-input-number |
| | | v-model="form.probationPeriod" |
| | | :min="0" |
| | | :max="24" |
| | | :precision="0" |
| | | :step="1" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="è½¬æ£æ¥æ" prop="regularDate"> |
| | | <el-date-picker |
| | | v-model="form.regularDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="24"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="é¨é¨" prop="sysDeptId"> |
| | | <el-tree-select |
| | | v-model="form.sysDeptId" |
| | | :data="deptOptions" |
| | | check-strictly |
| | | :render-after-expand="false" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç´æ¥ä¸çº§" prop="directLeader"> |
| | | <el-input |
| | | v-model="form.directLeader" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="50" |
| | | show-word-limit |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å²ä½" prop="sysPostId"> |
| | | <el-select |
| | | v-model="form.sysPostId" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in postOptions" |
| | | :key="item.postId" |
| | | :label="item.postName" |
| | | :value="item.postId" |
| | | :disabled="item.status === '1'" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="24"> |
| | | <el-col :span="5"> |
| | | <el-form-item label="è级" prop="jobLevel"> |
| | | <el-input |
| | | v-model="form.jobLevel" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="10" |
| | | show-word-limit |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="åºæ¬å·¥èµ" prop="basicSalary"> |
| | | <el-input-number |
| | | v-model="form.basicSalary" |
| | | :min="0" |
| | | :max="999999" |
| | | :precision="2" |
| | | :step="100" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { toRefs } from "vue"; |
| | | |
| | | const props = defineProps({ |
| | | form: { type: Object, required: true }, |
| | | postOptions: { type: Array, default: () => [] }, |
| | | deptOptions: { type: Array, default: () => [] }, |
| | | }); |
| | | |
| | | const { form, postOptions, deptOptions } = toRefs(props); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .form-card { |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .card-title-line { |
| | | color: #f56c6c; |
| | | margin-right: 4px; |
| | | } |
| | | </style> |
| | | |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-model="dialogFormVisible" |
| | | :title="operationType === 'add' ? 'æ°å¢å
¥è' : 'ç¼è¾äººå'" |
| | | width="70%" |
| | | @close="closeDia"> |
| | | <el-form :model="form" |
| | | label-width="140px" |
| | | label-position="top" |
| | | :rules="rules" |
| | | ref="formRef"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå·¥ç¼å·ï¼" |
| | | prop="staffNo"> |
| | | <el-input v-model="form.staffNo" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | :disabled="operationType !== 'add'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å§åï¼" |
| | | prop="staffName"> |
| | | <el-input v-model="form.staffName" |
| | | placeholder="请è¾å
¥" |
| | | clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ§å«ï¼" |
| | | prop="sex"> |
| | | <el-select v-model="form.sex"> |
| | | <el-option label="ç·" |
| | | value="ç·" /> |
| | | <el-option label="女" |
| | | value="女" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ·ç±ä½åï¼" |
| | | prop="nativePlace"> |
| | | <el-input v-model="form.nativePlace" |
| | | placeholder="请è¾å
¥" |
| | | clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å²ä½ï¼" |
| | | prop="sysPostId"> |
| | | <el-select v-model="form.sysPostId" |
| | | placeholder="è¯·éæ©å²ä½" |
| | | clearable> |
| | | <el-option v-for="item in postOptions" |
| | | :key="item.postId" |
| | | :label="item.postName" |
| | | :value="item.postId" |
| | | :disabled="item.status === '1'" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç°ä½åï¼" |
| | | prop="adress"> |
| | | <el-input v-model="form.adress" |
| | | placeholder="请è¾å
¥" |
| | | clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é¨é¨ï¼" |
| | | prop="sysDeptId"> |
| | | <el-tree-select v-model="form.sysDeptId" |
| | | :data="deptOptions" |
| | | :props="{ value: 'id', label: 'label', children: 'children' }" |
| | | value-key="id" |
| | | placeholder="è¯·éæ©é¨é¨" |
| | | check-strictly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¹´é¾ï¼" |
| | | prop="age"> |
| | | <el-input-number v-model="form.age" |
| | | :precision="0" |
| | | :step="1" |
| | | style="width: 100%" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="第ä¸å¦åï¼" |
| | | prop="firstStudy"> |
| | | <el-input v-model="form.firstStudy" |
| | | placeholder="请è¾å
¥" |
| | | clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸ä¸ï¼" |
| | | prop="profession"> |
| | | <el-input v-model="form.profession" |
| | | placeholder="请è¾å
¥" |
| | | clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èç³»çµè¯ï¼" |
| | | prop="phone"> |
| | | <el-input v-model="form.phone" |
| | | placeholder="请è¾å
¥" |
| | | clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç´§æ¥è系人ï¼" |
| | | prop="emergencyContact"> |
| | | <el-input v-model="form.emergencyContact" |
| | | placeholder="请è¾å
¥" |
| | | clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç´§æ¥è系人èç³»çµè¯ï¼" |
| | | prop="emergencyContactPhone"> |
| | | <el-input v-model="form.emergencyContactPhone" |
| | | placeholder="请è¾å
¥" |
| | | clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ååå¹´éï¼" |
| | | prop="contractTerm"> |
| | | <el-input-number v-model="form.contractTerm" |
| | | :precision="0" |
| | | :step="1" |
| | | style="width: 100%" |
| | | :disabled="true" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ååå¼å§æ¥æï¼" |
| | | prop="contractStartTime"> |
| | | <el-date-picker v-model="form.contractStartTime" |
| | | type="date" |
| | | placeholder="è¯·éæ©æ¥æ" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | style="width: 100%" |
| | | @change="calculateContractTerm" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ååç»ææ¥æï¼" |
| | | prop="contractEndTime"> |
| | | <el-date-picker v-model="form.contractEndTime" |
| | | type="date" |
| | | placeholder="è¯·éæ©æ¥æ" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | style="width: 100%" |
| | | @change="calculateContractTerm" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <FormDialog |
| | | v-model="dialogFormVisible" |
| | | :operation-type="operationType" |
| | | :title="dialogTitle" |
| | | width="90%" |
| | | @close="closeDia" |
| | | @confirm="submitForm" |
| | | @cancel="closeDia" |
| | | > |
| | | <div class="form-dia-body"> |
| | | <el-form |
| | | ref="formRef" |
| | | :model="form" |
| | | :rules="rules" |
| | | label-position="top" |
| | | > |
| | | <BasicInfoSection |
| | | :form="form" |
| | | :operation-type="operationType" |
| | | :role-options="roleOptions" |
| | | /> |
| | | <JobInfoSection |
| | | :form="form" |
| | | :post-options="postOptions" |
| | | :dept-options="deptOptions" |
| | | /> |
| | | <EducationWorkSection :form="form" /> |
| | | <EmergencyAndAttachmentSection :form="form" /> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" |
| | | @click="submitForm">确认</el-button> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | </FormDialog> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, onMounted } from "vue"; |
| | | import { findPostOptions } from "@/api/system/post.js"; |
| | | import { listDept } from "@/api/system/dept.js"; |
| | | import { |
| | | staffOnJobInfo, |
| | | createStaffOnJob, |
| | | updateStaffOnJob, |
| | | } from "@/api/personnelManagement/staffOnJob.js"; |
| | | import { deptTreeSelect } from "@/api/system/user.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const emit = defineEmits(["close"]); |
| | | import { |
| | | ref, |
| | | reactive, |
| | | toRefs, |
| | | onMounted, |
| | | getCurrentInstance, |
| | | nextTick, |
| | | } from "vue"; |
| | | import FormDialog from "@/components/Dialog/FormDialog.vue"; |
| | | import { findPostOptions } from "@/api/system/post.js"; |
| | | import { deptTreeSelect, getUser } from "@/api/system/user.js"; |
| | | import { |
| | | staffOnJobInfo, |
| | | createStaffOnJob, |
| | | updateStaffOnJob, |
| | | } from "@/api/personnelManagement/staffOnJob.js"; |
| | | |
| | | const dialogFormVisible = ref(false); |
| | | const operationType = ref(""); |
| | | const id = ref(0); |
| | | const data = reactive({ |
| | | form: { |
| | | staffNo: "", |
| | | staffName: "", |
| | | sex: "", |
| | | nativePlace: "", |
| | | postJob: "", |
| | | adress: "", |
| | | firstStudy: "", |
| | | profession: "", |
| | | age: 0, |
| | | phone: "", |
| | | emergencyContact: "", |
| | | emergencyContactPhone: "", |
| | | contractTerm: 0, |
| | | contractStartTime: "", |
| | | contractEndTime: "", |
| | | sysPostId: undefined, |
| | | sysDeptId: undefined, |
| | | }, |
| | | rules: { |
| | | staffNo: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | staffName: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | sex: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | nativePlace: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | postJob: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | adress: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | firstStudy: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | profession: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | age: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | phone: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | emergencyContact: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | emergencyContactPhone: [ |
| | | { required: true, message: "请è¾å
¥", trigger: "blur" }, |
| | | ], |
| | | contractTerm: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | contractStartTime: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | contractEndTime: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | sysDeptId: [{ required: true, message: "è¯·éæ©", trigger: "change" }], |
| | | }, |
| | | postOptions: [], // å²ä½é项 |
| | | deptOptions: [], // é¨é¨é项 |
| | | import BasicInfoSection from "./BasicInfoSection.vue"; |
| | | import JobInfoSection from "./JobInfoSection.vue"; |
| | | import EducationWorkSection from "./EducationWorkSection.vue"; |
| | | import EmergencyAndAttachmentSection from "./EmergencyAndAttachmentSection.vue"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const emit = defineEmits(["close"]); |
| | | |
| | | const dialogFormVisible = ref(false); |
| | | const operationType = ref("add"); |
| | | const id = ref(0); |
| | | const formRef = ref(null); |
| | | |
| | | const dialogTitle = () => |
| | | operationType.value === "add" ? "æ°å¢å
¥è" : "ç¼è¾äººå"; |
| | | |
| | | const createEmptyEducation = () => ({ |
| | | degree: "", |
| | | school: "", |
| | | admissionDate: "", |
| | | graduationDate: "", |
| | | major: "", |
| | | academicDegree: "", |
| | | }); |
| | | |
| | | const createEmptyWork = () => ({ |
| | | company: "", |
| | | department: "", |
| | | position: "", |
| | | startDate: "", |
| | | endDate: "", |
| | | description: "", |
| | | }); |
| | | |
| | | const createEmptyEmergency = () => ({ |
| | | name: "", |
| | | relation: "", |
| | | phone: "", |
| | | address: "", |
| | | }); |
| | | |
| | | const createDefaultForm = () => ({ |
| | | id: undefined, |
| | | // åºæ¬ä¿¡æ¯ |
| | | staffNo: "", |
| | | staffName: "", |
| | | aliasName: "", |
| | | phone: "", |
| | | sex: "", |
| | | birthDate: "", |
| | | age: undefined, |
| | | nativePlace: "", |
| | | nation: "", |
| | | maritalStatus: "", |
| | | politicalStatus: "", |
| | | firstWorkDate: "", |
| | | workingYears: undefined, |
| | | idCardNo: "", |
| | | hukouType: "", |
| | | email: "", |
| | | currentAddress: "", |
| | | // å¨èä¿¡æ¯ |
| | | jobNo: "", |
| | | staffType: "", |
| | | entryDate: "", |
| | | probationPeriod: undefined, |
| | | regularDate: "", |
| | | sysDeptId: undefined, |
| | | directLeader: "", |
| | | sysPostId: undefined, |
| | | jobLevel: "", |
| | | basicSalary: undefined, |
| | | // é¶è¡å¡ä¿¡æ¯ |
| | | bankName: "", |
| | | bankCardNo: "", |
| | | // æè²ç»å |
| | | educationList: [createEmptyEducation()], |
| | | // å·¥ä½ç»å |
| | | workExperienceList: [createEmptyWork()], |
| | | // ç´§æ¥è系人 |
| | | emergencyContacts: [createEmptyEmergency()], |
| | | emergencyContact: "", |
| | | emergencyContactPhone: "", |
| | | // è§è² |
| | | roleIds: [], |
| | | // ææéä»¶ï¼ä»
å端å±ç¤ºï¼ |
| | | attachments: [], |
| | | }); |
| | | |
| | | const state = reactive({ |
| | | form: createDefaultForm(), |
| | | rules: { |
| | | staffNo: [{ required: true, message: "请è¾å
¥åå·¥ç¼å·", trigger: "blur" }], |
| | | staffName: [{ required: true, message: "请è¾å
¥å§å", trigger: "blur" }], |
| | | phone: [{ required: true, message: "请è¾å
¥ææº", trigger: "blur" }], |
| | | sex: [{ required: true, message: "è¯·éæ©æ§å«", trigger: "change" }], |
| | | birthDate: [ |
| | | { required: true, message: "è¯·éæ©åºçæ¥æ", trigger: "change" }, |
| | | ], |
| | | jobNo: [{ required: true, message: "请è¾å
¥å·¥å·", trigger: "blur" }], |
| | | staffType: [ |
| | | { required: true, message: "è¯·éæ©å工类å", trigger: "change" }, |
| | | ], |
| | | entryDate: [ |
| | | { required: true, message: "è¯·éæ©å
¥èæ¥æ", trigger: "change" }, |
| | | ], |
| | | sysDeptId: [ |
| | | { required: true, message: "è¯·éæ©é¨é¨", trigger: "change" }, |
| | | ], |
| | | roleIds: [ |
| | | { |
| | | required: true, |
| | | type: "array", |
| | | min: 1, |
| | | message: "请è³å°éæ©ä¸ä¸ªè§è²", |
| | | trigger: "change", |
| | | }, |
| | | ], |
| | | }, |
| | | postOptions: [], |
| | | deptOptions: [], |
| | | }); |
| | | |
| | | const { form, rules, postOptions, deptOptions } = toRefs(state); |
| | | const roleOptions = ref([]); |
| | | |
| | | const resetForm = () => { |
| | | Object.assign(form.value, createDefaultForm()); |
| | | nextTick(() => { |
| | | formRef.value?.clearValidate(); |
| | | }); |
| | | const { form, rules, postOptions, deptOptions } = toRefs(data); |
| | | }; |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openDialog = (type, row) => { |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | if (operationType.value === "edit") { |
| | | id.value = row.id; |
| | | staffOnJobInfo(id.value, {}).then(res => { |
| | | form.value = { ...res.data }; |
| | | if (form.value.sysPostId === 0) { |
| | | form.value.sysPostId = undefined; |
| | | } |
| | | if (form.value.sysDeptId === 0) { |
| | | form.value.sysDeptId = undefined; |
| | | } |
| | | // ç¼è¾æ¶ä¹è®¡ç®ä¸æ¬¡ååå¹´é |
| | | calculateContractTerm(); |
| | | }); |
| | | } else { |
| | | form.value.id = ""; |
| | | const fetchPostOptions = () => { |
| | | findPostOptions().then((res) => { |
| | | postOptions.value = res.data || []; |
| | | }); |
| | | }; |
| | | |
| | | const fetchDeptOptions = () => { |
| | | deptTreeSelect().then((response) => { |
| | | deptOptions.value = filterDisabledDept( |
| | | JSON.parse(JSON.stringify(response.data || [])) |
| | | ); |
| | | }); |
| | | }; |
| | | |
| | | const fetchRoleOptions = () => { |
| | | getUser().then((res) => { |
| | | roleOptions.value = res.roles || []; |
| | | }); |
| | | }; |
| | | |
| | | function filterDisabledDept(deptList) { |
| | | return deptList.filter((dept) => { |
| | | if (dept.disabled) { |
| | | return false; |
| | | } |
| | | }; |
| | | onMounted(() => { |
| | | fetchPostOptions(); |
| | | fetchDeptOptions(); |
| | | if (dept.children && dept.children.length) { |
| | | dept.children = filterDisabledDept(dept.children); |
| | | } |
| | | return true; |
| | | }); |
| | | } |
| | | |
| | | const fetchPostOptions = () => { |
| | | findPostOptions().then(res => { |
| | | postOptions.value = res.data; |
| | | }); |
| | | }; |
| | | const syncEmergencyToLegacyField = () => { |
| | | const first = form.value.emergencyContacts?.[0]; |
| | | form.value.emergencyContact = first?.name || ""; |
| | | form.value.emergencyContactPhone = first?.phone || ""; |
| | | }; |
| | | |
| | | // æ¥è¯¢é¨é¨å表 |
| | | const fetchDeptOptions = () => { |
| | | deptTreeSelect().then(response => { |
| | | deptOptions.value = filterDisabledDept( |
| | | JSON.parse(JSON.stringify(response.data)) |
| | | ); |
| | | }); |
| | | }; |
| | | |
| | | /** è¿æ»¤ç¦ç¨çé¨é¨ */ |
| | | function filterDisabledDept(deptList) { |
| | | return deptList.filter(dept => { |
| | | if (dept.disabled) { |
| | | return false; |
| | | const openDialog = (type, row) => { |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | fetchPostOptions(); |
| | | fetchDeptOptions(); |
| | | fetchRoleOptions(); |
| | | resetForm(); |
| | | if (type === "edit" && row?.id) { |
| | | id.value = row.id; |
| | | staffOnJobInfo(id.value, {}).then((res) => { |
| | | const d = res.data || {}; |
| | | Object.assign(form.value, { |
| | | ...form.value, |
| | | ...d, |
| | | }); |
| | | if (!Array.isArray(form.value.educationList) || !form.value.educationList.length) { |
| | | form.value.educationList = [createEmptyEducation()]; |
| | | } |
| | | if (dept.children && dept.children.length) { |
| | | dept.children = filterDisabledDept(dept.children); |
| | | if ( |
| | | !Array.isArray(form.value.workExperienceList) || |
| | | !form.value.workExperienceList.length |
| | | ) { |
| | | form.value.workExperienceList = [createEmptyWork()]; |
| | | } |
| | | return true; |
| | | if ( |
| | | !Array.isArray(form.value.emergencyContacts) || |
| | | !form.value.emergencyContacts.length |
| | | ) { |
| | | form.value.emergencyContacts = [createEmptyEmergency()]; |
| | | } |
| | | if (form.value.sysPostId === 0) { |
| | | form.value.sysPostId = undefined; |
| | | } |
| | | if (form.value.sysDeptId === 0) { |
| | | form.value.sysDeptId = undefined; |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | // æäº¤äº§å表å |
| | | const submitForm = () => { |
| | | if (!form.value.sysPostId) { |
| | | form.value.sysPostId = undefined; |
| | | } |
| | | if (!form.value.sysDeptId) { |
| | | form.value.sysDeptId = undefined; |
| | | } |
| | | proxy.$refs.formRef.validate(valid => { |
| | | if (valid) { |
| | | if (operationType.value === "add") { |
| | | createStaffOnJob(form.value).then(res => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }); |
| | | } else { |
| | | updateStaffOnJob(id.value, form.value).then(res => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }; |
| | | // 计ç®ååå¹´é |
| | | const calculateContractTerm = () => { |
| | | if (form.value.contractStartTime && form.value.contractEndTime) { |
| | | const startDate = new Date(form.value.contractStartTime); |
| | | const endDate = new Date(form.value.contractEndTime); |
| | | onMounted(() => { |
| | | fetchPostOptions(); |
| | | fetchDeptOptions(); |
| | | }); |
| | | |
| | | if (endDate > startDate) { |
| | | // 计ç®å¹´ä»½å·® |
| | | const yearDiff = endDate.getFullYear() - startDate.getFullYear(); |
| | | const monthDiff = endDate.getMonth() - startDate.getMonth(); |
| | | const dayDiff = endDate.getDate() - startDate.getDate(); |
| | | |
| | | let years = yearDiff; |
| | | |
| | | // å¦æç»ææ¥æçææ¥å°äºå¼å§æ¥æçææ¥ï¼ååå»1å¹´ |
| | | if (monthDiff < 0 || (monthDiff === 0 && dayDiff < 0)) { |
| | | years = yearDiff - 1; |
| | | } |
| | | |
| | | form.value.contractTerm = Math.max(0, years); |
| | | const submitForm = () => { |
| | | if (!form.value.sysPostId) { |
| | | form.value.sysPostId = undefined; |
| | | } |
| | | if (!form.value.sysDeptId) { |
| | | form.value.sysDeptId = undefined; |
| | | } |
| | | syncEmergencyToLegacyField(); |
| | | formRef.value?.validate((valid) => { |
| | | if (valid) { |
| | | if (operationType.value === "add") { |
| | | createStaffOnJob(form.value).then(() => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }); |
| | | } else { |
| | | form.value.contractTerm = 0; |
| | | updateStaffOnJob(id.value, form.value).then(() => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }); |
| | | } |
| | | } else { |
| | | form.value.contractTerm = 0; |
| | | } |
| | | }; |
| | | |
| | | // å
³éå¼¹æ¡ |
| | | const closeDia = () => { |
| | | proxy.resetForm("formRef"); |
| | | dialogFormVisible.value = false; |
| | | emit("close"); |
| | | }; |
| | | defineExpose({ |
| | | openDialog, |
| | | }); |
| | | }; |
| | | |
| | | const closeDia = () => { |
| | | formRef.value?.resetFields(); |
| | | dialogFormVisible.value = false; |
| | | emit("close"); |
| | | }; |
| | | |
| | | defineExpose({ |
| | | openDialog, |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .form-dia-body { |
| | | padding: 0; |
| | | } |
| | | |
| | | .card-title-line { |
| | | color: #f56c6c; |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .form-card { |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .dialog-footer { |
| | | text-align: right; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <el-dialog v-model="dialogVisible" |
| | | :title="title" |
| | | width="700px" |
| | | :close-on-click-modal="false"> |
| | | <el-form ref="formRef" |
| | | :model="form" |
| | | :rules="rules" |
| | | label-width="140px" |
| | | label-position="top"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»è®¡æä»½" |
| | | prop="payDate"> |
| | | <el-date-picker v-model="form.payDate" |
| | | type="month" |
| | | value-format="YYYY-MM" |
| | | format="YYYY-MM" |
| | | placeholder="è¯·éæ©æä»½" |
| | | style="width: 100%" |
| | | :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å§å" |
| | | prop="staffId"> |
| | | <el-select v-model="form.staffId" |
| | | placeholder="è¯·éæ©åå·¥" |
| | | style="width: 100%" |
| | | :disabled="operationType === 'view'"> |
| | | <el-option v-for="item in userList" |
| | | :key="item.id" |
| | | :label="item.staffName" |
| | | :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åºæ¬å·¥èµ" |
| | | prop="basicSalary"> |
| | | <el-input v-model="form.basicSalary" |
| | | type="number" |
| | | placeholder="请è¾å
¥åºæ¬å·¥èµ" |
| | | :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计件工èµ" |
| | | prop="pieceworkSalary"> |
| | | <el-input v-model="form.pieceworkSalary" |
| | | type="number" |
| | | placeholder="请è¾å
¥è®¡ä»¶å·¥èµ" |
| | | :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计æ¶å·¥èµ" |
| | | prop="hourlySalary"> |
| | | <el-input v-model="form.hourlySalary" |
| | | type="number" |
| | | placeholder="请è¾å
¥è®¡æ¶å·¥èµ" |
| | | :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å
¶ä»æ¶å
¥" |
| | | prop="otherIncome"> |
| | | <el-input v-model="form.otherIncome" |
| | | type="number" |
| | | placeholder="请è¾å
¥å
¶ä»æ¶å
¥" |
| | | :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="社ä¿ä¸ªäºº" |
| | | prop="socialSecurityIndividuals"> |
| | | <el-input v-model="form.socialSecurityIndividuals" |
| | | type="number" |
| | | placeholder="请è¾å
¥ç¤¾ä¿ä¸ªäºº" |
| | | :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å
¬ç§¯é个人" |
| | | prop="providentFundIndividuals"> |
| | | <el-input v-model="form.providentFundIndividuals" |
| | | type="number" |
| | | placeholder="请è¾å
¥å
¬ç§¯é个人" |
| | | :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="个人æå¾ç¨" |
| | | prop="personalIncomeTax"> |
| | | <el-input v-model="form.personalIncomeTax" |
| | | type="number" |
| | | placeholder="请è¾å
¥ä¸ªäººæå¾ç¨" |
| | | :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å
¶ä»æ£æ¬¾" |
| | | prop="otherDeductions"> |
| | | <el-input v-model="form.otherDeductions" |
| | | type="number" |
| | | placeholder="请è¾å
¥å
¶ä»æ£æ¬¾" |
| | | :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨" |
| | | prop="remark"> |
| | | <el-input v-model="form.remark" |
| | | type="textarea" |
| | | placeholder="请è¾å
¥å¤æ³¨" |
| | | :rows="3" |
| | | :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | :title="operationType === 'add' ? 'æ°å»ºå·¥èµè¡¨' : 'ç¼è¾å·¥èµè¡¨'" |
| | | width="90%" |
| | | :close-on-click-modal="false" |
| | | destroy-on-close |
| | | @close="closeDia" |
| | | > |
| | | <div class="form-dia-body"> |
| | | <!-- åºç¡èµæ --> |
| | | <el-card class="form-card" shadow="never"> |
| | | <template #header> |
| | | <span class="card-title"><span class="card-title-line">|</span> åºç¡èµæ</span> |
| | | <el-icon class="card-collapse"><ArrowUp /></el-icon> |
| | | </template> |
| | | <el-form ref="formRef" :model="form" :rules="rules" label-position="top"> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="å·¥èµä¸»é¢" prop="title"> |
| | | <el-input |
| | | v-model="form.title" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | maxlength="20" |
| | | show-word-limit |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="éæ©é¨é¨" prop="deptId"> |
| | | <el-select |
| | | v-model="form.deptId" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in deptOptions" |
| | | :key="item.deptId" |
| | | :label="item.deptName" |
| | | :value="item.deptId" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="éæ©å·¥èµæä»½" prop="payMonth"> |
| | | <el-date-picker |
| | | v-model="form.payMonth" |
| | | type="month" |
| | | value-format="YYYY-MM" |
| | | format="YYYY-MM" |
| | | placeholder="è¯·éæ©å·¥èµæä»½" |
| | | style="width: 100%" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="夿³¨" prop="remark"> |
| | | <el-input |
| | | v-model="form.remark" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-card> |
| | | |
| | | <!-- æä½æé® --> |
| | | <div class="toolbar"> |
| | | <el-button type="primary" @click="handleGenerate">çæå·¥èµè¡¨</el-button> |
| | | <el-button @click="handleExport">导åº</el-button> |
| | | <el-button @click="handleImport">导å
¥</el-button> |
| | | <el-button @click="handleClear">æ¸
空</el-button> |
| | | <el-button @click="openAddPerson">æ°å¢äººå</el-button> |
| | | <el-button @click="handleBatchDelete">å é¤</el-button> |
| | | <el-button @click="handleTaxForm">个ç¨è¡¨</el-button> |
| | | </div> |
| | | |
| | | <!-- å工工èµè¯¦æ
è¡¨æ ¼ --> |
| | | <div class="employee-table-wrap"> |
| | | <el-table |
| | | ref="employeeTableRef" |
| | | :data="employeeList" |
| | | border |
| | | max-height="400" |
| | | @selection-change="onEmployeeSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="åå·¥å§å" prop="staffName" minWidth="100" /> |
| | | <el-table-column label="è§è²" prop="roleName" minWidth="100" /> |
| | | <el-table-column label="é¨é¨" prop="deptName" minWidth="100" /> |
| | | <el-table-column label="åºæ¬å·¥èµ" minWidth="110"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model.number="row.basicSalary" |
| | | type="number" |
| | | placeholder="0" |
| | | size="small" |
| | | @input="row.basicSalary = parseNum(row.basicSalary)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="计件工èµ" minWidth="110"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model.number="row.pieceworkSalary" |
| | | type="number" |
| | | placeholder="0" |
| | | size="small" |
| | | @input="row.pieceworkSalary = parseNum(row.pieceworkSalary)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="计æ¶å·¥èµ" minWidth="110"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model.number="row.hourlySalary" |
| | | type="number" |
| | | placeholder="0" |
| | | size="small" |
| | | @input="row.hourlySalary = parseNum(row.hourlySalary)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å
¶ä»æ¶å
¥" minWidth="110"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model.number="row.otherIncome" |
| | | type="number" |
| | | placeholder="0" |
| | | size="small" |
| | | @input="row.otherIncome = parseNum(row.otherIncome)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="社ä¿ä¸ªäºº" minWidth="110"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model.number="row.socialSecurityIndividuals" |
| | | type="number" |
| | | placeholder="0" |
| | | size="small" |
| | | @input="row.socialSecurityIndividuals = parseNum(row.socialSecurityIndividuals)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å
¬ç§¯é个人" minWidth="120"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model.number="row.providentFundIndividuals" |
| | | type="number" |
| | | placeholder="0" |
| | | size="small" |
| | | @input="row.providentFundIndividuals = parseNum(row.providentFundIndividuals)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="80" align="center" fixed="right"> |
| | | <template #default="{ row }"> |
| | | <el-button type="primary" link @click="removeEmployee(row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div v-if="!employeeList.length" class="table-empty">ææ æ°æ®</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">åæ¶</el-button> |
| | | <el-button type="primary" |
| | | @click="submitForm" |
| | | v-if="operationType !== 'view'"> |
| | | ç¡®å® |
| | | </el-button> |
| | | </span> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | | <el-button type="primary" @click="submitForm">ç¡®å®</el-button> |
| | | </div> |
| | | </template> |
| | | |
| | | <!-- æ°å¢äººåå¼¹çª --> |
| | | <el-dialog |
| | | v-model="addPersonVisible" |
| | | title="æ°å¢äººå" |
| | | width="400px" |
| | | append-to-body |
| | | @close="addPersonClose" |
| | | > |
| | | <div class="add-person-tree"> |
| | | <el-tree |
| | | ref="personTreeRef" |
| | | :data="deptStaffTree" |
| | | show-checkbox |
| | | node-key="id" |
| | | :props="{ label: 'label', children: 'children' }" |
| | | default-expand-all |
| | | /> |
| | | </div> |
| | | <template #footer> |
| | | <el-button @click="addPersonVisible = false">åæ¶</el-button> |
| | | <el-button type="primary" @click="confirmAddPerson">ç¡®å®</el-button> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <!-- 个ç¨è¡¨å¼¹çª --> |
| | | <el-dialog |
| | | v-model="taxDialogVisible" |
| | | title="个ç¨è¡¨" |
| | | width="700px" |
| | | append-to-body |
| | | > |
| | | <div class="tax-desc">个人æå¾ç¨å
å¾é¢ï¼5000å
</div> |
| | | <el-table :data="taxTableData" border style="width: 100%;margin-bottom: 20px;"> |
| | | <el-table-column prop="level" label="级æ°" width="80" align="center" /> |
| | | <el-table-column |
| | | prop="range" |
| | | label="å
¨å¹´åºçº³ç¨æå¾é¢/å
" |
| | | min-width="220" |
| | | /> |
| | | <el-table-column |
| | | prop="rate" |
| | | label="ç¨ç(%)" |
| | | width="100" |
| | | align="center" |
| | | /> |
| | | <el-table-column |
| | | prop="quickDeduction" |
| | | label="éç®æ£é¤æ°/å
" |
| | | width="160" |
| | | align="center" |
| | | /> |
| | | </el-table> |
| | | </el-dialog> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, reactive, computed, onMounted } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { |
| | | monthlyStatisticsAdd, |
| | | monthlyStatisticsUpdate, |
| | | staffOnJobList, |
| | | } from "@/api/personnelManagement/monthlyStatistics.js"; |
| | | import { ref, reactive, toRefs, computed, getCurrentInstance, nextTick } from "vue"; |
| | | import { ArrowUp } from "@element-plus/icons-vue"; |
| | | import { listDept } from "@/api/system/dept.js"; |
| | | import { staffOnJobList } from "@/api/personnelManagement/monthlyStatistics.js"; |
| | | import { |
| | | monthlyStatisticsAdd, |
| | | monthlyStatisticsUpdate, |
| | | monthlyStatisticsGet, |
| | | } from "@/api/personnelManagement/monthlyStatistics.js"; |
| | | |
| | | const props = defineProps({ |
| | | modelValue: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | operationType: { |
| | | type: String, |
| | | default: "add", |
| | | }, |
| | | row: { |
| | | type: Object, |
| | | default: () => ({}), |
| | | }, |
| | | }); |
| | | const emit = defineEmits(["update:modelValue", "close"]); |
| | | const props = defineProps({ |
| | | modelValue: { type: Boolean, default: false }, |
| | | operationType: { type: String, default: "add" }, |
| | | row: { type: Object, default: () => ({}) }, |
| | | }); |
| | | |
| | | const emit = defineEmits(["update:modelValue", "close"]); |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const dialogVisible = computed({ |
| | | get: () => props.modelValue, |
| | | set: val => emit("update:modelValue", val), |
| | | }); |
| | | const dialogVisible = computed({ |
| | | get: () => props.modelValue, |
| | | set: (val) => emit("update:modelValue", val), |
| | | }); |
| | | |
| | | const title = computed(() => { |
| | | if (props.operationType === "add") return "æ°å¢èªèµå°è´¦"; |
| | | if (props.operationType === "edit") return "ç¼è¾èªèµå°è´¦"; |
| | | return "æ¥çèªèµå°è´¦"; |
| | | }); |
| | | const formRef = ref(null); |
| | | const employeeTableRef = ref(null); |
| | | const personTreeRef = ref(null); |
| | | const addPersonVisible = ref(false); |
| | | const taxDialogVisible = ref(false); |
| | | const deptOptions = ref([]); |
| | | const deptStaffTree = ref([]); |
| | | const employeeList = ref([]); |
| | | const selectedEmployees = ref([]); |
| | | const taxTableData = ref([ |
| | | { level: 1, range: "ä¸è¶
è¿36000å
", rate: 3, quickDeduction: 0 }, |
| | | { level: 2, range: "è¶
è¿36000-144000å
", rate: 10, quickDeduction: 2520 }, |
| | | { level: 3, range: "è¶
è¿144000-300000å
", rate: 20, quickDeduction: 16920 }, |
| | | { level: 4, range: "è¶
è¿300000-420000å
", rate: 25, quickDeduction: 31920 }, |
| | | { level: 5, range: "è¶
è¿420000-660000å
", rate: 30, quickDeduction: 52920 }, |
| | | { level: 6, range: "è¶
è¿660000-960000å
", rate: 35, quickDeduction: 85920 }, |
| | | { level: 7, range: "è¶
è¿960000å
", rate: 45, quickDeduction: 181920 }, |
| | | ]); |
| | | |
| | | const formRef = ref(); |
| | | const form = reactive({ |
| | | id: "", |
| | | payDate: "", |
| | | staffId: "", |
| | | basicSalary: 0, |
| | | pieceworkSalary: 0, |
| | | hourlySalary: 0, |
| | | otherIncome: 0, |
| | | socialSecurityIndividuals: 0, |
| | | providentFundIndividuals: 0, |
| | | personalIncomeTax: 0, |
| | | otherDeductions: 0, |
| | | payableWages: 0, |
| | | deductibleWages: 0, |
| | | actualWages: 0, |
| | | function parseNum(v) { |
| | | if (v === "" || v == null) return 0; |
| | | const n = Number(v); |
| | | return isNaN(n) ? 0 : n; |
| | | } |
| | | |
| | | // åºç¡èµæè¡¨å |
| | | const data = reactive({ |
| | | form: { |
| | | id: undefined, |
| | | title: "", |
| | | deptId: undefined, |
| | | payMonth: "", |
| | | remark: "", |
| | | }, |
| | | rules: { |
| | | title: [{ required: true, message: "请è¾å
¥å·¥èµä¸»é¢", trigger: "blur" }], |
| | | deptId: [{ required: true, message: "è¯·éæ©é¨é¨", trigger: "change" }], |
| | | payMonth: [{ required: true, message: "è¯·éæ©å·¥èµæä»½", trigger: "change" }], |
| | | }, |
| | | }); |
| | | const { form, rules } = toRefs(data); |
| | | |
| | | // æå¹³åé¨é¨æ ä¾ä¸æä½¿ç¨ |
| | | function flattenDept(tree, list = []) { |
| | | if (!tree?.length) return list; |
| | | tree.forEach((node) => { |
| | | list.push({ deptId: node.deptId, deptName: node.deptName }); |
| | | if (node.children?.length) flattenDept(node.children, list); |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | const rules = { |
| | | payDate: [{ required: true, message: "è¯·éæ©ç»è®¡æä»½", trigger: "change" }], |
| | | staffId: [{ required: true, message: "è¯·éæ©åå·¥", trigger: "change" }], |
| | | basicSalary: [{ required: true, message: "请è¾å
¥åºæ¬å·¥èµ", trigger: "blur" }], |
| | | }; |
| | | const loadDeptOptions = () => { |
| | | listDept().then((res) => { |
| | | const tree = res.data ?? []; |
| | | deptOptions.value = flattenDept(tree); |
| | | }); |
| | | }; |
| | | |
| | | const userList = ref([]); |
| | | |
| | | const loadUserList = () => { |
| | | // userListNoPage().then(res => { |
| | | // userList.value = res.data || []; |
| | | // }); |
| | | staffOnJobList().then(res => { |
| | | userList.value = res.data || []; |
| | | // æå»º é¨é¨-äººå æ ï¼ç¨äºæ°å¢äººåå¼¹çªï¼ |
| | | const loadDeptStaffTree = () => { |
| | | Promise.all([listDept(), staffOnJobList()]).then(([deptRes, staffRes]) => { |
| | | const tree = deptRes.data ?? []; |
| | | const staffList = staffRes.data ?? []; |
| | | const deptMap = new Map(); |
| | | function walk(nodes) { |
| | | nodes.forEach((node) => { |
| | | deptMap.set(node.deptId, { |
| | | id: "dept_" + node.deptId, |
| | | deptId: node.deptId, |
| | | label: node.deptName, |
| | | type: "dept", |
| | | children: [], |
| | | }); |
| | | if (node.children?.length) walk(node.children); |
| | | }); |
| | | } |
| | | walk(tree); |
| | | staffList.forEach((s) => { |
| | | const deptId = s.deptId ?? s.dept_id; |
| | | const node = deptMap.get(deptId); |
| | | if (node) { |
| | | node.children.push({ |
| | | id: s.id ?? s.staffId, |
| | | staffId: s.id ?? s.staffId, |
| | | label: s.staffName ?? s.name, |
| | | type: "staff", |
| | | ...s, |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | deptStaffTree.value = Array.from(deptMap.values()).filter( |
| | | (n) => n.children && n.children.length > 0 |
| | | ); |
| | | }); |
| | | }; |
| | | |
| | | const openDialog = (type, row) => { |
| | | // é置表å |
| | | Object.assign(form, { |
| | | id: "", |
| | | payDate: "", |
| | | staffId: "", |
| | | const openDialog = (type, row) => { |
| | | nextTick(() => { |
| | | loadDeptOptions(); |
| | | employeeList.value = []; |
| | | Object.assign(form.value, { |
| | | id: undefined, |
| | | title: "", |
| | | deptId: undefined, |
| | | payMonth: "", |
| | | remark: "", |
| | | }); |
| | | if (type === "edit" && row?.id) { |
| | | monthlyStatisticsGet(row.id).then((res) => { |
| | | const d = res.data || {}; |
| | | form.value.id = d.id; |
| | | form.value.title = d.title ?? d.payDateStr ?? ""; |
| | | form.value.deptId = d.deptId; |
| | | form.value.payMonth = d.payMonth ?? d.payDate ?? d.payDateStr ?? ""; |
| | | form.value.remark = d.remark ?? ""; |
| | | employeeList.value = (d.detailList || d.employeeList || []).map((e) => ({ |
| | | ...e, |
| | | basicSalary: parseNum(e.basicSalary), |
| | | pieceworkSalary: parseNum(e.pieceworkSalary), |
| | | hourlySalary: parseNum(e.hourlySalary), |
| | | otherIncome: parseNum(e.otherIncome), |
| | | socialSecurityIndividuals: parseNum(e.socialSecurityIndividuals), |
| | | providentFundIndividuals: parseNum(e.providentFundIndividuals), |
| | | })); |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | const openAddPerson = () => { |
| | | loadDeptStaffTree(); |
| | | addPersonVisible.value = true; |
| | | nextTick(() => { |
| | | personTreeRef.value?.setCheckedKeys([]); |
| | | }); |
| | | }; |
| | | |
| | | const addPersonClose = () => {}; |
| | | |
| | | const confirmAddPerson = () => { |
| | | const tree = personTreeRef.value; |
| | | if (!tree) { |
| | | addPersonVisible.value = false; |
| | | return; |
| | | } |
| | | const checked = tree.getCheckedNodes(); |
| | | const staffNodes = checked.filter((n) => n.type === "staff"); |
| | | const existIds = new Set(employeeList.value.map((e) => e.staffId || e.id)); |
| | | staffNodes.forEach((node) => { |
| | | const id = node.staffId ?? node.id; |
| | | if (existIds.has(id)) return; |
| | | existIds.add(id); |
| | | employeeList.value.push({ |
| | | staffId: id, |
| | | id: id, |
| | | staffName: node.label, |
| | | roleName: node.roleName ?? node.role ?? "", |
| | | deptName: node.deptName ?? "", |
| | | basicSalary: 0, |
| | | pieceworkSalary: 0, |
| | | hourlySalary: 0, |
| | | otherIncome: 0, |
| | | socialSecurityIndividuals: 0, |
| | | providentFundIndividuals: 0, |
| | | personalIncomeTax: 0, |
| | | otherDeductions: 0, |
| | | payableWages: 0, |
| | | deductibleWages: 0, |
| | | actualWages: 0, |
| | | remark: "", |
| | | }); |
| | | }); |
| | | addPersonVisible.value = false; |
| | | }; |
| | | |
| | | if (type === "add") { |
| | | dialogVisible.value = true; |
| | | } else if (type === "edit" || type === "view") { |
| | | if (row && row.id) { |
| | | Object.assign(form, row); |
| | | dialogVisible.value = true; |
| | | } |
| | | const removeEmployee = (row) => { |
| | | employeeList.value = employeeList.value.filter( |
| | | (e) => (e.staffId || e.id) !== (row.staffId || row.id) |
| | | ); |
| | | }; |
| | | |
| | | const onEmployeeSelectionChange = (selection) => { |
| | | selectedEmployees.value = selection; |
| | | }; |
| | | |
| | | const handleBatchDelete = () => { |
| | | if (!selectedEmployees.value?.length) { |
| | | proxy.$modal.msgWarning("请å
å¾éè¦å é¤çåå·¥"); |
| | | return; |
| | | } |
| | | const ids = new Set(selectedEmployees.value.map((e) => e.staffId || e.id)); |
| | | employeeList.value = employeeList.value.filter( |
| | | (e) => !ids.has(e.staffId || e.id) |
| | | ); |
| | | }; |
| | | |
| | | const handleGenerate = () => { |
| | | proxy.$modal.msgInfo("çæå·¥èµè¡¨åè½é对æ¥å端"); |
| | | }; |
| | | |
| | | const handleExport = () => { |
| | | proxy.$modal.msgInfo("导åºåè½é对æ¥å端"); |
| | | }; |
| | | |
| | | const handleImport = () => { |
| | | proxy.$modal.msgInfo("导å
¥åè½é对æ¥å端"); |
| | | }; |
| | | |
| | | const handleClear = () => { |
| | | proxy.$modal.confirm("ç¡®å®æ¸
空å½ååå·¥å表åï¼").then(() => { |
| | | employeeList.value = []; |
| | | }).catch(() => {}); |
| | | }; |
| | | |
| | | const handleTaxForm = () => { |
| | | taxDialogVisible.value = true; |
| | | }; |
| | | |
| | | const submitForm = () => { |
| | | formRef.value?.validate((valid) => { |
| | | if (!valid) return; |
| | | const payload = { |
| | | ...form.value, |
| | | detailList: employeeList.value.map((e) => ({ |
| | | staffId: e.staffId ?? e.id, |
| | | staffName: e.staffName, |
| | | basicSalary: parseNum(e.basicSalary), |
| | | pieceworkSalary: parseNum(e.pieceworkSalary), |
| | | hourlySalary: parseNum(e.hourlySalary), |
| | | otherIncome: parseNum(e.otherIncome), |
| | | socialSecurityIndividuals: parseNum(e.socialSecurityIndividuals), |
| | | providentFundIndividuals: parseNum(e.providentFundIndividuals), |
| | | })), |
| | | }; |
| | | if (props.operationType === "add") { |
| | | monthlyStatisticsAdd(payload).then(() => { |
| | | proxy.$modal.msgSuccess("æ°å¢æå"); |
| | | closeDia(); |
| | | }); |
| | | } else { |
| | | monthlyStatisticsUpdate(payload).then(() => { |
| | | proxy.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | closeDia(); |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | const submitForm = () => { |
| | | formRef.value.validate(valid => { |
| | | if (valid) { |
| | | form.basicSalary = Number(form.basicSalary); |
| | | form.pieceworkSalary = Number(form.pieceworkSalary); |
| | | form.hourlySalary = Number(form.hourlySalary); |
| | | form.otherIncome = Number(form.otherIncome); |
| | | form.socialSecurityIndividuals = Number(form.socialSecurityIndividuals); |
| | | form.providentFundIndividuals = Number(form.providentFundIndividuals); |
| | | form.personalIncomeTax = Number(form.personalIncomeTax); |
| | | form.otherDeductions = Number(form.otherDeductions); |
| | | |
| | | // 计ç®åºåå·¥èµãåºæ£å·¥èµåå®åå·¥èµ |
| | | const payableWages = |
| | | form.basicSalary + |
| | | form.pieceworkSalary + |
| | | form.hourlySalary + |
| | | form.otherIncome; |
| | | const deductibleWages = |
| | | form.socialSecurityIndividuals + |
| | | form.providentFundIndividuals + |
| | | form.personalIncomeTax + |
| | | form.otherDeductions; |
| | | const actualWages = payableWages - deductibleWages; |
| | | |
| | | const submitData = { |
| | | ...form, |
| | | payableWages, |
| | | deductibleWages, |
| | | actualWages, |
| | | }; |
| | | |
| | | if (props.operationType === "add") { |
| | | monthlyStatisticsAdd(submitData).then(res => { |
| | | if (res.code === 200) { |
| | | ElMessage.success("æ°å¢æå"); |
| | | dialogVisible.value = false; |
| | | emit("close"); |
| | | } else { |
| | | ElMessage.error(res.msg || "æ°å¢å¤±è´¥"); |
| | | } |
| | | }); |
| | | } else if (props.operationType === "edit") { |
| | | monthlyStatisticsUpdate(submitData).then(res => { |
| | | if (res.code === 200) { |
| | | ElMessage.success("æ´æ°æå"); |
| | | dialogVisible.value = false; |
| | | emit("close"); |
| | | } else { |
| | | ElMessage.error(res.msg || "æ´æ°å¤±è´¥"); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | loadUserList(); |
| | | }); |
| | | }; |
| | | |
| | | defineExpose({ |
| | | openDialog, |
| | | }); |
| | | const closeDia = () => { |
| | | dialogVisible.value = false; |
| | | emit("close"); |
| | | }; |
| | | |
| | | defineExpose({ openDialog }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .dialog-footer { |
| | | text-align: right; |
| | | } |
| | | </style> |
| | | .form-dia-body { |
| | | padding: 0; |
| | | } |
| | | .card-title-line { |
| | | color: #f56c6c; |
| | | margin-right: 4px; |
| | | } |
| | | .form-card { |
| | | margin-bottom: 16px; |
| | | } |
| | | .form-card :deep(.el-card__header) { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 12px 16px; |
| | | } |
| | | .card-title { |
| | | font-weight: 500; |
| | | } |
| | | .card-collapse { |
| | | color: #999; |
| | | cursor: pointer; |
| | | } |
| | | .toolbar { |
| | | margin-bottom: 16px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 10px; |
| | | } |
| | | .employee-table-wrap { |
| | | position: relative; |
| | | min-height: 120px; |
| | | } |
| | | .table-empty { |
| | | text-align: center; |
| | | padding: 24px; |
| | | color: #999; |
| | | font-size: 14px; |
| | | } |
| | | .add-person-tree { |
| | | max-height: 360px; |
| | | overflow-y: auto; |
| | | padding: 8px 0; |
| | | } |
| | | .tax-desc { |
| | | margin-bottom: 12px; |
| | | font-size: 14px; |
| | | color: #606266; |
| | | } |
| | | .dialog-footer { |
| | | text-align: right; |
| | | } |
| | | </style> |
| | |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">å§åï¼</span> |
| | | <el-input v-model="searchForm.staffName" |
| | | style="width: 240px" |
| | | placeholder="请è¾å
¥å§åæç´¢" |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" /> |
| | | <span class="search_title ml10">æä»½ï¼</span> |
| | | <el-date-picker v-model="searchForm.payDateStr" |
| | | type="month" |
| | | @change="handleQuery" |
| | | value-format="YYYY-MM" |
| | | format="YYYY-MM" |
| | | placeholder="è¯·éæ©æä»½" |
| | | style="width: 240px" |
| | | clearable /> |
| | | <el-button type="primary" |
| | | @click="handleQuery" |
| | | style="margin-left: 10px"> |
| | | <span class="search_title">主é¢ï¼</span> |
| | | <el-input |
| | | v-model="searchForm.title" |
| | | style="width: 240px" |
| | | placeholder="请è¾å
¥ä¸»é¢" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | <span class="search_title ml10">åæ®ç¶æï¼</span> |
| | | <el-select |
| | | v-model="searchForm.documentStatus" |
| | | placeholder="è¯·éæ©åæ®ç¶æ" |
| | | clearable |
| | | style="width: 180px" |
| | | > |
| | | <el-option label="è稿" value="draft" /> |
| | | <el-option label="å·²æäº¤" value="submitted" /> |
| | | <el-option label="å·²å®¡æ ¸" value="approved" /> |
| | | </el-select> |
| | | <span class="search_title ml10">å·¥èµæä»½ï¼</span> |
| | | <el-date-picker |
| | | v-model="searchForm.payMonth" |
| | | type="month" |
| | | value-format="YYYY-MM" |
| | | format="YYYY-MM" |
| | | placeholder="è¯·éæ©å·¥èµæä»½" |
| | | style="width: 180px" |
| | | clearable |
| | | @change="handleQuery" |
| | | /> |
| | | <span class="search_title ml10">å®¡æ ¸ç¶æï¼</span> |
| | | <el-select |
| | | v-model="searchForm.approvalStatus" |
| | | placeholder="è¯·éæ©å®¡æ ¸ç¶æ" |
| | | clearable |
| | | style="width: 180px" |
| | | > |
| | | <el-option label="å¾
å®¡æ ¸" value="pending" /> |
| | | <el-option label="å·²éè¿" value="passed" /> |
| | | <el-option label="已驳å" value="rejected" /> |
| | | </el-select> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px"> |
| | | æç´¢ |
| | | </el-button> |
| | | </div> |
| | | <div> |
| | | <el-button @click="handleExport" |
| | | style="margin-right: 10px">导åº</el-button> |
| | | <el-button type="primary" |
| | | @click="openForm('add')">æ°å¢å°è´¦</el-button> |
| | | <el-button type="danger" |
| | | plain |
| | | @click="handleDelete">å é¤</el-button> |
| | | <el-button @click="handleReset">éç½®</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | | <PIMTable rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :isSelection="true" |
| | | @selection-change="handleSelectionChange" |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination" |
| | | :total="page.total"></PIMTable> |
| | | <div style="margin-bottom: 10px"> |
| | | <el-button type="primary" @click="openForm('add')">æ°å»ºå·¥èµè¡¨</el-button> |
| | | <el-button @click="handleDelete">å é¤</el-button> |
| | | <el-button @click="handleExport">导åº</el-button> |
| | | </div> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :isSelection="true" |
| | | :tableLoading="tableLoading" |
| | | @selection-change="handleSelectionChange" |
| | | @pagination="pagination" |
| | | :total="page.total" |
| | | /> |
| | | </div> |
| | | <form-dia v-model="dialogVisible" |
| | | :operation-type="operationType" |
| | | :row="currentRow" |
| | | ref="formDia" |
| | | @close="handleQuery"></form-dia> |
| | | <form-dia |
| | | v-model="dialogVisible" |
| | | :operation-type="operationType" |
| | | :row="currentRow" |
| | | ref="formDiaRef" |
| | | @close="handleQuery" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import { |
| | | onMounted, |
| | | ref, |
| | | reactive, |
| | | toRefs, |
| | | getCurrentInstance, |
| | | nextTick, |
| | | } from "vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import FormDia from "./components/formDia.vue"; |
| | | import { |
| | | monthlyStatisticsListPage, |
| | | monthlyStatisticsDelete, |
| | | } from "@/api/personnelManagement/monthlyStatistics.js"; |
| | | import { |
| | | onMounted, |
| | | ref, |
| | | reactive, |
| | | toRefs, |
| | | getCurrentInstance, |
| | | nextTick, |
| | | } from "vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import FormDia from "./components/formDia.vue"; |
| | | import PIMTable from "@/components/PIMTable/PIMTable.vue"; |
| | | import { |
| | | monthlyStatisticsListPage, |
| | | monthlyStatisticsDelete, |
| | | } from "@/api/personnelManagement/monthlyStatistics.js"; |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | staffName: "", |
| | | payDateStr: "", |
| | | }, |
| | | }); |
| | | const data = reactive({ |
| | | searchForm: { |
| | | title: "", |
| | | documentStatus: "", |
| | | payMonth: "", |
| | | approvalStatus: "", |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | |
| | | const { searchForm } = toRefs(data); |
| | | const tableColumn = ref([ |
| | | { label: "å·¥èµä¸»é¢", prop: "title", minWidth: 140 }, |
| | | { label: "å·¥èµæä»½", prop: "payMonth", width: 120 }, |
| | | { label: "åæ®ç¶æ", prop: "documentStatusName", width: 100 }, |
| | | { label: "å®¡æ ¸ç¶æ", prop: "approvalStatusName", width: 100 }, |
| | | { label: "å·¥èµæ»é¢", prop: "totalAmount", width: 120 }, |
| | | { label: "æ¯ä»é¶è¡", prop: "paymentBank", width: 120 }, |
| | | { label: "åæ¾æ¶é´", prop: "issueTime", width: 160 }, |
| | | { label: "审æ¹äººå", prop: "approver", width: 100 }, |
| | | { label: "夿³¨", prop: "remark", minWidth: 120 }, |
| | | { |
| | | dataType: "action", |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 120, |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => openForm("edit", row), |
| | | }, |
| | | ], |
| | | }, |
| | | ]); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "åå·¥å§å", |
| | | prop: "staffName", |
| | | }, |
| | | { |
| | | label: "é¨é¨", |
| | | prop: "deptName", |
| | | width: 140, |
| | | }, |
| | | { |
| | | label: "æä»½", |
| | | prop: "payDate", |
| | | }, |
| | | { |
| | | label: "åºæ¬å·¥èµ", |
| | | prop: "basicSalary", |
| | | }, |
| | | { |
| | | label: "计件工èµ", |
| | | prop: "pieceworkSalary", |
| | | }, |
| | | { |
| | | label: "计æ¶å·¥èµ", |
| | | prop: "hourlySalary", |
| | | }, |
| | | { |
| | | label: "å
¶ä»æ¶å
¥", |
| | | prop: "otherIncome", |
| | | }, |
| | | { |
| | | label: "社ä¿ä¸ªäºº", |
| | | prop: "socialSecurityIndividuals", |
| | | }, |
| | | { |
| | | label: "å
¬ç§¯é个人", |
| | | prop: "providentFundIndividuals", |
| | | width: 140, |
| | | }, |
| | | { |
| | | label: "å·¥èµä¸ªç¨", |
| | | prop: "personalIncomeTax", |
| | | }, |
| | | { |
| | | label: "å
¶ä»æ¯åº", |
| | | prop: "otherDeductions", |
| | | }, |
| | | { |
| | | label: "åºåå·¥èµ", |
| | | prop: "payableWages", |
| | | }, |
| | | { |
| | | label: "åºæ£å·¥èµ", |
| | | prop: "deductibleWages", |
| | | }, |
| | | { |
| | | label: "å®åå·¥èµ", |
| | | prop: "actualWages", |
| | | }, |
| | | { |
| | | label: "夿³¨", |
| | | prop: "remark", |
| | | width: 150, |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 220, |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: row => { |
| | | openForm("edit", row); |
| | | }, |
| | | }, |
| | | // { |
| | | // name: "æ¥ç", |
| | | // type: "text", |
| | | // clickFun: row => { |
| | | // openForm("view", row); |
| | | // }, |
| | | // }, |
| | | ], |
| | | }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const selectedRows = ref([]); |
| | | const tableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 10, |
| | | total: 0, |
| | | }); |
| | | const formDiaRef = ref(null); |
| | | const dialogVisible = ref(false); |
| | | const operationType = ref("add"); |
| | | const currentRow = ref({}); |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const tableData = ref([]); |
| | | const selectedRows = ref([]); |
| | | const tableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0, |
| | | }); |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | |
| | | const formDia = ref(); |
| | | const dialogVisible = ref(false); |
| | | const operationType = ref("add"); |
| | | const currentRow = ref({}); |
| | | const { proxy } = getCurrentInstance(); |
| | | const handleReset = () => { |
| | | searchForm.value.title = ""; |
| | | searchForm.value.documentStatus = ""; |
| | | searchForm.value.payMonth = ""; |
| | | searchForm.value.approvalStatus = ""; |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | |
| | | // æ¥è¯¢å表 |
| | | /** æç´¢æé®æä½ */ |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | |
| | | const pagination = obj => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | monthlyStatisticsListPage({ ...page, ...searchForm.value }) |
| | | .then(res => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records; |
| | | page.total = res.data.total; |
| | | }) |
| | | .catch(err => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const handleSelectionChange = selection => { |
| | | selectedRows.value = selection; |
| | | }; |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openForm = (type, row) => { |
| | | operationType.value = type; |
| | | currentRow.value = row || {}; |
| | | dialogVisible.value = true; |
| | | nextTick(() => { |
| | | formDia.value?.openDialog(type, row); |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | monthlyStatisticsListPage({ |
| | | ...searchForm.value, |
| | | current: page.current, |
| | | size: page.size, |
| | | }) |
| | | .then((res) => { |
| | | tableLoading.value = false; |
| | | const records = res.data?.records ?? []; |
| | | // å
¼å®¹åç«¯åæ®µï¼è¥æ¥å£ä»è¿åå°è´¦ç»æï¼å¯å¨æ¤åæ å° |
| | | tableData.value = records.map((item) => ({ |
| | | ...item, |
| | | title: item.title ?? item.payDateStr ?? "-", |
| | | payMonth: item.payMonth ?? item.payDateStr ?? item.payDate ?? "-", |
| | | documentStatusName: item.documentStatusName ?? "-", |
| | | approvalStatusName: item.approvalStatusName ?? "-", |
| | | totalAmount: item.totalAmount ?? item.actualWages ?? "-", |
| | | paymentBank: item.paymentBank ?? "-", |
| | | issueTime: item.issueTime ?? item.createTime ?? "-", |
| | | approver: item.approver ?? "-", |
| | | })); |
| | | page.total = res.data?.total ?? 0; |
| | | }) |
| | | .catch(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }; |
| | | }; |
| | | |
| | | // å é¤ |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | | ids = selectedRows.value.map(item => item.id); |
| | | } else { |
| | | proxy.$modal.msgWarning("è¯·éæ©æ°æ®"); |
| | | return; |
| | | } |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å é¤ï¼æ¯å¦ç¡®è®¤å é¤ï¼", "å é¤", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | monthlyStatisticsDelete(ids).then(res => { |
| | | proxy.$modal.msgSuccess("å 餿å"); |
| | | getList(); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | | }; |
| | | |
| | | // å¯¼åº |
| | | const handleExport = () => { |
| | | ElMessageBox.confirm("æ¯å¦ç¡®è®¤å¯¼åºäººåèªèµå°è´¦ï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download( |
| | | "/compensationPerformance/export", |
| | | { ...searchForm.value, ...page }, |
| | | "人åèªèµå°è´¦.xlsx" |
| | | ); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | const openForm = (type, row) => { |
| | | operationType.value = type; |
| | | currentRow.value = row || {}; |
| | | dialogVisible.value = true; |
| | | nextTick(() => { |
| | | formDiaRef.value?.openDialog(type, row); |
| | | }); |
| | | }; |
| | | |
| | | const handleDelete = () => { |
| | | if (!selectedRows.value?.length) { |
| | | proxy.$modal.msgWarning("è¯·éæ©è¦å é¤çæ°æ®"); |
| | | return; |
| | | } |
| | | const ids = selectedRows.value.map((item) => item.id); |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å é¤ï¼æ¯å¦ç¡®è®¤å é¤ï¼", "å é¤", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | monthlyStatisticsDelete(ids).then(() => { |
| | | proxy.$modal.msgSuccess("å 餿å"); |
| | | getList(); |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | const handleExport = () => { |
| | | proxy.download( |
| | | "/compensationPerformance/export", |
| | | { ...searchForm.value, current: page.current, size: page.size }, |
| | | "å·¥èµè¡¨.xlsx" |
| | | ); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search_form { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | flex-wrap: wrap; |
| | | gap: 10px; |
| | | } |
| | | |
| | | .search_title { |
| | | font-weight: 500; |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | .ml10 { |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | .table_list { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .dialog-footer { |
| | | text-align: right; |
| | | } |
| | | </style> |
| | | .search_form { |
| | | margin-bottom: 20px; |
| | | } |
| | | .search_title { |
| | | font-weight: 500; |
| | | margin-right: 5px; |
| | | } |
| | | .ml10 { |
| | | margin-left: 10px; |
| | | } |
| | | .table_list { |
| | | margin-top: 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <FormDialog |
| | | v-model="dialogFormVisible" |
| | | :operation-type="operationType" |
| | | :title="dialogTitle" |
| | | width="80%" |
| | | @close="closeDia" |
| | | @confirm="submitForm" |
| | | @cancel="closeDia" |
| | | > |
| | | <el-form ref="formRef" :model="form" :rules="rules" label-position="top"> |
| | | <el-row :gutter="24"> |
| | | <!-- 左侧ï¼éç¨äººå --> |
| | | <el-col :span="8"> |
| | | <el-form-item label="éç¨äººåï¼" prop="deptIds"> |
| | | <div class="dept-checkbox-wrap"> |
| | | <el-checkbox-group v-model="form.deptIds"> |
| | | <div |
| | | v-for="dept in deptList" |
| | | :key="dept.deptId" |
| | | class="dept-checkbox-item" |
| | | > |
| | | <el-checkbox :value="dept.deptId"> |
| | | {{ dept.deptName }} |
| | | <span v-if="dept.personCount != null" class="dept-count" |
| | | >{{ dept.personCount }}人</span |
| | | > |
| | | </el-checkbox> |
| | | </div> |
| | | </el-checkbox-group> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- å³ä¾§ï¼åºç¡ä¿¡æ¯ + ä¿é©ç±»å --> |
| | | <el-col :span="16"> |
| | | <!-- åºç¡ä¿¡æ¯ --> |
| | | <el-card class="form-card" shadow="never"> |
| | | <template #header> |
| | | <span class="card-title"><span class="card-title-line">|</span> åºç¡ä¿¡æ¯</span> |
| | | <el-icon class="card-collapse"><ArrowUp /></el-icon> |
| | | </template> |
| | | <el-form-item label="æ¹æ¡æ é¢ï¼" prop="title"> |
| | | <el-input v-model="form.title" placeholder="请è¾å
¥" clearable /> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨ï¼" prop="remark"> |
| | | <el-input |
| | | v-model="form.remark" |
| | | type="textarea" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-card> |
| | | |
| | | <!-- ä¿é©ç±»å --> |
| | | <el-card class="form-card" shadow="never"> |
| | | <template #header> |
| | | <span class="card-title"><span class="card-title-line">|</span> ä¿é©ç±»å</span> |
| | | <el-button type="primary" size="small" @click="addInsuranceBenefit"> |
| | | æ·»å ä¿é©ç¦å© |
| | | </el-button> |
| | | </template> |
| | | <el-row :gutter="16"> |
| | | <el-col |
| | | v-for="(item, index) in form.insuranceBenefits" |
| | | :key="item._key" |
| | | :span="12" |
| | | > |
| | | <div class="insurance-benefit-card"> |
| | | <div class="insurance-benefit-title"> |
| | | ä¿é©ç¦å©{{ index + 1 }} |
| | | <el-button |
| | | v-if="form.insuranceBenefits.length > 1" |
| | | type="danger" |
| | | link |
| | | size="small" |
| | | class="card-delete-btn" |
| | | @click="removeInsuranceBenefit(index)" |
| | | > |
| | | å é¤ |
| | | </el-button> |
| | | </div> |
| | | <el-form-item |
| | | :prop="'insuranceBenefits.' + index + '.insuranceType'" |
| | | label="ä¿é©ç±»åï¼" |
| | | label-width="100px" |
| | | > |
| | | <el-select |
| | | v-model="item.insuranceType" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="opt in insuranceTypeOptions" |
| | | :key="opt.value" |
| | | :label="opt.label" |
| | | :value="opt.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç¼´è´¹åºæ°ï¼" label-width="100px"> |
| | | <div class="checkbox-group-inline"> |
| | | <el-checkbox v-model="item.baseOnSalary">æ ¹æ®åºæ¬å·¥èµç¼´çº³</el-checkbox> |
| | | <el-checkbox v-model="item.useBasicSalary">è°ç¨åºæ¬å·¥èµ</el-checkbox> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="个人缴费æ¯ä¾ï¼" label-width="100px"> |
| | | <div class="personal-ratio-wrap"> |
| | | <el-input |
| | | v-model="item.personalRatio" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | style="width: 100px" |
| | | type="number" |
| | | /> |
| | | <span class="ratio-unit">(%)</span> |
| | | <span class="ratio-plus">+</span> |
| | | <el-input |
| | | v-model="item.personalFixed" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | style="width: 100px" |
| | | type="number" |
| | | /> |
| | | </div> |
| | | </el-form-item> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </FormDialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, reactive, toRefs, getCurrentInstance, nextTick } from "vue"; |
| | | import FormDialog from "@/components/Dialog/FormDialog.vue"; |
| | | import { ArrowUp } from "@element-plus/icons-vue"; |
| | | import { listDept } from "@/api/system/dept.js"; |
| | | import { |
| | | socialSecurityInfo, |
| | | socialSecurityAdd, |
| | | socialSecurityUpdate, |
| | | } from "@/api/personnelManagement/socialSecuritySet.js"; |
| | | |
| | | const emit = defineEmits(["close"]); |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const dialogFormVisible = ref(false); |
| | | const operationType = ref("add"); |
| | | const formRef = ref(null); |
| | | const deptList = ref([]); |
| | | |
| | | const dialogTitle = () => |
| | | operationType.value === "add" ? "æ°å¢æ¹æ¡" : "ç¼è¾æ¹æ¡"; |
| | | |
| | | // ä¿é©ç±»åé项ï¼å¯æåå
¸æ¿æ¢ï¼ |
| | | const insuranceTypeOptions = [ |
| | | { label: "å
»èä¿é©", value: "pension" }, |
| | | { label: "å»çä¿é©", value: "medical" }, |
| | | { label: "失ä¸ä¿é©", value: "unemployment" }, |
| | | { label: "工伤ä¿é©", value: "work_injury" }, |
| | | { label: "çè²ä¿é©", value: "maternity" }, |
| | | ]; |
| | | |
| | | const defaultBenefit = () => ({ |
| | | _key: Math.random().toString(36).slice(2), |
| | | insuranceType: "", |
| | | baseOnSalary: false, |
| | | useBasicSalary: false, |
| | | personalRatio: "", |
| | | personalFixed: "", |
| | | }); |
| | | |
| | | const data = reactive({ |
| | | form: { |
| | | id: undefined, |
| | | title: "", |
| | | remark: "", |
| | | deptIds: [], |
| | | insuranceBenefits: [defaultBenefit()], |
| | | }, |
| | | rules: { |
| | | title: [{ required: true, message: "请è¾å
¥æ¹æ¡æ é¢", trigger: "blur" }], |
| | | deptIds: [ |
| | | { |
| | | required: true, |
| | | type: "array", |
| | | min: 1, |
| | | message: "请è³å°éæ©ä¸ä¸ªéç¨é¨é¨", |
| | | trigger: "change", |
| | | }, |
| | | ], |
| | | }, |
| | | }); |
| | | const { form, rules } = toRefs(data); |
| | | |
| | | function flattenDept(tree, list = []) { |
| | | if (!tree || !tree.length) return list; |
| | | tree.forEach((node) => { |
| | | list.push({ |
| | | deptId: node.deptId, |
| | | deptName: node.deptName, |
| | | personCount: node.personCount ?? null, |
| | | }); |
| | | if (node.children && node.children.length) { |
| | | flattenDept(node.children, list); |
| | | } |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | const loadDeptList = () => { |
| | | listDept().then((res) => { |
| | | const tree = res.data ?? []; |
| | | deptList.value = flattenDept(tree); |
| | | }); |
| | | }; |
| | | |
| | | const addInsuranceBenefit = () => { |
| | | form.value.insuranceBenefits.push(defaultBenefit()); |
| | | }; |
| | | |
| | | const removeInsuranceBenefit = (index) => { |
| | | form.value.insuranceBenefits.splice(index, 1); |
| | | }; |
| | | |
| | | const resetForm = () => { |
| | | form.value = { |
| | | id: undefined, |
| | | title: "", |
| | | remark: "", |
| | | deptIds: [], |
| | | insuranceBenefits: [defaultBenefit()], |
| | | }; |
| | | }; |
| | | |
| | | const openDialog = (type, row) => { |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | loadDeptList(); |
| | | resetForm(); |
| | | if (type === "edit" && row?.id) { |
| | | socialSecurityInfo(row.id).then((res) => { |
| | | const d = res.data || {}; |
| | | form.value.id = d.id; |
| | | form.value.title = d.title; |
| | | form.value.remark = d.remark ?? ""; |
| | | form.value.deptIds = d.deptIds ?? []; |
| | | form.value.insuranceBenefits = |
| | | (d.insuranceBenefits && d.insuranceBenefits.length) |
| | | ? d.insuranceBenefits.map((b) => ({ |
| | | ...b, |
| | | _key: b._key || Math.random().toString(36).slice(2), |
| | | })) |
| | | : [defaultBenefit()]; |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | const submitForm = () => { |
| | | formRef.value?.validate((valid) => { |
| | | if (!valid) return; |
| | | const submitData = { |
| | | ...form.value, |
| | | insuranceBenefits: form.value.insuranceBenefits.map( |
| | | ({ _key, ...rest }) => rest |
| | | ), |
| | | }; |
| | | if (operationType.value === "add") { |
| | | socialSecurityAdd(submitData).then(() => { |
| | | proxy.$modal.msgSuccess("æ°å¢æå"); |
| | | closeDia(); |
| | | }); |
| | | } else { |
| | | socialSecurityUpdate(submitData).then(() => { |
| | | proxy.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | closeDia(); |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | const closeDia = () => { |
| | | proxy.resetForm?.("formRef"); |
| | | dialogFormVisible.value = false; |
| | | emit("close"); |
| | | }; |
| | | |
| | | defineExpose({ openDialog }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .card-title-line { |
| | | color: #f56c6c; |
| | | margin-right: 4px; |
| | | } |
| | | .form-card { |
| | | margin-bottom: 16px; |
| | | } |
| | | .form-card :deep(.el-card__header) { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 12px 16px; |
| | | } |
| | | .card-title { |
| | | font-weight: 500; |
| | | } |
| | | .card-collapse { |
| | | color: #999; |
| | | cursor: pointer; |
| | | } |
| | | .dept-checkbox-wrap { |
| | | max-height: 320px; |
| | | overflow-y: auto; |
| | | padding: 8px 0; |
| | | border: 1px solid var(--el-border-color); |
| | | border-radius: 4px; |
| | | background: #fff; |
| | | } |
| | | .dept-checkbox-item { |
| | | padding: 6px 12px; |
| | | } |
| | | .dept-count { |
| | | color: #909399; |
| | | font-size: 12px; |
| | | margin-left: 4px; |
| | | } |
| | | .insurance-benefit-card { |
| | | border: 1px solid var(--el-border-color-lighter); |
| | | border-radius: 4px; |
| | | padding: 12px 16px; |
| | | margin-bottom: 12px; |
| | | background: #fafafa; |
| | | } |
| | | .insurance-benefit-title { |
| | | font-size: 14px; |
| | | margin-bottom: 12px; |
| | | font-weight: 500; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | .card-delete-btn { |
| | | margin-left: auto; |
| | | } |
| | | .checkbox-group-inline { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 16px; |
| | | } |
| | | .personal-ratio-wrap { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | .ratio-unit, |
| | | .ratio-plus { |
| | | color: #606266; |
| | | font-size: 14px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">主é¢ï¼</span> |
| | | <el-input |
| | | v-model="searchForm.title" |
| | | style="width: 240px" |
| | | placeholder="请è¾å
¥ä¸»é¢" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px"> |
| | | æç´¢ |
| | | </el-button> |
| | | <el-button @click="handleReset">éç½®</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | | <div style="margin-bottom: 10px"> |
| | | <el-button type="primary" @click="openForm('add')">æ°å¢æ¹æ¡</el-button> |
| | | </div> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination" |
| | | :total="page.total" |
| | | /> |
| | | </div> |
| | | <form-dia ref="formDiaRef" @close="handleQuery" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick } from "vue"; |
| | | import FormDia from "./components/formDia.vue"; |
| | | import PIMTable from "@/components/PIMTable/PIMTable.vue"; |
| | | import { socialSecurityListPage } from "@/api/personnelManagement/socialSecuritySet.js"; |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | title: "", |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | |
| | | const tableColumn = ref([ |
| | | { label: "主é¢", prop: "title", minWidth: 120 }, |
| | | { label: "ä¿é©ç±»å", prop: "insuranceTypeName", width: 120 }, |
| | | { label: "使ç¨èå´", prop: "scopeName", width: 120 }, |
| | | { label: "夿³¨", prop: "remark", minWidth: 120 }, |
| | | { label: "å建æ¶é´", prop: "createTime", width: 160 }, |
| | | { label: "å建人", prop: "createBy", width: 100 }, |
| | | { |
| | | dataType: "action", |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 120, |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => openForm("edit", row), |
| | | }, |
| | | ], |
| | | }, |
| | | ]); |
| | | |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 10, |
| | | total: 0, |
| | | }); |
| | | const formDiaRef = ref(null); |
| | | |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | |
| | | const handleReset = () => { |
| | | searchForm.value.title = ""; |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | socialSecurityListPage({ |
| | | ...searchForm.value, |
| | | current: page.current, |
| | | size: page.size, |
| | | }) |
| | | .then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data?.records ?? []; |
| | | page.total = res.data?.total ?? 0; |
| | | }) |
| | | .catch(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | const openForm = (type, row) => { |
| | | nextTick(() => { |
| | | formDiaRef.value?.openDialog(type, row); |
| | | }); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="68px"> |
| | | <el-form-item label="è§è²åç§°" prop="roleName"> |
| | | <el-input |
| | | v-model="queryParams.name" |
| | | placeholder="请è¾å
¥è§è²åç§°" |
| | | clearable |
| | | style="width: 240px" |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select |
| | | v-model="queryParams.status" |
| | | placeholder="è§è²ç¶æ" |
| | | clearable |
| | | style="width: 240px" |
| | | > |
| | | <el-option label="å¯ç¨" value="0" /> |
| | | <el-option label="ç¦ç¨" value="1" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | @click="handleAdd" |
| | | v-hasPermi="['system:role:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Edit" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['system:role:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="Delete" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['system:role:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <!-- è¡¨æ ¼æ°æ® --> |
| | | <el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="è§è²ç¼å·" prop="no" /> |
| | | <el-table-column label="è§è²åç§°" prop="name" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="ç¶æ" align="center" width="100"> |
| | | <template #default="scope"> |
| | | <el-switch |
| | | v-model="scope.row.status" |
| | | :active-value="0" |
| | | :inactive-value="1" |
| | | @change="handleStatusChange(scope.row)" |
| | | ></el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime"> |
| | | <template #default="scope"> |
| | | <span>{{ parseTime(scope.row.createTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" align="center" width="120"> |
| | | <template #default="scope"> |
| | | <el-tooltip content="ä¿®æ¹" placement="top" v-if="scope.row.roleId !== 1"> |
| | | <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:role:edit']"></el-button> |
| | | </el-tooltip> |
| | | <el-tooltip content="å é¤" placement="top" v-if="scope.row.roleId !== 1"> |
| | | <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']"></el-button> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | v-model:page="queryParams.current" |
| | | v-model:limit="queryParams.size" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹è§è²é
ç½®å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" v-model="open" width="500px" append-to-body> |
| | | <el-form ref="roleRef" :model="form" :rules="rules" label-width="100px"> |
| | | <el-form-item label="è§è²ç¼å·" prop="no"> |
| | | <el-input |
| | | v-model="form.no" |
| | | style="max-width: 600px" |
| | | :placeholder="form.isDefaultNo ? '使ç¨ç³»ç»ç¼å·' : '请è¾å
¥è§è²ç¼å·'" |
| | | :disabled="form.isDefaultNo" |
| | | > |
| | | <template #append> |
| | | <el-checkbox v-model="form.isDefaultNo" size="large" /> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è§è²åç§°" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥è§è²åç§°" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup name="Role"> |
| | | import {onMounted} from "vue"; |
| | | import {createRole, deleteRoles, findRoleListPage, updateRole} from "@/api/projectManagement/role.js"; |
| | | |
| | | const { proxy } = getCurrentInstance() |
| | | const { sys_normal_disable } = proxy.useDict("sys_normal_disable") |
| | | |
| | | const roleList = ref([]) |
| | | const open = ref(false) |
| | | const loading = ref(true) |
| | | const showSearch = ref(true) |
| | | const ids = ref([]) |
| | | const single = ref(true) |
| | | const multiple = ref(true) |
| | | const total = ref(0) |
| | | const title = ref("") |
| | | const editingId = ref(undefined) |
| | | const form = reactive({ |
| | | isDefaultNo: true, |
| | | no: "", |
| | | name: "", |
| | | }); |
| | | |
| | | const rules = computed(() => ({ |
| | | no: [{ required: !form.isDefaultNo, message: "è§è²ç¼å·ä¸è½ä¸ºç©º", trigger: "blur" }], |
| | | name: [{ required: true, message: "è§è²åç§°ä¸è½ä¸ºç©º", trigger: "blur" }], |
| | | })); |
| | | |
| | | const data = reactive({ |
| | | queryParams: { |
| | | current: 1, |
| | | size: 10, |
| | | name: undefined, |
| | | status: undefined |
| | | }, |
| | | }) |
| | | |
| | | const { queryParams } = toRefs(data) |
| | | |
| | | /** æ¥è¯¢è§è²å表 */ |
| | | function getList() { |
| | | loading.value = true |
| | | findRoleListPage(queryParams.value).then(res => { |
| | | roleList.value = res.data.records |
| | | total.value = res.data.total |
| | | loading.value = false |
| | | }) |
| | | } |
| | | |
| | | /** æç´¢æé®æä½ */ |
| | | function handleQuery() { |
| | | queryParams.value.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | /** éç½®æé®æä½ */ |
| | | function resetQuery() { |
| | | proxy.resetForm("queryRef") |
| | | queryParams.value.name = undefined |
| | | queryParams.value.status = undefined |
| | | handleQuery() |
| | | } |
| | | |
| | | /** å é¤æé®æä½ */ |
| | | function handleDelete(row) { |
| | | let roleIds = [] |
| | | if (row.id) { |
| | | roleIds = [row.id] |
| | | } else { |
| | | roleIds = ids.value |
| | | } |
| | | proxy.$modal.confirm('ç¡®å®è¦å é¤è¯¥æ°æ®å?').then(function () { |
| | | return deleteRoles(roleIds) |
| | | }).then(() => { |
| | | getList() |
| | | proxy.$modal.msgSuccess("å 餿å") |
| | | }).catch(() => {}) |
| | | } |
| | | |
| | | /** å¤éæ¡é䏿°æ® */ |
| | | function handleSelectionChange(selection) { |
| | | ids.value = selection.map(item => item.id) |
| | | single.value = selection.length != 1 |
| | | multiple.value = !selection.length |
| | | } |
| | | |
| | | /** è§è²ç¶æä¿®æ¹ */ |
| | | function handleStatusChange(row) { |
| | | let text = row.status === 0 ? "å¯ç¨" : "åç¨" |
| | | proxy.$modal.confirm('确认è¦"' + text + '""' + row.name + '"è§è²å?').then(function () { |
| | | return updateRole(row) |
| | | }).then(() => { |
| | | proxy.$modal.msgSuccess(text + "æå") |
| | | }).catch(function () { |
| | | row.status = row.status === 0 ? 1 : 0 |
| | | }) |
| | | } |
| | | |
| | | /** éç½®æ°å¢ç表å以åå
¶ä»æ°æ® */ |
| | | function reset() { |
| | | // éç½®è¡¨åæ°æ® |
| | | Object.assign(form, { |
| | | isDefaultNo: true, |
| | | no: "", |
| | | name: "", |
| | | }) |
| | | editingId.value = undefined |
| | | } |
| | | |
| | | /** æ·»å è§è² */ |
| | | function handleAdd() { |
| | | reset() |
| | | open.value = true |
| | | title.value = "æ·»å è§è²" |
| | | } |
| | | |
| | | /** ä¿®æ¹è§è² */ |
| | | function handleUpdate(row) { |
| | | reset() |
| | | editingId.value = row.id |
| | | form.no = row.no |
| | | form.name = row.name |
| | | title.value = "ä¿®æ¹è§è²" |
| | | open.value = true |
| | | } |
| | | |
| | | /** æäº¤æé® */ |
| | | function submitForm() { |
| | | proxy.$refs["roleRef"].validate(valid => { |
| | | if (valid) { |
| | | if (editingId.value) { |
| | | const data = { |
| | | id: editingId.value, |
| | | ...form |
| | | } |
| | | updateRole(data).then(response => { |
| | | proxy.$modal.msgSuccess("ä¿®æ¹æå") |
| | | }).finally(() => { |
| | | proxy.$refs["roleRef"].resetFields() |
| | | open.value = false |
| | | getList() |
| | | }) |
| | | } else { |
| | | createRole(form).then(response => { |
| | | proxy.$modal.msgSuccess("æ°å¢æå") |
| | | }).finally(() => { |
| | | proxy.$refs["roleRef"].resetFields() |
| | | open.value = false |
| | | getList() |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** åæ¶æé® */ |
| | | function cancel() { |
| | | open.value = false |
| | | reset() |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | | </script> |
| | |
| | | |
| | | // éæ©ååå¤ç |
| | | const handleSelectionChange = selection => { |
| | | // ä¸»è¡¨æ ¼ä¹åªä¿çæåä¸ä¸ªéä¸ç项 |
| | | if (selection.length > 1) { |
| | | const lastSelected = selection[selection.length - 1]; |
| | | selectedIds.value = [lastSelected.id]; |
| | | } else if (selection.length === 1) { |
| | | selectedIds.value = [selection[0].id]; |
| | | } else { |
| | | selectedIds.value = []; |
| | | } |
| | | selectedIds.value = selection.map(item => item.id); |
| | | }; |
| | | |
| | | // æå¼è¡¨å |
| | |
| | | <el-table-column label="éå®è®¢å" prop="salesContractNo" show-overflow-tooltip /> |
| | | <el-table-column label="å货订åå·" prop="shippingNo" show-overflow-tooltip /> |
| | | <el-table-column label="客æ·åç§°" prop="customerName" show-overflow-tooltip /> |
| | | <el-table-column label="产ååç§°" prop="productName" show-overflow-tooltip /> |
| | | <el-table-column label="è§æ ¼åå·" prop="specificationModel" show-overflow-tooltip /> |
| | | <el-table-column label="åè´§æ¶é´" prop="shippingDate" show-overflow-tooltip /> |
| | | <el-table-column label="å货车çå·" prop="shippingCarNumber" show-overflow-tooltip /> |
| | | <el-table-column label="å¿«éå
¬å¸" prop="expressCompany" show-overflow-tooltip /> |
| | |
| | | <el-descriptions-item label="éå®è®¢å">{{ detailRow.salesContractNo || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="å货订åå·">{{ detailRow.shippingNo || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="客æ·åç§°">{{ detailRow.customerName || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="产ååç§°">{{ detailRow.productName || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="è§æ ¼åå·">{{ detailRow.specificationModel || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="åè´§ç±»å">{{ detailRow.type || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="åè´§æ¥æ">{{ detailRow.shippingDate || '--' }}</el-descriptions-item> |
| | | <el-descriptions-item label="å®¡æ ¸ç¶æ">{{ getApprovalStatusText(detailRow.status) }}</el-descriptions-item> |
| | |
| | | id: null, |
| | | salesContractNo: "", |
| | | customerName: "", |
| | | specificationModel: "", |
| | | productName: "", |
| | | type: "货车", // 货车, å¿«é |
| | | shippingDate: "", |
| | | shippingCarNumber: "", |