访客邀约修改

This commit is contained in:
weiwei committed 2025-08-02 10:34:14 +08:00
1 parent 659820d000
commit 4c7aae4e6a
1 file changed
+19 -19
@@ -54,7 +54,7 @@
</template>
<view class="flex-col justify-center card p-3 m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i">
<view class="flex justify-between items-center">
<view v-if="v.checkStatus == '1'" class="p-1 c-white! sub-text-26 rounded-1 bg-#f5a623">待审核</view>
<view v-if="v.checkStatus == '1'" class="p-1 c-white! sub-text-26 rounded-1 bg-#f5a623">待接受</view>
<view v-if="v.checkStatus == '2'" class="p-1 c-white! sub-text-26 rounded-1 bg-#2db7f5">待到访</view>
<view v-if="v.checkStatus == '3'" class="p-1 c-white! sub-text-26 rounded-1 bg-#52c41a">已拒绝</view>
<view v-if="v.checkStatus == '5'" class="p-1 c-white! sub-text-26 rounded-1 bg-#f5222d">已取消</view>
@@ -66,11 +66,11 @@
<view class="second-text-28 ml-2">{{ v.mobile }}</view>
</view>
<view class="flex justify-center sub-text-28 font-italic whitespace-nowrap my-2">
<span>拜访原因:{{ visitorReasonList.find((item) => item.id == v.reasonValue)?.title || "" }}</span>
<span v-if="v.reasonValue">拜访原因:{{ visitorReasonList.find((item) => item.id == v.reasonValue)?.title || "" }}</span>
</view>
<view class="flex justify-end second-text-28 whitespace-nowrap">
<!-- <view class="flex justify-end second-text-28 whitespace-nowrap">
<span v-if="state.params.type == 1">接待人:{{ v.userName }}</span>
</view>
</view> -->
</view>
<view class="flex justify-end items-center gap-2">
<!-- <view v-if="v.checkStatus == 1" class="flex items-center gap-2">
@@ -81,7 +81,7 @@
<template v-slot:trigger><tm-button class="px-1" size="s" color="danger">审核拒绝</tm-button></template>
</tm-modal>
</view> -->
<tm-button class="px-1" size="s" color="success" @click.stop="goDetail(v)">查看详情</tm-button>
<tm-button v-if="v.checkStatus == '2'" class="px-1" size="s" color="success" @click.stop="goDetail(v)">查看详情</tm-button>
</view>
</view>
</z-paging>
@@ -110,7 +110,7 @@ import { invitationApi } from "@/sheep/api"
const tabs = [
{ value: "", name: "全部", disabled: false },
{ value: "1", name: "待审核", disabled: false },
{ value: "1", name: "待接受", disabled: false },
{ value: "2", name: "待到访", disabled: false },
{ value: "3", name: "已拒绝", disabled: false },
{ value: "5", name: "已取消", disabled: false },
@@ -167,19 +167,19 @@ const query = (page: number, pagesize: number) => {
// }
// 审核通过/拒绝
const visitorCheck = async (id: string, checkStatus: number | string) => {
try {
const { code, msg } = await invitationApi.updateCheckStatus({ id, checkStatus })
if (code == 0) {
uni.showToast({ title: "操作成功", icon: "success" })
pageRef.value.reload(false)
return
}
uni.showToast({ title: msg, icon: "error" })
} catch (error: any) {
uni.showToast({ title: error.message, icon: "error" })
}
}
// const visitorCheck = async (id: string, checkStatus: number | string) => {
// try {
// const { code, msg } = await invitationApi.updateCheckStatus({ id, checkStatus })
// if (code == 0) {
// uni.showToast({ title: "操作成功", icon: "success" })
// pageRef.value.reload(false)
// return
// }
// uni.showToast({ title: msg, icon: "error" })
// } catch (error: any) {
// uni.showToast({ title: error.message, icon: "error" })
// }
// }
// 查看详情
const goDetail = (v: any) => {