Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web
# Conflicts: # src/views/outpatient/index.vue
This commit is contained in:
commit
ceea182071
|
|
@ -130,6 +130,7 @@ const showTooltip = ref(false);
|
|||
const goodsDetail = defineModel<any>();
|
||||
const delGoods = (item: any) => {
|
||||
goodsDetail.value = goodsDetail.value.filter((i: any) => i.id != item.id)
|
||||
|
||||
}
|
||||
|
||||
const goodsSearchApi = "goods/goods/search";
|
||||
|
|
@ -237,6 +238,8 @@ const getHilistInfo = (item: any) => {
|
|||
}
|
||||
const colosInfo = () => {
|
||||
hilistInfo.value = {}
|
||||
getTotalPrice()
|
||||
emit('totalPriceChange')
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
|
|
@ -234,7 +234,10 @@ const setDateTip = () => {
|
|||
|
||||
}
|
||||
watch(() => selectedDate.value, (newValue, oldValue) => {
|
||||
curItem.value=null
|
||||
emit('clickItem', curItem.value)
|
||||
if (newValue == oldValue) {
|
||||
init()
|
||||
return;
|
||||
}
|
||||
if (newValue == null) {
|
||||
|
|
|
|||
|
|
@ -107,8 +107,8 @@
|
|||
</el-descriptions-item>
|
||||
<el-descriptions-item label="费用类型">
|
||||
<el-form-item prop="type">
|
||||
<el-select v-model="edit_data.type" :disabled="edit_data.status==0">
|
||||
<el-option label="普通" :value="1"></el-option>
|
||||
<el-select v-model="edit_data.type" :disabled="edit_data.status==0||isShowCard">
|
||||
<el-option label="自费" :value="1"></el-option>
|
||||
<el-option label="医保" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -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"
|
||||
|
|
@ -137,14 +138,16 @@
|
|||
start="00:00"
|
||||
step="00:15"
|
||||
end="23:45"
|
||||
:min-time="getCurrentTime()"
|
||||
:min-time="getCurrentTime(edit_data.date)"
|
||||
placeholder="选择时间"
|
||||
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,9 @@
|
|||
:data="tableData"
|
||||
style="width: 100%;flex: 1"
|
||||
v-if="!isShowCard"
|
||||
highlight-current-row
|
||||
ref="multipleTable"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column label="险种类型" prop="insutype">
|
||||
<template #default="scope">
|
||||
|
|
@ -269,9 +275,12 @@ const isShow = ref(false)
|
|||
const emit = defineEmits(['close'])
|
||||
const close = () => {
|
||||
isShow.value = false
|
||||
isBtnShow.value = true
|
||||
time.value = ''
|
||||
edit_data.value = {
|
||||
timeList: [],
|
||||
insutype: '',
|
||||
appointmentTime: ''
|
||||
}
|
||||
isShowCard.value = true
|
||||
nextTick(() => {
|
||||
|
|
@ -292,14 +301,15 @@ const dateName = defineModel()
|
|||
const save = () => {
|
||||
if (dateName.value == '现在') {
|
||||
edit_data.value.timeList = ''
|
||||
edit_data.value.appointmentTime = ''
|
||||
} 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(' ')
|
||||
}
|
||||
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 +371,8 @@ const init = (doctorId: any = "", id: any = null, show: any = false) => {
|
|||
isShow.value = true
|
||||
quickShow.value = show
|
||||
edit_data.value.organizationDoctorId = doctorId || ""
|
||||
edit_data.value.type = 1
|
||||
isBtnShow.value = dateName.value == '现在';
|
||||
if (id) {
|
||||
post('registration/getById', {id: id}).then((res: any) => {
|
||||
edit_data.value = res
|
||||
|
|
@ -373,6 +385,7 @@ const init = (doctorId: any = "", id: any = null, show: any = false) => {
|
|||
}
|
||||
const isShowCard = ref<any>(true)
|
||||
const tableData = ref<any>([])
|
||||
const multipleTable = ref<any>()
|
||||
const socialCardUpdate = (e: any) => {
|
||||
isShowCard.value = false
|
||||
if (e) {
|
||||
|
|
@ -383,6 +396,7 @@ const socialCardUpdate = (e: any) => {
|
|||
edit_data.value.certNo = e.data.baseinfo.certno
|
||||
edit_data.value.age = Math.floor(e.data.baseinfo.age)
|
||||
tableData.value = e.data.insuinfo
|
||||
edit_data.value.type = 2
|
||||
if (edit_data.value.certNo) {
|
||||
post('vip/vip/list', {
|
||||
keyword: edit_data.value.certNo,
|
||||
|
|
@ -401,7 +415,8 @@ const socialCardUpdate = (e: any) => {
|
|||
}
|
||||
nextTick(() => {
|
||||
if (tableData.value.length > 0) {
|
||||
height.value = 870
|
||||
height.value = 820
|
||||
multipleTable.value?.setCurrentRow(tableData.value[0])
|
||||
} else {
|
||||
height.value = 570
|
||||
}
|
||||
|
|
@ -450,10 +465,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 +555,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;
|
||||
|
|
|
|||
|
|
@ -170,8 +170,11 @@ const save = () => {
|
|||
)
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
const pageNum = ref<any>(1)
|
||||
const pageSize = ref<any>(20)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
export const formatDate = (date: Date|string): any => {
|
||||
export const formatDate = (date: Date | string): any => {
|
||||
if (date === undefined || date === null) {
|
||||
return '-';
|
||||
}
|
||||
|
|
@ -61,33 +61,48 @@ export const formatDateArray = (dates: Date[]): string[] => {
|
|||
|
||||
export const getToday = () => {
|
||||
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 = () => {
|
||||
const yesterday = new Date();
|
||||
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 = () => {
|
||||
const tomorrow = new Date();
|
||||
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 = () => {
|
||||
const today = new Date();
|
||||
const startOfWeek = new Date(today.setDate(today.getDate() - today.getDay()));
|
||||
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 = () => {
|
||||
const today = new Date();
|
||||
const startOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
|
||||
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[] => {
|
||||
|
|
@ -119,7 +134,7 @@ export const getEndOfDay = (date: Date | string): string => {
|
|||
dateDetail.setHours(23, 59, 59, 0); // 设置为当天 23:59:00
|
||||
return formatDate(dateDetail).slice(0, 19); //
|
||||
};
|
||||
export const getCurrentDate=()=> {
|
||||
export const getCurrentDate = () => {
|
||||
const date = new Date();
|
||||
const year = date.getFullYear();
|
||||
// 月份从0开始,所以要加1
|
||||
|
|
@ -128,7 +143,7 @@ export const getCurrentDate=()=> {
|
|||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
//帮我写个方法获取前30天日期并返回
|
||||
export const getPrevious30Days=()=> {
|
||||
export const getPrevious30Days = () => {
|
||||
const dates = [];
|
||||
const currentDate = new Date();
|
||||
for (let i = 0; i < 31; i++) {
|
||||
|
|
@ -136,13 +151,25 @@ export const getPrevious30Days=()=> {
|
|||
date.setDate(currentDate.getDate() - i);
|
||||
dates.push(date.toISOString().slice(0, 10));
|
||||
}
|
||||
return dates[dates.length-1];
|
||||
return dates[dates.length - 1];
|
||||
}
|
||||
|
||||
//获取当前时间的时分
|
||||
export const getCurrentTime=()=> {
|
||||
const currentDate = new Date();
|
||||
const hours = currentDate.getHours();
|
||||
const minutes = currentDate.getMinutes();
|
||||
return `${hours}:${minutes}`;
|
||||
}
|
||||
export const getCurrentTime = (date:any) => {
|
||||
const today = new Date();
|
||||
const selectedDate =date ? new Date(date) : today;
|
||||
|
||||
// 判断是否是今天
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
|
@ -42,20 +42,21 @@ const handleLogin = async () => {
|
|||
const loginCore=async ()=>{
|
||||
let token:any=await post(apiConfig.ManagerUserLogin, {username: username.value, password: password.value},{catch_error: true})
|
||||
localStorage.setItem('token', token)
|
||||
try{
|
||||
await post(apiConfig.signIn, {mac: netWork.value.mac, ip: netWork.value.ip}, {catch_error: true})
|
||||
}catch (e){
|
||||
ElMessage.warning("签到失败,将以非签到状态访问本系统")
|
||||
}finally {
|
||||
success()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
const success = () => {
|
||||
loading.value = false
|
||||
ElMessageBox.alert('登录成功且签到,即将为您进入到首页', '签到提示', {
|
||||
type:'success',
|
||||
showClose: false,
|
||||
callback: (action: Action) => {
|
||||
router.push("/home/index")
|
||||
},
|
||||
})
|
||||
}
|
||||
const error = (message:any) => {
|
||||
ElMessageBox.alert(message)
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
<el-descriptions-item label="民族">
|
||||
{{ antysList.find((item: any) => item.id == listItem.nation)?.name}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="就诊时间">{{
|
||||
<el-descriptions-item label="上次就诊时间">{{
|
||||
formatListTime(listItem.lastVisitTime)
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
|
|
|
|||
|
|
@ -97,17 +97,26 @@ const save = () => {
|
|||
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) => {
|
||||
ElMessage.success("接诊完毕,请到收费页面收费")
|
||||
medicalQueueRef.value?.changeCurItemOrStatus(null, 2);
|
||||
})
|
||||
}
|
||||
}
|
||||
const totalAmount = ref(0)
|
||||
const medicalHistoryRef = ref()
|
||||
const patientCardRef = ref()
|
||||
const patientRegistration = ref<any>({})// 当前挂号信息
|
||||
const clickItem = (item: any) => {
|
||||
if (!item) return
|
||||
initFormData()
|
||||
if (!item) {
|
||||
medicalHistoryRef.value?.clearList();
|
||||
return
|
||||
}
|
||||
curRegister.value = item
|
||||
registerId.value = item.id
|
||||
itemId.value = item.id
|
||||
|
|
@ -127,7 +136,7 @@ const clickItem = (item: any) => {
|
|||
getOrderTotalPrice()
|
||||
const diagnosisList = JSON.parse(formData.value.diagnosisDetail)
|
||||
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 copyForm = (item: any) => {
|
||||
formData.value.diagnosisMedicalRecord = item.diagnosisMedicalRecord
|
||||
formData.value = item.diagnosisMedicalRecord
|
||||
formData.value.diagType = Number(item.diagnosisMedicalRecord.diagType)
|
||||
const diagnosisList = JSON.parse(item.diagnosisMedicalRecord.diagnosisDetail)
|
||||
const nList = item.diagnosisMedicalRecord.diagnosisSummary.split(',')
|
||||
|
|
@ -213,7 +222,15 @@ watch(() => registerId.value, (newValue) => {
|
|||
getSeeDockerInfo(newValue)
|
||||
})
|
||||
|
||||
|
||||
watch(
|
||||
[() => formData.value.goodsDetail, () => formData.value.itemDetail],
|
||||
([newGoodsDetail, newItemDetail]) => {
|
||||
if (newGoodsDetail || newItemDetail) {
|
||||
getOrderTotalPrice()
|
||||
}
|
||||
},
|
||||
{deep: true}
|
||||
)
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.container {
|
||||
|
|
|
|||
|
|
@ -13,11 +13,23 @@
|
|||
<div class="search" style="display: flex">
|
||||
<el-input style="height: 100%" v-model="keyword" placeholder="搜索医生姓名"
|
||||
@keydown.enter="initDoctor" :prefix-icon="Search"></el-input>
|
||||
<span class="default-btn" @click="allList">全部</span>
|
||||
</div>
|
||||
<div class="content_list" style="padding: 0 24px">
|
||||
<ul class="role_list">
|
||||
<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"
|
||||
:class="{active:isShowNum==index}" @click="changeRole(item,index)">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
|
|
@ -175,9 +187,16 @@ const isShow = ref(-1)
|
|||
const editRef = ref<any>('')
|
||||
const openDialog = (item: any, index: any) => {
|
||||
isShow.value = index
|
||||
if (item) {
|
||||
nextTick(() => {
|
||||
editRef.value?.init(item.id)
|
||||
})
|
||||
} else {
|
||||
nextTick(() => {
|
||||
editRef.value?.init(null)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
const close = () => {
|
||||
id.value = null
|
||||
|
|
@ -190,8 +209,12 @@ const reset = () => {
|
|||
const doctorId = ref(null)
|
||||
const changeRole = (item: any, index: any) => {
|
||||
isShowNum.value = index
|
||||
if(index==-1){
|
||||
allList()
|
||||
}else{
|
||||
doctorId.value = item.id
|
||||
getPatientList()
|
||||
}
|
||||
}
|
||||
const allList = () => {
|
||||
selectedDate.value = [getPrevious30Days(), getToday().end]
|
||||
|
|
@ -254,6 +277,7 @@ const allList = () => {
|
|||
border-radius: 5px;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
color: #999;
|
||||
|
||||
&:hover {
|
||||
background: rgba(#4D6DE4, 0.3);
|
||||
|
|
@ -303,6 +327,7 @@ const allList = () => {
|
|||
}
|
||||
|
||||
.active {
|
||||
color: #fff !important;
|
||||
background: #4D6DE4 !important;
|
||||
|
||||
.name {
|
||||
|
|
|
|||
Loading…
Reference in New Issue