Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web

# Conflicts:
#	src/views/outpatient/index.vue
This commit is contained in:
LiJianZhao 2025-05-23 11:45:23 +08:00
commit ceea182071
9 changed files with 158 additions and 63 deletions

View File

@ -130,6 +130,7 @@ const showTooltip = ref(false);
const goodsDetail = defineModel<any>(); const goodsDetail = defineModel<any>();
const delGoods = (item: any) => { const delGoods = (item: any) => {
goodsDetail.value = goodsDetail.value.filter((i: any) => i.id != item.id) goodsDetail.value = goodsDetail.value.filter((i: any) => i.id != item.id)
} }
const goodsSearchApi = "goods/goods/search"; const goodsSearchApi = "goods/goods/search";
@ -237,6 +238,8 @@ const getHilistInfo = (item: any) => {
} }
const colosInfo = () => { const colosInfo = () => {
hilistInfo.value = {} hilistInfo.value = {}
getTotalPrice()
emit('totalPriceChange')
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -234,7 +234,10 @@ const setDateTip = () => {
} }
watch(() => selectedDate.value, (newValue, oldValue) => { watch(() => selectedDate.value, (newValue, oldValue) => {
curItem.value=null
emit('clickItem', curItem.value)
if (newValue == oldValue) { if (newValue == oldValue) {
init()
return; return;
} }
if (newValue == null) { if (newValue == null) {

View File

@ -107,8 +107,8 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="费用类型"> <el-descriptions-item label="费用类型">
<el-form-item prop="type"> <el-form-item prop="type">
<el-select v-model="edit_data.type" :disabled="edit_data.status==0"> <el-select v-model="edit_data.type" :disabled="edit_data.status==0||isShowCard">
<el-option label="普通" :value="1"></el-option> <el-option label="自费" :value="1"></el-option>
<el-option label="医保" :value="2"></el-option> <el-option label="医保" :value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -117,12 +117,13 @@
:span="2" :span="2"
label="时间"> label="时间">
<el-form-item style="width: 100%" prop="date">
<div style=" display: flex;width: 100%"> <div style=" display: flex;justify-content: space-between">
<div v-if="isBtnShow" style="display: flex;width: 100%"> <el-form-item style="flex: 1;min-width: 0" v-if="!isBtnShow&&dateName!='预约'">
<div>现在</div> <div style="width: 100%">现在</div>
</div> </el-form-item>
<div v-else style="display: flex;width: 100%"> <el-form-item v-else style="flex: 1;min-width: 0" prop="date">
<div style="display: flex">
<el-date-picker <el-date-picker
v-model="edit_data.date" v-model="edit_data.date"
type="date" type="date"
@ -137,14 +138,16 @@
start="00:00" start="00:00"
step="00:15" step="00:15"
end="23:45" end="23:45"
:min-time="getCurrentTime()" :min-time="getCurrentTime(edit_data.date)"
placeholder="选择时间" placeholder="选择时间"
style="width: 50%" style="width: 50%"
/> />
</div> </div>
<span v-if="dateName!='预约'" class="small-btn" @click="changeBtn">{{ isBtnShow ? '预约' : '挂号' }}</span>
</div>
</el-form-item> </el-form-item>
<span v-if="dateName!='预约'" class="small-btn" @click="changeBtn">{{
isBtnShow ? '挂号' : '预约'
}}</span>
</div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item <el-descriptions-item
:span="4" :span="4"
@ -160,6 +163,9 @@
:data="tableData" :data="tableData"
style="width: 100%;flex: 1" style="width: 100%;flex: 1"
v-if="!isShowCard" v-if="!isShowCard"
highlight-current-row
ref="multipleTable"
@current-change="handleCurrentChange"
> >
<el-table-column label="险种类型" prop="insutype"> <el-table-column label="险种类型" prop="insutype">
<template #default="scope"> <template #default="scope">
@ -269,9 +275,12 @@ const isShow = ref(false)
const emit = defineEmits(['close']) const emit = defineEmits(['close'])
const close = () => { const close = () => {
isShow.value = false isShow.value = false
isBtnShow.value = true
time.value = '' time.value = ''
edit_data.value = { edit_data.value = {
timeList: [], timeList: [],
insutype: '',
appointmentTime: ''
} }
isShowCard.value = true isShowCard.value = true
nextTick(() => { nextTick(() => {
@ -292,14 +301,15 @@ const dateName = defineModel()
const save = () => { const save = () => {
if (dateName.value == '现在') { if (dateName.value == '现在') {
edit_data.value.timeList = '' edit_data.value.timeList = ''
edit_data.value.appointmentTime = ''
} else { } else {
edit_data.value.timeList.push(new Date(edit_data.value.date), time.value) edit_data.value.timeList.push(edit_data.value.date, time.value)
JSON.stringify(edit_data.value.timeList) edit_data.value.appointmentTime = edit_data.value.timeList.join(' ')
} }
let data = { let data = {
...edit_data.value, ...edit_data.value,
psnNo: socialCard.value?.data?.baseinfo.psn_no, 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, insuBalance: socialCard.value?.data?.insuinfo[0].balc,
} }
@ -361,6 +371,8 @@ const init = (doctorId: any = "", id: any = null, show: any = false) => {
isShow.value = true isShow.value = true
quickShow.value = show quickShow.value = show
edit_data.value.organizationDoctorId = doctorId || "" edit_data.value.organizationDoctorId = doctorId || ""
edit_data.value.type = 1
isBtnShow.value = dateName.value == '现在';
if (id) { if (id) {
post('registration/getById', {id: id}).then((res: any) => { post('registration/getById', {id: id}).then((res: any) => {
edit_data.value = res edit_data.value = res
@ -373,6 +385,7 @@ const init = (doctorId: any = "", id: any = null, show: any = false) => {
} }
const isShowCard = ref<any>(true) const isShowCard = ref<any>(true)
const tableData = ref<any>([]) const tableData = ref<any>([])
const multipleTable = ref<any>()
const socialCardUpdate = (e: any) => { const socialCardUpdate = (e: any) => {
isShowCard.value = false isShowCard.value = false
if (e) { if (e) {
@ -383,6 +396,7 @@ const socialCardUpdate = (e: any) => {
edit_data.value.certNo = e.data.baseinfo.certno edit_data.value.certNo = e.data.baseinfo.certno
edit_data.value.age = Math.floor(e.data.baseinfo.age) edit_data.value.age = Math.floor(e.data.baseinfo.age)
tableData.value = e.data.insuinfo tableData.value = e.data.insuinfo
edit_data.value.type = 2
if (edit_data.value.certNo) { if (edit_data.value.certNo) {
post('vip/vip/list', { post('vip/vip/list', {
keyword: edit_data.value.certNo, keyword: edit_data.value.certNo,
@ -401,7 +415,8 @@ const socialCardUpdate = (e: any) => {
} }
nextTick(() => { nextTick(() => {
if (tableData.value.length > 0) { if (tableData.value.length > 0) {
height.value = 870 height.value = 820
multipleTable.value?.setCurrentRow(tableData.value[0])
} else { } else {
height.value = 570 height.value = 570
} }
@ -450,10 +465,9 @@ const changeLoading = (e: any) => {
const isBtnShow = ref(true) const isBtnShow = ref(true)
const changeBtn = () => { const changeBtn = () => {
isBtnShow.value = !isBtnShow.value isBtnShow.value = !isBtnShow.value
time.value = '' }
edit_data.value = { const handleCurrentChange = (val: any) => {
timeList: [], edit_data.value.insutype = val.insutype
}
} }
defineExpose({init}) defineExpose({init})
</script> </script>
@ -541,7 +555,9 @@ defineExpose({init})
:deep(.el-form-item) { :deep(.el-form-item) {
margin-bottom: 2px !important; margin-bottom: 2px !important;
} }
.small-btn{
.small-btn {
width: 51px;
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
margin-left: 5px; margin-left: 5px;

View File

@ -170,8 +170,11 @@ const save = () => {
) )
} }
const removeTableRow = (row: any) => { const removeTableRow = (row: any) => {
list.value = list.value.filter((item: any) => item.id !== row.id); const index = list.value.findIndex(item => item === row);
if (index !== -1) {
list.value.splice(index, 1);
calculateTotalPrices(); calculateTotalPrices();
}
} }
const pageNum = ref<any>(1) const pageNum = ref<any>(1)
const pageSize = ref<any>(20) const pageSize = ref<any>(20)

View File

@ -1,4 +1,4 @@
export const formatDate = (date: Date|string): any => { export const formatDate = (date: Date | string): any => {
if (date === undefined || date === null) { if (date === undefined || date === null) {
return '-'; return '-';
} }
@ -61,33 +61,48 @@ export const formatDateArray = (dates: Date[]): string[] => {
export const getToday = () => { export const getToday = () => {
const today = new Date(); const today = new Date();
return { start: formatDate(new Date(today.setHours(0, 0, 0, 0))), end: formatDate(new Date(today.setHours(23, 59, 59, 999))) }; return {
start: formatDate(new Date(today.setHours(0, 0, 0, 0))),
end: formatDate(new Date(today.setHours(23, 59, 59, 999)))
};
}; };
export const getYesterday = () => { export const getYesterday = () => {
const yesterday = new Date(); const yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1); yesterday.setDate(yesterday.getDate() - 1);
return { start: formatDate(new Date(yesterday.setHours(0, 0, 0, 0))), end: formatDate(new Date(yesterday.setHours(23, 59, 59, 999))) }; return {
start: formatDate(new Date(yesterday.setHours(0, 0, 0, 0))),
end: formatDate(new Date(yesterday.setHours(23, 59, 59, 999)))
};
}; };
export const getTomorrow = () => { export const getTomorrow = () => {
const tomorrow = new Date(); const tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1); tomorrow.setDate(tomorrow.getDate() + 1);
return { start: formatDate(new Date(tomorrow.setHours(0, 0, 0, 0))), end: formatDate(new Date(tomorrow.setHours(23, 59, 59, 999))) }; return {
start: formatDate(new Date(tomorrow.setHours(0, 0, 0, 0))),
end: formatDate(new Date(tomorrow.setHours(23, 59, 59, 999)))
};
}; };
export const getThisWeek = () => { export const getThisWeek = () => {
const today = new Date(); const today = new Date();
const startOfWeek = new Date(today.setDate(today.getDate() - today.getDay())); const startOfWeek = new Date(today.setDate(today.getDate() - today.getDay()));
const endOfWeek = new Date(today.setDate(today.getDate() - today.getDay() + 6)); const endOfWeek = new Date(today.setDate(today.getDate() - today.getDay() + 6));
return { start: formatDate(new Date(startOfWeek.setHours(0, 0, 0, 0))), end: formatDate(new Date(endOfWeek.setHours(23, 59, 59, 999))) }; return {
start: formatDate(new Date(startOfWeek.setHours(0, 0, 0, 0))),
end: formatDate(new Date(endOfWeek.setHours(23, 59, 59, 999)))
};
}; };
export const getThisMonth = () => { export const getThisMonth = () => {
const today = new Date(); const today = new Date();
const startOfMonth = new Date(today.getFullYear(), today.getMonth(), 1); const startOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
const endOfMonth = new Date(today.getFullYear(), today.getMonth() + 1, 0); const endOfMonth = new Date(today.getFullYear(), today.getMonth() + 1, 0);
return { start: formatDate(new Date(startOfMonth.setHours(0, 0, 0, 0))), end: formatDate(new Date(endOfMonth.setHours(23, 59, 59, 999))) }; return {
start: formatDate(new Date(startOfMonth.setHours(0, 0, 0, 0))),
end: formatDate(new Date(endOfMonth.setHours(23, 59, 59, 999)))
};
}; };
export const getDaysBetweenDates = (startDateStr: string, endDateStr: string): string[] => { export const getDaysBetweenDates = (startDateStr: string, endDateStr: string): string[] => {
@ -119,7 +134,7 @@ export const getEndOfDay = (date: Date | string): string => {
dateDetail.setHours(23, 59, 59, 0); // 设置为当天 23:59:00 dateDetail.setHours(23, 59, 59, 0); // 设置为当天 23:59:00
return formatDate(dateDetail).slice(0, 19); // return formatDate(dateDetail).slice(0, 19); //
}; };
export const getCurrentDate=()=> { export const getCurrentDate = () => {
const date = new Date(); const date = new Date();
const year = date.getFullYear(); const year = date.getFullYear();
// 月份从0开始所以要加1 // 月份从0开始所以要加1
@ -128,7 +143,7 @@ export const getCurrentDate=()=> {
return `${year}-${month}-${day}`; return `${year}-${month}-${day}`;
} }
//帮我写个方法获取前30天日期并返回 //帮我写个方法获取前30天日期并返回
export const getPrevious30Days=()=> { export const getPrevious30Days = () => {
const dates = []; const dates = [];
const currentDate = new Date(); const currentDate = new Date();
for (let i = 0; i < 31; i++) { for (let i = 0; i < 31; i++) {
@ -136,13 +151,25 @@ export const getPrevious30Days=()=> {
date.setDate(currentDate.getDate() - i); date.setDate(currentDate.getDate() - i);
dates.push(date.toISOString().slice(0, 10)); dates.push(date.toISOString().slice(0, 10));
} }
return dates[dates.length-1]; return dates[dates.length - 1];
} }
//获取当前时间的时分 //获取当前时间的时分
export const getCurrentTime=()=> { export const getCurrentTime = (date:any) => {
const currentDate = new Date(); const today = new Date();
const hours = currentDate.getHours(); const selectedDate =date ? new Date(date) : today;
const minutes = currentDate.getMinutes();
return `${hours}:${minutes}`; // 判断是否是今天
} const isToday =
selectedDate.getFullYear() === today.getFullYear() &&
selectedDate.getMonth() === today.getMonth() &&
selectedDate.getDate() === today.getDate();
if (isToday) {
// 如果是今天,返回当前时间如 "14:30"
return `${String(today.getHours()).padStart(2, '0')}:${String(today.getMinutes()).padStart(2, '0')}`;
} else {
// 如果不是今天,返回 null 或 undefined表示不设置 min-time
return undefined;
}
};

View File

@ -42,20 +42,21 @@ const handleLogin = async () => {
const loginCore=async ()=>{ const loginCore=async ()=>{
let token:any=await post(apiConfig.ManagerUserLogin, {username: username.value, password: password.value},{catch_error: true}) let token:any=await post(apiConfig.ManagerUserLogin, {username: username.value, password: password.value},{catch_error: true})
localStorage.setItem('token', token) localStorage.setItem('token', token)
try{
await post(apiConfig.signIn, {mac: netWork.value.mac, ip: netWork.value.ip}, {catch_error: true}) await post(apiConfig.signIn, {mac: netWork.value.mac, ip: netWork.value.ip}, {catch_error: true})
}catch (e){
ElMessage.warning("签到失败,将以非签到状态访问本系统")
}finally {
success() success()
}
} }
const success = () => { const success = () => {
loading.value = false loading.value = false
ElMessageBox.alert('登录成功且签到,即将为您进入到首页', '签到提示', {
type:'success',
showClose: false,
callback: (action: Action) => {
router.push("/home/index") router.push("/home/index")
},
})
} }
const error = (message:any) => { const error = (message:any) => {
ElMessageBox.alert(message) ElMessageBox.alert(message)

View File

@ -72,7 +72,7 @@
<el-descriptions-item label="民族"> <el-descriptions-item label="民族">
{{ antysList.find((item: any) => item.id == listItem.nation)?.name}} {{ antysList.find((item: any) => item.id == listItem.nation)?.name}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="就诊时间">{{ <el-descriptions-item label="上次就诊时间">{{
formatListTime(listItem.lastVisitTime) formatListTime(listItem.lastVisitTime)
}} }}
</el-descriptions-item> </el-descriptions-item>

View File

@ -97,17 +97,26 @@ const save = () => {
diagnosisMedicalRecord: medicalRecord, diagnosisMedicalRecord: medicalRecord,
} }
if (!formData.value.diagnosisDetail || JSON.parse(formData.value.diagnosisDetail).length == 0) {
ElMessage.error("请填写诊断信息")
} else {
post('medical/record/save', {data: data}).then((res: any) => { post('medical/record/save', {data: data}).then((res: any) => {
ElMessage.success("接诊完毕,请到收费页面收费") ElMessage.success("接诊完毕,请到收费页面收费")
medicalQueueRef.value?.changeCurItemOrStatus(null, 2); medicalQueueRef.value?.changeCurItemOrStatus(null, 2);
}) })
}
} }
const totalAmount = ref(0) const totalAmount = ref(0)
const medicalHistoryRef = ref() const medicalHistoryRef = ref()
const patientCardRef = ref() const patientCardRef = ref()
const patientRegistration = ref<any>({})// const patientRegistration = ref<any>({})//
const clickItem = (item: any) => { const clickItem = (item: any) => {
if (!item) return initFormData()
if (!item) {
medicalHistoryRef.value?.clearList();
return
}
curRegister.value = item curRegister.value = item
registerId.value = item.id registerId.value = item.id
itemId.value = item.id itemId.value = item.id
@ -127,7 +136,7 @@ const clickItem = (item: any) => {
getOrderTotalPrice() getOrderTotalPrice()
const diagnosisList = JSON.parse(formData.value.diagnosisDetail) const diagnosisList = JSON.parse(formData.value.diagnosisDetail)
const nList = formData.value.diagnosisSummary.split(',') const nList = formData.value.diagnosisSummary.split(',')
caseRef.value?.initDiagnosisSearch(diagnosisList,nList); caseRef.value?.initDiagnosisSearch(diagnosisList, nList);
}) })
} }
@ -175,7 +184,7 @@ const getOrderTotalPrice = () => {
} }
const caseRef = ref<any>("") const caseRef = ref<any>("")
const copyForm = (item: any) => { const copyForm = (item: any) => {
formData.value.diagnosisMedicalRecord = item.diagnosisMedicalRecord formData.value = item.diagnosisMedicalRecord
formData.value.diagType = Number(item.diagnosisMedicalRecord.diagType) formData.value.diagType = Number(item.diagnosisMedicalRecord.diagType)
const diagnosisList = JSON.parse(item.diagnosisMedicalRecord.diagnosisDetail) const diagnosisList = JSON.parse(item.diagnosisMedicalRecord.diagnosisDetail)
const nList = item.diagnosisMedicalRecord.diagnosisSummary.split(',') const nList = item.diagnosisMedicalRecord.diagnosisSummary.split(',')
@ -213,7 +222,15 @@ watch(() => registerId.value, (newValue) => {
getSeeDockerInfo(newValue) getSeeDockerInfo(newValue)
}) })
watch(
[() => formData.value.goodsDetail, () => formData.value.itemDetail],
([newGoodsDetail, newItemDetail]) => {
if (newGoodsDetail || newItemDetail) {
getOrderTotalPrice()
}
},
{deep: true}
)
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {

View File

@ -13,11 +13,23 @@
<div class="search" style="display: flex"> <div class="search" style="display: flex">
<el-input style="height: 100%" v-model="keyword" placeholder="搜索医生姓名" <el-input style="height: 100%" v-model="keyword" placeholder="搜索医生姓名"
@keydown.enter="initDoctor" :prefix-icon="Search"></el-input> @keydown.enter="initDoctor" :prefix-icon="Search"></el-input>
<span class="default-btn" @click="allList">全部</span>
</div> </div>
<div class="content_list" style="padding: 0 24px"> <div class="content_list" style="padding: 0 24px">
<ul class="role_list"> <ul class="role_list">
<el-scrollbar style="height: 100%"> <el-scrollbar style="height: 100%">
<li :class="{active:isShowNum==-1}" @click="changeRole(null,-1)">
<span style="flex: 1;min-width: 0" class="name">全部</span>
<span v-if="dateName" class="btn" @click="openDialog(null,-1)"
@mouseover="isShow = -2"
@mouseleave="isShow = -1">
<img v-if="isShow==-2" 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>
<li v-for="(item, index) in roleList" :key="index" <li v-for="(item, index) in roleList" :key="index"
:class="{active:isShowNum==index}" @click="changeRole(item,index)"> :class="{active:isShowNum==index}" @click="changeRole(item,index)">
<span class="name">{{ item.name }}</span> <span class="name">{{ item.name }}</span>
@ -175,9 +187,16 @@ const isShow = ref(-1)
const editRef = ref<any>('') const editRef = ref<any>('')
const openDialog = (item: any, index: any) => { const openDialog = (item: any, index: any) => {
isShow.value = index isShow.value = index
if (item) {
nextTick(() => { nextTick(() => {
editRef.value?.init(item.id) editRef.value?.init(item.id)
}) })
} else {
nextTick(() => {
editRef.value?.init(null)
})
}
} }
const close = () => { const close = () => {
id.value = null id.value = null
@ -190,8 +209,12 @@ const reset = () => {
const doctorId = ref(null) const doctorId = ref(null)
const changeRole = (item: any, index: any) => { const changeRole = (item: any, index: any) => {
isShowNum.value = index isShowNum.value = index
if(index==-1){
allList()
}else{
doctorId.value = item.id doctorId.value = item.id
getPatientList() getPatientList()
}
} }
const allList = () => { const allList = () => {
selectedDate.value = [getPrevious30Days(), getToday().end] selectedDate.value = [getPrevious30Days(), getToday().end]
@ -254,6 +277,7 @@ const allList = () => {
border-radius: 5px; border-radius: 5px;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
color: #999;
&:hover { &:hover {
background: rgba(#4D6DE4, 0.3); background: rgba(#4D6DE4, 0.3);
@ -303,6 +327,7 @@ const allList = () => {
} }
.active { .active {
color: #fff !important;
background: #4D6DE4 !important; background: #4D6DE4 !important;
.name { .name {