diff --git a/pages/archive/edit-archive.vue b/pages/archive/edit-archive.vue index 89078dc..450ecfe 100644 --- a/pages/archive/edit-archive.vue +++ b/pages/archive/edit-archive.vue @@ -53,7 +53,6 @@ const formItems = ref([]); const loading = ref(false); const teamId = ref(''); const tempRef = ref(null); -const customerArchive = ref(null); const verifyVisible = ref(false); const visible = ref(false); @@ -161,7 +160,7 @@ async function addArchive() { } async function getResponsiblePerson() { - const res = await api('getResponsiblePerson', { corpId: corpId.value, teamId: teamId.value, corpUserId: corpUserId.value }); + const res = await api('getResponsiblePerson', { corpId: corpId.value, teamId: teamId.value, externalUserId: externalUserId.value, corpUserId: corpUserId.value }); return res && res.data ? res.data : '' } diff --git a/pages/home/customer-archive.vue b/pages/home/customer-archive.vue index c57749c..64be6b5 100644 --- a/pages/home/customer-archive.vue +++ b/pages/home/customer-archive.vue @@ -99,7 +99,8 @@ const props = defineProps({ const emit = defineEmits(["update:customers"]); let loading = false; -const { account } = storeToRefs(useAccount()); +const { account, externalUserId } = storeToRefs(useAccount()); +const { getExternalUserId } = useAccount() const current = ref(null); const customers = ref([]); @@ -205,8 +206,11 @@ async function getCustomers() { } async function getResponsiblePerson() { + if (!externalUserId.value) { + await getExternalUserId(props.corpId) + } const corpUserId = props.corpUserIds && props.corpUserIds[props.team.teamId] ? props.corpUserIds[props.team.teamId] : ""; - const res = await api('getResponsiblePerson', { corpId: props.corpId, teamId: props.team.teamId, corpUserId }); + const res = await api('getResponsiblePerson', { corpId: props.corpId, teamId: props.team.teamId, corpUserId, externalUserId: externalUserId.value }); return res && res.data ? res.data : '' }