diff --git a/.trae/rules/project_rules.md b/.trae/rules/project_rules.md deleted file mode 100644 index 9993f7a..0000000 --- a/.trae/rules/project_rules.md +++ /dev/null @@ -1,3 +0,0 @@ -1. 这是一个企业级项目,结构复杂,你需要深度检测代码后才能理解其业务逻辑,不能简单的只根据当前文件的代码来理解。 -2. 代码修改完成后,必须检查文件内引用是否正确 -3. 修改后,必须获取项目的诊断信息,了解是否有错误或警告,然后根据诊断信息进行修复。 diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index e8dc9ed..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "recommendations": [ - // Vue 3 的语言支持 - "Vue.volar", - // 将 ESLint JavaScript 集成到 VS Code 中。 - "dbaeumer.vscode-eslint", - // Visual Studio Code 的官方 Stylelint 扩展 - "stylelint.vscode-stylelint", - // 使用 Prettier 的代码格式化程序 - "esbenp.prettier-vscode", - // 支持 dotenv 文件语法 - "mikestead.dotenv", - // 源代码的拼写检查器 - "streetsidesoftware.code-spell-checker", - // Tailwind CSS 的官方 VS Code 插件 - "bradlc.vscode-tailwindcss", - // iconify 图标插件 - "antfu.iconify", - // i18n 插件 - "Lokalise.i18n-ally", - // CSS 变量提示 - "vunguyentuan.vscode-css-variables", - // 在 package.json 中显示 PNPM catalog 的版本 - "antfu.pnpm-catalog-lens" - ], - "unwantedRecommendations": [ - // 和 volar 冲突 - "octref.vetur" - ] -} diff --git a/.vscode/global.code-snippets b/.vscode/global.code-snippets deleted file mode 100644 index 7604b01..0000000 --- a/.vscode/global.code-snippets +++ /dev/null @@ -1,37 +0,0 @@ -{ - "import": { - "scope": "javascript,typescript", - "prefix": "im", - "body": ["import { $2 } from '$1';"], - "description": "Import a module", - }, - "export-all": { - "scope": "javascript,typescript", - "prefix": "ex", - "body": ["export * from '$1';"], - "description": "Export a module", - }, - "vue-script-setup": { - "scope": "vue", - "prefix": "", - "const props = defineProps<{", - " modelValue?: boolean,", - "}>()", - "$1", - "", - "", - "", - ], - }, - "vue-computed": { - "scope": "javascript,typescript,vue", - "prefix": "com", - "body": ["computed(() => { $1 })"], - }, -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index c85d2a8..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/launchsettings.json", - "version": "0.2.0", - "configurations": [ - { - "type": "chrome", - "name": "finance admin dev", - "request": "launch", - "url": "http://localhost:9000", - "env": { "NODE_ENV": "development" }, - "sourceMaps": true, - "webRoot": "${workspaceFolder}/apps/finance" - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 4bbe218..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,241 +0,0 @@ -{ - "tailwindCSS.experimental.configFile": "internal/tailwind-config/src/index.ts", - // workbench - "workbench.list.smoothScrolling": true, - "workbench.startupEditor": "newUntitledFile", - "workbench.tree.indent": 10, - "workbench.editor.highlightModifiedTabs": true, - "workbench.editor.closeOnFileDelete": true, - "workbench.editor.limit.enabled": true, - "workbench.editor.limit.perEditorGroup": true, - "workbench.editor.limit.value": 8, - - // editor - "editor.tabSize": 2, - "editor.detectIndentation": false, - "editor.cursorBlinking": "expand", - "editor.largeFileOptimizations": true, - "editor.accessibilitySupport": "off", - "editor.cursorSmoothCaretAnimation": "on", - "editor.guides.bracketPairs": "active", - "editor.inlineSuggest.enabled": true, - "editor.suggestSelection": "recentlyUsedByPrefix", - "editor.acceptSuggestionOnEnter": "smart", - "editor.suggest.snippetsPreventQuickSuggestions": false, - "editor.stickyScroll.enabled": true, - "editor.hover.sticky": true, - "editor.suggest.insertMode": "replace", - "editor.bracketPairColorization.enabled": true, - "editor.autoClosingBrackets": "beforeWhitespace", - "editor.autoClosingDelete": "always", - "editor.autoClosingOvertype": "always", - "editor.autoClosingQuotes": "beforeWhitespace", - "editor.wordSeparators": "`~!@#%^&*()=+[{]}\\|;:'\",.<>/?", - "editor.codeActionsOnSave": { - "source.fixAll.eslint": "explicit", - "source.fixAll.stylelint": "explicit", - "source.organizeImports": "never" - }, - "editor.defaultFormatter": "esbenp.prettier-vscode", - "[html]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[css]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[scss]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[javascript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[markdown]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[jsonc]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[vue]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - // extensions - "extensions.ignoreRecommendations": true, - - // terminal - "terminal.integrated.cursorBlinking": true, - "terminal.integrated.persistentSessionReviveProcess": "never", - "terminal.integrated.tabs.enabled": true, - "terminal.integrated.scrollback": 10000, - "terminal.integrated.stickyScroll.enabled": true, - - // files - "files.eol": "\n", - "files.insertFinalNewline": true, - "files.simpleDialog.enable": true, - "files.associations": { - "*.ejs": "html", - "*.art": "html", - "**/tsconfig.json": "jsonc", - "*.json": "jsonc", - "package.json": "json" - }, - - "files.exclude": { - "**/.eslintcache": true, - "**/bower_components": true, - "**/.turbo": true, - "**/.idea": true, - "**/.vitepress": true, - "**/tmp": true, - "**/.git": true, - "**/.svn": true, - "**/.hg": true, - "**/CVS": true, - "**/.stylelintcache": true, - "**/.DS_Store": true, - "**/vite.config.mts.*": true, - "**/tea.yaml": true - }, - "files.watcherExclude": { - "**/.git/objects/**": true, - "**/.git/subtree-cache/**": true, - "**/.vscode/**": true, - "**/node_modules/**": true, - "**/tmp/**": true, - "**/bower_components/**": true, - "**/dist/**": true, - "**/yarn.lock": true - }, - - "typescript.tsserver.exclude": ["**/node_modules", "**/dist", "**/.turbo"], - - // search - "search.searchEditor.singleClickBehaviour": "peekDefinition", - "search.followSymlinks": false, - // 在使用搜索功能时,将这些文件夹/文件排除在外 - "search.exclude": { - "**/node_modules": true, - "**/*.log": true, - "**/*.log*": true, - "**/bower_components": true, - "**/dist": true, - "**/elehukouben": true, - "**/.git": true, - "**/.github": true, - "**/.gitignore": true, - "**/.svn": true, - "**/.DS_Store": true, - "**/.vitepress/cache": true, - "**/.idea": true, - "**/.vscode": false, - "**/.yarn": true, - "**/tmp": true, - "*.xml": true, - "out": true, - "dist": true, - "node_modules": true, - "CHANGELOG.md": true, - "**/pnpm-lock.yaml": true, - "**/yarn.lock": true - }, - - "debug.onTaskErrors": "debugAnyway", - "diffEditor.ignoreTrimWhitespace": false, - "npm.packageManager": "pnpm", - - "css.validate": false, - "less.validate": false, - "scss.validate": false, - - // extension - "emmet.showSuggestionsAsSnippets": true, - "emmet.triggerExpansionOnTab": false, - - "errorLens.enabledDiagnosticLevels": ["warning", "error"], - "errorLens.excludeBySource": ["cSpell", "Grammarly", "eslint"], - - "stylelint.enable": true, - "stylelint.packageManager": "pnpm", - "stylelint.validate": ["css", "less", "postcss", "scss", "vue"], - "stylelint.customSyntax": "postcss-html", - "stylelint.snippet": ["css", "less", "postcss", "scss", "vue"], - - "typescript.inlayHints.enumMemberValues.enabled": true, - "typescript.preferences.preferTypeOnlyAutoImports": true, - "typescript.preferences.includePackageJsonAutoImports": "on", - - "eslint.validate": [ - "javascript", - "typescript", - "javascriptreact", - "typescriptreact", - "vue", - "html", - "markdown", - "json", - "jsonc", - "json5" - ], - - "tailwindCSS.experimental.classRegex": [ - ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"] - ], - - "github.copilot.enable": { - "*": true, - "markdown": true, - "plaintext": false, - "yaml": false - }, - - "cssVariables.lookupFiles": ["packages/core/base/design/src/**/*.css"], - - "i18n-ally.localesPaths": [ - "packages/locales/src/langs", - "playground/src/locales/langs", - "apps/*/src/locales/langs" - ], - "i18n-ally.pathMatcher": "{locale}/{namespace}.{ext}", - "i18n-ally.enabledParsers": ["json"], - "i18n-ally.sourceLanguage": "en", - "i18n-ally.displayLanguage": "zh-CN", - "i18n-ally.enabledFrameworks": ["vue", "react"], - "i18n-ally.keystyle": "nested", - "i18n-ally.sortKeys": true, - "i18n-ally.namespace": true, - - // 控制相关文件嵌套展示 - "explorer.fileNesting.enabled": true, - "explorer.fileNesting.expand": false, - "explorer.fileNesting.patterns": { - "*.ts": "$(capture).test.ts, $(capture).test.tsx, $(capture).spec.ts, $(capture).spec.tsx, $(capture).d.ts", - "*.tsx": "$(capture).test.ts, $(capture).test.tsx, $(capture).spec.ts, $(capture).spec.tsx,$(capture).d.ts", - "*.env": "$(capture).env.*", - "README.md": "README*,CHANGELOG*,LICENSE,CNAME", - "package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,.gitattributes,.gitignore,.gitpod.yml,.npmrc,.browserslistrc,.node-version,.git*,.tazerc.json", - "eslint.config.mjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,stylelint.config.*,.lintstagedrc.mjs,cspell.json,lefthook.yml", - "tailwind.config.mjs": "postcss.*" - }, - "commentTranslate.hover.enabled": false, - "commentTranslate.multiLineMerge": true, - "vue.server.hybridMode": true, - "typescript.tsdk": "node_modules/typescript/lib", - "oxc.enable": false, - "cSpell.words": [ - "archiver", - "axios", - "dotenv", - "isequal", - "jspm", - "napi", - "nolebase", - "rollup", - "vitest" - ] -} diff --git a/apps/finance/src/api/posting/index.ts b/apps/finance/src/api/posting/index.ts index d53c773..54c1fcc 100644 --- a/apps/finance/src/api/posting/index.ts +++ b/apps/finance/src/api/posting/index.ts @@ -1,2 +1,4 @@ export * from './import'; export * from './reconciliate'; +export * from './surplus'; +export * from './tianyibi'; diff --git a/apps/finance/src/api/posting/surplus.ts b/apps/finance/src/api/posting/surplus.ts new file mode 100644 index 0000000..db15ae7 --- /dev/null +++ b/apps/finance/src/api/posting/surplus.ts @@ -0,0 +1,10 @@ +import { requestClient } from '#/api/request'; + +export const balanceApi = { + /** + * 获取用户余额列表 + */ + getUserBalanceList: (data: { limit: number; page: number; tel?: string }) => { + return requestClient.post('/common/user/getUserList', data); + }, +}; diff --git a/apps/finance/src/api/posting/tianyibi.ts b/apps/finance/src/api/posting/tianyibi.ts new file mode 100644 index 0000000..bde3290 --- /dev/null +++ b/apps/finance/src/api/posting/tianyibi.ts @@ -0,0 +1,37 @@ +import { requestClient } from '#/api/request'; + +export const tianyibiApi = { + /** + * 获取天医币订单列表 + */ + getPointOrdersList: (data: { + endTime?: string; + limit: number; + page: number; + startTime?: string; + tel?: string; + }) => { + return requestClient.post('/common/orders/getPointOrdersListNoUse', data); + }, + + /** + * 手动确认消耗 + */ + manualConsumeTianyibi: (data: { orderId: number }) => { + return requestClient.post('/common/orders/manualConsumePoint', data); + }, + + /** + * 取消消耗 + */ + cancelConsumeTianyibi: (data: { orderId: number }) => { + return requestClient.post('/common/orders/cancelConsumePoint', data); + }, + + /** + * 自动消耗 + */ + autoConsumeTianyibi: () => { + return requestClient.post('/common/orders/autoConsumePoint'); + }, +}; diff --git a/apps/finance/src/router/routes/modules/posting.ts b/apps/finance/src/router/routes/modules/posting.ts index 0fa4f2a..25911e5 100644 --- a/apps/finance/src/router/routes/modules/posting.ts +++ b/apps/finance/src/router/routes/modules/posting.ts @@ -29,6 +29,24 @@ const routes: RouteRecordRaw[] = [ path: '/posting/reconciliate-bills', component: () => import('#/views/posting/reconciliate/index.vue'), }, + { + meta: { + title: '天医币订单', + keepAlive: true, + }, + name: 'TianyibiOrders', + path: '/posting/tianyibi-orders', + component: () => import('#/views/posting/tianyibiOrders/index.vue'), + }, + { + meta: { + title: '用户余额', + keepAlive: true, + }, + name: 'UserSurplus', + path: '/posting/user-surplus', + component: () => import('#/views/posting/userSurplus/index.vue'), + }, ], }, ]; diff --git a/apps/finance/src/store/sys.ts b/apps/finance/src/store/sys.ts index 69606be..f975628 100644 --- a/apps/finance/src/store/sys.ts +++ b/apps/finance/src/store/sys.ts @@ -12,6 +12,17 @@ export const useSysStore = defineStore('sys', () => { '1': '对账失败', '2': '对账成功', }, + source: { + '0': '一路健康', + '1': '吴门医述', + }, + orderType: { + '0': '充值', + '1': 'vip', + '2': '课', + '3': '实物', + '4': '培训班', + }, } as const; // 自动推断字典类型 @@ -64,6 +75,38 @@ export const useSysStore = defineStore('sys', () => { color: 'success', }, ], + source: [ + { + label: '一路健康', + value: '0', + }, + { + label: '吴门医述', + value: '1', + }, + ], + orderType: [ + { + label: '充值', + value: '0', + }, + { + label: 'vip', + value: '1', + }, + { + label: '课', + value: '2', + }, + { + label: '实物', + value: '3', + }, + { + label: '培训班', + value: '4', + }, + ], } as const; // 自动推断字典列表类型 diff --git a/apps/finance/src/views/posting/reconciliate/index.vue b/apps/finance/src/views/posting/reconciliate/index.vue index 6df9ee1..5fffe29 100644 --- a/apps/finance/src/views/posting/reconciliate/index.vue +++ b/apps/finance/src/views/posting/reconciliate/index.vue @@ -62,7 +62,6 @@ const formOptions: VbenFormProps = { defaultValue: '', fieldName: 'checkoff', label: '核对状态', - // 核对状态占1列 formItemClass: 'col-span-2', }, ], diff --git a/apps/finance/src/views/posting/reconciliate/modules/Manual.vue b/apps/finance/src/views/posting/reconciliate/modules/Manual.vue index 1818554..199ff11 100644 --- a/apps/finance/src/views/posting/reconciliate/modules/Manual.vue +++ b/apps/finance/src/views/posting/reconciliate/modules/Manual.vue @@ -326,7 +326,6 @@ function onCompleteCheckCreated() { :deep(.ant-card-body) { padding: 1px !important; height: calc(100% - 41px); // 减去标签页头部高度 - overflow: hidden; // background-color: #f1f3f6; } } diff --git a/apps/finance/src/views/posting/tianyibiOrders/index.vue b/apps/finance/src/views/posting/tianyibiOrders/index.vue new file mode 100644 index 0000000..67d6724 --- /dev/null +++ b/apps/finance/src/views/posting/tianyibiOrders/index.vue @@ -0,0 +1,214 @@ + + + diff --git a/apps/finance/src/views/posting/userSurplus/index.vue b/apps/finance/src/views/posting/userSurplus/index.vue new file mode 100644 index 0000000..0befb73 --- /dev/null +++ b/apps/finance/src/views/posting/userSurplus/index.vue @@ -0,0 +1,82 @@ + + +