This commit is contained in:
ChenQiuYu 2025-05-23 09:49:59 +08:00
parent 589f3ec8ec
commit def18c3753
1 changed files with 27 additions and 17 deletions

View File

@ -117,12 +117,13 @@
:span="2"
label="时间">
<el-form-item style="width: 100%" prop="date">
<div style=" display: flex;width: 100%">
<div v-if="isBtnShow" style="display: flex;width: 100%">
<div>现在</div>
</div>
<div v-else style="display: flex;width: 100%">
<div style=" display: flex;justify-content: space-between">
<el-form-item style="flex: 1;min-width: 0" v-if="!isBtnShow&&dateName!='预约'">
<div style="width: 100%">现在</div>
</el-form-item>
<el-form-item v-else style="flex: 1;min-width: 0" prop="date">
<div style="display: flex">
<el-date-picker
v-model="edit_data.date"
type="date"
@ -142,9 +143,11 @@
style="width: 50%"
/>
</div>
<span v-if="dateName!='预约'" class="small-btn" @click="changeBtn">{{ isBtnShow ? '预约' : '挂号' }}</span>
</div>
</el-form-item>
<span v-if="dateName!='预约'" class="small-btn" @click="changeBtn">{{
isBtnShow ? '挂号' : '预约'
}}</span>
</div>
</el-descriptions-item>
<el-descriptions-item
:span="4"
@ -160,6 +163,8 @@
:data="tableData"
style="width: 100%;flex: 1"
v-if="!isShowCard"
highlight-current-row
@current-change="handleCurrentChange"
>
<el-table-column label="险种类型" prop="insutype">
<template #default="scope">
@ -269,6 +274,7 @@ const isShow = ref(false)
const emit = defineEmits(['close'])
const close = () => {
isShow.value = false
isBtnShow.value = true
time.value = ''
edit_data.value = {
timeList: [],
@ -293,13 +299,14 @@ const save = () => {
if (dateName.value == '现在') {
edit_data.value.timeList = ''
} else {
edit_data.value.timeList.push(new Date(edit_data.value.date), time.value)
JSON.stringify(edit_data.value.timeList)
edit_data.value.timeList.push(edit_data.value.date, time.value)
edit_data.value.appointmentTime = edit_data.value.timeList.join(' ')
console.log(edit_data.value.appointmentTime)
}
let data = {
...edit_data.value,
psnNo: socialCard.value?.data?.baseinfo.psn_no,
insutype: socialCard.value?.data?.insuinfo[0].insutype,
insutype:edit_data.value.insutype || socialCard.value?.data?.insuinfo[0].insutype,
insuBalance: socialCard.value?.data?.insuinfo[0].balc,
}
@ -361,6 +368,7 @@ const init = (doctorId: any = "", id: any = null, show: any = false) => {
isShow.value = true
quickShow.value = show
edit_data.value.organizationDoctorId = doctorId || ""
isBtnShow.value = dateName.value == '现在';
if (id) {
post('registration/getById', {id: id}).then((res: any) => {
edit_data.value = res
@ -402,6 +410,7 @@ const socialCardUpdate = (e: any) => {
nextTick(() => {
if (tableData.value.length > 0) {
height.value = 870
} else {
height.value = 570
}
@ -450,10 +459,9 @@ const changeLoading = (e: any) => {
const isBtnShow = ref(true)
const changeBtn = () => {
isBtnShow.value = !isBtnShow.value
time.value = ''
edit_data.value = {
timeList: [],
}
}
const handleCurrentChange=(val:any)=>{
edit_data.value.insutype = val.insutype
}
defineExpose({init})
</script>
@ -541,7 +549,9 @@ defineExpose({init})
:deep(.el-form-item) {
margin-bottom: 2px !important;
}
.small-btn{
.small-btn {
width: 51px;
height: 32px;
line-height: 32px;
margin-left: 5px;