fix: 问题修复
This commit is contained in:
parent
238d8159ed
commit
dbd91fb408
@ -147,8 +147,7 @@ function toHealthList() {
|
|||||||
if (canAuth.value) {
|
if (canAuth.value) {
|
||||||
toast("请先授权本服务团队");
|
toast("请先授权本服务团队");
|
||||||
} else {
|
} else {
|
||||||
const name = `${current.value.name} ${current.value.relationship ? `(${current.value.relationship})` : ""
|
const name = `${current.value.name} ${current.value.relationship || ""}`;
|
||||||
}`;
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/health/list?teamId=${props.team.teamId}&corpId=${props.corpId
|
url: `/pages/health/list?teamId=${props.team.teamId}&corpId=${props.corpId
|
||||||
}&id=${current.value._id}&name=${encodeURIComponent(name)}`,
|
}&id=${current.value._id}&name=${encodeURIComponent(name)}`,
|
||||||
@ -169,10 +168,12 @@ function toManagePage() {
|
|||||||
|
|
||||||
async function auth() {
|
async function auth() {
|
||||||
await confirm(`是否授权${props.team.name}提供服务`);
|
await confirm(`是否授权${props.team.name}提供服务`);
|
||||||
|
const corpUserId = await getResponsiblePerson();
|
||||||
const res = await api("authCustomerToTeam", {
|
const res = await api("authCustomerToTeam", {
|
||||||
corpId: props.corpId,
|
corpId: props.corpId,
|
||||||
teamId: props.team.teamId,
|
teamId: props.team.teamId,
|
||||||
id: current.value._id,
|
id: current.value._id,
|
||||||
|
corpUserId
|
||||||
});
|
});
|
||||||
if (res && res.success) {
|
if (res && res.success) {
|
||||||
await toast("授权成功");
|
await toast("授权成功");
|
||||||
@ -203,6 +204,12 @@ async function getCustomers() {
|
|||||||
loading = false
|
loading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getResponsiblePerson() {
|
||||||
|
const corpUserId = props.corpUserIds && props.corpUserIds[props.team.teamId] ? props.corpUserIds[props.team.teamId] : "";
|
||||||
|
const res = await api('getResponsiblePerson', { corpId: props.corpId, externalUserId: externalUserId.value, teamId: props.team.teamId, corpUserId });
|
||||||
|
return res && res.data ? res.data : ''
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
uni.$on("reloadTeamCustomers", getCustomers);
|
uni.$on("reloadTeamCustomers", getCustomers);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -57,7 +57,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="list.length === 1"
|
<view v-if="list.length === 1"
|
||||||
class="flex-shrink-0 mx-10 my-3 h-10 leading-10 text-white text-center rounded-3xl bg-primary" @click="submit()">
|
class="flex-shrink-0 mx-10 py-12 leading-normal text-white text-center rounded bg-primary" @click="submit()">
|
||||||
提交
|
提交
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user