From 370e38fad461757529ec136c4536670abac9882a Mon Sep 17 00:00:00 2001 From: lq Date: Tue, 22 Apr 2025 10:36:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=A3=E6=94=AF=E4=BB=98=E6=89=8B?= =?UTF-8?q?=E7=BB=AD=E8=B4=B9=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../charge-cash-pay-record/api/index.ts | 10 ++ .../charge-cash-pay-record/config/search.ts | 29 +++++ .../charge-cash-pay-record/config/table.ts | 81 ++++++++++++ .../finance/charge-cash-pay-record/index.vue | 122 ++++++++++++++++++ 4 files changed, 242 insertions(+) create mode 100644 apps/web-antd/src/views/finance/charge-cash-pay-record/api/index.ts create mode 100644 apps/web-antd/src/views/finance/charge-cash-pay-record/config/search.ts create mode 100644 apps/web-antd/src/views/finance/charge-cash-pay-record/config/table.ts create mode 100644 apps/web-antd/src/views/finance/charge-cash-pay-record/index.vue diff --git a/apps/web-antd/src/views/finance/charge-cash-pay-record/api/index.ts b/apps/web-antd/src/views/finance/charge-cash-pay-record/api/index.ts new file mode 100644 index 00000000..caa0c9ae --- /dev/null +++ b/apps/web-antd/src/views/finance/charge-cash-pay-record/api/index.ts @@ -0,0 +1,10 @@ +import { requestClient } from '#/api/request'; + +const prefix = 'charge-cash-pay-record/'; +/** + * 代支付手续费列表 + * @param data + */ +export async function getChargeCashPayRecordListApi(data: any) { + return requestClient.get(`${prefix}list`, { params: data }); +} diff --git a/apps/web-antd/src/views/finance/charge-cash-pay-record/config/search.ts b/apps/web-antd/src/views/finance/charge-cash-pay-record/config/search.ts new file mode 100644 index 00000000..07d0ed21 --- /dev/null +++ b/apps/web-antd/src/views/finance/charge-cash-pay-record/config/search.ts @@ -0,0 +1,29 @@ +import type { VbenFormProps } from '#/adapter/form'; + +import dayjs from 'dayjs'; + +export const formOptions: VbenFormProps = { + // 默认展开 + collapsed: false, + schema: [ + { + component: 'RangePicker', + componentProps: { + format: 'YYYY-MM-DD', // 确保格式与你需要的一致 + }, + defaultValue: [dayjs().startOf('month'), dayjs()], + fieldName: 'search_time', + label: '时间范围', + }, + ], + // 控制表单是否显示折叠按钮 + showCollapseButton: true, + submitButtonOptions: { + content: '查询', + }, + // 是否在字段值改变时提交表单 + // submitOnChange: true, + // submitOnChange: true, + // 按下回车时是否提交表单 + submitOnEnter: true, +}; diff --git a/apps/web-antd/src/views/finance/charge-cash-pay-record/config/table.ts b/apps/web-antd/src/views/finance/charge-cash-pay-record/config/table.ts new file mode 100644 index 00000000..3c1acf3b --- /dev/null +++ b/apps/web-antd/src/views/finance/charge-cash-pay-record/config/table.ts @@ -0,0 +1,81 @@ +import type { VxeGridProps } from '#/adapter/vxe-table'; + +import { getChargeCashPayRecordListApi } from '../api'; + +interface RowType { + id: string; + name: string; + logo: string; + introduce: string; + created_at: string; +} + +export const gridOptions: VxeGridProps = { + checkboxConfig: { + highlight: true, + labelField: '', + }, + columns: [ + // { type: 'checkbox', width: 60 }, + { field: 'id', align: 'left', title: 'ID' }, + { field: 'order_no', title: '挂号订单号' }, + { field: 'store.name', title: '诊所' }, + { field: 'charge_cash', title: '手续费' }, + { field: 'status', title: '状态', slots: { default: 'status' } }, + { field: 'created_at', title: '记录时间' }, + { + type: 'html', + title: '操作', + align: 'right', + slots: { default: 'action' }, + width: 200, + }, + ], + keepSource: true, + pagerConfig: {}, + columnConfig: { + useKey: true, + }, + rowConfig: { + useKey: true, + }, + // scrollY: { + // enabled: true, + // gt: 0, + // }, + proxyConfig: { + ajax: { + // 请求后端接口方法 + query: async ({ page }, formValues) => { + return await getChargeCashPayRecordListApi({ + page: page.currentPage, + pageSize: page.pageSize, + ...formValues, + }); + }, + }, + }, + height: 'auto', + border: false, + toolbarConfig: { + // 是否显示搜索表单控制按钮 + // @ts-ignore 正式环境时有完整的类型声明 + search: true, + refresh: true, // 刷新 + print: false, // 打印 + export: false, // 导出 + // custom: true, // 自定义列 + zoom: true, // 最大化最小化 + slots: { + buttons: 'toolbar-buttons', + }, + custom: { + // 自定义列-图标 + icon: 'vxe-icon-menu', + }, + }, + expandConfig: { + // expandAll: true, + }, + showOverflow: false, +}; diff --git a/apps/web-antd/src/views/finance/charge-cash-pay-record/index.vue b/apps/web-antd/src/views/finance/charge-cash-pay-record/index.vue new file mode 100644 index 00000000..27b86b16 --- /dev/null +++ b/apps/web-antd/src/views/finance/charge-cash-pay-record/index.vue @@ -0,0 +1,122 @@ + + + +