Commit 7f6b6010 by yuzhenWang

提交代码写到了预约信息

parent 19b678da
<template>
<div class="formContainer">
<div class="formLeft" v-if="showAnchor">
<el-affix :offset="affixOffset">
<el-anchor
:direction="direction"
:type="type"
:offset="anchorOffset"
@click="handleAnchorClick"
>
<!-- -->
<el-anchor-link
v-for="item in anchorList"
:href="'#' + item.title"
:title="item.name"
@click="e => handleLinkClick(e, item.title)"
/>
</el-anchor>
</el-affix>
</div>
<div class="formRight" :class="showAnchor ? 'formRightSelf' : ''">
<slot name="form-right"></slot>
</div>
</div>
</template>
<script setup>
import { ref, onMounted, getCurrentInstance } from 'vue'
const props = defineProps({
containerRef: {
type: Object,
default: () => {
return {}
}
},
direction: {
type: String,
default: 'vertical'
},
type: {
type: String,
default: 'default'
},
anchorOffset: {
type: Number,
default: 30
},
affixOffset: {
type: Number,
default: 60
},
anchorList: {
type: Array,
default: () => {
return []
}
},
// 新增:滚动容器的选择器
scrollContainerSelector: {
type: String,
default: ''
},
// 新增:滚动到元素时额外的偏移量
scrollOffset: {
type: Number,
default: 0
},
domIndex: {
type: Number,
default: 0
},
showAnchor: {
type: Boolean,
default: true
}
})
const emit = defineEmits(['anchor-click'])
// 处理锚点点击
const handleAnchorClick = e => {
// 阻止默认的锚点跳转
e.preventDefault()
}
// 处理链接点击
const handleLinkClick = (e, anchorId) => {
e.preventDefault()
e.stopPropagation()
emit('anchor-click', anchorId)
// 延迟执行滚动,确保 DOM 已经更新
setTimeout(() => {
scrollToAnchor(anchorId)
}, 50)
}
// 滚动到锚点
const scrollToAnchor = anchorId => {
const targetElement = document.getElementById(anchorId)
if (!targetElement) return
let scrollContainer
if (props.scrollContainerSelector) {
scrollContainer = document.querySelectorAll(props.scrollContainerSelector)
}
if (scrollContainer.length > 0) {
// 计算在容器内的相对位置
const containerRect = scrollContainer[props.domIndex].getBoundingClientRect()
const targetRect = targetElement.getBoundingClientRect()
// 计算滚动位置
const scrollTop =
targetRect.top -
containerRect.top +
scrollContainer[props.domIndex].scrollTop -
props.scrollOffset
// 平滑滚动
scrollContainer[props.domIndex].scrollTo({
top: scrollTop,
behavior: 'smooth'
})
} else {
// 如果没有指定容器,使用默认滚动
targetElement.scrollIntoView({
behavior: 'smooth',
block: 'start'
})
}
}
// 暴露方法给父组件
defineExpose({
scrollToAnchor
})
</script>
<style lang="scss" scoped>
.formContainer {
width: 100%;
box-sizing: border-box;
display: flex;
}
.formLeft {
width: 15%;
box-sizing: border-box;
height: 100vh;
}
.formRight {
flex: 1;
padding-left: 10px;
box-sizing: border-box;
}
.formRightSelf {
border-left: 3px solid rgb(247 247 247);
}
</style>
...@@ -20,9 +20,20 @@ ...@@ -20,9 +20,20 @@
</div> </div>
</div> </div>
</div> </div>
<div class="tabsBox" ref="tabPaneRef"> <div class="tabsBox">
<el-tabs v-model="activeName" class="demo-tabs" :before-leave="beforeTabLeave"> <el-tabs
<el-tab-pane v-for="tab in tabsList" :key="tab.name" :label="tab.label" :name="tab.name"> v-model="activeName"
class="demo-tabs"
:before-leave="beforeTabLeave"
ref="tabPaneRef"
>
<el-tab-pane
v-for="(tab, tIndex) in tabsList"
:key="tab.name"
:label="tab.label"
:name="tab.name"
>
<!-- 注意tabPaneBox这个类名与子组件的锚点定位相关,不能轻易改动 -->
<div :class="{ tabPaneBox: activeName !== 'appointment' }"> <div :class="{ tabPaneBox: activeName !== 'appointment' }">
<div v-if="tab.name === 'overview'" class="overviewBox"> <div v-if="tab.name === 'overview'" class="overviewBox">
<div <div
...@@ -79,6 +90,8 @@ ...@@ -79,6 +90,8 @@
:customerBizId="processInfo.customerBizId" :customerBizId="processInfo.customerBizId"
@handleSuccess="handleSuccess" @handleSuccess="handleSuccess"
:tabPaneRef="tabPaneRef" :tabPaneRef="tabPaneRef"
:tabIndex="tabsList.findIndex(t => t.name === 'customer')"
anchorContainer=".tabPaneBox"
/> />
<div v-if="tab.name === 'fnaform'"> <div v-if="tab.name === 'fnaform'">
<FanForm <FanForm
...@@ -206,17 +219,17 @@ const getDictsData = async () => { ...@@ -206,17 +219,17 @@ const getDictsData = async () => {
pageSize: 10 pageSize: 10
} }
const response2 = await getInsuranceProductList(params2) // const response2 = await getInsuranceProductList(params2)
if (response2.code == 200) { // if (response2.code == 200) {
response2.data.records = response2.data.records.map(item => { // response2.data.records = response2.data.records.map(item => {
return { // return {
...item, // ...item,
label: item.productName, // label: item.productName,
value: item.productBizId // value: item.productBizId
} // }
}) // })
dictStore.setInsureProductList(response2.data.records) // dictStore.setInsureProductList(response2.data.records)
} // }
const params3 = { const params3 = {
pageNo: 1, pageNo: 1,
pageSize: 10 pageSize: 10
...@@ -276,15 +289,7 @@ const processUpdate = (data, status) => { ...@@ -276,15 +289,7 @@ const processUpdate = (data, status) => {
} }
}) })
} }
// 新建流程
// const getAddInfo = () => {
// addFna({ remark: '' }).then(res => {
// if (res.code == 200) {
// // 获取流程详情
// getProcessInfo(res.data.fnaBizId)
// }
// })
// }
// 获取流程详情 // 获取流程详情
function getProcessInfo(fnaBizId, changeTab) { function getProcessInfo(fnaBizId, changeTab) {
getProcessDetail(fnaBizId).then(res => { getProcessDetail(fnaBizId).then(res => {
...@@ -515,13 +520,9 @@ getDictsData() ...@@ -515,13 +520,9 @@ getDictsData()
} }
} }
} }
/* .tabPaneBox {
height: calc(100vh - 275px);
overflow-y: auto;
padding-right: 10px;
} */
.tabPaneBox { .tabPaneBox {
height: calc(100vh - 275px); height: calc(100vh - 280px);
overflow-y: auto; overflow-y: auto;
padding-right: 10px; padding-right: 10px;
position: relative; position: relative;
......
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
:data="tenantList" :data="tenantList"
@selection-change="tableSelect" @selection-change="tableSelect"
@sort-change="sortChange" @sort-change="sortChange"
border
> >
<el-table-column type="index" width="50" label="序号" /> <el-table-column type="index" width="50" label="序号" />
<el-table-column label="客户姓名" align="center" prop="customerName" width="100" /> <el-table-column label="客户姓名" align="center" prop="customerName" width="100" />
...@@ -130,16 +131,6 @@ ...@@ -130,16 +131,6 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <div style="width: 100%; display: flex; justify-content: flex-end; margin-bottom: 30px">
<pagination
v-show="total >= 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
style="text-align: right"
/>
</div> -->
</template> </template>
</CommonPage> </CommonPage>
<!-- 下一步到预约 --> <!-- 下一步到预约 -->
......
...@@ -44,12 +44,19 @@ ...@@ -44,12 +44,19 @@
<el-row v-if="isEmbed"> <el-row v-if="isEmbed">
<el-col> <el-col>
<div class="topButtonBox"> <div class="topButtonBox">
<el-button <!-- <el-button
v-if="idsObj.appointmentBizId && pageSource !== 'policyList'" v-if="idsObj.appointmentBizId && pageSource !== 'policyList'"
type="primary" type="primary"
icon="Plus" icon="Plus"
@click="handleAddExecl" @click="handleAddExecl"
>上传EXECL</el-button >上传EXECL</el-button
> -->
<el-button
v-if="pageSource !== 'policyList'"
type="primary"
:icon="Edit"
@click="handleEdit"
>编辑</el-button
> >
<el-button <el-button
v-if="pageSource !== 'policyList'" v-if="pageSource !== 'policyList'"
...@@ -86,6 +93,10 @@ ...@@ -86,6 +93,10 @@
:appointmentStatus="appointmentSummeryInfo.status" :appointmentStatus="appointmentSummeryInfo.status"
@handleSuccessEdit="getAppointmentInfo(idsObj.appointmentBizId)" @handleSuccessEdit="getAppointmentInfo(idsObj.appointmentBizId)"
ref="appointmentInfoRef" ref="appointmentInfoRef"
:tabIndex="tabsList.findIndex(t => t.name === 'appointmentInfo')"
anchorContainer=".appointmentTabPaneBox"
:fatherTabName="tabName"
:editStatus="editStatus"
/> />
</div> </div>
<div v-if="tab.name === 'productPlan'"> <div v-if="tab.name === 'productPlan'">
...@@ -320,7 +331,7 @@ import { ...@@ -320,7 +331,7 @@ import {
} from '@/api/sign/appointment' } from '@/api/sign/appointment'
import { getPolicyfollow, getPolicyInfo, signName } from '@/api/sign/underwritingMain' import { getPolicyfollow, getPolicyInfo, signName } from '@/api/sign/underwritingMain'
import { listTenantUser, getInsuranceProductList, getAdditionalProductList } from '@/api/common' import { listTenantUser, getInsuranceProductList, getAdditionalProductList } from '@/api/common'
import { Check } from '@element-plus/icons-vue' import { Check, Edit } from '@element-plus/icons-vue'
import { ref, nextTick, onUnmounted } from 'vue' import { ref, nextTick, onUnmounted } from 'vue'
const emit = defineEmits(['handleSuccess']) const emit = defineEmits(['handleSuccess'])
...@@ -363,6 +374,7 @@ const processInfo = ref({ ...@@ -363,6 +374,7 @@ const processInfo = ref({
createTime: proxy.parseTime(new Date()), createTime: proxy.parseTime(new Date()),
customerName: userStore.name customerName: userStore.name
}) })
const editStatus = ref(true) //编辑状态
const execlDialog = ref(false) const execlDialog = ref(false)
const isEmbed = ref(false) //是否作为组件插入 const isEmbed = ref(false) //是否作为组件插入
const policyNo = ref('') //新单跟进保单号 const policyNo = ref('') //新单跟进保单号
...@@ -626,17 +638,17 @@ const getDictsData = async () => { ...@@ -626,17 +638,17 @@ const getDictsData = async () => {
pageSize: 10 pageSize: 10
} }
const response2 = await getInsuranceProductList(params2) // const response2 = await getInsuranceProductList(params2)
if (response2.code == 200) { // if (response2.code == 200) {
response2.data.records = response2.data.records.map(item => { // response2.data.records = response2.data.records.map(item => {
return { // return {
...item, // ...item,
label: item.productName, // label: item.productName,
value: item.productBizId // value: item.productBizId
} // }
}) // })
dictStore.setInsureProductList(response2.data.records) // dictStore.setInsureProductList(response2.data.records)
} // }
const params3 = { const params3 = {
pageNo: 1, pageNo: 1,
pageSize: 10 pageSize: 10
...@@ -887,7 +899,9 @@ const handleSubmit = type => { ...@@ -887,7 +899,9 @@ const handleSubmit = type => {
}) })
} }
} }
const handleEdit = () => {
editStatus.value = !editStatus.value
}
//修改预约数据 //修改预约数据
if (route.query.appointmentNo && route.query.source == 'appointmentList') { if (route.query.appointmentNo && route.query.source == 'appointmentList') {
processInfo.value = route.query processInfo.value = route.query
...@@ -901,7 +915,7 @@ const pageSource = computed(() => { ...@@ -901,7 +915,7 @@ const pageSource = computed(() => {
}) })
const tabHight = computed(() => { const tabHight = computed(() => {
if (pageSource.value == 'fnaList') { if (pageSource.value == 'fnaList') {
return 'calc(100vh - 407px)' return 'calc(100vh - 412px)'
} else if (pageSource.value == 'policyList') { } else if (pageSource.value == 'policyList') {
return 'calc(100vh - 225px)' return 'calc(100vh - 225px)'
} else { } else {
...@@ -910,7 +924,7 @@ const tabHight = computed(() => { ...@@ -910,7 +924,7 @@ const tabHight = computed(() => {
}) })
const minHight = computed(() => { const minHight = computed(() => {
if (pageSource.value == 'fnaList') { if (pageSource.value == 'fnaList') {
return 'calc(100vh - 84.5px)' return 'calc(100vh - 80px)'
} else if (pageSource.value == 'policyList') { } else if (pageSource.value == 'policyList') {
return 'calc(100vh - 84.5px)' return 'calc(100vh - 84.5px)'
} else { } else {
...@@ -983,7 +997,7 @@ watch( ...@@ -983,7 +997,7 @@ watch(
activeName.value = 'appointmentInfo' activeName.value = 'appointmentInfo'
}) })
} else { } else {
getAppointmentInfo(idsObj.value.appointmentBizId) // getAppointmentInfo(idsObj.value.appointmentBizId)
tabsList.value = [ tabsList.value = [
{ {
label: '预约信息', label: '预约信息',
...@@ -1235,6 +1249,17 @@ const showSubmitBtn = computed(() => { ...@@ -1235,6 +1249,17 @@ const showSubmitBtn = computed(() => {
return false return false
} }
}) })
if (route.query.appointmentNo && route.query.source == 'appointmentList') {
editStatus.value = true
} else if (route.query.source == 'policyList') {
editStatus.value = true
} else if (route.query.source == 'fnaList' && idsObj.value.appointmentBizId) {
editStatus.value = true
} else if (route.query.source == 'fnaList' && !idsObj.value.appointmentBizId) {
editStatus.value = false
}
console.log('editStatus.value ', editStatus.value, idsObj.value)
onUnmounted(() => { onUnmounted(() => {
// 彻底重置所有响应式数据 // 彻底重置所有响应式数据
submitAppointmentObj.value = {} submitAppointmentObj.value = {}
......
...@@ -203,7 +203,7 @@ import useUserStore from '@/store/modules/user' ...@@ -203,7 +203,7 @@ import useUserStore from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
const router = useRouter() const router = useRouter()
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const dialogVisible = ref(true) const dialogVisible = ref(false)
const appointmentSummeryInfo = ref({}) const appointmentSummeryInfo = ref({})
const tenantList = ref([]) const tenantList = ref([])
const loading = ref(true) const loading = ref(true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment