fix: 问题修复
This commit is contained in:
parent
4cc1e6853f
commit
f4e2f87b6e
@ -3,12 +3,7 @@
|
|||||||
<view class="consult-title">咨询互动</view>
|
<view class="consult-title">咨询互动</view>
|
||||||
|
|
||||||
<view class="consult-grid">
|
<view class="consult-grid">
|
||||||
<view
|
<view class="consult-item" v-for="item in consultItems" :key="item.id" @click="handleItemClick(item)">
|
||||||
class="consult-item"
|
|
||||||
v-for="item in consultItems"
|
|
||||||
:key="item.id"
|
|
||||||
@click="handleItemClick(item)"
|
|
||||||
>
|
|
||||||
<view class="item-icon">
|
<view class="item-icon">
|
||||||
<image :src="item.icon" class="icon-img" mode="aspectFill" />
|
<image :src="item.icon" class="icon-img" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
@ -17,14 +12,8 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 选择咨询人弹窗 -->
|
<!-- 选择咨询人弹窗 -->
|
||||||
<select-consultant-popup
|
<select-consultant-popup ref="consultantPopup" :customers="customers" :corpId="corpId" :teamId="teamId"
|
||||||
ref="consultantPopup"
|
@confirm="handleConsultantConfirm" @addNew="handleAddNewArchive" />
|
||||||
:customers="customers"
|
|
||||||
:corpId="corpId"
|
|
||||||
:teamId="teamId"
|
|
||||||
@confirm="handleConsultantConfirm"
|
|
||||||
@addNew="handleAddNewArchive"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -41,6 +30,10 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
team: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
teamId: {
|
teamId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
@ -84,6 +77,10 @@ const consultItems = ref([
|
|||||||
function handleItemClick(item) {
|
function handleItemClick(item) {
|
||||||
// 聊天咨询需要选择咨询人
|
// 聊天咨询需要选择咨询人
|
||||||
if (item.needSelectConsultant) {
|
if (item.needSelectConsultant) {
|
||||||
|
if (!props.team || !props.team.creator) {
|
||||||
|
return toast('该团队暂未开放咨询服务')
|
||||||
|
}
|
||||||
|
|
||||||
if (!props.customers || props.customers.length === 0) {
|
if (!props.customers || props.customers.length === 0) {
|
||||||
toast("请先添加档案");
|
toast("请先添加档案");
|
||||||
// 跳转到档案管理页面
|
// 跳转到档案管理页面
|
||||||
@ -121,7 +118,7 @@ async function handleConsultantConfirm(customer) {
|
|||||||
const res = await api("createConsultGroup", {
|
const res = await api("createConsultGroup", {
|
||||||
teamId: props.teamId,
|
teamId: props.teamId,
|
||||||
corpId: props.corpId,
|
corpId: props.corpId,
|
||||||
customerId: customer._id,
|
customerId: customer._id,
|
||||||
customerImUserId: account.value.openid,
|
customerImUserId: account.value.openid,
|
||||||
});
|
});
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|||||||
@ -170,7 +170,6 @@ const baseInfo = computed(() =>
|
|||||||
);
|
);
|
||||||
const baseInfoError = computed(() => {
|
const baseInfoError = computed(() => {
|
||||||
const requiredTitles = baseInfo.value
|
const requiredTitles = baseInfo.value
|
||||||
.filter((i) => i.required)
|
|
||||||
.map((i) => i.title);
|
.map((i) => i.title);
|
||||||
return current.value && requiredTitles.some((i) => !current.value[i]);
|
return current.value && requiredTitles.some((i) => !current.value[i]);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
<customer-archive :corpId="corpId" :team="team" @update:customers="handleCustomersUpdate" />
|
<customer-archive :corpId="corpId" :team="team" @update:customers="handleCustomersUpdate" />
|
||||||
</view>
|
</view>
|
||||||
<view class="home-section">
|
<view class="home-section">
|
||||||
<consult :corpId="corpId" :teamId="team.teamId" :customers="customers" />
|
<consult :corpId="corpId" :teamId="team.teamId" :team="team" :customers="customers" />
|
||||||
</view>
|
</view>
|
||||||
<view class="home-section">
|
<view class="home-section">
|
||||||
<team-mate :team="team" />
|
<team-mate :team="team" />
|
||||||
|
|||||||
@ -36,8 +36,8 @@
|
|||||||
<image class="flex-shrink-0 mr-10 section-icon" src="/static/homepage/out-phone.svg"></image>
|
<image class="flex-shrink-0 mr-10 section-icon" src="/static/homepage/out-phone.svg"></image>
|
||||||
<view class="w-0 flex-grow text-lg font-semibold">对外联系电话</view>
|
<view class="w-0 flex-grow text-lg font-semibold">对外联系电话</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-10 text-dark" :class="member.callNumber ? 'text-primary' : 'text-gray'" @click="callNumber()">
|
<view class="mt-10 text-dark" :class="member.externalContact ? 'text-primary' : 'text-gray'" @click="callNumber()">
|
||||||
{{ member.callNumber || '暂无联系电话' }}
|
{{ member.externalContact || '暂无联系电话' }}
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-20 flex items-center">
|
<view class="mt-20 flex items-center">
|
||||||
<image class="flex-shrink-0 mr-10 section-icon" src="/static/homepage/sunshine-home.svg"></image>
|
<image class="flex-shrink-0 mr-10 section-icon" src="/static/homepage/sunshine-home.svg"></image>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user