feat: 提交其余本地改动
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -50,3 +50,6 @@ vite.config.ts.*
|
||||
*.sw?
|
||||
.history
|
||||
.cursor
|
||||
|
||||
# Prototype backup files
|
||||
backup/
|
||||
|
||||
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@@ -204,7 +204,7 @@
|
||||
],
|
||||
"i18n-ally.pathMatcher": "{locale}/{namespace}.{ext}",
|
||||
"i18n-ally.enabledParsers": ["json"],
|
||||
"i18n-ally.sourceLanguage": "en",
|
||||
"i18n-ally.sourceLanguage": "zh-CN",
|
||||
"i18n-ally.displayLanguage": "zh-CN",
|
||||
"i18n-ally.enabledFrameworks": ["vue", "react"],
|
||||
"i18n-ally.keystyle": "nested",
|
||||
@@ -227,5 +227,6 @@
|
||||
"commentTranslate.multiLineMerge": true,
|
||||
"vue.server.hybridMode": true,
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"oxc.enable": false
|
||||
"oxc.enable": false,
|
||||
"kiroAgent.configureMCP": "Disabled"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
import type {
|
||||
ContractStatus,
|
||||
MerchantDocumentStatus,
|
||||
MerchantDocumentType,
|
||||
MerchantStatus,
|
||||
OperatingMode,
|
||||
StaffRoleType,
|
||||
StaffStatus,
|
||||
StoreStatus,
|
||||
} from '#/enums/merchantEnum';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export * from '#/enums/merchantEnum';
|
||||
|
||||
/**
|
||||
* 商户门店信息
|
||||
*/
|
||||
@@ -15,7 +28,7 @@ export interface MerchantStoreDto {
|
||||
/** 门店地址 */
|
||||
address: string;
|
||||
/** 门店状态 */
|
||||
status: number;
|
||||
status: StoreStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,7 +44,7 @@ export interface MerchantDetailDto {
|
||||
/** 商户名称 */
|
||||
name: string;
|
||||
/** 经营模式 */
|
||||
operatingMode?: number;
|
||||
operatingMode?: OperatingMode;
|
||||
/** 营业执照号 */
|
||||
licenseNumber?: string;
|
||||
/** 法人/负责人 */
|
||||
@@ -43,7 +56,7 @@ export interface MerchantDetailDto {
|
||||
/** 联系邮箱 */
|
||||
contactEmail?: string;
|
||||
/** 商户状态 */
|
||||
status: number;
|
||||
status: MerchantStatus;
|
||||
/** 是否冻结 */
|
||||
isFrozen: boolean;
|
||||
/** 冻结原因 */
|
||||
@@ -74,8 +87,8 @@ export interface MerchantDetailDto {
|
||||
export interface MerchantDocumentDto {
|
||||
id: string;
|
||||
merchantId: string;
|
||||
documentType: number;
|
||||
status: number;
|
||||
documentType: MerchantDocumentType;
|
||||
status: MerchantDocumentStatus;
|
||||
fileUrl: string;
|
||||
documentNumber?: string;
|
||||
issuedAt?: null | string;
|
||||
@@ -91,7 +104,7 @@ export interface MerchantContractDto {
|
||||
id: string;
|
||||
merchantId: string;
|
||||
contractNumber: string;
|
||||
status: number;
|
||||
status: ContractStatus;
|
||||
startDate: string;
|
||||
endDate: string;
|
||||
fileUrl: string;
|
||||
@@ -111,8 +124,8 @@ export interface MerchantStaffDto {
|
||||
name: string;
|
||||
phone: string;
|
||||
email?: string;
|
||||
roleType: number;
|
||||
status: number;
|
||||
roleType: StaffRoleType;
|
||||
status: StaffStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -121,7 +134,7 @@ export interface MerchantStaffDto {
|
||||
export interface MerchantAuditLogDto {
|
||||
id: string;
|
||||
merchantId: string;
|
||||
action: number;
|
||||
action: number; // MerchantAuditAction (need to define)
|
||||
operatorId?: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
@@ -163,9 +176,23 @@ export async function getMerchantInfoApi() {
|
||||
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);
|
||||
}
|
||||
|
||||
62
apps/web-antd/src/enums/merchantEnum.ts
Normal file
62
apps/web-antd/src/enums/merchantEnum.ts
Normal 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,
|
||||
}
|
||||
@@ -85,6 +85,13 @@ const showDot = computed(() =>
|
||||
);
|
||||
|
||||
const menus = computed(() => [
|
||||
{
|
||||
handler: () => {
|
||||
router.push({ name: 'PersonalCenter' });
|
||||
},
|
||||
icon: 'lucide:user',
|
||||
text: $t('page.auth.profile'),
|
||||
},
|
||||
{
|
||||
handler: () => {
|
||||
router.push({ name: 'MerchantCenter' });
|
||||
|
||||
29
apps/web-antd/src/router/routes/external/personal.ts
vendored
Normal file
29
apps/web-antd/src/router/routes/external/personal.ts
vendored
Normal 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;
|
||||
19
apps/web-antd/src/views/personal/center/index.vue
Normal file
19
apps/web-antd/src/views/personal/center/index.vue
Normal 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>
|
||||
Reference in New Issue
Block a user