feat: 提交其余本地改动

This commit is contained in:
2026-02-16 12:53:23 +08:00
parent 3395e5d91c
commit 07495f8c35
7 changed files with 160 additions and 12 deletions

3
.gitignore vendored
View File

@@ -50,3 +50,6 @@ vite.config.ts.*
*.sw? *.sw?
.history .history
.cursor .cursor
# Prototype backup files
backup/

View File

@@ -204,7 +204,7 @@
], ],
"i18n-ally.pathMatcher": "{locale}/{namespace}.{ext}", "i18n-ally.pathMatcher": "{locale}/{namespace}.{ext}",
"i18n-ally.enabledParsers": ["json"], "i18n-ally.enabledParsers": ["json"],
"i18n-ally.sourceLanguage": "en", "i18n-ally.sourceLanguage": "zh-CN",
"i18n-ally.displayLanguage": "zh-CN", "i18n-ally.displayLanguage": "zh-CN",
"i18n-ally.enabledFrameworks": ["vue", "react"], "i18n-ally.enabledFrameworks": ["vue", "react"],
"i18n-ally.keystyle": "nested", "i18n-ally.keystyle": "nested",
@@ -227,5 +227,6 @@
"commentTranslate.multiLineMerge": true, "commentTranslate.multiLineMerge": true,
"vue.server.hybridMode": true, "vue.server.hybridMode": true,
"typescript.tsdk": "node_modules/typescript/lib", "typescript.tsdk": "node_modules/typescript/lib",
"oxc.enable": false "oxc.enable": false,
"kiroAgent.configureMCP": "Disabled"
} }

View File

@@ -1,5 +1,18 @@
import type {
ContractStatus,
MerchantDocumentStatus,
MerchantDocumentType,
MerchantStatus,
OperatingMode,
StaffRoleType,
StaffStatus,
StoreStatus,
} from '#/enums/merchantEnum';
import { requestClient } from '#/api/request'; import { requestClient } from '#/api/request';
export * from '#/enums/merchantEnum';
/** /**
* 商户门店信息 * 商户门店信息
*/ */
@@ -15,7 +28,7 @@ export interface MerchantStoreDto {
/** 门店地址 */ /** 门店地址 */
address: string; address: string;
/** 门店状态 */ /** 门店状态 */
status: number; status: StoreStatus;
} }
/** /**
@@ -31,7 +44,7 @@ export interface MerchantDetailDto {
/** 商户名称 */ /** 商户名称 */
name: string; name: string;
/** 经营模式 */ /** 经营模式 */
operatingMode?: number; operatingMode?: OperatingMode;
/** 营业执照号 */ /** 营业执照号 */
licenseNumber?: string; licenseNumber?: string;
/** 法人/负责人 */ /** 法人/负责人 */
@@ -43,7 +56,7 @@ export interface MerchantDetailDto {
/** 联系邮箱 */ /** 联系邮箱 */
contactEmail?: string; contactEmail?: string;
/** 商户状态 */ /** 商户状态 */
status: number; status: MerchantStatus;
/** 是否冻结 */ /** 是否冻结 */
isFrozen: boolean; isFrozen: boolean;
/** 冻结原因 */ /** 冻结原因 */
@@ -74,8 +87,8 @@ export interface MerchantDetailDto {
export interface MerchantDocumentDto { export interface MerchantDocumentDto {
id: string; id: string;
merchantId: string; merchantId: string;
documentType: number; documentType: MerchantDocumentType;
status: number; status: MerchantDocumentStatus;
fileUrl: string; fileUrl: string;
documentNumber?: string; documentNumber?: string;
issuedAt?: null | string; issuedAt?: null | string;
@@ -91,7 +104,7 @@ export interface MerchantContractDto {
id: string; id: string;
merchantId: string; merchantId: string;
contractNumber: string; contractNumber: string;
status: number; status: ContractStatus;
startDate: string; startDate: string;
endDate: string; endDate: string;
fileUrl: string; fileUrl: string;
@@ -111,8 +124,8 @@ export interface MerchantStaffDto {
name: string; name: string;
phone: string; phone: string;
email?: string; email?: string;
roleType: number; roleType: StaffRoleType;
status: number; status: StaffStatus;
} }
/** /**
@@ -121,7 +134,7 @@ export interface MerchantStaffDto {
export interface MerchantAuditLogDto { export interface MerchantAuditLogDto {
id: string; id: string;
merchantId: string; merchantId: string;
action: number; action: number; // MerchantAuditAction (need to define)
operatorId?: string; operatorId?: string;
title: string; title: string;
description?: string; description?: string;
@@ -163,9 +176,23 @@ export async function getMerchantInfoApi() {
return requestClient.get<CurrentMerchantCenterDto>('/merchant/info'); return requestClient.get<CurrentMerchantCenterDto>('/merchant/info');
} }
/**
* 更新商户信息参数
*/
export interface UpdateMerchantDto {
id: string;
name: string;
operatingMode?: OperatingMode;
licenseNumber?: string;
legalRepresentative?: string;
contactPhone?: string;
contactEmail?: string;
registeredAddress?: string;
}
/** /**
* 更新商户信息 * 更新商户信息
*/ */
export async function updateMerchantInfoApi(data: any) { export async function updateMerchantInfoApi(data: UpdateMerchantDto) {
return requestClient.post('/merchant/update', data); return requestClient.post('/merchant/update', data);
} }

View File

@@ -0,0 +1,62 @@
export enum OperatingMode {
Direct = 1,
Franchise = 2,
}
export enum MerchantStatus {
Active = 1,
Closed = 3,
Pending = 0,
Suspended = 2,
}
export enum ContractStatus {
Active = 1,
Draft = 0,
Expired = 2,
Terminated = 3,
}
export enum MerchantDocumentType {
BusinessLicense = 1,
None = 0,
Other = 99,
Permit = 2,
}
export enum MerchantDocumentStatus {
Approved = 1,
Expired = 3,
Pending = 0,
Rejected = 2,
}
export enum StaffRoleType {
Financial = 2,
Operator = 3,
StoreManager = 1,
}
export enum StaffStatus {
Active = 1,
Resigned = 2,
}
export enum StoreStatus {
Closed = 2,
Operating = 1,
Renovating = 3,
}
export enum MerchantAuditAction {
Audit = 4,
Close = 10,
Create = 1,
Delete = 3,
Freeze = 8,
Reject = 5,
Reopen = 11,
Unfreeze = 9,
Unknown = 0,
Update = 2,
}

View File

@@ -85,6 +85,13 @@ const showDot = computed(() =>
); );
const menus = computed(() => [ const menus = computed(() => [
{
handler: () => {
router.push({ name: 'PersonalCenter' });
},
icon: 'lucide:user',
text: $t('page.auth.profile'),
},
{ {
handler: () => { handler: () => {
router.push({ name: 'MerchantCenter' }); router.push({ name: 'MerchantCenter' });

View File

@@ -0,0 +1,29 @@
import type { RouteRecordRaw } from 'vue-router';
import { BasicLayout } from '#/layouts';
import { $t } from '#/locales';
const routes: RouteRecordRaw[] = [
{
component: BasicLayout,
meta: {
hideInMenu: true,
title: $t('page.auth.profile'),
},
name: 'PersonalLayout',
path: '/personal',
children: [
{
name: 'PersonalCenter',
path: 'center',
component: () => import('#/views/personal/center/index.vue'),
meta: {
hideInMenu: true,
title: $t('page.auth.profile'),
},
},
],
},
];
export default routes;

View File

@@ -0,0 +1,19 @@
<script setup lang="ts">
import { Page } from '@vben/common-ui';
import { Empty } from 'ant-design-vue';
</script>
<template>
<Page title="个人中心">
<div class="rounded-lg bg-card p-5">
<Empty description="个人中心建设中,敬请期待" />
</div>
</Page>
</template>
<style scoped lang="scss">
.bg-card {
background-color: var(--el-bg-color-overlay);
}
</style>