dev
This commit is contained in:
parent
c7914d555a
commit
6696fed2e8
|
|
@ -3,9 +3,10 @@
|
|||
<div class="panel-content" style="padding: 0 24px 24px">
|
||||
<el-table v-if="goodsDetail.length>0" :data="goodsDetail" max-height="300" style="width: 100%"
|
||||
:header-cell-style="{ backgroundColor: '#F5FAFF' }">
|
||||
<el-table-column prop="name" label="名称" width="400">
|
||||
<el-table-column prop="name" label="名称" width="400" :show-overflow-tooltip="showTooltip">
|
||||
<template #default="scope">
|
||||
<el-popover
|
||||
v-if="!showTooltip"
|
||||
placement="top-start"
|
||||
trigger="hover"
|
||||
width="600"
|
||||
|
|
@ -39,6 +40,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</el-popover>
|
||||
<span v-else>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="selectedPrice" label="单价" width="200">
|
||||
|
|
@ -55,7 +57,9 @@
|
|||
<span style="line-height: 30px;margin-left: 10px;cursor: pointer">{{ scope.row.selectedUnit }}</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="selectUnit(scope.row,scope.row.packagingUnit)">{{ scope.row.packagingUnit }}
|
||||
<el-dropdown-item @click="selectUnit(scope.row,scope.row.packagingUnit)">{{
|
||||
scope.row.packagingUnit
|
||||
}}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="selectUnit(scope.row,scope.row.minPackagingUnit)">
|
||||
{{ scope.row.minPackagingUnit }}
|
||||
|
|
@ -78,7 +82,9 @@
|
|||
<el-table-column label="操作" v-if="props.status">
|
||||
<template #default="scope">
|
||||
<el-button type="danger" link @click="delGoods(scope.row)">
|
||||
<el-icon style="margin-right: 3px"><Delete /></el-icon>
|
||||
<el-icon style="margin-right: 3px">
|
||||
<Delete/>
|
||||
</el-icon>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
@ -105,7 +111,7 @@
|
|||
<script setup lang="ts">
|
||||
import SearchInput from "@/components/SearchInput.vue";
|
||||
import Panel from "@/components/common/Panel.vue";
|
||||
import {ref} from "vue";
|
||||
import {onMounted, ref} from "vue";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {Delete} from "@element-plus/icons-vue";
|
||||
|
|
@ -120,6 +126,7 @@ const props = defineProps({
|
|||
default: false
|
||||
}
|
||||
})
|
||||
const showTooltip = ref(false);
|
||||
const goodsDetail = defineModel<any>();
|
||||
const delGoods = (item: any) => {
|
||||
goodsDetail.value = goodsDetail.value.filter((i: any) => i.id != item.id)
|
||||
|
|
@ -217,7 +224,8 @@ const focus = (e: any) => {
|
|||
}
|
||||
const hilistInfo = ref<any>({})
|
||||
const getHilistInfo = (item: any) => {
|
||||
if (item.hilistCode) {
|
||||
console.log("item", item)
|
||||
if (item.hilistCode != null) {
|
||||
post("social/directory/getByCode", {code: item.hilistCode}).then((res: any) => {
|
||||
hilistInfo.value = res
|
||||
})
|
||||
|
|
|
|||
|
|
@ -157,10 +157,12 @@ const focus = (e: any) => {
|
|||
}
|
||||
const itemInfo = ref<any>({});
|
||||
const show = (item: any) => {
|
||||
if(item.itemSocialCode){
|
||||
post('social/directory/getItemByCode', {code: item.itemSocialCode}).then((res: any) => {
|
||||
itemInfo.value = res
|
||||
})
|
||||
}
|
||||
}
|
||||
const hide = () => {
|
||||
itemInfo.value = {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,51 +2,48 @@
|
|||
<Mask :is-show="isShow" width="800" :height="height" title="挂号" @close="close"
|
||||
:show-footer="true">
|
||||
<template #default>
|
||||
<div style="padding:0 24px;height: 100%;display: flex;flex-direction: column">
|
||||
<div style="padding:24px;height: 100%;width: 100%;display: flex;flex-direction: column">
|
||||
<el-form
|
||||
v-loading="loading"
|
||||
:model="edit_data"
|
||||
label-width="auto"
|
||||
:inline=true
|
||||
:rules="rules"
|
||||
ref="form"
|
||||
style="flex: 1;width: 100%"
|
||||
style="flex: 1;width: 100%;"
|
||||
label-position="top"
|
||||
>
|
||||
<el-descriptions
|
||||
border
|
||||
direction="vertical"
|
||||
label-width="100"
|
||||
:column="4"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<el-descriptions-item label="姓名">
|
||||
<el-form-item prop="name" style="margin-bottom: 2px">
|
||||
<el-row :gutter="24" style="width: 100%">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="name" style="margin-bottom: 2px" label="姓名">
|
||||
<el-input v-model="edit_data.name" placeholder="请输入姓名" clearable
|
||||
:disabled="edit_data.status==1||edit_data.status==3||edit_data.status==0"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">
|
||||
<el-form-item prop="gender">
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="gender" label="性别">
|
||||
<el-radio-group v-model="edit_data.gender"
|
||||
:disabled="edit_data.status==1||edit_data.status==3||edit_data.status==0">
|
||||
<el-radio :value="1">男</el-radio>
|
||||
<el-radio :value="2">女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="年龄">
|
||||
<el-form-item prop="age">
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="age" label="年龄">
|
||||
<el-input v-model.number="edit_data.age" placeholder="请输入年龄"
|
||||
:disabled="edit_data.status==1||edit_data.status==3||edit_data.status==0"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="手机号">
|
||||
<el-form-item prop="phone">
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="width: 100%">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input v-model="edit_data.phone" placeholder="手机号"
|
||||
:disabled="edit_data.status==3||edit_data.status==0"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="医生">
|
||||
<el-form-item prop="organizationDoctorId">
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医生" prop="organizationDoctorId">
|
||||
<el-select
|
||||
v-model="edit_data.organizationDoctorId"
|
||||
placeholder="请选择医生"
|
||||
|
|
@ -62,9 +59,9 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="科室">
|
||||
<el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="科室">
|
||||
<el-select
|
||||
v-model="edit_data.organizationSectionId"
|
||||
placeholder="选择科室"
|
||||
|
|
@ -78,11 +75,11 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="证件类型">
|
||||
<el-form-item prop="certType">
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="width: 100%">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="certType" label="证件类型">
|
||||
<el-select v-model="edit_data.certType" placeholder="证件类型"
|
||||
:disabled="edit_data.status==1||edit_data.status==3||edit_data.status==0">
|
||||
<el-option
|
||||
|
|
@ -93,38 +90,59 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="证件码">
|
||||
<el-form-item prop="certNo">
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="证件码" prop="certNo">
|
||||
<el-input v-model="edit_data.certNo" placeholder="请输入证件码"
|
||||
:disabled="edit_data.status==1||edit_data.status==3||edit_data.status==0"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="初/复诊">
|
||||
<el-form-item prop="visitType">
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="初/复诊" prop="visitType">
|
||||
<el-select v-model="edit_data.visitType" placeholder="就诊类型" :disabled="edit_data.status==0">
|
||||
<el-option label="初诊" :value="0"></el-option>
|
||||
<el-option label="复诊" :value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="费用类型">
|
||||
<el-form-item prop="type">
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="width: 100%">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="费用类型" prop="type">
|
||||
<el-select v-model="edit_data.type" :disabled="edit_data.status==0">
|
||||
<el-option label="普通" :value="1"></el-option>
|
||||
<el-option label="医保" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="备注">
|
||||
<el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="edit_data.memo" placeholder="备注" :disabled="edit_data.status==0"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="width: 100%" v-if="props.dateName=='预约'">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="时间">
|
||||
<div style="display: flex;width: 100%">
|
||||
<el-date-picker
|
||||
v-model="edit_data.date"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
style="width: 100%"
|
||||
:disabledDate="disabledDate"
|
||||
/>
|
||||
<el-time-select
|
||||
v-model="edit_data.dateTime"
|
||||
start="08:30"
|
||||
step="00:15"
|
||||
end="18:30"
|
||||
placeholder="选择时间"
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<h5 v-if="!isShowCard" style="margin:24px 0;font-size: 16px">险种列表</h5>
|
||||
<el-table
|
||||
|
|
@ -191,12 +209,23 @@ import insutypes from "@/assets/config/directory/insutypes.json"
|
|||
import {apiConfig} from "@/assets/config/apiConfig.ts";
|
||||
import Quick from "@/components/charge/RecordsLog/Quick.vue";
|
||||
|
||||
const height = ref(470)
|
||||
const height = ref(600)
|
||||
const certTypeList = ref<any>(
|
||||
Object.entries(psnCertTypes)
|
||||
.map(([id, name]) => ({id: Number(id), name}))
|
||||
.sort((a, b) => a.id - b.id)
|
||||
)
|
||||
const disabledDate = (date: Date) => {
|
||||
const today = new Date();
|
||||
today.setHours(0, 0, 0, 0); // 将时间设置为今天的 00:00:00
|
||||
return date < today; // 禁用今天之前的日期
|
||||
};
|
||||
const props = defineProps({
|
||||
dateName: {
|
||||
type: String,
|
||||
default: '现在'
|
||||
},
|
||||
})
|
||||
const edit_data = ref<any>({})
|
||||
const rules = ref<any>({
|
||||
name: [
|
||||
|
|
@ -239,13 +268,16 @@ const close = () => {
|
|||
isShowCard.value = true
|
||||
nextTick(() => {
|
||||
cardDefaultRef.value?.close()
|
||||
height.value = 470
|
||||
height.value = 600
|
||||
})
|
||||
emit('close')
|
||||
}
|
||||
const form = ref()
|
||||
const quickRef = ref()
|
||||
const save = () => {
|
||||
if (props.dateName != '预约') {
|
||||
edit_data.value.time = '现在'
|
||||
}
|
||||
let data = {
|
||||
...edit_data.value,
|
||||
psnNo: socialCard.value?.data?.baseinfo.psn_no,
|
||||
|
|
@ -351,9 +383,9 @@ const socialCardUpdate = (e: any) => {
|
|||
}
|
||||
nextTick(() => {
|
||||
if (tableData.value.length > 0) {
|
||||
height.value = 700
|
||||
height.value = 830
|
||||
} else {
|
||||
height.value = 470
|
||||
height.value = 600
|
||||
}
|
||||
})
|
||||
loading.value = false
|
||||
|
|
|
|||
|
|
@ -127,3 +127,14 @@ export const getCurrentDate=()=> {
|
|||
const day = String(date.getDate()).padStart(2, '0'); // 补0操作
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
//帮我写个方法获取前30天日期并返回
|
||||
export const getPrevious30Days=()=> {
|
||||
const dates = [];
|
||||
const currentDate = new Date();
|
||||
for (let i = 0; i < 31; i++) {
|
||||
const date = new Date(currentDate);
|
||||
date.setDate(currentDate.getDate() - i);
|
||||
dates.push(date.toISOString().slice(0, 10));
|
||||
}
|
||||
return dates[dates.length-1];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,14 +21,15 @@
|
|||
:class="{active:isShowNum==index}">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
<span class="section_name">{{ item.sectionNames }}</span>
|
||||
<span class="btn" @click="openDialog(item,index)"
|
||||
<span v-if="dateName" class="btn" @click="openDialog(item,index)"
|
||||
@mouseover="isShowNum = index"
|
||||
@mouseleave="isShowNum = -1">
|
||||
<img v-if="isShowNum==index" src="/static/images/registration/3-active.png"
|
||||
style="width: 15px;height: 14px;margin-right: 8px" alt="">
|
||||
<img v-else src="/static/images/registration/3.png" alt=""
|
||||
style="width: 15px;height: 14px;margin-right: 8px">
|
||||
挂号
|
||||
|
||||
{{ dateName ? dateName : '挂号' }}
|
||||
</span>
|
||||
</li>
|
||||
</el-scrollbar>
|
||||
|
|
@ -72,7 +73,7 @@
|
|||
</Panel>
|
||||
</div>
|
||||
</div>
|
||||
<Edit ref="editRef" @close="getPatientList"></Edit>
|
||||
<Edit :dateName="dateName" ref="editRef" @close="getPatientList"></Edit>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
|
@ -82,19 +83,43 @@ import Mask from "@/components/common/Mask.vue";
|
|||
import Edit from "@/components/registration/Edit.vue";
|
||||
import List from "@/components/registration/List.vue";
|
||||
import {post} from "@/utils/request";
|
||||
import {getEndOfDay, getToday, formatDateArray} from "@/utils/dateUtils.ts";
|
||||
import {getEndOfDay, getToday, formatDateArray, getPrevious30Days} from "@/utils/dateUtils.ts";
|
||||
import Calendar from "@/components/common/Calendar.vue";
|
||||
import Panel from "@/components/common/Panel.vue";
|
||||
import {apiConfig} from "@/assets/config/apiConfig.ts";
|
||||
import {Search} from "@element-plus/icons-vue";
|
||||
|
||||
const dateName = ref<any>('挂号')
|
||||
const selectDate = (date: any) => {
|
||||
console.log(date)
|
||||
console.log(date, 'date')
|
||||
dateName.value = getActionText(date)
|
||||
}
|
||||
const getActionText = (date: string) => {
|
||||
const today = new Date();
|
||||
const selectedDate = new Date(date);
|
||||
//如果是昨天及以前,返回空
|
||||
if (
|
||||
selectedDate.getFullYear() < today.getFullYear() ||
|
||||
selectedDate.getMonth() < today.getMonth() ||
|
||||
selectedDate.getDate() < today.getDate()
|
||||
)
|
||||
{
|
||||
return ''
|
||||
} else if (
|
||||
selectedDate.getFullYear() === today.getFullYear() &&
|
||||
selectedDate.getMonth() === today.getMonth() &&
|
||||
selectedDate.getDate() === today.getDate()
|
||||
) {
|
||||
return '挂号'; // 如果是今天
|
||||
} else {
|
||||
return '预约'; // 如果是明天及以后
|
||||
}
|
||||
};
|
||||
const isShowNum = ref(-1)
|
||||
const roleList = ref<any>([])
|
||||
|
||||
onMounted(() => {
|
||||
selectedDate.value = [getToday().start, getToday().end]
|
||||
selectedDate.value = [getPrevious30Days(), getToday().end]
|
||||
initDoctor()
|
||||
getPatientList()
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue