|
@@ -1,5 +1,8 @@
|
|
<template>
|
|
<template>
|
|
<Page title="访客计划详情">
|
|
<Page title="访客计划详情">
|
|
|
|
+ <template v-slot:headerRight>
|
|
|
|
+ <div class="themeTextColor" v-if="detailedData.finishState == 0" @click="visitorEditor">编辑</div>
|
|
|
|
+ </template>
|
|
<template v-slot:body>
|
|
<template v-slot:body>
|
|
<!-- 头部 -->
|
|
<!-- 头部 -->
|
|
<div class="planDetailsHead">
|
|
<div class="planDetailsHead">
|
|
@@ -14,7 +17,8 @@
|
|
<div class="w-full flex items-center">
|
|
<div class="w-full flex items-center">
|
|
<van-icon name="user-circle-o" class="text-size-in mr-2" />
|
|
<van-icon name="user-circle-o" class="text-size-in mr-2" />
|
|
客户:
|
|
客户:
|
|
- <div class="ml-2 themeTextColor decoration-auto underline">{{ detailedData.customName }}</div>
|
|
|
|
|
|
+ <div class="ml-2 themeTextColor decoration-auto underline" @click="jumpToCustomerDetails()">{{
|
|
|
|
+ detailedData.customName }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -71,19 +75,14 @@
|
|
<van-date-picker v-model="showDatePickerVal" @confirm="showPickerConfirm" @cancel="showDatePicker = false" />
|
|
<van-date-picker v-model="showDatePickerVal" @confirm="showPickerConfirm" @cancel="showDatePicker = false" />
|
|
</van-popup>
|
|
</van-popup>
|
|
|
|
|
|
- <van-popup
|
|
|
|
- v-model:show="timeShowPicker"
|
|
|
|
- destroy-on-close
|
|
|
|
- position="bottom"
|
|
|
|
- :style="{ height: '50%' }"
|
|
|
|
- >
|
|
|
|
|
|
+ <van-popup v-model:show="timeShowPicker" destroy-on-close position="bottom" :style="{ height: '50%' }">
|
|
<van-time-picker v-model="currentTime" title="选择时间" @confirm="timeConfirm" />
|
|
<van-time-picker v-model="currentTime" title="选择时间" @confirm="timeConfirm" />
|
|
</van-popup>
|
|
</van-popup>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<template v-slot:footer v-if="detailedData.finishState == 0">
|
|
<template v-slot:footer v-if="detailedData.finishState == 0">
|
|
<div class="w-full flex justify-between layout">
|
|
<div class="w-full flex justify-between layout">
|
|
- <div class="footerBtnLeft layouts" @click="showContacts = true">
|
|
|
|
|
|
+ <div class="footerBtnLeft layouts" @click="showContactsCli()">
|
|
<div class="imgClss"></div>
|
|
<div class="imgClss"></div>
|
|
联系人
|
|
联系人
|
|
</div>
|
|
</div>
|
|
@@ -105,11 +104,12 @@
|
|
import { ref } from "vue";
|
|
import { ref } from "vue";
|
|
import { showConfirmDialog } from 'vant';
|
|
import { showConfirmDialog } from 'vant';
|
|
import { useLifecycle } from "@hooks/useCommon.js";
|
|
import { useLifecycle } from "@hooks/useCommon.js";
|
|
-import { OBTAIN_DETAILS_OF_THE_VISIT_PLAN, POSTPONE_THE_VISIT_PLAN, COMPLETE_THE_VISIT_PLAN } from "@hooks/useApi"
|
|
|
|
|
|
+import { OBTAIN_DETAILS_OF_THE_VISIT_PLAN, POSTPONE_THE_VISIT_PLAN, COMPLETE_THE_VISIT_PLAN, OBTAIN_CUSTOMER_DETAILS } from "@hooks/useApi"
|
|
import useToast from "@hooks/useToast"
|
|
import useToast from "@hooks/useToast"
|
|
import requests from "@common/requests";
|
|
import requests from "@common/requests";
|
|
import useRouterStore from "@store/useRouterStore.js";
|
|
import useRouterStore from "@store/useRouterStore.js";
|
|
import dayjs from "dayjs";
|
|
import dayjs from "dayjs";
|
|
|
|
+import { routingInfos } from "@utility/generalVariables.js";
|
|
import useFixedData from "@store/useFixedData.js";
|
|
import useFixedData from "@store/useFixedData.js";
|
|
import PullDownSelector from "@components/common/pullDownSelector.vue";
|
|
import PullDownSelector from "@components/common/pullDownSelector.vue";
|
|
|
|
|
|
@@ -125,6 +125,41 @@ const showDelayData = ref('')
|
|
const currentTime = ref('')
|
|
const currentTime = ref('')
|
|
const contactList = ref([]);
|
|
const contactList = ref([]);
|
|
|
|
|
|
|
|
+function visitorEditor() {
|
|
|
|
+ router.navigateTo({
|
|
|
|
+ pathName: 'addEditorVisitor',
|
|
|
|
+ success: () => {
|
|
|
|
+ router.emit('addEditorVisitorParameter', {
|
|
|
|
+ row: JSON.stringify(detailedData.value || {}),
|
|
|
|
+ date: JSON.stringify(detailedData.value.visitTime || {})
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function jumpToCustomerDetails() {
|
|
|
|
+ const routerInfo = routingInfos['customer']
|
|
|
|
+ requests.post(OBTAIN_CUSTOMER_DETAILS, { id: detailedData.value.customId }).then(res => {
|
|
|
|
+ router.navigateTo({
|
|
|
|
+ pathName: 'details',
|
|
|
|
+ success: () => {
|
|
|
|
+ router.emit('detailParameter', {
|
|
|
|
+ routerInfo: JSON.stringify(routerInfo || {}),
|
|
|
|
+ parameter: JSON.stringify(res.data || {})
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function showContactsCli() {
|
|
|
|
+ if(!((contactList.value || []).length)) {
|
|
|
|
+ toastText('该联系人无号码')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ showContacts.value = true
|
|
|
|
+}
|
|
|
|
+
|
|
function completeThePlan() {
|
|
function completeThePlan() {
|
|
showConfirmDialog({
|
|
showConfirmDialog({
|
|
title: `完成访客计划`,
|
|
title: `完成访客计划`,
|
|
@@ -141,6 +176,7 @@ function delayTimeEvent() {
|
|
requests.post(POSTPONE_THE_VISIT_PLAN, { planId: detailedData.value.id, visitTime: showDelayData.value }).then(() => {
|
|
requests.post(POSTPONE_THE_VISIT_PLAN, { planId: detailedData.value.id, visitTime: showDelayData.value }).then(() => {
|
|
toastSuccess(`操作成功`)
|
|
toastSuccess(`操作成功`)
|
|
getDetailData(detailedData.value)
|
|
getDetailData(detailedData.value)
|
|
|
|
+ showDelay.value = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|