From ae7b5498797ce99b16b03b594383cfde5127c8ce Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Mon, 26 May 2025 17:22:09 +0800 Subject: [PATCH] refactor: pay --- apps/web-antd/src/views/pay/notify/data.ts | 27 +- apps/web-antd/src/views/pay/notify/index.vue | 47 ++-- .../src/views/pay/notify/modules/detail.vue | 7 - apps/web-antd/src/views/pay/order/data.ts | 259 +++++++++--------- apps/web-antd/src/views/pay/order/index.vue | 164 +++++------ .../modules/{order-detail.vue => detail.vue} | 43 +-- apps/web-antd/src/views/pay/refund/data.ts | 28 +- apps/web-antd/src/views/pay/refund/index.vue | 59 ++-- .../src/views/pay/refund/modules/detail.vue | 7 - 9 files changed, 285 insertions(+), 356 deletions(-) rename apps/web-antd/src/views/pay/order/modules/{order-detail.vue => detail.vue} (85%) diff --git a/apps/web-antd/src/views/pay/notify/data.ts b/apps/web-antd/src/views/pay/notify/data.ts index 48798588..adb41957 100644 --- a/apps/web-antd/src/views/pay/notify/data.ts +++ b/apps/web-antd/src/views/pay/notify/data.ts @@ -1,13 +1,9 @@ import type { VbenFormSchema } from '#/adapter/form'; -import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; - -import { useAccess } from '@vben/access'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import { getAppList } from '#/api/pay/app'; import { DICT_TYPE, getDictOptions } from '#/utils'; -const { hasAccessByCodes } = useAccess(); - /** 列表的搜索表单 */ export function useGridFormSchema(): VbenFormSchema[] { return [ @@ -69,9 +65,7 @@ export function useGridFormSchema(): VbenFormSchema[] { } /** 列表的字段 */ -export function useGridColumns( - onActionClick: OnActionClickFn, -): VxeTableGridOptions['columns'] { +export function useGridColumns(): VxeTableGridOptions['columns'] { return [ { field: 'id', @@ -136,23 +130,10 @@ export function useGridColumns( }, }, { - field: 'operation', title: '操作', - minWidth: 100, - align: 'center', + width: 80, fixed: 'right', - cellRender: { - attrs: { - onClick: onActionClick, - }, - name: 'CellOperation', - options: [ - { - code: 'detail', - show: hasAccessByCodes(['pay:notify:query']), - }, - ], - }, + slots: { default: 'actions' }, }, ]; } diff --git a/apps/web-antd/src/views/pay/notify/index.vue b/apps/web-antd/src/views/pay/notify/index.vue index ae5ec8ca..c640882e 100644 --- a/apps/web-antd/src/views/pay/notify/index.vue +++ b/apps/web-antd/src/views/pay/notify/index.vue @@ -1,19 +1,16 @@