fix: 中药处方修复
This commit is contained in:
@@ -53,6 +53,11 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
userStore.setUserInfo(userInfo);
|
||||
accessStore.setAccessCodes(accessCodes);
|
||||
|
||||
console.log(userInfo.home_path);
|
||||
console.log(DEFAULT_HOME_PATH);
|
||||
// console.log(accessStore.loginExpired);
|
||||
// console.log(onSuccess?.());
|
||||
// console.log(onSuccess);
|
||||
if (accessStore.loginExpired) {
|
||||
accessStore.setLoginExpired(false);
|
||||
} else {
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import {computed, ref, watch} from 'vue';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { debounce } from 'lodash-es'; // 或者使用自定义防抖函数
|
||||
import {Page, useVbenModal} from '@vben/common-ui';
|
||||
import {useUserStore} from '@vben/stores';
|
||||
|
||||
import { MinusOutlined, PlusOutlined, DeleteTwoTone } from '@ant-design/icons-vue';
|
||||
import {
|
||||
Badge,
|
||||
DeleteTwoTone,
|
||||
MinusOutlined,
|
||||
PlusOutlined,
|
||||
} from '@ant-design/icons-vue';
|
||||
import {
|
||||
Button,
|
||||
Card, CardMeta,
|
||||
Card,
|
||||
Col,
|
||||
Descriptions,
|
||||
Empty,
|
||||
Image,
|
||||
ImagePreviewGroup,
|
||||
Input,
|
||||
InputNumber, InputSearch,
|
||||
InputNumber,
|
||||
message,
|
||||
Popover,
|
||||
RadioButton,
|
||||
RadioGroup,
|
||||
Row,
|
||||
@@ -28,22 +29,26 @@ import {
|
||||
Timeline,
|
||||
TimelineItem,
|
||||
} from 'ant-design-vue';
|
||||
import {debounce} from 'lodash-es'; // 或者使用自定义防抖函数
|
||||
|
||||
import { getRegisterStatus } from '#/util/tool';
|
||||
import {getRegisterStatus} from '#/util/tool';
|
||||
import {
|
||||
addWestPrescription, endOfDiagnosisApi,
|
||||
getDrugUseList, getMyStoreListApi,
|
||||
addWestPrescription,
|
||||
endOfDiagnosisApi,
|
||||
getDrugUseList,
|
||||
getMyStoreListApi,
|
||||
getPatientItem,
|
||||
getPatientList,
|
||||
getProcessRuleList, getProductListDoctorReception,
|
||||
getProcessRuleList,
|
||||
getProductListDoctorReception,
|
||||
receptionApi,
|
||||
switchStoreApi,
|
||||
} from '#/views/doctor/doctor-reception/api';
|
||||
|
||||
import DiagnosisModal from './components/DiagnosisModal.vue';
|
||||
import DoctorOrderModal from './components/DoctorOrderModal.vue';
|
||||
import PrescrtionDetail from './components/PrescrtionDetail.vue';
|
||||
import WesternModal from './components/WesternModal.vue';
|
||||
import {useUserStore} from "@vben/stores";
|
||||
|
||||
interface Patient {
|
||||
id: number;
|
||||
@@ -91,13 +96,13 @@ const myStoreList = ref([]);
|
||||
function getMyStoreList() {
|
||||
getMyStoreListApi().then((res) => {
|
||||
myStoreList.value = res;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
getMyStoreList();
|
||||
|
||||
const userStore = useUserStore();
|
||||
const myStoreId = ref(userStore.userInfo.store_id)
|
||||
const myStoreId = ref(userStore.userInfo.store_id);
|
||||
// userStore.userInfo?.nick_name
|
||||
console.log(userStore.userInfo.store_id);
|
||||
|
||||
@@ -129,18 +134,20 @@ function getPatientListByReception() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updatePatientList() {
|
||||
updateTabType.value = true;
|
||||
getPatientListByReception();
|
||||
}
|
||||
|
||||
getPatientListByReception();
|
||||
// 每5秒更新数据
|
||||
setInterval(getPatientListByReception, 600_000);
|
||||
|
||||
// 药品分类
|
||||
const categories = [
|
||||
{ label: '中药', value: 1 },
|
||||
{ label: '中成(西)药', value: 2 },
|
||||
{label: '中药', value: 1},
|
||||
{label: '中成(西)药', value: 2},
|
||||
// { label: '西药', value: 2 },
|
||||
// { label: '保健商品', value: 3 },
|
||||
// { label: '中成药商品', value: 4 },
|
||||
@@ -175,12 +182,15 @@ function getDrugUseListByWesternModal() {
|
||||
// drugProcessRule.value = res.drug_process_rule;
|
||||
});
|
||||
}
|
||||
|
||||
getDrugUseListByWesternModal();
|
||||
|
||||
const selectProductId = ref(0);
|
||||
|
||||
function selectProductChange(id) {
|
||||
selectProductId.value = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择中药用法
|
||||
* @param id
|
||||
@@ -190,14 +200,15 @@ function selectDrugUseWayChange(id) {
|
||||
// 修改item下面drug的 frequency_id = id
|
||||
item.index_id === selectProductId.value
|
||||
? {
|
||||
...item,
|
||||
way_id: id,
|
||||
use_ways: drugUseWay.value.find((value) => value.id === id),
|
||||
}
|
||||
...item,
|
||||
way_id: id,
|
||||
use_ways: drugUseWay.value.find((value) => value.id === id),
|
||||
}
|
||||
: item,
|
||||
);
|
||||
updateLocalStorage();
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算商品总价
|
||||
*/
|
||||
@@ -543,9 +554,11 @@ const openDoctorOrderModal = () => {
|
||||
});
|
||||
DoctorOrderModalApi.open();
|
||||
};
|
||||
|
||||
function updateDoctorOrder(values) {
|
||||
medicalAdvice.value = values;
|
||||
}
|
||||
|
||||
const [PrescrtionDetailModal, PrescrtionDetailModalApi] = useVbenModal({
|
||||
connectedComponent: PrescrtionDetail,
|
||||
});
|
||||
@@ -596,18 +609,22 @@ function reception() {
|
||||
receptionStatus.value = 2;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束诊断
|
||||
*/
|
||||
function endOfDiagnosis() {
|
||||
endOfDiagnosisApi(localStorage.getItem(`doctorReception-id`)).then((value) => {
|
||||
message.success('接诊成功');
|
||||
updateTabType.value = false;
|
||||
getPatientListByReception();
|
||||
receptionStatus.value = 2;
|
||||
tabType.value = 0;
|
||||
});
|
||||
endOfDiagnosisApi(localStorage.getItem(`doctorReception-id`)).then(
|
||||
(value) => {
|
||||
message.success('接诊成功');
|
||||
updateTabType.value = false;
|
||||
getPatientListByReception();
|
||||
receptionStatus.value = 2;
|
||||
tabType.value = 0;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// 基础配置
|
||||
const processRuleList = ref([]);
|
||||
// 子配置
|
||||
@@ -617,16 +634,17 @@ const processRuleNoteList = ref([]);
|
||||
const processRuleId = ref();
|
||||
const processRuleNoteId = ref();
|
||||
const childProcessRuleId = ref();
|
||||
|
||||
function getProcessRuleListByDoctor(pid = 0, ruleId = 0) {
|
||||
let data = {};
|
||||
data =
|
||||
ruleId === 0
|
||||
? {
|
||||
pid,
|
||||
}
|
||||
pid,
|
||||
}
|
||||
: {
|
||||
rule_id: ruleId,
|
||||
};
|
||||
rule_id: ruleId,
|
||||
};
|
||||
getProcessRuleList(data).then((value) => {
|
||||
if (ruleId !== 0) {
|
||||
processRuleNoteList.value = value;
|
||||
@@ -668,13 +686,14 @@ function selectProcessRuleNotCommit(id) {
|
||||
|
||||
const packageMethodId = ref(2);
|
||||
const packageMethod = [
|
||||
{ label: '味包', value: 1 },
|
||||
{ label: '剂包', value: 2 },
|
||||
{label: '味包', value: 1},
|
||||
{label: '剂包', value: 2},
|
||||
];
|
||||
|
||||
function selectPackageMethod(id) {
|
||||
packageMethodId.value = id;
|
||||
}
|
||||
|
||||
// jishu
|
||||
const dosage = ref(7);
|
||||
const dayDosage = ref(2);
|
||||
@@ -683,6 +702,22 @@ function updateChineseNumber() {
|
||||
updateLocalStorage();
|
||||
}
|
||||
|
||||
function updateChineseNumberGoNewDrug(event: KeyboardEvent) {
|
||||
console.log(event.key);
|
||||
if (event.key === 'Enter') {
|
||||
updateLocalStorage();
|
||||
setTimeout(() => {
|
||||
// 获取新药品卡片中的克数输入框并聚焦
|
||||
const newDrugNumberInput = document.querySelector(
|
||||
'.new-select-drug-name input',
|
||||
);
|
||||
if (newDrugNumberInput) {
|
||||
(newDrugNumberInput as HTMLElement).focus();
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药品列表
|
||||
* @param {string} searchText - 搜索关键词
|
||||
@@ -734,12 +769,13 @@ function selectNewDrugInfo() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const data = drugList.value.find((v) => v.drug_id === newDrugInfo.value.id);
|
||||
newDrugInfo.value.price = data.price;
|
||||
setTimeout(() => {
|
||||
// 获取新药品卡片中的克数输入框并聚焦
|
||||
const newDrugNumberInput = document.querySelector('.new-number-input input');
|
||||
const newDrugNumberInput = document.querySelector(
|
||||
'.new-number-input input',
|
||||
);
|
||||
if (newDrugNumberInput) {
|
||||
(newDrugNumberInput as HTMLElement).focus();
|
||||
}
|
||||
@@ -748,6 +784,7 @@ function selectNewDrugInfo() {
|
||||
|
||||
const selectChineseIndex = ref(-1);
|
||||
const selectChineseId = ref(0);
|
||||
|
||||
/**
|
||||
* 选择药品
|
||||
* @param id
|
||||
@@ -757,16 +794,15 @@ function selectOldDrugInfo(id) {
|
||||
localStorage.getItem(`prescriptionData${activePatient.value?.id}`) || '[]',
|
||||
).find((v) => v.id === id);
|
||||
if (check) {
|
||||
currentDrugs.value[selectChineseIndex.value].id = selectChineseId.value
|
||||
currentDrugs.value[selectChineseIndex.value].id = selectChineseId.value;
|
||||
drugList.value = [];
|
||||
message.error('该药品已经在处方中了!');
|
||||
return;
|
||||
}
|
||||
let oldDrugInfo = currentDrugs.value[selectChineseIndex.value]
|
||||
const oldDrugInfo = currentDrugs.value[selectChineseIndex.value];
|
||||
// 如果是新药品输入框,调用添加新药品方法
|
||||
const data = drugList.value.find((v) => v.drug_id === id);
|
||||
|
||||
|
||||
// 创建新的商品对象(避免直接修改原始数据)
|
||||
const newProduct = {
|
||||
// 索引ID(用于在列表中查找)
|
||||
@@ -808,18 +844,19 @@ function selectOldDrugInfo(id) {
|
||||
// 药品类型
|
||||
type: data.drug.type,
|
||||
};
|
||||
currentDrugs.value[selectChineseIndex.value] = newProduct
|
||||
currentDrugs.value[selectChineseIndex.value] = newProduct;
|
||||
updateLocalStorage();
|
||||
// const data = drugList.value.find((v) => v.drug_id === id);
|
||||
setTimeout(() => {
|
||||
// 获取新药品卡片中的克数输入框并聚焦
|
||||
const newDrugNumberInput = document.querySelector('.old-number-input-' + selectChineseIndex.value + ' input');
|
||||
const newDrugNumberInput = document.querySelector(
|
||||
`.old-number-input-${selectChineseIndex.value} input`,
|
||||
);
|
||||
if (newDrugNumberInput) {
|
||||
(newDrugNumberInput as HTMLElement).focus();
|
||||
}
|
||||
}, 100);
|
||||
return console.log(oldDrugInfo, data, 'ssssssssss')
|
||||
|
||||
return console.log(oldDrugInfo, data, 'ssssssssss');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -827,9 +864,10 @@ function selectOldDrugInfo(id) {
|
||||
* @param index
|
||||
*/
|
||||
function setSelectChineseIndex(index, id) {
|
||||
selectChineseIndex.value = index
|
||||
selectChineseId.value = id
|
||||
selectChineseIndex.value = index;
|
||||
selectChineseId.value = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询中药列表
|
||||
* @param inputValue
|
||||
@@ -849,12 +887,21 @@ function selectDrugByNewDrugInfo(event: KeyboardEvent, isNewDrug: boolean) {
|
||||
|
||||
if (isNewDrug) {
|
||||
// 如果是新药品输入框,调用添加新药品方法
|
||||
const check = currentDrugs.value.find((v) => v.id === newDrugInfo.value.id);
|
||||
const check = currentDrugs.value.find(
|
||||
(v) => v.id === newDrugInfo.value.id,
|
||||
);
|
||||
if (check) {
|
||||
message.error('该药品已经在处方中了!');
|
||||
return;
|
||||
}
|
||||
const data = drugList.value.find((v) => v.drug_id === newDrugInfo.value.id);
|
||||
const data = drugList.value.find(
|
||||
(v) => v.drug_id === newDrugInfo.value.id,
|
||||
);
|
||||
if (data === null || data === undefined) {
|
||||
message.error('请选择药品');
|
||||
return;
|
||||
}
|
||||
console.log(data, ';sssssssssssssssssssssssssssssssss');
|
||||
data.drug.number = newDrugInfo.value.number;
|
||||
data.drug.way_id = newDrugInfo.value.way_id;
|
||||
addProducts(data);
|
||||
@@ -865,7 +912,9 @@ function selectDrugByNewDrugInfo(event: KeyboardEvent, isNewDrug: boolean) {
|
||||
}
|
||||
setTimeout(() => {
|
||||
// 获取新药品卡片中的克数输入框并聚焦
|
||||
const newDrugNumberInput = document.querySelector('.new-select-drug-name input');
|
||||
const newDrugNumberInput = document.querySelector(
|
||||
'.new-select-drug-name input',
|
||||
);
|
||||
if (newDrugNumberInput) {
|
||||
(newDrugNumberInput as HTMLElement).focus();
|
||||
}
|
||||
@@ -879,7 +928,9 @@ function selectDrugByNewDrugInfo(event: KeyboardEvent, isNewDrug: boolean) {
|
||||
*/
|
||||
function addProducts(data) {
|
||||
// 查找是否已存在于选择列表中
|
||||
const existItem = currentDrugs.value.find((item) => item.index_id === data.id);
|
||||
const existItem = currentDrugs.value.find(
|
||||
(item) => item.index_id === data.id,
|
||||
);
|
||||
|
||||
if (existItem) {
|
||||
message.warn('已经存在了');
|
||||
@@ -927,7 +978,6 @@ function addProducts(data) {
|
||||
type: data.drug.type,
|
||||
};
|
||||
|
||||
|
||||
// 首次添加,初始化数量为1
|
||||
newProduct.select_number = 1;
|
||||
|
||||
@@ -941,19 +991,47 @@ function addProducts(data) {
|
||||
message.success(`已将${newProduct.drug_name}添加到清单中!`);
|
||||
}
|
||||
|
||||
const newDrugInfo = ref({})
|
||||
const newDrugInfo = ref({});
|
||||
|
||||
function switchStore(id) {
|
||||
switchStoreApi({store_id: id}).then(() => {
|
||||
myStoreId.value = id;
|
||||
updateLocalStorageStoreInfo();
|
||||
// 根据id在storeList中查找诊所名称
|
||||
const storeInfo = myStoreList.value.find((item) => item.id === id);
|
||||
message.success(`已经切换到【${storeInfo.name}】`);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 储存本地缓存
|
||||
*/
|
||||
function updateLocalStorageStoreInfo() {
|
||||
localStorage.setItem(`myStoreId`, myStoreId.value);
|
||||
userStore.userInfo.store_id = myStoreId.value;
|
||||
userStore.setUserInfo(userStore.userInfo);
|
||||
tabType.value = 0;
|
||||
getPatientListByReception();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="container-box">
|
||||
<!-- 左侧患者列表 -->
|
||||
<div class="patient-panel">
|
||||
<Select class="w-full" v-model:value="myStoreId">
|
||||
<SelectOption v-for="item in myStoreList" :value="item.id">{{ item.name }}</SelectOption>
|
||||
<Select v-model:value="myStoreId" class="w-full" @change="switchStore">
|
||||
<SelectOption v-for="item in myStoreList" :value="item.id">
|
||||
{{ item.name }}
|
||||
</SelectOption>
|
||||
</Select>
|
||||
<RadioGroup v-model:value="listType" @change="updatePatientList" class="w-full" style="text-align: center">
|
||||
<RadioButton class="w-1/2" :value="1">当前</RadioButton>
|
||||
<RadioButton class="w-1/2" :value="2">历史</RadioButton>
|
||||
<RadioGroup
|
||||
v-model:value="listType"
|
||||
class="w-full"
|
||||
style="text-align: center"
|
||||
@change="updatePatientList"
|
||||
>
|
||||
<RadioButton :value="1" class="w-1/2">当前</RadioButton>
|
||||
<RadioButton :value="2" class="w-1/2">历史</RadioButton>
|
||||
</RadioGroup>
|
||||
<div
|
||||
v-for="patient in patients"
|
||||
@@ -966,9 +1044,9 @@ const newDrugInfo = ref({})
|
||||
<h3>{{ patient.user_patient.name }}</h3>
|
||||
<p class="phone">{{ patient.user_patient.mobile }}</p>
|
||||
<span :class="getRegisterStatus(patient.status)" class="status">{{
|
||||
getRegisterStatus(patient.status)
|
||||
}}</span>
|
||||
{{patient.updated_at}}
|
||||
getRegisterStatus(patient.status)
|
||||
}}</span>
|
||||
{{ patient.updated_at }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -992,7 +1070,13 @@ const newDrugInfo = ref({})
|
||||
>
|
||||
开具处方
|
||||
</Button>
|
||||
<Button v-if="receptionStatus === 2" class="mb-10 ml-10" type="primary" @click="endOfDiagnosis" danger >
|
||||
<Button
|
||||
v-if="receptionStatus === 2"
|
||||
class="mb-10 ml-10"
|
||||
danger
|
||||
type="primary"
|
||||
@click="endOfDiagnosis"
|
||||
>
|
||||
结束诊断
|
||||
</Button>
|
||||
</div>
|
||||
@@ -1027,8 +1111,8 @@ const newDrugInfo = ref({})
|
||||
>
|
||||
<Descriptions.Item label="肝功能">
|
||||
<span>{{
|
||||
userPatientHealthInquiry.liver_function === 0 ? '正常' : '异常'
|
||||
}}</span>
|
||||
userPatientHealthInquiry.liver_function === 0 ? '正常' : '异常'
|
||||
}}</span>
|
||||
<p
|
||||
v-if="userPatientHealthInquiry.liver_function === 1"
|
||||
class="mt-3"
|
||||
@@ -1045,8 +1129,8 @@ const newDrugInfo = ref({})
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="肾功能">
|
||||
<span>{{
|
||||
userPatientHealthInquiry.renal_function === 0 ? '正常' : '异常'
|
||||
}}</span>
|
||||
userPatientHealthInquiry.renal_function === 0 ? '正常' : '异常'
|
||||
}}</span>
|
||||
<p
|
||||
v-if="userPatientHealthInquiry.renal_function === 1"
|
||||
class="mt-3"
|
||||
@@ -1063,8 +1147,8 @@ const newDrugInfo = ref({})
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="既往史">
|
||||
<span>{{
|
||||
userPatientHealthInquiry.person_status === 0 ? '无' : '有'
|
||||
}}</span>
|
||||
userPatientHealthInquiry.person_status === 0 ? '无' : '有'
|
||||
}}</span>
|
||||
<p v-if="userPatientHealthInquiry.person_status === 1" class="mt-3">
|
||||
<Tag
|
||||
v-for="item in splitString(
|
||||
@@ -1078,8 +1162,8 @@ const newDrugInfo = ref({})
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="过敏史">
|
||||
<span>{{
|
||||
userPatientHealthInquiry.allergic_status === 0 ? '无' : '有'
|
||||
}}</span>
|
||||
userPatientHealthInquiry.allergic_status === 0 ? '无' : '有'
|
||||
}}</span>
|
||||
<p
|
||||
v-if="userPatientHealthInquiry.allergic_status === 1"
|
||||
class="mt-3"
|
||||
@@ -1096,8 +1180,8 @@ const newDrugInfo = ref({})
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="家庭遗传史">
|
||||
<span>{{
|
||||
userPatientHealthInquiry.family_status === 0 ? '无' : '有'
|
||||
}}</span>
|
||||
userPatientHealthInquiry.family_status === 0 ? '无' : '有'
|
||||
}}</span>
|
||||
<p v-if="userPatientHealthInquiry.family_status === 1" class="mt-3">
|
||||
<Tag
|
||||
v-for="item in splitString(
|
||||
@@ -1124,14 +1208,15 @@ const newDrugInfo = ref({})
|
||||
查看处方
|
||||
</Button>
|
||||
<span class="time-line-item-created">{{
|
||||
item.created_at
|
||||
}}</span>
|
||||
item.created_at
|
||||
}}</span>
|
||||
<Tag class="ml-5">
|
||||
{{ item.prescription_type === 1 ? '中药处方' : '西药处方' }} / {{ item.category === 1 ? '自费' : '医保' }}
|
||||
{{ item.prescription_type === 1 ? '中药处方' : '西药处方' }} /
|
||||
{{ item.category === 1 ? '自费' : '医保' }}
|
||||
</Tag>
|
||||
<!-- <Tag class="ml-5">-->
|
||||
<!-- {{ item.category === 1 ? '自费' : '医保' }}-->
|
||||
<!-- </Tag>-->
|
||||
<!-- <Tag class="ml-5">-->
|
||||
<!-- {{ item.category === 1 ? '自费' : '医保' }}-->
|
||||
<!-- </Tag>-->
|
||||
</TimelineItem>
|
||||
</Timeline>
|
||||
</Descriptions.Item>
|
||||
@@ -1164,8 +1249,17 @@ const newDrugInfo = ref({})
|
||||
</div>
|
||||
|
||||
<div class="mt-5">
|
||||
<Button v-if="activeCategory !== 1" type="primary" @click="openWesternModal"> 添加商品 </Button>
|
||||
<RadioGroup v-model:value="category" :class="activeCategory !== 1? 'ml-5': ''">
|
||||
<Button
|
||||
v-if="activeCategory !== 1"
|
||||
type="primary"
|
||||
@click="openWesternModal"
|
||||
>
|
||||
添加商品
|
||||
</Button>
|
||||
<RadioGroup
|
||||
v-model:value="category"
|
||||
:class="activeCategory !== 1 ? 'ml-5' : ''"
|
||||
>
|
||||
<RadioButton :value="1">自费</RadioButton>
|
||||
<RadioButton :value="2">医保</RadioButton>
|
||||
</RadioGroup>
|
||||
@@ -1188,36 +1282,41 @@ const newDrugInfo = ref({})
|
||||
</div>
|
||||
<!-- 已选药品列表 -->
|
||||
<!-- 中药 -->
|
||||
<div v-if="activeCategory === 1" class="mb-5 mt-3">
|
||||
<div v-if="activeCategory === 1" class="mb-5 mt-3 flex" style="flex-wrap: wrap; width: 100%;">
|
||||
<Row>
|
||||
<Col
|
||||
v-for="(drug, index) in currentDrugs"
|
||||
:key="drug.id"
|
||||
:xxl="12"
|
||||
:xl="12"
|
||||
:lg="12"
|
||||
:md="24"
|
||||
:sm="24"
|
||||
:xl="12"
|
||||
:xs="24"
|
||||
:xxl="8"
|
||||
>
|
||||
<Card title="" class="mt-0">
|
||||
<Card class="mt-0" title="">
|
||||
<div>
|
||||
<span class="card-index">{{ index + 1 }}、</span>
|
||||
<p>
|
||||
<span style="font-size: 20px; font-weight: bold">{{(index+1)}}、</span>
|
||||
<Select
|
||||
show-search
|
||||
class="w-1/5 old-select-drug-name"
|
||||
placeholder="药名"
|
||||
:filter-option="false"
|
||||
v-model:value="drug.id"
|
||||
:filter-option="false"
|
||||
class="old-select-drug-name"
|
||||
style="min-width: 100px"
|
||||
placeholder="药名"
|
||||
show-search
|
||||
@change="selectOldDrugInfo"
|
||||
@dropdown-visible-change="
|
||||
setSelectChineseIndex(index, drug.id)
|
||||
"
|
||||
@search="searchOption"
|
||||
@dropdown-visible-change="setSelectChineseIndex(index, drug.id)"
|
||||
>
|
||||
<SelectOption v-if="drugList.length === 0" :value="drug.id">{{drug.drug_name}}</SelectOption>
|
||||
<SelectOption v-if="drugList.length === 0" :value="drug.id">
|
||||
{{ drug.drug_name }}
|
||||
</SelectOption>
|
||||
<SelectOption
|
||||
v-else
|
||||
v-for="(value, index) in drugList"
|
||||
v-else
|
||||
:key="index"
|
||||
:value="value.drug.id"
|
||||
>
|
||||
@@ -1227,58 +1326,60 @@ const newDrugInfo = ref({})
|
||||
,
|
||||
<InputNumber
|
||||
v-model:value="drug.number"
|
||||
:class="'w-1/5 ' + 'old-number-input-' + index"
|
||||
:class="`w-1/5 old-number-input-${index}`"
|
||||
style="min-width: 100px"
|
||||
:controls="false"
|
||||
@blur="updateChineseNumber"
|
||||
@keydown="updateChineseNumberGoNewDrug($event)"
|
||||
>
|
||||
<template #addonAfter> g </template>
|
||||
<template #addonAfter> g</template>
|
||||
</InputNumber>
|
||||
,
|
||||
<span
|
||||
<span>
|
||||
<Select
|
||||
:value="drug?.way_id"
|
||||
placeholder="用法"
|
||||
@change="selectDrugUseWayChange"
|
||||
@dropdown-visible-change="
|
||||
selectProductChange(drug.index_id)
|
||||
"
|
||||
>
|
||||
<Select
|
||||
:value="drug?.way_id"
|
||||
class="w-1/5"
|
||||
placeholder="用法:煎服"
|
||||
@change="selectDrugUseWayChange"
|
||||
@dropdown-visible-change="
|
||||
selectProductChange(drug.index_id)
|
||||
"
|
||||
<SelectOption :value="0">煎服</SelectOption>
|
||||
<SelectOption
|
||||
v-for="(value, index) in drugUseWay"
|
||||
:key="index"
|
||||
:value="value.id"
|
||||
>
|
||||
{{ value.name }}
|
||||
</SelectOption>
|
||||
</Select>
|
||||
</span>
|
||||
<p class="card-price">
|
||||
¥<span>{{ (drug.price * drug.number).toFixed(2) }}</span>
|
||||
</p>
|
||||
<Button
|
||||
class="card-delete"
|
||||
type="link"
|
||||
@click="removeDrug(index)"
|
||||
>
|
||||
<SelectOption :value="0">煎服</SelectOption>
|
||||
<SelectOption
|
||||
v-for="(value, index) in drugUseWay"
|
||||
:key="index"
|
||||
:value="value.id"
|
||||
>
|
||||
{{ value.name }}
|
||||
</SelectOption>
|
||||
</Select>
|
||||
,
|
||||
</span>
|
||||
¥<span>{{ (drug.price * drug.number).toFixed(2) }}元</span>
|
||||
<Button style="margin-left: auto" type="link" @click="removeDrug(index)"><DeleteTwoTone /></Button>
|
||||
<DeleteTwoTone/>
|
||||
</Button>
|
||||
</p>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col
|
||||
:xxl="12"
|
||||
:xl="12"
|
||||
:lg="24"
|
||||
:md="24"
|
||||
:sm="12"
|
||||
:xs="24"
|
||||
>
|
||||
<Col :lg="24" :md="24" :sm="12" :xl="12" :xs="24" :xxl="8">
|
||||
<Card title="">
|
||||
<div>
|
||||
<span class="card-index">{{ currentDrugs.length + 1 }}、</span>
|
||||
<p>
|
||||
<span style="font-size: 20px; font-weight: bold">{{(currentDrugs.length+1)}}、</span>
|
||||
<Select
|
||||
show-search
|
||||
class="w-1/5 new-select-drug-name"
|
||||
placeholder="药名"
|
||||
:filter-option="false"
|
||||
v-model:value="newDrugInfo.id"
|
||||
:filter-option="false"
|
||||
class="new-select-drug-name w-1/5"
|
||||
style="min-width: 100px"
|
||||
placeholder="药名"
|
||||
show-search
|
||||
@change="selectNewDrugInfo"
|
||||
@search="searchOption"
|
||||
>
|
||||
@@ -1290,36 +1391,40 @@ const newDrugInfo = ref({})
|
||||
{{ value.drug.drug_name }}
|
||||
</SelectOption>
|
||||
</Select>
|
||||
,
|
||||
,
|
||||
<InputNumber
|
||||
v-model:value="newDrugInfo.number"
|
||||
class="w-1/5 new-number-input"
|
||||
class="new-number-input w-1/5"
|
||||
style="min-width: 100px"
|
||||
@blur="updateChineseNumber"
|
||||
@keydown="selectDrugByNewDrugInfo($event, true)"
|
||||
>
|
||||
<template #addonAfter> g </template>
|
||||
<template #addonAfter> g</template>
|
||||
</InputNumber>
|
||||
,
|
||||
<span
|
||||
,
|
||||
<span>
|
||||
<Select
|
||||
v-model:value="newDrugInfo.way_id"
|
||||
placeholder="用法"
|
||||
@keydown="selectDrugByNewDrugInfo($event, true)"
|
||||
>
|
||||
<Select
|
||||
v-model:value="newDrugInfo.way_id"
|
||||
class="w-1/5"
|
||||
placeholder="用法:煎服"
|
||||
@keydown="selectDrugByNewDrugInfo($event, true)"
|
||||
>
|
||||
<SelectOption :value="0">煎服</SelectOption>
|
||||
<SelectOption
|
||||
v-for="(value, index) in drugUseWay"
|
||||
:key="index"
|
||||
:value="value.id"
|
||||
>
|
||||
{{ value.name }}
|
||||
</SelectOption>
|
||||
</Select>
|
||||
,
|
||||
</span>
|
||||
¥<span>{{ ((newDrugInfo.price || 0) * (newDrugInfo.number || 1)).toFixed(2) }}元</span>
|
||||
<SelectOption :value="0">煎服</SelectOption>
|
||||
<SelectOption
|
||||
v-for="(value, index) in drugUseWay"
|
||||
:key="index"
|
||||
:value="value.id"
|
||||
>
|
||||
{{ value.name }}
|
||||
</SelectOption>
|
||||
</Select>
|
||||
</span>
|
||||
<p class="card-price">
|
||||
¥<span>{{
|
||||
(
|
||||
(newDrugInfo.price || 0) * (newDrugInfo.number || 1)
|
||||
).toFixed(2)
|
||||
}}元</span>
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
</Card>
|
||||
@@ -1346,7 +1451,7 @@ const newDrugInfo = ref({})
|
||||
v-if="activeCategory !== 1"
|
||||
style="width: 120px; margin: 0 auto"
|
||||
>
|
||||
<Image :src="drug.image" />
|
||||
<Image :src="drug.image"/>
|
||||
</div>
|
||||
<div>
|
||||
<p>
|
||||
@@ -1365,7 +1470,7 @@ const newDrugInfo = ref({})
|
||||
class="w-full"
|
||||
@blur="updateChineseNumber"
|
||||
>
|
||||
<template #addonAfter> g </template>
|
||||
<template #addonAfter> g</template>
|
||||
</InputNumber>
|
||||
</div>
|
||||
<div v-else class="quantity-control">
|
||||
@@ -1499,36 +1604,59 @@ const newDrugInfo = ref({})
|
||||
</div>
|
||||
</div>
|
||||
<Button type="primary" @click="openDiagnosisModal">常用诊断</Button>
|
||||
<Textarea v-model:value="diagnosis" placeholder="输入诊断结果..." />
|
||||
<Textarea v-model:value="diagnosis" placeholder="输入诊断结果..."/>
|
||||
<Button type="primary" @click="openDoctorOrderModal">常用医嘱</Button>
|
||||
<Textarea v-model:value="medicalAdvice" placeholder="输入医嘱..." />
|
||||
<Textarea v-model:value="medicalAdvice" placeholder="输入医嘱..."/>
|
||||
诊疗费用:
|
||||
<InputNumber
|
||||
v-model:value="treatmentPrice"
|
||||
placeholder="请输入诊疗价格"
|
||||
>
|
||||
<template #addonAfter> /元 </template>
|
||||
<template #addonAfter> /元</template>
|
||||
</InputNumber>
|
||||
</div>
|
||||
|
||||
<!-- 费用总计 -->
|
||||
<div class="price-box">
|
||||
<div class="total-cost">加工费:¥{{ processingFee.toFixed(2) }}</div>
|
||||
<div class="total-cost">商品价格:¥{{ totalProductCost.toFixed(2) }}</div>
|
||||
<div class="total-cost">
|
||||
商品价格:¥{{ totalProductCost.toFixed(2) }}
|
||||
</div>
|
||||
<div class="total-cost">总计:¥{{ totalCost.toFixed(2) }}</div>
|
||||
</div>
|
||||
</Page>
|
||||
<div v-else-if="tabType === 0" class="prescription-panel">
|
||||
<Empty />
|
||||
<Empty/>
|
||||
</div>
|
||||
<DiagnosisModals />
|
||||
<DoctorOrderModals />
|
||||
<WesternDrugModal />
|
||||
<PrescrtionDetailModal />
|
||||
<DiagnosisModals/>
|
||||
<DoctorOrderModals/>
|
||||
<WesternDrugModal/>
|
||||
<PrescrtionDetailModal/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.card-index {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.card-price {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
right: 8px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.card-delete {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.container-box {
|
||||
display: grid;
|
||||
grid-template-columns: 300px 1fr;
|
||||
@@ -1539,6 +1667,7 @@ const newDrugInfo = ref({})
|
||||
border-right: 1px solid #e4e7ed;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.dark .patient-panel {
|
||||
border-right: 1px solid #333;
|
||||
}
|
||||
@@ -1549,6 +1678,7 @@ const newDrugInfo = ref({})
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.dark .patient-card {
|
||||
border-bottom: 1px solid #333;
|
||||
}
|
||||
@@ -1569,30 +1699,37 @@ const newDrugInfo = ref({})
|
||||
background: #f4f4f5;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.status.待接诊 {
|
||||
background: #fef0f0;
|
||||
color: #f56c6c;
|
||||
}
|
||||
|
||||
.status.接诊中 {
|
||||
background: #f0f9eb;
|
||||
color: #67c23a;
|
||||
}
|
||||
|
||||
.status.已结束 {
|
||||
background: #f4f4f5;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.status.已取消 {
|
||||
background: #fef0f0;
|
||||
color: #f56c6c;
|
||||
}
|
||||
|
||||
.status.待评价 {
|
||||
background: #f4f4f5;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.status.已评价 {
|
||||
background: #f4f4f5;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.status.已拒诊 {
|
||||
background: #f4f4f5;
|
||||
color: #909399;
|
||||
@@ -1630,6 +1767,7 @@ const newDrugInfo = ref({})
|
||||
animation: pulse 0.5s /*infinite*/;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
@@ -1712,11 +1850,13 @@ const newDrugInfo = ref({})
|
||||
.dark .diagnosis-area textarea {
|
||||
border: 1px solid #333;
|
||||
}
|
||||
|
||||
.price-box {
|
||||
position: fixed;
|
||||
right: 10px;
|
||||
bottom: 62px;
|
||||
}
|
||||
|
||||
.total-cost {
|
||||
text-align: right;
|
||||
font-size: 1.2em;
|
||||
|
||||
Reference in New Issue
Block a user