| | |
| | | <template> |
| | | <view class="client-visit-detail"> |
| | | <PageHeader title="客户拜访详情" @back="goBack" /> |
| | | |
| | | <PageHeader title="客户拜访详情" |
| | | @back="goBack" /> |
| | | <!-- 内容容器 --> |
| | | <view class="content-container"> |
| | | <!-- 客户信息 --> |
| | |
| | | <text class="info-value">{{ form.contactPhone || '-' }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 拜访信息 --> |
| | | <view class="section"> |
| | | <view class="section-title">拜访信息</view> |
| | |
| | | <text class="info-label">拜访人</text> |
| | | <text class="info-value">{{ form.visitingPeople || '-' }}</text> |
| | | </view> |
| | | <view class="info-item" v-if="form.latitude && form.longitude"> |
| | | <view class="info-item" |
| | | v-if="form.latitude && form.longitude"> |
| | | <text class="info-label">经纬度</text> |
| | | <text class="info-value">{{ form.latitude }}, {{ form.longitude }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 备注信息 --> |
| | | <view class="section"> |
| | | <view class="section-title">备注信息</view> |
| | |
| | | |
| | | <script setup> |
| | | // 替换 toast 方法 |
| | | const showToast = (message) => { |
| | | const showToast = message => { |
| | | uni.showToast({ |
| | | title: message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | icon: "none", |
| | | }); |
| | | }; |
| | | |
| | | import { ref, onMounted } from 'vue' |
| | | import PageHeader from '@/components/PageHeader.vue' |
| | | import useUserStore from "@/store/modules/user" |
| | | import { ref, onMounted } from "vue"; |
| | | import PageHeader from "@/components/PageHeader.vue"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | |
| | | const userStore = useUserStore() |
| | | const userStore = useUserStore(); |
| | | |
| | | // 表单数据 |
| | | const form = ref({ |
| | | customerName: '', |
| | | contact: '', |
| | | contactPhone: '', |
| | | visitingPeople: '', |
| | | purposeVisit: '', |
| | | purposeDate: '', |
| | | visitAddress: '', |
| | | latitude: '', |
| | | longitude: '', |
| | | locationAddress: '', |
| | | remark: '' |
| | | }) |
| | | customerName: "", |
| | | contact: "", |
| | | contactPhone: "", |
| | | visitingPeople: "", |
| | | purposeVisit: "", |
| | | purposeDate: "", |
| | | visitAddress: "", |
| | | latitude: "", |
| | | longitude: "", |
| | | locationAddress: "", |
| | | remark: "", |
| | | }); |
| | | |
| | | // 返回上一页 |
| | | const goBack = () => { |
| | | // 返回时清除本地存储的ID |
| | | uni.removeStorageSync('clientVisit') |
| | | uni.navigateBack() |
| | | } |
| | | uni.removeStorageSync("clientVisit"); |
| | | uni.navigateBack(); |
| | | }; |
| | | |
| | | // 初始化页面数据 |
| | | const initPageData = () => { |
| | | // 从本地存储获取拜访记录详情 |
| | | const row = uni.getStorageSync('clientVisit') |
| | | const row = uni.getStorageSync("clientVisit"); |
| | | if (row) { |
| | | form.value = { ...row } |
| | | form.value = { ...row }; |
| | | } else { |
| | | showToast('暂无拜访记录数据') |
| | | showToast("暂无拜访记录数据"); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | initPageData() |
| | | }) |
| | | initPageData(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | @import '@/static/scss/form-common.scss'; |
| | | @import "@/static/scss/form-common.scss"; |
| | | |
| | | .client-visit-detail { |
| | | min-height: 100vh; |