dev
This commit is contained in:
parent
c4e690f6ec
commit
2fc45d13a3
|
|
@ -26,5 +26,6 @@ export enum apiConfig{
|
||||||
* 收费接口
|
* 收费接口
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"ChargeListChargeLog"="charge/listChargeLog"//查询收费记录
|
"ChargeListChargeLog"="charge/listChargeLog",//查询收费记录
|
||||||
|
"recordGetChargeQueue"="medical/record/getChargeQueue"//查询收费记录
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<Panel title="收费队列">
|
<Panel title="收费队列">
|
||||||
<template #tools>
|
<template #tools>
|
||||||
<el-button type="primary" size="small">新增患者</el-button>
|
<el-button type="primary" plain size="small">新增患者</el-button>
|
||||||
|
<el-button type="primary" size="small" plain @click="setDate">
|
||||||
|
{{ selectedDateStr }}
|
||||||
|
<el-icon class="el-icon--right">
|
||||||
|
<CaretBottom/>
|
||||||
|
</el-icon>
|
||||||
|
</el-button>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="selectedDate"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期"
|
||||||
|
ref="datePickerRef"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #default>
|
<template #default>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
@ -16,7 +30,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<ul>
|
<ul v-loading="loading">
|
||||||
<li class="list-item" :class="curItem.id == item.id ? 'active' : ''"
|
<li class="list-item" :class="curItem.id == item.id ? 'active' : ''"
|
||||||
v-for="(item, index) in ChargeQueueList"
|
v-for="(item, index) in ChargeQueueList"
|
||||||
:key="index" @click="clickItem(item)">
|
:key="index" @click="clickItem(item)">
|
||||||
|
|
@ -44,10 +58,12 @@
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {onMounted, ref} from "vue";
|
import {onMounted, ref, watch} from "vue";
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
import Panel from "@/components/common/Panel.vue";
|
import Panel from "@/components/common/Panel.vue";
|
||||||
import {formatListTime, getToday} from "@/utils/dateUtils.ts";
|
import {formatListTime, getCurrentDate, getEndOfDay, getToday} from "@/utils/dateUtils.ts";
|
||||||
|
import {CaretBottom} from "@element-plus/icons-vue";
|
||||||
|
import {apiConfig} from "@/assets/config/apiConfig.ts";
|
||||||
|
|
||||||
const curItem = ref<any>({});
|
const curItem = ref<any>({});
|
||||||
const emit = defineEmits(['clickItem'])
|
const emit = defineEmits(['clickItem'])
|
||||||
|
|
@ -55,16 +71,9 @@ const clickItem = (item: any) => {
|
||||||
curItem.value = item
|
curItem.value = item
|
||||||
emit('clickItem', item, query.value.status);
|
emit('clickItem', item, query.value.status);
|
||||||
}
|
}
|
||||||
const data = ref<any>(getToday())
|
const loading= ref(false)
|
||||||
const ChargeQueueList = ref<any>([]);
|
const ChargeQueueList = ref<any>([]);
|
||||||
const query = ref({
|
|
||||||
pageSize: 20,
|
|
||||||
pageNum: 1,
|
|
||||||
keyword: "",
|
|
||||||
status: 0,
|
|
||||||
beginTime: data.value.start,
|
|
||||||
endTime: data.value.end
|
|
||||||
})
|
|
||||||
const addChargeOrder = () => {
|
const addChargeOrder = () => {
|
||||||
const newOrder = {
|
const newOrder = {
|
||||||
id: -1,
|
id: -1,
|
||||||
|
|
@ -80,21 +89,39 @@ const addChargeOrder = () => {
|
||||||
const clickFirst = () => {
|
const clickFirst = () => {
|
||||||
clickItem(ChargeQueueList.value[0])
|
clickItem(ChargeQueueList.value[0])
|
||||||
}
|
}
|
||||||
const getOrderList = () => {
|
const selectedDate: any = ref('')
|
||||||
post("medical/record/getChargeQueue", {query: query.value}).then(
|
const query = ref({
|
||||||
(res: any) => {
|
pageSize: 20,
|
||||||
ChargeQueueList.value = res.list
|
pageNum: 1,
|
||||||
clickFirst()
|
keyword: "",
|
||||||
}
|
status: 0,
|
||||||
)
|
beginTime: selectedDate.value,
|
||||||
|
endTime: getEndOfDay(selectedDate.value)
|
||||||
|
})
|
||||||
|
const init = async () => {
|
||||||
|
selectedDateStr.value = setDateTip()
|
||||||
|
query.value.beginTime = selectedDate.value
|
||||||
|
query.value.endTime = getEndOfDay(selectedDate.value)
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
let data:any = await post(apiConfig.recordGetChargeQueue, {query: query.value}, {catch_error: true})
|
||||||
|
ChargeQueueList.value = data.list
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
getTipCount()
|
||||||
|
|
||||||
}
|
}
|
||||||
const delDraft = () => {
|
const delDraft = () => {
|
||||||
ChargeQueueList.value.shift();
|
ChargeQueueList.value.shift();
|
||||||
clickFirst()
|
clickFirst()
|
||||||
}
|
}
|
||||||
defineExpose({delDraft, getOrderList})
|
defineExpose({delDraft, init})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getOrderList()
|
selectedDate.value = getCurrentDate()
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
const statusList = ref([
|
const statusList = ref([
|
||||||
|
|
@ -111,14 +138,51 @@ const statusList = ref([
|
||||||
])
|
])
|
||||||
const tab = (item: any) => {
|
const tab = (item: any) => {
|
||||||
query.value.status = item.value
|
query.value.status = item.value
|
||||||
getOrderList()
|
init()
|
||||||
}
|
}
|
||||||
const init = () => {
|
const getTipCount = () => {
|
||||||
post('statistics/getTipCount', {beginTime: data.value.start, endTime: data.value.end}).then((res: any) => {
|
post('statistics/getTipCount', {
|
||||||
|
beginTime: selectedDate.value,
|
||||||
|
endTime: getEndOfDay(selectedDate.value)
|
||||||
|
}).then((res: any) => {
|
||||||
statusList.value[0].num = res.unchargedCount
|
statusList.value[0].num = res.unchargedCount
|
||||||
statusList.value[1].num = res.chargedCount
|
statusList.value[1].num = res.chargedCount
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const selectedDateStr: any = ref('')
|
||||||
|
const datePickerRef = ref()
|
||||||
|
const setDate = function () {
|
||||||
|
if (datePickerRef.value) {
|
||||||
|
datePickerRef.value.handleOpen()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const setDateTip = () => {
|
||||||
|
const seletctedDateObj = new Date(selectedDate.value);
|
||||||
|
//如果选择的日期是今天
|
||||||
|
if (seletctedDateObj.getFullYear() == new Date().getFullYear() && seletctedDateObj.getMonth() == new Date().getMonth() && seletctedDateObj.getDate() == new Date().getDate()) {
|
||||||
|
return '今天'
|
||||||
|
}
|
||||||
|
if (seletctedDateObj.getFullYear() == new Date().getFullYear() && seletctedDateObj.getMonth() == new Date().getMonth() && seletctedDateObj.getDate() == new Date().getDate() - 1) {
|
||||||
|
return '昨天'
|
||||||
|
}
|
||||||
|
//如果为今年
|
||||||
|
if (seletctedDateObj.getFullYear() == new Date().getFullYear()) {
|
||||||
|
return `${seletctedDateObj.getMonth() + 1}-${seletctedDateObj.getDate()}`
|
||||||
|
}
|
||||||
|
return seletctedDateObj.getFullYear();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
watch(() => selectedDate.value, (newValue, oldValue) => {
|
||||||
|
if (newValue == oldValue) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (newValue == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
init()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.container {
|
.container {
|
||||||
|
|
@ -247,4 +311,13 @@ const init = () => {
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.el-input--prefix) {
|
||||||
|
visibility: hidden;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 50px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<Panel :title="'就诊队列'" style="height: 100%">
|
<Panel :title="'就诊队列'" style="height: 100%">
|
||||||
<template #tools>
|
<template #tools>
|
||||||
<div @click="setDate">{{selectedDateStr}}</div>
|
<el-button type="primary" plain @click="setDate">
|
||||||
|
{{selectedDateStr}}
|
||||||
|
<el-icon class="el-icon--right"><CaretBottom /></el-icon>
|
||||||
|
</el-button>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="selectedDate"
|
v-model="selectedDate"
|
||||||
type="date"
|
type="date"
|
||||||
|
|
@ -52,6 +55,7 @@ import {post} from "@/utils/request.ts";
|
||||||
import {formatListTime, getToday, getThisMonth, getCurrentDate, getEndOfDay} from "@/utils/dateUtils.ts";
|
import {formatListTime, getToday, getThisMonth, getCurrentDate, getEndOfDay} from "@/utils/dateUtils.ts";
|
||||||
import {apiConfig} from "@/assets/config/apiConfig.ts";
|
import {apiConfig} from "@/assets/config/apiConfig.ts";
|
||||||
import {ElMessageBox} from "element-plus";
|
import {ElMessageBox} from "element-plus";
|
||||||
|
import {CaretBottom} from '@element-plus/icons-vue'
|
||||||
const curStatus = ref(1)
|
const curStatus = ref(1)
|
||||||
const search = ref('')
|
const search = ref('')
|
||||||
const curItem = ref<any>('')
|
const curItem = ref<any>('')
|
||||||
|
|
@ -119,7 +123,6 @@ const init = async () => {
|
||||||
}
|
}
|
||||||
initStatusList()
|
initStatusList()
|
||||||
}
|
}
|
||||||
const data = ref<any>(getToday())
|
|
||||||
const initStatusList = () => {
|
const initStatusList = () => {
|
||||||
post('statistics/getTipCount', {
|
post('statistics/getTipCount', {
|
||||||
beginTime: selectedDate.value,
|
beginTime: selectedDate.value,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue