Update visit-record.vue
This commit is contained in:
parent
c76a552939
commit
4ce5cf33c7
@ -2,8 +2,8 @@
|
|||||||
<my-layout class="bg-[#f2f3f4]">
|
<my-layout class="bg-[#f2f3f4]">
|
||||||
<layout-item>
|
<layout-item>
|
||||||
<div class="flex items-center p-15px bg-white border-b border-gray-200">
|
<div class="flex items-center p-15px bg-white border-b border-gray-200">
|
||||||
<el-select v-model="orderType" clearable placeholder="全部类型">
|
<el-select v-model="feeType" clearable placeholder="全部类型">
|
||||||
<el-option v-for=" i in orderTypes" :key="i.value" :label="i.label" :value="i.value" />
|
<el-option v-for="i in feeTypes" :key="i.value" :label="i.label" :value="i.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-date-picker clearable v-model="dates" type="daterange" class="ml-10px w-280px flex-grow-0"
|
<el-date-picker clearable v-model="dates" type="daterange" class="ml-10px w-280px flex-grow-0"
|
||||||
placeholder="全部日期" />
|
placeholder="全部日期" />
|
||||||
@ -20,7 +20,7 @@
|
|||||||
<el-timeline-item v-for="item in i.items" :type="current && current._id === item._id ? 'primary' : ''"
|
<el-timeline-item v-for="item in i.items" :type="current && current._id === item._id ? 'primary' : ''"
|
||||||
:timestamp="item.date" placement="top">
|
:timestamp="item.date" placement="top">
|
||||||
<el-card class="mr-10px cursor-pointer" @click="current = item">
|
<el-card class="mr-10px cursor-pointer" @click="current = item">
|
||||||
<div>{{ item.orderType }}</div>
|
<div>{{ item.feeType === 'YB' ? '医保处方' : '自费处方' }}</div>
|
||||||
<div>{{ item.deptName }} | {{ item.doctorName }}</div>
|
<div>{{ item.deptName }} | {{ item.doctorName }}</div>
|
||||||
<div>{{ item.drugStoreName }}</div>
|
<div>{{ item.drugStoreName }}</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -61,12 +61,12 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const orderTypes = ref([
|
const feeTypes = ref([
|
||||||
{ label: '全部类型', value: '' },
|
{ label: '全部类型', value: '' },
|
||||||
{ label: '在线复诊', value: 'im' },
|
{ label: '医保处方', value: 'YB' },
|
||||||
{ label: '在线续方', value: 'pres' },
|
{ label: '自费处方', value: 'ZF' },
|
||||||
]);
|
]);
|
||||||
const orderType = ref('');
|
const feeType = ref('');
|
||||||
const dates = ref([]);
|
const dates = ref([]);
|
||||||
const list = ref([]);
|
const list = ref([]);
|
||||||
const current = ref(null);
|
const current = ref(null);
|
||||||
@ -95,18 +95,17 @@ async function getList() {
|
|||||||
if (props.patient && props.patient.patientId) {
|
if (props.patient && props.patient.patientId) {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const query = { patientId: props.patient.patientId, orderStatus: 'finished' };
|
const query = { patientId: props.patient.patientId, orderStatus: 'finished' };
|
||||||
if (orderType.value) {
|
|
||||||
query.isPres = orderType.value === 'pres';
|
|
||||||
}
|
|
||||||
if (dates.value && dates.value.length) {
|
if (dates.value && dates.value.length) {
|
||||||
query.startDate = dates.value[0];
|
query.startDate = dates.value[0];
|
||||||
query.endDate = dates.value[1];
|
query.endDate = dates.value[1];
|
||||||
}
|
}
|
||||||
|
if (feeType.value) {
|
||||||
|
query.feeType = feeType.value;
|
||||||
|
}
|
||||||
const { data, success, message } = await useHlw({ type: 'getPatientOrderList', ...query });
|
const { data, success, message } = await useHlw({ type: 'getPatientOrderList', ...query });
|
||||||
list.value = data && Array.isArray(data.list) ? data.list.map(i => ({
|
list.value = data && Array.isArray(data.list) ? data.list.map(i => ({
|
||||||
...i,
|
...i,
|
||||||
date: dayjs(i.createTime).format('MM-DD HH:mm'),
|
date: dayjs(i.createTime).format('MM-DD HH:mm'),
|
||||||
orderType: i.preOrderId ? '在线续方' : '在线复诊',
|
|
||||||
})) : [];
|
})) : [];
|
||||||
if (!success) {
|
if (!success) {
|
||||||
ElMessage.error(message || '获取数据失败,请稍后重试!')
|
ElMessage.error(message || '获取数据失败,请稍后重试!')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user