From 361e4faddac146fef9824286510f5781c46a8fa8 Mon Sep 17 00:00:00 2001 From: shizhong <124974919@qq.com> Date: Mon, 25 Sep 2023 15:25:33 +0800 Subject: [PATCH 01/35] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=A1=B6=E7=BA=A7=E9=9D=9E=E7=9B=AE=E5=BD=95=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E7=9A=84=E7=BB=84=E4=BB=B6=E5=90=8D=E7=A7=B0=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/routerHelper.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/routerHelper.ts b/src/utils/routerHelper.ts index a6825653..d9fe42aa 100644 --- a/src/utils/routerHelper.ts +++ b/src/utils/routerHelper.ts @@ -93,7 +93,10 @@ export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecord meta.alwaysShow = true const childrenData: AppRouteRecordRaw = { path: '', - name: toCamelCase(route.path, true), + name: + route.componentName && route.componentName.length > 0 + ? route.componentName + : toCamelCase(route.path, true), redirect: route.redirect, meta: meta } From fff4cfd0126bd52b317e52c9dad6ee888f61b307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E7=97=95?= <614891294@qq.com> Date: Sat, 7 Oct 2023 10:51:56 +0000 Subject: [PATCH 02/35] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=8C=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E8=8F=9C=E5=8D=95=E7=BC=93=E5=AD=98=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 天痕 <614891294@qq.com> --- src/views/system/menu/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index c75c091d..2f564dd9 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -188,6 +188,7 @@ const refreshMenu = async () => { try { await message.confirm('即将更新缓存刷新浏览器!', '刷新菜单缓存') // 清空,从而触发刷新 + wsCache.delete(CACHE_KEY.USER) wsCache.delete(CACHE_KEY.ROLE_ROUTERS) // 刷新浏览器 location.reload() From aa5f27bec73a5c36a9f5baf612ed8a3ed177bcc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E7=8B=97?= <909275705@qq.com> Date: Sun, 8 Oct 2023 08:26:07 +0000 Subject: [PATCH 03/35] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20floatToFixed2=20?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E6=9F=90=E4=BA=9B=E6=83=85=E5=86=B5=E4=B8=8B?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E7=BB=93=E6=9E=9C=E4=B8=BA=E9=9B=B6=20=20Clo?= =?UTF-8?q?ses=20#I8671C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 风狗 <909275705@qq.com> --- src/utils/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/index.ts b/src/utils/index.ts index c73b8d2f..b37883f3 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -205,6 +205,9 @@ export const floatToFixed2 = (num: number | string | undefined): string => { case 1: str = f.toString() + '0' break + case 2: + str = f.toString() + break } return str } From 683e319c723645887487b565567b72acc727e8a3 Mon Sep 17 00:00:00 2001 From: kehaiyou Date: Sun, 8 Oct 2023 22:35:50 +0800 Subject: [PATCH 04/35] =?UTF-8?q?fix:=20=E3=80=90=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E3=80=91--=E5=8A=A0=E7=AD=BE=E5=87=8F=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bpm/task/index.ts | 21 ++++ .../package/designer/ProcessViewer.vue | 8 +- src/utils/is.ts | 3 + .../ProcessInstanceChildrenTaskList.vue | 86 ++++++++++++++++ .../detail/ProcessInstanceTaskList.vue | 30 +++++- .../detail/TaskAddSignDialogForm.vue | 97 +++++++++++++++++++ .../detail/TaskSubSignDialogForm.vue | 85 ++++++++++++++++ .../bpm/processInstance/detail/index.vue | 54 ++++++++--- 8 files changed, 367 insertions(+), 17 deletions(-) create mode 100644 src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue create mode 100644 src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue create mode 100644 src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts index ccd5c4ee..a18ba998 100644 --- a/src/api/bpm/task/index.ts +++ b/src/api/bpm/task/index.ts @@ -58,3 +58,24 @@ export const returnTask = async (data) => { export const delegateTask = async (data) => { return await request.put({ url: '/bpm/task/delegate', data }) } + +/** + * 加签 + */ +export const taskAddSign = async (data) => { + return await request.put({ url: '/bpm/task/add-sign', data }) +} + +/** + * 获取减签任务列表 + */ +export const getSubSignTaskList = async (id: string) => { + return await request.get({ url: '/bpm/task/get-sub-sign?taskId=' + id }) +} + +/** + * 减签 + */ +export const taskSubSign = async (data) => { + return await request.put({ url: '/bpm/task/sub-sign', data }) +} diff --git a/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue b/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue index e2cd4679..ed4fde9d 100644 --- a/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue +++ b/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue @@ -250,6 +250,12 @@ const getResultCss = (result) => { } else if (result === 5) { // 退回 return 'highlight-return' + } else if (result === 6) { + // 委派 + return 'highlight-return' + } else if (result === 7 || result === 8 || result === 9) { + // 待后加签任务完成/待前加签任务完成/待前置任务完成 + return 'highlight-return' } return '' } @@ -362,7 +368,7 @@ const elementHover = (element) => { } } console.log(html, 'html111111111111111') - elementOverlayIds.value[element.value.id] = toRaw(overlays.value).add(element.value, { + elementOverlayIds.value[element.value.id] = toRaw(overlays.value)?.add(element.value, { position: { left: 0, bottom: 0 }, html: `
${html}
` }) diff --git a/src/utils/is.ts b/src/utils/is.ts index 37529859..cb8f1a0e 100644 --- a/src/utils/is.ts +++ b/src/utils/is.ts @@ -19,6 +19,9 @@ export const isObject = (val: any): val is Record => { } export const isEmpty = (val: T): val is T => { + if (val === null) { + return true + } if (isArray(val) || isString(val)) { return val.length === 0 } diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue b/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue new file mode 100644 index 00000000..962d0a00 --- /dev/null +++ b/src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue @@ -0,0 +1,86 @@ + + diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue index 6f4557ae..97287e99 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue @@ -12,7 +12,18 @@ :icon="getTimelineItemIcon(item)" :type="getTimelineItemType(item)" > -

任务:{{ item.name }}

+

+ 任务:{{ item.name }} + + + + 子任务 + +

diff --git a/src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue b/src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue new file mode 100644 index 00000000..4b91c9b9 --- /dev/null +++ b/src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue @@ -0,0 +1,97 @@ + + diff --git a/src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue b/src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue new file mode 100644 index 00000000..f776ef86 --- /dev/null +++ b/src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue @@ -0,0 +1,85 @@ + + diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue index 585c60db..f9c5452b 100644 --- a/src/views/bpm/processInstance/detail/index.vue +++ b/src/views/bpm/processInstance/detail/index.vue @@ -49,6 +49,10 @@ 委派 + + + 加签 + 回退 @@ -95,6 +99,8 @@ + + diff --git a/src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue b/src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue index f776ef86..61f7d68c 100644 --- a/src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue +++ b/src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue @@ -44,7 +44,7 @@ const formRef = ref() // 表单 Ref const subTaskList = ref([]) /** 打开弹窗 */ const open = async (id: string) => { - subTaskList.value = await TaskApi.getSubSignTaskList(id) + subTaskList.value = await TaskApi.getChildrenTaskList(id) if (isEmpty(subTaskList.value)) { message.warning('当前没有可减签的任务') return false From 73b2030c7f9ab8785fe35275ae734a966114cb62 Mon Sep 17 00:00:00 2001 From: xingyu Date: Fri, 13 Oct 2023 10:31:36 +0800 Subject: [PATCH 06/35] chore: update deps --- package.json | 60 ++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 22334907..923ad741 100644 --- a/package.json +++ b/package.json @@ -31,24 +31,24 @@ "@form-create/element-ui": "^3.1.24", "@iconify/iconify": "^3.1.1", "@videojs-player/vue": "^1.0.0", - "@vueuse/core": "^10.4.1", + "@vueuse/core": "^10.5.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", "@zxcvbn-ts/core": "^3.0.4", "animate.css": "^4.1.1", - "axios": "^1.5.0", + "axios": "^1.5.1", "benz-amr-recorder": "^1.1.5", "bpmn-js-token-simulation": "^0.10.0", "camunda-bpmn-moddle": "^7.0.1", "cropperjs": "^1.6.1", "crypto-js": "^4.1.1", "dayjs": "^1.11.10", - "diagram-js": "^12.3.0", + "diagram-js": "^12.4.0", "echarts": "^5.4.3", "echarts-wordcloud": "^2.1.0", "element-plus": "2.3.14", - "fast-xml-parser": "^4.3.0", - "highlight.js": "^11.8.0", + "fast-xml-parser": "^4.3.2", + "highlight.js": "^11.9.0", "intro.js": "^7.2.0", "jsencrypt": "^3.3.2", "lodash-es": "^4.17.21", @@ -63,7 +63,7 @@ "video.js": "^7.21.5", "vue": "^3.3.4", "vue-dompurify-html": "^4.1.4", - "vue-i18n": "^9.4.1", + "vue-i18n": "^9.5.0", "vue-router": "^4.2.5", "vue-types": "^5.1.1", "vuedraggable": "^4.1.0", @@ -71,54 +71,54 @@ "xml-js": "^1.6.11" }, "devDependencies": { - "@commitlint/cli": "^17.7.1", + "@commitlint/cli": "^17.7.2", "@commitlint/config-conventional": "^17.7.0", - "@iconify/json": "^2.2.119", - "@intlify/unplugin-vue-i18n": "^1.2.0", + "@iconify/json": "^2.2.128", + "@intlify/unplugin-vue-i18n": "^1.4.0", "@purge-icons/generated": "^0.9.0", - "@types/intro.js": "^5.1.1", + "@types/intro.js": "^5.1.2", "@types/lodash-es": "^4.17.9", - "@types/node": "^20.6.0", - "@types/nprogress": "^0.2.0", + "@types/node": "^20.8.5", + "@types/nprogress": "^0.2.1", "@types/qrcode": "^1.5.2", "@types/qs": "^6.9.8", - "@typescript-eslint/eslint-plugin": "^6.7.2", - "@typescript-eslint/parser": "^6.7.2", - "@unocss/transformer-variant-group": "^0.56.1", - "@unocss/eslint-config": "^0.56.1", + "@typescript-eslint/eslint-plugin": "^6.7.5", + "@typescript-eslint/parser": "^6.7.5", + "@unocss/transformer-variant-group": "^0.56.5", + "@unocss/eslint-config": "^0.56.5", "@vitejs/plugin-legacy": "^4.1.1", - "@vitejs/plugin-vue": "^4.3.4", + "@vitejs/plugin-vue": "^4.4.0", "@vitejs/plugin-vue-jsx": "^3.0.2", - "@vue-macros/volar": "^0.14.3", + "@vue-macros/volar": "^0.17.0", "autoprefixer": "^10.4.16", "bpmn-js": "8.9.0", "bpmn-js-properties-panel": "0.46.0", "consola": "^3.2.3", - "eslint": "^8.49.0", + "eslint": "^8.51.0", "eslint-config-prettier": "^9.0.0", - "eslint-define-config": "^1.23.0", - "eslint-plugin-prettier": "^5.0.0", + "eslint-define-config": "^1.24.1", + "eslint-plugin-prettier": "^5.0.1", "eslint-plugin-vue": "^9.17.0", "lint-staged": "^14.0.1", - "postcss": "^8.4.30", + "postcss": "^8.4.31", "postcss-html": "^1.5.0", - "postcss-scss": "^4.0.8", + "postcss-scss": "^4.0.9", "prettier": "^3.0.3", - "rimraf": "^5.0.1", + "rimraf": "^5.0.5", "rollup": "^3.29.2", - "sass": "^1.68.0", + "sass": "^1.69.3", "stylelint": "^15.10.3", "stylelint-config-html": "^1.1.0", "stylelint-config-recommended": "^13.0.0", "stylelint-config-standard": "^34.0.0", "stylelint-order": "^6.0.3", - "terser": "^5.20.0", + "terser": "^5.21.0", "typescript": "5.2.2", - "unocss": "^0.56.1", + "unocss": "^0.56.5", "unplugin-auto-import": "^0.16.6", "unplugin-element-plus": "^0.8.0", "unplugin-vue-components": "^0.25.2", - "vite": "4.4.9", + "vite": "4.4.11", "vite-plugin-compression": "^0.5.1", "vite-plugin-ejs": "^1.6.4", "vite-plugin-eslint": "^1.8.1", @@ -126,8 +126,8 @@ "vite-plugin-purge-icons": "^0.9.2", "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-top-level-await": "^1.3.1", - "vue-eslint-parser": "^9.3.1", - "vue-tsc": "^1.8.13" + "vue-eslint-parser": "^9.3.2", + "vue-tsc": "^1.8.19" }, "license": "MIT", "repository": { From e04ca7aac7a651d444753ed3f44e22faae408332 Mon Sep 17 00:00:00 2001 From: xingyu Date: Fri, 13 Oct 2023 10:34:01 +0800 Subject: [PATCH 07/35] fix: unocss eslint --- src/views/mall/trade/brokerage/withdraw/index.vue | 2 +- src/views/mall/trade/config/index.vue | 2 +- src/views/member/user/detail/UserOrderList.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/mall/trade/brokerage/withdraw/index.vue b/src/views/mall/trade/brokerage/withdraw/index.vue index ce4f8768..b14a7767 100644 --- a/src/views/mall/trade/brokerage/withdraw/index.vue +++ b/src/views/mall/trade/brokerage/withdraw/index.vue @@ -122,7 +122,7 @@ diff --git a/src/views/mall/trade/config/index.vue b/src/views/mall/trade/config/index.vue index 7905871b..48d04e08 100644 --- a/src/views/mall/trade/config/index.vue +++ b/src/views/mall/trade/config/index.vue @@ -16,9 +16,9 @@ {{ row.spuName }} From 9b09304c50d6cbc56a6f4e76f01bb7e7ae6f4771 Mon Sep 17 00:00:00 2001 From: xingyu Date: Fri, 13 Oct 2023 10:41:10 +0800 Subject: [PATCH 08/35] docs: update deps --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8466bbc3..b186484c 100644 --- a/README.md +++ b/README.md @@ -39,14 +39,14 @@ | 框架 | 说明 | 版本 | |----------------------------------------------------------------------|------------------|--------| | [Vue](https://staging-cn.vuejs.org/) | Vue 框架 | 3.3.4 | -| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 4.4.9 | +| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 4.4.11 | | [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.3.14 | | [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 的超集 | 5.2.2 | | [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.1.6 | -| [vueuse](https://vueuse.org/) | 常用工具集 | 10.4.1 | -| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.4.1 | +| [vueuse](https://vueuse.org/) | 常用工具集 | 10.5.0 | +| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.5.1 | | [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.2.5 | -| [unocss](https://uno.antfu.me/) | 原子 css | 0.56.1 | +| [unocss](https://uno.antfu.me/) | 原子 css | 0.56.5 | | [iconify](https://icon-sets.iconify.design/) | 在线图标库 | 3.1.1 | | [wangeditor](https://www.wangeditor.com/) | 富文本编辑器 | 5.1.23 | From 4d77d7e1366215930bd4661bc3f94b6e6a306bc8 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Sun, 15 Oct 2023 14:26:20 +0800 Subject: [PATCH 09/35] =?UTF-8?q?feat:=20=E7=A4=BE=E4=BA=A4=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login/index.ts | 12 + src/api/login/types.ts | 3 + src/locales/zh-CN.ts | 1 + src/router/modules/remaining.ts | 8 +- src/views/Login/SocialLogin.vue | 343 +++++++++++++++++++++++ src/views/Login/components/LoginForm.vue | 7 +- 6 files changed, 369 insertions(+), 5 deletions(-) create mode 100644 src/views/Login/SocialLogin.vue diff --git a/src/api/login/index.ts b/src/api/login/index.ts index b65a90cf..1ffb38d6 100644 --- a/src/api/login/index.ts +++ b/src/api/login/index.ts @@ -47,6 +47,18 @@ export const smsLogin = (data: SmsLoginVO) => { return request.post({ url: '/system/auth/sms-login', data }) } +// 社交快捷登录,使用 code 授权码 +export function socialLogin(type: string, code: string, state: string) { + return request.post({ + url: '/system/auth/social-login', + data: { + type, + code, + state + } + }) +} + // 社交授权的跳转 export const socialAuthRedirect = (type: number, redirectUri: string) => { return request.get({ diff --git a/src/api/login/types.ts b/src/api/login/types.ts index b2173f72..fff81225 100644 --- a/src/api/login/types.ts +++ b/src/api/login/types.ts @@ -2,6 +2,9 @@ export type UserLoginVO = { username: string password: string captchaVerification: string + socialType?: string + socialCode?: string + socialState?: string } export type TokenType = { diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index cc4bb47e..4f95852f 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -141,6 +141,7 @@ export default { }, router: { login: '登录', + socialLogin: '社交登录', home: '首页', analysis: '分析页', workplace: '工作台' diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index d8172d27..3c4898e4 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -186,12 +186,12 @@ const remainingRouter: AppRouteRecordRaw[] = [ } }, { - path: '/sso', - component: () => import('@/views/Login/Login.vue'), - name: 'SSOLogin', + path: '/social-login', + component: () => import('@/views/Login/SocialLogin.vue'), + name: 'SocialLogin', meta: { hidden: true, - title: t('router.login'), + title: t('router.socialLogin'), noTagsView: true } }, diff --git a/src/views/Login/SocialLogin.vue b/src/views/Login/SocialLogin.vue new file mode 100644 index 00000000..6bbfc1df --- /dev/null +++ b/src/views/Login/SocialLogin.vue @@ -0,0 +1,343 @@ + + + + + diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index a4eb0b92..9bee2523 100644 --- a/src/views/Login/components/LoginForm.vue +++ b/src/views/Login/components/LoginForm.vue @@ -284,8 +284,13 @@ const doSocialLogin = async (type: number) => { }) } // 计算 redirectUri + // tricky: type、redirect需要先encode一次,否则钉钉回调会丢失。 + // 配合 Login/SocialLogin.vue#getUrlValue() 使用 const redirectUri = - location.origin + '/social-login?type=' + type + '&redirect=' + (redirect.value || '/') + location.origin + + '/social-login?' + + encodeURIComponent(`type=${type}&redirect=${redirect.value || '/'}`) + // 进行跳转 const res = await LoginApi.socialAuthRedirect(type, encodeURIComponent(redirectUri)) window.location.href = res From 3587d1ef971fae3d05e55fa83b3f72c632558408 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Sun, 15 Oct 2023 14:29:16 +0800 Subject: [PATCH 10/35] =?UTF-8?q?fix:=20=E8=B7=AF=E7=94=B1=E7=BC=BA?= =?UTF-8?q?=E5=B0=91name=E5=AD=97=E6=AE=B5=EF=BC=8Cts=E4=B8=8D=E9=AB=98?= =?UTF-8?q?=E5=85=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/remaining.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 3c4898e4..f955b36b 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -333,6 +333,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ { path: '/mall/product', // 商品中心 component: Layout, + name: 'Product', meta: { hidden: true }, @@ -394,6 +395,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ { path: '/mall/trade', // 交易中心 component: Layout, + name: 'Trade', meta: { hidden: true }, From 89417ac393886684305b5f0a88a7f26e2618da3c Mon Sep 17 00:00:00 2001 From: dhb52 Date: Sun, 15 Oct 2023 14:58:13 +0800 Subject: [PATCH 11/35] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4SSOLogin.vue?= =?UTF-8?q?=E7=BB=84=E5=BB=BA=EF=BC=8C=E8=A7=A3=E5=86=B3=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E4=B8=8D=E5=81=9C=E9=87=8D=E5=AE=9A=E5=90=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Login/Login.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index 19ffe2d7..d1a5e7f5 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -55,7 +55,7 @@ - + @@ -70,7 +70,7 @@ import { useAppStore } from '@/store/modules/app' import { ThemeSwitch } from '@/layout/components/ThemeSwitch' import { LocaleDropdown } from '@/layout/components/LocaleDropdown' -import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue } from './components' +import { LoginForm, MobileForm, QrCodeForm, RegisterForm } from './components' defineOptions({ name: 'Login' }) From 90d6f4da9f2077994751580b81d9bed74a43fa66 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Sun, 15 Oct 2023 17:47:36 +0800 Subject: [PATCH 12/35] =?UTF-8?q?=E9=92=B1=E5=8C=85-=20=E9=92=B1=E5=8C=85?= =?UTF-8?q?=E4=BD=99=E9=A2=9D=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/pay/wallet/{ => balance}/index.ts | 5 + .../member/user/detail/UserAccountInfo.vue | 2 +- src/views/pay/wallet/balance/WalletForm.vue | 99 ++++++++++ src/views/pay/wallet/balance/index.vue | 174 ++++++++++++++++++ .../pay/wallet/rechargePackage/index.vue | 1 - 5 files changed, 279 insertions(+), 2 deletions(-) rename src/api/pay/wallet/{ => balance}/index.ts (77%) create mode 100644 src/views/pay/wallet/balance/WalletForm.vue create mode 100644 src/views/pay/wallet/balance/index.vue diff --git a/src/api/pay/wallet/index.ts b/src/api/pay/wallet/balance/index.ts similarity index 77% rename from src/api/pay/wallet/index.ts rename to src/api/pay/wallet/balance/index.ts index b57deeb0..e5f4a1cd 100644 --- a/src/api/pay/wallet/index.ts +++ b/src/api/pay/wallet/balance/index.ts @@ -20,3 +20,8 @@ export interface WalletVO { export const getWallet = async (params: PayWalletUserReqVO) => { return await request.get({ url: `/pay/wallet/get`, params }) } + +// 查询会员钱包列表 +export const getWalletPage = async (params) => { + return await request.get({ url: `/pay/wallet/page`, params }) +} diff --git a/src/views/member/user/detail/UserAccountInfo.vue b/src/views/member/user/detail/UserAccountInfo.vue index 13daff48..bb2a06b8 100644 --- a/src/views/member/user/detail/UserAccountInfo.vue +++ b/src/views/member/user/detail/UserAccountInfo.vue @@ -47,7 +47,7 @@ diff --git a/src/views/pay/wallet/balance/index.vue b/src/views/pay/wallet/balance/index.vue new file mode 100644 index 00000000..58754fea --- /dev/null +++ b/src/views/pay/wallet/balance/index.vue @@ -0,0 +1,174 @@ + + + diff --git a/src/views/pay/wallet/rechargePackage/index.vue b/src/views/pay/wallet/rechargePackage/index.vue index 6034e447..f097577c 100644 --- a/src/views/pay/wallet/rechargePackage/index.vue +++ b/src/views/pay/wallet/rechargePackage/index.vue @@ -135,7 +135,6 @@ const queryParams = reactive({ createTime: [] }) const queryFormRef = ref() // 搜索的表单 -const exportLoading = ref(false) // 导出的加载中 /** 查询列表 */ const getList = async () => { From e2a08ddbac69a06b346a3f624bf0b0db2242bb8c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 15 Oct 2023 21:58:19 +0800 Subject: [PATCH 13/35] =?UTF-8?q?=E6=81=A2=E5=A4=8D=20SSO=20=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/remaining.ts | 16 +++++++++++++--- src/views/Login/Login.vue | 4 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index f955b36b..aa260cf1 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -185,6 +185,16 @@ const remainingRouter: AppRouteRecordRaw[] = [ noTagsView: true } }, + { + path: '/sso', + component: () => import('@/views/Login/Login.vue'), + name: 'SSOLogin', + meta: { + hidden: true, + title: t('router.login'), + noTagsView: true + } + }, { path: '/social-login', component: () => import('@/views/Login/SocialLogin.vue'), @@ -333,7 +343,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ { path: '/mall/product', // 商品中心 component: Layout, - name: 'Product', + name: 'ProductCenter', meta: { hidden: true }, @@ -395,7 +405,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ { path: '/mall/trade', // 交易中心 component: Layout, - name: 'Trade', + name: 'TradeCenter', meta: { hidden: true }, @@ -417,7 +427,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ { path: '/member', component: Layout, - name: 'member', + name: 'MemberCenter', meta: { hidden: true }, children: [ { diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index d1a5e7f5..19ffe2d7 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -55,7 +55,7 @@ - + @@ -70,7 +70,7 @@ import { useAppStore } from '@/store/modules/app' import { ThemeSwitch } from '@/layout/components/ThemeSwitch' import { LocaleDropdown } from '@/layout/components/LocaleDropdown' -import { LoginForm, MobileForm, QrCodeForm, RegisterForm } from './components' +import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue } from './components' defineOptions({ name: 'Login' }) From 3802fee661b59cb43f07b3b44a8f8e94a500d111 Mon Sep 17 00:00:00 2001 From: owen Date: Mon, 16 Oct 2023 09:51:19 +0800 Subject: [PATCH 14/35] =?UTF-8?q?=E5=95=86=E5=9F=8E=EF=BC=9A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=95=86=E5=9F=8E=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/statistics/member.ts | 32 +++ src/api/mall/statistics/pay.ts | 6 + src/api/mall/statistics/trade.ts | 54 +++++ .../ShortcutDateRangePicker/index.vue | 89 ++++++++ src/utils/index.ts | 13 ++ .../mall/home/components/ComparisonCard.vue | 42 ++++ .../home/components/MemberStatisticsCard.vue | 91 ++++++++ .../home/components/OperationDataCard.vue | 91 ++++++++ .../mall/home/components/ShortcutCard.vue | 79 +++++++ .../mall/home/components/TradeTrendCard.vue | 208 +++++++++++++++++ src/views/mall/home/index.vue | 113 ++++++++++ .../member/components/MemberFunnelCard.vue | 119 ++++++++++ .../member/components/MemberTerminalCard.vue | 69 ++++++ src/views/mall/statistics/member/index.vue | 213 ++---------------- src/views/mall/statistics/trade/index.vue | 94 +------- 15 files changed, 1038 insertions(+), 275 deletions(-) create mode 100644 src/api/mall/statistics/pay.ts create mode 100644 src/components/ShortcutDateRangePicker/index.vue create mode 100644 src/views/mall/home/components/ComparisonCard.vue create mode 100644 src/views/mall/home/components/MemberStatisticsCard.vue create mode 100644 src/views/mall/home/components/OperationDataCard.vue create mode 100644 src/views/mall/home/components/ShortcutCard.vue create mode 100644 src/views/mall/home/components/TradeTrendCard.vue create mode 100644 src/views/mall/home/index.vue create mode 100644 src/views/mall/statistics/member/components/MemberFunnelCard.vue create mode 100644 src/views/mall/statistics/member/components/MemberTerminalCard.vue diff --git a/src/api/mall/statistics/member.ts b/src/api/mall/statistics/member.ts index d4680d3d..e0d77e40 100644 --- a/src/api/mall/statistics/member.ts +++ b/src/api/mall/statistics/member.ts @@ -54,6 +54,20 @@ export interface MemberTerminalStatisticsRespVO { userCount: number } +/** 会员数量统计 Response VO */ +export interface MemberCountRespVO { + /** 用户访问量 */ + visitUserCount: string + /** 新增用户数量 */ + createUserCount: number +} + +/** 会员注册数量 Response VO */ +export interface MemberRegisterCountRespVO { + date: string + count: number +} + // 查询会员统计 export const getMemberSummary = () => { return request.get({ @@ -89,3 +103,21 @@ export const getMemberTerminalStatisticsList = () => { url: '/statistics/member/get-terminal-statistics-list' }) } + +// 获得用户数量量对照 +export const getUserCountComparison = () => { + return request.get>({ + url: '/statistics/member/user-count-comparison' + }) +} + +// 获得会员注册数量列表 +export const getMemberRegisterCountList = ( + beginTime: dayjs.ConfigType, + endTime: dayjs.ConfigType +) => { + return request.get({ + url: '/statistics/member/register-count-list', + params: { times: [formatDate(beginTime), formatDate(endTime)] } + }) +} diff --git a/src/api/mall/statistics/pay.ts b/src/api/mall/statistics/pay.ts new file mode 100644 index 00000000..1593f38d --- /dev/null +++ b/src/api/mall/statistics/pay.ts @@ -0,0 +1,6 @@ +import request from '@/config/axios' + +/** 获取钱包充值金额 */ +export const getWalletRechargePrice = async () => { + return await request.get({ url: `/statistics/pay/wallet-recharge-price` }) +} diff --git a/src/api/mall/statistics/trade.ts b/src/api/mall/statistics/trade.ts index f7829ccb..76da08ca 100644 --- a/src/api/mall/statistics/trade.ts +++ b/src/api/mall/statistics/trade.ts @@ -33,6 +33,36 @@ export interface TradeTrendSummaryRespVO { orderRefundPrice: number } +/** 交易订单数量 Response VO */ +export interface TradeOrderCountRespVO { + /** 待发货 */ + undelivered?: number + /** 待核销 */ + pickUp?: number + /** 退款中 */ + afterSaleApply?: number + /** 提现待审核 */ + auditingWithdraw?: number +} + +/** 交易订单统计 Response VO */ +export interface TradeOrderSummaryRespVO { + /** 支付订单商品数 */ + orderPayCount?: number + /** 总支付金额,单位:分 */ + orderPayPrice?: number +} + +/** 订单量趋势统计 Response VO */ +export interface TradeOrderTrendRespVO { + /** 日期 */ + date: string + /** 订单数量 */ + orderPayCount: number + /** 订单支付金额 */ + orderPayPrice: number +} + // 查询交易统计 export const getTradeStatisticsSummary = () => { return request.get>({ @@ -64,6 +94,30 @@ export const exportTradeTrend = (params: TradeTrendReqVO) => { }) } +// 获得交易订单数量 +export const getOrderCount = async () => { + return await request.get({ url: `/statistics/trade/order-count` }) +} + +// 获得交易订单数量对照 +export const getOrderComparison = async () => { + return await request.get>({ + url: `/statistics/trade/order-comparison` + }) +} + +// 获得订单量趋势统计 +export const getOrderCountTrendComparison = ( + type: number, + beginTime: dayjs.ConfigType, + endTime: dayjs.ConfigType +) => { + return request.get[]>({ + url: '/statistics/trade/order-count-trend', + params: { type, beginTime: formatDate(beginTime), endTime: formatDate(endTime) } + }) +} + /** 时间参数需要格式化, 确保接口能识别 */ const formatDateParam = (params: TradeTrendReqVO) => { return { times: [formatDate(params.times[0]), formatDate(params.times[1])] } as TradeTrendReqVO diff --git a/src/components/ShortcutDateRangePicker/index.vue b/src/components/ShortcutDateRangePicker/index.vue new file mode 100644 index 00000000..d7fa90cb --- /dev/null +++ b/src/components/ShortcutDateRangePicker/index.vue @@ -0,0 +1,89 @@ + + diff --git a/src/utils/index.ts b/src/utils/index.ts index 6c9a5df2..e6b3173c 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -233,3 +233,16 @@ export const yuanToFen = (amount: string | number): number => { export const fenToYuan = (price: string | number): number => { return formatToFraction(price) } + +/** + * 计算环比 + * + * @param value 当前数值 + * @param reference 对比数值 + */ +export const calculateRelativeRate = (value?: number, reference?: number) => { + // 防止除0 + if (!reference) return 0 + + return ((100 * ((value || 0) - reference)) / reference).toFixed(0) +} diff --git a/src/views/mall/home/components/ComparisonCard.vue b/src/views/mall/home/components/ComparisonCard.vue new file mode 100644 index 00000000..ee1c2f0c --- /dev/null +++ b/src/views/mall/home/components/ComparisonCard.vue @@ -0,0 +1,42 @@ + + diff --git a/src/views/mall/home/components/MemberStatisticsCard.vue b/src/views/mall/home/components/MemberStatisticsCard.vue new file mode 100644 index 00000000..2f9d7ab5 --- /dev/null +++ b/src/views/mall/home/components/MemberStatisticsCard.vue @@ -0,0 +1,91 @@ + + diff --git a/src/views/mall/home/components/OperationDataCard.vue b/src/views/mall/home/components/OperationDataCard.vue new file mode 100644 index 00000000..cae09a3e --- /dev/null +++ b/src/views/mall/home/components/OperationDataCard.vue @@ -0,0 +1,91 @@ + + diff --git a/src/views/mall/home/components/ShortcutCard.vue b/src/views/mall/home/components/ShortcutCard.vue new file mode 100644 index 00000000..9fdd5cd4 --- /dev/null +++ b/src/views/mall/home/components/ShortcutCard.vue @@ -0,0 +1,79 @@ + + diff --git a/src/views/mall/home/components/TradeTrendCard.vue b/src/views/mall/home/components/TradeTrendCard.vue new file mode 100644 index 00000000..6aa9fdcc --- /dev/null +++ b/src/views/mall/home/components/TradeTrendCard.vue @@ -0,0 +1,208 @@ + + diff --git a/src/views/mall/home/index.vue b/src/views/mall/home/index.vue new file mode 100644 index 00000000..95e2e1da --- /dev/null +++ b/src/views/mall/home/index.vue @@ -0,0 +1,113 @@ + + + diff --git a/src/views/mall/statistics/member/components/MemberFunnelCard.vue b/src/views/mall/statistics/member/components/MemberFunnelCard.vue new file mode 100644 index 00000000..15c954e1 --- /dev/null +++ b/src/views/mall/statistics/member/components/MemberFunnelCard.vue @@ -0,0 +1,119 @@ + + + diff --git a/src/views/mall/statistics/member/components/MemberTerminalCard.vue b/src/views/mall/statistics/member/components/MemberTerminalCard.vue new file mode 100644 index 00000000..7bbab76c --- /dev/null +++ b/src/views/mall/statistics/member/components/MemberTerminalCard.vue @@ -0,0 +1,69 @@ + + diff --git a/src/views/mall/statistics/member/index.vue b/src/views/mall/statistics/member/index.vue index e76e861c..713f7776 100644 --- a/src/views/mall/statistics/member/index.vue +++ b/src/views/mall/statistics/member/index.vue @@ -44,118 +44,20 @@ - - -
-
-
-
-
- 注册用户数量:{{ analyseData?.comparison?.value?.userCount || 0 }} -
-
- 环比增长率:{{ - calculateRelativeRate( - analyseData?.comparison?.value?.userCount, - analyseData?.comparison?.reference?.userCount - ) - }}% -
-
-
-
- {{ analyseData?.visitorCount || 0 }} - 访客 -
-
-
-
-
-
- 活跃用户数量:{{ analyseData?.comparison?.value?.activeUserCount || 0 }} -
-
- 环比增长率:{{ - calculateRelativeRate( - analyseData?.comparison?.value?.activeUserCount, - analyseData?.comparison?.reference?.activeUserCount - ) - }}% -
-
-
-
- {{ analyseData?.orderUserCount || 0 }} - 下单 -
-
-
-
-
-
-
- 充值用户数量:{{ analyseData?.comparison?.value?.rechargeUserCount || 0 }} -
-
- 环比增长率:{{ - calculateRelativeRate( - analyseData?.comparison?.value?.rechargeUserCount, - analyseData?.comparison?.reference?.rechargeUserCount - ) - }}% -
-
-
-
客单价:{{ fenToYuan(analyseData?.atv || 0) }}
-
-
-
-
- {{ analyseData?.payUserCount || 0 }} - 成交用户 -
-
-
-
+ +
- - - + +
- + + @@ -206,7 +108,10 @@ - + + @@ -214,63 +119,34 @@ diff --git a/src/views/mall/trade/order/detail/index.vue b/src/views/mall/trade/order/detail/index.vue index 58939dbc..7d0a88ac 100644 --- a/src/views/mall/trade/order/detail/index.vue +++ b/src/views/mall/trade/order/detail/index.vue @@ -395,27 +395,27 @@ onMounted(async () => { background-color: #f7f8fa; &::before { - content: ''; /* 必须设置 content 属性 */ position: absolute; top: 10px; left: 13px; /* 将伪元素水平居中 */ - border-width: 8px; /* 调整尖角大小 */ - border-style: solid; border-color: transparent #f7f8fa transparent transparent; /* 尖角颜色,左侧朝向 */ + border-style: solid; + border-width: 8px; /* 调整尖角大小 */ + content: ''; /* 必须设置 content 属性 */ } } .dot-node-style { - width: 20px; - height: 20px; position: absolute; left: -5px; display: flex; + width: 20px; + height: 20px; + font-size: 10px; + color: #fff; + border-radius: 50%; justify-content: center; align-items: center; - border-radius: 50%; - color: #fff; - font-size: 10px; } } From 5da9b660bdfebf1d6e59f651952b59ff7f28602c Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 16 Oct 2023 15:09:13 +0800 Subject: [PATCH 24/35] perf: propTypes --- src/utils/propTypes.ts | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/utils/propTypes.ts b/src/utils/propTypes.ts index fb8f84e7..863f55cc 100644 --- a/src/utils/propTypes.ts +++ b/src/utils/propTypes.ts @@ -1,12 +1,10 @@ -import { createTypes, VueTypesInterface, VueTypeValidableDef } from 'vue-types' +import { VueTypeValidableDef, VueTypesInterface, createTypes, toValidableType } from 'vue-types' import { CSSProperties } from 'vue' -// 自定义扩展vue-types type PropTypes = VueTypesInterface & { readonly style: VueTypeValidableDef } - -const propTypes = createTypes({ +const newPropTypes = createTypes({ func: undefined, bool: undefined, string: undefined, @@ -15,14 +13,12 @@ const propTypes = createTypes({ integer: undefined }) as PropTypes -// 需要自定义扩展的类型 -// see: https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#the-extend-method -// propTypes.extend([ -// { -// name: 'style', -// getter: true, -// type: [String, Object], -// default: undefined -// } -// ]) +class propTypes extends newPropTypes { + static get style() { + return toValidableType('style', { + type: [String, Object] + }) + } +} + export { propTypes } From 8c18ad941e5cd308cffa16cb55a634f5d53ffa0d Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 16 Oct 2023 15:09:47 +0800 Subject: [PATCH 25/35] perf: is utils --- src/utils/is.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/utils/is.ts b/src/utils/is.ts index 37529859..8ac2e50d 100644 --- a/src/utils/is.ts +++ b/src/utils/is.ts @@ -103,3 +103,12 @@ export const isUrl = (path: string): boolean => { export const isDark = (): boolean => { return window.matchMedia('(prefers-color-scheme: dark)').matches } + +// 是否是图片链接 +export const isImgPath = (path: string): boolean => { + return /(https?:\/\/|data:image\/).*?\.(png|jpg|jpeg|gif|svg|webp|ico)/gi.test(path) +} + +export const isEmptyVal = (val: any): boolean => { + return val === '' || val === null || val === undefined +} From 66ec61080171302caa77f06145d835bb6c2ba7fe Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 16 Oct 2023 21:55:11 +0800 Subject: [PATCH 26/35] =?UTF-8?q?code=20review=EF=BC=9A=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/promotion/article/ArticleForm.vue | 12 +++-- src/views/mall/promotion/article/index.vue | 48 ++++++------------- 2 files changed, 21 insertions(+), 39 deletions(-) diff --git a/src/views/mall/promotion/article/ArticleForm.vue b/src/views/mall/promotion/article/ArticleForm.vue index 36fc1340..92976931 100644 --- a/src/views/mall/promotion/article/ArticleForm.vue +++ b/src/views/mall/promotion/article/ArticleForm.vue @@ -8,6 +8,11 @@ label-width="110px" > + + + + + @@ -20,11 +25,6 @@ - - - - - @@ -40,6 +40,7 @@ + + diff --git a/src/views/mall/promotion/article/index.vue b/src/views/mall/promotion/article/index.vue index a5bbd73c..fb5c48d8 100644 --- a/src/views/mall/promotion/article/index.vue +++ b/src/views/mall/promotion/article/index.vue @@ -78,51 +78,31 @@ - - - - - - - - - + + - - - - + + + + + + + + + - - - - - - From cd4b4cd3228a95fcc827ddfdccaf3949d2546a7c Mon Sep 17 00:00:00 2001 From: owen Date: Mon, 16 Oct 2023 22:03:36 +0800 Subject: [PATCH 27/35] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=EF=BC=9AReview?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/statistics/member.ts | 10 +++++----- src/api/mall/statistics/pay.ts | 8 +++++++- src/api/mall/statistics/trade.ts | 2 +- src/views/mall/home/components/OperationDataCard.vue | 3 ++- src/views/mall/home/index.vue | 4 ++-- src/views/mall/statistics/trade/index.vue | 6 +++--- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/api/mall/statistics/member.ts b/src/api/mall/statistics/member.ts index 28d5a78c..92af031e 100644 --- a/src/api/mall/statistics/member.ts +++ b/src/api/mall/statistics/member.ts @@ -58,8 +58,8 @@ export interface MemberTerminalStatisticsRespVO { export interface MemberCountRespVO { /** 用户访问量 */ visitUserCount: string - /** 新增用户数量 */ - createUserCount: number + /** 注册用户数量 */ + registerUserCount: number } /** 会员注册数量 Response VO */ @@ -86,21 +86,21 @@ export const getMemberAnalyse = (params: MemberAnalyseReqVO) => { // 按照省份,查询会员统计列表 export const getMemberAreaStatisticsList = () => { return request.get({ - url: '/statistics/member/get-area-statistics-list' + url: '/statistics/member/area-statistics-list' }) } // 按照性别,查询会员统计列表 export const getMemberSexStatisticsList = () => { return request.get({ - url: '/statistics/member/get-sex-statistics-list' + url: '/statistics/member/sex-statistics-list' }) } // 按照终端,查询会员统计列表 export const getMemberTerminalStatisticsList = () => { return request.get({ - url: '/statistics/member/get-terminal-statistics-list' + url: '/statistics/member/terminal-statistics-list' }) } diff --git a/src/api/mall/statistics/pay.ts b/src/api/mall/statistics/pay.ts index 1593f38d..f5d14c9d 100644 --- a/src/api/mall/statistics/pay.ts +++ b/src/api/mall/statistics/pay.ts @@ -1,6 +1,12 @@ import request from '@/config/axios' +/** 支付统计 */ +export interface PaySummaryRespVO { + /** 充值金额,单位分 */ + rechargePrice: number +} + /** 获取钱包充值金额 */ export const getWalletRechargePrice = async () => { - return await request.get({ url: `/statistics/pay/wallet-recharge-price` }) + return await request.get({ url: `/statistics/pay/summary` }) } diff --git a/src/api/mall/statistics/trade.ts b/src/api/mall/statistics/trade.ts index ef2a2b2b..5e620a6e 100644 --- a/src/api/mall/statistics/trade.ts +++ b/src/api/mall/statistics/trade.ts @@ -25,7 +25,7 @@ export interface TradeTrendSummaryRespVO { expensePrice: number orderWalletPayPrice: number brokerageSettlementPrice: number - orderRefundPrice: number + afterSaleRefundPrice: number } /** 交易订单数量 Response VO */ diff --git a/src/views/mall/home/components/OperationDataCard.vue b/src/views/mall/home/components/OperationDataCard.vue index cae09a3e..3efac9bf 100644 --- a/src/views/mall/home/components/OperationDataCard.vue +++ b/src/views/mall/home/components/OperationDataCard.vue @@ -70,7 +70,8 @@ const getProductData = async () => { /** 查询钱包充值数据 */ const getWalletRechargeData = async () => { - data.rechargePrice.value = await PayStatisticsApi.getWalletRechargePrice() + const paySummary = await PayStatisticsApi.getWalletRechargePrice(); + data.rechargePrice.value = paySummary.rechargePrice } /** diff --git a/src/views/mall/home/index.vue b/src/views/mall/home/index.vue index ede05bff..feaa46a9 100644 --- a/src/views/mall/home/index.vue +++ b/src/views/mall/home/index.vue @@ -32,8 +32,8 @@ diff --git a/src/views/mall/statistics/trade/index.vue b/src/views/mall/statistics/trade/index.vue index b7dfc667..744bcd1e 100644 --- a/src/views/mall/statistics/trade/index.vue +++ b/src/views/mall/statistics/trade/index.vue @@ -192,11 +192,11 @@ icon-bg-color="text-blue-500" prefix="¥" :decimals="2" - :value="fenToYuan(trendSummary?.value?.orderRefundPrice || 0)" + :value="fenToYuan(trendSummary?.value?.afterSaleRefundPrice || 0)" :percent=" calculateRelativeRate( - trendSummary?.value?.orderRefundPrice, - trendSummary?.reference?.orderRefundPrice + trendSummary?.value?.afterSaleRefundPrice, + trendSummary?.reference?.afterSaleRefundPrice ) " /> From 6204ce6c1b70c5c878f3e21de6d286935ed8ef15 Mon Sep 17 00:00:00 2001 From: owen Date: Mon, 16 Oct 2023 22:09:20 +0800 Subject: [PATCH 28/35] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=EF=BC=9Atrade=5Fstatis?= =?UTF-8?q?tics=20=E5=AD=97=E6=AE=B5=E3=80=90order=5Fwallet=5Fpay=5Fprice?= =?UTF-8?q?=E3=80=91=E6=94=B9=E4=B8=BA=E3=80=90wallet=5Fpay=5Fprice?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/statistics/trade.ts | 2 +- src/views/mall/statistics/trade/index.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/mall/statistics/trade.ts b/src/api/mall/statistics/trade.ts index 5e620a6e..94052597 100644 --- a/src/api/mall/statistics/trade.ts +++ b/src/api/mall/statistics/trade.ts @@ -23,7 +23,7 @@ export interface TradeTrendSummaryRespVO { orderPayPrice: number rechargePrice: number expensePrice: number - orderWalletPayPrice: number + walletPayPrice: number brokerageSettlementPrice: number afterSaleRefundPrice: number } diff --git a/src/views/mall/statistics/trade/index.vue b/src/views/mall/statistics/trade/index.vue index 744bcd1e..aff190b0 100644 --- a/src/views/mall/statistics/trade/index.vue +++ b/src/views/mall/statistics/trade/index.vue @@ -156,11 +156,11 @@ icon-bg-color="text-cyan-500" prefix="¥" :decimals="2" - :value="fenToYuan(trendSummary?.value?.orderWalletPayPrice || 0)" + :value="fenToYuan(trendSummary?.value?.walletPayPrice || 0)" :percent=" calculateRelativeRate( - trendSummary?.value?.orderWalletPayPrice, - trendSummary?.reference?.orderWalletPayPrice + trendSummary?.value?.walletPayPrice, + trendSummary?.reference?.walletPayPrice ) " /> From e3a0cfe5e934f2d4863012821545864c845cdbf2 Mon Sep 17 00:00:00 2001 From: owen Date: Mon, 16 Oct 2023 22:18:51 +0800 Subject: [PATCH 29/35] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/home/components/OperationDataCard.vue | 2 +- src/views/mall/home/components/TradeTrendCard.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/mall/home/components/OperationDataCard.vue b/src/views/mall/home/components/OperationDataCard.vue index 3efac9bf..b905203b 100644 --- a/src/views/mall/home/components/OperationDataCard.vue +++ b/src/views/mall/home/components/OperationDataCard.vue @@ -70,7 +70,7 @@ const getProductData = async () => { /** 查询钱包充值数据 */ const getWalletRechargeData = async () => { - const paySummary = await PayStatisticsApi.getWalletRechargePrice(); + const paySummary = await PayStatisticsApi.getWalletRechargePrice() data.rechargePrice.value = paySummary.rechargePrice } diff --git a/src/views/mall/home/components/TradeTrendCard.vue b/src/views/mall/home/components/TradeTrendCard.vue index 6aa9fdcc..a8cab828 100644 --- a/src/views/mall/home/components/TradeTrendCard.vue +++ b/src/views/mall/home/components/TradeTrendCard.vue @@ -186,7 +186,7 @@ const getOrderCountTrendComparison = async ( dates.push(item.value.date) if (series.length === 2) { series[0].data.push(fenToYuan(item?.value?.orderPayPrice || 0)) // 当前金额 - series[1].data.push(fenToYuan(item?.value?.orderPayCount || 0)) // 对照数量 + series[1].data.push(fenToYuan(item?.value?.orderPayCount || 0)) // 当前数量 } else { series[0].data.push(fenToYuan(item?.reference?.orderPayPrice || 0)) // 对照金额 series[1].data.push(fenToYuan(item?.value?.orderPayPrice || 0)) // 当前金额 From 8626bccc4c7258a3676ef6174de3262a8f88397a Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Mon, 16 Oct 2023 22:32:10 +0800 Subject: [PATCH 30/35] =?UTF-8?q?=E9=92=B1=E5=8C=85=20-=20=E9=92=B1?= =?UTF-8?q?=E5=8C=85=E4=BD=99=E9=A2=9D=E6=B5=81=E6=B0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/pay/wallet/transaction/index.ts | 14 +++ src/views/pay/wallet/balance/WalletForm.vue | 91 ++----------------- src/views/pay/wallet/balance/index.vue | 20 +--- .../transaction/WalletTransactionList.vue | 68 ++++++++++++++ 4 files changed, 94 insertions(+), 99 deletions(-) create mode 100644 src/api/pay/wallet/transaction/index.ts create mode 100644 src/views/pay/wallet/transaction/WalletTransactionList.vue diff --git a/src/api/pay/wallet/transaction/index.ts b/src/api/pay/wallet/transaction/index.ts new file mode 100644 index 00000000..3377ffaa --- /dev/null +++ b/src/api/pay/wallet/transaction/index.ts @@ -0,0 +1,14 @@ +import request from '@/config/axios' + +export interface WalletTransactionVO { + id: number + walletId: number + title: string + price: number + balance: number +} + +// 查询会员钱包流水列表 +export const getWalletTransactionPage = async (params) => { + return await request.get({ url: `/pay/wallet-transaction/page`, params }) +} diff --git a/src/views/pay/wallet/balance/WalletForm.vue b/src/views/pay/wallet/balance/WalletForm.vue index a633a1be..8173e123 100644 --- a/src/views/pay/wallet/balance/WalletForm.vue +++ b/src/views/pay/wallet/balance/WalletForm.vue @@ -1,99 +1,22 @@ diff --git a/src/views/pay/wallet/balance/index.vue b/src/views/pay/wallet/balance/index.vue index 58754fea..e4c19c6e 100644 --- a/src/views/pay/wallet/balance/index.vue +++ b/src/views/pay/wallet/balance/index.vue @@ -46,9 +46,6 @@ 搜索 重置 - - 新增 - @@ -84,14 +81,7 @@ /> @@ -104,8 +94,8 @@ /> - - + + + From c3f06f5fbe343b954f4f25ef2010a6c694f3dcf3 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Mon, 16 Oct 2023 22:45:32 +0800 Subject: [PATCH 31/35] =?UTF-8?q?=E9=92=B1=E5=8C=85=20-=20=E9=92=B1?= =?UTF-8?q?=E5=8C=85=E4=BD=99=E9=A2=9D=E6=B5=81=E6=B0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pay/wallet/transaction/WalletTransactionList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/pay/wallet/transaction/WalletTransactionList.vue b/src/views/pay/wallet/transaction/WalletTransactionList.vue index fa354bfb..c440778b 100644 --- a/src/views/pay/wallet/transaction/WalletTransactionList.vue +++ b/src/views/pay/wallet/transaction/WalletTransactionList.vue @@ -11,7 +11,7 @@ Date: Tue, 17 Oct 2023 16:09:36 +0800 Subject: [PATCH 32/35] =?UTF-8?q?=E4=BA=A4=E6=98=93=EF=BC=9A=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=A0=B8=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/trade/order/index.ts | 41 +++++-- src/views/mall/trade/order/detail/index.vue | 9 +- .../mall/trade/order/form/OrderPickUpForm.vue | 108 ++++++++++++++++++ src/views/mall/trade/order/index.vue | 12 ++ 4 files changed, 160 insertions(+), 10 deletions(-) create mode 100644 src/views/mall/trade/order/form/OrderPickUpForm.vue diff --git a/src/api/mall/trade/order/index.ts b/src/api/mall/trade/order/index.ts index ea78275f..999757bd 100644 --- a/src/api/mall/trade/order/index.ts +++ b/src/api/mall/trade/order/index.ts @@ -1,6 +1,7 @@ import request from '@/config/axios' export interface OrderVO { + // ========== 订单基本信息 ========== id?: number | null // 订单编号 no?: string // 订单流水号 createTime?: Date | null // 下单时间 @@ -15,35 +16,43 @@ export interface OrderVO { cancelTime?: Date | null // 订单取消时间 cancelType?: number | null // 取消类型 remark?: string // 商家备注 + + // ========== 价格 + 支付基本信息 ========== payOrderId?: number | null // 支付订单编号 - payed?: boolean // 是否已支付 + payStatus?: boolean // 是否已支付 payTime?: Date | null // 付款时间 payChannelCode?: string // 支付渠道 totalPrice?: number | null // 商品原价(总) - orderPrice?: number | null // 订单原价(总) discountPrice?: number | null // 订单优惠(总) deliveryPrice?: number | null // 运费金额 adjustPrice?: number | null // 订单调价(总) payPrice?: number | null // 应付金额(总) + // ========== 收件 + 物流基本信息 ========== deliveryType?: number | null // 发货方式 + pickUpStoreId?: number // 自提门店编号 + pickUpVerifyCode?: string // 自提核销码 deliveryTemplateId?: number | null // 配送模板编号 - logisticsId?: number | null | null // 发货物流公司编号 + logisticsId?: number | null // 发货物流公司编号 logisticsNo?: string // 发货物流单号 - deliveryStatus?: number | null // 发货状态 deliveryTime?: Date | null // 发货时间 receiveTime?: Date | null // 收货时间 receiverName?: string // 收件人名称 receiverMobile?: string // 收件人手机 - receiverAreaId?: number | null // 收件人地区编号 receiverPostCode?: number | null // 收件人邮编 + receiverAreaId?: number | null // 收件人地区编号 + receiverAreaName?: string //收件人地区名字 receiverDetailAddress?: string // 收件人详细地址 + + // ========== 售后基本信息 ========== afterSaleStatus?: number | null // 售后状态 refundPrice?: number | null // 退款金额 + + // ========== 营销基本信息 ========== couponId?: number | null // 优惠劵编号 couponPrice?: number | null // 优惠劵减免金额 - vipPrice?: number | null // VIP 减免金额 pointPrice?: number | null // 积分抵扣的金额 - receiverAreaName?: string //收件人地区名字 + vipPrice?: number | null // VIP 减免金额 + items?: OrderItemRespVO[] // 订单项列表 // 下单用户信息 user?: { @@ -142,5 +151,21 @@ export const updateOrderAddress = async (data: any) => { // 订单核销 export const pickUpOrder = async (id: number) => { - return await request.put({ url: `/trade/order/pick-up?id=${id}` }) + return await request.put({ url: `/trade/order/pick-up-by-id?id=${id}` }) +} + +// 订单核销 +export const pickUpOrderByVerifyCode = async (pickUpVerifyCode: string) => { + return await request.put({ + url: `/trade/order/pick-up-by-verify-code`, + params: { pickUpVerifyCode } + }) +} + +// 查询核销码对应的订单 +export const getOrderByPickUpVerifyCode = async (pickUpVerifyCode: string) => { + return await request.get({ + url: `/trade/order/get-by-pick-up-verify-code`, + params: { pickUpVerifyCode } + }) } diff --git a/src/views/mall/trade/order/detail/index.vue b/src/views/mall/trade/order/detail/index.vue index 58939dbc..a68eecbc 100644 --- a/src/views/mall/trade/order/detail/index.vue +++ b/src/views/mall/trade/order/detail/index.vue @@ -54,7 +54,7 @@
@@ -235,6 +235,7 @@ import * as DeliveryExpressApi from '@/api/mall/trade/delivery/express' import { useTagsViewStore } from '@/store/modules/tagsView' import { DeliveryTypeEnum, TradeOrderStatusEnum } from '@/utils/constants' import * as DeliveryPickUpStoreApi from '@/api/mall/trade/delivery/pickUpStore' +import { propTypes } from '@/utils/propTypes' defineOptions({ name: 'TradeOrderDetail' }) @@ -294,8 +295,12 @@ const handlePickUp = async () => { /** 获得详情 */ const { params } = useRoute() // 查询参数 +const props = defineProps({ + id: propTypes.number.def(undefined), // 订单ID + showPickUp: propTypes.bool.def(true) // 显示核销按钮 +}) +const id = (params.id || props.id) as unknown as number const getDetail = async () => { - const id = params.id as unknown as number if (id) { const res = (await TradeOrderApi.getOrder(id)) as TradeOrderApi.OrderVO // 没有表单信息则关闭页面返回 diff --git a/src/views/mall/trade/order/form/OrderPickUpForm.vue b/src/views/mall/trade/order/form/OrderPickUpForm.vue new file mode 100644 index 00000000..529263c4 --- /dev/null +++ b/src/views/mall/trade/order/form/OrderPickUpForm.vue @@ -0,0 +1,108 @@ + + diff --git a/src/views/mall/trade/order/index.vue b/src/views/mall/trade/order/index.vue index 33d98548..653bfcb9 100644 --- a/src/views/mall/trade/order/index.vue +++ b/src/views/mall/trade/order/index.vue @@ -156,6 +156,10 @@ 重置 + + + 核销 + @@ -347,6 +351,7 @@ + + diff --git a/src/views/mall/trade/order/index.vue b/src/views/mall/trade/order/index.vue index 653bfcb9..76547f8f 100644 --- a/src/views/mall/trade/order/index.vue +++ b/src/views/mall/trade/order/index.vue @@ -128,6 +128,7 @@ class="!w-280px" clearable placeholder="请输入" + :type="queryType.queryParam === 'userId' ? 'number' : 'text'" >