From b5655fd802b264478ec9adca4757bc6e8e59415a Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Tue, 17 Dec 2024 20:09:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E6=B8=85=E5=8D=95=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 24 + package-lock.json | 418 ++---------------- package.json | 2 +- src/http/api/cart/index.ts | 4 + src/layout/header.vue | 1 + src/views/cart/index.vue | 127 ++++-- .../components/order-home.vue | 56 ++- 7 files changed, 187 insertions(+), 445 deletions(-) diff --git a/components.d.ts b/components.d.ts index eafc8c3..af20a38 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,23 +9,47 @@ declare module 'vue' { export interface GlobalComponents { Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default'] EditorModel: typeof import('./src/components/EditorModel/index.vue')['default'] + ElBadge: typeof import('element-plus/es')['ElBadge'] + ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] + ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] + ElCarousel: typeof import('element-plus/es')['ElCarousel'] + ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] + ElCascader: typeof import('element-plus/es')['ElCascader'] + ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] ElCol: typeof import('element-plus/es')['ElCol'] + ElCollapse: typeof import('element-plus/es')['ElCollapse'] + ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] + ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] + ElCountdown: typeof import('element-plus/es')['ElCountdown'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDialog: typeof import('element-plus/es')['ElDialog'] + ElEmpty: typeof import('element-plus/es')['ElEmpty'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] + ElHeader: typeof import('element-plus/es')['ElHeader'] + ElIcon: typeof import('element-plus/es')['ElIcon'] ElImage: typeof import('element-plus/es')['ElImage'] ElInput: typeof import('element-plus/es')['ElInput'] + ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElOption: typeof import('element-plus/es')['ElOption'] + ElPageHeader: typeof import('element-plus/es')['ElPageHeader'] ElPagination: typeof import('element-plus/es')['ElPagination'] + ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] + ElProgress: typeof import('element-plus/es')['ElProgress'] + ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] + ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] + ElStep: typeof import('element-plus/es')['ElStep'] + ElSteps: typeof import('element-plus/es')['ElSteps'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElTag: typeof import('element-plus/es')['ElTag'] + ElUpload: typeof import('element-plus/es')['ElUpload'] Empty: typeof import('./src/components/Empty/index.vue')['default'] EquipCard: typeof import('./src/components/equipCard.vue')['default'] EquipCardHall: typeof import('./src/components/equipCardHall/index.vue')['default'] diff --git a/package-lock.json b/package-lock.json index bc11b2b..f76b769 100644 --- a/package-lock.json +++ b/package-lock.json @@ -950,302 +950,6 @@ "node": ">= 8" } }, - "node_modules/@parcel/watcher": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher/-/watcher-2.5.0.tgz", - "integrity": "sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.5.0", - "@parcel/watcher-darwin-arm64": "2.5.0", - "@parcel/watcher-darwin-x64": "2.5.0", - "@parcel/watcher-freebsd-x64": "2.5.0", - "@parcel/watcher-linux-arm-glibc": "2.5.0", - "@parcel/watcher-linux-arm-musl": "2.5.0", - "@parcel/watcher-linux-arm64-glibc": "2.5.0", - "@parcel/watcher-linux-arm64-musl": "2.5.0", - "@parcel/watcher-linux-x64-glibc": "2.5.0", - "@parcel/watcher-linux-x64-musl": "2.5.0", - "@parcel/watcher-win32-arm64": "2.5.0", - "@parcel/watcher-win32-ia32": "2.5.0", - "@parcel/watcher-win32-x64": "2.5.0" - } - }, - "node_modules/@parcel/watcher-android-arm64": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.0.tgz", - "integrity": "sha512-qlX4eS28bUcQCdribHkg/herLe+0A9RyYC+mm2PXpncit8z5b3nSqGVzMNR3CmtAOgRutiZ02eIJJgP/b1iEFQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-arm64": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.0.tgz", - "integrity": "sha512-hyZ3TANnzGfLpRA2s/4U1kbw2ZI4qGxaRJbBH2DCSREFfubMswheh8TeiC1sGZ3z2jUf3s37P0BBlrD3sjVTUw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-x64": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.0.tgz", - "integrity": "sha512-9rhlwd78saKf18fT869/poydQK8YqlU26TMiNg7AIu7eBp9adqbJZqmdFOsbZ5cnLp5XvRo9wcFmNHgHdWaGYA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-freebsd-x64": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.0.tgz", - "integrity": "sha512-syvfhZzyM8kErg3VF0xpV8dixJ+RzbUaaGaeb7uDuz0D3FK97/mZ5AJQ3XNnDsXX7KkFNtyQyFrXZzQIcN49Tw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-glibc": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.0.tgz", - "integrity": "sha512-0VQY1K35DQET3dVYWpOaPFecqOT9dbuCfzjxoQyif1Wc574t3kOSkKevULddcR9znz1TcklCE7Ht6NIxjvTqLA==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-musl": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.0.tgz", - "integrity": "sha512-6uHywSIzz8+vi2lAzFeltnYbdHsDm3iIB57d4g5oaB9vKwjb6N6dRIgZMujw4nm5r6v9/BQH0noq6DzHrqr2pA==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-glibc": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.0.tgz", - "integrity": "sha512-BfNjXwZKxBy4WibDb/LDCriWSKLz+jJRL3cM/DllnHH5QUyoiUNEp3GmL80ZqxeumoADfCCP19+qiYiC8gUBjA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-musl": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.0.tgz", - "integrity": "sha512-S1qARKOphxfiBEkwLUbHjCY9BWPdWnW9j7f7Hb2jPplu8UZ3nes7zpPOW9bkLbHRvWM0WDTsjdOTUgW0xLBN1Q==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-glibc": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.0.tgz", - "integrity": "sha512-d9AOkusyXARkFD66S6zlGXyzx5RvY+chTP9Jp0ypSTC9d4lzyRs9ovGf/80VCxjKddcUvnsGwCHWuF2EoPgWjw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-musl": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.0.tgz", - "integrity": "sha512-iqOC+GoTDoFyk/VYSFHwjHhYrk8bljW6zOhPuhi5t9ulqiYq1togGJB5e3PwYVFFfeVgc6pbz3JdQyDoBszVaA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-arm64": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.0.tgz", - "integrity": "sha512-twtft1d+JRNkM5YbmexfcH/N4znDtjgysFaV9zvZmmJezQsKpkfLYJ+JFV3uygugK6AtIM2oADPkB2AdhBrNig==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-ia32": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.0.tgz", - "integrity": "sha512-+rgpsNRKwo8A53elqbbHXdOMtY/tAtTzManTWShB5Kk54N8Q9mzNWV7tV+IbGueCbcj826MfWGU3mprWtuf1TA==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-x64": { - "version": "2.5.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.0.tgz", - "integrity": "sha512-lPrxve92zEHdgeff3aiu4gDOIt4u7sJYha6wbdEZDCDUhtjTsOMiaJzG5lMY4GkWH8p0fMmO2Ppq5G5XXG+DQw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, "node_modules/@popperjs/core": { "name": "@sxzz/popperjs-es", "version": "2.11.7", @@ -1798,7 +1502,7 @@ "version": "3.1.3", "resolved": "https://repo.huaweicloud.com/repository/npm/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, + "devOptional": true, "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", @@ -1889,7 +1593,7 @@ "version": "2.3.0", "resolved": "https://repo.huaweicloud.com/repository/npm/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=8" @@ -2090,19 +1794,28 @@ } }, "node_modules/chokidar": { - "version": "4.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/chokidar/-/chokidar-4.0.2.tgz", - "integrity": "sha512-/b57FK+bblSU+dfewfFe0rT1YjVDfOmeLQwCAuC+vwvgLkXboATqqmy+Ipux6JrF6L5joe5CBnFOw+gLWH6yKg==", + "version": "3.6.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "devOptional": true, "license": "MIT", "dependencies": { - "readdirp": "^4.0.1" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, "engines": { - "node": ">= 14.16.0" + "node": ">= 8.10.0" }, "funding": { "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, "node_modules/clean-css": { @@ -2418,19 +2131,6 @@ "node": ">=0.4.0" } }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "license": "Apache-2.0", - "optional": true, - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/dijkstrajs": { "version": "1.0.3", "resolved": "https://repo.huaweicloud.com/repository/npm/dijkstrajs/-/dijkstrajs-1.0.3.tgz", @@ -3258,13 +2958,6 @@ "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", "license": "MIT" }, - "node_modules/immutable": { - "version": "5.0.3", - "resolved": "https://repo.huaweicloud.com/repository/npm/immutable/-/immutable-5.0.3.tgz", - "integrity": "sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==", - "devOptional": true, - "license": "MIT" - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://repo.huaweicloud.com/repository/npm/inherits/-/inherits-2.0.4.tgz", @@ -3291,7 +2984,7 @@ "version": "2.1.0", "resolved": "https://repo.huaweicloud.com/repository/npm/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" @@ -3827,13 +3520,6 @@ "tslib": "^2.0.3" } }, - "node_modules/node-addon-api": { - "version": "7.1.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/node-addon-api/-/node-addon-api-7.1.1.tgz", - "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "license": "MIT", - "optional": true - }, "node_modules/node-html-parser": { "version": "5.4.2", "resolved": "https://repo.huaweicloud.com/repository/npm/node-html-parser/-/node-html-parser-5.4.2.tgz", @@ -3855,7 +3541,7 @@ "version": "3.0.0", "resolved": "https://repo.huaweicloud.com/repository/npm/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -4370,17 +4056,16 @@ } }, "node_modules/readdirp": { - "version": "4.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/readdirp/-/readdirp-4.0.2.tgz", - "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", + "version": "3.6.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "devOptional": true, "license": "MIT", - "engines": { - "node": ">= 14.16.0" + "dependencies": { + "picomatch": "^2.2.1" }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" + "engines": { + "node": ">=8.10.0" } }, "node_modules/regexp.prototype.flags": { @@ -4553,24 +4238,19 @@ "license": "MIT" }, "node_modules/sass": { - "version": "1.83.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/sass/-/sass-1.83.0.tgz", - "integrity": "sha512-qsSxlayzoOjdvXMVLkzF84DJFc2HZEL/rFyGIKbbilYtAvlCxyuzUeff9LawTn4btVnLKg75Z8MMr1lxU1lfGw==", + "version": "1.32.13", + "resolved": "https://repo.huaweicloud.com/repository/npm/sass/-/sass-1.32.13.tgz", + "integrity": "sha512-dEgI9nShraqP7cXQH+lEXVf73WOPCse0QlFzSD8k+1TcOxCMwVXfQlr0jtoluZysQOyJGnfr21dLvYKDJq8HkA==", "devOptional": true, "license": "MIT", "dependencies": { - "chokidar": "^4.0.0", - "immutable": "^5.0.2", - "source-map-js": ">=0.6.2 <2.0.0" + "chokidar": ">=3.0.0 <4.0.0" }, "bin": { "sass": "sass.js" }, "engines": { - "node": ">=14.0.0" - }, - "optionalDependencies": { - "@parcel/watcher": "^2.4.1" + "node": ">=8.9.0" } }, "node_modules/scule": { @@ -5061,31 +4741,6 @@ } } }, - "node_modules/unplugin-vue-components/node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, "node_modules/unplugin-vue-components/node_modules/local-pkg": { "version": "0.4.3", "resolved": "https://repo.huaweicloud.com/repository/npm/local-pkg/-/local-pkg-0.4.3.tgz", @@ -5099,19 +4754,6 @@ "url": "https://github.com/sponsors/antfu" } }, - "node_modules/unplugin-vue-components/node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, "node_modules/update-browserslist-db": { "version": "1.1.1", "resolved": "https://repo.huaweicloud.com/repository/npm/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", diff --git a/package.json b/package.json index 2dfeb8b..94bf466 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "nprogress": "^0.2.0", "pinia": "^2.1.7", "pinia-plugin-persist": "^1.0.0", - "tinymce": "^7.6.0", "quill": "^2.0.3", + "tinymce": "^7.6.0", "vite-plugin-html": "^3.2.0", "vite-plugin-zip-file": "^2.2.0", "vue": "^3.3.4", diff --git a/src/http/api/cart/index.ts b/src/http/api/cart/index.ts index a425474..a7d9487 100644 --- a/src/http/api/cart/index.ts +++ b/src/http/api/cart/index.ts @@ -12,4 +12,8 @@ export const submitBookCarApi = (data: any) => { // 预约车列表提交 export const deleteCartByIdApi = (data: any) => { return post('/material-mall/bookCar/deleteById', data) +} +// 获取租赁协议 +export const getBookCarAgreementApi = (data: any) => { + return post('/material-mall/order/bookCarAgreement', data) } \ No newline at end of file diff --git a/src/layout/header.vue b/src/layout/header.vue index 3c2289f..b9db139 100644 --- a/src/layout/header.vue +++ b/src/layout/header.vue @@ -38,6 +38,7 @@ const setActiveCompanyName = () => { (e: any) => e.companyId == store.userInfo.companyId, ) activeLoginCompanyName.value = activeCompany[0]?.companyName + localStorage.setItem('currentCompanyName', activeLoginCompanyName.value) } if (userStore.companyList.length === 0) { diff --git a/src/views/cart/index.vue b/src/views/cart/index.vue index 90beec5..93aeb0e 100644 --- a/src/views/cart/index.vue +++ b/src/views/cart/index.vue @@ -170,6 +170,18 @@ + + + +
+ + 我已阅读并同意签署 + + 《xxxx公司租赁服务合同》 + +
+
+
@@ -210,13 +222,13 @@ -
+
@@ -263,6 +275,7 @@ +
(false) +// const protocolChecked = ref(false) const allKey = ref(0) const cardList = ref([]) +const bookCarAgreement = ref('') const addressTitle = ref('请选择收货地址') const activeNames = ref('') @@ -310,7 +325,7 @@ const getBookCarDetailsData = async () => { cardList.value = res.data cardList.value.forEach((e: any) => { e.isChecked = false - + e.protocolChecked = false e.devInfoVoList.forEach((j: any) => { j.days = 0 j.num = 1 @@ -469,14 +484,30 @@ const onCartSubmit = async () => { }) return } - if (!protocolChecked.value) { - ElMessage({ - showClose: false, - message: '请阅读公司合同', - type: 'error', + let isRead = false + try { + cardList.value.forEach((e: any) => { + const isSelect = e.devInfoVoList.some((j: any) => j.isChecked === true) + if (isSelect && !e.protocolChecked) { + ElMessage({ + showClose: false, + message: '请阅读公司合同', + type: 'error', + }) + isRead = true + throw new Error() + } }) - return - } + } catch (error) {} + if (isRead) return + // if (!protocolChecked.value) { + // ElMessage({ + // showClose: false, + // message: '请阅读公司合同', + // type: 'error', + // }) + // return + // } if (addressTitle.value === '请选择收货地址') { ElMessage({ @@ -527,7 +558,7 @@ const onCartSubmit = async () => { maId: e.maId, id: e.id, rentBeginTime: e.rentBeginTime + ' ' + '00:00:00', - rentEndTime: e.rentEndTime + ' ' + '00:00:00', + rentEndTime: e.rentEndTime + ' ' + '23:59:59', manageType: e.manageType, days: e.days, num: e.num, @@ -577,26 +608,58 @@ const wordUrl = ref('') const settleWordTitle = ref('') const dialogFormVisibleSettleWord: any = ref(false) //租赁服务合同 -const handleViewWord = async () => { - settleWordTitle.value = '租赁服务合同' - // const orderId = row.orderId - // const res: any = await getContractDetailApi({ orderId }) - // 打开租赁服务合同弹框 - wordUrl.value = 'http://127.0.0.1:29300/statics/2024/12/16/test_20241216154423A003.docx' +const handleViewWord = async (index: any) => { + // 组装参数 + const { companyName } = cardList.value[index].companyPersonPhoneKey + let cost = 0 + let detailsList: any = [] + cardList.value[index].devInfoVoList.map((e: any) => { + if (e.isChecked) { + detailsList.push({ + rentBeginTime: e.rentBeginTime + ' ' + '00:00:00', + rentEndTime: e.rentEndTime + ' ' + '23:59:59', + manageType: e.manageType, + days: e.days, + num: e.num, + costs: e.num * e.days * e.dayLeasePrice, + deviceName: e.deviceName, + dayLeasePrice: e.dayLeasePrice, + }) + cost = cost + e.num * e.days * e.dayLeasePrice + } + }) + const queryParams = { + companyName: localStorage.getItem('currentCompanyName'), + czcompanyName: companyName, + cost, + detailsList, + } + + console.log('查询参数', queryParams) + const res: any = await getBookCarAgreementApi(queryParams) + + bookCarAgreement.value = res.msg dialogFormVisibleSettleWord.value = true - setTimeout(() => { - const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm')) - //传递要预览的文件地址即可 - myDocxPreviewer - .preview(wordUrl.value) - .then((res) => { - console.log('预览完成') - }) - .catch((e) => { - console.log('1111', wordUrl.value) - console.log('预览失败', e) - }) - }, 1000) + + // settleWordTitle.value = '租赁服务合同' + // // const orderId = row.orderId + // // const res: any = await getContractDetailApi({ orderId }) + // // 打开租赁服务合同弹框 + // wordUrl.value = 'http://127.0.0.1:29300/statics/2024/12/16/test_20241216154423A003.docx' + // dialogFormVisibleSettleWord.value = true + // setTimeout(() => { + // const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm')) + // //传递要预览的文件地址即可 + // myDocxPreviewer + // .preview(wordUrl.value) + // .then((res) => { + // console.log('预览完成') + // }) + // .catch((e) => { + // console.log('1111', wordUrl.value) + // console.log('预览失败', e) + // }) + // }, 1000) } // 获取收货地址 diff --git a/src/views/user/orderManagementCz/components/order-home.vue b/src/views/user/orderManagementCz/components/order-home.vue index 0b97f67..d421136 100644 --- a/src/views/user/orderManagementCz/components/order-home.vue +++ b/src/views/user/orderManagementCz/components/order-home.vue @@ -55,6 +55,7 @@ const addOrEditDialogCostStatus = ref(1) // 1. 退租结算 2. 检修详情 3. const addOrEditDialogCostIsChangePrice = ref(1) const addOrEditDialogVisible = ref(false) const viewOrderDetailsType = ref(1) +const leaseAgreement = ref('') const statusList: any = [ { id: '1', name: '待接单' }, { id: '2', name: '待出库' }, @@ -618,32 +619,37 @@ const dialogFormVisibleSettleWord: any = ref(false) //租赁协议 const handleViewWord = async (index: Number, row: any) => { settleWordTitle.value = '租赁协议' - moneyParams1.value = { - /* 设备状态 */ - maStatus: 15, - detectionList: [], - insureList: [], - picList: [], - } - const orderId = row.orderId - const res: any = await getContractDetailApi({ orderId }) + // moneyParams1.value = { + // /* 设备状态 */ + // maStatus: 15, + // detectionList: [], + // insureList: [], + // picList: [], + // } + // const orderId = row.orderId + const res: any = await getContractDetailApi({ orderId: row.orderId }) + leaseAgreement.value = res.msg + // console.log(res, '租赁协议') + // leaseAgreement.value = res. // cardList.value = res.rows // 打开租赁协议弹框 - wordUrl.value = res.data.url dialogFormVisibleSettleWord.value = true - setTimeout(() => { - const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm')) - //传递要预览的文件地址即可 - myDocxPreviewer - .preview(wordUrl.value) - .then((res) => { - console.log('预览完成') - }) - .catch((e) => { - console.log('1111', wordUrl.value) - console.log('预览失败', e) - }) - }, 1000) + + // wordUrl.value = res.data.url + // dialogFormVisibleSettleWord.value = true + // setTimeout(() => { + // const myDocxPreviewer = jsPreviewDocx.init(document.getElementById('mmm')) + // //传递要预览的文件地址即可 + // myDocxPreviewer + // .preview(wordUrl.value) + // .then((res) => { + // console.log('预览完成') + // }) + // .catch((e) => { + // console.log('1111', wordUrl.value) + // console.log('预览失败', e) + // }) + // }, 1000) } const contract = ref({ @@ -815,7 +821,7 @@ const wordUrl = ref('') 承租方地址: - {{ item.czcompanyName }} + {{ item.address }} @@ -1886,6 +1892,8 @@ const wordUrl = ref('') + +