feat(admin): suggest and merge sibling origin goods in config modal
This commit is contained in:
+34
-32
@@ -1,32 +1,34 @@
|
||||
{
|
||||
"name": "@inkreach/admin",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc -b && vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.2",
|
||||
"@vueuse/core": "^14.3.0",
|
||||
"axios": "^1.18.0",
|
||||
"dayjs": "^1.11.21",
|
||||
"element-plus": "^2.14.2",
|
||||
"pinia": "^3.0.4",
|
||||
"vue": "^3.5.34",
|
||||
"vue-router": "^4.6.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.12.3",
|
||||
"@vitejs/plugin-vue": "^6.0.6",
|
||||
"@vue/tsconfig": "^0.9.1",
|
||||
"sass": "^1.101.0",
|
||||
"typescript": "~6.0.2",
|
||||
"unplugin-auto-import": "^21.0.0",
|
||||
"unplugin-vue-components": "^32.1.0",
|
||||
"vite": "^8.0.12",
|
||||
"vue-tsc": "^3.2.8"
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "@inkreach/admin",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc -b && vite build",
|
||||
"preview": "vite preview",
|
||||
"test": "vitest run"
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.2",
|
||||
"@vueuse/core": "^14.3.0",
|
||||
"axios": "^1.18.0",
|
||||
"dayjs": "^1.11.21",
|
||||
"element-plus": "^2.14.2",
|
||||
"pinia": "^3.0.4",
|
||||
"vue": "^3.5.34",
|
||||
"vue-router": "^4.6.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.12.3",
|
||||
"@vitejs/plugin-vue": "^6.0.6",
|
||||
"@vue/tsconfig": "^0.9.1",
|
||||
"sass": "^1.101.0",
|
||||
"typescript": "~6.0.2",
|
||||
"unplugin-auto-import": "^21.0.0",
|
||||
"unplugin-vue-components": "^32.1.0",
|
||||
"vite": "^8.0.12",
|
||||
"vitest": "^4.1.10",
|
||||
"vue-tsc": "^3.2.8"
|
||||
}
|
||||
}
|
||||
|
||||
+137
-124
@@ -24,7 +24,7 @@ export interface User {
|
||||
}
|
||||
|
||||
// Good types
|
||||
export interface Good {
|
||||
export interface Good {
|
||||
id: string
|
||||
goodName: string
|
||||
goodImage: string | null
|
||||
@@ -42,81 +42,92 @@ export interface Good {
|
||||
position?: Position
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export interface OriginGoodDetail {
|
||||
productCode?: string | null
|
||||
englishName?: string | null
|
||||
productionCycleHours?: number | null
|
||||
minWeightG?: string | null
|
||||
productionProcess?: string | null
|
||||
materialDescription?: string | null
|
||||
sizeChart?: { columns?: Array<{ key: string; name: string }>; rows?: any[] } | null
|
||||
packageSpecs?: { rows?: any[] } | null
|
||||
syncedAt?: string | null
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export interface OriginGoodVariant {
|
||||
sdsVariantId: string
|
||||
sku: string
|
||||
sizeName?: string | null
|
||||
colorName?: string | null
|
||||
colorHex?: string | null
|
||||
price?: string | null
|
||||
enabled: boolean
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export interface CustomGoodVariantRequest {
|
||||
sku: string
|
||||
sizeId?: string | null
|
||||
sizeName?: string | null
|
||||
colorId?: string | null
|
||||
colorName?: string | null
|
||||
colorHex?: string | null
|
||||
imageUrl?: string | null
|
||||
price?: string | null
|
||||
originalPrice?: string | null
|
||||
weightG?: string | null
|
||||
boxLengthCm?: string | null
|
||||
boxWidthCm?: string | null
|
||||
boxHeightCm?: string | null
|
||||
designData?: Record<string, unknown> | null
|
||||
enabled?: boolean
|
||||
sortOrder?: number
|
||||
}
|
||||
|
||||
export interface CustomGoodDetailRequest {
|
||||
productCode?: string | null
|
||||
englishName?: string | null
|
||||
productionCycleHours?: number | null
|
||||
minWeightG?: string | null
|
||||
productionProcess?: string | null
|
||||
materialDescription?: string | null
|
||||
blankDesignUrl?: string | null
|
||||
detailsPageVideoUrl?: string | null
|
||||
textureName?: string | null
|
||||
reminder?: string | null
|
||||
productPerformance?: string | null
|
||||
applicableScenarios?: string | null
|
||||
washingInstructions?: string | null
|
||||
specialDescription?: string | null
|
||||
designExplanation?: string | null
|
||||
designArea?: string | null
|
||||
pictureRequest?: string | null
|
||||
sizeChart?: Record<string, unknown> | null
|
||||
packageSpecs?: Record<string, unknown> | null
|
||||
options?: Record<string, unknown> | null
|
||||
media?: Record<string, unknown> | null
|
||||
}
|
||||
|
||||
export interface GoodDetail extends Good {
|
||||
originDetail: OriginGoodDetail | null
|
||||
variants: OriginGoodVariant[]
|
||||
}
|
||||
mergedOriginGoods?: MergedOriginGoodSummary[]
|
||||
}
|
||||
|
||||
export interface CreateGoodRequest {
|
||||
export interface MergedOriginGoodSummary {
|
||||
id: string
|
||||
sdsGoodId: string
|
||||
goodName: string | null
|
||||
goodImage: string | null
|
||||
goodPrice: string | null
|
||||
hasDetail: boolean
|
||||
variantCount: number
|
||||
}
|
||||
|
||||
export interface OriginGoodDetail {
|
||||
productCode?: string | null
|
||||
englishName?: string | null
|
||||
productionCycleHours?: number | null
|
||||
minWeightG?: string | null
|
||||
productionProcess?: string | null
|
||||
materialDescription?: string | null
|
||||
sizeChart?: { columns?: Array<{ key: string; name: string }>; rows?: any[] } | null
|
||||
packageSpecs?: { rows?: any[] } | null
|
||||
syncedAt?: string | null
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export interface OriginGoodVariant {
|
||||
sdsVariantId: string
|
||||
sku: string
|
||||
sizeName?: string | null
|
||||
colorName?: string | null
|
||||
colorHex?: string | null
|
||||
price?: string | null
|
||||
enabled: boolean
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export interface CustomGoodVariantRequest {
|
||||
sku: string
|
||||
sizeId?: string | null
|
||||
sizeName?: string | null
|
||||
colorId?: string | null
|
||||
colorName?: string | null
|
||||
colorHex?: string | null
|
||||
imageUrl?: string | null
|
||||
price?: string | null
|
||||
originalPrice?: string | null
|
||||
weightG?: string | null
|
||||
boxLengthCm?: string | null
|
||||
boxWidthCm?: string | null
|
||||
boxHeightCm?: string | null
|
||||
designData?: Record<string, unknown> | null
|
||||
enabled?: boolean
|
||||
sortOrder?: number
|
||||
}
|
||||
|
||||
export interface CustomGoodDetailRequest {
|
||||
productCode?: string | null
|
||||
englishName?: string | null
|
||||
productionCycleHours?: number | null
|
||||
minWeightG?: string | null
|
||||
productionProcess?: string | null
|
||||
materialDescription?: string | null
|
||||
blankDesignUrl?: string | null
|
||||
detailsPageVideoUrl?: string | null
|
||||
textureName?: string | null
|
||||
reminder?: string | null
|
||||
productPerformance?: string | null
|
||||
applicableScenarios?: string | null
|
||||
washingInstructions?: string | null
|
||||
specialDescription?: string | null
|
||||
designExplanation?: string | null
|
||||
designArea?: string | null
|
||||
pictureRequest?: string | null
|
||||
sizeChart?: Record<string, unknown> | null
|
||||
packageSpecs?: Record<string, unknown> | null
|
||||
options?: Record<string, unknown> | null
|
||||
media?: Record<string, unknown> | null
|
||||
}
|
||||
|
||||
export interface GoodDetail extends Good {
|
||||
originDetail: OriginGoodDetail | null
|
||||
variants: OriginGoodVariant[]
|
||||
}
|
||||
|
||||
export interface CreateGoodRequest {
|
||||
goodName: string
|
||||
goodImage?: string
|
||||
originGoodId: number
|
||||
@@ -124,29 +135,30 @@ export interface CreateGoodRequest {
|
||||
categoryId: number
|
||||
tagIds?: number[]
|
||||
positionId?: number
|
||||
goodPriority?: number
|
||||
}
|
||||
|
||||
export interface CreateCustomGoodRequest {
|
||||
goodName: string
|
||||
goodImage?: string
|
||||
goodPrice?: string | null
|
||||
countryId: number
|
||||
categoryId: number
|
||||
tagIds?: number[]
|
||||
positionId?: number
|
||||
goodPriority?: number
|
||||
detail?: CustomGoodDetailRequest
|
||||
variants?: CustomGoodVariantRequest[]
|
||||
}
|
||||
|
||||
export interface UpdateCustomGoodContentRequest {
|
||||
goodName?: string
|
||||
goodImage?: string | null
|
||||
goodPrice?: string | null
|
||||
detail?: CustomGoodDetailRequest
|
||||
variants?: CustomGoodVariantRequest[]
|
||||
}
|
||||
goodPriority?: number
|
||||
mergedOriginGoodIds?: number[]
|
||||
}
|
||||
|
||||
export interface CreateCustomGoodRequest {
|
||||
goodName: string
|
||||
goodImage?: string
|
||||
goodPrice?: string | null
|
||||
countryId: number
|
||||
categoryId: number
|
||||
tagIds?: number[]
|
||||
positionId?: number
|
||||
goodPriority?: number
|
||||
detail?: CustomGoodDetailRequest
|
||||
variants?: CustomGoodVariantRequest[]
|
||||
}
|
||||
|
||||
export interface UpdateCustomGoodContentRequest {
|
||||
goodName?: string
|
||||
goodImage?: string | null
|
||||
goodPrice?: string | null
|
||||
detail?: CustomGoodDetailRequest
|
||||
variants?: CustomGoodVariantRequest[]
|
||||
}
|
||||
|
||||
export interface UpdateGoodRequest {
|
||||
goodName?: string
|
||||
@@ -157,6 +169,7 @@ export interface UpdateGoodRequest {
|
||||
tagIds?: number[]
|
||||
positionId?: number | null
|
||||
goodPriority?: number
|
||||
mergedOriginGoodIds?: number[]
|
||||
}
|
||||
|
||||
export interface BatchCreateItem {
|
||||
@@ -329,28 +342,28 @@ export interface UpdatePositionRequest {
|
||||
}
|
||||
|
||||
// Origin Good types
|
||||
export interface OriginGood {
|
||||
export interface OriginGood {
|
||||
id: string
|
||||
goodName: string | null
|
||||
goodImage: string | null
|
||||
goodPrice: string | null
|
||||
sdsGoodId: string
|
||||
source: 'SDS' | 'CUSTOM'
|
||||
isCustom: boolean
|
||||
sdsGoodId: string
|
||||
source: 'SDS' | 'CUSTOM'
|
||||
isCustom: boolean
|
||||
sdsCategoryId: string | null
|
||||
delisted?: boolean
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
hasDetail?: boolean
|
||||
detailSyncedAt?: string | null
|
||||
variantCount?: number
|
||||
sizeRowCount?: number
|
||||
packageRowCount?: number
|
||||
productCode?: string | null
|
||||
updatedAt: string
|
||||
hasDetail?: boolean
|
||||
detailSyncedAt?: string | null
|
||||
variantCount?: number
|
||||
sizeRowCount?: number
|
||||
packageRowCount?: number
|
||||
productCode?: string | null
|
||||
}
|
||||
|
||||
// Origin Goods Tree types
|
||||
export interface OriginGoodsTreeNode {
|
||||
export interface OriginGoodsTreeNode {
|
||||
id: string
|
||||
goodName: string
|
||||
goodImage: string | null
|
||||
@@ -359,12 +372,12 @@ export interface OriginGoodsTreeNode {
|
||||
delisted: boolean
|
||||
configuredCount: number
|
||||
configuredCountries: string[]
|
||||
configuredTags: { tagName: string; tagColor: string | null; tagFontColor: string | null; tagGroupId: string | null; tagGroupName: string | null; sortOrder: number }[]
|
||||
hasDetail: boolean
|
||||
detailSyncedAt: string | null
|
||||
variantCount: number
|
||||
sizeRowCount: number
|
||||
packageRowCount: number
|
||||
configuredTags: { tagName: string; tagColor: string | null; tagFontColor: string | null; tagGroupId: string | null; tagGroupName: string | null; sortOrder: number }[]
|
||||
hasDetail: boolean
|
||||
detailSyncedAt: string | null
|
||||
variantCount: number
|
||||
sizeRowCount: number
|
||||
packageRowCount: number
|
||||
}
|
||||
|
||||
export interface OriginGoodsTreeCategoryNode {
|
||||
@@ -384,14 +397,14 @@ export interface OriginGoodsTreeResponse {
|
||||
}
|
||||
|
||||
// Sync types
|
||||
export interface SyncLog {
|
||||
id: string
|
||||
type: 'CATEGORIES' | 'PRODUCTS' | 'PRODUCT_DETAILS'
|
||||
status: 'RUNNING' | 'SUCCESS' | 'FAILED'
|
||||
message: string | null
|
||||
startedAt: string
|
||||
finishedAt: string | null
|
||||
}
|
||||
export interface SyncLog {
|
||||
id: string
|
||||
type: 'CATEGORIES' | 'PRODUCTS' | 'PRODUCT_DETAILS'
|
||||
status: 'RUNNING' | 'SUCCESS' | 'FAILED'
|
||||
message: string | null
|
||||
startedAt: string
|
||||
finishedAt: string | null
|
||||
}
|
||||
|
||||
// Filter types
|
||||
export interface GoodsFilter {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user