li.shaoyi 10 months ago
parent
commit
53a1c0db6b

+ 9 - 2
src/packages/pc/components/modules/select-account/index.vue

@@ -29,11 +29,18 @@ const selectedValue = computed({
     set: (val) => emit('update:modelValue', val)
 })
 
-const { dataList, loading, run } = useRequest(queryTAAccountChildrenSelect)
+const { dataList, loading, run } = useRequest(queryTAAccountChildrenSelect, {
+    manual: true,
+    onSuccess: (res) => {
+        if (!res.data.some((e) => e.accountid.toString() === selectedValue.value?.toString())) {
+            selectedValue.value = undefined
+            onChange()
+        }
+    }
+})
 
 const onReset = () => {
     if (!loading.value) {
-        selectedValue.value = undefined
         run()
     }
 }

+ 10 - 3
src/packages/pc/components/modules/select-goods/index.vue

@@ -32,13 +32,19 @@ const selectedValue = computed({
 })
 
 const { dataList, loading, run } = useRequest(queryGoodsSelect, {
-    params: props.params
+    manual: true,
+    params: props.params,
+    onSuccess: (res) => {
+        if (!res.data.some((e) => e.goodsId.toString() === selectedValue.value?.toString())) {
+            selectedValue.value = undefined
+            onChange()
+        }
+    }
 })
 
 const onReset = () => {
     if (!loading.value) {
-        selectedValue.value = undefined
-        run()
+        run(props.params)
     }
 }
 
@@ -46,6 +52,7 @@ const remoteMethod = (query: string) => {
     if (!loading.value) {
         if (query) {
             run({
+                ...props.params,
                 searchCode: query
             })
         } else if (!dataList.value.length) {

+ 15 - 4
src/packages/pc/components/modules/select-institution/index.vue

@@ -33,13 +33,23 @@ const selectedValue = computed({
 })
 
 const { dataList, loading, run } = useRequest(queryExchSonOrgin, {
-    params: props.params
+    manual: true,
+    params: props.params,
+    onSuccess: (res) => {
+        if (!res.data.some((e) => e.userid.toString() === selectedValue.value?.toString())) {
+            selectedValue.value = undefined
+            onChange()
+        }
+    }
 })
 
-const onReset = () => {
+const onReset = (userid?: number) => {
     if (!loading.value) {
-        selectedValue.value = undefined
-        run()
+        selectedValue.value = userid
+        run({
+            ...props.params,
+            userid
+        })
     }
 }
 
@@ -47,6 +57,7 @@ const remoteMethod = (query: string) => {
     if (!loading.value) {
         if (query) {
             run({
+                ...props.params,
                 searchcode: query
             })
         } else if (!dataList.value.length) {

+ 10 - 3
src/packages/pc/components/modules/select-investor/index.vue

@@ -33,13 +33,19 @@ const selectedValue = computed({
 })
 
 const { dataList, loading, run } = useRequest(queryInvestorSelect, {
-    params: props.params
+    manual: true,
+    params: props.params,
+    onSuccess: (res) => {
+        if (!res.data.some((e) => e.userId.toString() === selectedValue.value?.toString())) {
+            selectedValue.value = undefined
+            onChange()
+        }
+    }
 })
 
 const onReset = () => {
     if (!loading.value) {
-        selectedValue.value = undefined
-        run()
+        run(props.params)
     }
 }
 
@@ -47,6 +53,7 @@ const remoteMethod = (query: string) => {
     if (!loading.value) {
         if (query) {
             run({
+                ...props.params,
                 searchName: query
             })
         } else if (!dataList.value.length) {

+ 34 - 15
src/packages/pc/components/modules/select-member/index.vue

@@ -12,7 +12,7 @@
 </template>
 
 <script lang="ts" setup>
-import { computed, toRaw, PropType } from 'vue'
+import { computed, toRaw, PropType, nextTick } from 'vue'
 import { useRequest } from '@/hooks/request'
 import { queryOrganSelect } from '@/services/api/common'
 import AppRemoteSelect from '@pc/components/base/remote-select/index.vue'
@@ -33,30 +33,49 @@ const selectedValue = computed({
 })
 
 const { dataList, loading, run } = useRequest(queryOrganSelect, {
-    params: props.params
+    manual: true,
+    params: props.params,
+    onSuccess: (res) => {
+        if (!res.data.some((e) => e.userid.toString() === selectedValue.value?.toString())) {
+            selectedValue.value = undefined
+            onChange()
+        }
+    }
 })
 
-const onReset = () => {
-    if (!loading.value) {
-        selectedValue.value = undefined
-        run()
-    }
+const onReset = (userid?: number) => {
+    nextTick(() => {
+        if (!loading.value) {
+            selectedValue.value = userid
+            run({
+                ...props.params,
+                userid
+            })
+        }
+    })
 }
 
 const remoteMethod = (query: string) => {
-    if (!loading.value) {
-        if (query) {
-            run({
-                searchcode: query
-            })
-        } else if (!dataList.value.length) {
-            onReset()
+    nextTick(() => {
+        if (!loading.value) {
+            if (query) {
+                run({
+                    ...props.params,
+                    searchcode: query
+                })
+            } else if (!dataList.value.length) {
+                onReset()
+            }
         }
-    }
+    })
 }
 
 const onChange = (value?: number) => {
     const item = dataList.value.find((e) => e.userid === value)
     emit('change', toRaw(item))
 }
+
+defineExpose({
+    onReset
+})
 </script>

+ 4 - 1
src/packages/pc/views/investor/custom/group/components/edit/index.vue

@@ -7,7 +7,7 @@
                 <legend class="g-fieldset__legend">{{ t('investor.custom.group.edit.subtitle1') }}</legend>
                 <el-form-item :label="t('investor.custom.group.edit.areauserid')" prop="areauserid"
                     v-if="userStore.userInfo.releType !== 2">
-                    <app-select-member v-model="formData.areauserid" :params="{ usertype: '2' }"
+                    <app-select-member ref="areauseridRef" v-model="formData.areauserid" :params="{ usertype: '2' }"
                         :placeholder="t('investor.custom.group.edit.tips1')" />
                 </el-form-item>
                 <el-form-item :label="t('investor.custom.group.edit.groupname')" prop="groupname">
@@ -61,6 +61,8 @@ const refresh = ref(false)
 const loading = ref(false)
 const configs = reactive<Model.RiskRatioTypeForMarketerRsp[]>([])
 
+const areauseridRef = ref() // 经纪会员组件实例
+
 const formData = ref<Model.AddPersonalizedReq>({
     groupname: ''
 })
@@ -139,6 +141,7 @@ onMounted(() => {
             customertype: record.customertype,
             groupname: record.groupname,
         }
+        areauseridRef.value.onReset(record.areauserid)
     }
 })
 </script>

+ 4 - 1
src/packages/pc/views/investor/custom/riskcfg/components/edit/index.vue

@@ -6,7 +6,7 @@
             <fieldset class="g-fieldset el-form--horizontal">
                 <legend class="g-fieldset__legend">{{ t('investor.custom.riskcfg.edit.subtitle1') }}</legend>
                 <el-form-item label="交易商" prop="userid">
-                    <app-select-member v-model="formData.userid" :params="{ usertype: '5' }"
+                    <app-select-member ref="useridRef" v-model="formData.userid" :params="{ usertype: '5' }"
                         :placeholder="t('investor.custom.riskcfg.edit.tips1')" :disabled="!!record"
                         @change="onMemberChange" />
                 </el-form-item>
@@ -65,6 +65,8 @@ const refresh = ref(false)
 const loading = ref(false)
 const configs = reactive<Model.RiskRatioTypeForMarketerRsp[]>([])
 
+const useridRef = ref() // 交易商组件实例
+
 const formData = ref<Model.AddAccountRiskConfigReq>({})
 
 // 选中的风险率配置
@@ -151,6 +153,7 @@ onMounted(() => {
             customertype: record.customertype,
             userid: record.userid
         }
+        useridRef.value.onReset(record.userid)
     }
 })
 </script>

+ 12 - 8
src/packages/pc/views/investor/manage/transfer/components/edit/index.vue

@@ -34,10 +34,11 @@
                 </template>
                 <template v-else>
                     <el-form-item label="转出所属会员" prop="outmemberuserid">
-                        <app-select-member v-model="formData.outmemberuserid" :params="{ usertype: '2', roles: '7' }" />
+                        <app-select-member v-model="formData.outmemberuserid" :params="{ usertype: '2', roles: '7' }"
+                            @change="outParentUserRef.onReset()" />
                     </el-form-item>
                     <el-form-item label="转出所属机构" prop="outparentuserid">
-                        <app-select-member v-model="formData.outparentuserid"
+                        <app-select-member ref="outParentUserRef" v-model="formData.outparentuserid"
                             :params="{ usertype: '3', parentuserid: formData.outmemberuserid }"
                             :disabled="!formData.outmemberuserid" />
                     </el-form-item>
@@ -50,7 +51,7 @@
                         @change="selectInUser" />
                 </el-form-item>
                 <el-form-item label="转入所属机构" prop="inuserid">
-                    <app-select-member v-model="formData.inuserid"
+                    <app-select-member ref="inUserRef" v-model="formData.inuserid"
                         :params="{ usertype: '3', parentuserid: formData.inmemberuserid }"
                         :disabled="!formData.inmemberuserid" @change="selectInUser" />
                 </el-form-item>
@@ -96,6 +97,9 @@ const show = shallowRef(true)
 const refresh = shallowRef(false)
 const loading = shallowRef(false)
 
+const outParentUserRef = shallowRef() // 转出所属会员组件实例
+const inUserRef = shallowRef() // 转入所属机构组件实例
+
 const accountInfo = shallowRef<Model.UserAccountDetailRsp>()
 const outUserInfo = shallowRef<Model.UserinfoByUserIdRsp>()
 const inUserInfo = shallowRef<Model.UserinfoByUserIdRsp>()
@@ -147,17 +151,17 @@ const selectOutUser = (item?: Model.OrganSelectRsp) => {
 
 // 选择转入机构
 const selectInUser = (item?: Model.OrganSelectRsp) => {
-    if (item || formData.inmemberuserid) {
-        const userid = item?.userid || formData.inmemberuserid
-        if (item?.usertype === '2') {
-            formData.inuserid = undefined
-        }
+    const userid = item?.userid || formData.inmemberuserid
+    if (userid) {
         getUserInfoByUserId({ userid }).then((res) => {
             inUserInfo.value = res.data
         })
     } else {
         inUserInfo.value = undefined
     }
+    if (item?.usertype === '2' || !formData.inmemberuserid) {
+        inUserRef.value.onReset()
+    }
 }
 
 const onCancel = (isRefresh = false) => {

+ 22 - 2
src/packages/pc/views/investor/manage/transfer/index.vue

@@ -2,7 +2,26 @@
 <template>
     <app-view>
         <template #header>
-            <app-filter :option="filterOption" />
+            <app-filter :option="filterOption">
+                <!-- 转出交易商 -->
+                <template #outinvestor="{ item }">
+                    <el-form-item :label="item.label">
+                        <app-select-member v-model="item.value" :params="{ usertype: '5' }" />
+                    </el-form-item>
+                </template>
+                <!-- 转出方 -->
+                <template #outmemberuserid="{ item }">
+                    <el-form-item :label="item.label">
+                        <app-select-member v-model="item.value" :params="{ usertype: '2,3,4' }" />
+                    </el-form-item>
+                </template>
+                <!-- 转入方 -->
+                <template #inuserid="{ item }">
+                    <el-form-item :label="item.label">
+                        <app-select-member v-model="item.value" :params="{ usertype: '2,3,4' }" />
+                    </el-form-item>
+                </template>
+            </app-filter>
         </template>
         <app-table :data="dataList" :columns="tableColumns" :loading="loading">
             <template #headerLeft>
@@ -37,6 +56,7 @@ import AppTable from '@pc/components/base/table/index.vue'
 import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
 import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppOperation from '@pc/components/base/operation/index.vue'
+import AppSelectMember from '@pc/components/modules/select-member/index.vue'
 import { i18n } from '@/stores'
 
 const { global: { t } } = i18n
@@ -67,7 +87,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'outparentusername', label: '转出所属机构' },
     { field: 'outinvestorname', label: '转出交易商' },
     { field: 'inmemberusername', label: '转入所属会员' },
-    { field: 'inuseridname', label: '转入所属机构'},
+    { field: 'inuseridname', label: '转入所属机构' },
     { field: 'transferstatus', label: '转移状态', formatValue: (val) => transferstatusEnum.getEnumTypeName(val) },
     { field: 'createtime', label: '申请时间', formatValue: (val) => formatDate(val) },
     { field: 'operate', label: 'common.operate', width: 200, fixed: 'right' }

+ 6 - 3
src/packages/pc/views/investor/manage/user/components/edit/index.vue

@@ -17,8 +17,8 @@
                     {{ formData.userAccountDetailVo.memberUserName }}
                 </el-form-item>
                 <el-form-item :label="t('investor.manage.user.edit.parentuserid')" prop="parentuserid">
-                    <app-select-member v-model="formData.userAccountDetailVo.parentuserid" :params="{ usertype: '3' }"
-                        :placeholder="t('investor.manage.user.edit.tips2')" />
+                    <app-select-member ref="parentuseridRef" v-model="formData.userAccountDetailVo.parentuserid"
+                        :params="{ usertype: '2,3' }" :placeholder="t('investor.manage.user.edit.tips2')" />
                 </el-form-item>
                 <el-form-item :label="t('investor.manage.user.edit.refereeUserName')" prop="refereeUserName">
                     {{ handleNoneValue(formData.userAccountDetailVo.refereeUserName) }}
@@ -173,6 +173,8 @@ const formRef = ref<FormInstance>()
 const show = ref(true)
 const refresh = ref(false)
 
+const parentuseridRef = ref() // 所属机构组件实例
+
 const uploadFiles = reactive<{
     cardFrontPhotoUrl: UploadUserFile[];
     cardBackPhotoUrl: UploadUserFile[];
@@ -215,7 +217,7 @@ const getUploadFiles = (value?: string) => {
 const { loading, run } = useRequest(queryInvestorListDetail, {
     manual: true,
     onSuccess: ((res) => {
-        const { userinfoDetailVo } = res.data.oldResult
+        const { userinfoDetailVo, userAccountDetailVo } = res.data.oldResult
 
         userinfoDetailVo.cardNum = decryptAES(userinfoDetailVo.cardNum)
         userinfoDetailVo.mobile = decryptAES(userinfoDetailVo.mobile)
@@ -230,6 +232,7 @@ const { loading, run } = useRequest(queryInvestorListDetail, {
         uploadFiles.otherUrl = getUploadFiles(userinfoDetailVo.otherUrl)
 
         formData.value = res.data.oldResult
+        parentuseridRef.value.onReset(userAccountDetailVo.parentuserid)
     }),
     onError: (err) => {
         ElMessage.error(err)

+ 42 - 15
src/packages/pc/views/investor/user/open/components/edit/index.vue

@@ -4,19 +4,21 @@
         :loading="loading">
         <el-form ref="formRef" class="el-form--horizontal" label-width="140px" :model="formData" :rules="formRules"
             :show-message="false">
-            <!-- <el-form-item :label="t('investor.user.open.edit.memberareaid')" prop="memberareaid">
-                <el-input v-model="formData.memberareaid" maxlength="50" :placeholder="t('common.pleaseenter')" />
-            </el-form-item> -->
+            <el-form-item :label="t('investor.user.open.edit.memberareaid')" prop="memberareaid"
+                v-if="userStore.userInfo.releType === 1">
+                <app-select-member ref="memberareaidRef" v-model="formData.memberareaid" :params="{ usertype: '2', roles: '7' }"
+                    :placeholder="t('investor.user.open.edit.tips1')" @change="selectMemberareaid" />
+            </el-form-item>
             <el-form-item :label="t('investor.user.open.edit.areaid')" prop="areaid">
-                <app-select-member v-model="formData.areaid" :params="{ usertype: '3' }"
-                    :placeholder="t('investor.user.open.edit.tips1')" />
+                <app-select-member ref="areaidRef" v-model="formData.areaid" :params="{ usertype: '3', parentuserid }"
+                    :placeholder="t('investor.user.open.edit.tips1')" @change="selectAreaid" />
             </el-form-item>
             <el-form-item :label="t('investor.user.open.edit.brokerid')" prop="brokerid">
-                <app-select-member v-model="formData.brokerid" :params="{ usertype: '4' }"
-                    :placeholder="t('investor.user.open.edit.tips1')" />
+                <app-select-member ref="brokeridRef" v-model="formData.brokerid"
+                    :params="{ usertype: '4', parentuseridfirst }" :placeholder="t('investor.user.open.edit.tips1')" />
             </el-form-item>
             <el-form-item :label="t('investor.user.open.edit.referral')" prop="referral">
-                <app-select-investor v-model="formData.referral" :placeholder="t('investor.user.open.edit.tips1')" />
+                <app-select-investor ref="referralRef" v-model="formData.referral" :placeholder="t('investor.user.open.edit.tips1')" />
             </el-form-item>
             <el-form-item class="el-form-item--row" :label="t('investor.user.open.edit.userinfotype')"
                 prop="userinfotype">
@@ -142,9 +144,11 @@
 <script lang="ts" setup>
 import { ref, reactive, PropType, onMounted, computed } from 'vue'
 import { ElMessage, FormInstance, FormRules, UploadUserFile } from 'element-plus'
+import { decryptAES } from '@/services/crypto'
 import { useRequest } from '@/hooks/request'
 import { dealSunOrgan, queryInvestorDetail } from '@/services/api/investor'
 import { getUserInfoTypeList, getGenderList, UserInfoType, Gender } from '@/constants/member'
+import { i18n, useUserStore } from '@/stores'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 import AppUpload from '@pc/components/base/upload/index.vue'
 import AppEnum from '@pc/components/modules/enum/index.vue'
@@ -152,8 +156,6 @@ import AppRegion from '@pc/components/modules/region/index.vue'
 import AppSelectMember from '@pc/components/modules/select-member/index.vue'
 import AppSelectInvestor from '@pc/components/modules/select-investor/index.vue'
 import service from '@/services'
-import { decryptAES } from '@/services/crypto'
-import { i18n } from '@/stores'
 
 const props = defineProps({
     record: {
@@ -162,10 +164,21 @@ const props = defineProps({
 })
 
 const { global: { t } } = i18n
+const userStore = useUserStore()
 const formRef = ref<FormInstance>()
 const show = ref(true)
 const refresh = ref(false)
 
+const memberareaidRef = ref() // 所属会员组件实例
+const areaidRef = ref() // 所属机构组件实例
+const brokeridRef = ref() // 经纪人组件实例
+const referralRef = ref() // 推荐人组件实例
+
+const formData = ref<Partial<Model.MemberDetail>>({
+    userinfotype: UserInfoType.Personal,
+    sex: Gender.Male
+})
+
 const uploadFiles = reactive<{
     cardfrontphotourl: UploadUserFile[];
     cardbackphotourl: UploadUserFile[];
@@ -180,15 +193,13 @@ const uploadFiles = reactive<{
     otherurl: []
 })
 
+const parentuserid = computed(() => formData.value.memberareaid || userStore.userInfo.areauserid)
+
+const parentuseridfirst = computed(() => formData.value.areaid || userStore.userInfo.areauserid)
 
 // 是否个人
 const isPerson = computed(() => formData.value.userinfotype === UserInfoType.Personal)
 
-const formData = ref<Partial<Model.MemberDetail>>({
-    userinfotype: UserInfoType.Personal,
-    sex: Gender.Male
-})
-
 const getUploadFiles = (value?: string) => {
     const paths = value ? value.split(',') : []
     return paths.map((url) => {
@@ -219,6 +230,11 @@ const { loading, run } = useRequest(queryInvestorDetail, {
         uploadFiles.legalcardfrontphotourl = getUploadFiles(res.data.legalcardfrontphotourl)
         uploadFiles.legalcardbackphotourl = getUploadFiles(res.data.legalcardbackphotourl)
         uploadFiles.otherurl = getUploadFiles(res.data.otherurl)
+
+        memberareaidRef.value.onReset(res.data.memberareaid)
+        areaidRef.value.onReset(res.data.areaid)
+        brokeridRef.value.onReset(res.data.brokerid)
+        referralRef.value.onReset(res.data.referral)
     }),
     onError: (err) => {
         ElMessage.error(err)
@@ -287,6 +303,17 @@ const formRules: FormRules = {
     }],
 }
 
+// 选择所属会员
+const selectMemberareaid = () => {
+    areaidRef.value.onReset()
+    brokeridRef.value.onReset()
+}
+
+// 选择所属机构
+const selectAreaid = () => {
+    brokeridRef.value.onReset()
+}
+
 const onCancel = (isRefresh = false) => {
     show.value = false
     refresh.value = isRefresh

+ 4 - 1
src/packages/pc/views/member/institution/open/components/edit/index.vue

@@ -15,7 +15,7 @@
                     </el-radio-group>
                 </el-form-item>
                 <el-form-item :label="t('member.institution.open.edit.referral')" prop="referral">
-                    <app-select-member v-model="formData.referral" />
+                    <app-select-member ref="referralRef" v-model="formData.referral" />
                 </el-form-item>
             </fieldset>
             <fieldset class="g-fieldset el-form--horizontal">
@@ -135,6 +135,8 @@ const formRef = ref<FormInstance>()
 const show = ref(true)
 const refresh = ref(false)
 
+const referralRef = ref() // 推荐人组件实例
+
 const uploadFiles = reactive<{
     cardfrontphotourl: UploadUserFile[];
     cardbackphotourl: UploadUserFile[];
@@ -186,6 +188,7 @@ const { loading, run } = useRequest(queryWskhUserinfoDetail, {
         uploadFiles.legalcardbackphotourl = getUploadFiles(res.data.legalcardbackphotourl)
         uploadFiles.attachment1 = getUploadFiles(res.data.attachment1)
         uploadFiles.attachment2 = getUploadFiles(res.data.attachment2)
+        referralRef.value.onReset(res.data.referral)
     }),
     onError: (err) => {
         ElMessage.error(err)

+ 5 - 1
src/packages/pc/views/member/institution/user/components/edit/index.vue

@@ -18,7 +18,7 @@
                     {{ data ? usertype2Enum.getEnumTypeName(data.rspResult.usertype) : handleNoneValue() }}
                 </el-form-item>
                 <el-form-item label="推荐人" prop="refereeuserid">
-                    <app-select-member v-model="formData.refereeuserid" />
+                    <app-select-member ref="refereeuseridRef" v-model="formData.refereeuserid" />
                 </el-form-item>
             </fieldset>
             <fieldset class="g-fieldset el-form--horizontal">
@@ -153,6 +153,8 @@ const formRef = ref<FormInstance>()
 const show = ref(true)
 const refresh = ref(false)
 
+const refereeuseridRef = ref() // 推荐人组件实例
+
 const formData = ref<Partial<Model.EditOrganReq>>({})
 
 const uploadFiles = reactive<{
@@ -243,6 +245,8 @@ const { data, loading } = useRequest(queryOrganDetail, {
             usertype: userinfo.usertype,
             wechat: userinfo.wechat
         }
+
+        refereeuseridRef.value.onReset(rspResult.refereeuserid)
     }),
     onError: (err) => {
         ElMessage.error(err)

+ 8 - 2
src/packages/pc/views/member/subinstitution/manage/components/edit/index.vue

@@ -8,7 +8,7 @@
                 <el-form-item :label="t('member.subinstitution.manage.edit.referral')" prop="parentuserid"
                     v-if="!record">
                     <span v-if="selectedParent">{{ selectedParent.accountname }}</span>
-                    <app-select-institution v-model="formData.parentuserid"
+                    <app-select-institution ref="parentuseridRef" v-model="formData.parentuserid"
                         :params="{ usertype: '3', level: 5, roles: '7' }"
                         :placeholder="t('member.subinstitution.manage.edit.tips1')" v-else />
                 </el-form-item>
@@ -31,7 +31,7 @@
                     <el-input v-model="formData.accountname" maxlength="50" :placeholder="t('common.pleaseenter')" />
                 </el-form-item>
                 <el-form-item :label="t('member.subinstitution.manage.edit.refereeuserid')" prop="refereeuserid">
-                    <app-select-member v-model="formData.refereeuserid" :params="{ usertype: '2,3' }"
+                    <app-select-member ref="refereeuseridRef" v-model="formData.refereeuserid" :params="{ usertype: '2,3' }"
                         :placeholder="t('member.subinstitution.manage.edit.tips1')" />
                 </el-form-item>
             </fieldset>
@@ -203,6 +203,9 @@ const formRef = ref<FormInstance>()
 const show = ref(true)
 const refresh = ref(false)
 
+const parentuseridRef = ref() // 上级机构组件实例
+const refereeuseridRef = ref() // 推荐人组件实例
+
 const uploadFiles = reactive<{
     cardfrontphotourl: UploadUserFile[];
     cardbackphotourl: UploadUserFile[];
@@ -286,6 +289,9 @@ const { loading, run } = useRequest(organSonViewson, {
         uploadFiles.legalcardbackphotourl = getUploadFiles(userinfoDetailVo.legalCardBackPhotoUrl)
         uploadFiles.attachment1 = getUploadFiles(userinfoDetailVo.attachment1)
         uploadFiles.attachment2 = getUploadFiles(userinfoDetailVo.attachment2)
+
+        parentuseridRef.value?.onReset(userAccountDetailVo.parentuserid)
+        refereeuseridRef.value.onReset(userAccountDetailVo.refereeuserid)
     }),
     onError: (err) => {
         ElMessage.error(err)

+ 8 - 2
src/packages/pc/views/member/subinstitution/transfer/components/edit/select-level/index.vue

@@ -33,12 +33,18 @@ const selectedValue = computed({
 })
 
 const { dataList, loading, run } = useRequest(querySonOrganPageByLevel, {
-    params: props.params
+    manual: true,
+    params: props.params,
+    onSuccess: (res) => {
+        if (!res.data.some((e) => e.userid.toString() === selectedValue.value?.toString())) {
+            selectedValue.value = undefined
+            onChange()
+        }
+    }
 })
 
 const onReset = () => {
     if (!loading.value) {
-        selectedValue.value = undefined
         run()
     }
 }

+ 2 - 0
src/types/model/common.d.ts

@@ -5,6 +5,8 @@ declare namespace Model {
         usertype?: string;
         roles?: string;
         parentuserid?: number;
+        parentuseridfirst?: number;
+        userid?: number;
     }
 
     /** 机构下拉查询加载 会员、经纪人 响应 */

+ 2 - 0
src/types/model/user.d.ts

@@ -24,8 +24,10 @@ declare global {
 
         /** 用户查询 响应 */
         interface LoginInRsp {
+            areauserid: number;
             releType: number;
             orgztypes: string;
+            forcechangepass: string;
             logincode: string;
             username: string;
         }