|
@@ -54,6 +54,8 @@ const formData = ref({})
|
|
|
const submitType = ref<'family' | 'award'>()
|
|
|
const familyPageRef = ref<ComponentExposed<typeof PageHelperEvo>>()
|
|
|
const awardsListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
|
|
|
+const saleListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
|
|
|
+const activityListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
|
|
|
// const {} = useRequest()
|
|
|
const handleEditBasicInfo = async () => {
|
|
|
await uni.navigateTo({ url: `/pages/agent/designer/archives/basic-info/index?id=${id.value}` })
|
|
@@ -92,7 +94,7 @@ const handleAddFamilyInfo = async () => {
|
|
|
type: 'date',
|
|
|
placeholder: `请选择${messages.objects.designerFamilyInfo.familyBirthday}`,
|
|
|
minDate: new Date('1925-01-01').getTime(),
|
|
|
- defaultVale: new Date('1990-01-01').getTime(),
|
|
|
+ // defaultVale: new Date('1990-01-01').getTime(),
|
|
|
},
|
|
|
},
|
|
|
familyInterset: {
|
|
@@ -139,6 +141,7 @@ const handleAddAward = async () => {
|
|
|
props: {
|
|
|
defaultValue: dayjs().toDate(),
|
|
|
placeholder: messages.objects.designerAward.awardsTimePlaceHolder,
|
|
|
+ type: 'date',
|
|
|
},
|
|
|
},
|
|
|
awardsFileUrl: {
|
|
@@ -202,7 +205,19 @@ onLoad(async (query?: Record<string | 'id', any>) => {
|
|
|
id.value = query?.id
|
|
|
})
|
|
|
onShow(async () => {
|
|
|
- console.log(id.value)
|
|
|
+ switch (tab.value) {
|
|
|
+ case 'basic':
|
|
|
+ await setBasicData()
|
|
|
+ break
|
|
|
+ case 'sale':
|
|
|
+ await saleListRef.value?.reload()
|
|
|
+ break
|
|
|
+ case 'activity':
|
|
|
+ await activityListRef.value?.reload()
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ break
|
|
|
+ }
|
|
|
await setBasicData()
|
|
|
})
|
|
|
</script>
|
|
@@ -248,41 +263,45 @@ onShow(async () => {
|
|
|
</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 && dayjs(item.familyBirthday).format('YYYY-MM-DD')"
|
|
|
- ></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 #list="{ list }">
|
|
|
+ <template v-for="(item, index) in list" :key="index">
|
|
|
+ <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 && dayjs(item.familyBirthday).format('YYYY-MM-DD')
|
|
|
+ "
|
|
|
+ ></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="!(index === list.length - 1)" class="w-full h-1 bg-[#dadada]"></div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</ListHelperEvo>
|
|
|
<!-- <PageHelperEvo ref="familyPageRef" :request="getDesignerFamilyInfo" :query="query">-->
|
|
@@ -307,42 +326,51 @@ onShow(async () => {
|
|
|
<!-- },-->
|
|
|
<!-- ]"-->
|
|
|
<ListHelperEvo ref="awardsListRef" :request="getAwards" :query="{ userId: id }">
|
|
|
- <template #default="{ item, isLast }">
|
|
|
- <div class="flex flex-col gap-4 py-4">
|
|
|
- <SectionHeading
|
|
|
- title="奖项名称"
|
|
|
- size="base"
|
|
|
- :end-text="item.awardsName"
|
|
|
- ></SectionHeading>
|
|
|
- <SectionHeading
|
|
|
- title="奖项日期"
|
|
|
- :end-text="item.awardsTime && dayjs(item.awardsTime).format('YYYY-MM-DD')"
|
|
|
- ></SectionHeading>
|
|
|
- <SectionHeading title="奖项名次" :end-text="item.awardsRank"></SectionHeading>
|
|
|
- <SectionHeading
|
|
|
- title="奖项照片"
|
|
|
- end-arrow
|
|
|
- :path="`/pages/agent/designer/archives/award/photos/index?urls=${item.awardsFileUrl ?? ''}`"
|
|
|
- ></SectionHeading>
|
|
|
- <wd-button type="text" @click="handleDeleteAward(item)">删除</wd-button>
|
|
|
- <div v-if="!isLast" class="w-full h-1 bg-[#dadada]"></div>
|
|
|
- </div>
|
|
|
+ <!-- <template #default="{ item, isLast }">-->
|
|
|
+ <!-- <div class="flex flex-col gap-4 py-4">-->
|
|
|
+ <!-- <SectionHeading-->
|
|
|
+ <!-- title="奖项名称"-->
|
|
|
+ <!-- size="base"-->
|
|
|
+ <!-- :end-text="item.awardsName"-->
|
|
|
+ <!-- ></SectionHeading>-->
|
|
|
+ <!-- <SectionHeading-->
|
|
|
+ <!-- title="奖项日期"-->
|
|
|
+ <!-- :end-text="item.awardsTime && dayjs(item.awardsTime).format('YYYY-MM-DD')"-->
|
|
|
+ <!-- ></SectionHeading>-->
|
|
|
+ <!-- <SectionHeading title="奖项名次" :end-text="item.awardsRank"></SectionHeading>-->
|
|
|
+ <!-- <SectionHeading-->
|
|
|
+ <!-- title="奖项照片"-->
|
|
|
+ <!-- end-arrow-->
|
|
|
+ <!-- :path="`/pages/agent/designer/archives/award/photos/index?urls=${item.awardsFileUrl ?? ''}`"-->
|
|
|
+ <!-- ></SectionHeading>-->
|
|
|
+ <!-- <wd-button type="text" @click="handleDeleteAward(item)">删除</wd-button>-->
|
|
|
+ <!-- <div v-if="!isLast" class="w-full h-1 bg-[#dadada]"></div>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- </template>-->
|
|
|
+ <template #list="{ list }">
|
|
|
+ <template v-for="(item, i) in list" :key="i">
|
|
|
+ <div class="flex flex-col gap-4 py-4">
|
|
|
+ <SectionHeading
|
|
|
+ title="奖项名称"
|
|
|
+ size="base"
|
|
|
+ :end-text="item.awardsName"
|
|
|
+ ></SectionHeading>
|
|
|
+ <SectionHeading
|
|
|
+ title="奖项日期"
|
|
|
+ :end-text="item.awardsTime && dayjs(item.awardsTime).format('YYYY-MM-DD')"
|
|
|
+ ></SectionHeading>
|
|
|
+ <SectionHeading title="奖项名次" :end-text="item.awardsRank"></SectionHeading>
|
|
|
+ <SectionHeading
|
|
|
+ title="奖项照片"
|
|
|
+ end-arrow
|
|
|
+ :path="`/pages/agent/designer/archives/award/photos/index?urls=${item.awardsFileUrl ?? ''}`"
|
|
|
+ ></SectionHeading>
|
|
|
+ <wd-button type="text" @click="handleDeleteAward(item)">删除</wd-button>
|
|
|
+ <div v-if="!isLast" class="w-full h-1 bg-[#dadada]"></div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</ListHelperEvo>
|
|
|
- <!-- <template v-for="(it, index) in source?.list" :key="index">-->
|
|
|
- <!-- <div>-->
|
|
|
- <!-- </div>-->
|
|
|
- <!-- </template>-->
|
|
|
- <!-- <PageHelperEvo-->
|
|
|
- <!-- class="flex-grow flex flex-col"-->
|
|
|
- <!-- :request="async () => ({data: { list: [{}], total: 0 }, msg: 0, code: 0})"-->
|
|
|
- <!-- :query="eventsQuery"-->
|
|
|
- <!-- custom-class="flex-grow flex flex-col"-->
|
|
|
- <!-- >-->
|
|
|
- <!-- <template #default="{ source }">-->
|
|
|
- <!-- -->
|
|
|
- <!-- </template>-->
|
|
|
- <!-- </PageHelperEvo>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -350,83 +378,59 @@ onShow(async () => {
|
|
|
<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="handleAddAward">-->
|
|
|
- <!-- 添加获奖信息-->
|
|
|
- <!-- </wd-button>-->
|
|
|
- <!-- </div>-->
|
|
|
</div>
|
|
|
<ListHelperEvo ref="saleListRef" :request="getSalesOrdersCounts" :query="{ userId: id }">
|
|
|
- <template #default="{ item, isLast }">
|
|
|
- <div class="flex flex-col gap-4 py-4">
|
|
|
- <div v-if="isLast" class="w-full h-1 bg-[#dadada]"></div>
|
|
|
- <SectionHeading
|
|
|
- :title="item.label"
|
|
|
- size="base"
|
|
|
- :end-text="String(item.value)"
|
|
|
- end-arrow
|
|
|
- :path="
|
|
|
- !isLast
|
|
|
- ? `/pages/agent/designer/archives/sale-info/index?id=${id}`
|
|
|
- : `/pages/agent/designer/archives/sale-info/others/index?id=${id}`
|
|
|
- "
|
|
|
- ></SectionHeading>
|
|
|
- </div>
|
|
|
+ <template #list="{ list }">
|
|
|
+ <template v-for="(item, index) in list" :key="index">
|
|
|
+ <div class="flex flex-col gap-4 py-4">
|
|
|
+ <div v-if="index === list.length - 1" class="w-full h-1 bg-[#dadada]"></div>
|
|
|
+ <SectionHeading
|
|
|
+ :title="item.label"
|
|
|
+ size="base"
|
|
|
+ :end-text="String(item.value)"
|
|
|
+ end-arrow
|
|
|
+ :path="
|
|
|
+ !(index === list.length - 1)
|
|
|
+ ? `/pages/agent/designer/archives/sale-info/index?id=${id}`
|
|
|
+ : `/pages/agent/designer/archives/sale-info/others/index?id=${id}`
|
|
|
+ "
|
|
|
+ ></SectionHeading>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</ListHelperEvo>
|
|
|
- <!-- <template v-for="(it, index) in source?.list" :key="index">-->
|
|
|
- <!-- <div>-->
|
|
|
- <!-- </div>-->
|
|
|
- <!-- </template>-->
|
|
|
- <!-- <PageHelperEvo-->
|
|
|
- <!-- class="flex-grow flex flex-col"-->
|
|
|
- <!-- :request="async () => ({data: { list: [{}], total: 0 }, msg: 0, code: 0})"-->
|
|
|
- <!-- :query="eventsQuery"-->
|
|
|
- <!-- custom-class="flex-grow flex flex-col"-->
|
|
|
- <!-- >-->
|
|
|
- <!-- <template #default="{ source }">-->
|
|
|
- <!-- -->
|
|
|
- <!-- </template>-->
|
|
|
- <!-- </PageHelperEvo>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-if="tab === 'activity'">
|
|
|
<div class="bg-white p-4 mt-4 flex-grow flex flex-col">
|
|
|
<SectionHeading title="游学/活动信息"></SectionHeading>
|
|
|
- <ListHelperEvo :request="getDesignerActivities" :query="{ userId: id }">
|
|
|
- <template #default="{ item, isLast }">
|
|
|
- <div class="">
|
|
|
- <template v-if="item.type === 'line'">
|
|
|
- <div class="w-full h-1 bg-[#dadada]"></div>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <div class="py-4">
|
|
|
- <SectionHeading
|
|
|
- :title="item.label"
|
|
|
- :end-text="item.value"
|
|
|
- :path="
|
|
|
- isLast
|
|
|
- ? `/pages/agent/designer/archives/activity/others/index?id=${id}`
|
|
|
- : ''
|
|
|
- "
|
|
|
- ></SectionHeading>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <div v-if="!isLast" class="w-full h-.25 bg-[#f4f4f4]"></div>
|
|
|
- <!-- </template>-->
|
|
|
-
|
|
|
- <!-- <SectionHeading-->
|
|
|
- <!-- :title="item.label"-->
|
|
|
- <!-- size="base"-->
|
|
|
- <!-- :end-text="String(item.value)"-->
|
|
|
- <!-- end-arrow-->
|
|
|
- <!-- :path="-->
|
|
|
- <!-- !isLast-->
|
|
|
- <!-- ? `/pages/agent/designer/archives/sale-info/index?id=${id}`-->
|
|
|
- <!-- : `/pages/agent/designer/archives/sale-info/others/index?id=${id}`-->
|
|
|
- <!-- "-->
|
|
|
- <!-- ></SectionHeading>-->
|
|
|
- </div>
|
|
|
+ <ListHelperEvo
|
|
|
+ ref="activityListRef"
|
|
|
+ :request="getDesignerActivities"
|
|
|
+ :query="{ userId: id }"
|
|
|
+ >
|
|
|
+ <template #list="{ list }">
|
|
|
+ <template v-for="(item, index) in list" :key="index">
|
|
|
+ <div class="">
|
|
|
+ <template v-if="item.type === 'line'">
|
|
|
+ <div class="w-full h-1 bg-[#dadada]"></div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="py-4">
|
|
|
+ <SectionHeading
|
|
|
+ :title="item.label"
|
|
|
+ :end-text="item.value"
|
|
|
+ :path="
|
|
|
+ index === list.length - 1
|
|
|
+ ? `/pages/agent/designer/archives/activity/others/index?id=${id}`
|
|
|
+ : ''
|
|
|
+ "
|
|
|
+ ></SectionHeading>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div v-if="!(index === list.length - 1)" class="w-full h-.25 bg-[#f4f4f4]"></div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</ListHelperEvo>
|
|
|
</div>
|