From 3ac645e4a039f0ca4233e4dddeb5f16a8d813dfd Mon Sep 17 00:00:00 2001 From: lq Date: Mon, 7 Apr 2025 17:02:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=A2=E5=8D=95=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/app.vue | 27 ++++++ .../components/UpdatePasswordModal.vue | 9 -- apps/web-antd/src/store/auth.ts | 5 +- .../business/order/product-order/api/index.ts | 7 ++ .../business/order/product-order/index.vue | 89 +++++++++++++++---- .../views/doctor/doctor-reception/index.vue | 2 - 6 files changed, 108 insertions(+), 31 deletions(-) diff --git a/apps/web-antd/src/app.vue b/apps/web-antd/src/app.vue index bbaccce1..71950bb1 100644 --- a/apps/web-antd/src/app.vue +++ b/apps/web-antd/src/app.vue @@ -9,6 +9,33 @@ import { App, ConfigProvider, theme } from 'ant-design-vue'; import { antdLocale } from '#/locales'; defineOptions({ name: 'App' }); +// 定义颜色代码 +const redBoldYellowBg = '\u001B[1;31;43m'; // 1=加粗 31=红色文字 43=黄色背景 +const reset = '\u001B[0m'; + +console.log( + `${redBoldYellowBg}......................阿弥陀佛...................... \n` + + ` _oo0oo_ \n` + + ` o8888888o \n` + + ` 88" . "88 \n` + + ` (| -_- |) \n` + + ` 0\\ = /0 \n` + + ` ___/‘---’\\___ \n` + + ` .' \\| |/ '. \n` + + ` / \\\\||| : |||// \\ \n` + + ` / _||||| -卍-|||||_ \\ \n` + + ` | | \\\\\\ - /// | | \n` + + ` | \\_| ''\\---/'' |_/ | \n` + + ` \\ .-\\__ '-' ___/-. / \n` + + ` ___'. .' /--.--\\ '. .'___ \n` + + ` ."" ‘< ‘.___\\_<|>_/___.’>’ "". \n` + + ` | | : ‘- \\‘.;‘\\ _ /’;.’/ - ’ : | | \n` + + ` \\ \\ ‘_. \\_ __\\ /__ _/ .-’ / / \n` + + ` =====‘-.____‘.___ \\_____/___.-’___.-’===== \n` + + ` ‘=---=’ \n` + + ` \n` + + `....................佛祖保佑 ,永无BUG...................${reset}`, +); const { isDark } = usePreferences(); const { tokens } = useAntdDesignTokens(); diff --git a/apps/web-antd/src/layouts/components/UpdatePasswordModal.vue b/apps/web-antd/src/layouts/components/UpdatePasswordModal.vue index f0ce645f..0e2f4f41 100644 --- a/apps/web-antd/src/layouts/components/UpdatePasswordModal.vue +++ b/apps/web-antd/src/layouts/components/UpdatePasswordModal.vue @@ -30,15 +30,6 @@ const [Modal, modalApi] = useVbenModal({ }); await formApi.validateAndSubmitForm(); }, - onOpenChange(isOpen: boolean) { - console.log(isOpen, '开启状态'); - // if (isOpen) { - // const {values} = - // modalApi.getData>(); - // if (values) { - // } - // } - }, }); diff --git a/apps/web-antd/src/store/auth.ts b/apps/web-antd/src/store/auth.ts index cd17e682..8ec377db 100644 --- a/apps/web-antd/src/store/auth.ts +++ b/apps/web-antd/src/store/auth.ts @@ -55,9 +55,8 @@ export const useAuthStore = defineStore('auth', () => { console.log(userInfo.home_path); console.log(DEFAULT_HOME_PATH); - // console.log(accessStore.loginExpired); - // console.log(onSuccess?.()); - // console.log(onSuccess); + console.log(userInfo.home_path || DEFAULT_HOME_PATH, 'ssssssssssssssss'); + console.log(userInfo.home_path || DEFAULT_HOME_PATH, 'ssssssssssssssss'); if (accessStore.loginExpired) { accessStore.setLoginExpired(false); } else { diff --git a/apps/web-antd/src/views/business/order/product-order/api/index.ts b/apps/web-antd/src/views/business/order/product-order/api/index.ts index 863e0bcb..1d41df98 100644 --- a/apps/web-antd/src/views/business/order/product-order/api/index.ts +++ b/apps/web-antd/src/views/business/order/product-order/api/index.ts @@ -15,6 +15,13 @@ export async function getOrderList(data: any) { export async function getOrderStatusOption(data: any) { return requestClient.get(`${prefix}status-option`, { params: data }); } +/** + * 分页查询用户列表 + * @param data + */ +export async function saleAmountApi(data: any) { + return requestClient.get(`${prefix}sale-amount`, { params: data }); +} /** * 获取订单详情 diff --git a/apps/web-antd/src/views/business/order/product-order/index.vue b/apps/web-antd/src/views/business/order/product-order/index.vue index 74e56d82..2708579c 100644 --- a/apps/web-antd/src/views/business/order/product-order/index.vue +++ b/apps/web-antd/src/views/business/order/product-order/index.vue @@ -3,18 +3,28 @@ import type { VxeGridListeners } from '#/adapter/vxe-table'; import { ref } from 'vue'; -import { Page, useVbenModal } from '@vben/common-ui'; +import { + AnalysisOverview, + type AnalysisOverviewItem, + Page, + useVbenModal, +} from '@vben/common-ui'; +import { SvgCakeIcon } from '@vben/icons'; -import { Button, Image, message, Tag } from 'ant-design-vue'; +import { Button, Image, Tag } from 'ant-design-vue'; import { useVbenVxeGrid } from '#/adapter/vxe-table'; import { TableAction } from '#/components/table-action'; +import { + getOrderList, + saleAmountApi, +} from '#/views/business/order/product-order/api'; +import PrescrtionDetail from '#/views/doctor/doctor-reception/components/PrescrtionDetail.vue'; -import FormModalDemo from './components/modal.vue'; import DetailModal from './components/detail.vue'; +import FormModalDemo from './components/modal.vue'; import { formOptions } from './config/search'; import { gridOptions } from './config/table'; -import PrescrtionDetail from "#/views/doctor/doctor-reception/components/PrescrtionDetail.vue"; const hasTopTableDropDownActions = ref(false); @@ -36,7 +46,25 @@ const [Grid, gridApi] = useVbenVxeGrid({ gridOptions, gridEvents, }); +const initTableAjax = () => { + gridApi.setGridOptions({ + proxyConfig: { + ajax: { + // 请求后端接口方法 + query: async ({ page }, formValues) => { + saleAmount(); + return await getOrderList({ + page: page.currentPage, + pageSize: page.pageSize, + ...formValues, + }); + }, + }, + }, + }); +}; +initTableAjax(); const [FormModal, formModalApi] = useVbenModal({ connectedComponent: FormModalDemo, }); @@ -51,17 +79,7 @@ const infoModal = (data = {}) => { gridApi, }); modalApi.open(); - // message.success(`正在开发${JSON.stringify(data)}`); }; -// const showModal = (data = {}, isUpdate = false) => { -// formModalApi.setData({ -// // 表单值 -// values: data, -// update: isUpdate, -// gridApi, -// }); -// formModalApi.open(); -// }; const wareSend = (data = {}) => { formModalApi.setData({ @@ -81,7 +99,34 @@ const expandAll = () => { const collapseAll = () => { gridApi.grid?.setAllRowExpand(false); }; - +const overviewItems = ref([]); +const income = ref(0); +const total = ref(0); +const saleAmount = () => { + saleAmountApi({ + search_time: gridApi.formApi.latestSubmissionValues.search_time, + }).then((res) => { + console.log(res, 'sssssssss'); + income.value = res.income; + total.value = res.total; + overviewItems.value = [ + { + icon: SvgCakeIcon, + title: '累计收益', + totalTitle: '累计收益', + totalValue: total.value, + value: total.value, + }, + { + icon: 'fluent-emoji:balance-scale', + title: '我的收益', + totalTitle: '我的收益', + totalValue: income.value, + value: income.value, + }, + ]; + }); +}; const [PrescrtionDetailModal, PrescrtionDetailModalApi] = useVbenModal({ connectedComponent: PrescrtionDetail, @@ -100,6 +145,7 @@ const openPrescriptionDetail = (values) => { +