|
@@ -10,6 +10,7 @@
|
|
|
import {
|
|
|
createAward,
|
|
|
deleteAward,
|
|
|
+ deleteStylistFamily,
|
|
|
getAwards,
|
|
|
getDesignerActivities,
|
|
|
getDesignerBasicInfo,
|
|
@@ -63,10 +64,16 @@ const handleAddFamilyInfo = async () => {
|
|
|
familyRelation: {
|
|
|
type: 'TextField',
|
|
|
label: messages.objects.designerFamilyInfo.familyRelation,
|
|
|
+ props: {
|
|
|
+ placeholder: `请选择${messages.objects.designerFamilyInfo.familyRelation}`,
|
|
|
+ },
|
|
|
},
|
|
|
familyName: {
|
|
|
type: 'TextField',
|
|
|
label: messages.objects.designerFamilyInfo.familyName,
|
|
|
+ props: {
|
|
|
+ placeholder: `请选择${messages.objects.designerFamilyInfo.familyName}`,
|
|
|
+ },
|
|
|
},
|
|
|
familySex: {
|
|
|
type: 'Radio',
|
|
@@ -79,16 +86,26 @@ const handleAddFamilyInfo = async () => {
|
|
|
},
|
|
|
},
|
|
|
familyBirthday: {
|
|
|
- type: 'TextField',
|
|
|
+ type: 'TimePick',
|
|
|
label: messages.objects.designerFamilyInfo.familyBirthday,
|
|
|
+ props: {
|
|
|
+ type: 'date',
|
|
|
+ placeholder: `请选择${messages.objects.designerFamilyInfo.familyBirthday}`,
|
|
|
+ },
|
|
|
},
|
|
|
familyInterset: {
|
|
|
type: 'TextField',
|
|
|
label: messages.objects.designerFamilyInfo.familyInterset,
|
|
|
+ props: {
|
|
|
+ placeholder: `请输入${messages.objects.designerFamilyInfo.familyInterset}`,
|
|
|
+ },
|
|
|
},
|
|
|
familyOccupation: {
|
|
|
type: 'TextField',
|
|
|
label: messages.objects.designerFamilyInfo.familyOccupation,
|
|
|
+ props: {
|
|
|
+ placeholder: `请输入${messages.objects.designerFamilyInfo.familyOccupation}`,
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
schema.value = familySchema
|
|
@@ -169,6 +186,13 @@ const handleDeleteAward = async (item: DesignerAward) => {
|
|
|
})
|
|
|
awardsListRef.value?.reload()
|
|
|
}
|
|
|
+const handleDeleteFamilyInfo = async (item: DesignerFamilyInfo) => {
|
|
|
+ await requestToast(() => deleteStylistFamily(item.id), {
|
|
|
+ success: true,
|
|
|
+ successTitle: '删除成功',
|
|
|
+ })
|
|
|
+ familyPageRef.value?.reload()
|
|
|
+}
|
|
|
onLoad(async (query?: Record<string | 'id', any>) => {
|
|
|
id.value = query?.id
|
|
|
await setBasicData()
|
|
@@ -204,13 +228,57 @@ onLoad(async (query?: Record<string | 'id', any>) => {
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-if="tab === 'family'">
|
|
|
- <PageHelperEvo ref="familyPageRef" :request="getDesignerFamilyInfo" :query="query">
|
|
|
- <template #default="{ source }">
|
|
|
- <template v-for="(it, index) in source?.list" :key="index">
|
|
|
- <div>{{ it }}</div>
|
|
|
+ <div class="bg-white p-4 mt-4 flex-grow flex flex-col">
|
|
|
+ <div class="flex items-center justify-between">
|
|
|
+ <div>家庭信息</div>
|
|
|
+ <div>
|
|
|
+ <wd-button type="text" icon="add-circle1" @click="handleAddFamilyInfo">
|
|
|
+ 添加家庭信息
|
|
|
+ </wd-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <ListHelperEvo ref="familyPageRef" :request="getDesignerFamilyInfo" :query="query">
|
|
|
+ <template #default="{ item, isLast }">
|
|
|
+ <div class="flex flex-col gap-4 py-4">
|
|
|
+ <SectionHeading
|
|
|
+ title="关系"
|
|
|
+ size="base"
|
|
|
+ :end-text="item.familyRelation"
|
|
|
+ ></SectionHeading>
|
|
|
+ <SectionHeading
|
|
|
+ title="姓名"
|
|
|
+ size="base"
|
|
|
+ :end-text="item.familyName"
|
|
|
+ ></SectionHeading>
|
|
|
+ <SectionHeading
|
|
|
+ title="性别"
|
|
|
+ size="base"
|
|
|
+ :end-text="item.familySex"
|
|
|
+ ></SectionHeading>
|
|
|
+ <SectionHeading
|
|
|
+ title="生日"
|
|
|
+ size="base"
|
|
|
+ :end-text="item.familyBirthday"
|
|
|
+ ></SectionHeading>
|
|
|
+ <SectionHeading
|
|
|
+ title="爱好"
|
|
|
+ size="base"
|
|
|
+ :end-text="item.familyInterset"
|
|
|
+ ></SectionHeading>
|
|
|
+ <SectionHeading
|
|
|
+ title="职业"
|
|
|
+ size="base"
|
|
|
+ :end-text="item.familyOccupation"
|
|
|
+ ></SectionHeading>
|
|
|
+ <wd-button type="text" @click="handleDeleteFamilyInfo(item)">删除</wd-button>
|
|
|
+ <div v-if="!isLast" class="w-full h-1 bg-[#dadada]"></div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
- </template>
|
|
|
- </PageHelperEvo>
|
|
|
+ </ListHelperEvo>
|
|
|
+ <!-- <PageHelperEvo ref="familyPageRef" :request="getDesignerFamilyInfo" :query="query">-->
|
|
|
+ <!-- -->
|
|
|
+ <!-- </PageHelperEvo>-->
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<template v-if="tab === 'award'">
|
|
|
<div class="bg-white p-4 mt-4 flex-grow flex flex-col">
|