完善管理师预约项目与美甲师创建
This commit is contained in:
@@ -738,6 +738,8 @@ export interface Product {
|
||||
imageUrls?: string[]
|
||||
bookableArtists?: string
|
||||
availableCoupons?: string
|
||||
frontVisible?: number
|
||||
sourceType?: string
|
||||
likeCount?: number
|
||||
collectCount?: number
|
||||
createTime: string
|
||||
|
||||
@@ -289,6 +289,9 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="前台展示" name="frontVisible">
|
||||
<a-switch v-model:checked="formState.frontVisible" :checked-value="1" :un-checked-value="0" />
|
||||
</a-form-item>
|
||||
<a-form-item label="标签" name="tags">
|
||||
<a-select
|
||||
v-model:value="formState.tags"
|
||||
@@ -472,6 +475,9 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="前台展示">
|
||||
<a-switch v-model:checked="viewFormState.frontVisible" :checked-value="1" :un-checked-value="0" disabled />
|
||||
</a-form-item>
|
||||
<a-form-item label="标签">
|
||||
<a-select
|
||||
v-model:value="viewFormState.tags"
|
||||
@@ -751,6 +757,7 @@ const viewFormState = reactive({
|
||||
collectCount: 0,
|
||||
tags: [] as string[],
|
||||
approximateDuration: undefined,
|
||||
frontVisible: 1,
|
||||
bookableArtists: [] as string[],
|
||||
availableCoupons: [] as string[]
|
||||
})
|
||||
@@ -777,6 +784,7 @@ const formState = reactive({
|
||||
collectCount: 0,
|
||||
tags: [] as string[],
|
||||
approximateDuration: undefined,
|
||||
frontVisible: 1,
|
||||
bookableArtists: [] as string[],
|
||||
availableCoupons: [] as string[]
|
||||
})
|
||||
@@ -1117,6 +1125,7 @@ const showAddModal = async () => {
|
||||
collectCount: 0,
|
||||
tags: [],
|
||||
approximateDuration: '',
|
||||
frontVisible: 1,
|
||||
bookableArtists: [],
|
||||
availableCoupons: []
|
||||
})
|
||||
@@ -1147,6 +1156,7 @@ const showEditModal = async (record: Product | Record<string, any>) => {
|
||||
const recordCollectCount = 'collectCount' in record ? record.collectCount : (record as any).collectCount
|
||||
const recordTags = 'tags' in record ? record.tags : (record as any).tags
|
||||
const recordApproximateDuration = 'approximateDuration' in record ? record.approximateDuration : (record as any).approximateDuration
|
||||
const recordFrontVisible = 'frontVisible' in record ? record.frontVisible : (record as any).frontVisible
|
||||
const recordBookableArtists = 'bookableArtists' in record ? record.bookableArtists : (record as any).bookableArtists
|
||||
const recordAvailableCoupons = 'availableCoupons' in record ? record.availableCoupons : (record as any).availableCoupons
|
||||
|
||||
@@ -1171,6 +1181,7 @@ const showEditModal = async (record: Product | Record<string, any>) => {
|
||||
collectCount: normalizeInteractionCount(recordCollectCount),
|
||||
tags: tagsArray,
|
||||
approximateDuration: durationNumber,
|
||||
frontVisible: recordFrontVisible ?? 1,
|
||||
bookableArtists: artistsArray,
|
||||
availableCoupons: couponsArray
|
||||
})
|
||||
@@ -1207,6 +1218,7 @@ const showViewModal = async (record: Product | Record<string, any>) => {
|
||||
const recordCollectCount = 'collectCount' in record ? record.collectCount : (record as any).collectCount
|
||||
const recordTags = 'tags' in record ? record.tags : (record as any).tags
|
||||
const recordApproximateDuration = 'approximateDuration' in record ? record.approximateDuration : (record as any).approximateDuration
|
||||
const recordFrontVisible = 'frontVisible' in record ? record.frontVisible : (record as any).frontVisible
|
||||
const recordBookableArtists = 'bookableArtists' in record ? record.bookableArtists : (record as any).bookableArtists
|
||||
const recordAvailableCoupons = 'availableCoupons' in record ? record.availableCoupons : (record as any).availableCoupons
|
||||
|
||||
@@ -1231,6 +1243,7 @@ const showViewModal = async (record: Product | Record<string, any>) => {
|
||||
collectCount: normalizeInteractionCount(recordCollectCount),
|
||||
tags: tagsArray,
|
||||
approximateDuration: durationNumber,
|
||||
frontVisible: recordFrontVisible ?? 1,
|
||||
bookableArtists: artistsArray,
|
||||
availableCoupons: couponsArray
|
||||
})
|
||||
@@ -1275,6 +1288,7 @@ const buildDraftPayload = () => ({
|
||||
collectCount: formState.collectCount,
|
||||
tags: [...formState.tags],
|
||||
approximateDuration: formState.approximateDuration,
|
||||
frontVisible: formState.frontVisible,
|
||||
bookableArtists: [...formState.bookableArtists],
|
||||
availableCoupons: [...formState.availableCoupons]
|
||||
},
|
||||
@@ -1464,6 +1478,7 @@ const handleModalOk = async () => {
|
||||
tags: tagsString,
|
||||
bookableArtists: artistsString,
|
||||
availableCoupons: couponsString,
|
||||
frontVisible: formState.frontVisible,
|
||||
approximateDuration: durationString,
|
||||
shopId: formState.shopId || 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user