From f3f870cd8e14818c4b94311a2cb2c1690ea064f8 Mon Sep 17 00:00:00 2001 From: lq Date: Thu, 17 Apr 2025 16:19:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=B9=E8=B4=A6=E5=8D=95=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/finance/reconciliation/api/index.ts | 17 + .../reconciliation/components/statistics.vue | 50 ++ .../finance/reconciliation/config/search.ts | 84 ++++ .../finance/reconciliation/config/table.ts | 134 ++++++ .../views/finance/reconciliation/index.vue | 446 ++++++++++++++++++ .../effects/common-ui/src/components/index.ts | 1 + packages/icons/src/iconify/index.ts | 2 + 7 files changed, 734 insertions(+) create mode 100644 apps/web-antd/src/views/finance/reconciliation/api/index.ts create mode 100644 apps/web-antd/src/views/finance/reconciliation/components/statistics.vue create mode 100644 apps/web-antd/src/views/finance/reconciliation/config/search.ts create mode 100644 apps/web-antd/src/views/finance/reconciliation/config/table.ts create mode 100644 apps/web-antd/src/views/finance/reconciliation/index.vue diff --git a/apps/web-antd/src/views/finance/reconciliation/api/index.ts b/apps/web-antd/src/views/finance/reconciliation/api/index.ts new file mode 100644 index 00000000..9edcb12b --- /dev/null +++ b/apps/web-antd/src/views/finance/reconciliation/api/index.ts @@ -0,0 +1,17 @@ +import { requestClient } from '#/api/request'; + +const prefix = 'reconciliation/'; +/** + * 诊所对账单 + * @param data + */ +export async function getReconciliationStoreList(data: any) { + return requestClient.get(`${prefix}list`, { params: data }); +} +/** + * 诊所对账单 + * @param data + */ +export async function getReconciliationDrugList(data: any) { + return requestClient.get(`${prefix}drug-list`, { params: data }); +} diff --git a/apps/web-antd/src/views/finance/reconciliation/components/statistics.vue b/apps/web-antd/src/views/finance/reconciliation/components/statistics.vue new file mode 100644 index 00000000..efa524a1 --- /dev/null +++ b/apps/web-antd/src/views/finance/reconciliation/components/statistics.vue @@ -0,0 +1,50 @@ + + + diff --git a/apps/web-antd/src/views/finance/reconciliation/config/search.ts b/apps/web-antd/src/views/finance/reconciliation/config/search.ts new file mode 100644 index 00000000..f1de4d45 --- /dev/null +++ b/apps/web-antd/src/views/finance/reconciliation/config/search.ts @@ -0,0 +1,84 @@ +import type { VbenFormProps } from '#/adapter/form'; + +import dayjs from 'dayjs'; + +export const reconciliationStoreSearch: VbenFormProps = { + // 默认展开 + collapsed: false, + schema: [ + { + component: 'VbenInput', + componentProps: { + placeholder: '请输入诊所名称', + }, + defaultValue: '', + fieldName: 'store_name', + label: '诊所名称', + }, + { + component: 'RangePicker', + componentProps: { + format: 'YYYY-MM-DD', // 确保格式与你需要的一致 + }, + defaultValue: [dayjs().startOf('month'), dayjs()], + fieldName: 'search_time', + label: '时间范围', + }, + ], + // 控制表单是否显示折叠按钮 + showCollapseButton: true, + submitButtonOptions: { + content: '查询', + }, + // 是否在字段值改变时提交表单 + submitOnChange: true, + // 按下回车时是否提交表单 + submitOnEnter: false, +}; + +export const reconciliationDrugSearch: VbenFormProps = { + // 默认展开 + collapsed: false, + schema: [ + { + component: 'InputNumber', + componentProps: { + placeholder: '请输入诊所ID', + }, + defaultValue: '', + fieldName: 'store_id', + dependencies: { + show: false, + triggerFields: ['store_id'], + }, + label: '诊所ID', + }, + { + component: 'VbenInput', + componentProps: { + placeholder: '请输入药品名称', + }, + defaultValue: '', + fieldName: 'drug_name', + label: '药品名称', + }, + { + component: 'RangePicker', + componentProps: { + format: 'YYYY-MM-DD', // 确保格式与你需要的一致 + }, + defaultValue: [dayjs().startOf('month'), dayjs()], + fieldName: 'search_time', + label: '时间范围', + }, + ], + // 控制表单是否显示折叠按钮 + showCollapseButton: true, + submitButtonOptions: { + content: '查询', + }, + // 是否在字段值改变时提交表单 + submitOnChange: true, + // 按下回车时是否提交表单 + submitOnEnter: false, +}; diff --git a/apps/web-antd/src/views/finance/reconciliation/config/table.ts b/apps/web-antd/src/views/finance/reconciliation/config/table.ts new file mode 100644 index 00000000..e0d0a476 --- /dev/null +++ b/apps/web-antd/src/views/finance/reconciliation/config/table.ts @@ -0,0 +1,134 @@ +import type { VxeGridProps } from '#/adapter/vxe-table'; + + +interface RowType { + id: string; + nick_name: string; + email: string; + avatar: string; + roles: { name: string }[]; + open_id: string; + code: string; + platform_id: string; + phone: string; + desc: string; + created_at: string; +} + +export const storeReconciliationTable: VxeGridProps = { + checkboxConfig: { + highlight: true, + labelField: '', + }, + columnConfig: { + useKey: true, + }, + rowConfig: { + useKey: true, + }, + columns: [ + { field: 'name', title: '诊所名称' }, + { + field: 'reconciliation.herbal_sales', + title: '草药', + slots: { default: 'herbal' }, + }, + // { field: 'reconciliation.herbal_sales', title: '草药销售数量' }, + // { field: 'reconciliation.herbal_sales_price', title: '草药销售总价' }, + // { field: 'reconciliation.herbal_supply_price', title: '草药供货总价' }, + { + field: 'reconciliation.medicine_sales', + title: '西药', + slots: { default: 'medicine' }, + }, + // { field: 'reconciliation.medicine_sales', title: '西药销售数量' }, + // { field: 'reconciliation.medicine_sales_price', title: '西药销售总价' }, + // { field: 'reconciliation.medicine_supply_price', title: '西药供货总价' }, + { + field: 'reconciliation.service_package_sales', + title: '服务包销售数量', + slots: { default: 'service-package' }, + }, + // { field: 'reconciliation.service_package_sales', title: '服务包销售数量' }, + // { + // field: 'reconciliation.service_package_sales_price', + // title: '服务包销售总价', + // }, + // { + // field: 'reconciliation.service_package_supply_price', + // title: '服务包供货总价', + // }, + { field: 'reconciliation.express_price', title: '其他费用', slots: { default: 'other'} }, + { field: 'reconciliation.total_sales_price', title: '总销售总价' }, + { field: 'reconciliation.total_supply_price', title: '总供货总价' }, + // { field: 'reconciliation.express_price', title: '快递费用' }, + // { field: 'reconciliation.process_price', title: '加工费用' }, + // { field: 'reconciliation.treatment_price', title: '治疗费用' }, + // { field: 'reconciliation.outpatient_price', title: '门诊费用' }, + { field: 'reconciliation.registration_price', title: '挂号费用' }, + { type: 'html', title: '操作', slots: { default: 'action' } }, + ], + keepSource: true, + pagerConfig: {}, + 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', + }, + }, + showOverflow: false, +}; + +export const drugReconciliationTable: VxeGridProps = { + checkboxConfig: { + highlight: true, + labelField: '', + }, + columnConfig: { + useKey: true, + }, + rowConfig: { + useKey: true, + }, + columns: [ + { field: 'drug_name', title: '药名' }, + { field: 'type_txt', title: '药品类型' }, + { field: 'number', title: '出售数量' }, + { field: 'total_sales_price', title: '总销售金额' }, + { field: 'total_supply_price', title: '总供货金额' }, + // { type: 'html', title: '操作', slots: { default: 'action' } }, + ], + keepSource: true, + pagerConfig: {}, + 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', + }, + }, + showOverflow: false, +}; diff --git a/apps/web-antd/src/views/finance/reconciliation/index.vue b/apps/web-antd/src/views/finance/reconciliation/index.vue new file mode 100644 index 00000000..a43eb919 --- /dev/null +++ b/apps/web-antd/src/views/finance/reconciliation/index.vue @@ -0,0 +1,446 @@ + + + diff --git a/packages/effects/common-ui/src/components/index.ts b/packages/effects/common-ui/src/components/index.ts index 6bba5526..19cd3aa2 100644 --- a/packages/effects/common-ui/src/components/index.ts +++ b/packages/effects/common-ui/src/components/index.ts @@ -12,6 +12,7 @@ export * from '@vben-core/popup-ui'; export { VbenButton, VbenCountToAnimator, + VbenIcon, VbenInputPassword, VbenLoading, VbenPinInput, diff --git a/packages/icons/src/iconify/index.ts b/packages/icons/src/iconify/index.ts index a0985ac1..8eda75c2 100644 --- a/packages/icons/src/iconify/index.ts +++ b/packages/icons/src/iconify/index.ts @@ -11,3 +11,5 @@ export const MdiGithub = createIconifyIcon('mdi:github'); export const MdiGoogle = createIconifyIcon('mdi:google'); export const MdiQqchat = createIconifyIcon('mdi:qqchat'); + +export const MdiCashMultiple = createIconifyIcon('mdi:cash-multiple');