|
@@ -19,6 +19,7 @@ import {
|
|
getDesignerFamilyInfo,
|
|
getDesignerFamilyInfo,
|
|
getSalesOrdersCounts,
|
|
getSalesOrdersCounts,
|
|
saveDesignerFamilyInfo,
|
|
saveDesignerFamilyInfo,
|
|
|
|
+ getUserInfoById,
|
|
} from '../../../../core/libs/agent-requests'
|
|
} from '../../../../core/libs/agent-requests'
|
|
import { messages } from '../../../../core/libs/messages'
|
|
import { messages } from '../../../../core/libs/messages'
|
|
import { omit } from 'radash'
|
|
import { omit } from 'radash'
|
|
@@ -48,16 +49,25 @@ const tabs = [
|
|
const id = ref()
|
|
const id = ref()
|
|
const { data: basicData, run: setBasicData } = useRequest(() => getDesignerBasicInfo(id.value))
|
|
const { data: basicData, run: setBasicData } = useRequest(() => getDesignerBasicInfo(id.value))
|
|
console.log('basicData::::', basicData)
|
|
console.log('basicData::::', basicData)
|
|
|
|
+const { data: familyData, run: setData } = useRequest(() => getUserInfoById(id.value))
|
|
const query = computed(() => ({ userId: id.value }))
|
|
const query = computed(() => ({ userId: id.value }))
|
|
const eventsQuery = computed(() => ({ type: '3' }))
|
|
const eventsQuery = computed(() => ({ type: '3' }))
|
|
const actionSheetStatus = ref(false)
|
|
const actionSheetStatus = ref(false)
|
|
const schema = ref<DataFormSchema>()
|
|
const schema = ref<DataFormSchema>()
|
|
-const formData = ref({})
|
|
|
|
|
|
+const formData = ref({
|
|
|
|
+ focus: '',
|
|
|
|
+})
|
|
|
|
+const formDataFoucs = ref<{
|
|
|
|
+ focus: string
|
|
|
|
+}>({
|
|
|
|
+ focus: '',
|
|
|
|
+})
|
|
const submitType = ref<'family' | 'award'>()
|
|
const submitType = ref<'family' | 'award'>()
|
|
const familyPageRef = ref<ComponentExposed<typeof PageHelperEvo>>()
|
|
const familyPageRef = ref<ComponentExposed<typeof PageHelperEvo>>()
|
|
const awardsListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
|
|
const awardsListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
|
|
const saleListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
|
|
const saleListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
|
|
const activityListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
|
|
const activityListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
|
|
|
|
+const getFormDataFoucs = computed(() => familyData.value?.focus)
|
|
// const {} = useRequest()
|
|
// const {} = useRequest()
|
|
const handleEditBasicInfo = async () => {
|
|
const handleEditBasicInfo = async () => {
|
|
await uni.navigateTo({ url: `/pages/agent/designer/archives/basic-info/index?id=${id.value}` })
|
|
await uni.navigateTo({ url: `/pages/agent/designer/archives/basic-info/index?id=${id.value}` })
|
|
@@ -204,14 +214,17 @@ const handleDeleteFamilyInfo = async (item: DesignerFamilyInfo) => {
|
|
familyPageRef.value?.reload()
|
|
familyPageRef.value?.reload()
|
|
}
|
|
}
|
|
const handleSubmitFocus = async () => {
|
|
const handleSubmitFocus = async () => {
|
|
- await requestToast(() => createFocus({ ...formData.value, userId: id.value }), {
|
|
|
|
|
|
+ await requestToast(() => createFocus({ ...formDataFoucs.value, userId: id.value }), {
|
|
success: true,
|
|
success: true,
|
|
successTitle: '保存成功',
|
|
successTitle: '保存成功',
|
|
})
|
|
})
|
|
- formData.value = {}
|
|
|
|
|
|
+ await setData()
|
|
|
|
+ formDataFoucs.value.focus = familyData.value?.focus as any
|
|
}
|
|
}
|
|
onLoad(async (query?: Record<string | 'id', any>) => {
|
|
onLoad(async (query?: Record<string | 'id', any>) => {
|
|
id.value = query?.id
|
|
id.value = query?.id
|
|
|
|
+ await setData()
|
|
|
|
+ formDataFoucs.value.focus = familyData.value?.focus as any
|
|
})
|
|
})
|
|
onShow(async () => {
|
|
onShow(async () => {
|
|
switch (tab.value) {
|
|
switch (tab.value) {
|
|
@@ -270,6 +283,19 @@ onShow(async () => {
|
|
}"
|
|
}"
|
|
></DataRender>
|
|
></DataRender>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template v-else-if="key === 'retryStatus'">
|
|
|
|
+ <DataRender
|
|
|
|
+ v-bind="{
|
|
|
|
+ type: 'Select',
|
|
|
|
+ value: value,
|
|
|
|
+ options: [
|
|
|
|
+ { label: '弱绑定', value: 0 },
|
|
|
|
+ { label: '强绑定', value: 1 },
|
|
|
|
+ { label: '公开', value: 3 },
|
|
|
|
+ ],
|
|
|
|
+ }"
|
|
|
|
+ ></DataRender>
|
|
|
|
+ </template>
|
|
<template v-else>
|
|
<template v-else>
|
|
<DataRender v-bind="{ type: 'Original', value: value }"></DataRender>
|
|
<DataRender v-bind="{ type: 'Original', value: value }"></DataRender>
|
|
</template>
|
|
</template>
|
|
@@ -470,7 +496,7 @@ onShow(async () => {
|
|
</template>
|
|
</template>
|
|
</SectionHeading>
|
|
</SectionHeading>
|
|
<DataForm
|
|
<DataForm
|
|
- v-model="formData"
|
|
|
|
|
|
+ v-model="formDataFoucs"
|
|
:schema="{ focus: { type: 'Textarea', hiddenLabel: true } }"
|
|
:schema="{ focus: { type: 'Textarea', hiddenLabel: true } }"
|
|
></DataForm>
|
|
></DataForm>
|
|
</div>
|
|
</div>
|